From 6ebff341406ce72d3ca6143d8edee3f297773d9a Mon Sep 17 00:00:00 2001 From: eriktalvi Date: Mon, 25 Apr 2022 16:17:50 -0700 Subject: [PATCH 01/24] Update to use subdomain rather than region Region based endpoint is only being allowed for backwards compatibility. Use subdomain going forward. --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index f4c178c..d46422f 100644 --- a/readme.md +++ b/readme.md @@ -40,7 +40,7 @@ Timeout: 5, ClientID: "your_onelogin_developer_client_id", ClientSecret: "your_onelogin_developer_client_secret", - Region: "us", + Url: "https://.onelogin.com", }) if err != nil { // handle error From f5f0e11ebc81888698ae32db65f47daad8444ed3 Mon Sep 17 00:00:00 2001 From: George Khaburzaniya Date: Mon, 8 Aug 2022 12:03:42 -0700 Subject: [PATCH 02/24] Include openapi-generator SDK. --- .gitignore | 27 +- .openapi-generator-ignore | 23 + .openapi-generator/FILES | 194 + .openapi-generator/VERSION | 1 + .travis.yml | 8 + Makefile | 17 - api/openapi.yaml | 6164 +++++++ api_default.go | 13860 ++++++++++++++++ client.go | 563 + config.yml | 1 - configuration.go | 240 + coverage.out | 540 - docs/Action.md | 160 + docs/ActivateFactorRequest.md | 134 + docs/AddAccessTokenClaimRequest.md | 108 + docs/AddClientAppRequest.md | 82 + docs/AddRoleUsers200ResponseInner.md | 56 + docs/AddScopeRequest.md | 82 + docs/AuthMethod.md | 25 + docs/AuthServerConfiguration.md | 134 + docs/ClientApp.md | 82 + docs/Condition.md | 108 + docs/Connector.md | 160 + docs/CreateAuthorizationServerRequest.md | 108 + docs/CreateEnvironmentVariableRequest.md | 72 + docs/CreateRoles201ResponseInner.md | 56 + docs/DefaultApi.md | 7263 ++++++++ docs/Device.md | 160 + docs/EnrollFactorRequest.md | 176 + docs/Envvar.md | 134 + docs/ErrorStatus.md | 108 + docs/ErrorStatusErrorsInner.md | 82 + docs/FactorInner.md | 238 + docs/FactorInnerFactorData.md | 82 + docs/GenerateMfaToken200Response.md | 134 + docs/GenerateMfaToken422Response.md | 134 + docs/GenerateMfaToken422ResponseDetails.md | 56 + docs/GenerateMfaTokenRequest.md | 82 + docs/GenerateSamlAssertionRequest.md | 140 + docs/GenerateToken200Response.md | 186 + docs/GenerateToken400Response.md | 56 + docs/GenerateTokenRequest.md | 56 + docs/GetAuthorizationServer200Response.md | 134 + docs/GetAvailableFactors200ResponseInner.md | 108 + docs/GetClientApps200ResponseInner.md | 134 + ...etClientApps200ResponseInnerScopesInner.md | 108 + docs/GetRateLimit200Response.md | 82 + docs/GetRateLimit200ResponseData.md | 108 + docs/GetRiskScore200Response.md | 82 + docs/GetRiskScore400Response.md | 56 + docs/GetRiskScoreRequest.md | 197 + docs/GetScoreInsights200Response.md | 82 + docs/GetScoreInsights200ResponseScores.md | 160 + docs/GetUserApps200ResponseInner.md | 238 + docs/Hook.md | 380 + docs/HookConditionsInner.md | 108 + docs/HookOptions.md | 108 + docs/HookStatus.md | 82 + docs/Id.md | 56 + docs/ListAccessTokenClaims200ResponseInner.md | 264 + docs/ListActions200ResponseInner.md | 82 + docs/ListAppUsers200ResponseInner.md | 160 + ...istAuthorizationServers200ResponseInner.md | 134 + ...ionServers200ResponseInnerConfiguration.md | 82 + .../ListConditionOperators200ResponseInner.md | 82 + docs/ListConditionValues200ResponseInner.md | 82 + docs/ListConditions200ResponseInner.md | 82 + ...ppingConditionOperators200ResponseInner.md | 82 + docs/ListMappingConditions200ResponseInner.md | 82 + docs/ListScopes200ResponseInner.md | 108 + docs/Log.md | 134 + docs/Mapping.md | 187 + docs/Registration.md | 108 + docs/RemoveRoleUsersRequest.md | 56 + docs/RevokeTokenRequest.md | 56 + docs/RiskDevice.md | 56 + docs/RiskRule.md | 212 + docs/RiskUser.md | 103 + docs/Role.md | 155 + docs/Rule.md | 212 + docs/RuleId.md | 56 + docs/Schema.md | 550 + docs/Schema1.md | 186 + docs/Schema1AddedBy.md | 82 + docs/SchemaProvisioning.md | 56 + docs/Session.md | 56 + docs/SetRoleApps200ResponseInner.md | 56 + docs/Source.md | 82 + docs/Status.md | 134 + docs/Status1.md | 108 + docs/Status2.md | 56 + docs/Status2Status.md | 134 + docs/TrackEventRequest.md | 244 + docs/UpdateAuthorizationServer400Response.md | 134 + docs/UpdateClientAppRequest.md | 56 + docs/UpdateEnvironmentVariableRequest.md | 51 + docs/UpdateRole200Response.md | 56 + docs/User.md | 992 ++ docs/VerifyEnrollmentRequest.md | 56 + docs/VerifyFactorRequest.md | 82 + docs/VerifyFactorSaml200Response.md | 82 + docs/VerifyFactorSamlRequest.md | 145 + docs/VerifyFactorVoice200ResponseInner.md | 108 + git_push.sh | 57 + go.mod | 12 +- go.sum | 87 +- internal/customerrors/errors.go | 25 - internal/customerrors/errors_test.go | 39 - internal/customerrors/oneloginerror.go | 30 - internal/customerrors/oneloginerror_test.go | 47 - internal/customerrors/requesterror.go | 52 - internal/customerrors/requesterror_test.go | 53 - internal/test/test_repository.go | 65 - model_action.go | 264 + model_activate_factor_request.go | 227 + model_add_access_token_claim_request.go | 187 + model_add_client_app_request.go | 151 + model_add_role_users_200_response_inner.go | 115 + model_add_scope_request.go | 151 + model_auth_method.go | 123 + model_auth_server_configuration.go | 223 + model_client_app.go | 151 + model_condition.go | 190 + model_connector.go | 263 + model_create_authorization_server_request.go | 187 + model_create_environment_variable_request.go | 139 + model_create_roles_201_response_inner.go | 115 + model_device.go | 259 + model_enroll_factor_request.go | 287 + model_envvar.go | 227 + model_error_status.go | 187 + model_error_status_errors_inner.go | 151 + model_factor_inner.go | 374 + model_factor_inner_factor_data.go | 153 + model_generate_mfa_token_200_response.go | 227 + model_generate_mfa_token_422_response.go | 223 + ...generate_mfa_token_422_response_details.go | 115 + model_generate_mfa_token_request.go | 153 + model_generate_saml_assertion_request.go | 236 + model_generate_token_200_response.go | 295 + model_generate_token_400_response.go | 115 + model_generate_token_request.go | 115 + ...l_get_authorization_server_200_response.go | 223 + ...et_available_factors_200_response_inner.go | 190 + model_get_client_apps_200_response_inner.go | 223 + ...nt_apps_200_response_inner_scopes_inner.go | 187 + model_get_rate_limit_200_response.go | 151 + model_get_rate_limit_200_response_data.go | 187 + model_get_risk_score_200_response.go | 153 + model_get_risk_score_400_response.go | 115 + model_get_risk_score_request.go | 313 + model_get_score_insights_200_response.go | 151 + ..._get_score_insights_200_response_scores.go | 259 + model_get_user_apps_200_response_inner.go | 374 + model_hook.go | 583 + model_hook_conditions_inner.go | 187 + model_hook_options.go | 187 + model_hook_status.go | 151 + model_id.go | 115 + ..._access_token_claims_200_response_inner.go | 403 + model_list_actions_200_response_inner.go | 153 + model_list_app_users_200_response_inner.go | 259 + ...uthorization_servers_200_response_inner.go | 223 + ...ervers_200_response_inner_configuration.go | 151 + ..._condition_operators_200_response_inner.go | 153 + ...ist_condition_values_200_response_inner.go | 151 + model_list_conditions_200_response_inner.go | 153 + ..._condition_operators_200_response_inner.go | 153 + ...t_mapping_conditions_200_response_inner.go | 153 + model_list_scopes_200_response_inner.go | 187 + model_log.go | 223 + model_mapping.go | 302 + model_registration.go | 190 + model_remove_role_users_request.go | 115 + model_revoke_token_request.go | 115 + model_risk_device.go | 116 + model_risk_rule.go | 335 + model_risk_user.go | 187 + model_role.go | 252 + model_rule.go | 337 + model_rule_id.go | 115 + model_schema.go | 814 + model_schema_1.go | 296 + model_schema_1_added_by.go | 151 + model_schema_provisioning.go | 116 + model_session.go | 116 + model_set_role_apps_200_response_inner.go | 116 + model_source.go | 152 + model_status.go | 223 + model_status_1.go | 187 + model_status_2.go | 115 + model_status_2_status.go | 223 + model_track_event_request.go | 380 + ...pdate_authorization_server_400_response.go | 223 + model_update_client_app_request.go | 115 + model_update_environment_variable_request.go | 109 + model_update_role_200_response.go | 115 + model_user.go | 1435 ++ model_verify_enrollment_request.go | 115 + model_verify_factor_request.go | 153 + model_verify_factor_saml_200_response.go | 153 + model_verify_factor_saml_request.go | 243 + ..._verify_factor_voice_200_response_inner.go | 187 + pkg/client/client.go | 95 - pkg/client/client_config.go | 61 - pkg/client/client_config_test.go | 196 - pkg/client/client_test.go | 107 - pkg/oltypes/bool.go | 17 - pkg/oltypes/bool_test.go | 40 - pkg/oltypes/number.go | 33 - pkg/oltypes/number_test.go | 90 - pkg/oltypes/strings.go | 22 - pkg/oltypes/strings_test.go | 37 - pkg/services/apps/app_rules/app_rules_test.go | 411 - pkg/services/apps/app_rules/model.go | 29 - pkg/services/apps/app_rules/v2.go | 218 - pkg/services/apps/apps_test.go | 342 - pkg/services/apps/model.go | 128 - pkg/services/apps/v2.go | 190 - .../access_token_claims_test.go | 301 - .../auth_servers/access_token_claims/model.go | 18 - .../auth_servers/access_token_claims/v2.go | 104 - .../auth_servers/auth_servers_test.go | 292 - .../client_apps/client_apps_test.go | 294 - .../auth_servers/client_apps/model.go | 16 - pkg/services/auth_servers/client_apps/v2.go | 113 - pkg/services/auth_servers/model.go | 22 - pkg/services/auth_servers/scopes/model.go | 12 - .../auth_servers/scopes/scopes_test.go | 244 - pkg/services/auth_servers/scopes/v2.go | 104 - pkg/services/auth_servers/v2.go | 123 - pkg/services/interfaces.go | 33 - pkg/services/legal_values/legal_values.go | 45 - .../legal_values/legal_values_test.go | 56 - pkg/services/olhttp/model.go | 23 - pkg/services/olhttp/olrequest.go | 279 - pkg/services/olhttp/olrequest_test.go | 599 - pkg/services/privileges/model.go | 31 - pkg/services/privileges/privileges_test.go | 502 - pkg/services/privileges/v1.go | 357 - pkg/services/roles/model.go | 17 - pkg/services/roles/roles_test.go | 221 - pkg/services/roles/v1.go | 127 - pkg/services/session_login_tokens/model.go | 18 - .../session_login_tokens_test.go | 53 - pkg/services/session_login_tokens/v1.go | 42 - pkg/services/smarthooks/envs/envs_test.go | 257 - pkg/services/smarthooks/envs/model.go | 22 - pkg/services/smarthooks/envs/v1.go | 152 - pkg/services/smarthooks/model.go | 92 - pkg/services/smarthooks/smarthooks_test.go | 264 - pkg/services/smarthooks/v1.go | 159 - pkg/services/user_mappings/model.go | 37 - .../user_mappings/user_mappings_test.go | 457 - pkg/services/user_mappings/v2.go | 239 - pkg/services/users/model.go | 94 - pkg/services/users/users_test.go | 262 - pkg/services/users/v2.go | 146 - pkg/utils/utils.go | 84 - pkg/utils/utils_test.go | 143 - readme.md | 372 +- response.go | 47 + utils.go | 328 + 263 files changed, 60093 insertions(+), 9502 deletions(-) create mode 100644 .openapi-generator-ignore create mode 100644 .openapi-generator/FILES create mode 100644 .openapi-generator/VERSION create mode 100644 .travis.yml delete mode 100644 Makefile create mode 100644 api/openapi.yaml create mode 100644 api_default.go create mode 100644 client.go delete mode 100644 config.yml create mode 100644 configuration.go delete mode 100644 coverage.out create mode 100644 docs/Action.md create mode 100644 docs/ActivateFactorRequest.md create mode 100644 docs/AddAccessTokenClaimRequest.md create mode 100644 docs/AddClientAppRequest.md create mode 100644 docs/AddRoleUsers200ResponseInner.md create mode 100644 docs/AddScopeRequest.md create mode 100644 docs/AuthMethod.md create mode 100644 docs/AuthServerConfiguration.md create mode 100644 docs/ClientApp.md create mode 100644 docs/Condition.md create mode 100644 docs/Connector.md create mode 100644 docs/CreateAuthorizationServerRequest.md create mode 100644 docs/CreateEnvironmentVariableRequest.md create mode 100644 docs/CreateRoles201ResponseInner.md create mode 100644 docs/DefaultApi.md create mode 100644 docs/Device.md create mode 100644 docs/EnrollFactorRequest.md create mode 100644 docs/Envvar.md create mode 100644 docs/ErrorStatus.md create mode 100644 docs/ErrorStatusErrorsInner.md create mode 100644 docs/FactorInner.md create mode 100644 docs/FactorInnerFactorData.md create mode 100644 docs/GenerateMfaToken200Response.md create mode 100644 docs/GenerateMfaToken422Response.md create mode 100644 docs/GenerateMfaToken422ResponseDetails.md create mode 100644 docs/GenerateMfaTokenRequest.md create mode 100644 docs/GenerateSamlAssertionRequest.md create mode 100644 docs/GenerateToken200Response.md create mode 100644 docs/GenerateToken400Response.md create mode 100644 docs/GenerateTokenRequest.md create mode 100644 docs/GetAuthorizationServer200Response.md create mode 100644 docs/GetAvailableFactors200ResponseInner.md create mode 100644 docs/GetClientApps200ResponseInner.md create mode 100644 docs/GetClientApps200ResponseInnerScopesInner.md create mode 100644 docs/GetRateLimit200Response.md create mode 100644 docs/GetRateLimit200ResponseData.md create mode 100644 docs/GetRiskScore200Response.md create mode 100644 docs/GetRiskScore400Response.md create mode 100644 docs/GetRiskScoreRequest.md create mode 100644 docs/GetScoreInsights200Response.md create mode 100644 docs/GetScoreInsights200ResponseScores.md create mode 100644 docs/GetUserApps200ResponseInner.md create mode 100644 docs/Hook.md create mode 100644 docs/HookConditionsInner.md create mode 100644 docs/HookOptions.md create mode 100644 docs/HookStatus.md create mode 100644 docs/Id.md create mode 100644 docs/ListAccessTokenClaims200ResponseInner.md create mode 100644 docs/ListActions200ResponseInner.md create mode 100644 docs/ListAppUsers200ResponseInner.md create mode 100644 docs/ListAuthorizationServers200ResponseInner.md create mode 100644 docs/ListAuthorizationServers200ResponseInnerConfiguration.md create mode 100644 docs/ListConditionOperators200ResponseInner.md create mode 100644 docs/ListConditionValues200ResponseInner.md create mode 100644 docs/ListConditions200ResponseInner.md create mode 100644 docs/ListMappingConditionOperators200ResponseInner.md create mode 100644 docs/ListMappingConditions200ResponseInner.md create mode 100644 docs/ListScopes200ResponseInner.md create mode 100644 docs/Log.md create mode 100644 docs/Mapping.md create mode 100644 docs/Registration.md create mode 100644 docs/RemoveRoleUsersRequest.md create mode 100644 docs/RevokeTokenRequest.md create mode 100644 docs/RiskDevice.md create mode 100644 docs/RiskRule.md create mode 100644 docs/RiskUser.md create mode 100644 docs/Role.md create mode 100644 docs/Rule.md create mode 100644 docs/RuleId.md create mode 100644 docs/Schema.md create mode 100644 docs/Schema1.md create mode 100644 docs/Schema1AddedBy.md create mode 100644 docs/SchemaProvisioning.md create mode 100644 docs/Session.md create mode 100644 docs/SetRoleApps200ResponseInner.md create mode 100644 docs/Source.md create mode 100644 docs/Status.md create mode 100644 docs/Status1.md create mode 100644 docs/Status2.md create mode 100644 docs/Status2Status.md create mode 100644 docs/TrackEventRequest.md create mode 100644 docs/UpdateAuthorizationServer400Response.md create mode 100644 docs/UpdateClientAppRequest.md create mode 100644 docs/UpdateEnvironmentVariableRequest.md create mode 100644 docs/UpdateRole200Response.md create mode 100644 docs/User.md create mode 100644 docs/VerifyEnrollmentRequest.md create mode 100644 docs/VerifyFactorRequest.md create mode 100644 docs/VerifyFactorSaml200Response.md create mode 100644 docs/VerifyFactorSamlRequest.md create mode 100644 docs/VerifyFactorVoice200ResponseInner.md create mode 100644 git_push.sh delete mode 100644 internal/customerrors/errors.go delete mode 100644 internal/customerrors/errors_test.go delete mode 100644 internal/customerrors/oneloginerror.go delete mode 100644 internal/customerrors/oneloginerror_test.go delete mode 100644 internal/customerrors/requesterror.go delete mode 100644 internal/customerrors/requesterror_test.go delete mode 100644 internal/test/test_repository.go create mode 100644 model_action.go create mode 100644 model_activate_factor_request.go create mode 100644 model_add_access_token_claim_request.go create mode 100644 model_add_client_app_request.go create mode 100644 model_add_role_users_200_response_inner.go create mode 100644 model_add_scope_request.go create mode 100644 model_auth_method.go create mode 100644 model_auth_server_configuration.go create mode 100644 model_client_app.go create mode 100644 model_condition.go create mode 100644 model_connector.go create mode 100644 model_create_authorization_server_request.go create mode 100644 model_create_environment_variable_request.go create mode 100644 model_create_roles_201_response_inner.go create mode 100644 model_device.go create mode 100644 model_enroll_factor_request.go create mode 100644 model_envvar.go create mode 100644 model_error_status.go create mode 100644 model_error_status_errors_inner.go create mode 100644 model_factor_inner.go create mode 100644 model_factor_inner_factor_data.go create mode 100644 model_generate_mfa_token_200_response.go create mode 100644 model_generate_mfa_token_422_response.go create mode 100644 model_generate_mfa_token_422_response_details.go create mode 100644 model_generate_mfa_token_request.go create mode 100644 model_generate_saml_assertion_request.go create mode 100644 model_generate_token_200_response.go create mode 100644 model_generate_token_400_response.go create mode 100644 model_generate_token_request.go create mode 100644 model_get_authorization_server_200_response.go create mode 100644 model_get_available_factors_200_response_inner.go create mode 100644 model_get_client_apps_200_response_inner.go create mode 100644 model_get_client_apps_200_response_inner_scopes_inner.go create mode 100644 model_get_rate_limit_200_response.go create mode 100644 model_get_rate_limit_200_response_data.go create mode 100644 model_get_risk_score_200_response.go create mode 100644 model_get_risk_score_400_response.go create mode 100644 model_get_risk_score_request.go create mode 100644 model_get_score_insights_200_response.go create mode 100644 model_get_score_insights_200_response_scores.go create mode 100644 model_get_user_apps_200_response_inner.go create mode 100644 model_hook.go create mode 100644 model_hook_conditions_inner.go create mode 100644 model_hook_options.go create mode 100644 model_hook_status.go create mode 100644 model_id.go create mode 100644 model_list_access_token_claims_200_response_inner.go create mode 100644 model_list_actions_200_response_inner.go create mode 100644 model_list_app_users_200_response_inner.go create mode 100644 model_list_authorization_servers_200_response_inner.go create mode 100644 model_list_authorization_servers_200_response_inner_configuration.go create mode 100644 model_list_condition_operators_200_response_inner.go create mode 100644 model_list_condition_values_200_response_inner.go create mode 100644 model_list_conditions_200_response_inner.go create mode 100644 model_list_mapping_condition_operators_200_response_inner.go create mode 100644 model_list_mapping_conditions_200_response_inner.go create mode 100644 model_list_scopes_200_response_inner.go create mode 100644 model_log.go create mode 100644 model_mapping.go create mode 100644 model_registration.go create mode 100644 model_remove_role_users_request.go create mode 100644 model_revoke_token_request.go create mode 100644 model_risk_device.go create mode 100644 model_risk_rule.go create mode 100644 model_risk_user.go create mode 100644 model_role.go create mode 100644 model_rule.go create mode 100644 model_rule_id.go create mode 100644 model_schema.go create mode 100644 model_schema_1.go create mode 100644 model_schema_1_added_by.go create mode 100644 model_schema_provisioning.go create mode 100644 model_session.go create mode 100644 model_set_role_apps_200_response_inner.go create mode 100644 model_source.go create mode 100644 model_status.go create mode 100644 model_status_1.go create mode 100644 model_status_2.go create mode 100644 model_status_2_status.go create mode 100644 model_track_event_request.go create mode 100644 model_update_authorization_server_400_response.go create mode 100644 model_update_client_app_request.go create mode 100644 model_update_environment_variable_request.go create mode 100644 model_update_role_200_response.go create mode 100644 model_user.go create mode 100644 model_verify_enrollment_request.go create mode 100644 model_verify_factor_request.go create mode 100644 model_verify_factor_saml_200_response.go create mode 100644 model_verify_factor_saml_request.go create mode 100644 model_verify_factor_voice_200_response_inner.go delete mode 100644 pkg/client/client.go delete mode 100644 pkg/client/client_config.go delete mode 100644 pkg/client/client_config_test.go delete mode 100644 pkg/client/client_test.go delete mode 100644 pkg/oltypes/bool.go delete mode 100644 pkg/oltypes/bool_test.go delete mode 100644 pkg/oltypes/number.go delete mode 100644 pkg/oltypes/number_test.go delete mode 100644 pkg/oltypes/strings.go delete mode 100644 pkg/oltypes/strings_test.go delete mode 100644 pkg/services/apps/app_rules/app_rules_test.go delete mode 100644 pkg/services/apps/app_rules/model.go delete mode 100644 pkg/services/apps/app_rules/v2.go delete mode 100644 pkg/services/apps/apps_test.go delete mode 100644 pkg/services/apps/model.go delete mode 100644 pkg/services/apps/v2.go delete mode 100644 pkg/services/auth_servers/access_token_claims/access_token_claims_test.go delete mode 100644 pkg/services/auth_servers/access_token_claims/model.go delete mode 100644 pkg/services/auth_servers/access_token_claims/v2.go delete mode 100644 pkg/services/auth_servers/auth_servers_test.go delete mode 100644 pkg/services/auth_servers/client_apps/client_apps_test.go delete mode 100644 pkg/services/auth_servers/client_apps/model.go delete mode 100644 pkg/services/auth_servers/client_apps/v2.go delete mode 100644 pkg/services/auth_servers/model.go delete mode 100644 pkg/services/auth_servers/scopes/model.go delete mode 100644 pkg/services/auth_servers/scopes/scopes_test.go delete mode 100644 pkg/services/auth_servers/scopes/v2.go delete mode 100644 pkg/services/auth_servers/v2.go delete mode 100644 pkg/services/interfaces.go delete mode 100644 pkg/services/legal_values/legal_values.go delete mode 100644 pkg/services/legal_values/legal_values_test.go delete mode 100644 pkg/services/olhttp/model.go delete mode 100644 pkg/services/olhttp/olrequest.go delete mode 100644 pkg/services/olhttp/olrequest_test.go delete mode 100644 pkg/services/privileges/model.go delete mode 100644 pkg/services/privileges/privileges_test.go delete mode 100644 pkg/services/privileges/v1.go delete mode 100644 pkg/services/roles/model.go delete mode 100644 pkg/services/roles/roles_test.go delete mode 100644 pkg/services/roles/v1.go delete mode 100644 pkg/services/session_login_tokens/model.go delete mode 100644 pkg/services/session_login_tokens/session_login_tokens_test.go delete mode 100644 pkg/services/session_login_tokens/v1.go delete mode 100644 pkg/services/smarthooks/envs/envs_test.go delete mode 100644 pkg/services/smarthooks/envs/model.go delete mode 100644 pkg/services/smarthooks/envs/v1.go delete mode 100644 pkg/services/smarthooks/model.go delete mode 100644 pkg/services/smarthooks/smarthooks_test.go delete mode 100644 pkg/services/smarthooks/v1.go delete mode 100644 pkg/services/user_mappings/model.go delete mode 100644 pkg/services/user_mappings/user_mappings_test.go delete mode 100644 pkg/services/user_mappings/v2.go delete mode 100644 pkg/services/users/model.go delete mode 100644 pkg/services/users/users_test.go delete mode 100644 pkg/services/users/v2.go delete mode 100644 pkg/utils/utils.go delete mode 100644 pkg/utils/utils_test.go create mode 100644 response.go create mode 100644 utils.go diff --git a/.gitignore b/.gitignore index 2c4ed74..daf913b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,24 @@ -./vendor -coverage.out -bin +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe +*.test +*.prof diff --git a/.openapi-generator-ignore b/.openapi-generator-ignore new file mode 100644 index 0000000..7484ee5 --- /dev/null +++ b/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES new file mode 100644 index 0000000..0a3a7ae --- /dev/null +++ b/.openapi-generator/FILES @@ -0,0 +1,194 @@ +.gitignore +.openapi-generator-ignore +.travis.yml +README.md +api/openapi.yaml +api_default.go +client.go +configuration.go +docs/Action.md +docs/ActivateFactorRequest.md +docs/AddAccessTokenClaimRequest.md +docs/AddClientAppRequest.md +docs/AddRoleUsers200ResponseInner.md +docs/AddScopeRequest.md +docs/AuthMethod.md +docs/AuthServerConfiguration.md +docs/ClientApp.md +docs/Condition.md +docs/Connector.md +docs/CreateAuthorizationServerRequest.md +docs/CreateEnvironmentVariableRequest.md +docs/CreateRoles201ResponseInner.md +docs/DefaultApi.md +docs/Device.md +docs/EnrollFactorRequest.md +docs/Envvar.md +docs/ErrorStatus.md +docs/ErrorStatusErrorsInner.md +docs/FactorInner.md +docs/FactorInnerFactorData.md +docs/GenerateMfaToken200Response.md +docs/GenerateMfaToken422Response.md +docs/GenerateMfaToken422ResponseDetails.md +docs/GenerateMfaTokenRequest.md +docs/GenerateSamlAssertionRequest.md +docs/GenerateToken200Response.md +docs/GenerateToken400Response.md +docs/GenerateTokenRequest.md +docs/GetAuthorizationServer200Response.md +docs/GetAvailableFactors200ResponseInner.md +docs/GetClientApps200ResponseInner.md +docs/GetClientApps200ResponseInnerScopesInner.md +docs/GetRateLimit200Response.md +docs/GetRateLimit200ResponseData.md +docs/GetRiskScore200Response.md +docs/GetRiskScore400Response.md +docs/GetRiskScoreRequest.md +docs/GetScoreInsights200Response.md +docs/GetScoreInsights200ResponseScores.md +docs/GetUserApps200ResponseInner.md +docs/Hook.md +docs/HookConditionsInner.md +docs/HookOptions.md +docs/HookStatus.md +docs/Id.md +docs/ListAccessTokenClaims200ResponseInner.md +docs/ListActions200ResponseInner.md +docs/ListAppUsers200ResponseInner.md +docs/ListAuthorizationServers200ResponseInner.md +docs/ListAuthorizationServers200ResponseInnerConfiguration.md +docs/ListConditionOperators200ResponseInner.md +docs/ListConditionValues200ResponseInner.md +docs/ListConditions200ResponseInner.md +docs/ListMappingConditionOperators200ResponseInner.md +docs/ListMappingConditions200ResponseInner.md +docs/ListScopes200ResponseInner.md +docs/Log.md +docs/Mapping.md +docs/Registration.md +docs/RemoveRoleUsersRequest.md +docs/RevokeTokenRequest.md +docs/RiskDevice.md +docs/RiskRule.md +docs/RiskUser.md +docs/Role.md +docs/Rule.md +docs/RuleId.md +docs/Schema.md +docs/Schema1.md +docs/Schema1AddedBy.md +docs/SchemaProvisioning.md +docs/Session.md +docs/SetRoleApps200ResponseInner.md +docs/Source.md +docs/Status.md +docs/Status1.md +docs/Status2.md +docs/Status2Status.md +docs/TrackEventRequest.md +docs/UpdateAuthorizationServer400Response.md +docs/UpdateClientAppRequest.md +docs/UpdateEnvironmentVariableRequest.md +docs/UpdateRole200Response.md +docs/User.md +docs/VerifyEnrollmentRequest.md +docs/VerifyFactorRequest.md +docs/VerifyFactorSaml200Response.md +docs/VerifyFactorSamlRequest.md +docs/VerifyFactorVoice200ResponseInner.md +git_push.sh +go.mod +go.sum +model_action.go +model_activate_factor_request.go +model_add_access_token_claim_request.go +model_add_client_app_request.go +model_add_role_users_200_response_inner.go +model_add_scope_request.go +model_auth_method.go +model_auth_server_configuration.go +model_client_app.go +model_condition.go +model_connector.go +model_create_authorization_server_request.go +model_create_environment_variable_request.go +model_create_roles_201_response_inner.go +model_device.go +model_enroll_factor_request.go +model_envvar.go +model_error_status.go +model_error_status_errors_inner.go +model_factor_inner.go +model_factor_inner_factor_data.go +model_generate_mfa_token_200_response.go +model_generate_mfa_token_422_response.go +model_generate_mfa_token_422_response_details.go +model_generate_mfa_token_request.go +model_generate_saml_assertion_request.go +model_generate_token_200_response.go +model_generate_token_400_response.go +model_generate_token_request.go +model_get_authorization_server_200_response.go +model_get_available_factors_200_response_inner.go +model_get_client_apps_200_response_inner.go +model_get_client_apps_200_response_inner_scopes_inner.go +model_get_rate_limit_200_response.go +model_get_rate_limit_200_response_data.go +model_get_risk_score_200_response.go +model_get_risk_score_400_response.go +model_get_risk_score_request.go +model_get_score_insights_200_response.go +model_get_score_insights_200_response_scores.go +model_get_user_apps_200_response_inner.go +model_hook.go +model_hook_conditions_inner.go +model_hook_options.go +model_hook_status.go +model_id.go +model_list_access_token_claims_200_response_inner.go +model_list_actions_200_response_inner.go +model_list_app_users_200_response_inner.go +model_list_authorization_servers_200_response_inner.go +model_list_authorization_servers_200_response_inner_configuration.go +model_list_condition_operators_200_response_inner.go +model_list_condition_values_200_response_inner.go +model_list_conditions_200_response_inner.go +model_list_mapping_condition_operators_200_response_inner.go +model_list_mapping_conditions_200_response_inner.go +model_list_scopes_200_response_inner.go +model_log.go +model_mapping.go +model_registration.go +model_remove_role_users_request.go +model_revoke_token_request.go +model_risk_device.go +model_risk_rule.go +model_risk_user.go +model_role.go +model_rule.go +model_rule_id.go +model_schema.go +model_schema_1.go +model_schema_1_added_by.go +model_schema_provisioning.go +model_session.go +model_set_role_apps_200_response_inner.go +model_source.go +model_status.go +model_status_1.go +model_status_2.go +model_status_2_status.go +model_track_event_request.go +model_update_authorization_server_400_response.go +model_update_client_app_request.go +model_update_environment_variable_request.go +model_update_role_200_response.go +model_user.go +model_verify_enrollment_request.go +model_verify_factor_request.go +model_verify_factor_saml_200_response.go +model_verify_factor_saml_request.go +model_verify_factor_voice_200_response_inner.go +response.go +utils.go diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION new file mode 100644 index 0000000..6d54bbd --- /dev/null +++ b/.openapi-generator/VERSION @@ -0,0 +1 @@ +6.0.1 \ No newline at end of file diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..f5cb2ce --- /dev/null +++ b/.travis.yml @@ -0,0 +1,8 @@ +language: go + +install: + - go get -d -v . + +script: + - go build -v ./ + diff --git a/Makefile b/Makefile deleted file mode 100644 index 3df2d10..0000000 --- a/Makefile +++ /dev/null @@ -1,17 +0,0 @@ -run: - go run './cmd/main.go' - -build: - go build './...' - -test: - go install github.com/jpoles1/gopherbadger@v2.4.0 - gopherbadger -md="readme.md" -png=false - -secure: - # or install it into ./bin/ - curl -sfL https://raw.githubusercontent.com/securego/gosec/master/install.sh | sh -s - ./bin/gosec -exclude=G104 ./... - -link: - ln -s ${GOPATH}/src/github.com/onelogin/onelogin-go-sdk . diff --git a/api/openapi.yaml b/api/openapi.yaml new file mode 100644 index 0000000..98c6ceb --- /dev/null +++ b/api/openapi.yaml @@ -0,0 +1,6164 @@ +openapi: 3.0.3 +info: + title: OneLogin API + version: 3.0.0-alpha.1 +servers: +- url: "https://{subdomain}.{domain}.com" + variables: + subdomain: + default: onelogininc + domain: + default: onelogin +paths: + /auth/oauth2/v2/token: + post: + operationId: generateToken + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/generateToken_request' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/generateToken_200_response' + description: OK + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/generateToken_400_response' + description: "Typically, either grant_type value is incorrect or Authorization\ + \ header is incorrectly formatted." + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/generateToken_400_response' + description: "Typically, this error means that your client_id and/or client_secret\ + \ values are invalid." + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/generateToken_400_response' + description: "Typically, this error means that you are using the incorrect\ + \ method. Ensure that you are making a POST." + /auth/oauth2/revoke: + post: + operationId: revokeToken + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/revokeToken_request' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/generateToken_400_response' + description: OK + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/generateToken_400_response' + description: "Possibly, the Authorization header is incorrectly formatted." + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/generateToken_400_response' + description: "Typically, this error means that your client_id and/or client_secret\ + \ values are invalid." + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/generateToken_400_response' + description: "Typically, this error means that you are using the incorrect\ + \ method. Ensure that you are making a POST." + /auth/rate_limit: + get: + operationId: getRateLimit + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/getRateLimit_200_response' + description: OK + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/generateToken_400_response' + description: Bad Request + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/generateToken_400_response' + description: Unauthorized + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/generateToken_400_response' + /api/2/api_authorizations: + get: + operationId: listAuthorizationServers + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/listAuthorizationServers_200_response_inner' + type: array + description: OK + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + post: + operationId: createAuthorizationServer + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + requestBody: + $ref: '#/components/requestBodies/auth_server' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/id' + description: CREATED + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: Audiences are required + /api/2/api_authorizations/{id}: + delete: + operationId: deleteAuthorizationServer + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - in: path + name: id + required: true + schema: + type: integer + responses: + "204": + description: NO CONTENT + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: Invalid ID + get: + operationId: getAuthorizationServer + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - in: path + name: id + required: true + schema: + type: integer + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/getAuthorizationServer_200_response' + description: OK + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: NOT FOUND + put: + operationId: updateAuthorizationServer + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - in: path + name: id + required: true + schema: + type: integer + requestBody: + $ref: '#/components/requestBodies/auth_server' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/id' + description: OK + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/updateAuthorizationServer_400_response' + description: You need to submit all of the attributes + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: Indicates that the syntax of the request is good but a value + supplied is not valid. + /api/2/api_authorizations/{id}/claims: + get: + operationId: listAccessTokenClaims + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - in: path + name: id + required: true + schema: + type: integer + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/listAccessTokenClaims_200_response_inner' + type: array + description: OK + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: Invalid ID + post: + operationId: addAccessTokenClaim + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - in: path + name: id + required: true + schema: + type: integer + requestBody: + $ref: '#/components/requestBodies/claim' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/id' + description: OK + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: Invalid ID + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: This name already exists + /api/2/api_authorizations/{id}/claims/{claim_id}: + delete: + operationId: deleteAccessTokenClaim + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - in: path + name: id + required: true + schema: + type: integer + - in: path + name: claim_id + required: true + schema: + type: integer + responses: + "204": + description: NO CONTENT + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: Invalid ID + put: + operationId: updateAccessTokenClaim + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - in: path + name: id + required: true + schema: + type: integer + - in: path + name: claim_id + required: true + schema: + type: integer + requestBody: + $ref: '#/components/requestBodies/claim' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/id' + description: OK + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: Invalid ID + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: This name already exists + /api/2/api_authorizations/{id}/scopes: + get: + operationId: listScopes + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - in: path + name: id + required: true + schema: + type: integer + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/listScopes_200_response_inner' + type: array + description: OK + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: Invalid ID + post: + operationId: addScope + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - in: path + name: id + required: true + schema: + type: integer + requestBody: + $ref: '#/components/requestBodies/scope' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/id' + description: OK + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: Invalid ID + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: This name already exists + /api/2/api_authorizations/{id}/scopes/{scope_id}: + delete: + operationId: deleteScope + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - in: path + name: id + required: true + schema: + type: integer + - in: path + name: scope_id + required: true + schema: + type: integer + responses: + "204": + description: NO CONTENT + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: Invalid ID + put: + operationId: updateScope + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - in: path + name: id + required: true + schema: + type: integer + - in: path + name: scope_id + required: true + schema: + type: integer + requestBody: + $ref: '#/components/requestBodies/scope' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/id' + description: OK + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: Invalid ID + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: This name already exists + /api/2/api_authorizations/{id}/clients: + get: + operationId: getClientApps + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - in: path + name: id + required: true + schema: + type: integer + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/getClientApps_200_response_inner' + type: array + description: OK + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: Invalid ID + post: + operationId: addClientApp + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - in: path + name: id + required: true + schema: + type: integer + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/addClientApp_request' + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/client_app' + description: CREATED + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: Invalid ID + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: An invalid scope id has been provided + /api/2/api_authorizations/{id}/clients/{client_app_id}: + delete: + operationId: removeClientApp + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - in: path + name: id + required: true + schema: + type: integer + - in: path + name: client_app_id + required: true + schema: + type: integer + responses: + "200": + description: NO CONTENT + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: Indicates that the syntax of the request is good but a value + supplied is not valid. + put: + operationId: updateClientApp + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - in: path + name: id + required: true + schema: + type: integer + - in: path + name: client_app_id + required: true + schema: + type: integer + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/updateClientApp_request' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/client_app' + description: OK + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: Invalid ID + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: An invalid scope id has been provided + /api/2/apps: + get: + operationId: listApps + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - description: "The total number of items returned per page. The maximum limit\ + \ varies between endpoints, see the relevant endpoint documentation for\ + \ the specific limit." + in: query + name: limit + schema: + type: integer + - description: The page number of results to return. + in: query + name: page + schema: + type: integer + - description: Set to the value extracted from Before-Cursor or After-Cursor + headers to return the previous or next page. + in: query + name: cursor + schema: + type: string + - description: The name or partial name of the app to search for. When using + a partial name you must append a wildcard `*` + in: query + name: name + schema: + $ref: '#/components/schemas/name' + - description: Returns all apps based off a specific connector. See List Connectors + for a complete list of Connector IDs. + in: query + name: connector_id + schema: + $ref: '#/components/schemas/connector_id' + - description: Returns all apps based of a given type. + in: query + name: auth_method + schema: + $ref: '#/components/schemas/auth_method' + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/schema' + type: array + description: OK + headers: + Current-Page: + $ref: '#/components/headers/Current-Page' + Page-Items: + $ref: '#/components/headers/Page-Items' + Total-Count: + $ref: '#/components/headers/Total-Count' + Total-Pages: + $ref: '#/components/headers/Total-Pages' + Link: + $ref: '#/components/headers/Link' + Before-Cursor: + $ref: '#/components/headers/Before-Cursor' + After-Cursor: + $ref: '#/components/headers/After-Cursor' + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: Indicates that the syntax of the request is good but a value + supplied is not valid. + post: + operationId: createApp + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + requestBody: + $ref: '#/components/requestBodies/app' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/schema' + description: CREATED + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: Indicates that the syntax of the request is good but a value + supplied is not valid. + /api/2/apps/{app_id}: + delete: + operationId: deleteApp + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - in: path + name: app_id + required: true + schema: + $ref: '#/components/schemas/id_1' + responses: + "204": + description: NO CONTENT + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: Invalid ID + get: + operationId: getApp + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - in: path + name: app_id + required: true + schema: + $ref: '#/components/schemas/id_1' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/schema' + description: OK + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: Invalid ID + put: + operationId: updateApp + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - in: path + name: app_id + required: true + schema: + $ref: '#/components/schemas/id_1' + requestBody: + $ref: '#/components/requestBodies/app' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/schema' + description: OK + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: Indicates that the syntax of the request is good but a value + supplied is not valid. + /api/2/apps/{app_id}/parameters/{parameter_id}: + delete: + operationId: deleteAppParameter + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - in: path + name: app_id + required: true + schema: + $ref: '#/components/schemas/id_1' + - in: path + name: parameter_id + required: true + schema: + type: integer + responses: + "204": + description: NO CONTENT + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: You attempted to delete a connector level parameter. + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: Invalid ID + /api/2/apps/{app_id}/users: + get: + operationId: listAppUsers + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - in: path + name: app_id + required: true + schema: + $ref: '#/components/schemas/id_1' + - description: "The total number of items returned per page. The maximum limit\ + \ varies between endpoints, see the relevant endpoint documentation for\ + \ the specific limit." + in: query + name: limit + schema: + type: integer + - description: The page number of results to return. + in: query + name: page + schema: + type: integer + - description: Set to the value extracted from Before-Cursor or After-Cursor + headers to return the previous or next page. + in: query + name: cursor + schema: + type: string + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/listAppUsers_200_response_inner' + type: array + description: OK + headers: + Current-Page: + $ref: '#/components/headers/Current-Page' + Page-Items: + $ref: '#/components/headers/Page-Items' + Total-Count: + $ref: '#/components/headers/Total-Count' + Total-Pages: + $ref: '#/components/headers/Total-Pages' + Link: + $ref: '#/components/headers/Link' + Before-Cursor: + $ref: '#/components/headers/Before-Cursor' + After-Cursor: + $ref: '#/components/headers/After-Cursor' + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + /api/2/apps/{app_id}/rules: + get: + operationId: listRules + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - in: path + name: app_id + required: true + schema: + $ref: '#/components/schemas/id_1' + - description: Defaults to true. When set to `false` will return all disabled + rules. + in: query + name: enabled + schema: + type: boolean + - description: Filters Rules based on their Conditions. + in: query + name: has_condition + schema: + type: string + - description: Filters Rules based on their condition types. + in: query + name: has_condition_type + schema: + type: string + - description: Filters Rules based on their Actions. + in: query + name: has_action + schema: + type: string + - description: Filters Rules based on their action types. + in: query + name: has_action_type + schema: + type: string + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/rule' + type: array + description: OK + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + post: + operationId: createRule + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - in: path + name: app_id + required: true + schema: + $ref: '#/components/schemas/id_1' + requestBody: + $ref: '#/components/requestBodies/rule' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/rule_id' + description: CREATED + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/error_status' + description: UNPROCESSABLE ENTRY + /api/2/apps/{app_id}/rules/{rule_id}: + delete: + operationId: deleteRule + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - in: path + name: app_id + required: true + schema: + $ref: '#/components/schemas/id_1' + - description: The id of the app rule to locate. + in: path + name: rule_id + required: true + schema: + $ref: '#/components/schemas/id_2' + responses: + "204": + description: NO CONTENT + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: Invalid ID + get: + operationId: getRule + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - in: path + name: app_id + required: true + schema: + $ref: '#/components/schemas/id_1' + - description: The id of the app rule to locate. + in: path + name: rule_id + required: true + schema: + $ref: '#/components/schemas/id_2' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/rule' + description: OK + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: Invalid ID + put: + operationId: updateRule + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - in: path + name: app_id + required: true + schema: + $ref: '#/components/schemas/id_1' + - description: The id of the app rule to locate. + in: path + name: rule_id + required: true + schema: + $ref: '#/components/schemas/id_2' + requestBody: + $ref: '#/components/requestBodies/rule' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/rule_id' + description: OK + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/error_status' + description: ID should not be included in the payload body. + /api/2/apps/{app_id}/rules/conditions: + get: + operationId: listConditions + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - in: path + name: app_id + required: true + schema: + $ref: '#/components/schemas/id_1' + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/listConditions_200_response_inner' + type: array + description: OK + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + /api/2/apps/{app_id}/rules/conditions/{condition_value}/operators: + get: + operationId: listConditionOperators + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - in: path + name: app_id + required: true + schema: + $ref: '#/components/schemas/id_1' + - description: The value for the selected condition. + in: path + name: condition_value + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/listConditionOperators_200_response_inner' + type: array + description: OK + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + /api/2/apps/{app_id}/rules/conditions/{condition_value}/values: + get: + operationId: listConditionValues + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - in: path + name: app_id + required: true + schema: + $ref: '#/components/schemas/id_1' + - description: The value for the selected condition. + in: path + name: condition_value + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/listConditionValues_200_response_inner' + type: array + description: OK + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + /api/2/apps/{app_id}/rules/actions: + get: + operationId: listActions + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - in: path + name: app_id + required: true + schema: + $ref: '#/components/schemas/id_1' + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/listActions_200_response_inner' + type: array + description: OK + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + /api/2/apps/{app_id}/rules/actions/{actuion_value}/values: + get: + operationId: listActionValues + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - in: path + name: app_id + required: true + schema: + $ref: '#/components/schemas/id_1' + - description: The value for the selected action. + in: path + name: action_value + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/listConditionValues_200_response_inner' + type: array + description: OK + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + /api/2/apps/{app_id}/rules/sort: + put: + operationId: bulkSort + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - in: path + name: app_id + required: true + schema: + $ref: '#/components/schemas/id_1' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/rule_id_list' + description: The request body must contain an array of App Rule IDs in the + desired order. + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/rule_id_list' + description: On success a complete list of ordered rules is returned. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/error_status' + description: Indicates that not all rule IDs were included in the request. + /api/2/connectors: + get: + operationId: listConnectors + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - description: "The total number of items returned per page. The maximum limit\ + \ varies between endpoints, see the relevant endpoint documentation for\ + \ the specific limit." + in: query + name: limit + schema: + type: integer + - description: The page number of results to return. + in: query + name: page + schema: + type: integer + - description: Set to the value extracted from Before-Cursor or After-Cursor + headers to return the previous or next page. + in: query + name: cursor + schema: + type: string + - description: The name or partial name of the connector to search for. When + using a partial name you must append a wildcard `*` + in: query + name: name + schema: + $ref: '#/components/schemas/name_1' + - description: Returns all connectors of a given type. + in: query + name: auth_method + schema: + $ref: '#/components/schemas/auth_method' + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/connector' + type: array + description: OK + headers: + Current-Page: + $ref: '#/components/headers/Current-Page' + Page-Items: + $ref: '#/components/headers/Page-Items' + Total-Count: + $ref: '#/components/headers/Total-Count' + Total-Pages: + $ref: '#/components/headers/Total-Pages' + Link: + $ref: '#/components/headers/Link' + Before-Cursor: + $ref: '#/components/headers/Before-Cursor' + After-Cursor: + $ref: '#/components/headers/After-Cursor' + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: Indicates that the syntax of the request is good but a value + supplied is not valid. + /api/2/mfa/users/{user_id}/factors: + get: + operationId: getAvailableFactors + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - description: Set to the id of the user. + in: path + name: user_id + required: true + schema: + type: integer + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/getAvailableFactors_200_response_inner' + type: array + description: OK + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + /api/2/mfa/users/{user_id}/registrations: + post: + operationId: enrollFactor + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - description: Set to the id of the user. + in: path + name: user_id + required: true + schema: + type: integer + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/enrollFactor_request' + required: true + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/factor' + type: array + description: OK + "201": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/factor' + type: array + description: CREATED + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + /api/2/mfa/users/{user_id}/registrations/{registration_id}: + get: + operationId: verifyEnrollmentVoiceProtect + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - description: Set to the id of the user. + in: path + name: user_id + required: true + schema: + type: integer + - description: Set to the uuid of the registration. This was included in the + response as part of the initial request in Enroll Factor. + in: path + name: registration_id + required: true + schema: + type: integer + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/registration' + type: array + description: OK + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + put: + operationId: verifyEnrollment + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - description: Set to the id of the user. + in: path + name: user_id + required: true + schema: + type: integer + - description: Set to the uuid of the registration. This was included in the + response as part of the initial request in Enroll Factor. + in: path + name: registration_id + required: true + schema: + type: integer + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/verifyEnrollment_request' + required: true + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/registration' + type: array + description: OK + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + /api/2/mfa/users/{user_id}/devices: + get: + operationId: getEnrolledFactors + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - description: Set to the id of the user. + in: path + name: user_id + required: true + schema: + type: integer + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/device' + type: array + description: OK + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + /api/2/mfa/users/{user_id}/devices/{device_id}: + delete: + operationId: deleteFactor + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - description: Set to the id of the user. + in: path + name: user_id + required: true + schema: + type: integer + - description: Set to the device_id of the MFA device. + in: path + name: device_id + required: true + schema: + type: integer + responses: + "204": + description: NO CONTENT + /api/2/mfa/users/{user_id}/verifications: + post: + operationId: activateFactor + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - description: Set to the id of the user. + in: path + name: user_id + required: true + schema: + type: integer + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/activateFactor_request' + required: true + responses: + "201": + content: + application/json: {} + description: CREATED + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + /api/2/mfa/users/{user_id}/verifications/{verification_id}: + get: + operationId: verifyFactorVoice + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - description: Set to the id of the user. + in: path + name: user_id + required: true + schema: + type: integer + - description: The verification_id is returned on activation of the factor or + you can get the device_id using the Activate Factor API call. + in: path + name: verification_id + required: true + schema: + type: integer + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/verifyFactorVoice_200_response_inner' + type: array + description: OK + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_2' + description: NOT FOUND + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: Invalid ID + put: + operationId: verifyFactor + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - description: Set to the id of the user. + in: path + name: user_id + required: true + schema: + type: integer + - description: The verification_id is returned on activation of the factor or + you can get the device_id using the Activate Factor API call. + in: path + name: verification_id + required: true + schema: + type: integer + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/verifyFactor_request' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/status_2' + description: OK + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: FORBIDDEN + /api/2/mfs/users/{user_id}/mfa_token: + post: + operationId: generateMfaToken + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/generateMfaToken_request' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/generateMfaToken_200_response' + description: OK + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/generateMfaToken_422_response' + description: The structure of the request payload is correct but it contains + an invalid value. + /api/2/roles: + get: + operationId: listRoles + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - description: "The total number of items returned per page. The maximum limit\ + \ varies between endpoints, see the relevant endpoint documentation for\ + \ the specific limit." + in: query + name: limit + schema: + type: integer + - description: The page number of results to return. + in: query + name: page + schema: + type: integer + - description: Set to the value extracted from Before-Cursor or After-Cursor + headers to return the previous or next page. + in: query + name: cursor + schema: + type: string + - description: Optional. Filters by role name. + in: query + name: name + schema: + $ref: '#/components/schemas/name_2' + - description: Optional. Returns roles that contain this app name. + in: query + name: app_id + schema: + $ref: '#/components/schemas/name' + - description: Optional. Comma delimited list of fields to return. + in: query + name: fields + schema: + enum: + - apps + - users + - admins + type: string + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/role' + type: array + description: OK + headers: + Current-Page: + $ref: '#/components/headers/Current-Page' + Page-Items: + $ref: '#/components/headers/Page-Items' + Total-Count: + $ref: '#/components/headers/Total-Count' + Total-Pages: + $ref: '#/components/headers/Total-Pages' + Link: + $ref: '#/components/headers/Link' + Before-Cursor: + $ref: '#/components/headers/Before-Cursor' + After-Cursor: + $ref: '#/components/headers/After-Cursor' + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + post: + operationId: createRoles + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + responses: + "201": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/createRoles_201_response_inner' + type: array + description: CREATED + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + /api/2/roles/{role_id}: + delete: + operationId: deleteRole + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - description: Set to the id of the role you want to return. + in: path + name: role_id + required: true + schema: + $ref: '#/components/schemas/role_id' + responses: + "204": + description: NO CONTENT + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: Invalid ID + get: + operationId: getRole + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - description: Set to the id of the role you want to return. + in: path + name: role_id + required: true + schema: + $ref: '#/components/schemas/role_id' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/role' + description: OK + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: Invalid ID + put: + operationId: updateRole + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - description: Set to the id of the role you want to return. + in: path + name: role_id + required: true + schema: + $ref: '#/components/schemas/role_id' + requestBody: + $ref: '#/components/requestBodies/role' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/updateRole_200_response' + description: OK + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: Indicates that the syntax of the request is good but a value + supplied is not valid. + /api/2/roles/{role_id}/apps: + get: + operationId: getRoleApps + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - description: Set to the id of the role you want to return. + in: path + name: role_id + required: true + schema: + $ref: '#/components/schemas/role_id' + - description: "The total number of items returned per page. The maximum limit\ + \ varies between endpoints, see the relevant endpoint documentation for\ + \ the specific limit." + in: query + name: limit + schema: + type: integer + - description: The page number of results to return. + in: query + name: page + schema: + type: integer + - description: Set to the value extracted from Before-Cursor or After-Cursor + headers to return the previous or next page. + in: query + name: cursor + schema: + type: string + - description: Optional. Defaults to true. Returns all apps not yet assigned + to the role. + in: query + name: assigned + schema: + type: boolean + responses: + "200": + content: + applcation/json: + schema: + items: + $ref: '#/components/schemas/schema' + type: array + description: OK + headers: + Current-Page: + $ref: '#/components/headers/Current-Page' + Page-Items: + $ref: '#/components/headers/Page-Items' + Total-Count: + $ref: '#/components/headers/Total-Count' + Total-Pages: + $ref: '#/components/headers/Total-Pages' + Link: + $ref: '#/components/headers/Link' + Before-Cursor: + $ref: '#/components/headers/Before-Cursor' + After-Cursor: + $ref: '#/components/headers/After-Cursor' + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: Invalid ID + put: + operationId: setRoleApps + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - description: Set to the id of the role you want to return. + in: path + name: role_id + required: true + schema: + $ref: '#/components/schemas/role_id' + requestBody: + content: + application/json: + schema: + description: The complete list of app_id values to assign to the role. + Don't submit a partial list of app IDs. + items: + $ref: '#/components/schemas/id_1' + type: array + required: true + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/setRoleApps_200_response_inner' + type: array + description: The response returns an array of app IDs sent in the request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: Invalid ID + /api/2/roles/{role_id}/users: + delete: + operationId: removeRoleUsers + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - description: Set to the id of the role you want to return. + in: path + name: role_id + required: true + schema: + $ref: '#/components/schemas/role_id' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/removeRoleUsers_request' + required: true + responses: + "204": + description: NO CONTENT + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: Invalid ID + get: + operationId: getRoleUsers + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - description: Set to the id of the role you want to return. + in: path + name: role_id + required: true + schema: + $ref: '#/components/schemas/role_id' + - description: "The total number of items returned per page. The maximum limit\ + \ varies between endpoints, see the relevant endpoint documentation for\ + \ the specific limit." + in: query + name: limit + schema: + type: integer + - description: The page number of results to return. + in: query + name: page + schema: + type: integer + - description: Set to the value extracted from Before-Cursor or After-Cursor + headers to return the previous or next page. + in: query + name: cursor + schema: + type: string + - description: "Allows you to filter on first name, last name, username, and\ + \ email address." + in: query + name: name + schema: + type: string + - description: Optional. Defaults to false. Include users that aren’t assigned + to the role. + in: query + name: include_unassigned + schema: + type: boolean + responses: + "200": + content: + applcation/json: + schema: + items: + $ref: '#/components/schemas/schema_1' + type: array + description: OK + headers: + Current-Page: + $ref: '#/components/headers/Current-Page' + Page-Items: + $ref: '#/components/headers/Page-Items' + Total-Count: + $ref: '#/components/headers/Total-Count' + Total-Pages: + $ref: '#/components/headers/Total-Pages' + Link: + $ref: '#/components/headers/Link' + Before-Cursor: + $ref: '#/components/headers/Before-Cursor' + After-Cursor: + $ref: '#/components/headers/After-Cursor' + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: Invalid ID + post: + operationId: addRoleUsers + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - description: Set to the id of the role you want to return. + in: path + name: role_id + required: true + schema: + $ref: '#/components/schemas/role_id' + requestBody: + content: + application/json: + schema: + description: "Set user_id values in array," + items: + $ref: '#/components/schemas/id_2' + type: array + required: true + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/addRoleUsers_200_response_inner' + type: array + description: OK + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: Indicates that the syntax of the request is good but a value + supplied is not valid. + /api/2/roles/{role_id}/admins: + delete: + operationId: removeRoleAdmins + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - description: Set to the id of the role you want to return. + in: path + name: role_id + required: true + schema: + $ref: '#/components/schemas/role_id' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/removeRoleUsers_request' + required: true + responses: + "204": + description: NO CONTENT + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: Invalid ID + get: + operationId: getRoleAdmins + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - description: Set to the id of the role you want to return. + in: path + name: role_id + required: true + schema: + $ref: '#/components/schemas/role_id' + - description: "The total number of items returned per page. The maximum limit\ + \ varies between endpoints, see the relevant endpoint documentation for\ + \ the specific limit." + in: query + name: limit + schema: + type: integer + - description: The page number of results to return. + in: query + name: page + schema: + type: integer + - description: Set to the value extracted from Before-Cursor or After-Cursor + headers to return the previous or next page. + in: query + name: cursor + schema: + type: string + - description: "Allows you to filter on first name, last name, username, and\ + \ email address." + in: query + name: name + schema: + type: string + - description: Optional. Defaults to false. Include users that aren’t assigned + to the role. + in: query + name: include_unassigned + schema: + type: boolean + responses: + "200": + content: + applcation/json: + schema: + items: + $ref: '#/components/schemas/schema_1' + type: array + description: OK + headers: + Current-Page: + $ref: '#/components/headers/Current-Page' + Page-Items: + $ref: '#/components/headers/Page-Items' + Total-Count: + $ref: '#/components/headers/Total-Count' + Total-Pages: + $ref: '#/components/headers/Total-Pages' + Link: + $ref: '#/components/headers/Link' + Before-Cursor: + $ref: '#/components/headers/Before-Cursor' + After-Cursor: + $ref: '#/components/headers/After-Cursor' + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: Invalid ID + post: + operationId: addRoleAdmins + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - description: Set to the id of the role you want to return. + in: path + name: role_id + required: true + schema: + $ref: '#/components/schemas/role_id' + requestBody: + content: + application/json: + schema: + description: "Set user_id values in array," + items: + $ref: '#/components/schemas/id_2' + type: array + required: true + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/addRoleUsers_200_response_inner' + type: array + description: OK + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + /api/2/saml_assertion: + post: + operationId: generateSamlAssertion + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/generateSamlAssertion_request' + required: true + responses: + "200": + content: + application/json: {} + description: OK + /api/2/saml_assertion/verify_factor: + post: + operationId: verifyFactorSaml + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/verifyFactorSaml_request' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/verifyFactorSaml_200_response' + description: OK + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: BAD REQUEST + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: UNAUTHORIZED + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: Invalid ID + /api/2/hooks: + get: + operationId: listHooks + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - description: "The total number of items returned per page. The maximum limit\ + \ varies between endpoints, see the relevant endpoint documentation for\ + \ the specific limit." + in: query + name: limit + schema: + type: integer + - description: The page number of results to return. + in: query + name: page + schema: + type: integer + - description: Set to the value extracted from Before-Cursor or After-Cursor + headers to return the previous or next page. + in: query + name: cursor + schema: + type: string + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/hook' + type: array + description: OK + headers: + Current-Page: + $ref: '#/components/headers/Current-Page' + Page-Items: + $ref: '#/components/headers/Page-Items' + Total-Count: + $ref: '#/components/headers/Total-Count' + Total-Pages: + $ref: '#/components/headers/Total-Pages' + Link: + $ref: '#/components/headers/Link' + Before-Cursor: + $ref: '#/components/headers/Before-Cursor' + After-Cursor: + $ref: '#/components/headers/After-Cursor' + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + post: + operationId: createHook + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + requestBody: + $ref: '#/components/requestBodies/hook' + /api/2/hooks/{hook_id}: + delete: + operationId: deleteHook + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - description: Set to the id of the Hook that you want to return. + in: path + name: hook_id + required: true + schema: + $ref: '#/components/schemas/id_3' + responses: + "202": + description: Success. The hook function has been queued for deletion. This + typically happens within seconds of making the request. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: Invalid ID + get: + operationId: getHook + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - description: Set to the id of the Hook that you want to return. + in: path + name: hook_id + required: true + schema: + $ref: '#/components/schemas/id_3' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/hook' + description: OK + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: Invalid ID + put: + operationId: updateHook + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - description: Set to the id of the Hook that you want to return. + in: path + name: hook_id + required: true + schema: + $ref: '#/components/schemas/id_3' + requestBody: + $ref: '#/components/requestBodies/hook' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/hook' + description: OK + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/hook_status' + description: You function is not base64 encoded. + /api/2/hooks/{hook_id}/logs: + get: + operationId: getLogs + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - description: Set to the id of the Hook that you want to return. + in: path + name: hook_id + required: true + schema: + $ref: '#/components/schemas/id_3' + - description: "The total number of items returned per page. The maximum limit\ + \ varies between endpoints, see the relevant endpoint documentation for\ + \ the specific limit." + in: query + name: limit + schema: + type: integer + - description: The page number of results to return. + in: query + name: page + schema: + type: integer + - description: Set to the value extracted from Before-Cursor or After-Cursor + headers to return the previous or next page. + in: query + name: cursor + schema: + type: string + - description: Returns logs that contain this request_id. + in: query + name: request_id + schema: + type: string + - description: Returns logs that contain this correlation_id. + in: query + name: correlation_id + schema: + type: string + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/log' + type: array + description: OK + headers: + Current-Page: + $ref: '#/components/headers/Current-Page' + Page-Items: + $ref: '#/components/headers/Page-Items' + Total-Count: + $ref: '#/components/headers/Total-Count' + Total-Pages: + $ref: '#/components/headers/Total-Pages' + Link: + $ref: '#/components/headers/Link' + Before-Cursor: + $ref: '#/components/headers/Before-Cursor' + After-Cursor: + $ref: '#/components/headers/After-Cursor' + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: Invalid ID + /api/2/hooks/envs: + get: + operationId: listEnvironmentVariables + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - description: "The total number of items returned per page. The maximum limit\ + \ varies between endpoints, see the relevant endpoint documentation for\ + \ the specific limit." + in: query + name: limit + schema: + type: integer + - description: The page number of results to return. + in: query + name: page + schema: + type: integer + - description: Set to the value extracted from Before-Cursor or After-Cursor + headers to return the previous or next page. + in: query + name: cursor + schema: + type: string + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/envvar' + type: array + description: OK + headers: + Current-Page: + $ref: '#/components/headers/Current-Page' + Page-Items: + $ref: '#/components/headers/Page-Items' + Total-Count: + $ref: '#/components/headers/Total-Count' + Total-Pages: + $ref: '#/components/headers/Total-Pages' + Link: + $ref: '#/components/headers/Link' + Before-Cursor: + $ref: '#/components/headers/Before-Cursor' + After-Cursor: + $ref: '#/components/headers/After-Cursor' + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + post: + operationId: createEnvironmentVariable + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/createEnvironmentVariable_request' + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/envvar' + description: CREATED + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: Indicates that the syntax of the request is good but a value + supplied is not valid. + /api/2/hooks/envs/{envvar_id}: + delete: + operationId: deleteEnvironmentVariable + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - description: Set to the id of the Hook Environment Variable that you want + to fetch. + in: path + name: envvar_id + required: true + schema: + $ref: '#/components/schemas/id_4' + responses: + "204": + description: Success. The environment variable has been deleted. No content + is returned. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: Invalid ID + get: + operationId: getEnvironmentVariable + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - description: Set to the id of the Hook Environment Variable that you want + to fetch. + in: path + name: envvar_id + required: true + schema: + $ref: '#/components/schemas/id_4' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/envvar' + description: OK + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + put: + operationId: updateEnvironmentVariable + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - description: Set to the id of the Hook Environment Variable that you want + to fetch. + in: path + name: envvar_id + required: true + schema: + $ref: '#/components/schemas/id_4' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/updateEnvironmentVariable_request' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/envvar' + description: OK + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: BAD REQUEST + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/hook_status' + description: The name of a var can not be changed + /api/2/users: + get: + operationId: listUsers + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - description: "The total number of items returned per page. The maximum limit\ + \ varies between endpoints, see the relevant endpoint documentation for\ + \ the specific limit." + in: query + name: limit + schema: + type: integer + - description: The page number of results to return. + in: query + name: page + schema: + type: integer + - description: Set to the value extracted from Before-Cursor or After-Cursor + headers to return the previous or next page. + in: query + name: cursor + schema: + type: string + - description: An ISO8601 timestamp value that returns all users created after + a given date & time. + in: query + name: created_since + schema: + type: string + - description: An ISO8601 timestamp value that returns all users created before + a given date & time. + in: query + name: created_until + schema: + type: string + - description: An ISO8601 timestamp value that returns all users updated after + a given date & time. + in: query + name: updated_since + schema: + type: string + - description: An ISO8601 timestamp value that returns all users updated before + a given date & time. + in: query + name: updated_until + schema: + type: string + - description: An ISO8601 timestamp value that returns all users that logged + in after a given date & time. + in: query + name: last_login_since + schema: + type: string + - in: query + name: last_login_until + schema: + type: string + - description: The first name of the user + in: query + name: firstname + schema: + type: string + - description: The last name of the user + in: query + name: lastname + schema: + type: string + - description: The email address of the user + in: query + name: email + schema: + type: string + - description: The username for the user + in: query + name: username + schema: + type: string + - description: The AD login name for the user + in: query + name: samaccountname + schema: + type: string + - description: The ID in OneLogin of the Directory that the user belongs to + in: query + name: directory_id + schema: + type: string + - description: An external identifier that has been set on the user + in: query + name: external_id + schema: + type: string + - description: The ID of a OneLogin Application + in: query + name: app_id + schema: + type: string + - description: A comma separated list of OneLogin User IDs + in: query + name: user_ids + schema: + type: string + - description: The short name of a custom attribute. Note that the attribute + name is prefixed with custom_attributes. + in: query + name: "custom_attributes.{attribute_name}" + schema: + type: string + - description: A comma separated list user attributes to return. + in: query + name: fields + schema: + type: string + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/user' + type: array + description: OK + headers: + Current-Page: + $ref: '#/components/headers/Current-Page' + Page-Items: + $ref: '#/components/headers/Page-Items' + Total-Count: + $ref: '#/components/headers/Total-Count' + Total-Pages: + $ref: '#/components/headers/Total-Pages' + Link: + $ref: '#/components/headers/Link' + Before-Cursor: + $ref: '#/components/headers/Before-Cursor' + After-Cursor: + $ref: '#/components/headers/After-Cursor' + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: An invalid search parameter was used. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: You cant sort on this field. + post: + operationId: createUser + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - description: Controls how mappings will be applied to the user on creation. + Defaults to async. + in: query + name: mappings + schema: + enum: + - async + - sync + - disabled + type: string + - description: Will passwords validate against the User Policy? Defaults to + true. + in: query + name: validate_policy + schema: + type: boolean + requestBody: + $ref: '#/components/requestBodies/user' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/user' + description: The full user resource is returned + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: BAD REQUEST + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: Indicates that the syntax of the request is good but a value + supplied is not valid. + /api/2/users/{user_id}: + delete: + operationId: deleteUser + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - description: Set to the id of the user that you want to return. + in: path + name: user_id + required: true + schema: + $ref: '#/components/schemas/id_2' + responses: + "204": + description: "On success, no content is returned in the response body." + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: Invalid ID + get: + operationId: getUser + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - description: Set to the id of the user that you want to return. + in: path + name: user_id + required: true + schema: + $ref: '#/components/schemas/id_2' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/user' + description: OK + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: Invalid ID + put: + operationId: updateUser + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - description: Set to the id of the user that you want to return. + in: path + name: user_id + required: true + schema: + $ref: '#/components/schemas/id_2' + - description: Controls how mappings will be applied to the user on creation. + Defaults to async. + in: query + name: mappings + schema: + enum: + - async + - sync + - disabled + type: string + - description: Will passwords validate against the User Policy? Defaults to + true. + in: query + name: validate_policy + schema: + type: boolean + requestBody: + $ref: '#/components/requestBodies/user' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/user' + description: The full user resource is returned + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: BAD REQUEST + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: Invalid ID + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: Indicates that the syntax of the request is good but a value + supplied is not valid. + /api/2/users/{user_id}/apps: + get: + operationId: getUserApps + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - description: Set to the id of the user that you want to return. + in: path + name: user_id + required: true + schema: + $ref: '#/components/schemas/id_2' + - description: Defaults to `false`. When `true` will show all apps that are + assigned to a user regardless of their portal visibility setting. + in: query + name: ignore_visibility + schema: + type: boolean + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/getUserApps_200_response_inner' + type: array + description: OK + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: Invalid ID + /api/2/mappings: + get: + operationId: listMappings + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - description: Defaults to true. When set to `false` will return all disabled + mappings. + in: query + name: enabled + schema: + default: true + type: boolean + - description: Filters Mappings based on their Conditions. + example: "has_condition=has_role:123456,status:1" + in: query + name: has_condition + schema: + type: string + - description: Filters Mappings based on their condition types. + in: query + name: has_condition_type + schema: + enum: + - builtin + - custom + - none + type: string + - description: Filters Mappings based on their Actions. + example: "has_action=set_groups:123456,set_usertype:*" + in: query + name: has_action + schema: + type: string + - description: Filters Mappings based on their action types. + in: query + name: has_action_type + schema: + enum: + - builtin + - custom + - none + type: string + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/mapping' + type: array + description: OK + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + post: + operationId: createMapping + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + requestBody: + $ref: '#/components/requestBodies/mapping' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/id_2' + description: CREATED + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/error_status' + description: UNPROCESSABLE_ENTRY + /api/2/mappings/{mapping_id}: + delete: + operationId: deleteMapping + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - description: The id of the user mapping to locate. + in: path + name: mapping_id + required: true + schema: + type: integer + responses: + "204": + description: NO CONTENT + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: Invalid ID + get: + operationId: getMapping + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - description: The id of the user mapping to locate. + in: path + name: mapping_id + required: true + schema: + type: integer + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/mapping' + description: OK + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: Invalid ID + put: + operationId: updateMapping + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - description: The id of the user mapping to locate. + in: path + name: mapping_id + required: true + schema: + type: integer + requestBody: + $ref: '#/components/requestBodies/mapping' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/id_2' + description: OK + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/error_status' + description: UNPROCESSABLE_ENTRY + /api/2/mappings/{mapping_id}/dryrun: + post: + operationId: dryRunMapping + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - description: The id of the user mapping to locate. + in: path + name: mapping_id + required: true + schema: + type: integer + requestBody: + content: + application/json: + schema: + items: + type: integer + type: array + description: Request body is a list of user IDs tested against the mapping + conditions to verify that the mapping would be applied + required: true + responses: + "200": + content: + application/json: + schema: + items: + type: object + type: array + description: OK + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/error_status' + description: UNPROCESSABLE_ENTRY + /api/2/apps/mappings/conditions: + get: + operationId: listMappingConditions + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/listMappingConditions_200_response_inner' + type: array + description: OK + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + /api/2/apps/mappings/conditions/{condition_value}/operators: + get: + operationId: listMappingConditionOperators + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - description: The value for the selected condition. + in: path + name: condition_value + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/listMappingConditionOperators_200_response_inner' + type: array + description: OK + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + /api/2/apps/mappings/conditions/{condition_value}/values: + get: + operationId: listMappingConditionValues + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - description: The value for the selected condition. + in: path + name: condition_value + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/listConditionValues_200_response_inner' + type: array + description: OK + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + /api/2/apps/mappings/actions: + get: + operationId: listMappingActions + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/listActions_200_response_inner' + type: array + description: OK + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + /api/2/apps/mappings/actions/{actuion_value}/values: + get: + operationId: listMappingActionValues + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - description: The value for the selected action. + in: path + name: action_value + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/listConditionValues_200_response_inner' + type: array + description: OK + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + /api/2/apps/mappings/sort: + put: + operationId: bulkMappingSort + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/mapping_id_list' + description: The request body must contain an array of User Mapping IDs in + the desired order. + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/mapping_id_list' + description: On success a complete list of ordered mappings is returned. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is\ + \ invalid." + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/error_status' + description: Indicates that not all mapping IDs were included in the request. + /api/2/risk/events: + post: + operationId: trackEvent + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/trackEvent_request' + required: true + responses: + "200": + description: No content is returned. This API is fire and forget. + "400": + description: BAD REQUEST + "401": + description: Invalid API Key + /api/2/risk/verify: + post: + operationId: getRiskScore + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/getRiskScore_request' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/getRiskScore_200_response' + description: OK + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/getRiskScore_400_response' + description: BAD REQUEST + "401": + description: Invalid API Key + /api/2/risk/rules: + get: + operationId: listRiskRules + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + post: + operationId: createRiskRule + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + requestBody: + $ref: '#/components/requestBodies/risk_rule' + /api/2/risk/rules/{risk_rule_id}: + delete: + operationId: deleteRiskRule + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - in: path + name: risk_rule_id + required: true + schema: + $ref: '#/components/schemas/id_5' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/risk_rule' + description: OK + "401": + description: Invalid API Key + get: + operationId: getRiskRule + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - in: path + name: risk_rule_id + required: true + schema: + $ref: '#/components/schemas/id_5' + put: + operationId: updateRiskRule + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - in: path + name: risk_rule_id + required: true + schema: + $ref: '#/components/schemas/id_5' + requestBody: + $ref: '#/components/requestBodies/risk_rule' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/risk_rule' + description: OK + "400": + description: BAD REQUEST + "401": + description: UNAUTHORIZED + /api/2/risk/scores: + get: + operationId: getScoreInsights + parameters: + - in: header + name: Authorization + required: true + schema: + type: string + - description: Optional ISO8601 formatted date string. Defaults to current date. + Maximum date is 90 days ago. + in: query + name: before + schema: + type: string + - description: Optional ISO8601 formatted date string. Defaults to 30 days ago. + Maximum date is 90 days ago. + in: query + name: after + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/getScoreInsights_200_response' + description: OK + "401": + description: Invalid Access Token +components: + headers: + Current-Page: + description: The index number of the current page being returned. + schema: + type: integer + Page-Items: + description: The number of items returned in the response. + schema: + type: integer + Total-Count: + description: The total number of items across all pages. + schema: + type: integer + Total-Pages: + description: The total number of pages to return all results. + schema: + type: integer + Link: + description: "A set of urls which contains premade links for first, next" + schema: + items: + type: string + type: array + Before-Cursor: + description: A string that can be used to request the page of results that preceed + the current page using the same set of search filters and pagination options. + schema: + type: string + After-Cursor: + description: A string that can be used to request the page of results that follows + the current page using the same set of search filters and pagination options. + schema: + type: string + requestBodies: + auth_server: + content: + application/json: + schema: + $ref: '#/components/schemas/createAuthorizationServer_request' + required: true + claim: + content: + application/json: + schema: + $ref: '#/components/schemas/addAccessTokenClaim_request' + required: true + scope: + content: + application/json: + schema: + $ref: '#/components/schemas/addScope_request' + required: true + app: + content: + application/json: + schema: + $ref: '#/components/schemas/schema' + required: true + rule: + content: + application/json: + schema: + $ref: '#/components/schemas/rule' + required: true + role: + content: + application/json: + schema: + $ref: '#/components/schemas/role' + required: true + hook: + content: + application/json: + schema: + $ref: '#/components/schemas/hook' + required: true + user: + content: + application/json: + schema: + $ref: '#/components/schemas/user' + required: true + mapping: + content: + application/json: + schema: + $ref: '#/components/schemas/mapping' + required: true + risk_rule: + content: + application/json: + schema: + $ref: '#/components/schemas/risk_rule' + required: true + responses: + token_401: + content: + application/json: + schema: + $ref: '#/components/schemas/generateToken_400_response' + description: "Typically, this error means that your client_id and/or client_secret\ + \ values are invalid." + token_404: + content: + application/json: + schema: + $ref: '#/components/schemas/generateToken_400_response' + description: "Typically, this error means that you are using the incorrect method.\ + \ Ensure that you are making a POST." + "401_invalid_access_token": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: "Typically, this error means that your access token value is invalid." + status_200: + content: + application/json: + schema: + $ref: '#/components/schemas/id' + description: OK + "404_not_found": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: Invalid ID + status_422: + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: This name already exists + status_invalid_scope: + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: An invalid scope id has been provided + "422_invalid_value": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: Indicates that the syntax of the request is good but a value supplied + is not valid. + app: + content: + application/json: + schema: + $ref: '#/components/schemas/schema' + description: OK + "422_id_included": + content: + application/json: + schema: + $ref: '#/components/schemas/error_status' + description: ID should not be included in the payload body. + "403_forbidden": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: FORBIDDEN + "400_bad_request": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: BAD REQUEST + "401_unauthorized": + content: + application/json: + schema: + $ref: '#/components/schemas/status_1' + description: UNAUTHORIZED + "422_function_not_base64": + content: + application/json: + schema: + $ref: '#/components/schemas/hook_status' + description: You function is not base64 encoded. + "200_envvar": + content: + application/json: + schema: + $ref: '#/components/schemas/envvar' + description: OK + "422_unprocessable_entry": + content: + application/json: + schema: + $ref: '#/components/schemas/error_status' + description: UNPROCESSABLE_ENTRY + "200_risk_rule": + content: + application/json: + schema: + $ref: '#/components/schemas/risk_rule' + description: OK + schemas: + status: + example: + code: 0 + error: true + type: type + message: message + properties: + error: + type: boolean + code: + type: integer + type: + type: string + message: + type: string + type: object + id: + example: + id: id + properties: + id: + type: string + type: object + status_1: + properties: + message: + type: string + statusCode: + type: integer + name: + type: string + type: object + auth_server_configuration: + example: + access_token_expiration_minutes: 6 + resource_identifier: resource_identifier + audiences: + - audiences + - audiences + refresh_token_expiration_minutes: 0 + properties: + audiences: + items: + type: string + type: array + refresh_token_expiration_minutes: + type: integer + resource_identifier: + type: string + access_token_expiration_minutes: + type: integer + type: object + client_app: + example: + api_auth_id: 6 + app_id: 0 + properties: + app_id: + type: integer + api_auth_id: + type: integer + type: object + name: + description: App name. + type: string + connector_id: + description: ID of the apps underlying connector. + type: integer + auth_method: + description: An ID indicating the type of app. + enum: + - 0 + - 1 + - 2 + - 3 + - 4 + - 6 + - 7 + - 8 + type: integer + schema: + example: + icon_url: icon_url + notes: notes + visible: true + policy_id: 1 + configuration: "{}" + allow_assumed_signin: true + description: description + created_at: created_at + role_ids: + - 7 + - 7 + sso: "{}" + brand_id: 5 + auth_method: 5 + tab_id: 2 + enforcement_point: "{}" + updated_at: updated_at + connector_id: 6 + name: name + provisioning: + enabled: true + id: 0 + parameters: "{}" + properties: + id: + description: Apps unique ID in OneLogin. + type: integer + connector_id: + description: ID of the apps underlying connector. + type: integer + name: + description: App name. + type: string + description: + description: Freeform description of the app. + type: string + notes: + description: Freeform notes about the app. + type: string + policy_id: + description: The security policy assigned to the app. + type: integer + brand_id: + description: The custom login page branding to use for this app. Applies + to app initiated logins via OIDC or SAML. + type: integer + icon_url: + description: A link to the apps icon url. + type: string + visible: + description: Indicates if the app is visible in the OneLogin portal. + type: boolean + auth_method: + description: An ID indicating the type of app. + enum: + - 0 + - 1 + - 2 + - 3 + - 4 + - 6 + - 7 + - 8 + type: integer + tab_id: + description: ID of the OneLogin portal tab that the app is assigned to. + type: integer + created_at: + description: The date the app was created. + type: string + updated_at: + description: The date the app was last updated. + type: string + role_ids: + description: List of Role IDs that are assigned to the app. On App Create + or Update the entire array is replaced with the values provided. + items: + type: integer + type: array + allow_assumed_signin: + description: Indicates whether or not administrators can access the app + as a user that they have assumed control over. + type: boolean + provisioning: + $ref: '#/components/schemas/schema_provisioning' + sso: + type: object + configuration: + type: object + parameters: + type: object + enforcement_point: + type: object + type: object + id_1: + description: Apps unique ID in OneLogin. + type: integer + rule: + example: + name: name + match: all + id: 0 + position: 6 + conditions: + - source: source + value: value + operator: operator + - source: source + value: value + operator: operator + actions: + - macro: macro + expression: expression + scriplet: scriplet + action: action + value: + - value + - value + - macro: macro + expression: expression + scriplet: scriplet + action: action + value: + - value + - value + enabled: true + properties: + id: + type: integer + name: + description: The name of the rule. + type: string + match: + description: Indicates how conditions should be matched. + enum: + - all + - any + type: string + enabled: + description: Indicates if the rule is enabled or not. + type: boolean + position: + description: Indicates the order of the rule. When `null` this will default + to last position. + type: integer + conditions: + description: An array of conditions that the user must meet in order for + the rule to be applied. + items: + $ref: '#/components/schemas/condition' + type: array + actions: + description: An array of actions that will be applied to the users that + are matched by the conditions. + items: + $ref: '#/components/schemas/action' + type: array + type: object + rule_id: + example: + id: 0 + properties: + id: + type: integer + type: object + id_2: + type: integer + error_status: + properties: + code: + type: integer + message: + type: string + errors: + items: + $ref: '#/components/schemas/error_status_errors_inner' + type: array + type: object + rule_id_list: + items: + type: integer + type: array + connector: + example: + icon_url: icon_url + allows_new_parameters: true + auth_method: null + name: name + id: 0 + properties: + id: + description: The connectors unique ID in OneLogin. + type: integer + name: + description: The name of the connector. + type: string + auth_method: + $ref: '#/components/schemas/auth_method' + allows_new_parameters: + description: Indicates if apps created using this connector will be allowed + to create custom parameters. + type: boolean + icon_url: + description: A link to the apps icon url. + type: string + type: object + name_1: + description: The name of the connector. + type: string + factor: + items: + $ref: '#/components/schemas/factor_inner' + type: array + registration: + example: + device_id: device_id + id: id + status: pending + properties: + id: + description: Registration identifier. + type: string + status: + description: pending registration has not been completed successfully. accepted + registration has successfully completed. + enum: + - pending + - accepted + type: string + device_id: + description: Device id to be used with Verify the Factor. + type: string + type: object + device: + example: + type_display_name: type_display_name + default: true + device_id: device_id + auth_factor_name: auth_factor_name + user_display_name: user_display_name + properties: + device_id: + type: string + user_display_name: + type: string + type_display_name: + type: string + auth_factor_name: + type: string + default: + type: boolean + type: object + status_2: + example: + status: + code: 0 + type: type + message: message + error: true + properties: + status: + $ref: '#/components/schemas/status_2_status' + type: object + role: + example: + name: name + id: 0 + users: + - 6 + - 6 + admins: + - 1 + - 1 + apps: + - null + - null + properties: + id: + type: integer + name: + type: string + apps: + items: + $ref: '#/components/schemas/id_1' + type: array + users: + items: + type: integer + type: array + admins: + items: + type: integer + type: array + required: + - name + type: object + role_id: + type: integer + name_2: + type: string + schema_1: + example: + added_at: added_at + added_by: + name: name + id: 6 + name: name + assigned: true + id: 0 + username: username + properties: + id: + type: integer + name: + type: string + username: + type: string + added_by: + $ref: '#/components/schemas/schema_1_added_by' + added_at: + type: string + assigned: + description: Indicates if assigned to role or not. Defaults to true. + type: boolean + type: object + hook: + example: + runtime: runtime + created_at: created_at + type: type + packages: "{}" + timeout: 0 + env_vars: + - env_vars + - env_vars + retries: 2 + updated_at: updated_at + context_version: context_version + function: function + options: + risk_enabled: true + mfa_device_info_enabled: true + location_enabled: true + disabled: true + id: id + conditions: + - source: source + value: value + operator: operator + - source: source + value: value + operator: operator + status: ready + properties: + id: + description: The Hook unique ID in OneLogin. + type: string + type: + description: A string describing the type of hook. e.g. `pre-authentication` + type: string + disabled: + default: true + description: Boolean to enable or disable the hook. Disabled hooks will + not run. + type: boolean + timeout: + default: 1 + description: The number of seconds to allow the hook function to run before + before timing out. Maximum timeout varies based on the type of hook. + type: integer + env_vars: + description: Environment Variable objects that will be available via process.env.ENV_VAR_NAME + in the hook code. + items: + type: string + type: array + runtime: + description: The Smart Hooks supported Node.js version to execute this hook + with. + type: string + retries: + default: 0 + description: Number of retries if execution fails. + maximum: 4 + type: integer + packages: + description: An object containing NPM packages that are bundled with the + hook function. + type: object + function: + description: A base64 encoded string containing the javascript function + code. + type: string + context_version: + description: The semantic version of the content that will be injected into + this hook. + type: string + status: + description: String describing the state of the hook function. When a hook + is ready and disabled is false it will be executed. + enum: + - ready + - create-queued + - create-running + - create-failed + - update-queued + - update-running + - update-failed + type: string + options: + $ref: '#/components/schemas/hook_options' + conditions: + description: An array of objects that let you limit the execution of a hook + to users in specific roles. + items: + $ref: '#/components/schemas/hook_conditions_inner' + type: array + created_at: + description: ISO8601 format date that they hook function was created. + type: string + updated_at: + description: ISO8601 format date that they hook function was last updated. + type: string + required: + - disabled + - env_vars + - function + - packages + - retries + - runtime + - timeout + - type + type: object + id_3: + description: The Hook unique ID in OneLogin. + type: string + hook_status: + properties: + name: + type: string + message: + type: string + type: object + log: + example: + correlation_id: correlation_id + created_at: created_at + request_id: request_id + events: + - events + - events + properties: + request_id: + type: string + correlation_id: + type: string + created_at: + type: string + events: + items: + type: string + type: array + type: object + envvar: + example: + updated_at: updated_at + name: name + created_at: created_at + id: id + properties: + id: + description: A unique identifier for the Hook Environment Variable + type: string + name: + description: The name of the environment variable. + type: string + created_at: + description: The ISO8601 formatted date that the environment variable was + created. + type: string + updated_at: + description: The ISO8601 formatted date that the environment variable was + last updated. + type: string + type: object + id_4: + description: A unique identifier for the Hook Environment Variable + type: string + user: + example: + firstname: firstname + password_confirmation: password_confirmation + created_at: created_at + external_id: external_id + locked_until: locked_until + title: title + invitation_sent_at: invitation_sent_at + role_ids: + - null + - null + custom_attributes: "{}" + samaccount_name: samaccount_name + password: password + updated_at: updated_at + password_algorithm: password_algorithm + company: company + id: 0 + state: 1 + directory_id: 5 + department: department + member_of: member_of + email: email + manager_ad_id: manager_ad_id + password_changed_at: password_changed_at + salt: salt + last_login: last_login + invalid_login_attempts: 7 + preferred_locale_code: preferred_locale_code + manager_user_id: manager_user_id + lastname: lastname + activated_at: activated_at + userprincipalname: userprincipalname + group_id: 6 + phone: phone + distinguished_name: distinguished_name + trusted_idp_id: 2 + comment: comment + username: username + status: 5 + properties: + id: + type: integer + username: + description: A username for the user. + type: string + email: + description: A valid email for the user. + type: string + firstname: + description: The user's first name. + type: string + lastname: + description: The user's last name. + type: string + title: + description: The user's job title. + type: string + department: + description: The user's department. + type: string + company: + description: The user's company. + type: string + comment: + description: Free text related to the user. + type: string + group_id: + description: The ID of the Group in OneLogin that the user is assigned to. + type: integer + role_ids: + description: A list of OneLogin Role IDs of the user + items: + $ref: '#/components/schemas/role_id' + type: array + phone: + description: The E.164 format phone number for a user. + type: string + state: + enum: + - 0 + - 1 + - 2 + - 3 + type: integer + status: + enum: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 7 + - 8 + type: integer + directory_id: + description: The ID of the OneLogin Directory of the user. + type: integer + trusted_idp_id: + description: The ID of the OneLogin Trusted IDP of the user. + type: integer + manager_ad_id: + description: The ID of the user's manager in Active Directory. + type: string + manager_user_id: + description: The OneLogin User ID for the user's manager. + type: string + samaccount_name: + description: The user's Active Directory username. + type: string + member_of: + description: The user's directory membership. + type: string + userprincipalname: + description: The principle name of the user. + type: string + distinguished_name: + description: The distinguished name of the user. + type: string + external_id: + description: The ID of the user in an external directory. + type: string + activated_at: + type: string + last_login: + type: string + invitation_sent_at: + type: string + updated_at: + type: string + preferred_locale_code: + type: string + created_at: + type: string + custom_attributes: + type: object + invalid_login_attempts: + type: integer + locked_until: + type: string + password_changed_at: + type: string + password: + description: The password to set for a user. + type: string + password_confirmation: + description: Required if the password is being set. + type: string + password_algorithm: + description: Use this when importing a password that's already hashed. Prepend + the salt value to the cleartext password value before SHA-256-encoding + it + type: string + salt: + description: The salt value used with the password_algorithm. + type: string + type: object + mapping: + example: + name: name + match: all + id: 0 + position: 6 + conditions: + - source: source + value: value + operator: operator + - source: source + value: value + operator: operator + actions: + - macro: macro + expression: expression + scriplet: scriplet + action: action + value: + - value + - value + - macro: macro + expression: expression + scriplet: scriplet + action: action + value: + - value + - value + enabled: true + properties: + id: + type: integer + name: + description: The name of the mapping. + type: string + enabled: + description: Indicates if the mapping is enabled or not. + type: boolean + match: + description: Indicates how conditions should be matched. + enum: + - all + - any + type: string + position: + description: Indicates the order of the mapping. When `null` this will default + to last position. + type: integer + conditions: + description: An array of conditions that the user must meet in order for + the mapping to be applied. + items: + $ref: '#/components/schemas/condition' + type: array + actions: + description: An array of actions that will be applied to the users that + are matched by the conditions. + items: + $ref: '#/components/schemas/action' + type: array + required: + - actions + - contiditions + - enabled + - match + - name + - position + type: object + mapping_id_list: + items: + type: integer + type: array + ip: + description: The IP address of the User's request. + type: string + user_agent: + description: The user agent of the User's request. + type: string + risk_user: + description: An Object containing User details. + properties: + id: + description: A unique identifier for the user. + type: string + name: + description: A name for the user. + type: string + authenticated: + default: false + description: Indicates if the metadata supplied in this event should be + considered as trusted for the user. + type: boolean + required: + - id + type: object + source: + description: "Used for targeting custom rules based on a group of people, customers,\ + \ accounts, or even a single user." + example: + name: name + id: id + properties: + id: + type: string + name: + description: The name of the source + type: string + type: object + session: + description: "A dictionary of extra information that provides useful context\ + \ about the session, for example the session ID, or some cookie information." + properties: + id: + description: "If you use a database to track sessions, you can send us the\ + \ session ID." + type: string + type: object + risk_device: + description: Information about the device being used. + properties: + id: + description: This device's unique identifier + type: string + type: object + fp: + description: Set to the value of the __tdli_fp cookie. + type: string + risk_rule: + example: + name: name + description: description + id: id + filters: + - filters + - filters + source: + name: name + id: id + type: blacklist + target: location.ip + properties: + id: + type: string + name: + description: The name of this rule + type: string + description: + type: string + type: + description: The type parameter specifies the type of rule that will be + created. + enum: + - blacklist + - whitelist + type: string + target: + description: The target parameter that will be used when evaluating the + rule against an incoming event. + enum: + - location.ip + - location.address.country_iso_code + type: string + filters: + description: A list of IP addresses or country codes or names to evaluate + against each event. + items: + type: string + type: array + source: + $ref: '#/components/schemas/source' + type: object + id_5: + type: string + condition: + example: + source: source + value: value + operator: operator + properties: + source: + description: The source field to check. + type: string + operator: + description: A valid operator for the selected condition source + type: string + value: + description: A plain text string or valid value for the selected condition + source. + type: string + type: object + action: + example: + macro: macro + expression: expression + scriplet: scriplet + action: action + value: + - value + - value + properties: + action: + description: The action to apply + type: string + value: + description: Only applicable to provisioned and set_* actions. Items in + the array will be a plain text string or valid value for the selected + action. + items: + type: string + type: array + expression: + description: "A regular expression to extract a value. Applies to provisionable,\ + \ multi-selects, and string actions." + type: string + scriplet: + description: A hash containing scriptlet code that returns a value. + type: string + macro: + description: "A template to construct a value. Applies to default, string,\ + \ and list actions." + type: string + type: object + generateToken_request: + properties: + grant_type: + enum: + - client_credentials + type: string + type: object + generateToken_200_response: + example: + access_token: access_token + refresh_token: refresh_token + created_at: created_at + token_type: token_type + expires_in: 0 + accountt_id: 6 + properties: + access_token: + type: string + created_at: + type: string + expires_in: + type: integer + refresh_token: + type: string + token_type: + type: string + accountt_id: + type: integer + type: object + generateToken_400_response: + example: + status: + code: 0 + error: true + type: type + message: message + properties: + status: + $ref: '#/components/schemas/status' + type: object + revokeToken_request: + properties: + access_token: + type: string + type: object + getRateLimit_200_response_data: + example: + X-RateLimit-Remaining: 6 + X-RateLimit-Reset: 1 + X-RateLimit-Limit: 0 + properties: + X-RateLimit-Limit: + type: integer + X-RateLimit-Remaining: + type: integer + X-RateLimit-Reset: + type: integer + type: object + getRateLimit_200_response: + example: + data: + X-RateLimit-Remaining: 6 + X-RateLimit-Reset: 1 + X-RateLimit-Limit: 0 + status: + code: 0 + error: true + type: type + message: message + properties: + status: + $ref: '#/components/schemas/status' + data: + $ref: '#/components/schemas/getRateLimit_200_response_data' + type: object + listAuthorizationServers_200_response_inner_configuration: + example: + resource_identifier: resource_identifier + audiences: + - audiences + - audiences + properties: + resource_identifier: + type: string + audiences: + items: + type: string + type: array + type: object + listAuthorizationServers_200_response_inner: + example: + configuration: + resource_identifier: resource_identifier + audiences: + - audiences + - audiences + name: name + description: description + id: 0 + properties: + id: + type: integer + name: + type: string + configuration: + $ref: '#/components/schemas/listAuthorizationServers_200_response_inner_configuration' + description: + type: string + type: object + createAuthorizationServer_request: + properties: + name: + type: string + description: + type: string + configuration: + $ref: '#/components/schemas/auth_server_configuration' + type: object + getAuthorizationServer_200_response: + example: + configuration: + access_token_expiration_minutes: 6 + resource_identifier: resource_identifier + audiences: + - audiences + - audiences + refresh_token_expiration_minutes: 0 + name: name + description: description + id: 1 + properties: + configuration: + $ref: '#/components/schemas/auth_server_configuration' + id: + type: integer + description: + type: string + name: + type: string + type: object + updateAuthorizationServer_400_response: + properties: + field: + type: string + message: + type: string + statusCode: + type: integer + name: + type: string + type: object + listAccessTokenClaims_200_response_inner: + example: + default_values: default_values + provisioned_entitlements: true + attributes_transformations: attributes_transformations + values: + - values + - values + user_attribute_macros: user_attribute_macros + skip_if_blank: true + id: 0 + label: label + user_attribute_mappings: user_attribute_mappings + properties: + id: + type: integer + label: + type: string + user_attribute_mappings: + type: string + user_attribute_macros: + type: string + attributes_transformations: + type: string + skip_if_blank: + type: boolean + values: + items: + type: string + type: array + default_values: + type: string + provisioned_entitlements: + type: boolean + type: object + addAccessTokenClaim_request: + properties: + name: + type: string + user_attribute_mappings: + type: string + user_attribute_macros: + type: string + type: object + listScopes_200_response_inner: + example: + description: description + id: 0 + value: value + properties: + id: + type: integer + value: + type: string + description: + type: string + type: object + addScope_request: + properties: + value: + type: string + description: + type: string + type: object + getClientApps_200_response_inner_scopes_inner: + example: + description: description + id: 0 + value: value + properties: + description: + type: string + value: + type: string + id: + type: integer + type: object + getClientApps_200_response_inner: + example: + name: name + scopes: + - description: description + id: 0 + value: value + - description: description + id: 0 + value: value + api_auth_id: 1 + app_id: 6 + properties: + scopes: + items: + $ref: '#/components/schemas/getClientApps_200_response_inner_scopes_inner' + type: array + app_id: + type: integer + name: + type: string + api_auth_id: + type: integer + type: object + addClientApp_request: + properties: + app_id: + type: integer + scopes: + items: + type: integer + type: array + type: object + updateClientApp_request: + properties: + scopes: + items: + type: integer + type: array + type: object + listAppUsers_200_response_inner: + example: + firstname: firstname + id: 0 + email: email + lastname: lastname + username: username + properties: + firstname: + type: string + id: + type: integer + email: + type: string + lastname: + type: string + username: + type: string + type: object + listConditions_200_response_inner: + example: + name: name + value: value + properties: + name: + description: The name of the Condition. + type: string + value: + description: The unique identifier of the condition. This should be used + when defining conditions for a rule. + type: string + type: object + listConditionOperators_200_response_inner: + example: + name: name + value: value + properties: + name: + description: The name or description of the operator. + type: string + value: + description: The condition operator value to use when creating or updating + App Rules. + type: string + type: object + listConditionValues_200_response_inner: + example: + name: name + value: value + properties: + name: + type: string + value: + type: string + type: object + listActions_200_response_inner: + example: + name: name + value: value + properties: + name: + description: The name of the Action. + type: string + value: + description: The unique identifier of the action. This should be used when + defining actions for a User Mapping. + type: string + type: object + getAvailableFactors_200_response_inner: + example: + name: name + factor_id: 0 + auth_factor_name: auth_factor_name + properties: + factor_id: + description: Identifier for the factor which will be used for user enrollment + type: integer + name: + description: "Authentication factor name, as it appears to administrators\ + \ in OneLogin." + type: string + auth_factor_name: + description: Internal use only + type: string + type: object + enrollFactor_request: + properties: + factor_id: + description: The identifier of the factor to enroll the user with. + type: integer + display_name: + description: A name for the users device. + type: string + expires_in: + description: "Defaults to 120. Valid values are: 120-900 seconds." + type: string + verified: + description: Defaults to false. + type: boolean + redirect_to: + description: Redirects MagicLink success page to specified URL after 2 seconds. + type: string + custom_message: + description: A message template that will be sent via SMS. Max length of + the message after template items are inserted is 160 characters including + the OTP code. + type: string + required: + - display_name + - factor_id + type: object + verifyEnrollment_request: + properties: + otp: + type: integer + type: object + activateFactor_request: + properties: + device_id: + description: Required. Specifies the factor to be verified. + type: integer + expires_in: + description: 'Optional. Sets the window of time in seconds that the factor + must be verified within. ' + type: integer + redirect_to: + description: Optional. Only applies to Email MagicLink factor. + type: string + custom_message: + description: Optional. Only applies to SMS factor. A message template that + will be sent via SMS. + type: string + type: object + verifyFactorVoice_200_response_inner: + example: + device_id: device_id + id: id + status: pending + properties: + id: + type: string + status: + enum: + - pending + - accepted + - rejected + type: string + device_id: + type: string + type: object + verifyFactor_request: + properties: + otp: + description: OTP code provided by the device or SMS message sent to user. + type: string + device_id: + description: ID of the specified device which has been registerd for the + given user. + type: integer + type: object + generateMfaToken_request: + properties: + expires_in: + description: Set the duration of the token in seconds. + type: string + reusable: + description: Defines if the token is reusable multiple times within the + expiry window. + type: boolean + type: object + generateMfaToken_200_response: + example: + expires_at: expires_at + device_id: device_id + mfa_token: mfa_token + reusable: true + properties: + mfa_token: + description: Token can function as a temporary MFA token. It can be used + to authenticate for any app when valid. + type: string + reusable: + description: true indcates the token can be used multiple times. false indicates + the token is invalid after a single use + type: boolean + expires_at: + description: Defines the expiration time and date for the token. Format + is UTC time. + type: string + device_id: + description: Defines the expiration time and date for the token. Format + is UTC time. + type: string + type: object + generateMfaToken_422_response_details: + properties: + parameters: + items: + type: string + type: array + type: object + generateMfaToken_422_response: + properties: + statusCode: + type: integer + name: + type: string + message: + type: string + details: + $ref: '#/components/schemas/generateMfaToken_422_response_details' + type: object + createRoles_201_response_inner: + example: + id: 0 + properties: + id: + type: integer + type: object + updateRole_200_response: + example: + id: 0 + properties: + id: + type: integer + type: object + setRoleApps_200_response_inner: + example: + id: 0 + properties: + id: + description: Apps unique ID in OneLogin. + type: integer + type: object + addRoleUsers_200_response_inner: + example: + id: 0 + properties: + id: + type: integer + type: object + removeRoleUsers_request: + properties: + user_id: + items: + $ref: '#/components/schemas/id_2' + type: array + type: object + generateSamlAssertion_request: + properties: + username_or_email: + description: Set this to the username or email of the OneLogin user accessing + the app for which you want to generate a SAML token. + type: string + password: + description: Password of the OneLogin user accessing the app for which you + want to generate a SAML token. + type: string + app_id: + description: App ID of the app for which you want to generate a SAML token. + This is the app ID in OneLogin. + type: string + subdomain: + description: Set to the subdomain of the OneLogin user accessing the app + for which you want to generate a SAML token. + type: string + ip_address: + description: "Whitelisted IP address, if MFA is required and you need to\ + \ honor IP address whitelisting defined in MFA policies." + type: string + required: + - app_id + - password + - subdomain + - username_or_email + type: object + verifyFactorSaml_request: + properties: + app_id: + description: App ID of the app for which you want to generate a SAML token. + This is the app ID in OneLogin. + type: string + device_id: + description: Provide the MFA device_id you are submitting for verification. + The device_id is supplied by the Generate SAML Assertion API. + type: string + state_token: + description: state_token associated with the MFA device_id you are submitting. + The state_token is supplied by the Generate SAML Assertion API. + type: string + otp_token: + description: Provide the OTP value for the MFA factor you are submitting + for verification. + type: string + do_not_notify: + description: "When verifying MFA via Protect Push, set this to true to stop\ + \ additional push notifications being sent to the OneLogin Protect device." + type: boolean + required: + - app_id + - device_id + - state_token + type: object + verifyFactorSaml_200_response: + example: + data: data + message: message + properties: + data: + description: Provides the SAML assertion. + type: string + message: + description: Plain text description describing the outcome of the response. + type: string + type: object + createEnvironmentVariable_request: + properties: + name: + description: The name for the environment variable that will be used to + retrieve the value from a hook function. + type: string + value: + description: The secret value that will be encrypted at rest and injected + in applicable hook functions at run time. + type: string + required: + - name + - value + type: object + updateEnvironmentVariable_request: + properties: + value: + description: The secret value that will be encrypted at rest and injected + in applicable hook functions at run time. + type: string + required: + - value + type: object + getUserApps_200_response_inner: + example: + icon_url: icon_url + provisioning_enabled: true + login_id: 6 + provisioning_state: unknown + extension: true + name: name + provisioning_status: enabling + id: 0 + properties: + id: + description: The App ID + type: integer + icon_url: + description: A url for the icon that represents the app in the OneLogin + portal + type: string + extension: + description: Boolean that indicates if the OneLogin browser extension is + required to launch this app. + type: boolean + login_id: + description: Unqiue identifier for this user and app combination. + type: integer + name: + description: The name of the app. + type: string + provisioning_status: + enum: + - enabling + - disabling + - enabling_pending_approval + - disabling_pendding_approval + - enabled + - disabled + - disabling_failed + - enabling_failed + type: string + provisioning_state: + description: If provisioning is enabled this indicates the state of provisioning + for the given user. + enum: + - unknown + - provisioning + - modifying + - deleting + - provisioning_pending_approval + - deleting_pending_approval + - modifying_pending_approval + - linking + - provisioned + - deleted + - modifying_failed + - provisioning_failed + - deleting_failed + - linking_failed + - disabled + - nonexistent + - modifying_pending_approval_then_disabled + type: string + provisioning_enabled: + description: Indicates if provisioning is enabled for this app. + type: boolean + type: object + listMappingConditions_200_response_inner: + example: + name: name + value: value + properties: + name: + description: The name of the Condition. + type: string + value: + description: The unique identifier of the condition. This should be used + when defining conditions for a User Mapping. + type: string + type: object + listMappingConditionOperators_200_response_inner: + example: + name: name + value: value + properties: + name: + description: The name or description of the operator. + type: string + value: + description: The condition operator value to use when creating or updating + User Mappings. + type: string + type: object + trackEvent_request: + properties: + verb: + description: Verbs are used to distinguish between different types of events. + type: string + ip: + description: The IP address of the User's request. + type: string + user_agent: + description: The user agent of the User's request. + type: string + user: + $ref: '#/components/schemas/risk_user' + source: + $ref: '#/components/schemas/source' + session: + $ref: '#/components/schemas/session' + device: + $ref: '#/components/schemas/risk_device' + fp: + description: Set to the value of the __tdli_fp cookie. + type: string + published: + description: Date and time of the event in IS08601 format. Useful for preloading + old events. Defaults to date time this API request is received. + type: string + required: + - ip + - user + - user_agent + - verb + type: object + getRiskScore_request: + properties: + ip: + description: The IP address of the User's request. + type: string + user_agent: + description: The user agent of the User's request. + type: string + user: + $ref: '#/components/schemas/risk_user' + source: + $ref: '#/components/schemas/source' + session: + $ref: '#/components/schemas/session' + device: + $ref: '#/components/schemas/risk_device' + fp: + description: Set to the value of the __tdli_fp cookie. + type: string + required: + - ip + - user + - user_agent + type: object + getRiskScore_200_response: + example: + score: 8.008281904610115 + triggers: + - triggers + - triggers + properties: + score: + description: A risk score 0 is low risk and 100 is the highest risk level + possible. + maximum: 100.0 + minimum: 0.0 + type: number + triggers: + description: Triggers are indicators of some of the key items that influenced + the risk score. + items: + type: string + type: array + type: object + getRiskScore_400_response: + properties: + messages: + items: + type: string + type: array + type: object + getScoreInsights_200_response_scores: + example: + minimal: 0 + high: 5 + low: 6 + very_high: 5 + medium: 1 + properties: + minimal: + type: integer + low: + type: integer + medium: + type: integer + high: + type: integer + very_high: + type: integer + type: object + getScoreInsights_200_response: + example: + total: 2 + scores: + minimal: 0 + high: 5 + low: 6 + very_high: 5 + medium: 1 + properties: + scores: + $ref: '#/components/schemas/getScoreInsights_200_response_scores' + total: + type: integer + type: object + schema_provisioning: + example: + enabled: true + properties: + enabled: + description: Indicates if provisioning is enabled for this app. + type: boolean + type: object + error_status_errors_inner: + properties: + field: + type: string + message: + items: + type: string + type: array + type: object + factor_inner_factor_data: + description: "Array of factor specific properties. For example, the token or\ + \ totp code for OneLogin Protect." + properties: + verification_token: + description: The token which can be used to verify the factor registration. + type: string + totp_url: + description: OTP Url that can be leveraged for any authenticator that supports + the key uri format. + type: string + type: object + factor_inner: + properties: + id: + description: MFA device identifier. + type: string + status: + description: "accepted : factor has been verified. pending: registered but\ + \ has not been verified." + enum: + - pending + - accepted + type: string + default: + description: True = is user's default MFA device for OneLogin. + type: boolean + auth_factor_name: + description: "\"Official\" authentication factor name, as it appears to\ + \ administrators in OneLogin." + type: string + type_display_name: + description: "Authentication factor display name as it appears to users\ + \ upon initial registration, as defined by admins at Settings > Authentication\ + \ Factors." + type: string + user_display_name: + description: Authentication factor display name assigned by users when they + enroll the device. + type: string + expires_at: + description: A short lived token that is required to Verify the Factor. + This token expires based on the expires_in parameter passed in. + type: string + factor_data: + $ref: '#/components/schemas/factor_inner_factor_data' + type: object + status_2_status: + example: + code: 0 + type: type + message: message + error: true + properties: + type: + type: string + code: + type: integer + message: + type: string + error: + type: boolean + type: object + schema_1_added_by: + example: + name: name + id: 6 + properties: + id: + type: integer + name: + type: string + type: object + hook_options: + description: A set of attributes allow control over the information that is + included in the hook context. + example: + risk_enabled: true + mfa_device_info_enabled: true + location_enabled: true + properties: + risk_enabled: + type: boolean + location_enabled: + type: boolean + mfa_device_info_enabled: + type: boolean + type: object + hook_conditions_inner: + example: + source: source + value: value + operator: operator + properties: + source: + type: string + operator: + type: string + value: + type: string + type: object diff --git a/api_default.go b/api_default.go new file mode 100644 index 0000000..bfbadba --- /dev/null +++ b/api_default.go @@ -0,0 +1,13860 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "bytes" + "context" + "io/ioutil" + "net/http" + "net/url" + "strings" +) + + +// DefaultApiService DefaultApi service +type DefaultApiService service + +type ApiActivateFactorRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + userId int32 + activateFactorRequest *ActivateFactorRequest +} + +func (r ApiActivateFactorRequest) Authorization(authorization string) ApiActivateFactorRequest { + r.authorization = &authorization + return r +} + +func (r ApiActivateFactorRequest) ActivateFactorRequest(activateFactorRequest ActivateFactorRequest) ApiActivateFactorRequest { + r.activateFactorRequest = &activateFactorRequest + return r +} + +func (r ApiActivateFactorRequest) Execute() (*http.Response, error) { + return r.ApiService.ActivateFactorExecute(r) +} + +/* +ActivateFactor Method for ActivateFactor + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param userId Set to the id of the user. + @return ApiActivateFactorRequest +*/ +func (a *DefaultApiService) ActivateFactor(ctx context.Context, userId int32) ApiActivateFactorRequest { + return ApiActivateFactorRequest{ + ApiService: a, + ctx: ctx, + userId: userId, + } +} + +// Execute executes the request +func (a *DefaultApiService) ActivateFactorExecute(r ApiActivateFactorRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ActivateFactor") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/mfa/users/{user_id}/verifications" + localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterToString(r.userId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return nil, reportError("authorization is required and must be specified") + } + if r.activateFactorRequest == nil { + return nil, reportError("activateFactorRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + // body params + localVarPostBody = r.activateFactorRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiAddAccessTokenClaimRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + id int32 + addAccessTokenClaimRequest *AddAccessTokenClaimRequest +} + +func (r ApiAddAccessTokenClaimRequest) Authorization(authorization string) ApiAddAccessTokenClaimRequest { + r.authorization = &authorization + return r +} + +func (r ApiAddAccessTokenClaimRequest) AddAccessTokenClaimRequest(addAccessTokenClaimRequest AddAccessTokenClaimRequest) ApiAddAccessTokenClaimRequest { + r.addAccessTokenClaimRequest = &addAccessTokenClaimRequest + return r +} + +func (r ApiAddAccessTokenClaimRequest) Execute() (*Id, *http.Response, error) { + return r.ApiService.AddAccessTokenClaimExecute(r) +} + +/* +AddAccessTokenClaim Method for AddAccessTokenClaim + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return ApiAddAccessTokenClaimRequest +*/ +func (a *DefaultApiService) AddAccessTokenClaim(ctx context.Context, id int32) ApiAddAccessTokenClaimRequest { + return ApiAddAccessTokenClaimRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// @return Id +func (a *DefaultApiService) AddAccessTokenClaimExecute(r ApiAddAccessTokenClaimRequest) (*Id, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Id + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.AddAccessTokenClaim") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/api_authorizations/{id}/claims" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return localVarReturnValue, nil, reportError("authorization is required and must be specified") + } + if r.addAccessTokenClaimRequest == nil { + return localVarReturnValue, nil, reportError("addAccessTokenClaimRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + // body params + localVarPostBody = r.addAccessTokenClaimRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiAddClientAppRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + id int32 + addClientAppRequest *AddClientAppRequest +} + +func (r ApiAddClientAppRequest) Authorization(authorization string) ApiAddClientAppRequest { + r.authorization = &authorization + return r +} + +func (r ApiAddClientAppRequest) AddClientAppRequest(addClientAppRequest AddClientAppRequest) ApiAddClientAppRequest { + r.addClientAppRequest = &addClientAppRequest + return r +} + +func (r ApiAddClientAppRequest) Execute() (*ClientApp, *http.Response, error) { + return r.ApiService.AddClientAppExecute(r) +} + +/* +AddClientApp Method for AddClientApp + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return ApiAddClientAppRequest +*/ +func (a *DefaultApiService) AddClientApp(ctx context.Context, id int32) ApiAddClientAppRequest { + return ApiAddClientAppRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// @return ClientApp +func (a *DefaultApiService) AddClientAppExecute(r ApiAddClientAppRequest) (*ClientApp, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ClientApp + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.AddClientApp") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/api_authorizations/{id}/clients" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return localVarReturnValue, nil, reportError("authorization is required and must be specified") + } + if r.addClientAppRequest == nil { + return localVarReturnValue, nil, reportError("addClientAppRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + // body params + localVarPostBody = r.addClientAppRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiAddRoleAdminsRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + roleId int32 + requestBody *[]int32 +} + +func (r ApiAddRoleAdminsRequest) Authorization(authorization string) ApiAddRoleAdminsRequest { + r.authorization = &authorization + return r +} + +func (r ApiAddRoleAdminsRequest) RequestBody(requestBody []int32) ApiAddRoleAdminsRequest { + r.requestBody = &requestBody + return r +} + +func (r ApiAddRoleAdminsRequest) Execute() ([]AddRoleUsers200ResponseInner, *http.Response, error) { + return r.ApiService.AddRoleAdminsExecute(r) +} + +/* +AddRoleAdmins Method for AddRoleAdmins + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param roleId Set to the id of the role you want to return. + @return ApiAddRoleAdminsRequest +*/ +func (a *DefaultApiService) AddRoleAdmins(ctx context.Context, roleId int32) ApiAddRoleAdminsRequest { + return ApiAddRoleAdminsRequest{ + ApiService: a, + ctx: ctx, + roleId: roleId, + } +} + +// Execute executes the request +// @return []AddRoleUsers200ResponseInner +func (a *DefaultApiService) AddRoleAdminsExecute(r ApiAddRoleAdminsRequest) ([]AddRoleUsers200ResponseInner, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []AddRoleUsers200ResponseInner + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.AddRoleAdmins") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/roles/{role_id}/admins" + localVarPath = strings.Replace(localVarPath, "{"+"role_id"+"}", url.PathEscape(parameterToString(r.roleId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return localVarReturnValue, nil, reportError("authorization is required and must be specified") + } + if r.requestBody == nil { + return localVarReturnValue, nil, reportError("requestBody is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + // body params + localVarPostBody = r.requestBody + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiAddRoleUsersRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + roleId int32 + requestBody *[]int32 +} + +func (r ApiAddRoleUsersRequest) Authorization(authorization string) ApiAddRoleUsersRequest { + r.authorization = &authorization + return r +} + +func (r ApiAddRoleUsersRequest) RequestBody(requestBody []int32) ApiAddRoleUsersRequest { + r.requestBody = &requestBody + return r +} + +func (r ApiAddRoleUsersRequest) Execute() ([]AddRoleUsers200ResponseInner, *http.Response, error) { + return r.ApiService.AddRoleUsersExecute(r) +} + +/* +AddRoleUsers Method for AddRoleUsers + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param roleId Set to the id of the role you want to return. + @return ApiAddRoleUsersRequest +*/ +func (a *DefaultApiService) AddRoleUsers(ctx context.Context, roleId int32) ApiAddRoleUsersRequest { + return ApiAddRoleUsersRequest{ + ApiService: a, + ctx: ctx, + roleId: roleId, + } +} + +// Execute executes the request +// @return []AddRoleUsers200ResponseInner +func (a *DefaultApiService) AddRoleUsersExecute(r ApiAddRoleUsersRequest) ([]AddRoleUsers200ResponseInner, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []AddRoleUsers200ResponseInner + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.AddRoleUsers") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/roles/{role_id}/users" + localVarPath = strings.Replace(localVarPath, "{"+"role_id"+"}", url.PathEscape(parameterToString(r.roleId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return localVarReturnValue, nil, reportError("authorization is required and must be specified") + } + if r.requestBody == nil { + return localVarReturnValue, nil, reportError("requestBody is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + // body params + localVarPostBody = r.requestBody + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiAddScopeRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + id int32 + addScopeRequest *AddScopeRequest +} + +func (r ApiAddScopeRequest) Authorization(authorization string) ApiAddScopeRequest { + r.authorization = &authorization + return r +} + +func (r ApiAddScopeRequest) AddScopeRequest(addScopeRequest AddScopeRequest) ApiAddScopeRequest { + r.addScopeRequest = &addScopeRequest + return r +} + +func (r ApiAddScopeRequest) Execute() (*Id, *http.Response, error) { + return r.ApiService.AddScopeExecute(r) +} + +/* +AddScope Method for AddScope + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return ApiAddScopeRequest +*/ +func (a *DefaultApiService) AddScope(ctx context.Context, id int32) ApiAddScopeRequest { + return ApiAddScopeRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// @return Id +func (a *DefaultApiService) AddScopeExecute(r ApiAddScopeRequest) (*Id, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Id + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.AddScope") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/api_authorizations/{id}/scopes" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return localVarReturnValue, nil, reportError("authorization is required and must be specified") + } + if r.addScopeRequest == nil { + return localVarReturnValue, nil, reportError("addScopeRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + // body params + localVarPostBody = r.addScopeRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiBulkMappingSortRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + requestBody *[]int32 +} + +func (r ApiBulkMappingSortRequest) Authorization(authorization string) ApiBulkMappingSortRequest { + r.authorization = &authorization + return r +} + +// The request body must contain an array of User Mapping IDs in the desired order. +func (r ApiBulkMappingSortRequest) RequestBody(requestBody []int32) ApiBulkMappingSortRequest { + r.requestBody = &requestBody + return r +} + +func (r ApiBulkMappingSortRequest) Execute() ([]int32, *http.Response, error) { + return r.ApiService.BulkMappingSortExecute(r) +} + +/* +BulkMappingSort Method for BulkMappingSort + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiBulkMappingSortRequest +*/ +func (a *DefaultApiService) BulkMappingSort(ctx context.Context) ApiBulkMappingSortRequest { + return ApiBulkMappingSortRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return []int32 +func (a *DefaultApiService) BulkMappingSortExecute(r ApiBulkMappingSortRequest) ([]int32, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []int32 + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.BulkMappingSort") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/apps/mappings/sort" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return localVarReturnValue, nil, reportError("authorization is required and must be specified") + } + if r.requestBody == nil { + return localVarReturnValue, nil, reportError("requestBody is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + // body params + localVarPostBody = r.requestBody + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v ErrorStatus + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiBulkSortRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + appId int32 + requestBody *[]int32 +} + +func (r ApiBulkSortRequest) Authorization(authorization string) ApiBulkSortRequest { + r.authorization = &authorization + return r +} + +// The request body must contain an array of App Rule IDs in the desired order. +func (r ApiBulkSortRequest) RequestBody(requestBody []int32) ApiBulkSortRequest { + r.requestBody = &requestBody + return r +} + +func (r ApiBulkSortRequest) Execute() ([]int32, *http.Response, error) { + return r.ApiService.BulkSortExecute(r) +} + +/* +BulkSort Method for BulkSort + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param appId + @return ApiBulkSortRequest +*/ +func (a *DefaultApiService) BulkSort(ctx context.Context, appId int32) ApiBulkSortRequest { + return ApiBulkSortRequest{ + ApiService: a, + ctx: ctx, + appId: appId, + } +} + +// Execute executes the request +// @return []int32 +func (a *DefaultApiService) BulkSortExecute(r ApiBulkSortRequest) ([]int32, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []int32 + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.BulkSort") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/apps/{app_id}/rules/sort" + localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterToString(r.appId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return localVarReturnValue, nil, reportError("authorization is required and must be specified") + } + if r.requestBody == nil { + return localVarReturnValue, nil, reportError("requestBody is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + // body params + localVarPostBody = r.requestBody + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v ErrorStatus + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiCreateAppRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + schema *Schema +} + +func (r ApiCreateAppRequest) Authorization(authorization string) ApiCreateAppRequest { + r.authorization = &authorization + return r +} + +func (r ApiCreateAppRequest) Schema(schema Schema) ApiCreateAppRequest { + r.schema = &schema + return r +} + +func (r ApiCreateAppRequest) Execute() (*Schema, *http.Response, error) { + return r.ApiService.CreateAppExecute(r) +} + +/* +CreateApp Method for CreateApp + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateAppRequest +*/ +func (a *DefaultApiService) CreateApp(ctx context.Context) ApiCreateAppRequest { + return ApiCreateAppRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return Schema +func (a *DefaultApiService) CreateAppExecute(r ApiCreateAppRequest) (*Schema, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Schema + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.CreateApp") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/apps" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return localVarReturnValue, nil, reportError("authorization is required and must be specified") + } + if r.schema == nil { + return localVarReturnValue, nil, reportError("schema is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + // body params + localVarPostBody = r.schema + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiCreateAuthorizationServerRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + createAuthorizationServerRequest *CreateAuthorizationServerRequest +} + +func (r ApiCreateAuthorizationServerRequest) Authorization(authorization string) ApiCreateAuthorizationServerRequest { + r.authorization = &authorization + return r +} + +func (r ApiCreateAuthorizationServerRequest) CreateAuthorizationServerRequest(createAuthorizationServerRequest CreateAuthorizationServerRequest) ApiCreateAuthorizationServerRequest { + r.createAuthorizationServerRequest = &createAuthorizationServerRequest + return r +} + +func (r ApiCreateAuthorizationServerRequest) Execute() (*Id, *http.Response, error) { + return r.ApiService.CreateAuthorizationServerExecute(r) +} + +/* +CreateAuthorizationServer Method for CreateAuthorizationServer + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateAuthorizationServerRequest +*/ +func (a *DefaultApiService) CreateAuthorizationServer(ctx context.Context) ApiCreateAuthorizationServerRequest { + return ApiCreateAuthorizationServerRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return Id +func (a *DefaultApiService) CreateAuthorizationServerExecute(r ApiCreateAuthorizationServerRequest) (*Id, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Id + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.CreateAuthorizationServer") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/api_authorizations" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return localVarReturnValue, nil, reportError("authorization is required and must be specified") + } + if r.createAuthorizationServerRequest == nil { + return localVarReturnValue, nil, reportError("createAuthorizationServerRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + // body params + localVarPostBody = r.createAuthorizationServerRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiCreateEnvironmentVariableRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + createEnvironmentVariableRequest *CreateEnvironmentVariableRequest +} + +func (r ApiCreateEnvironmentVariableRequest) Authorization(authorization string) ApiCreateEnvironmentVariableRequest { + r.authorization = &authorization + return r +} + +func (r ApiCreateEnvironmentVariableRequest) CreateEnvironmentVariableRequest(createEnvironmentVariableRequest CreateEnvironmentVariableRequest) ApiCreateEnvironmentVariableRequest { + r.createEnvironmentVariableRequest = &createEnvironmentVariableRequest + return r +} + +func (r ApiCreateEnvironmentVariableRequest) Execute() (*Envvar, *http.Response, error) { + return r.ApiService.CreateEnvironmentVariableExecute(r) +} + +/* +CreateEnvironmentVariable Method for CreateEnvironmentVariable + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateEnvironmentVariableRequest +*/ +func (a *DefaultApiService) CreateEnvironmentVariable(ctx context.Context) ApiCreateEnvironmentVariableRequest { + return ApiCreateEnvironmentVariableRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return Envvar +func (a *DefaultApiService) CreateEnvironmentVariableExecute(r ApiCreateEnvironmentVariableRequest) (*Envvar, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Envvar + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.CreateEnvironmentVariable") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/hooks/envs" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return localVarReturnValue, nil, reportError("authorization is required and must be specified") + } + if r.createEnvironmentVariableRequest == nil { + return localVarReturnValue, nil, reportError("createEnvironmentVariableRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + // body params + localVarPostBody = r.createEnvironmentVariableRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiCreateHookRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + hook *Hook +} + +func (r ApiCreateHookRequest) Authorization(authorization string) ApiCreateHookRequest { + r.authorization = &authorization + return r +} + +func (r ApiCreateHookRequest) Hook(hook Hook) ApiCreateHookRequest { + r.hook = &hook + return r +} + +func (r ApiCreateHookRequest) Execute() (*http.Response, error) { + return r.ApiService.CreateHookExecute(r) +} + +/* +CreateHook Method for CreateHook + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateHookRequest +*/ +func (a *DefaultApiService) CreateHook(ctx context.Context) ApiCreateHookRequest { + return ApiCreateHookRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +func (a *DefaultApiService) CreateHookExecute(r ApiCreateHookRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.CreateHook") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/hooks" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return nil, reportError("authorization is required and must be specified") + } + if r.hook == nil { + return nil, reportError("hook is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + // body params + localVarPostBody = r.hook + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiCreateMappingRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + mapping *Mapping +} + +func (r ApiCreateMappingRequest) Authorization(authorization string) ApiCreateMappingRequest { + r.authorization = &authorization + return r +} + +func (r ApiCreateMappingRequest) Mapping(mapping Mapping) ApiCreateMappingRequest { + r.mapping = &mapping + return r +} + +func (r ApiCreateMappingRequest) Execute() (int32, *http.Response, error) { + return r.ApiService.CreateMappingExecute(r) +} + +/* +CreateMapping Method for CreateMapping + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateMappingRequest +*/ +func (a *DefaultApiService) CreateMapping(ctx context.Context) ApiCreateMappingRequest { + return ApiCreateMappingRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return int32 +func (a *DefaultApiService) CreateMappingExecute(r ApiCreateMappingRequest) (int32, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue int32 + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.CreateMapping") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/mappings" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return localVarReturnValue, nil, reportError("authorization is required and must be specified") + } + if r.mapping == nil { + return localVarReturnValue, nil, reportError("mapping is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + // body params + localVarPostBody = r.mapping + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v ErrorStatus + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiCreateRiskRuleRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + riskRule *RiskRule +} + +func (r ApiCreateRiskRuleRequest) Authorization(authorization string) ApiCreateRiskRuleRequest { + r.authorization = &authorization + return r +} + +func (r ApiCreateRiskRuleRequest) RiskRule(riskRule RiskRule) ApiCreateRiskRuleRequest { + r.riskRule = &riskRule + return r +} + +func (r ApiCreateRiskRuleRequest) Execute() (*http.Response, error) { + return r.ApiService.CreateRiskRuleExecute(r) +} + +/* +CreateRiskRule Method for CreateRiskRule + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateRiskRuleRequest +*/ +func (a *DefaultApiService) CreateRiskRule(ctx context.Context) ApiCreateRiskRuleRequest { + return ApiCreateRiskRuleRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +func (a *DefaultApiService) CreateRiskRuleExecute(r ApiCreateRiskRuleRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.CreateRiskRule") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/risk/rules" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return nil, reportError("authorization is required and must be specified") + } + if r.riskRule == nil { + return nil, reportError("riskRule is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + // body params + localVarPostBody = r.riskRule + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiCreateRolesRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string +} + +func (r ApiCreateRolesRequest) Authorization(authorization string) ApiCreateRolesRequest { + r.authorization = &authorization + return r +} + +func (r ApiCreateRolesRequest) Execute() ([]CreateRoles201ResponseInner, *http.Response, error) { + return r.ApiService.CreateRolesExecute(r) +} + +/* +CreateRoles Method for CreateRoles + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateRolesRequest +*/ +func (a *DefaultApiService) CreateRoles(ctx context.Context) ApiCreateRolesRequest { + return ApiCreateRolesRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return []CreateRoles201ResponseInner +func (a *DefaultApiService) CreateRolesExecute(r ApiCreateRolesRequest) ([]CreateRoles201ResponseInner, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []CreateRoles201ResponseInner + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.CreateRoles") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/roles" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return localVarReturnValue, nil, reportError("authorization is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiCreateRuleRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + appId int32 + rule *Rule +} + +func (r ApiCreateRuleRequest) Authorization(authorization string) ApiCreateRuleRequest { + r.authorization = &authorization + return r +} + +func (r ApiCreateRuleRequest) Rule(rule Rule) ApiCreateRuleRequest { + r.rule = &rule + return r +} + +func (r ApiCreateRuleRequest) Execute() (*RuleId, *http.Response, error) { + return r.ApiService.CreateRuleExecute(r) +} + +/* +CreateRule Method for CreateRule + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param appId + @return ApiCreateRuleRequest +*/ +func (a *DefaultApiService) CreateRule(ctx context.Context, appId int32) ApiCreateRuleRequest { + return ApiCreateRuleRequest{ + ApiService: a, + ctx: ctx, + appId: appId, + } +} + +// Execute executes the request +// @return RuleId +func (a *DefaultApiService) CreateRuleExecute(r ApiCreateRuleRequest) (*RuleId, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RuleId + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.CreateRule") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/apps/{app_id}/rules" + localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterToString(r.appId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return localVarReturnValue, nil, reportError("authorization is required and must be specified") + } + if r.rule == nil { + return localVarReturnValue, nil, reportError("rule is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + // body params + localVarPostBody = r.rule + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v ErrorStatus + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiCreateUserRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + user *User + mappings *string + validatePolicy *bool +} + +func (r ApiCreateUserRequest) Authorization(authorization string) ApiCreateUserRequest { + r.authorization = &authorization + return r +} + +func (r ApiCreateUserRequest) User(user User) ApiCreateUserRequest { + r.user = &user + return r +} + +// Controls how mappings will be applied to the user on creation. Defaults to async. +func (r ApiCreateUserRequest) Mappings(mappings string) ApiCreateUserRequest { + r.mappings = &mappings + return r +} + +// Will passwords validate against the User Policy? Defaults to true. +func (r ApiCreateUserRequest) ValidatePolicy(validatePolicy bool) ApiCreateUserRequest { + r.validatePolicy = &validatePolicy + return r +} + +func (r ApiCreateUserRequest) Execute() (*User, *http.Response, error) { + return r.ApiService.CreateUserExecute(r) +} + +/* +CreateUser Method for CreateUser + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateUserRequest +*/ +func (a *DefaultApiService) CreateUser(ctx context.Context) ApiCreateUserRequest { + return ApiCreateUserRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return User +func (a *DefaultApiService) CreateUserExecute(r ApiCreateUserRequest) (*User, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *User + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.CreateUser") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/users" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return localVarReturnValue, nil, reportError("authorization is required and must be specified") + } + if r.user == nil { + return localVarReturnValue, nil, reportError("user is required and must be specified") + } + + if r.mappings != nil { + localVarQueryParams.Add("mappings", parameterToString(*r.mappings, "")) + } + if r.validatePolicy != nil { + localVarQueryParams.Add("validate_policy", parameterToString(*r.validatePolicy, "")) + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + // body params + localVarPostBody = r.user + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteAccessTokenClaimRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + id int32 + claimId int32 +} + +func (r ApiDeleteAccessTokenClaimRequest) Authorization(authorization string) ApiDeleteAccessTokenClaimRequest { + r.authorization = &authorization + return r +} + +func (r ApiDeleteAccessTokenClaimRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteAccessTokenClaimExecute(r) +} + +/* +DeleteAccessTokenClaim Method for DeleteAccessTokenClaim + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @param claimId + @return ApiDeleteAccessTokenClaimRequest +*/ +func (a *DefaultApiService) DeleteAccessTokenClaim(ctx context.Context, id int32, claimId int32) ApiDeleteAccessTokenClaimRequest { + return ApiDeleteAccessTokenClaimRequest{ + ApiService: a, + ctx: ctx, + id: id, + claimId: claimId, + } +} + +// Execute executes the request +func (a *DefaultApiService) DeleteAccessTokenClaimExecute(r ApiDeleteAccessTokenClaimRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeleteAccessTokenClaim") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/api_authorizations/{id}/claims/{claim_id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"claim_id"+"}", url.PathEscape(parameterToString(r.claimId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return nil, reportError("authorization is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiDeleteAppRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + appId int32 +} + +func (r ApiDeleteAppRequest) Authorization(authorization string) ApiDeleteAppRequest { + r.authorization = &authorization + return r +} + +func (r ApiDeleteAppRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteAppExecute(r) +} + +/* +DeleteApp Method for DeleteApp + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param appId + @return ApiDeleteAppRequest +*/ +func (a *DefaultApiService) DeleteApp(ctx context.Context, appId int32) ApiDeleteAppRequest { + return ApiDeleteAppRequest{ + ApiService: a, + ctx: ctx, + appId: appId, + } +} + +// Execute executes the request +func (a *DefaultApiService) DeleteAppExecute(r ApiDeleteAppRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeleteApp") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/apps/{app_id}" + localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterToString(r.appId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return nil, reportError("authorization is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiDeleteAppParameterRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + appId int32 + parameterId int32 +} + +func (r ApiDeleteAppParameterRequest) Authorization(authorization string) ApiDeleteAppParameterRequest { + r.authorization = &authorization + return r +} + +func (r ApiDeleteAppParameterRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteAppParameterExecute(r) +} + +/* +DeleteAppParameter Method for DeleteAppParameter + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param appId + @param parameterId + @return ApiDeleteAppParameterRequest +*/ +func (a *DefaultApiService) DeleteAppParameter(ctx context.Context, appId int32, parameterId int32) ApiDeleteAppParameterRequest { + return ApiDeleteAppParameterRequest{ + ApiService: a, + ctx: ctx, + appId: appId, + parameterId: parameterId, + } +} + +// Execute executes the request +func (a *DefaultApiService) DeleteAppParameterExecute(r ApiDeleteAppParameterRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeleteAppParameter") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/apps/{app_id}/parameters/{parameter_id}" + localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterToString(r.appId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"parameter_id"+"}", url.PathEscape(parameterToString(r.parameterId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return nil, reportError("authorization is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiDeleteAuthorizationServerRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + id int32 +} + +func (r ApiDeleteAuthorizationServerRequest) Authorization(authorization string) ApiDeleteAuthorizationServerRequest { + r.authorization = &authorization + return r +} + +func (r ApiDeleteAuthorizationServerRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteAuthorizationServerExecute(r) +} + +/* +DeleteAuthorizationServer Method for DeleteAuthorizationServer + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return ApiDeleteAuthorizationServerRequest +*/ +func (a *DefaultApiService) DeleteAuthorizationServer(ctx context.Context, id int32) ApiDeleteAuthorizationServerRequest { + return ApiDeleteAuthorizationServerRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *DefaultApiService) DeleteAuthorizationServerExecute(r ApiDeleteAuthorizationServerRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeleteAuthorizationServer") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/api_authorizations/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return nil, reportError("authorization is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiDeleteEnvironmentVariableRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + envvarId string +} + +func (r ApiDeleteEnvironmentVariableRequest) Authorization(authorization string) ApiDeleteEnvironmentVariableRequest { + r.authorization = &authorization + return r +} + +func (r ApiDeleteEnvironmentVariableRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteEnvironmentVariableExecute(r) +} + +/* +DeleteEnvironmentVariable Method for DeleteEnvironmentVariable + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param envvarId Set to the id of the Hook Environment Variable that you want to fetch. + @return ApiDeleteEnvironmentVariableRequest +*/ +func (a *DefaultApiService) DeleteEnvironmentVariable(ctx context.Context, envvarId string) ApiDeleteEnvironmentVariableRequest { + return ApiDeleteEnvironmentVariableRequest{ + ApiService: a, + ctx: ctx, + envvarId: envvarId, + } +} + +// Execute executes the request +func (a *DefaultApiService) DeleteEnvironmentVariableExecute(r ApiDeleteEnvironmentVariableRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeleteEnvironmentVariable") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/hooks/envs/{envvar_id}" + localVarPath = strings.Replace(localVarPath, "{"+"envvar_id"+"}", url.PathEscape(parameterToString(r.envvarId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return nil, reportError("authorization is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiDeleteFactorRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + userId int32 + deviceId int32 +} + +func (r ApiDeleteFactorRequest) Authorization(authorization string) ApiDeleteFactorRequest { + r.authorization = &authorization + return r +} + +func (r ApiDeleteFactorRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteFactorExecute(r) +} + +/* +DeleteFactor Method for DeleteFactor + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param userId Set to the id of the user. + @param deviceId Set to the device_id of the MFA device. + @return ApiDeleteFactorRequest +*/ +func (a *DefaultApiService) DeleteFactor(ctx context.Context, userId int32, deviceId int32) ApiDeleteFactorRequest { + return ApiDeleteFactorRequest{ + ApiService: a, + ctx: ctx, + userId: userId, + deviceId: deviceId, + } +} + +// Execute executes the request +func (a *DefaultApiService) DeleteFactorExecute(r ApiDeleteFactorRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeleteFactor") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/mfa/users/{user_id}/devices/{device_id}" + localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterToString(r.userId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"device_id"+"}", url.PathEscape(parameterToString(r.deviceId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return nil, reportError("authorization is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiDeleteHookRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + hookId string +} + +func (r ApiDeleteHookRequest) Authorization(authorization string) ApiDeleteHookRequest { + r.authorization = &authorization + return r +} + +func (r ApiDeleteHookRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteHookExecute(r) +} + +/* +DeleteHook Method for DeleteHook + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param hookId Set to the id of the Hook that you want to return. + @return ApiDeleteHookRequest +*/ +func (a *DefaultApiService) DeleteHook(ctx context.Context, hookId string) ApiDeleteHookRequest { + return ApiDeleteHookRequest{ + ApiService: a, + ctx: ctx, + hookId: hookId, + } +} + +// Execute executes the request +func (a *DefaultApiService) DeleteHookExecute(r ApiDeleteHookRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeleteHook") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/hooks/{hook_id}" + localVarPath = strings.Replace(localVarPath, "{"+"hook_id"+"}", url.PathEscape(parameterToString(r.hookId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return nil, reportError("authorization is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiDeleteMappingRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + mappingId int32 +} + +func (r ApiDeleteMappingRequest) Authorization(authorization string) ApiDeleteMappingRequest { + r.authorization = &authorization + return r +} + +func (r ApiDeleteMappingRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteMappingExecute(r) +} + +/* +DeleteMapping Method for DeleteMapping + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param mappingId The id of the user mapping to locate. + @return ApiDeleteMappingRequest +*/ +func (a *DefaultApiService) DeleteMapping(ctx context.Context, mappingId int32) ApiDeleteMappingRequest { + return ApiDeleteMappingRequest{ + ApiService: a, + ctx: ctx, + mappingId: mappingId, + } +} + +// Execute executes the request +func (a *DefaultApiService) DeleteMappingExecute(r ApiDeleteMappingRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeleteMapping") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/mappings/{mapping_id}" + localVarPath = strings.Replace(localVarPath, "{"+"mapping_id"+"}", url.PathEscape(parameterToString(r.mappingId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return nil, reportError("authorization is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiDeleteRiskRuleRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + riskRuleId string +} + +func (r ApiDeleteRiskRuleRequest) Authorization(authorization string) ApiDeleteRiskRuleRequest { + r.authorization = &authorization + return r +} + +func (r ApiDeleteRiskRuleRequest) Execute() (*RiskRule, *http.Response, error) { + return r.ApiService.DeleteRiskRuleExecute(r) +} + +/* +DeleteRiskRule Method for DeleteRiskRule + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param riskRuleId + @return ApiDeleteRiskRuleRequest +*/ +func (a *DefaultApiService) DeleteRiskRule(ctx context.Context, riskRuleId string) ApiDeleteRiskRuleRequest { + return ApiDeleteRiskRuleRequest{ + ApiService: a, + ctx: ctx, + riskRuleId: riskRuleId, + } +} + +// Execute executes the request +// @return RiskRule +func (a *DefaultApiService) DeleteRiskRuleExecute(r ApiDeleteRiskRuleRequest) (*RiskRule, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RiskRule + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeleteRiskRule") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/risk/rules/{risk_rule_id}" + localVarPath = strings.Replace(localVarPath, "{"+"risk_rule_id"+"}", url.PathEscape(parameterToString(r.riskRuleId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return localVarReturnValue, nil, reportError("authorization is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteRoleRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + roleId int32 +} + +func (r ApiDeleteRoleRequest) Authorization(authorization string) ApiDeleteRoleRequest { + r.authorization = &authorization + return r +} + +func (r ApiDeleteRoleRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteRoleExecute(r) +} + +/* +DeleteRole Method for DeleteRole + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param roleId Set to the id of the role you want to return. + @return ApiDeleteRoleRequest +*/ +func (a *DefaultApiService) DeleteRole(ctx context.Context, roleId int32) ApiDeleteRoleRequest { + return ApiDeleteRoleRequest{ + ApiService: a, + ctx: ctx, + roleId: roleId, + } +} + +// Execute executes the request +func (a *DefaultApiService) DeleteRoleExecute(r ApiDeleteRoleRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeleteRole") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/roles/{role_id}" + localVarPath = strings.Replace(localVarPath, "{"+"role_id"+"}", url.PathEscape(parameterToString(r.roleId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return nil, reportError("authorization is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiDeleteRuleRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + appId int32 + ruleId int32 +} + +func (r ApiDeleteRuleRequest) Authorization(authorization string) ApiDeleteRuleRequest { + r.authorization = &authorization + return r +} + +func (r ApiDeleteRuleRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteRuleExecute(r) +} + +/* +DeleteRule Method for DeleteRule + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param appId + @param ruleId The id of the app rule to locate. + @return ApiDeleteRuleRequest +*/ +func (a *DefaultApiService) DeleteRule(ctx context.Context, appId int32, ruleId int32) ApiDeleteRuleRequest { + return ApiDeleteRuleRequest{ + ApiService: a, + ctx: ctx, + appId: appId, + ruleId: ruleId, + } +} + +// Execute executes the request +func (a *DefaultApiService) DeleteRuleExecute(r ApiDeleteRuleRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeleteRule") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/apps/{app_id}/rules/{rule_id}" + localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterToString(r.appId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"rule_id"+"}", url.PathEscape(parameterToString(r.ruleId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return nil, reportError("authorization is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiDeleteScopeRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + id int32 + scopeId int32 +} + +func (r ApiDeleteScopeRequest) Authorization(authorization string) ApiDeleteScopeRequest { + r.authorization = &authorization + return r +} + +func (r ApiDeleteScopeRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteScopeExecute(r) +} + +/* +DeleteScope Method for DeleteScope + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @param scopeId + @return ApiDeleteScopeRequest +*/ +func (a *DefaultApiService) DeleteScope(ctx context.Context, id int32, scopeId int32) ApiDeleteScopeRequest { + return ApiDeleteScopeRequest{ + ApiService: a, + ctx: ctx, + id: id, + scopeId: scopeId, + } +} + +// Execute executes the request +func (a *DefaultApiService) DeleteScopeExecute(r ApiDeleteScopeRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeleteScope") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/api_authorizations/{id}/scopes/{scope_id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"scope_id"+"}", url.PathEscape(parameterToString(r.scopeId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return nil, reportError("authorization is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiDeleteUserRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + userId int32 +} + +func (r ApiDeleteUserRequest) Authorization(authorization string) ApiDeleteUserRequest { + r.authorization = &authorization + return r +} + +func (r ApiDeleteUserRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteUserExecute(r) +} + +/* +DeleteUser Method for DeleteUser + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param userId Set to the id of the user that you want to return. + @return ApiDeleteUserRequest +*/ +func (a *DefaultApiService) DeleteUser(ctx context.Context, userId int32) ApiDeleteUserRequest { + return ApiDeleteUserRequest{ + ApiService: a, + ctx: ctx, + userId: userId, + } +} + +// Execute executes the request +func (a *DefaultApiService) DeleteUserExecute(r ApiDeleteUserRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeleteUser") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/users/{user_id}" + localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterToString(r.userId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return nil, reportError("authorization is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiDryRunMappingRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + mappingId int32 + requestBody *[]int32 +} + +func (r ApiDryRunMappingRequest) Authorization(authorization string) ApiDryRunMappingRequest { + r.authorization = &authorization + return r +} + +// Request body is a list of user IDs tested against the mapping conditions to verify that the mapping would be applied +func (r ApiDryRunMappingRequest) RequestBody(requestBody []int32) ApiDryRunMappingRequest { + r.requestBody = &requestBody + return r +} + +func (r ApiDryRunMappingRequest) Execute() ([]map[string]interface{}, *http.Response, error) { + return r.ApiService.DryRunMappingExecute(r) +} + +/* +DryRunMapping Method for DryRunMapping + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param mappingId The id of the user mapping to locate. + @return ApiDryRunMappingRequest +*/ +func (a *DefaultApiService) DryRunMapping(ctx context.Context, mappingId int32) ApiDryRunMappingRequest { + return ApiDryRunMappingRequest{ + ApiService: a, + ctx: ctx, + mappingId: mappingId, + } +} + +// Execute executes the request +// @return []map[string]interface{} +func (a *DefaultApiService) DryRunMappingExecute(r ApiDryRunMappingRequest) ([]map[string]interface{}, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []map[string]interface{} + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DryRunMapping") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/mappings/{mapping_id}/dryrun" + localVarPath = strings.Replace(localVarPath, "{"+"mapping_id"+"}", url.PathEscape(parameterToString(r.mappingId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return localVarReturnValue, nil, reportError("authorization is required and must be specified") + } + if r.requestBody == nil { + return localVarReturnValue, nil, reportError("requestBody is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + // body params + localVarPostBody = r.requestBody + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v ErrorStatus + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiEnrollFactorRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + userId int32 + enrollFactorRequest *EnrollFactorRequest +} + +func (r ApiEnrollFactorRequest) Authorization(authorization string) ApiEnrollFactorRequest { + r.authorization = &authorization + return r +} + +func (r ApiEnrollFactorRequest) EnrollFactorRequest(enrollFactorRequest EnrollFactorRequest) ApiEnrollFactorRequest { + r.enrollFactorRequest = &enrollFactorRequest + return r +} + +func (r ApiEnrollFactorRequest) Execute() ([][]FactorInner, *http.Response, error) { + return r.ApiService.EnrollFactorExecute(r) +} + +/* +EnrollFactor Method for EnrollFactor + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param userId Set to the id of the user. + @return ApiEnrollFactorRequest +*/ +func (a *DefaultApiService) EnrollFactor(ctx context.Context, userId int32) ApiEnrollFactorRequest { + return ApiEnrollFactorRequest{ + ApiService: a, + ctx: ctx, + userId: userId, + } +} + +// Execute executes the request +// @return [][]FactorInner +func (a *DefaultApiService) EnrollFactorExecute(r ApiEnrollFactorRequest) ([][]FactorInner, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue [][]FactorInner + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.EnrollFactor") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/mfa/users/{user_id}/registrations" + localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterToString(r.userId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return localVarReturnValue, nil, reportError("authorization is required and must be specified") + } + if r.enrollFactorRequest == nil { + return localVarReturnValue, nil, reportError("enrollFactorRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + // body params + localVarPostBody = r.enrollFactorRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGenerateMfaTokenRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + generateMfaTokenRequest *GenerateMfaTokenRequest +} + +func (r ApiGenerateMfaTokenRequest) Authorization(authorization string) ApiGenerateMfaTokenRequest { + r.authorization = &authorization + return r +} + +func (r ApiGenerateMfaTokenRequest) GenerateMfaTokenRequest(generateMfaTokenRequest GenerateMfaTokenRequest) ApiGenerateMfaTokenRequest { + r.generateMfaTokenRequest = &generateMfaTokenRequest + return r +} + +func (r ApiGenerateMfaTokenRequest) Execute() (*GenerateMfaToken200Response, *http.Response, error) { + return r.ApiService.GenerateMfaTokenExecute(r) +} + +/* +GenerateMfaToken Method for GenerateMfaToken + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGenerateMfaTokenRequest +*/ +func (a *DefaultApiService) GenerateMfaToken(ctx context.Context) ApiGenerateMfaTokenRequest { + return ApiGenerateMfaTokenRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return GenerateMfaToken200Response +func (a *DefaultApiService) GenerateMfaTokenExecute(r ApiGenerateMfaTokenRequest) (*GenerateMfaToken200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GenerateMfaToken200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GenerateMfaToken") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/mfs/users/{user_id}/mfa_token" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return localVarReturnValue, nil, reportError("authorization is required and must be specified") + } + if r.generateMfaTokenRequest == nil { + return localVarReturnValue, nil, reportError("generateMfaTokenRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + // body params + localVarPostBody = r.generateMfaTokenRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v GenerateMfaToken422Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGenerateSamlAssertionRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + generateSamlAssertionRequest *GenerateSamlAssertionRequest +} + +func (r ApiGenerateSamlAssertionRequest) Authorization(authorization string) ApiGenerateSamlAssertionRequest { + r.authorization = &authorization + return r +} + +func (r ApiGenerateSamlAssertionRequest) GenerateSamlAssertionRequest(generateSamlAssertionRequest GenerateSamlAssertionRequest) ApiGenerateSamlAssertionRequest { + r.generateSamlAssertionRequest = &generateSamlAssertionRequest + return r +} + +func (r ApiGenerateSamlAssertionRequest) Execute() (*http.Response, error) { + return r.ApiService.GenerateSamlAssertionExecute(r) +} + +/* +GenerateSamlAssertion Method for GenerateSamlAssertion + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGenerateSamlAssertionRequest +*/ +func (a *DefaultApiService) GenerateSamlAssertion(ctx context.Context) ApiGenerateSamlAssertionRequest { + return ApiGenerateSamlAssertionRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +func (a *DefaultApiService) GenerateSamlAssertionExecute(r ApiGenerateSamlAssertionRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GenerateSamlAssertion") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/saml_assertion" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return nil, reportError("authorization is required and must be specified") + } + if r.generateSamlAssertionRequest == nil { + return nil, reportError("generateSamlAssertionRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + // body params + localVarPostBody = r.generateSamlAssertionRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiGenerateTokenRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + generateTokenRequest *GenerateTokenRequest +} + +func (r ApiGenerateTokenRequest) Authorization(authorization string) ApiGenerateTokenRequest { + r.authorization = &authorization + return r +} + +func (r ApiGenerateTokenRequest) GenerateTokenRequest(generateTokenRequest GenerateTokenRequest) ApiGenerateTokenRequest { + r.generateTokenRequest = &generateTokenRequest + return r +} + +func (r ApiGenerateTokenRequest) Execute() (*GenerateToken200Response, *http.Response, error) { + return r.ApiService.GenerateTokenExecute(r) +} + +/* +GenerateToken Method for GenerateToken + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGenerateTokenRequest +*/ +func (a *DefaultApiService) GenerateToken(ctx context.Context) ApiGenerateTokenRequest { + return ApiGenerateTokenRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return GenerateToken200Response +func (a *DefaultApiService) GenerateTokenExecute(r ApiGenerateTokenRequest) (*GenerateToken200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GenerateToken200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GenerateToken") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/auth/oauth2/v2/token" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return localVarReturnValue, nil, reportError("authorization is required and must be specified") + } + if r.generateTokenRequest == nil { + return localVarReturnValue, nil, reportError("generateTokenRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + // body params + localVarPostBody = r.generateTokenRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v GenerateToken400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v GenerateToken400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v GenerateToken400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetAppRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + appId int32 +} + +func (r ApiGetAppRequest) Authorization(authorization string) ApiGetAppRequest { + r.authorization = &authorization + return r +} + +func (r ApiGetAppRequest) Execute() (*Schema, *http.Response, error) { + return r.ApiService.GetAppExecute(r) +} + +/* +GetApp Method for GetApp + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param appId + @return ApiGetAppRequest +*/ +func (a *DefaultApiService) GetApp(ctx context.Context, appId int32) ApiGetAppRequest { + return ApiGetAppRequest{ + ApiService: a, + ctx: ctx, + appId: appId, + } +} + +// Execute executes the request +// @return Schema +func (a *DefaultApiService) GetAppExecute(r ApiGetAppRequest) (*Schema, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Schema + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetApp") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/apps/{app_id}" + localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterToString(r.appId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return localVarReturnValue, nil, reportError("authorization is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetAuthorizationServerRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + id int32 +} + +func (r ApiGetAuthorizationServerRequest) Authorization(authorization string) ApiGetAuthorizationServerRequest { + r.authorization = &authorization + return r +} + +func (r ApiGetAuthorizationServerRequest) Execute() (*GetAuthorizationServer200Response, *http.Response, error) { + return r.ApiService.GetAuthorizationServerExecute(r) +} + +/* +GetAuthorizationServer Method for GetAuthorizationServer + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return ApiGetAuthorizationServerRequest +*/ +func (a *DefaultApiService) GetAuthorizationServer(ctx context.Context, id int32) ApiGetAuthorizationServerRequest { + return ApiGetAuthorizationServerRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// @return GetAuthorizationServer200Response +func (a *DefaultApiService) GetAuthorizationServerExecute(r ApiGetAuthorizationServerRequest) (*GetAuthorizationServer200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GetAuthorizationServer200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetAuthorizationServer") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/api_authorizations/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return localVarReturnValue, nil, reportError("authorization is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetAvailableFactorsRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + userId int32 +} + +func (r ApiGetAvailableFactorsRequest) Authorization(authorization string) ApiGetAvailableFactorsRequest { + r.authorization = &authorization + return r +} + +func (r ApiGetAvailableFactorsRequest) Execute() ([]GetAvailableFactors200ResponseInner, *http.Response, error) { + return r.ApiService.GetAvailableFactorsExecute(r) +} + +/* +GetAvailableFactors Method for GetAvailableFactors + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param userId Set to the id of the user. + @return ApiGetAvailableFactorsRequest +*/ +func (a *DefaultApiService) GetAvailableFactors(ctx context.Context, userId int32) ApiGetAvailableFactorsRequest { + return ApiGetAvailableFactorsRequest{ + ApiService: a, + ctx: ctx, + userId: userId, + } +} + +// Execute executes the request +// @return []GetAvailableFactors200ResponseInner +func (a *DefaultApiService) GetAvailableFactorsExecute(r ApiGetAvailableFactorsRequest) ([]GetAvailableFactors200ResponseInner, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []GetAvailableFactors200ResponseInner + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetAvailableFactors") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/mfa/users/{user_id}/factors" + localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterToString(r.userId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return localVarReturnValue, nil, reportError("authorization is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetClientAppsRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + id int32 +} + +func (r ApiGetClientAppsRequest) Authorization(authorization string) ApiGetClientAppsRequest { + r.authorization = &authorization + return r +} + +func (r ApiGetClientAppsRequest) Execute() ([]GetClientApps200ResponseInner, *http.Response, error) { + return r.ApiService.GetClientAppsExecute(r) +} + +/* +GetClientApps Method for GetClientApps + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return ApiGetClientAppsRequest +*/ +func (a *DefaultApiService) GetClientApps(ctx context.Context, id int32) ApiGetClientAppsRequest { + return ApiGetClientAppsRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// @return []GetClientApps200ResponseInner +func (a *DefaultApiService) GetClientAppsExecute(r ApiGetClientAppsRequest) ([]GetClientApps200ResponseInner, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []GetClientApps200ResponseInner + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetClientApps") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/api_authorizations/{id}/clients" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return localVarReturnValue, nil, reportError("authorization is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetEnrolledFactorsRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + userId int32 +} + +func (r ApiGetEnrolledFactorsRequest) Authorization(authorization string) ApiGetEnrolledFactorsRequest { + r.authorization = &authorization + return r +} + +func (r ApiGetEnrolledFactorsRequest) Execute() ([]Device, *http.Response, error) { + return r.ApiService.GetEnrolledFactorsExecute(r) +} + +/* +GetEnrolledFactors Method for GetEnrolledFactors + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param userId Set to the id of the user. + @return ApiGetEnrolledFactorsRequest +*/ +func (a *DefaultApiService) GetEnrolledFactors(ctx context.Context, userId int32) ApiGetEnrolledFactorsRequest { + return ApiGetEnrolledFactorsRequest{ + ApiService: a, + ctx: ctx, + userId: userId, + } +} + +// Execute executes the request +// @return []Device +func (a *DefaultApiService) GetEnrolledFactorsExecute(r ApiGetEnrolledFactorsRequest) ([]Device, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []Device + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetEnrolledFactors") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/mfa/users/{user_id}/devices" + localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterToString(r.userId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return localVarReturnValue, nil, reportError("authorization is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetEnvironmentVariableRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + envvarId string +} + +func (r ApiGetEnvironmentVariableRequest) Authorization(authorization string) ApiGetEnvironmentVariableRequest { + r.authorization = &authorization + return r +} + +func (r ApiGetEnvironmentVariableRequest) Execute() (*Envvar, *http.Response, error) { + return r.ApiService.GetEnvironmentVariableExecute(r) +} + +/* +GetEnvironmentVariable Method for GetEnvironmentVariable + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param envvarId Set to the id of the Hook Environment Variable that you want to fetch. + @return ApiGetEnvironmentVariableRequest +*/ +func (a *DefaultApiService) GetEnvironmentVariable(ctx context.Context, envvarId string) ApiGetEnvironmentVariableRequest { + return ApiGetEnvironmentVariableRequest{ + ApiService: a, + ctx: ctx, + envvarId: envvarId, + } +} + +// Execute executes the request +// @return Envvar +func (a *DefaultApiService) GetEnvironmentVariableExecute(r ApiGetEnvironmentVariableRequest) (*Envvar, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Envvar + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetEnvironmentVariable") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/hooks/envs/{envvar_id}" + localVarPath = strings.Replace(localVarPath, "{"+"envvar_id"+"}", url.PathEscape(parameterToString(r.envvarId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return localVarReturnValue, nil, reportError("authorization is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetHookRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + hookId string +} + +func (r ApiGetHookRequest) Authorization(authorization string) ApiGetHookRequest { + r.authorization = &authorization + return r +} + +func (r ApiGetHookRequest) Execute() (*Hook, *http.Response, error) { + return r.ApiService.GetHookExecute(r) +} + +/* +GetHook Method for GetHook + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param hookId Set to the id of the Hook that you want to return. + @return ApiGetHookRequest +*/ +func (a *DefaultApiService) GetHook(ctx context.Context, hookId string) ApiGetHookRequest { + return ApiGetHookRequest{ + ApiService: a, + ctx: ctx, + hookId: hookId, + } +} + +// Execute executes the request +// @return Hook +func (a *DefaultApiService) GetHookExecute(r ApiGetHookRequest) (*Hook, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Hook + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetHook") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/hooks/{hook_id}" + localVarPath = strings.Replace(localVarPath, "{"+"hook_id"+"}", url.PathEscape(parameterToString(r.hookId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return localVarReturnValue, nil, reportError("authorization is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetLogsRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + hookId string + limit *int32 + page *int32 + cursor *string + requestId *string + correlationId *string +} + +func (r ApiGetLogsRequest) Authorization(authorization string) ApiGetLogsRequest { + r.authorization = &authorization + return r +} + +// The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. +func (r ApiGetLogsRequest) Limit(limit int32) ApiGetLogsRequest { + r.limit = &limit + return r +} + +// The page number of results to return. +func (r ApiGetLogsRequest) Page(page int32) ApiGetLogsRequest { + r.page = &page + return r +} + +// Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. +func (r ApiGetLogsRequest) Cursor(cursor string) ApiGetLogsRequest { + r.cursor = &cursor + return r +} + +// Returns logs that contain this request_id. +func (r ApiGetLogsRequest) RequestId(requestId string) ApiGetLogsRequest { + r.requestId = &requestId + return r +} + +// Returns logs that contain this correlation_id. +func (r ApiGetLogsRequest) CorrelationId(correlationId string) ApiGetLogsRequest { + r.correlationId = &correlationId + return r +} + +func (r ApiGetLogsRequest) Execute() ([]Log, *http.Response, error) { + return r.ApiService.GetLogsExecute(r) +} + +/* +GetLogs Method for GetLogs + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param hookId Set to the id of the Hook that you want to return. + @return ApiGetLogsRequest +*/ +func (a *DefaultApiService) GetLogs(ctx context.Context, hookId string) ApiGetLogsRequest { + return ApiGetLogsRequest{ + ApiService: a, + ctx: ctx, + hookId: hookId, + } +} + +// Execute executes the request +// @return []Log +func (a *DefaultApiService) GetLogsExecute(r ApiGetLogsRequest) ([]Log, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []Log + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetLogs") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/hooks/{hook_id}/logs" + localVarPath = strings.Replace(localVarPath, "{"+"hook_id"+"}", url.PathEscape(parameterToString(r.hookId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return localVarReturnValue, nil, reportError("authorization is required and must be specified") + } + + if r.limit != nil { + localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) + } + if r.page != nil { + localVarQueryParams.Add("page", parameterToString(*r.page, "")) + } + if r.cursor != nil { + localVarQueryParams.Add("cursor", parameterToString(*r.cursor, "")) + } + if r.requestId != nil { + localVarQueryParams.Add("request_id", parameterToString(*r.requestId, "")) + } + if r.correlationId != nil { + localVarQueryParams.Add("correlation_id", parameterToString(*r.correlationId, "")) + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetMappingRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + mappingId int32 +} + +func (r ApiGetMappingRequest) Authorization(authorization string) ApiGetMappingRequest { + r.authorization = &authorization + return r +} + +func (r ApiGetMappingRequest) Execute() (*Mapping, *http.Response, error) { + return r.ApiService.GetMappingExecute(r) +} + +/* +GetMapping Method for GetMapping + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param mappingId The id of the user mapping to locate. + @return ApiGetMappingRequest +*/ +func (a *DefaultApiService) GetMapping(ctx context.Context, mappingId int32) ApiGetMappingRequest { + return ApiGetMappingRequest{ + ApiService: a, + ctx: ctx, + mappingId: mappingId, + } +} + +// Execute executes the request +// @return Mapping +func (a *DefaultApiService) GetMappingExecute(r ApiGetMappingRequest) (*Mapping, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Mapping + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetMapping") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/mappings/{mapping_id}" + localVarPath = strings.Replace(localVarPath, "{"+"mapping_id"+"}", url.PathEscape(parameterToString(r.mappingId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return localVarReturnValue, nil, reportError("authorization is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetRateLimitRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string +} + +func (r ApiGetRateLimitRequest) Authorization(authorization string) ApiGetRateLimitRequest { + r.authorization = &authorization + return r +} + +func (r ApiGetRateLimitRequest) Execute() (*GetRateLimit200Response, *http.Response, error) { + return r.ApiService.GetRateLimitExecute(r) +} + +/* +GetRateLimit Method for GetRateLimit + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetRateLimitRequest +*/ +func (a *DefaultApiService) GetRateLimit(ctx context.Context) ApiGetRateLimitRequest { + return ApiGetRateLimitRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return GetRateLimit200Response +func (a *DefaultApiService) GetRateLimitExecute(r ApiGetRateLimitRequest) (*GetRateLimit200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GetRateLimit200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetRateLimit") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/auth/rate_limit" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return localVarReturnValue, nil, reportError("authorization is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v GenerateToken400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v GenerateToken400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v GenerateToken400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetRiskRuleRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + riskRuleId string +} + +func (r ApiGetRiskRuleRequest) Authorization(authorization string) ApiGetRiskRuleRequest { + r.authorization = &authorization + return r +} + +func (r ApiGetRiskRuleRequest) Execute() (*http.Response, error) { + return r.ApiService.GetRiskRuleExecute(r) +} + +/* +GetRiskRule Method for GetRiskRule + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param riskRuleId + @return ApiGetRiskRuleRequest +*/ +func (a *DefaultApiService) GetRiskRule(ctx context.Context, riskRuleId string) ApiGetRiskRuleRequest { + return ApiGetRiskRuleRequest{ + ApiService: a, + ctx: ctx, + riskRuleId: riskRuleId, + } +} + +// Execute executes the request +func (a *DefaultApiService) GetRiskRuleExecute(r ApiGetRiskRuleRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetRiskRule") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/risk/rules/{risk_rule_id}" + localVarPath = strings.Replace(localVarPath, "{"+"risk_rule_id"+"}", url.PathEscape(parameterToString(r.riskRuleId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return nil, reportError("authorization is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiGetRiskScoreRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + getRiskScoreRequest *GetRiskScoreRequest +} + +func (r ApiGetRiskScoreRequest) Authorization(authorization string) ApiGetRiskScoreRequest { + r.authorization = &authorization + return r +} + +func (r ApiGetRiskScoreRequest) GetRiskScoreRequest(getRiskScoreRequest GetRiskScoreRequest) ApiGetRiskScoreRequest { + r.getRiskScoreRequest = &getRiskScoreRequest + return r +} + +func (r ApiGetRiskScoreRequest) Execute() (*GetRiskScore200Response, *http.Response, error) { + return r.ApiService.GetRiskScoreExecute(r) +} + +/* +GetRiskScore Method for GetRiskScore + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetRiskScoreRequest +*/ +func (a *DefaultApiService) GetRiskScore(ctx context.Context) ApiGetRiskScoreRequest { + return ApiGetRiskScoreRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return GetRiskScore200Response +func (a *DefaultApiService) GetRiskScoreExecute(r ApiGetRiskScoreRequest) (*GetRiskScore200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GetRiskScore200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetRiskScore") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/risk/verify" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return localVarReturnValue, nil, reportError("authorization is required and must be specified") + } + if r.getRiskScoreRequest == nil { + return localVarReturnValue, nil, reportError("getRiskScoreRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + // body params + localVarPostBody = r.getRiskScoreRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v GetRiskScore400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetRoleRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + roleId int32 +} + +func (r ApiGetRoleRequest) Authorization(authorization string) ApiGetRoleRequest { + r.authorization = &authorization + return r +} + +func (r ApiGetRoleRequest) Execute() (*Role, *http.Response, error) { + return r.ApiService.GetRoleExecute(r) +} + +/* +GetRole Method for GetRole + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param roleId Set to the id of the role you want to return. + @return ApiGetRoleRequest +*/ +func (a *DefaultApiService) GetRole(ctx context.Context, roleId int32) ApiGetRoleRequest { + return ApiGetRoleRequest{ + ApiService: a, + ctx: ctx, + roleId: roleId, + } +} + +// Execute executes the request +// @return Role +func (a *DefaultApiService) GetRoleExecute(r ApiGetRoleRequest) (*Role, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Role + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetRole") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/roles/{role_id}" + localVarPath = strings.Replace(localVarPath, "{"+"role_id"+"}", url.PathEscape(parameterToString(r.roleId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return localVarReturnValue, nil, reportError("authorization is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetRoleAdminsRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + roleId int32 + limit *int32 + page *int32 + cursor *string + name *string + includeUnassigned *bool +} + +func (r ApiGetRoleAdminsRequest) Authorization(authorization string) ApiGetRoleAdminsRequest { + r.authorization = &authorization + return r +} + +// The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. +func (r ApiGetRoleAdminsRequest) Limit(limit int32) ApiGetRoleAdminsRequest { + r.limit = &limit + return r +} + +// The page number of results to return. +func (r ApiGetRoleAdminsRequest) Page(page int32) ApiGetRoleAdminsRequest { + r.page = &page + return r +} + +// Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. +func (r ApiGetRoleAdminsRequest) Cursor(cursor string) ApiGetRoleAdminsRequest { + r.cursor = &cursor + return r +} + +// Allows you to filter on first name, last name, username, and email address. +func (r ApiGetRoleAdminsRequest) Name(name string) ApiGetRoleAdminsRequest { + r.name = &name + return r +} + +// Optional. Defaults to false. Include users that aren’t assigned to the role. +func (r ApiGetRoleAdminsRequest) IncludeUnassigned(includeUnassigned bool) ApiGetRoleAdminsRequest { + r.includeUnassigned = &includeUnassigned + return r +} + +func (r ApiGetRoleAdminsRequest) Execute() ([]Schema1, *http.Response, error) { + return r.ApiService.GetRoleAdminsExecute(r) +} + +/* +GetRoleAdmins Method for GetRoleAdmins + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param roleId Set to the id of the role you want to return. + @return ApiGetRoleAdminsRequest +*/ +func (a *DefaultApiService) GetRoleAdmins(ctx context.Context, roleId int32) ApiGetRoleAdminsRequest { + return ApiGetRoleAdminsRequest{ + ApiService: a, + ctx: ctx, + roleId: roleId, + } +} + +// Execute executes the request +// @return []Schema1 +func (a *DefaultApiService) GetRoleAdminsExecute(r ApiGetRoleAdminsRequest) ([]Schema1, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []Schema1 + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetRoleAdmins") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/roles/{role_id}/admins" + localVarPath = strings.Replace(localVarPath, "{"+"role_id"+"}", url.PathEscape(parameterToString(r.roleId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return localVarReturnValue, nil, reportError("authorization is required and must be specified") + } + + if r.limit != nil { + localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) + } + if r.page != nil { + localVarQueryParams.Add("page", parameterToString(*r.page, "")) + } + if r.cursor != nil { + localVarQueryParams.Add("cursor", parameterToString(*r.cursor, "")) + } + if r.name != nil { + localVarQueryParams.Add("name", parameterToString(*r.name, "")) + } + if r.includeUnassigned != nil { + localVarQueryParams.Add("include_unassigned", parameterToString(*r.includeUnassigned, "")) + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"applcation/json", "application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetRoleAppsRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + roleId int32 + limit *int32 + page *int32 + cursor *string + assigned *bool +} + +func (r ApiGetRoleAppsRequest) Authorization(authorization string) ApiGetRoleAppsRequest { + r.authorization = &authorization + return r +} + +// The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. +func (r ApiGetRoleAppsRequest) Limit(limit int32) ApiGetRoleAppsRequest { + r.limit = &limit + return r +} + +// The page number of results to return. +func (r ApiGetRoleAppsRequest) Page(page int32) ApiGetRoleAppsRequest { + r.page = &page + return r +} + +// Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. +func (r ApiGetRoleAppsRequest) Cursor(cursor string) ApiGetRoleAppsRequest { + r.cursor = &cursor + return r +} + +// Optional. Defaults to true. Returns all apps not yet assigned to the role. +func (r ApiGetRoleAppsRequest) Assigned(assigned bool) ApiGetRoleAppsRequest { + r.assigned = &assigned + return r +} + +func (r ApiGetRoleAppsRequest) Execute() ([]Schema, *http.Response, error) { + return r.ApiService.GetRoleAppsExecute(r) +} + +/* +GetRoleApps Method for GetRoleApps + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param roleId Set to the id of the role you want to return. + @return ApiGetRoleAppsRequest +*/ +func (a *DefaultApiService) GetRoleApps(ctx context.Context, roleId int32) ApiGetRoleAppsRequest { + return ApiGetRoleAppsRequest{ + ApiService: a, + ctx: ctx, + roleId: roleId, + } +} + +// Execute executes the request +// @return []Schema +func (a *DefaultApiService) GetRoleAppsExecute(r ApiGetRoleAppsRequest) ([]Schema, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []Schema + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetRoleApps") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/roles/{role_id}/apps" + localVarPath = strings.Replace(localVarPath, "{"+"role_id"+"}", url.PathEscape(parameterToString(r.roleId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return localVarReturnValue, nil, reportError("authorization is required and must be specified") + } + + if r.limit != nil { + localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) + } + if r.page != nil { + localVarQueryParams.Add("page", parameterToString(*r.page, "")) + } + if r.cursor != nil { + localVarQueryParams.Add("cursor", parameterToString(*r.cursor, "")) + } + if r.assigned != nil { + localVarQueryParams.Add("assigned", parameterToString(*r.assigned, "")) + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"applcation/json", "application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetRoleUsersRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + roleId int32 + limit *int32 + page *int32 + cursor *string + name *string + includeUnassigned *bool +} + +func (r ApiGetRoleUsersRequest) Authorization(authorization string) ApiGetRoleUsersRequest { + r.authorization = &authorization + return r +} + +// The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. +func (r ApiGetRoleUsersRequest) Limit(limit int32) ApiGetRoleUsersRequest { + r.limit = &limit + return r +} + +// The page number of results to return. +func (r ApiGetRoleUsersRequest) Page(page int32) ApiGetRoleUsersRequest { + r.page = &page + return r +} + +// Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. +func (r ApiGetRoleUsersRequest) Cursor(cursor string) ApiGetRoleUsersRequest { + r.cursor = &cursor + return r +} + +// Allows you to filter on first name, last name, username, and email address. +func (r ApiGetRoleUsersRequest) Name(name string) ApiGetRoleUsersRequest { + r.name = &name + return r +} + +// Optional. Defaults to false. Include users that aren’t assigned to the role. +func (r ApiGetRoleUsersRequest) IncludeUnassigned(includeUnassigned bool) ApiGetRoleUsersRequest { + r.includeUnassigned = &includeUnassigned + return r +} + +func (r ApiGetRoleUsersRequest) Execute() ([]Schema1, *http.Response, error) { + return r.ApiService.GetRoleUsersExecute(r) +} + +/* +GetRoleUsers Method for GetRoleUsers + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param roleId Set to the id of the role you want to return. + @return ApiGetRoleUsersRequest +*/ +func (a *DefaultApiService) GetRoleUsers(ctx context.Context, roleId int32) ApiGetRoleUsersRequest { + return ApiGetRoleUsersRequest{ + ApiService: a, + ctx: ctx, + roleId: roleId, + } +} + +// Execute executes the request +// @return []Schema1 +func (a *DefaultApiService) GetRoleUsersExecute(r ApiGetRoleUsersRequest) ([]Schema1, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []Schema1 + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetRoleUsers") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/roles/{role_id}/users" + localVarPath = strings.Replace(localVarPath, "{"+"role_id"+"}", url.PathEscape(parameterToString(r.roleId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return localVarReturnValue, nil, reportError("authorization is required and must be specified") + } + + if r.limit != nil { + localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) + } + if r.page != nil { + localVarQueryParams.Add("page", parameterToString(*r.page, "")) + } + if r.cursor != nil { + localVarQueryParams.Add("cursor", parameterToString(*r.cursor, "")) + } + if r.name != nil { + localVarQueryParams.Add("name", parameterToString(*r.name, "")) + } + if r.includeUnassigned != nil { + localVarQueryParams.Add("include_unassigned", parameterToString(*r.includeUnassigned, "")) + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"applcation/json", "application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetRuleRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + appId int32 + ruleId int32 +} + +func (r ApiGetRuleRequest) Authorization(authorization string) ApiGetRuleRequest { + r.authorization = &authorization + return r +} + +func (r ApiGetRuleRequest) Execute() (*Rule, *http.Response, error) { + return r.ApiService.GetRuleExecute(r) +} + +/* +GetRule Method for GetRule + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param appId + @param ruleId The id of the app rule to locate. + @return ApiGetRuleRequest +*/ +func (a *DefaultApiService) GetRule(ctx context.Context, appId int32, ruleId int32) ApiGetRuleRequest { + return ApiGetRuleRequest{ + ApiService: a, + ctx: ctx, + appId: appId, + ruleId: ruleId, + } +} + +// Execute executes the request +// @return Rule +func (a *DefaultApiService) GetRuleExecute(r ApiGetRuleRequest) (*Rule, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Rule + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetRule") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/apps/{app_id}/rules/{rule_id}" + localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterToString(r.appId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"rule_id"+"}", url.PathEscape(parameterToString(r.ruleId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return localVarReturnValue, nil, reportError("authorization is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetScoreInsightsRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + before *string + after *string +} + +func (r ApiGetScoreInsightsRequest) Authorization(authorization string) ApiGetScoreInsightsRequest { + r.authorization = &authorization + return r +} + +// Optional ISO8601 formatted date string. Defaults to current date. Maximum date is 90 days ago. +func (r ApiGetScoreInsightsRequest) Before(before string) ApiGetScoreInsightsRequest { + r.before = &before + return r +} + +// Optional ISO8601 formatted date string. Defaults to 30 days ago. Maximum date is 90 days ago. +func (r ApiGetScoreInsightsRequest) After(after string) ApiGetScoreInsightsRequest { + r.after = &after + return r +} + +func (r ApiGetScoreInsightsRequest) Execute() (*GetScoreInsights200Response, *http.Response, error) { + return r.ApiService.GetScoreInsightsExecute(r) +} + +/* +GetScoreInsights Method for GetScoreInsights + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetScoreInsightsRequest +*/ +func (a *DefaultApiService) GetScoreInsights(ctx context.Context) ApiGetScoreInsightsRequest { + return ApiGetScoreInsightsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return GetScoreInsights200Response +func (a *DefaultApiService) GetScoreInsightsExecute(r ApiGetScoreInsightsRequest) (*GetScoreInsights200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GetScoreInsights200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetScoreInsights") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/risk/scores" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return localVarReturnValue, nil, reportError("authorization is required and must be specified") + } + + if r.before != nil { + localVarQueryParams.Add("before", parameterToString(*r.before, "")) + } + if r.after != nil { + localVarQueryParams.Add("after", parameterToString(*r.after, "")) + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetUserRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + userId int32 +} + +func (r ApiGetUserRequest) Authorization(authorization string) ApiGetUserRequest { + r.authorization = &authorization + return r +} + +func (r ApiGetUserRequest) Execute() (*User, *http.Response, error) { + return r.ApiService.GetUserExecute(r) +} + +/* +GetUser Method for GetUser + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param userId Set to the id of the user that you want to return. + @return ApiGetUserRequest +*/ +func (a *DefaultApiService) GetUser(ctx context.Context, userId int32) ApiGetUserRequest { + return ApiGetUserRequest{ + ApiService: a, + ctx: ctx, + userId: userId, + } +} + +// Execute executes the request +// @return User +func (a *DefaultApiService) GetUserExecute(r ApiGetUserRequest) (*User, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *User + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetUser") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/users/{user_id}" + localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterToString(r.userId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return localVarReturnValue, nil, reportError("authorization is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetUserAppsRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + userId int32 + ignoreVisibility *bool +} + +func (r ApiGetUserAppsRequest) Authorization(authorization string) ApiGetUserAppsRequest { + r.authorization = &authorization + return r +} + +// Defaults to `false`. When `true` will show all apps that are assigned to a user regardless of their portal visibility setting. +func (r ApiGetUserAppsRequest) IgnoreVisibility(ignoreVisibility bool) ApiGetUserAppsRequest { + r.ignoreVisibility = &ignoreVisibility + return r +} + +func (r ApiGetUserAppsRequest) Execute() ([]GetUserApps200ResponseInner, *http.Response, error) { + return r.ApiService.GetUserAppsExecute(r) +} + +/* +GetUserApps Method for GetUserApps + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param userId Set to the id of the user that you want to return. + @return ApiGetUserAppsRequest +*/ +func (a *DefaultApiService) GetUserApps(ctx context.Context, userId int32) ApiGetUserAppsRequest { + return ApiGetUserAppsRequest{ + ApiService: a, + ctx: ctx, + userId: userId, + } +} + +// Execute executes the request +// @return []GetUserApps200ResponseInner +func (a *DefaultApiService) GetUserAppsExecute(r ApiGetUserAppsRequest) ([]GetUserApps200ResponseInner, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []GetUserApps200ResponseInner + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetUserApps") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/users/{user_id}/apps" + localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterToString(r.userId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return localVarReturnValue, nil, reportError("authorization is required and must be specified") + } + + if r.ignoreVisibility != nil { + localVarQueryParams.Add("ignore_visibility", parameterToString(*r.ignoreVisibility, "")) + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListAccessTokenClaimsRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + id int32 +} + +func (r ApiListAccessTokenClaimsRequest) Authorization(authorization string) ApiListAccessTokenClaimsRequest { + r.authorization = &authorization + return r +} + +func (r ApiListAccessTokenClaimsRequest) Execute() ([]ListAccessTokenClaims200ResponseInner, *http.Response, error) { + return r.ApiService.ListAccessTokenClaimsExecute(r) +} + +/* +ListAccessTokenClaims Method for ListAccessTokenClaims + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return ApiListAccessTokenClaimsRequest +*/ +func (a *DefaultApiService) ListAccessTokenClaims(ctx context.Context, id int32) ApiListAccessTokenClaimsRequest { + return ApiListAccessTokenClaimsRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// @return []ListAccessTokenClaims200ResponseInner +func (a *DefaultApiService) ListAccessTokenClaimsExecute(r ApiListAccessTokenClaimsRequest) ([]ListAccessTokenClaims200ResponseInner, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []ListAccessTokenClaims200ResponseInner + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListAccessTokenClaims") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/api_authorizations/{id}/claims" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return localVarReturnValue, nil, reportError("authorization is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListActionValuesRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + appId int32 + actionValue string +} + +func (r ApiListActionValuesRequest) Authorization(authorization string) ApiListActionValuesRequest { + r.authorization = &authorization + return r +} + +func (r ApiListActionValuesRequest) Execute() ([]ListConditionValues200ResponseInner, *http.Response, error) { + return r.ApiService.ListActionValuesExecute(r) +} + +/* +ListActionValues Method for ListActionValues + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param appId + @param actionValue The value for the selected action. + @return ApiListActionValuesRequest +*/ +func (a *DefaultApiService) ListActionValues(ctx context.Context, appId int32, actionValue string) ApiListActionValuesRequest { + return ApiListActionValuesRequest{ + ApiService: a, + ctx: ctx, + appId: appId, + actionValue: actionValue, + } +} + +// Execute executes the request +// @return []ListConditionValues200ResponseInner +func (a *DefaultApiService) ListActionValuesExecute(r ApiListActionValuesRequest) ([]ListConditionValues200ResponseInner, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []ListConditionValues200ResponseInner + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListActionValues") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/apps/{app_id}/rules/actions/{actuion_value}/values" + localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterToString(r.appId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"action_value"+"}", url.PathEscape(parameterToString(r.actionValue, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return localVarReturnValue, nil, reportError("authorization is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListActionsRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + appId int32 +} + +func (r ApiListActionsRequest) Authorization(authorization string) ApiListActionsRequest { + r.authorization = &authorization + return r +} + +func (r ApiListActionsRequest) Execute() ([]ListActions200ResponseInner, *http.Response, error) { + return r.ApiService.ListActionsExecute(r) +} + +/* +ListActions Method for ListActions + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param appId + @return ApiListActionsRequest +*/ +func (a *DefaultApiService) ListActions(ctx context.Context, appId int32) ApiListActionsRequest { + return ApiListActionsRequest{ + ApiService: a, + ctx: ctx, + appId: appId, + } +} + +// Execute executes the request +// @return []ListActions200ResponseInner +func (a *DefaultApiService) ListActionsExecute(r ApiListActionsRequest) ([]ListActions200ResponseInner, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []ListActions200ResponseInner + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListActions") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/apps/{app_id}/rules/actions" + localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterToString(r.appId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return localVarReturnValue, nil, reportError("authorization is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListAppUsersRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + appId int32 + limit *int32 + page *int32 + cursor *string +} + +func (r ApiListAppUsersRequest) Authorization(authorization string) ApiListAppUsersRequest { + r.authorization = &authorization + return r +} + +// The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. +func (r ApiListAppUsersRequest) Limit(limit int32) ApiListAppUsersRequest { + r.limit = &limit + return r +} + +// The page number of results to return. +func (r ApiListAppUsersRequest) Page(page int32) ApiListAppUsersRequest { + r.page = &page + return r +} + +// Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. +func (r ApiListAppUsersRequest) Cursor(cursor string) ApiListAppUsersRequest { + r.cursor = &cursor + return r +} + +func (r ApiListAppUsersRequest) Execute() ([]ListAppUsers200ResponseInner, *http.Response, error) { + return r.ApiService.ListAppUsersExecute(r) +} + +/* +ListAppUsers Method for ListAppUsers + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param appId + @return ApiListAppUsersRequest +*/ +func (a *DefaultApiService) ListAppUsers(ctx context.Context, appId int32) ApiListAppUsersRequest { + return ApiListAppUsersRequest{ + ApiService: a, + ctx: ctx, + appId: appId, + } +} + +// Execute executes the request +// @return []ListAppUsers200ResponseInner +func (a *DefaultApiService) ListAppUsersExecute(r ApiListAppUsersRequest) ([]ListAppUsers200ResponseInner, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []ListAppUsers200ResponseInner + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListAppUsers") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/apps/{app_id}/users" + localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterToString(r.appId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return localVarReturnValue, nil, reportError("authorization is required and must be specified") + } + + if r.limit != nil { + localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) + } + if r.page != nil { + localVarQueryParams.Add("page", parameterToString(*r.page, "")) + } + if r.cursor != nil { + localVarQueryParams.Add("cursor", parameterToString(*r.cursor, "")) + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListAppsRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + limit *int32 + page *int32 + cursor *string + name *string + connectorId *int32 + authMethod *AuthMethod +} + +func (r ApiListAppsRequest) Authorization(authorization string) ApiListAppsRequest { + r.authorization = &authorization + return r +} + +// The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. +func (r ApiListAppsRequest) Limit(limit int32) ApiListAppsRequest { + r.limit = &limit + return r +} + +// The page number of results to return. +func (r ApiListAppsRequest) Page(page int32) ApiListAppsRequest { + r.page = &page + return r +} + +// Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. +func (r ApiListAppsRequest) Cursor(cursor string) ApiListAppsRequest { + r.cursor = &cursor + return r +} + +// The name or partial name of the app to search for. When using a partial name you must append a wildcard `*` +func (r ApiListAppsRequest) Name(name string) ApiListAppsRequest { + r.name = &name + return r +} + +// Returns all apps based off a specific connector. See List Connectors for a complete list of Connector IDs. +func (r ApiListAppsRequest) ConnectorId(connectorId int32) ApiListAppsRequest { + r.connectorId = &connectorId + return r +} + +// Returns all apps based of a given type. +func (r ApiListAppsRequest) AuthMethod(authMethod AuthMethod) ApiListAppsRequest { + r.authMethod = &authMethod + return r +} + +func (r ApiListAppsRequest) Execute() ([]Schema, *http.Response, error) { + return r.ApiService.ListAppsExecute(r) +} + +/* +ListApps Method for ListApps + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListAppsRequest +*/ +func (a *DefaultApiService) ListApps(ctx context.Context) ApiListAppsRequest { + return ApiListAppsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return []Schema +func (a *DefaultApiService) ListAppsExecute(r ApiListAppsRequest) ([]Schema, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []Schema + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListApps") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/apps" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return localVarReturnValue, nil, reportError("authorization is required and must be specified") + } + + if r.limit != nil { + localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) + } + if r.page != nil { + localVarQueryParams.Add("page", parameterToString(*r.page, "")) + } + if r.cursor != nil { + localVarQueryParams.Add("cursor", parameterToString(*r.cursor, "")) + } + if r.name != nil { + localVarQueryParams.Add("name", parameterToString(*r.name, "")) + } + if r.connectorId != nil { + localVarQueryParams.Add("connector_id", parameterToString(*r.connectorId, "")) + } + if r.authMethod != nil { + localVarQueryParams.Add("auth_method", parameterToString(*r.authMethod, "")) + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListAuthorizationServersRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string +} + +func (r ApiListAuthorizationServersRequest) Authorization(authorization string) ApiListAuthorizationServersRequest { + r.authorization = &authorization + return r +} + +func (r ApiListAuthorizationServersRequest) Execute() ([]ListAuthorizationServers200ResponseInner, *http.Response, error) { + return r.ApiService.ListAuthorizationServersExecute(r) +} + +/* +ListAuthorizationServers Method for ListAuthorizationServers + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListAuthorizationServersRequest +*/ +func (a *DefaultApiService) ListAuthorizationServers(ctx context.Context) ApiListAuthorizationServersRequest { + return ApiListAuthorizationServersRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return []ListAuthorizationServers200ResponseInner +func (a *DefaultApiService) ListAuthorizationServersExecute(r ApiListAuthorizationServersRequest) ([]ListAuthorizationServers200ResponseInner, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []ListAuthorizationServers200ResponseInner + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListAuthorizationServers") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/api_authorizations" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return localVarReturnValue, nil, reportError("authorization is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListConditionOperatorsRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + appId int32 + conditionValue string +} + +func (r ApiListConditionOperatorsRequest) Authorization(authorization string) ApiListConditionOperatorsRequest { + r.authorization = &authorization + return r +} + +func (r ApiListConditionOperatorsRequest) Execute() ([]ListConditionOperators200ResponseInner, *http.Response, error) { + return r.ApiService.ListConditionOperatorsExecute(r) +} + +/* +ListConditionOperators Method for ListConditionOperators + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param appId + @param conditionValue The value for the selected condition. + @return ApiListConditionOperatorsRequest +*/ +func (a *DefaultApiService) ListConditionOperators(ctx context.Context, appId int32, conditionValue string) ApiListConditionOperatorsRequest { + return ApiListConditionOperatorsRequest{ + ApiService: a, + ctx: ctx, + appId: appId, + conditionValue: conditionValue, + } +} + +// Execute executes the request +// @return []ListConditionOperators200ResponseInner +func (a *DefaultApiService) ListConditionOperatorsExecute(r ApiListConditionOperatorsRequest) ([]ListConditionOperators200ResponseInner, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []ListConditionOperators200ResponseInner + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListConditionOperators") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/apps/{app_id}/rules/conditions/{condition_value}/operators" + localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterToString(r.appId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"condition_value"+"}", url.PathEscape(parameterToString(r.conditionValue, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return localVarReturnValue, nil, reportError("authorization is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListConditionValuesRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + appId int32 + conditionValue string +} + +func (r ApiListConditionValuesRequest) Authorization(authorization string) ApiListConditionValuesRequest { + r.authorization = &authorization + return r +} + +func (r ApiListConditionValuesRequest) Execute() ([]ListConditionValues200ResponseInner, *http.Response, error) { + return r.ApiService.ListConditionValuesExecute(r) +} + +/* +ListConditionValues Method for ListConditionValues + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param appId + @param conditionValue The value for the selected condition. + @return ApiListConditionValuesRequest +*/ +func (a *DefaultApiService) ListConditionValues(ctx context.Context, appId int32, conditionValue string) ApiListConditionValuesRequest { + return ApiListConditionValuesRequest{ + ApiService: a, + ctx: ctx, + appId: appId, + conditionValue: conditionValue, + } +} + +// Execute executes the request +// @return []ListConditionValues200ResponseInner +func (a *DefaultApiService) ListConditionValuesExecute(r ApiListConditionValuesRequest) ([]ListConditionValues200ResponseInner, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []ListConditionValues200ResponseInner + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListConditionValues") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/apps/{app_id}/rules/conditions/{condition_value}/values" + localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterToString(r.appId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"condition_value"+"}", url.PathEscape(parameterToString(r.conditionValue, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return localVarReturnValue, nil, reportError("authorization is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListConditionsRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + appId int32 +} + +func (r ApiListConditionsRequest) Authorization(authorization string) ApiListConditionsRequest { + r.authorization = &authorization + return r +} + +func (r ApiListConditionsRequest) Execute() ([]ListConditions200ResponseInner, *http.Response, error) { + return r.ApiService.ListConditionsExecute(r) +} + +/* +ListConditions Method for ListConditions + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param appId + @return ApiListConditionsRequest +*/ +func (a *DefaultApiService) ListConditions(ctx context.Context, appId int32) ApiListConditionsRequest { + return ApiListConditionsRequest{ + ApiService: a, + ctx: ctx, + appId: appId, + } +} + +// Execute executes the request +// @return []ListConditions200ResponseInner +func (a *DefaultApiService) ListConditionsExecute(r ApiListConditionsRequest) ([]ListConditions200ResponseInner, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []ListConditions200ResponseInner + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListConditions") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/apps/{app_id}/rules/conditions" + localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterToString(r.appId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return localVarReturnValue, nil, reportError("authorization is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListConnectorsRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + limit *int32 + page *int32 + cursor *string + name *string + authMethod *AuthMethod +} + +func (r ApiListConnectorsRequest) Authorization(authorization string) ApiListConnectorsRequest { + r.authorization = &authorization + return r +} + +// The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. +func (r ApiListConnectorsRequest) Limit(limit int32) ApiListConnectorsRequest { + r.limit = &limit + return r +} + +// The page number of results to return. +func (r ApiListConnectorsRequest) Page(page int32) ApiListConnectorsRequest { + r.page = &page + return r +} + +// Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. +func (r ApiListConnectorsRequest) Cursor(cursor string) ApiListConnectorsRequest { + r.cursor = &cursor + return r +} + +// The name or partial name of the connector to search for. When using a partial name you must append a wildcard `*` +func (r ApiListConnectorsRequest) Name(name string) ApiListConnectorsRequest { + r.name = &name + return r +} + +// Returns all connectors of a given type. +func (r ApiListConnectorsRequest) AuthMethod(authMethod AuthMethod) ApiListConnectorsRequest { + r.authMethod = &authMethod + return r +} + +func (r ApiListConnectorsRequest) Execute() ([]Connector, *http.Response, error) { + return r.ApiService.ListConnectorsExecute(r) +} + +/* +ListConnectors Method for ListConnectors + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListConnectorsRequest +*/ +func (a *DefaultApiService) ListConnectors(ctx context.Context) ApiListConnectorsRequest { + return ApiListConnectorsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return []Connector +func (a *DefaultApiService) ListConnectorsExecute(r ApiListConnectorsRequest) ([]Connector, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []Connector + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListConnectors") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/connectors" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return localVarReturnValue, nil, reportError("authorization is required and must be specified") + } + + if r.limit != nil { + localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) + } + if r.page != nil { + localVarQueryParams.Add("page", parameterToString(*r.page, "")) + } + if r.cursor != nil { + localVarQueryParams.Add("cursor", parameterToString(*r.cursor, "")) + } + if r.name != nil { + localVarQueryParams.Add("name", parameterToString(*r.name, "")) + } + if r.authMethod != nil { + localVarQueryParams.Add("auth_method", parameterToString(*r.authMethod, "")) + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListEnvironmentVariablesRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + limit *int32 + page *int32 + cursor *string +} + +func (r ApiListEnvironmentVariablesRequest) Authorization(authorization string) ApiListEnvironmentVariablesRequest { + r.authorization = &authorization + return r +} + +// The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. +func (r ApiListEnvironmentVariablesRequest) Limit(limit int32) ApiListEnvironmentVariablesRequest { + r.limit = &limit + return r +} + +// The page number of results to return. +func (r ApiListEnvironmentVariablesRequest) Page(page int32) ApiListEnvironmentVariablesRequest { + r.page = &page + return r +} + +// Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. +func (r ApiListEnvironmentVariablesRequest) Cursor(cursor string) ApiListEnvironmentVariablesRequest { + r.cursor = &cursor + return r +} + +func (r ApiListEnvironmentVariablesRequest) Execute() ([]Envvar, *http.Response, error) { + return r.ApiService.ListEnvironmentVariablesExecute(r) +} + +/* +ListEnvironmentVariables Method for ListEnvironmentVariables + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListEnvironmentVariablesRequest +*/ +func (a *DefaultApiService) ListEnvironmentVariables(ctx context.Context) ApiListEnvironmentVariablesRequest { + return ApiListEnvironmentVariablesRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return []Envvar +func (a *DefaultApiService) ListEnvironmentVariablesExecute(r ApiListEnvironmentVariablesRequest) ([]Envvar, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []Envvar + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListEnvironmentVariables") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/hooks/envs" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return localVarReturnValue, nil, reportError("authorization is required and must be specified") + } + + if r.limit != nil { + localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) + } + if r.page != nil { + localVarQueryParams.Add("page", parameterToString(*r.page, "")) + } + if r.cursor != nil { + localVarQueryParams.Add("cursor", parameterToString(*r.cursor, "")) + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListHooksRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + limit *int32 + page *int32 + cursor *string +} + +func (r ApiListHooksRequest) Authorization(authorization string) ApiListHooksRequest { + r.authorization = &authorization + return r +} + +// The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. +func (r ApiListHooksRequest) Limit(limit int32) ApiListHooksRequest { + r.limit = &limit + return r +} + +// The page number of results to return. +func (r ApiListHooksRequest) Page(page int32) ApiListHooksRequest { + r.page = &page + return r +} + +// Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. +func (r ApiListHooksRequest) Cursor(cursor string) ApiListHooksRequest { + r.cursor = &cursor + return r +} + +func (r ApiListHooksRequest) Execute() ([]Hook, *http.Response, error) { + return r.ApiService.ListHooksExecute(r) +} + +/* +ListHooks Method for ListHooks + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListHooksRequest +*/ +func (a *DefaultApiService) ListHooks(ctx context.Context) ApiListHooksRequest { + return ApiListHooksRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return []Hook +func (a *DefaultApiService) ListHooksExecute(r ApiListHooksRequest) ([]Hook, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []Hook + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListHooks") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/hooks" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return localVarReturnValue, nil, reportError("authorization is required and must be specified") + } + + if r.limit != nil { + localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) + } + if r.page != nil { + localVarQueryParams.Add("page", parameterToString(*r.page, "")) + } + if r.cursor != nil { + localVarQueryParams.Add("cursor", parameterToString(*r.cursor, "")) + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListMappingActionValuesRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + actionValue string +} + +func (r ApiListMappingActionValuesRequest) Authorization(authorization string) ApiListMappingActionValuesRequest { + r.authorization = &authorization + return r +} + +func (r ApiListMappingActionValuesRequest) Execute() ([]ListConditionValues200ResponseInner, *http.Response, error) { + return r.ApiService.ListMappingActionValuesExecute(r) +} + +/* +ListMappingActionValues Method for ListMappingActionValues + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param actionValue The value for the selected action. + @return ApiListMappingActionValuesRequest +*/ +func (a *DefaultApiService) ListMappingActionValues(ctx context.Context, actionValue string) ApiListMappingActionValuesRequest { + return ApiListMappingActionValuesRequest{ + ApiService: a, + ctx: ctx, + actionValue: actionValue, + } +} + +// Execute executes the request +// @return []ListConditionValues200ResponseInner +func (a *DefaultApiService) ListMappingActionValuesExecute(r ApiListMappingActionValuesRequest) ([]ListConditionValues200ResponseInner, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []ListConditionValues200ResponseInner + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListMappingActionValues") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/apps/mappings/actions/{actuion_value}/values" + localVarPath = strings.Replace(localVarPath, "{"+"action_value"+"}", url.PathEscape(parameterToString(r.actionValue, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return localVarReturnValue, nil, reportError("authorization is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListMappingActionsRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string +} + +func (r ApiListMappingActionsRequest) Authorization(authorization string) ApiListMappingActionsRequest { + r.authorization = &authorization + return r +} + +func (r ApiListMappingActionsRequest) Execute() ([]ListActions200ResponseInner, *http.Response, error) { + return r.ApiService.ListMappingActionsExecute(r) +} + +/* +ListMappingActions Method for ListMappingActions + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListMappingActionsRequest +*/ +func (a *DefaultApiService) ListMappingActions(ctx context.Context) ApiListMappingActionsRequest { + return ApiListMappingActionsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return []ListActions200ResponseInner +func (a *DefaultApiService) ListMappingActionsExecute(r ApiListMappingActionsRequest) ([]ListActions200ResponseInner, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []ListActions200ResponseInner + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListMappingActions") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/apps/mappings/actions" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return localVarReturnValue, nil, reportError("authorization is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListMappingConditionOperatorsRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + conditionValue string +} + +func (r ApiListMappingConditionOperatorsRequest) Authorization(authorization string) ApiListMappingConditionOperatorsRequest { + r.authorization = &authorization + return r +} + +func (r ApiListMappingConditionOperatorsRequest) Execute() ([]ListMappingConditionOperators200ResponseInner, *http.Response, error) { + return r.ApiService.ListMappingConditionOperatorsExecute(r) +} + +/* +ListMappingConditionOperators Method for ListMappingConditionOperators + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param conditionValue The value for the selected condition. + @return ApiListMappingConditionOperatorsRequest +*/ +func (a *DefaultApiService) ListMappingConditionOperators(ctx context.Context, conditionValue string) ApiListMappingConditionOperatorsRequest { + return ApiListMappingConditionOperatorsRequest{ + ApiService: a, + ctx: ctx, + conditionValue: conditionValue, + } +} + +// Execute executes the request +// @return []ListMappingConditionOperators200ResponseInner +func (a *DefaultApiService) ListMappingConditionOperatorsExecute(r ApiListMappingConditionOperatorsRequest) ([]ListMappingConditionOperators200ResponseInner, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []ListMappingConditionOperators200ResponseInner + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListMappingConditionOperators") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/apps/mappings/conditions/{condition_value}/operators" + localVarPath = strings.Replace(localVarPath, "{"+"condition_value"+"}", url.PathEscape(parameterToString(r.conditionValue, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return localVarReturnValue, nil, reportError("authorization is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListMappingConditionValuesRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + conditionValue string +} + +func (r ApiListMappingConditionValuesRequest) Authorization(authorization string) ApiListMappingConditionValuesRequest { + r.authorization = &authorization + return r +} + +func (r ApiListMappingConditionValuesRequest) Execute() ([]ListConditionValues200ResponseInner, *http.Response, error) { + return r.ApiService.ListMappingConditionValuesExecute(r) +} + +/* +ListMappingConditionValues Method for ListMappingConditionValues + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param conditionValue The value for the selected condition. + @return ApiListMappingConditionValuesRequest +*/ +func (a *DefaultApiService) ListMappingConditionValues(ctx context.Context, conditionValue string) ApiListMappingConditionValuesRequest { + return ApiListMappingConditionValuesRequest{ + ApiService: a, + ctx: ctx, + conditionValue: conditionValue, + } +} + +// Execute executes the request +// @return []ListConditionValues200ResponseInner +func (a *DefaultApiService) ListMappingConditionValuesExecute(r ApiListMappingConditionValuesRequest) ([]ListConditionValues200ResponseInner, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []ListConditionValues200ResponseInner + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListMappingConditionValues") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/apps/mappings/conditions/{condition_value}/values" + localVarPath = strings.Replace(localVarPath, "{"+"condition_value"+"}", url.PathEscape(parameterToString(r.conditionValue, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return localVarReturnValue, nil, reportError("authorization is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListMappingConditionsRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string +} + +func (r ApiListMappingConditionsRequest) Authorization(authorization string) ApiListMappingConditionsRequest { + r.authorization = &authorization + return r +} + +func (r ApiListMappingConditionsRequest) Execute() ([]ListMappingConditions200ResponseInner, *http.Response, error) { + return r.ApiService.ListMappingConditionsExecute(r) +} + +/* +ListMappingConditions Method for ListMappingConditions + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListMappingConditionsRequest +*/ +func (a *DefaultApiService) ListMappingConditions(ctx context.Context) ApiListMappingConditionsRequest { + return ApiListMappingConditionsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return []ListMappingConditions200ResponseInner +func (a *DefaultApiService) ListMappingConditionsExecute(r ApiListMappingConditionsRequest) ([]ListMappingConditions200ResponseInner, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []ListMappingConditions200ResponseInner + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListMappingConditions") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/apps/mappings/conditions" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return localVarReturnValue, nil, reportError("authorization is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListMappingsRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + enabled *bool + hasCondition *string + hasConditionType *string + hasAction *string + hasActionType *string +} + +func (r ApiListMappingsRequest) Authorization(authorization string) ApiListMappingsRequest { + r.authorization = &authorization + return r +} + +// Defaults to true. When set to `false` will return all disabled mappings. +func (r ApiListMappingsRequest) Enabled(enabled bool) ApiListMappingsRequest { + r.enabled = &enabled + return r +} + +// Filters Mappings based on their Conditions. +func (r ApiListMappingsRequest) HasCondition(hasCondition string) ApiListMappingsRequest { + r.hasCondition = &hasCondition + return r +} + +// Filters Mappings based on their condition types. +func (r ApiListMappingsRequest) HasConditionType(hasConditionType string) ApiListMappingsRequest { + r.hasConditionType = &hasConditionType + return r +} + +// Filters Mappings based on their Actions. +func (r ApiListMappingsRequest) HasAction(hasAction string) ApiListMappingsRequest { + r.hasAction = &hasAction + return r +} + +// Filters Mappings based on their action types. +func (r ApiListMappingsRequest) HasActionType(hasActionType string) ApiListMappingsRequest { + r.hasActionType = &hasActionType + return r +} + +func (r ApiListMappingsRequest) Execute() ([]Mapping, *http.Response, error) { + return r.ApiService.ListMappingsExecute(r) +} + +/* +ListMappings Method for ListMappings + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListMappingsRequest +*/ +func (a *DefaultApiService) ListMappings(ctx context.Context) ApiListMappingsRequest { + return ApiListMappingsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return []Mapping +func (a *DefaultApiService) ListMappingsExecute(r ApiListMappingsRequest) ([]Mapping, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []Mapping + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListMappings") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/mappings" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return localVarReturnValue, nil, reportError("authorization is required and must be specified") + } + + if r.enabled != nil { + localVarQueryParams.Add("enabled", parameterToString(*r.enabled, "")) + } + if r.hasCondition != nil { + localVarQueryParams.Add("has_condition", parameterToString(*r.hasCondition, "")) + } + if r.hasConditionType != nil { + localVarQueryParams.Add("has_condition_type", parameterToString(*r.hasConditionType, "")) + } + if r.hasAction != nil { + localVarQueryParams.Add("has_action", parameterToString(*r.hasAction, "")) + } + if r.hasActionType != nil { + localVarQueryParams.Add("has_action_type", parameterToString(*r.hasActionType, "")) + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListRiskRulesRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string +} + +func (r ApiListRiskRulesRequest) Authorization(authorization string) ApiListRiskRulesRequest { + r.authorization = &authorization + return r +} + +func (r ApiListRiskRulesRequest) Execute() (*http.Response, error) { + return r.ApiService.ListRiskRulesExecute(r) +} + +/* +ListRiskRules Method for ListRiskRules + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListRiskRulesRequest +*/ +func (a *DefaultApiService) ListRiskRules(ctx context.Context) ApiListRiskRulesRequest { + return ApiListRiskRulesRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +func (a *DefaultApiService) ListRiskRulesExecute(r ApiListRiskRulesRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListRiskRules") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/risk/rules" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return nil, reportError("authorization is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiListRolesRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + limit *int32 + page *int32 + cursor *string + name *string + appId *string + fields *string +} + +func (r ApiListRolesRequest) Authorization(authorization string) ApiListRolesRequest { + r.authorization = &authorization + return r +} + +// The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. +func (r ApiListRolesRequest) Limit(limit int32) ApiListRolesRequest { + r.limit = &limit + return r +} + +// The page number of results to return. +func (r ApiListRolesRequest) Page(page int32) ApiListRolesRequest { + r.page = &page + return r +} + +// Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. +func (r ApiListRolesRequest) Cursor(cursor string) ApiListRolesRequest { + r.cursor = &cursor + return r +} + +// Optional. Filters by role name. +func (r ApiListRolesRequest) Name(name string) ApiListRolesRequest { + r.name = &name + return r +} + +// Optional. Returns roles that contain this app name. +func (r ApiListRolesRequest) AppId(appId string) ApiListRolesRequest { + r.appId = &appId + return r +} + +// Optional. Comma delimited list of fields to return. +func (r ApiListRolesRequest) Fields(fields string) ApiListRolesRequest { + r.fields = &fields + return r +} + +func (r ApiListRolesRequest) Execute() ([]Role, *http.Response, error) { + return r.ApiService.ListRolesExecute(r) +} + +/* +ListRoles Method for ListRoles + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListRolesRequest +*/ +func (a *DefaultApiService) ListRoles(ctx context.Context) ApiListRolesRequest { + return ApiListRolesRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return []Role +func (a *DefaultApiService) ListRolesExecute(r ApiListRolesRequest) ([]Role, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []Role + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListRoles") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/roles" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return localVarReturnValue, nil, reportError("authorization is required and must be specified") + } + + if r.limit != nil { + localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) + } + if r.page != nil { + localVarQueryParams.Add("page", parameterToString(*r.page, "")) + } + if r.cursor != nil { + localVarQueryParams.Add("cursor", parameterToString(*r.cursor, "")) + } + if r.name != nil { + localVarQueryParams.Add("name", parameterToString(*r.name, "")) + } + if r.appId != nil { + localVarQueryParams.Add("app_id", parameterToString(*r.appId, "")) + } + if r.fields != nil { + localVarQueryParams.Add("fields", parameterToString(*r.fields, "")) + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListRulesRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + appId int32 + enabled *bool + hasCondition *string + hasConditionType *string + hasAction *string + hasActionType *string +} + +func (r ApiListRulesRequest) Authorization(authorization string) ApiListRulesRequest { + r.authorization = &authorization + return r +} + +// Defaults to true. When set to `false` will return all disabled rules. +func (r ApiListRulesRequest) Enabled(enabled bool) ApiListRulesRequest { + r.enabled = &enabled + return r +} + +// Filters Rules based on their Conditions. +func (r ApiListRulesRequest) HasCondition(hasCondition string) ApiListRulesRequest { + r.hasCondition = &hasCondition + return r +} + +// Filters Rules based on their condition types. +func (r ApiListRulesRequest) HasConditionType(hasConditionType string) ApiListRulesRequest { + r.hasConditionType = &hasConditionType + return r +} + +// Filters Rules based on their Actions. +func (r ApiListRulesRequest) HasAction(hasAction string) ApiListRulesRequest { + r.hasAction = &hasAction + return r +} + +// Filters Rules based on their action types. +func (r ApiListRulesRequest) HasActionType(hasActionType string) ApiListRulesRequest { + r.hasActionType = &hasActionType + return r +} + +func (r ApiListRulesRequest) Execute() ([]Rule, *http.Response, error) { + return r.ApiService.ListRulesExecute(r) +} + +/* +ListRules Method for ListRules + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param appId + @return ApiListRulesRequest +*/ +func (a *DefaultApiService) ListRules(ctx context.Context, appId int32) ApiListRulesRequest { + return ApiListRulesRequest{ + ApiService: a, + ctx: ctx, + appId: appId, + } +} + +// Execute executes the request +// @return []Rule +func (a *DefaultApiService) ListRulesExecute(r ApiListRulesRequest) ([]Rule, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []Rule + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListRules") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/apps/{app_id}/rules" + localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterToString(r.appId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return localVarReturnValue, nil, reportError("authorization is required and must be specified") + } + + if r.enabled != nil { + localVarQueryParams.Add("enabled", parameterToString(*r.enabled, "")) + } + if r.hasCondition != nil { + localVarQueryParams.Add("has_condition", parameterToString(*r.hasCondition, "")) + } + if r.hasConditionType != nil { + localVarQueryParams.Add("has_condition_type", parameterToString(*r.hasConditionType, "")) + } + if r.hasAction != nil { + localVarQueryParams.Add("has_action", parameterToString(*r.hasAction, "")) + } + if r.hasActionType != nil { + localVarQueryParams.Add("has_action_type", parameterToString(*r.hasActionType, "")) + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListScopesRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + id int32 +} + +func (r ApiListScopesRequest) Authorization(authorization string) ApiListScopesRequest { + r.authorization = &authorization + return r +} + +func (r ApiListScopesRequest) Execute() ([]ListScopes200ResponseInner, *http.Response, error) { + return r.ApiService.ListScopesExecute(r) +} + +/* +ListScopes Method for ListScopes + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return ApiListScopesRequest +*/ +func (a *DefaultApiService) ListScopes(ctx context.Context, id int32) ApiListScopesRequest { + return ApiListScopesRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// @return []ListScopes200ResponseInner +func (a *DefaultApiService) ListScopesExecute(r ApiListScopesRequest) ([]ListScopes200ResponseInner, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []ListScopes200ResponseInner + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListScopes") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/api_authorizations/{id}/scopes" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return localVarReturnValue, nil, reportError("authorization is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListUsersRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + limit *int32 + page *int32 + cursor *string + createdSince *string + createdUntil *string + updatedSince *string + updatedUntil *string + lastLoginSince *string + lastLoginUntil *string + firstname *string + lastname *string + email *string + username *string + samaccountname *string + directoryId *string + externalId *string + appId *string + userIds *string + customAttributesAttributeName *string + fields *string +} + +func (r ApiListUsersRequest) Authorization(authorization string) ApiListUsersRequest { + r.authorization = &authorization + return r +} + +// The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. +func (r ApiListUsersRequest) Limit(limit int32) ApiListUsersRequest { + r.limit = &limit + return r +} + +// The page number of results to return. +func (r ApiListUsersRequest) Page(page int32) ApiListUsersRequest { + r.page = &page + return r +} + +// Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. +func (r ApiListUsersRequest) Cursor(cursor string) ApiListUsersRequest { + r.cursor = &cursor + return r +} + +// An ISO8601 timestamp value that returns all users created after a given date & time. +func (r ApiListUsersRequest) CreatedSince(createdSince string) ApiListUsersRequest { + r.createdSince = &createdSince + return r +} + +// An ISO8601 timestamp value that returns all users created before a given date & time. +func (r ApiListUsersRequest) CreatedUntil(createdUntil string) ApiListUsersRequest { + r.createdUntil = &createdUntil + return r +} + +// An ISO8601 timestamp value that returns all users updated after a given date & time. +func (r ApiListUsersRequest) UpdatedSince(updatedSince string) ApiListUsersRequest { + r.updatedSince = &updatedSince + return r +} + +// An ISO8601 timestamp value that returns all users updated before a given date & time. +func (r ApiListUsersRequest) UpdatedUntil(updatedUntil string) ApiListUsersRequest { + r.updatedUntil = &updatedUntil + return r +} + +// An ISO8601 timestamp value that returns all users that logged in after a given date & time. +func (r ApiListUsersRequest) LastLoginSince(lastLoginSince string) ApiListUsersRequest { + r.lastLoginSince = &lastLoginSince + return r +} + +func (r ApiListUsersRequest) LastLoginUntil(lastLoginUntil string) ApiListUsersRequest { + r.lastLoginUntil = &lastLoginUntil + return r +} + +// The first name of the user +func (r ApiListUsersRequest) Firstname(firstname string) ApiListUsersRequest { + r.firstname = &firstname + return r +} + +// The last name of the user +func (r ApiListUsersRequest) Lastname(lastname string) ApiListUsersRequest { + r.lastname = &lastname + return r +} + +// The email address of the user +func (r ApiListUsersRequest) Email(email string) ApiListUsersRequest { + r.email = &email + return r +} + +// The username for the user +func (r ApiListUsersRequest) Username(username string) ApiListUsersRequest { + r.username = &username + return r +} + +// The AD login name for the user +func (r ApiListUsersRequest) Samaccountname(samaccountname string) ApiListUsersRequest { + r.samaccountname = &samaccountname + return r +} + +// The ID in OneLogin of the Directory that the user belongs to +func (r ApiListUsersRequest) DirectoryId(directoryId string) ApiListUsersRequest { + r.directoryId = &directoryId + return r +} + +// An external identifier that has been set on the user +func (r ApiListUsersRequest) ExternalId(externalId string) ApiListUsersRequest { + r.externalId = &externalId + return r +} + +// The ID of a OneLogin Application +func (r ApiListUsersRequest) AppId(appId string) ApiListUsersRequest { + r.appId = &appId + return r +} + +// A comma separated list of OneLogin User IDs +func (r ApiListUsersRequest) UserIds(userIds string) ApiListUsersRequest { + r.userIds = &userIds + return r +} + +// The short name of a custom attribute. Note that the attribute name is prefixed with custom_attributes. +func (r ApiListUsersRequest) CustomAttributesAttributeName(customAttributesAttributeName string) ApiListUsersRequest { + r.customAttributesAttributeName = &customAttributesAttributeName + return r +} + +// A comma separated list user attributes to return. +func (r ApiListUsersRequest) Fields(fields string) ApiListUsersRequest { + r.fields = &fields + return r +} + +func (r ApiListUsersRequest) Execute() ([]User, *http.Response, error) { + return r.ApiService.ListUsersExecute(r) +} + +/* +ListUsers Method for ListUsers + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListUsersRequest +*/ +func (a *DefaultApiService) ListUsers(ctx context.Context) ApiListUsersRequest { + return ApiListUsersRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return []User +func (a *DefaultApiService) ListUsersExecute(r ApiListUsersRequest) ([]User, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []User + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListUsers") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/users" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return localVarReturnValue, nil, reportError("authorization is required and must be specified") + } + + if r.limit != nil { + localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) + } + if r.page != nil { + localVarQueryParams.Add("page", parameterToString(*r.page, "")) + } + if r.cursor != nil { + localVarQueryParams.Add("cursor", parameterToString(*r.cursor, "")) + } + if r.createdSince != nil { + localVarQueryParams.Add("created_since", parameterToString(*r.createdSince, "")) + } + if r.createdUntil != nil { + localVarQueryParams.Add("created_until", parameterToString(*r.createdUntil, "")) + } + if r.updatedSince != nil { + localVarQueryParams.Add("updated_since", parameterToString(*r.updatedSince, "")) + } + if r.updatedUntil != nil { + localVarQueryParams.Add("updated_until", parameterToString(*r.updatedUntil, "")) + } + if r.lastLoginSince != nil { + localVarQueryParams.Add("last_login_since", parameterToString(*r.lastLoginSince, "")) + } + if r.lastLoginUntil != nil { + localVarQueryParams.Add("last_login_until", parameterToString(*r.lastLoginUntil, "")) + } + if r.firstname != nil { + localVarQueryParams.Add("firstname", parameterToString(*r.firstname, "")) + } + if r.lastname != nil { + localVarQueryParams.Add("lastname", parameterToString(*r.lastname, "")) + } + if r.email != nil { + localVarQueryParams.Add("email", parameterToString(*r.email, "")) + } + if r.username != nil { + localVarQueryParams.Add("username", parameterToString(*r.username, "")) + } + if r.samaccountname != nil { + localVarQueryParams.Add("samaccountname", parameterToString(*r.samaccountname, "")) + } + if r.directoryId != nil { + localVarQueryParams.Add("directory_id", parameterToString(*r.directoryId, "")) + } + if r.externalId != nil { + localVarQueryParams.Add("external_id", parameterToString(*r.externalId, "")) + } + if r.appId != nil { + localVarQueryParams.Add("app_id", parameterToString(*r.appId, "")) + } + if r.userIds != nil { + localVarQueryParams.Add("user_ids", parameterToString(*r.userIds, "")) + } + if r.customAttributesAttributeName != nil { + localVarQueryParams.Add("custom_attributes.{attribute_name}", parameterToString(*r.customAttributesAttributeName, "")) + } + if r.fields != nil { + localVarQueryParams.Add("fields", parameterToString(*r.fields, "")) + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRemoveClientAppRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + id int32 + clientAppId int32 +} + +func (r ApiRemoveClientAppRequest) Authorization(authorization string) ApiRemoveClientAppRequest { + r.authorization = &authorization + return r +} + +func (r ApiRemoveClientAppRequest) Execute() (*http.Response, error) { + return r.ApiService.RemoveClientAppExecute(r) +} + +/* +RemoveClientApp Method for RemoveClientApp + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @param clientAppId + @return ApiRemoveClientAppRequest +*/ +func (a *DefaultApiService) RemoveClientApp(ctx context.Context, id int32, clientAppId int32) ApiRemoveClientAppRequest { + return ApiRemoveClientAppRequest{ + ApiService: a, + ctx: ctx, + id: id, + clientAppId: clientAppId, + } +} + +// Execute executes the request +func (a *DefaultApiService) RemoveClientAppExecute(r ApiRemoveClientAppRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.RemoveClientApp") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/api_authorizations/{id}/clients/{client_app_id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"client_app_id"+"}", url.PathEscape(parameterToString(r.clientAppId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return nil, reportError("authorization is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiRemoveRoleAdminsRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + roleId int32 + removeRoleUsersRequest *RemoveRoleUsersRequest +} + +func (r ApiRemoveRoleAdminsRequest) Authorization(authorization string) ApiRemoveRoleAdminsRequest { + r.authorization = &authorization + return r +} + +func (r ApiRemoveRoleAdminsRequest) RemoveRoleUsersRequest(removeRoleUsersRequest RemoveRoleUsersRequest) ApiRemoveRoleAdminsRequest { + r.removeRoleUsersRequest = &removeRoleUsersRequest + return r +} + +func (r ApiRemoveRoleAdminsRequest) Execute() (*http.Response, error) { + return r.ApiService.RemoveRoleAdminsExecute(r) +} + +/* +RemoveRoleAdmins Method for RemoveRoleAdmins + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param roleId Set to the id of the role you want to return. + @return ApiRemoveRoleAdminsRequest +*/ +func (a *DefaultApiService) RemoveRoleAdmins(ctx context.Context, roleId int32) ApiRemoveRoleAdminsRequest { + return ApiRemoveRoleAdminsRequest{ + ApiService: a, + ctx: ctx, + roleId: roleId, + } +} + +// Execute executes the request +func (a *DefaultApiService) RemoveRoleAdminsExecute(r ApiRemoveRoleAdminsRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.RemoveRoleAdmins") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/roles/{role_id}/admins" + localVarPath = strings.Replace(localVarPath, "{"+"role_id"+"}", url.PathEscape(parameterToString(r.roleId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return nil, reportError("authorization is required and must be specified") + } + if r.removeRoleUsersRequest == nil { + return nil, reportError("removeRoleUsersRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + // body params + localVarPostBody = r.removeRoleUsersRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiRemoveRoleUsersRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + roleId int32 + removeRoleUsersRequest *RemoveRoleUsersRequest +} + +func (r ApiRemoveRoleUsersRequest) Authorization(authorization string) ApiRemoveRoleUsersRequest { + r.authorization = &authorization + return r +} + +func (r ApiRemoveRoleUsersRequest) RemoveRoleUsersRequest(removeRoleUsersRequest RemoveRoleUsersRequest) ApiRemoveRoleUsersRequest { + r.removeRoleUsersRequest = &removeRoleUsersRequest + return r +} + +func (r ApiRemoveRoleUsersRequest) Execute() (*http.Response, error) { + return r.ApiService.RemoveRoleUsersExecute(r) +} + +/* +RemoveRoleUsers Method for RemoveRoleUsers + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param roleId Set to the id of the role you want to return. + @return ApiRemoveRoleUsersRequest +*/ +func (a *DefaultApiService) RemoveRoleUsers(ctx context.Context, roleId int32) ApiRemoveRoleUsersRequest { + return ApiRemoveRoleUsersRequest{ + ApiService: a, + ctx: ctx, + roleId: roleId, + } +} + +// Execute executes the request +func (a *DefaultApiService) RemoveRoleUsersExecute(r ApiRemoveRoleUsersRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.RemoveRoleUsers") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/roles/{role_id}/users" + localVarPath = strings.Replace(localVarPath, "{"+"role_id"+"}", url.PathEscape(parameterToString(r.roleId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return nil, reportError("authorization is required and must be specified") + } + if r.removeRoleUsersRequest == nil { + return nil, reportError("removeRoleUsersRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + // body params + localVarPostBody = r.removeRoleUsersRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiRevokeTokenRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + revokeTokenRequest *RevokeTokenRequest +} + +func (r ApiRevokeTokenRequest) Authorization(authorization string) ApiRevokeTokenRequest { + r.authorization = &authorization + return r +} + +func (r ApiRevokeTokenRequest) RevokeTokenRequest(revokeTokenRequest RevokeTokenRequest) ApiRevokeTokenRequest { + r.revokeTokenRequest = &revokeTokenRequest + return r +} + +func (r ApiRevokeTokenRequest) Execute() (*GenerateToken400Response, *http.Response, error) { + return r.ApiService.RevokeTokenExecute(r) +} + +/* +RevokeToken Method for RevokeToken + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiRevokeTokenRequest +*/ +func (a *DefaultApiService) RevokeToken(ctx context.Context) ApiRevokeTokenRequest { + return ApiRevokeTokenRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return GenerateToken400Response +func (a *DefaultApiService) RevokeTokenExecute(r ApiRevokeTokenRequest) (*GenerateToken400Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GenerateToken400Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.RevokeToken") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/auth/oauth2/revoke" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return localVarReturnValue, nil, reportError("authorization is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + // body params + localVarPostBody = r.revokeTokenRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v GenerateToken400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v GenerateToken400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v GenerateToken400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSetRoleAppsRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + roleId int32 + requestBody *[]int32 +} + +func (r ApiSetRoleAppsRequest) Authorization(authorization string) ApiSetRoleAppsRequest { + r.authorization = &authorization + return r +} + +func (r ApiSetRoleAppsRequest) RequestBody(requestBody []int32) ApiSetRoleAppsRequest { + r.requestBody = &requestBody + return r +} + +func (r ApiSetRoleAppsRequest) Execute() ([]SetRoleApps200ResponseInner, *http.Response, error) { + return r.ApiService.SetRoleAppsExecute(r) +} + +/* +SetRoleApps Method for SetRoleApps + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param roleId Set to the id of the role you want to return. + @return ApiSetRoleAppsRequest +*/ +func (a *DefaultApiService) SetRoleApps(ctx context.Context, roleId int32) ApiSetRoleAppsRequest { + return ApiSetRoleAppsRequest{ + ApiService: a, + ctx: ctx, + roleId: roleId, + } +} + +// Execute executes the request +// @return []SetRoleApps200ResponseInner +func (a *DefaultApiService) SetRoleAppsExecute(r ApiSetRoleAppsRequest) ([]SetRoleApps200ResponseInner, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []SetRoleApps200ResponseInner + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.SetRoleApps") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/roles/{role_id}/apps" + localVarPath = strings.Replace(localVarPath, "{"+"role_id"+"}", url.PathEscape(parameterToString(r.roleId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return localVarReturnValue, nil, reportError("authorization is required and must be specified") + } + if r.requestBody == nil { + return localVarReturnValue, nil, reportError("requestBody is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + // body params + localVarPostBody = r.requestBody + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiTrackEventRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + trackEventRequest *TrackEventRequest +} + +func (r ApiTrackEventRequest) Authorization(authorization string) ApiTrackEventRequest { + r.authorization = &authorization + return r +} + +func (r ApiTrackEventRequest) TrackEventRequest(trackEventRequest TrackEventRequest) ApiTrackEventRequest { + r.trackEventRequest = &trackEventRequest + return r +} + +func (r ApiTrackEventRequest) Execute() (*http.Response, error) { + return r.ApiService.TrackEventExecute(r) +} + +/* +TrackEvent Method for TrackEvent + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTrackEventRequest +*/ +func (a *DefaultApiService) TrackEvent(ctx context.Context) ApiTrackEventRequest { + return ApiTrackEventRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +func (a *DefaultApiService) TrackEventExecute(r ApiTrackEventRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.TrackEvent") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/risk/events" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return nil, reportError("authorization is required and must be specified") + } + if r.trackEventRequest == nil { + return nil, reportError("trackEventRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + // body params + localVarPostBody = r.trackEventRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiUpdateAccessTokenClaimRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + id int32 + claimId int32 + addAccessTokenClaimRequest *AddAccessTokenClaimRequest +} + +func (r ApiUpdateAccessTokenClaimRequest) Authorization(authorization string) ApiUpdateAccessTokenClaimRequest { + r.authorization = &authorization + return r +} + +func (r ApiUpdateAccessTokenClaimRequest) AddAccessTokenClaimRequest(addAccessTokenClaimRequest AddAccessTokenClaimRequest) ApiUpdateAccessTokenClaimRequest { + r.addAccessTokenClaimRequest = &addAccessTokenClaimRequest + return r +} + +func (r ApiUpdateAccessTokenClaimRequest) Execute() (*Id, *http.Response, error) { + return r.ApiService.UpdateAccessTokenClaimExecute(r) +} + +/* +UpdateAccessTokenClaim Method for UpdateAccessTokenClaim + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @param claimId + @return ApiUpdateAccessTokenClaimRequest +*/ +func (a *DefaultApiService) UpdateAccessTokenClaim(ctx context.Context, id int32, claimId int32) ApiUpdateAccessTokenClaimRequest { + return ApiUpdateAccessTokenClaimRequest{ + ApiService: a, + ctx: ctx, + id: id, + claimId: claimId, + } +} + +// Execute executes the request +// @return Id +func (a *DefaultApiService) UpdateAccessTokenClaimExecute(r ApiUpdateAccessTokenClaimRequest) (*Id, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Id + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.UpdateAccessTokenClaim") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/api_authorizations/{id}/claims/{claim_id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"claim_id"+"}", url.PathEscape(parameterToString(r.claimId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return localVarReturnValue, nil, reportError("authorization is required and must be specified") + } + if r.addAccessTokenClaimRequest == nil { + return localVarReturnValue, nil, reportError("addAccessTokenClaimRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + // body params + localVarPostBody = r.addAccessTokenClaimRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateAppRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + appId int32 + schema *Schema +} + +func (r ApiUpdateAppRequest) Authorization(authorization string) ApiUpdateAppRequest { + r.authorization = &authorization + return r +} + +func (r ApiUpdateAppRequest) Schema(schema Schema) ApiUpdateAppRequest { + r.schema = &schema + return r +} + +func (r ApiUpdateAppRequest) Execute() (*Schema, *http.Response, error) { + return r.ApiService.UpdateAppExecute(r) +} + +/* +UpdateApp Method for UpdateApp + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param appId + @return ApiUpdateAppRequest +*/ +func (a *DefaultApiService) UpdateApp(ctx context.Context, appId int32) ApiUpdateAppRequest { + return ApiUpdateAppRequest{ + ApiService: a, + ctx: ctx, + appId: appId, + } +} + +// Execute executes the request +// @return Schema +func (a *DefaultApiService) UpdateAppExecute(r ApiUpdateAppRequest) (*Schema, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Schema + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.UpdateApp") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/apps/{app_id}" + localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterToString(r.appId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return localVarReturnValue, nil, reportError("authorization is required and must be specified") + } + if r.schema == nil { + return localVarReturnValue, nil, reportError("schema is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + // body params + localVarPostBody = r.schema + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateAuthorizationServerRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + id int32 + createAuthorizationServerRequest *CreateAuthorizationServerRequest +} + +func (r ApiUpdateAuthorizationServerRequest) Authorization(authorization string) ApiUpdateAuthorizationServerRequest { + r.authorization = &authorization + return r +} + +func (r ApiUpdateAuthorizationServerRequest) CreateAuthorizationServerRequest(createAuthorizationServerRequest CreateAuthorizationServerRequest) ApiUpdateAuthorizationServerRequest { + r.createAuthorizationServerRequest = &createAuthorizationServerRequest + return r +} + +func (r ApiUpdateAuthorizationServerRequest) Execute() (*Id, *http.Response, error) { + return r.ApiService.UpdateAuthorizationServerExecute(r) +} + +/* +UpdateAuthorizationServer Method for UpdateAuthorizationServer + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return ApiUpdateAuthorizationServerRequest +*/ +func (a *DefaultApiService) UpdateAuthorizationServer(ctx context.Context, id int32) ApiUpdateAuthorizationServerRequest { + return ApiUpdateAuthorizationServerRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// @return Id +func (a *DefaultApiService) UpdateAuthorizationServerExecute(r ApiUpdateAuthorizationServerRequest) (*Id, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Id + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.UpdateAuthorizationServer") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/api_authorizations/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return localVarReturnValue, nil, reportError("authorization is required and must be specified") + } + if r.createAuthorizationServerRequest == nil { + return localVarReturnValue, nil, reportError("createAuthorizationServerRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + // body params + localVarPostBody = r.createAuthorizationServerRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v UpdateAuthorizationServer400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateClientAppRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + id int32 + clientAppId int32 + updateClientAppRequest *UpdateClientAppRequest +} + +func (r ApiUpdateClientAppRequest) Authorization(authorization string) ApiUpdateClientAppRequest { + r.authorization = &authorization + return r +} + +func (r ApiUpdateClientAppRequest) UpdateClientAppRequest(updateClientAppRequest UpdateClientAppRequest) ApiUpdateClientAppRequest { + r.updateClientAppRequest = &updateClientAppRequest + return r +} + +func (r ApiUpdateClientAppRequest) Execute() (*ClientApp, *http.Response, error) { + return r.ApiService.UpdateClientAppExecute(r) +} + +/* +UpdateClientApp Method for UpdateClientApp + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @param clientAppId + @return ApiUpdateClientAppRequest +*/ +func (a *DefaultApiService) UpdateClientApp(ctx context.Context, id int32, clientAppId int32) ApiUpdateClientAppRequest { + return ApiUpdateClientAppRequest{ + ApiService: a, + ctx: ctx, + id: id, + clientAppId: clientAppId, + } +} + +// Execute executes the request +// @return ClientApp +func (a *DefaultApiService) UpdateClientAppExecute(r ApiUpdateClientAppRequest) (*ClientApp, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ClientApp + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.UpdateClientApp") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/api_authorizations/{id}/clients/{client_app_id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"client_app_id"+"}", url.PathEscape(parameterToString(r.clientAppId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return localVarReturnValue, nil, reportError("authorization is required and must be specified") + } + if r.updateClientAppRequest == nil { + return localVarReturnValue, nil, reportError("updateClientAppRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + // body params + localVarPostBody = r.updateClientAppRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateEnvironmentVariableRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + envvarId string + updateEnvironmentVariableRequest *UpdateEnvironmentVariableRequest +} + +func (r ApiUpdateEnvironmentVariableRequest) Authorization(authorization string) ApiUpdateEnvironmentVariableRequest { + r.authorization = &authorization + return r +} + +func (r ApiUpdateEnvironmentVariableRequest) UpdateEnvironmentVariableRequest(updateEnvironmentVariableRequest UpdateEnvironmentVariableRequest) ApiUpdateEnvironmentVariableRequest { + r.updateEnvironmentVariableRequest = &updateEnvironmentVariableRequest + return r +} + +func (r ApiUpdateEnvironmentVariableRequest) Execute() (*Envvar, *http.Response, error) { + return r.ApiService.UpdateEnvironmentVariableExecute(r) +} + +/* +UpdateEnvironmentVariable Method for UpdateEnvironmentVariable + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param envvarId Set to the id of the Hook Environment Variable that you want to fetch. + @return ApiUpdateEnvironmentVariableRequest +*/ +func (a *DefaultApiService) UpdateEnvironmentVariable(ctx context.Context, envvarId string) ApiUpdateEnvironmentVariableRequest { + return ApiUpdateEnvironmentVariableRequest{ + ApiService: a, + ctx: ctx, + envvarId: envvarId, + } +} + +// Execute executes the request +// @return Envvar +func (a *DefaultApiService) UpdateEnvironmentVariableExecute(r ApiUpdateEnvironmentVariableRequest) (*Envvar, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Envvar + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.UpdateEnvironmentVariable") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/hooks/envs/{envvar_id}" + localVarPath = strings.Replace(localVarPath, "{"+"envvar_id"+"}", url.PathEscape(parameterToString(r.envvarId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return localVarReturnValue, nil, reportError("authorization is required and must be specified") + } + if r.updateEnvironmentVariableRequest == nil { + return localVarReturnValue, nil, reportError("updateEnvironmentVariableRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + // body params + localVarPostBody = r.updateEnvironmentVariableRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v HookStatus + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateHookRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + hookId string + hook *Hook +} + +func (r ApiUpdateHookRequest) Authorization(authorization string) ApiUpdateHookRequest { + r.authorization = &authorization + return r +} + +func (r ApiUpdateHookRequest) Hook(hook Hook) ApiUpdateHookRequest { + r.hook = &hook + return r +} + +func (r ApiUpdateHookRequest) Execute() (*Hook, *http.Response, error) { + return r.ApiService.UpdateHookExecute(r) +} + +/* +UpdateHook Method for UpdateHook + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param hookId Set to the id of the Hook that you want to return. + @return ApiUpdateHookRequest +*/ +func (a *DefaultApiService) UpdateHook(ctx context.Context, hookId string) ApiUpdateHookRequest { + return ApiUpdateHookRequest{ + ApiService: a, + ctx: ctx, + hookId: hookId, + } +} + +// Execute executes the request +// @return Hook +func (a *DefaultApiService) UpdateHookExecute(r ApiUpdateHookRequest) (*Hook, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Hook + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.UpdateHook") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/hooks/{hook_id}" + localVarPath = strings.Replace(localVarPath, "{"+"hook_id"+"}", url.PathEscape(parameterToString(r.hookId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return localVarReturnValue, nil, reportError("authorization is required and must be specified") + } + if r.hook == nil { + return localVarReturnValue, nil, reportError("hook is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + // body params + localVarPostBody = r.hook + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v HookStatus + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateMappingRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + mappingId int32 + mapping *Mapping +} + +func (r ApiUpdateMappingRequest) Authorization(authorization string) ApiUpdateMappingRequest { + r.authorization = &authorization + return r +} + +func (r ApiUpdateMappingRequest) Mapping(mapping Mapping) ApiUpdateMappingRequest { + r.mapping = &mapping + return r +} + +func (r ApiUpdateMappingRequest) Execute() (int32, *http.Response, error) { + return r.ApiService.UpdateMappingExecute(r) +} + +/* +UpdateMapping Method for UpdateMapping + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param mappingId The id of the user mapping to locate. + @return ApiUpdateMappingRequest +*/ +func (a *DefaultApiService) UpdateMapping(ctx context.Context, mappingId int32) ApiUpdateMappingRequest { + return ApiUpdateMappingRequest{ + ApiService: a, + ctx: ctx, + mappingId: mappingId, + } +} + +// Execute executes the request +// @return int32 +func (a *DefaultApiService) UpdateMappingExecute(r ApiUpdateMappingRequest) (int32, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue int32 + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.UpdateMapping") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/mappings/{mapping_id}" + localVarPath = strings.Replace(localVarPath, "{"+"mapping_id"+"}", url.PathEscape(parameterToString(r.mappingId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return localVarReturnValue, nil, reportError("authorization is required and must be specified") + } + if r.mapping == nil { + return localVarReturnValue, nil, reportError("mapping is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + // body params + localVarPostBody = r.mapping + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v ErrorStatus + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateRiskRuleRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + riskRuleId string + riskRule *RiskRule +} + +func (r ApiUpdateRiskRuleRequest) Authorization(authorization string) ApiUpdateRiskRuleRequest { + r.authorization = &authorization + return r +} + +func (r ApiUpdateRiskRuleRequest) RiskRule(riskRule RiskRule) ApiUpdateRiskRuleRequest { + r.riskRule = &riskRule + return r +} + +func (r ApiUpdateRiskRuleRequest) Execute() (*RiskRule, *http.Response, error) { + return r.ApiService.UpdateRiskRuleExecute(r) +} + +/* +UpdateRiskRule Method for UpdateRiskRule + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param riskRuleId + @return ApiUpdateRiskRuleRequest +*/ +func (a *DefaultApiService) UpdateRiskRule(ctx context.Context, riskRuleId string) ApiUpdateRiskRuleRequest { + return ApiUpdateRiskRuleRequest{ + ApiService: a, + ctx: ctx, + riskRuleId: riskRuleId, + } +} + +// Execute executes the request +// @return RiskRule +func (a *DefaultApiService) UpdateRiskRuleExecute(r ApiUpdateRiskRuleRequest) (*RiskRule, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RiskRule + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.UpdateRiskRule") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/risk/rules/{risk_rule_id}" + localVarPath = strings.Replace(localVarPath, "{"+"risk_rule_id"+"}", url.PathEscape(parameterToString(r.riskRuleId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return localVarReturnValue, nil, reportError("authorization is required and must be specified") + } + if r.riskRule == nil { + return localVarReturnValue, nil, reportError("riskRule is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + // body params + localVarPostBody = r.riskRule + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateRoleRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + roleId int32 + role *Role +} + +func (r ApiUpdateRoleRequest) Authorization(authorization string) ApiUpdateRoleRequest { + r.authorization = &authorization + return r +} + +func (r ApiUpdateRoleRequest) Role(role Role) ApiUpdateRoleRequest { + r.role = &role + return r +} + +func (r ApiUpdateRoleRequest) Execute() (*UpdateRole200Response, *http.Response, error) { + return r.ApiService.UpdateRoleExecute(r) +} + +/* +UpdateRole Method for UpdateRole + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param roleId Set to the id of the role you want to return. + @return ApiUpdateRoleRequest +*/ +func (a *DefaultApiService) UpdateRole(ctx context.Context, roleId int32) ApiUpdateRoleRequest { + return ApiUpdateRoleRequest{ + ApiService: a, + ctx: ctx, + roleId: roleId, + } +} + +// Execute executes the request +// @return UpdateRole200Response +func (a *DefaultApiService) UpdateRoleExecute(r ApiUpdateRoleRequest) (*UpdateRole200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *UpdateRole200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.UpdateRole") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/roles/{role_id}" + localVarPath = strings.Replace(localVarPath, "{"+"role_id"+"}", url.PathEscape(parameterToString(r.roleId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return localVarReturnValue, nil, reportError("authorization is required and must be specified") + } + if r.role == nil { + return localVarReturnValue, nil, reportError("role is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + // body params + localVarPostBody = r.role + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateRuleRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + appId int32 + ruleId int32 + rule *Rule +} + +func (r ApiUpdateRuleRequest) Authorization(authorization string) ApiUpdateRuleRequest { + r.authorization = &authorization + return r +} + +func (r ApiUpdateRuleRequest) Rule(rule Rule) ApiUpdateRuleRequest { + r.rule = &rule + return r +} + +func (r ApiUpdateRuleRequest) Execute() (*RuleId, *http.Response, error) { + return r.ApiService.UpdateRuleExecute(r) +} + +/* +UpdateRule Method for UpdateRule + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param appId + @param ruleId The id of the app rule to locate. + @return ApiUpdateRuleRequest +*/ +func (a *DefaultApiService) UpdateRule(ctx context.Context, appId int32, ruleId int32) ApiUpdateRuleRequest { + return ApiUpdateRuleRequest{ + ApiService: a, + ctx: ctx, + appId: appId, + ruleId: ruleId, + } +} + +// Execute executes the request +// @return RuleId +func (a *DefaultApiService) UpdateRuleExecute(r ApiUpdateRuleRequest) (*RuleId, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RuleId + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.UpdateRule") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/apps/{app_id}/rules/{rule_id}" + localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterToString(r.appId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"rule_id"+"}", url.PathEscape(parameterToString(r.ruleId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return localVarReturnValue, nil, reportError("authorization is required and must be specified") + } + if r.rule == nil { + return localVarReturnValue, nil, reportError("rule is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + // body params + localVarPostBody = r.rule + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v ErrorStatus + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateScopeRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + id int32 + scopeId int32 + addScopeRequest *AddScopeRequest +} + +func (r ApiUpdateScopeRequest) Authorization(authorization string) ApiUpdateScopeRequest { + r.authorization = &authorization + return r +} + +func (r ApiUpdateScopeRequest) AddScopeRequest(addScopeRequest AddScopeRequest) ApiUpdateScopeRequest { + r.addScopeRequest = &addScopeRequest + return r +} + +func (r ApiUpdateScopeRequest) Execute() (*Id, *http.Response, error) { + return r.ApiService.UpdateScopeExecute(r) +} + +/* +UpdateScope Method for UpdateScope + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @param scopeId + @return ApiUpdateScopeRequest +*/ +func (a *DefaultApiService) UpdateScope(ctx context.Context, id int32, scopeId int32) ApiUpdateScopeRequest { + return ApiUpdateScopeRequest{ + ApiService: a, + ctx: ctx, + id: id, + scopeId: scopeId, + } +} + +// Execute executes the request +// @return Id +func (a *DefaultApiService) UpdateScopeExecute(r ApiUpdateScopeRequest) (*Id, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Id + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.UpdateScope") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/api_authorizations/{id}/scopes/{scope_id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"scope_id"+"}", url.PathEscape(parameterToString(r.scopeId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return localVarReturnValue, nil, reportError("authorization is required and must be specified") + } + if r.addScopeRequest == nil { + return localVarReturnValue, nil, reportError("addScopeRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + // body params + localVarPostBody = r.addScopeRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateUserRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + userId int32 + user *User + mappings *string + validatePolicy *bool +} + +func (r ApiUpdateUserRequest) Authorization(authorization string) ApiUpdateUserRequest { + r.authorization = &authorization + return r +} + +func (r ApiUpdateUserRequest) User(user User) ApiUpdateUserRequest { + r.user = &user + return r +} + +// Controls how mappings will be applied to the user on creation. Defaults to async. +func (r ApiUpdateUserRequest) Mappings(mappings string) ApiUpdateUserRequest { + r.mappings = &mappings + return r +} + +// Will passwords validate against the User Policy? Defaults to true. +func (r ApiUpdateUserRequest) ValidatePolicy(validatePolicy bool) ApiUpdateUserRequest { + r.validatePolicy = &validatePolicy + return r +} + +func (r ApiUpdateUserRequest) Execute() (*User, *http.Response, error) { + return r.ApiService.UpdateUserExecute(r) +} + +/* +UpdateUser Method for UpdateUser + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param userId Set to the id of the user that you want to return. + @return ApiUpdateUserRequest +*/ +func (a *DefaultApiService) UpdateUser(ctx context.Context, userId int32) ApiUpdateUserRequest { + return ApiUpdateUserRequest{ + ApiService: a, + ctx: ctx, + userId: userId, + } +} + +// Execute executes the request +// @return User +func (a *DefaultApiService) UpdateUserExecute(r ApiUpdateUserRequest) (*User, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *User + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.UpdateUser") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/users/{user_id}" + localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterToString(r.userId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return localVarReturnValue, nil, reportError("authorization is required and must be specified") + } + if r.user == nil { + return localVarReturnValue, nil, reportError("user is required and must be specified") + } + + if r.mappings != nil { + localVarQueryParams.Add("mappings", parameterToString(*r.mappings, "")) + } + if r.validatePolicy != nil { + localVarQueryParams.Add("validate_policy", parameterToString(*r.validatePolicy, "")) + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + // body params + localVarPostBody = r.user + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiVerifyEnrollmentRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + userId int32 + registrationId int32 + verifyEnrollmentRequest *VerifyEnrollmentRequest +} + +func (r ApiVerifyEnrollmentRequest) Authorization(authorization string) ApiVerifyEnrollmentRequest { + r.authorization = &authorization + return r +} + +func (r ApiVerifyEnrollmentRequest) VerifyEnrollmentRequest(verifyEnrollmentRequest VerifyEnrollmentRequest) ApiVerifyEnrollmentRequest { + r.verifyEnrollmentRequest = &verifyEnrollmentRequest + return r +} + +func (r ApiVerifyEnrollmentRequest) Execute() ([]Registration, *http.Response, error) { + return r.ApiService.VerifyEnrollmentExecute(r) +} + +/* +VerifyEnrollment Method for VerifyEnrollment + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param userId Set to the id of the user. + @param registrationId Set to the uuid of the registration. This was included in the response as part of the initial request in Enroll Factor. + @return ApiVerifyEnrollmentRequest +*/ +func (a *DefaultApiService) VerifyEnrollment(ctx context.Context, userId int32, registrationId int32) ApiVerifyEnrollmentRequest { + return ApiVerifyEnrollmentRequest{ + ApiService: a, + ctx: ctx, + userId: userId, + registrationId: registrationId, + } +} + +// Execute executes the request +// @return []Registration +func (a *DefaultApiService) VerifyEnrollmentExecute(r ApiVerifyEnrollmentRequest) ([]Registration, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []Registration + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.VerifyEnrollment") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/mfa/users/{user_id}/registrations/{registration_id}" + localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterToString(r.userId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"registration_id"+"}", url.PathEscape(parameterToString(r.registrationId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return localVarReturnValue, nil, reportError("authorization is required and must be specified") + } + if r.verifyEnrollmentRequest == nil { + return localVarReturnValue, nil, reportError("verifyEnrollmentRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + // body params + localVarPostBody = r.verifyEnrollmentRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiVerifyEnrollmentVoiceProtectRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + userId int32 + registrationId int32 +} + +func (r ApiVerifyEnrollmentVoiceProtectRequest) Authorization(authorization string) ApiVerifyEnrollmentVoiceProtectRequest { + r.authorization = &authorization + return r +} + +func (r ApiVerifyEnrollmentVoiceProtectRequest) Execute() ([]Registration, *http.Response, error) { + return r.ApiService.VerifyEnrollmentVoiceProtectExecute(r) +} + +/* +VerifyEnrollmentVoiceProtect Method for VerifyEnrollmentVoiceProtect + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param userId Set to the id of the user. + @param registrationId Set to the uuid of the registration. This was included in the response as part of the initial request in Enroll Factor. + @return ApiVerifyEnrollmentVoiceProtectRequest +*/ +func (a *DefaultApiService) VerifyEnrollmentVoiceProtect(ctx context.Context, userId int32, registrationId int32) ApiVerifyEnrollmentVoiceProtectRequest { + return ApiVerifyEnrollmentVoiceProtectRequest{ + ApiService: a, + ctx: ctx, + userId: userId, + registrationId: registrationId, + } +} + +// Execute executes the request +// @return []Registration +func (a *DefaultApiService) VerifyEnrollmentVoiceProtectExecute(r ApiVerifyEnrollmentVoiceProtectRequest) ([]Registration, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []Registration + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.VerifyEnrollmentVoiceProtect") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/mfa/users/{user_id}/registrations/{registration_id}" + localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterToString(r.userId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"registration_id"+"}", url.PathEscape(parameterToString(r.registrationId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return localVarReturnValue, nil, reportError("authorization is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiVerifyFactorRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + userId int32 + verificationId int32 + verifyFactorRequest *VerifyFactorRequest +} + +func (r ApiVerifyFactorRequest) Authorization(authorization string) ApiVerifyFactorRequest { + r.authorization = &authorization + return r +} + +func (r ApiVerifyFactorRequest) VerifyFactorRequest(verifyFactorRequest VerifyFactorRequest) ApiVerifyFactorRequest { + r.verifyFactorRequest = &verifyFactorRequest + return r +} + +func (r ApiVerifyFactorRequest) Execute() (*Status2, *http.Response, error) { + return r.ApiService.VerifyFactorExecute(r) +} + +/* +VerifyFactor Method for VerifyFactor + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param userId Set to the id of the user. + @param verificationId The verification_id is returned on activation of the factor or you can get the device_id using the Activate Factor API call. + @return ApiVerifyFactorRequest +*/ +func (a *DefaultApiService) VerifyFactor(ctx context.Context, userId int32, verificationId int32) ApiVerifyFactorRequest { + return ApiVerifyFactorRequest{ + ApiService: a, + ctx: ctx, + userId: userId, + verificationId: verificationId, + } +} + +// Execute executes the request +// @return Status2 +func (a *DefaultApiService) VerifyFactorExecute(r ApiVerifyFactorRequest) (*Status2, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Status2 + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.VerifyFactor") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/mfa/users/{user_id}/verifications/{verification_id}" + localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterToString(r.userId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"verification_id"+"}", url.PathEscape(parameterToString(r.verificationId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return localVarReturnValue, nil, reportError("authorization is required and must be specified") + } + if r.verifyFactorRequest == nil { + return localVarReturnValue, nil, reportError("verifyFactorRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + // body params + localVarPostBody = r.verifyFactorRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiVerifyFactorSamlRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + verifyFactorSamlRequest *VerifyFactorSamlRequest +} + +func (r ApiVerifyFactorSamlRequest) Authorization(authorization string) ApiVerifyFactorSamlRequest { + r.authorization = &authorization + return r +} + +func (r ApiVerifyFactorSamlRequest) VerifyFactorSamlRequest(verifyFactorSamlRequest VerifyFactorSamlRequest) ApiVerifyFactorSamlRequest { + r.verifyFactorSamlRequest = &verifyFactorSamlRequest + return r +} + +func (r ApiVerifyFactorSamlRequest) Execute() (*VerifyFactorSaml200Response, *http.Response, error) { + return r.ApiService.VerifyFactorSamlExecute(r) +} + +/* +VerifyFactorSaml Method for VerifyFactorSaml + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiVerifyFactorSamlRequest +*/ +func (a *DefaultApiService) VerifyFactorSaml(ctx context.Context) ApiVerifyFactorSamlRequest { + return ApiVerifyFactorSamlRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return VerifyFactorSaml200Response +func (a *DefaultApiService) VerifyFactorSamlExecute(r ApiVerifyFactorSamlRequest) (*VerifyFactorSaml200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *VerifyFactorSaml200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.VerifyFactorSaml") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/saml_assertion/verify_factor" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return localVarReturnValue, nil, reportError("authorization is required and must be specified") + } + if r.verifyFactorSamlRequest == nil { + return localVarReturnValue, nil, reportError("verifyFactorSamlRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + // body params + localVarPostBody = r.verifyFactorSamlRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiVerifyFactorVoiceRequest struct { + ctx context.Context + ApiService *DefaultApiService + authorization *string + userId int32 + verificationId int32 +} + +func (r ApiVerifyFactorVoiceRequest) Authorization(authorization string) ApiVerifyFactorVoiceRequest { + r.authorization = &authorization + return r +} + +func (r ApiVerifyFactorVoiceRequest) Execute() ([]VerifyFactorVoice200ResponseInner, *http.Response, error) { + return r.ApiService.VerifyFactorVoiceExecute(r) +} + +/* +VerifyFactorVoice Method for VerifyFactorVoice + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param userId Set to the id of the user. + @param verificationId The verification_id is returned on activation of the factor or you can get the device_id using the Activate Factor API call. + @return ApiVerifyFactorVoiceRequest +*/ +func (a *DefaultApiService) VerifyFactorVoice(ctx context.Context, userId int32, verificationId int32) ApiVerifyFactorVoiceRequest { + return ApiVerifyFactorVoiceRequest{ + ApiService: a, + ctx: ctx, + userId: userId, + verificationId: verificationId, + } +} + +// Execute executes the request +// @return []VerifyFactorVoice200ResponseInner +func (a *DefaultApiService) VerifyFactorVoiceExecute(r ApiVerifyFactorVoiceRequest) ([]VerifyFactorVoice200ResponseInner, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []VerifyFactorVoice200ResponseInner + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.VerifyFactorVoice") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/mfa/users/{user_id}/verifications/{verification_id}" + localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterToString(r.userId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"verification_id"+"}", url.PathEscape(parameterToString(r.verificationId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorization == nil { + return localVarReturnValue, nil, reportError("authorization is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Status2 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Status1 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/client.go b/client.go new file mode 100644 index 0000000..5e859b8 --- /dev/null +++ b/client.go @@ -0,0 +1,563 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "bytes" + "context" + "encoding/json" + "encoding/xml" + "errors" + "fmt" + "io" + "io/ioutil" + "log" + "mime/multipart" + "net/http" + "net/http/httputil" + "net/url" + "os" + "path/filepath" + "reflect" + "regexp" + "strconv" + "strings" + "time" + "unicode/utf8" + + "golang.org/x/oauth2" +) + +var ( + jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`) + xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`) +) + +// APIClient manages communication with the OneLogin API API v3.0.0-alpha.1 +// In most cases there should be only one, shared, APIClient. +type APIClient struct { + cfg *Configuration + common service // Reuse a single struct instead of allocating one for each service on the heap. + + // API Services + + DefaultApi *DefaultApiService +} + +type service struct { + client *APIClient +} + +// NewAPIClient creates a new API client. Requires a userAgent string describing your application. +// optionally a custom http.Client to allow for advanced features such as caching. +func NewAPIClient(cfg *Configuration) *APIClient { + if cfg.HTTPClient == nil { + cfg.HTTPClient = http.DefaultClient + } + + c := &APIClient{} + c.cfg = cfg + c.common.client = c + + // API Services + c.DefaultApi = (*DefaultApiService)(&c.common) + + return c +} + +func atoi(in string) (int, error) { + return strconv.Atoi(in) +} + +// selectHeaderContentType select a content type from the available list. +func selectHeaderContentType(contentTypes []string) string { + if len(contentTypes) == 0 { + return "" + } + if contains(contentTypes, "application/json") { + return "application/json" + } + return contentTypes[0] // use the first content type specified in 'consumes' +} + +// selectHeaderAccept join all accept types and return +func selectHeaderAccept(accepts []string) string { + if len(accepts) == 0 { + return "" + } + + if contains(accepts, "application/json") { + return "application/json" + } + + return strings.Join(accepts, ",") +} + +// contains is a case insensitive match, finding needle in a haystack +func contains(haystack []string, needle string) bool { + for _, a := range haystack { + if strings.EqualFold(a, needle) { + return true + } + } + return false +} + +// Verify optional parameters are of the correct type. +func typeCheckParameter(obj interface{}, expected string, name string) error { + // Make sure there is an object. + if obj == nil { + return nil + } + + // 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 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 = "," + } + + 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) + } + + return fmt.Sprintf("%v", obj) +} + +// helper for converting interface{} parameters to json strings +func parameterToJson(obj interface{}) (string, error) { + jsonBuf, err := json.Marshal(obj) + if err != nil { + return "", err + } + return string(jsonBuf), err +} + +// callAPI do the request. +func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) { + if c.cfg.Debug { + dump, err := httputil.DumpRequestOut(request, true) + if err != nil { + return nil, err + } + log.Printf("\n%s\n", string(dump)) + } + + resp, err := c.cfg.HTTPClient.Do(request) + if err != nil { + return resp, err + } + + if c.cfg.Debug { + dump, err := httputil.DumpResponse(resp, true) + if err != nil { + return resp, err + } + log.Printf("\n%s\n", string(dump)) + } + return resp, err +} + +// Allow modification of underlying config for alternate implementations and testing +// Caution: modifying the configuration while live can cause data races and potentially unwanted behavior +func (c *APIClient) GetConfig() *Configuration { + return c.cfg +} + +type formFile struct { + fileBytes []byte + fileName string + formFileName string +} + +// prepareRequest build the request +func (c *APIClient) prepareRequest( + ctx context.Context, + path string, method string, + postBody interface{}, + headerParams map[string]string, + queryParams url.Values, + formParams url.Values, + formFiles []formFile) (localVarRequest *http.Request, err error) { + + var body *bytes.Buffer + + // Detect postBody type and post. + if postBody != nil { + contentType := headerParams["Content-Type"] + if contentType == "" { + contentType = detectContentType(postBody) + headerParams["Content-Type"] = contentType + } + + body, err = setBody(postBody, contentType) + if err != nil { + return nil, err + } + } + + // add form parameters and file if available. + if strings.HasPrefix(headerParams["Content-Type"], "multipart/form-data") && len(formParams) > 0 || (len(formFiles) > 0) { + if body != nil { + return nil, errors.New("Cannot specify postBody and multipart form at the same time.") + } + body = &bytes.Buffer{} + w := multipart.NewWriter(body) + + for k, v := range formParams { + for _, iv := range v { + if strings.HasPrefix(k, "@") { // file + err = addFile(w, k[1:], iv) + if err != nil { + return nil, err + } + } else { // form value + w.WriteField(k, iv) + } + } + } + for _, formFile := range formFiles { + if len(formFile.fileBytes) > 0 && formFile.fileName != "" { + w.Boundary() + part, err := w.CreateFormFile(formFile.formFileName, filepath.Base(formFile.fileName)) + if err != nil { + return nil, err + } + _, err = part.Write(formFile.fileBytes) + if err != nil { + return nil, err + } + } + } + + // Set the Boundary in the Content-Type + headerParams["Content-Type"] = w.FormDataContentType() + + // Set Content-Length + headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) + w.Close() + } + + if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 { + if body != nil { + return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.") + } + body = &bytes.Buffer{} + body.WriteString(formParams.Encode()) + // Set Content-Length + headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) + } + + // Setup path and query parameters + url, err := url.Parse(path) + if err != nil { + return nil, err + } + + // Override request host, if applicable + if c.cfg.Host != "" { + url.Host = c.cfg.Host + } + + // Override request scheme, if applicable + if c.cfg.Scheme != "" { + url.Scheme = c.cfg.Scheme + } + + // Adding Query Param + query := url.Query() + for k, v := range queryParams { + for _, iv := range v { + query.Add(k, iv) + } + } + + // Encode the parameters. + url.RawQuery = query.Encode() + + // Generate a new request + if body != nil { + localVarRequest, err = http.NewRequest(method, url.String(), body) + } else { + localVarRequest, err = http.NewRequest(method, url.String(), nil) + } + if err != nil { + return nil, err + } + + // add header parameters, if any + if len(headerParams) > 0 { + headers := http.Header{} + for h, v := range headerParams { + headers[h] = []string{v} + } + localVarRequest.Header = headers + } + + // Add the user agent to the request. + localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent) + + if ctx != nil { + // add context to the request + localVarRequest = localVarRequest.WithContext(ctx) + + // 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 { + localVarRequest.Header.Add(header, value) + } + return localVarRequest, nil +} + +func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) { + if len(b) == 0 { + return nil + } + if s, ok := v.(*string); ok { + *s = string(b) + return nil + } + if f, ok := v.(**os.File); ok { + *f, err = ioutil.TempFile("", "HttpClientFile") + if err != nil { + return + } + _, err = (*f).Write(b) + if err != nil { + return + } + _, err = (*f).Seek(0, io.SeekStart) + return + } + if xmlCheck.MatchString(contentType) { + if err = xml.Unmarshal(b, v); err != nil { + return err + } + return nil + } + if jsonCheck.MatchString(contentType) { + if actualObj, ok := v.(interface{ GetActualInstance() interface{} }); ok { // oneOf, anyOf schemas + if unmarshalObj, ok := actualObj.(interface{ UnmarshalJSON([]byte) error }); ok { // make sure it has UnmarshalJSON defined + if err = unmarshalObj.UnmarshalJSON(b); err != nil { + return err + } + } else { + return errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined") + } + } else if err = json.Unmarshal(b, v); err != nil { // simple model + return err + } + return nil + } + return errors.New("undefined response type") +} + +// Add a file to the multipart request +func addFile(w *multipart.Writer, fieldName, path string) error { + file, err := os.Open(filepath.Clean(path)) + if err != nil { + return err + } + err = file.Close() + if err != nil { + return err + } + + part, err := w.CreateFormFile(fieldName, filepath.Base(path)) + if err != nil { + return err + } + _, err = io.Copy(part, file) + + return err +} + +// Prevent trying to import "fmt" +func reportError(format string, a ...interface{}) error { + return fmt.Errorf(format, a...) +} + +// A wrapper for strict JSON decoding +func newStrictDecoder(data []byte) *json.Decoder { + dec := json.NewDecoder(bytes.NewBuffer(data)) + dec.DisallowUnknownFields() + return dec +} + +// Set request body from an interface{} +func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) { + if bodyBuf == nil { + bodyBuf = &bytes.Buffer{} + } + + 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 b, ok := body.([]byte); ok { + _, err = bodyBuf.Write(b) + } else if s, ok := body.(string); ok { + _, err = bodyBuf.WriteString(s) + } else if s, ok := body.(*string); ok { + _, err = bodyBuf.WriteString(*s) + } else if jsonCheck.MatchString(contentType) { + err = json.NewEncoder(bodyBuf).Encode(body) + } else if xmlCheck.MatchString(contentType) { + err = xml.NewEncoder(bodyBuf).Encode(body) + } + + if err != nil { + return nil, err + } + + if bodyBuf.Len() == 0 { + err = fmt.Errorf("Invalid body type %s\n", contentType) + return nil, err + } + return bodyBuf, nil +} + +// detectContentType method is used to figure out `Request.Body` content type for request header +func detectContentType(body interface{}) string { + contentType := "text/plain; charset=utf-8" + kind := reflect.TypeOf(body).Kind() + + switch kind { + case reflect.Struct, reflect.Map, reflect.Ptr: + contentType = "application/json; charset=utf-8" + case reflect.String: + contentType = "text/plain; charset=utf-8" + default: + if b, ok := body.([]byte); ok { + contentType = http.DetectContentType(b) + } else if kind == reflect.Slice { + contentType = "application/json; charset=utf-8" + } + } + + return contentType +} + +// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go +type cacheControl map[string]string + +func parseCacheControl(headers http.Header) cacheControl { + cc := cacheControl{} + ccHeader := headers.Get("Cache-Control") + for _, part := range strings.Split(ccHeader, ",") { + part = strings.Trim(part, " ") + if part == "" { + continue + } + if strings.ContainsRune(part, '=') { + keyval := strings.Split(part, "=") + cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",") + } else { + cc[part] = "" + } + } + return cc +} + +// CacheExpires helper function to determine remaining time before repeating a request. +func CacheExpires(r *http.Response) time.Time { + // Figure out when the cache expires. + var expires time.Time + now, err := time.Parse(time.RFC1123, r.Header.Get("date")) + if err != nil { + return time.Now() + } + respCacheControl := parseCacheControl(r.Header) + + if maxAge, ok := respCacheControl["max-age"]; ok { + lifetime, err := time.ParseDuration(maxAge + "s") + if err != nil { + expires = now + } else { + expires = now.Add(lifetime) + } + } else { + expiresHeader := r.Header.Get("Expires") + if expiresHeader != "" { + expires, err = time.Parse(time.RFC1123, expiresHeader) + if err != nil { + expires = now + } + } + } + return expires +} + +func strlen(s string) int { + return utf8.RuneCountInString(s) +} + +// GenericOpenAPIError Provides access to the body, error and model on returned errors. +type GenericOpenAPIError struct { + body []byte + error string + model interface{} +} + +// Error returns non-empty string if there was an error. +func (e GenericOpenAPIError) Error() string { + return e.error +} + +// Body returns the raw bytes of the response +func (e GenericOpenAPIError) Body() []byte { + return e.body +} + +// Model returns the unpacked model of the error +func (e GenericOpenAPIError) Model() interface{} { + return e.model +} diff --git a/config.yml b/config.yml deleted file mode 100644 index d6adf92..0000000 --- a/config.yml +++ /dev/null @@ -1 +0,0 @@ -version: "0.2.1" diff --git a/configuration.go b/configuration.go new file mode 100644 index 0000000..d2fe68a --- /dev/null +++ b/configuration.go @@ -0,0 +1,240 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "context" + "fmt" + "net/http" + "strings" +) + +// contextKeys are used to identify the type of value in the context. +// Since these are string, it is possible to get a short description of the +// context key for logging and debugging using key.String(). + +type contextKey string + +func (c contextKey) String() string { + return "auth " + string(c) +} + +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") + + // ContextOperationServerIndices uses a server configuration from the index mapping. + ContextOperationServerIndices = contextKey("serverOperationIndices") + + // ContextServerVariables overrides a server configuration variables. + ContextServerVariables = contextKey("serverVariables") + + // ContextOperationServerVariables overrides a server configuration variables using operation specific values. + ContextOperationServerVariables = contextKey("serverOperationVariables") +) + +// BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth +type BasicAuth struct { + UserName string `json:"userName,omitempty"` + Password string `json:"password,omitempty"` +} + +// APIKey provides API key based authentication to a request passed via context using ContextAPIKey +type APIKey struct { + Key string + Prefix string +} + +// ServerVariable stores the information about a server variable +type ServerVariable struct { + Description string + DefaultValue string + EnumValues []string +} + +// ServerConfiguration stores the information about a server +type ServerConfiguration struct { + URL string + Description string + Variables map[string]ServerVariable +} + +// ServerConfigurations stores multiple ServerConfiguration items +type ServerConfigurations []ServerConfiguration + +// Configuration stores the configuration of the API client +type Configuration struct { + Host string `json:"host,omitempty"` + Scheme string `json:"scheme,omitempty"` + DefaultHeader map[string]string `json:"defaultHeader,omitempty"` + UserAgent string `json:"userAgent,omitempty"` + Debug bool `json:"debug,omitempty"` + Servers ServerConfigurations + OperationServers map[string]ServerConfigurations + HTTPClient *http.Client +} + +// NewConfiguration returns a new Configuration object +func NewConfiguration() *Configuration { + cfg := &Configuration{ + DefaultHeader: make(map[string]string), + UserAgent: "OpenAPI-Generator/1.0.0/go", + Debug: false, + Servers: ServerConfigurations{ + { + URL: "https://{subdomain}.{domain}.com", + Description: "No description provided", + Variables: map[string]ServerVariable{ + "subdomain": ServerVariable{ + Description: "No description provided", + DefaultValue: "onelogininc", + }, + "domain": ServerVariable{ + Description: "No description provided", + DefaultValue: "onelogin", + }, + }, + }, + }, + OperationServers: map[string]ServerConfigurations{ + }, + } + return cfg +} + +// AddDefaultHeader adds a new HTTP header to the default header in the request +func (c *Configuration) AddDefaultHeader(key string, value string) { + c.DefaultHeader[key] = value +} + +// 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) + } + server := sc[index] + url := server.URL + + // go through variables and replace placeholders + for name, variable := range server.Variables { + if value, ok := variables[name]; ok { + found := bool(len(variable.EnumValues) == 0) + for _, enumValue := range variable.EnumValues { + if value == enumValue { + found = true + } + } + if !found { + 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 { + url = strings.Replace(url, "{"+name+"}", variable.DefaultValue, -1) + } + } + return url, nil +} + +// ServerURL returns URL based on server settings +func (c *Configuration) ServerURL(index int, variables map[string]string) (string, error) { + return c.Servers.URL(index, variables) +} + +func getServerIndex(ctx context.Context) (int, error) { + si := ctx.Value(ContextServerIndex) + if si != nil { + if index, ok := si.(int); ok { + return index, nil + } + return 0, reportError("Invalid type %T should be int", si) + } + return 0, nil +} + +func getServerOperationIndex(ctx context.Context, endpoint string) (int, error) { + osi := ctx.Value(ContextOperationServerIndices) + if osi != nil { + if operationIndices, ok := osi.(map[string]int); !ok { + return 0, reportError("Invalid type %T should be map[string]int", osi) + } else { + index, ok := operationIndices[endpoint] + if ok { + return index, nil + } + } + } + return getServerIndex(ctx) +} + +func getServerVariables(ctx context.Context) (map[string]string, error) { + sv := ctx.Value(ContextServerVariables) + if sv != nil { + if variables, ok := sv.(map[string]string); ok { + return variables, nil + } + return nil, reportError("ctx value of ContextServerVariables has invalid type %T should be map[string]string", sv) + } + return nil, nil +} + +func getServerOperationVariables(ctx context.Context, endpoint string) (map[string]string, error) { + osv := ctx.Value(ContextOperationServerVariables) + if osv != nil { + if operationVariables, ok := osv.(map[string]map[string]string); !ok { + return nil, reportError("ctx value of ContextOperationServerVariables has invalid type %T should be map[string]map[string]string", osv) + } else { + variables, ok := operationVariables[endpoint] + if ok { + return variables, nil + } + } + } + return getServerVariables(ctx) +} + +// ServerURLWithContext returns a new server URL given an endpoint +func (c *Configuration) ServerURLWithContext(ctx context.Context, endpoint string) (string, error) { + sc, ok := c.OperationServers[endpoint] + if !ok { + sc = c.Servers + } + + if ctx == nil { + return sc.URL(0, nil) + } + + index, err := getServerOperationIndex(ctx, endpoint) + if err != nil { + return "", err + } + + variables, err := getServerOperationVariables(ctx, endpoint) + if err != nil { + return "", err + } + + return sc.URL(index, variables) +} diff --git a/coverage.out b/coverage.out deleted file mode 100644 index d0d3de8..0000000 --- a/coverage.out +++ /dev/null @@ -1,540 +0,0 @@ -mode: set -github.com/onelogin/onelogin-go-sdk/internal/customerrors/errors.go:14.38,15.20 1 1 -github.com/onelogin/onelogin-go-sdk/internal/customerrors/errors.go:18.2,19.25 2 1 -github.com/onelogin/onelogin-go-sdk/internal/customerrors/errors.go:24.2,24.54 1 1 -github.com/onelogin/onelogin-go-sdk/internal/customerrors/errors.go:15.20,17.3 1 1 -github.com/onelogin/onelogin-go-sdk/internal/customerrors/errors.go:19.25,20.15 1 1 -github.com/onelogin/onelogin-go-sdk/internal/customerrors/errors.go:20.15,22.4 1 1 -github.com/onelogin/onelogin-go-sdk/internal/customerrors/oneloginerror.go:13.60,14.16 1 1 -github.com/onelogin/onelogin-go-sdk/internal/customerrors/oneloginerror.go:18.2,21.3 1 1 -github.com/onelogin/onelogin-go-sdk/internal/customerrors/oneloginerror.go:14.16,16.3 1 1 -github.com/onelogin/onelogin-go-sdk/internal/customerrors/oneloginerror.go:24.46,26.24 2 1 -github.com/onelogin/onelogin-go-sdk/internal/customerrors/oneloginerror.go:29.2,29.90 1 1 -github.com/onelogin/onelogin-go-sdk/internal/customerrors/oneloginerror.go:26.24,28.3 1 1 -github.com/onelogin/onelogin-go-sdk/internal/customerrors/requesterror.go:18.76,22.17 3 1 -github.com/onelogin/onelogin-go-sdk/internal/customerrors/requesterror.go:26.2,26.54 1 1 -github.com/onelogin/onelogin-go-sdk/internal/customerrors/requesterror.go:30.2,30.21 1 1 -github.com/onelogin/onelogin-go-sdk/internal/customerrors/requesterror.go:34.2,38.3 1 1 -github.com/onelogin/onelogin-go-sdk/internal/customerrors/requesterror.go:22.17,24.3 1 1 -github.com/onelogin/onelogin-go-sdk/internal/customerrors/requesterror.go:26.54,28.3 1 1 -github.com/onelogin/onelogin-go-sdk/internal/customerrors/requesterror.go:30.21,32.3 1 1 -github.com/onelogin/onelogin-go-sdk/internal/customerrors/requesterror.go:41.44,43.23 2 1 -github.com/onelogin/onelogin-go-sdk/internal/customerrors/requesterror.go:47.2,47.28 1 1 -github.com/onelogin/onelogin-go-sdk/internal/customerrors/requesterror.go:51.2,51.131 1 1 -github.com/onelogin/onelogin-go-sdk/internal/customerrors/requesterror.go:43.23,45.3 1 1 -github.com/onelogin/onelogin-go-sdk/internal/customerrors/requesterror.go:47.28,49.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/v2.go:21.60,27.2 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/v2.go:31.62,38.16 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/v2.go:42.2,45.18 3 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/v2.go:38.16,40.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/v2.go:50.54,56.16 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/v2.go:60.2,63.18 3 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/v2.go:56.16,58.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/v2.go:67.46,74.16 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/v2.go:77.2,78.12 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/v2.go:74.16,76.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/v2.go:90.54,91.19 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/v2.go:94.2,95.35 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/v2.go:98.2,104.16 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/v2.go:107.2,111.26 3 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/v2.go:120.2,120.28 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/v2.go:91.19,93.3 1 0 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/v2.go:95.35,97.3 1 0 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/v2.go:104.16,106.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/v2.go:111.26,114.24 3 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/v2.go:117.3,117.28 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/v2.go:114.24,116.4 1 0 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/v2.go:124.47,129.17 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/v2.go:132.2,132.12 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/v2.go:129.17,131.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/v2.go:138.97,141.40 3 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/v2.go:145.2,145.46 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/v2.go:156.2,156.44 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/v2.go:141.40,143.3 1 0 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/v2.go:145.46,146.33 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/v2.go:146.33,151.19 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/v2.go:151.19,153.5 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/oltypes/bool.go:5.27,7.2 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/oltypes/bool.go:11.41,12.16 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/oltypes/bool.go:16.2,16.21 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/oltypes/bool.go:12.16,14.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/oltypes/number.go:5.30,7.2 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/oltypes/number.go:11.44,12.16 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/oltypes/number.go:16.2,16.17 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/oltypes/number.go:12.16,14.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/oltypes/number.go:21.30,23.2 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/oltypes/number.go:27.44,28.16 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/oltypes/number.go:32.2,32.17 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/oltypes/number.go:28.16,30.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/oltypes/strings.go:10.33,12.2 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/oltypes/strings.go:16.47,17.16 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/oltypes/strings.go:21.2,21.27 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/oltypes/strings.go:17.16,19.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/auth_servers/client_apps/v2.go:21.60,27.2 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/auth_servers/client_apps/v2.go:31.74,37.16 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/auth_servers/client_apps/v2.go:41.2,43.21 3 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/auth_servers/client_apps/v2.go:37.16,39.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/auth_servers/client_apps/v2.go:47.58,48.35 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/auth_servers/client_apps/v2.go:51.2,57.16 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/auth_servers/client_apps/v2.go:61.2,66.12 5 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/auth_servers/client_apps/v2.go:48.35,50.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/auth_servers/client_apps/v2.go:57.16,59.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/auth_servers/client_apps/v2.go:70.58,71.58 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/auth_servers/client_apps/v2.go:74.2,80.16 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/auth_servers/client_apps/v2.go:84.2,89.12 5 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/auth_servers/client_apps/v2.go:71.58,73.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/auth_servers/client_apps/v2.go:80.16,82.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/auth_servers/client_apps/v2.go:94.63,99.17 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/auth_servers/client_apps/v2.go:102.2,102.12 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/auth_servers/client_apps/v2.go:99.17,101.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/auth_servers/v2.go:21.60,27.2 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/auth_servers/v2.go:31.75,38.16 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/auth_servers/v2.go:42.2,44.26 3 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/auth_servers/v2.go:38.16,40.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/auth_servers/v2.go:48.61,54.16 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/auth_servers/v2.go:57.2,59.25 3 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/auth_servers/v2.go:54.16,56.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/auth_servers/v2.go:64.60,71.16 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/auth_servers/v2.go:74.2,77.12 4 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/auth_servers/v2.go:71.16,73.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/auth_servers/v2.go:82.60,83.26 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/auth_servers/v2.go:86.2,92.16 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/auth_servers/v2.go:95.2,95.12 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/auth_servers/v2.go:83.26,85.3 1 0 -github.com/onelogin/onelogin-go-sdk/pkg/services/auth_servers/v2.go:92.16,94.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/auth_servers/v2.go:99.47,104.17 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/auth_servers/v2.go:107.2,107.12 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/auth_servers/v2.go:104.17,106.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/app_rules/v2.go:25.94,32.2 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/app_rules/v2.go:36.69,42.16 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/app_rules/v2.go:46.2,48.22 3 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/app_rules/v2.go:42.16,44.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/app_rules/v2.go:53.71,59.16 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/app_rules/v2.go:63.2,65.22 3 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/app_rules/v2.go:59.16,61.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/app_rules/v2.go:69.54,70.26 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/app_rules/v2.go:73.2,79.16 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/app_rules/v2.go:82.2,83.12 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/app_rules/v2.go:70.26,72.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/app_rules/v2.go:79.16,81.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/app_rules/v2.go:87.54,88.47 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/app_rules/v2.go:91.2,92.26 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/app_rules/v2.go:96.2,102.16 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/app_rules/v2.go:105.2,106.12 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/app_rules/v2.go:88.47,90.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/app_rules/v2.go:92.26,95.3 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/app_rules/v2.go:102.16,104.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/app_rules/v2.go:111.60,116.17 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/app_rules/v2.go:119.2,119.12 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/app_rules/v2.go:116.17,118.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/app_rules/v2.go:122.72,126.44 4 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/app_rules/v2.go:130.2,130.38 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/app_rules/v2.go:134.2,138.39 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/app_rules/v2.go:156.2,159.44 3 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/app_rules/v2.go:183.2,183.38 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/app_rules/v2.go:201.2,201.44 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/app_rules/v2.go:126.44,129.3 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/app_rules/v2.go:130.38,132.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/app_rules/v2.go:138.39,140.63 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/app_rules/v2.go:140.63,144.18 4 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/app_rules/v2.go:147.4,148.42 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/app_rules/v2.go:151.4,153.18 3 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/app_rules/v2.go:144.18,146.5 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/app_rules/v2.go:148.42,150.5 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/app_rules/v2.go:159.44,160.52 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/app_rules/v2.go:167.3,167.94 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/app_rules/v2.go:174.3,174.97 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/app_rules/v2.go:160.52,162.18 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/app_rules/v2.go:162.18,165.5 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/app_rules/v2.go:167.94,169.18 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/app_rules/v2.go:169.18,172.5 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/app_rules/v2.go:174.97,176.18 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/app_rules/v2.go:176.18,179.5 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/app_rules/v2.go:183.38,184.49 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/app_rules/v2.go:191.3,191.36 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/app_rules/v2.go:184.49,186.18 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/app_rules/v2.go:186.18,189.5 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/app_rules/v2.go:191.36,192.89 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/app_rules/v2.go:192.89,194.19 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/apps/app_rules/v2.go:194.19,197.6 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/auth_servers/access_token_claims/v2.go:21.60,27.2 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/auth_servers/access_token_claims/v2.go:31.88,37.16 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/auth_servers/access_token_claims/v2.go:41.2,43.31 3 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/auth_servers/access_token_claims/v2.go:37.16,39.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/auth_servers/access_token_claims/v2.go:47.72,48.42 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/auth_servers/access_token_claims/v2.go:51.2,57.16 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/auth_servers/access_token_claims/v2.go:60.2,63.12 4 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/auth_servers/access_token_claims/v2.go:48.42,50.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/auth_servers/access_token_claims/v2.go:57.16,59.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/auth_servers/access_token_claims/v2.go:67.72,68.72 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/auth_servers/access_token_claims/v2.go:71.2,82.16 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/auth_servers/access_token_claims/v2.go:85.2,85.12 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/auth_servers/access_token_claims/v2.go:68.72,70.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/auth_servers/access_token_claims/v2.go:82.16,84.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/auth_servers/access_token_claims/v2.go:90.73,95.17 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/auth_servers/access_token_claims/v2.go:98.2,98.12 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/auth_servers/access_token_claims/v2.go:95.17,97.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/legal_values/legal_values.go:20.69,26.2 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/legal_values/legal_values.go:28.82,34.16 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/legal_values/legal_values.go:38.2,38.60 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/legal_values/legal_values.go:42.2,42.12 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/legal_values/legal_values.go:34.16,36.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/legal_values/legal_values.go:38.60,40.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/auth_servers/scopes/v2.go:21.60,27.2 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/auth_servers/scopes/v2.go:31.66,37.16 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/auth_servers/scopes/v2.go:41.2,43.20 3 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/auth_servers/scopes/v2.go:37.16,39.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/auth_servers/scopes/v2.go:47.50,48.31 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/auth_servers/scopes/v2.go:51.2,57.16 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/auth_servers/scopes/v2.go:60.2,63.12 4 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/auth_servers/scopes/v2.go:48.31,50.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/auth_servers/scopes/v2.go:57.16,59.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/auth_servers/scopes/v2.go:67.50,68.50 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/auth_servers/scopes/v2.go:71.2,82.16 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/auth_servers/scopes/v2.go:85.2,85.12 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/auth_servers/scopes/v2.go:68.50,70.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/auth_servers/scopes/v2.go:82.16,84.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/auth_servers/scopes/v2.go:90.62,95.17 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/auth_servers/scopes/v2.go:98.2,98.12 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/auth_servers/scopes/v2.go:95.17,97.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:30.57,36.2 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:46.62,49.19 3 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:53.2,53.36 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:59.2,64.16 3 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:67.2,67.6 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:79.2,79.16 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:82.2,82.18 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:49.19,51.3 1 0 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:53.36,54.77 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:54.77,56.4 1 0 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:64.16,66.3 1 0 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:67.6,70.17 3 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:73.3,76.58 4 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:70.17,71.9 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:79.16,81.3 1 0 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:86.64,92.36 3 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:101.2,101.19 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:104.2,105.16 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:108.2,108.18 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:92.36,94.22 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:97.3,97.99 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:94.22,96.4 1 0 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:98.8,100.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:101.19,103.3 1 0 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:105.16,107.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:112.64,118.36 3 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:127.2,127.19 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:130.2,131.16 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:134.2,134.18 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:118.36,120.22 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:123.3,123.98 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:120.22,122.4 1 0 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:124.8,126.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:127.19,129.3 1 0 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:131.16,133.3 1 0 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:138.65,141.19 3 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:144.2,145.16 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:148.2,148.18 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:141.19,143.3 1 0 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:145.16,147.3 1 0 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:152.74,155.16 3 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:158.2,159.45 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:162.2,162.22 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:167.2,168.12 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:155.16,157.3 1 0 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:159.45,161.3 1 0 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:162.22,163.14 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:163.14,165.4 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:173.97,175.48 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:178.2,178.53 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:193.2,193.12 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:175.48,177.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:179.16,180.51 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:185.3,185.46 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:188.15,189.65 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:190.10,190.10 0 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:180.51,181.46 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:181.46,183.5 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:185.46,187.4 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:198.121,199.64 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:202.2,203.16 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:208.2,209.16 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:212.2,214.9 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:199.64,201.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:203.16,207.3 3 0 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:209.16,211.3 1 0 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:215.91,216.45 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:222.3,222.99 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:223.56,224.105 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:225.56,226.104 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:227.10,228.33 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:216.45,217.46 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:220.4,220.48 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:217.46,219.5 1 0 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:233.71,240.16 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:244.2,245.53 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:248.2,248.20 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:240.16,242.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:245.53,247.3 1 0 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:252.47,255.16 3 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:258.2,258.12 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp/olrequest.go:255.16,257.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/session_login_tokens/v1.go:19.60,25.2 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/session_login_tokens/v1.go:29.93,36.16 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/session_login_tokens/v1.go:39.2,41.30 3 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/session_login_tokens/v1.go:36.16,38.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/privileges/v1.go:22.60,28.2 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/privileges/v1.go:32.73,39.16 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/privileges/v1.go:43.2,46.24 3 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/privileges/v1.go:39.16,41.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/privileges/v1.go:54.90,61.16 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/privileges/v1.go:65.2,68.28 4 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/privileges/v1.go:75.2,75.25 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/privileges/v1.go:61.16,63.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/privileges/v1.go:68.28,70.15 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/privileges/v1.go:70.15,72.4 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/privileges/v1.go:80.61,86.16 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/privileges/v1.go:90.2,94.24 4 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/privileges/v1.go:86.16,88.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/privileges/v1.go:99.58,110.16 6 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/privileges/v1.go:114.2,114.55 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/privileges/v1.go:118.2,121.63 3 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/privileges/v1.go:126.2,126.12 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/privileges/v1.go:110.16,112.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/privileges/v1.go:114.55,116.3 1 0 -github.com/onelogin/onelogin-go-sdk/pkg/services/privileges/v1.go:121.63,124.3 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/privileges/v1.go:131.58,132.25 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/privileges/v1.go:137.2,146.16 4 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/privileges/v1.go:150.2,155.63 4 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/privileges/v1.go:161.2,162.16 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/privileges/v1.go:166.2,169.84 3 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/privileges/v1.go:175.2,175.84 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/privileges/v1.go:181.2,181.12 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/privileges/v1.go:132.25,134.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/privileges/v1.go:146.16,148.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/privileges/v1.go:155.63,159.3 3 0 -github.com/onelogin/onelogin-go-sdk/pkg/services/privileges/v1.go:162.16,164.3 1 0 -github.com/onelogin/onelogin-go-sdk/pkg/services/privileges/v1.go:169.84,173.3 3 0 -github.com/onelogin/onelogin-go-sdk/pkg/services/privileges/v1.go:175.84,179.3 3 0 -github.com/onelogin/onelogin-go-sdk/pkg/services/privileges/v1.go:185.48,190.17 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/privileges/v1.go:193.2,193.12 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/privileges/v1.go:190.17,192.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/privileges/v1.go:196.92,198.26 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/privileges/v1.go:221.2,221.21 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/privileges/v1.go:198.26,201.33 3 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/privileges/v1.go:215.3,215.20 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/privileges/v1.go:201.33,203.53 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/privileges/v1.go:212.4,213.12 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/privileges/v1.go:203.53,211.5 3 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/privileges/v1.go:215.20,216.9 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/privileges/v1.go:216.9,218.5 1 0 -github.com/onelogin/onelogin-go-sdk/pkg/services/privileges/v1.go:233.65,243.29 7 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/privileges/v1.go:246.2,246.29 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/privileges/v1.go:249.2,249.68 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/privileges/v1.go:243.29,245.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/privileges/v1.go:246.29,248.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/privileges/v1.go:252.101,258.16 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/privileges/v1.go:261.2,265.10 4 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/privileges/v1.go:258.16,260.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/privileges/v1.go:276.68,287.2 7 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/privileges/v1.go:289.121,291.26 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/privileges/v1.go:313.2,313.10 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/privileges/v1.go:291.26,298.17 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/privileges/v1.go:302.3,305.20 3 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/privileges/v1.go:298.17,300.4 1 0 -github.com/onelogin/onelogin-go-sdk/pkg/services/privileges/v1.go:305.20,307.4 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/privileges/v1.go:307.9,309.4 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/privileges/v1.go:310.8,312.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/privileges/v1.go:316.65,318.22 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/privileges/v1.go:321.2,321.22 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/privileges/v1.go:324.2,324.32 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/privileges/v1.go:327.2,327.64 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/privileges/v1.go:318.22,320.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/privileges/v1.go:321.22,323.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/privileges/v1.go:324.32,326.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/privileges/v1.go:330.49,333.25 3 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/privileges/v1.go:336.2,336.24 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/privileges/v1.go:341.2,341.16 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/privileges/v1.go:333.25,335.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/privileges/v1.go:336.24,337.12 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/privileges/v1.go:337.12,339.4 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/roles/v1.go:20.60,26.2 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/roles/v1.go:30.63,37.16 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/roles/v1.go:41.2,43.19 3 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/roles/v1.go:37.16,39.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/roles/v1.go:47.55,53.16 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/roles/v1.go:56.2,58.19 3 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/roles/v1.go:53.16,55.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/roles/v1.go:63.48,70.16 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/roles/v1.go:73.2,74.12 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/roles/v1.go:70.16,72.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/roles/v1.go:79.48,80.20 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/roles/v1.go:84.2,93.16 4 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/roles/v1.go:97.2,98.12 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/roles/v1.go:80.20,82.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/roles/v1.go:93.16,95.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/roles/v1.go:102.47,107.17 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/roles/v1.go:110.2,110.12 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/roles/v1.go:107.17,109.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/user_mappings/v2.go:27.94,34.2 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/user_mappings/v2.go:38.78,45.16 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/user_mappings/v2.go:49.2,52.26 3 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/user_mappings/v2.go:45.16,47.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/user_mappings/v2.go:57.62,63.16 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/user_mappings/v2.go:67.2,70.22 3 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/user_mappings/v2.go:63.16,65.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/user_mappings/v2.go:75.58,76.23 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/user_mappings/v2.go:79.2,80.26 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/user_mappings/v2.go:83.2,91.16 4 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/user_mappings/v2.go:95.2,100.12 4 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/user_mappings/v2.go:76.23,78.3 1 0 -github.com/onelogin/onelogin-go-sdk/pkg/services/user_mappings/v2.go:80.26,82.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/user_mappings/v2.go:91.16,93.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/user_mappings/v2.go:105.58,107.26 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/user_mappings/v2.go:110.2,117.16 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/user_mappings/v2.go:120.2,125.12 4 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/user_mappings/v2.go:107.26,109.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/user_mappings/v2.go:117.16,119.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/user_mappings/v2.go:129.47,134.17 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/user_mappings/v2.go:137.2,137.12 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/user_mappings/v2.go:134.17,136.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/user_mappings/v2.go:140.82,144.47 4 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/user_mappings/v2.go:148.2,148.41 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/user_mappings/v2.go:152.2,156.39 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/user_mappings/v2.go:174.2,177.47 3 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/user_mappings/v2.go:201.2,201.41 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/user_mappings/v2.go:219.2,219.44 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/user_mappings/v2.go:144.47,147.3 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/user_mappings/v2.go:148.41,150.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/user_mappings/v2.go:156.39,158.63 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/user_mappings/v2.go:158.63,162.18 4 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/user_mappings/v2.go:165.4,166.42 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/user_mappings/v2.go:169.4,171.18 3 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/user_mappings/v2.go:162.18,164.5 1 0 -github.com/onelogin/onelogin-go-sdk/pkg/services/user_mappings/v2.go:166.42,168.5 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/user_mappings/v2.go:177.47,178.55 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/user_mappings/v2.go:185.3,185.97 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/user_mappings/v2.go:192.3,192.100 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/user_mappings/v2.go:178.55,180.18 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/user_mappings/v2.go:180.18,183.5 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/user_mappings/v2.go:185.97,187.18 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/user_mappings/v2.go:187.18,190.5 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/user_mappings/v2.go:192.100,194.18 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/user_mappings/v2.go:194.18,197.5 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/user_mappings/v2.go:201.41,202.52 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/user_mappings/v2.go:209.3,209.36 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/user_mappings/v2.go:202.52,204.18 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/user_mappings/v2.go:204.18,207.5 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/user_mappings/v2.go:209.36,210.92 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/user_mappings/v2.go:210.92,212.19 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/user_mappings/v2.go:212.19,215.6 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/users/v2.go:20.60,26.2 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/users/v2.go:30.63,37.16 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/users/v2.go:41.2,43.19 3 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/users/v2.go:37.16,39.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/users/v2.go:47.55,53.16 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/users/v2.go:56.2,58.19 3 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/users/v2.go:53.16,55.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/users/v2.go:63.48,70.16 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/users/v2.go:73.2,74.12 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/users/v2.go:70.16,72.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/users/v2.go:79.48,80.20 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/users/v2.go:83.2,89.16 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/users/v2.go:92.2,93.12 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/users/v2.go:80.20,82.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/users/v2.go:89.16,91.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/users/v2.go:97.47,102.17 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/users/v2.go:105.2,105.12 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/users/v2.go:102.17,104.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/utils/utils.go:12.56,15.2 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/utils/utils.go:18.37,31.2 10 1 -github.com/onelogin/onelogin-go-sdk/pkg/utils/utils.go:35.55,37.25 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/utils/utils.go:43.2,43.14 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/utils/utils.go:46.2,46.12 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/utils/utils.go:37.25,39.14 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/utils/utils.go:39.14,40.9 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/utils/utils.go:43.14,45.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/utils/utils.go:56.31,59.2 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/utils/utils.go:64.36,65.18 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/utils/utils.go:68.2,69.16 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/utils/utils.go:65.18,67.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/utils/utils.go:74.36,75.19 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/utils/utils.go:78.2,79.14 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/utils/utils.go:83.2,83.29 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/utils/utils.go:75.19,77.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/utils/utils.go:79.14,82.3 2 0 -github.com/onelogin/onelogin-go-sdk/pkg/client/client.go:54.58,56.16 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/client/client.go:60.2,94.8 4 1 -github.com/onelogin/onelogin-go-sdk/pkg/client/client.go:56.16,58.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/client/client_config.go:32.68,35.28 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/client/client_config.go:40.2,40.32 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/client/client_config.go:43.2,43.23 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/client/client_config.go:52.2,52.22 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/client/client_config.go:56.2,56.17 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/client/client_config.go:35.28,37.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/client/client_config.go:40.32,42.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/client/client_config.go:43.23,45.37 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/client/client_config.go:48.3,48.53 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/client/client_config.go:45.37,47.4 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/client/client_config.go:52.22,54.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/client/client_config.go:59.44,61.2 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/smarthooks/model.go:52.47,53.26 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/smarthooks/model.go:57.2,59.12 3 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/smarthooks/model.go:53.26,55.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/smarthooks/model.go:63.47,64.26 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/smarthooks/model.go:67.2,69.12 3 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/smarthooks/model.go:64.26,66.3 1 0 -github.com/onelogin/onelogin-go-sdk/pkg/services/smarthooks/v1.go:20.60,26.2 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/smarthooks/v1.go:35.73,42.16 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/smarthooks/v1.go:46.2,48.24 3 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/smarthooks/v1.go:42.16,44.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/smarthooks/v1.go:52.61,59.16 3 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/smarthooks/v1.go:62.2,63.18 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/smarthooks/v1.go:59.16,61.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/smarthooks/v1.go:68.72,70.31 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/smarthooks/v1.go:74.2,75.38 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/smarthooks/v1.go:78.2,89.16 3 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/smarthooks/v1.go:93.2,94.18 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/smarthooks/v1.go:70.31,72.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/smarthooks/v1.go:75.38,77.3 1 0 -github.com/onelogin/onelogin-go-sdk/pkg/services/smarthooks/v1.go:89.16,91.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/smarthooks/v1.go:99.72,101.25 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/smarthooks/v1.go:104.2,104.31 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/smarthooks/v1.go:108.2,109.38 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/smarthooks/v1.go:112.2,125.16 5 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/smarthooks/v1.go:129.2,130.18 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/smarthooks/v1.go:101.25,103.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/smarthooks/v1.go:104.31,106.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/smarthooks/v1.go:109.38,111.3 1 0 -github.com/onelogin/onelogin-go-sdk/pkg/services/smarthooks/v1.go:125.16,127.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/smarthooks/v1.go:134.48,139.17 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/smarthooks/v1.go:142.2,142.12 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/smarthooks/v1.go:139.17,141.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/smarthooks/envs/v1.go:21.60,27.2 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/smarthooks/envs/v1.go:31.76,38.16 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/smarthooks/envs/v1.go:42.2,44.21 3 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/smarthooks/envs/v1.go:38.16,40.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/smarthooks/envs/v1.go:48.58,55.16 3 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/smarthooks/envs/v1.go:58.2,59.18 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/smarthooks/envs/v1.go:55.16,57.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/smarthooks/envs/v1.go:64.63,66.47 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/smarthooks/envs/v1.go:70.2,76.16 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/smarthooks/envs/v1.go:80.2,81.18 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/smarthooks/envs/v1.go:66.47,68.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/smarthooks/envs/v1.go:76.16,78.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/smarthooks/envs/v1.go:86.63,88.44 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/smarthooks/envs/v1.go:100.2,100.22 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/smarthooks/envs/v1.go:103.2,103.25 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/smarthooks/envs/v1.go:107.2,119.16 7 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/smarthooks/envs/v1.go:123.2,124.18 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/smarthooks/envs/v1.go:88.44,90.17 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/smarthooks/envs/v1.go:93.3,93.30 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/smarthooks/envs/v1.go:90.17,92.4 1 0 -github.com/onelogin/onelogin-go-sdk/pkg/services/smarthooks/envs/v1.go:93.30,94.31 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/smarthooks/envs/v1.go:94.31,96.10 2 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/smarthooks/envs/v1.go:100.22,102.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/smarthooks/envs/v1.go:103.25,105.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/smarthooks/envs/v1.go:119.16,121.3 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/smarthooks/envs/v1.go:128.48,133.17 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/smarthooks/envs/v1.go:136.2,136.12 1 1 -github.com/onelogin/onelogin-go-sdk/pkg/services/smarthooks/envs/v1.go:133.17,135.3 1 1 diff --git a/docs/Action.md b/docs/Action.md new file mode 100644 index 0000000..03fd37b --- /dev/null +++ b/docs/Action.md @@ -0,0 +1,160 @@ +# Action + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Action** | Pointer to **string** | The action to apply | [optional] +**Value** | Pointer to **[]string** | Only applicable to provisioned and set_* actions. Items in the array will be a plain text string or valid value for the selected action. | [optional] +**Expression** | Pointer to **string** | A regular expression to extract a value. Applies to provisionable, multi-selects, and string actions. | [optional] +**Scriplet** | Pointer to **string** | A hash containing scriptlet code that returns a value. | [optional] +**Macro** | Pointer to **string** | A template to construct a value. Applies to default, string, and list actions. | [optional] + +## Methods + +### NewAction + +`func NewAction() *Action` + +NewAction instantiates a new Action 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 + +### NewActionWithDefaults + +`func NewActionWithDefaults() *Action` + +NewActionWithDefaults instantiates a new Action 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 + +### GetAction + +`func (o *Action) GetAction() string` + +GetAction returns the Action field if non-nil, zero value otherwise. + +### GetActionOk + +`func (o *Action) GetActionOk() (*string, bool)` + +GetActionOk returns a tuple with the Action field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAction + +`func (o *Action) SetAction(v string)` + +SetAction sets Action field to given value. + +### HasAction + +`func (o *Action) HasAction() bool` + +HasAction returns a boolean if a field has been set. + +### GetValue + +`func (o *Action) GetValue() []string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *Action) GetValueOk() (*[]string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *Action) SetValue(v []string)` + +SetValue sets Value field to given value. + +### HasValue + +`func (o *Action) HasValue() bool` + +HasValue returns a boolean if a field has been set. + +### GetExpression + +`func (o *Action) GetExpression() string` + +GetExpression returns the Expression field if non-nil, zero value otherwise. + +### GetExpressionOk + +`func (o *Action) GetExpressionOk() (*string, bool)` + +GetExpressionOk returns a tuple with the Expression field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExpression + +`func (o *Action) SetExpression(v string)` + +SetExpression sets Expression field to given value. + +### HasExpression + +`func (o *Action) HasExpression() bool` + +HasExpression returns a boolean if a field has been set. + +### GetScriplet + +`func (o *Action) GetScriplet() string` + +GetScriplet returns the Scriplet field if non-nil, zero value otherwise. + +### GetScripletOk + +`func (o *Action) GetScripletOk() (*string, bool)` + +GetScripletOk returns a tuple with the Scriplet field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetScriplet + +`func (o *Action) SetScriplet(v string)` + +SetScriplet sets Scriplet field to given value. + +### HasScriplet + +`func (o *Action) HasScriplet() bool` + +HasScriplet returns a boolean if a field has been set. + +### GetMacro + +`func (o *Action) GetMacro() string` + +GetMacro returns the Macro field if non-nil, zero value otherwise. + +### GetMacroOk + +`func (o *Action) GetMacroOk() (*string, bool)` + +GetMacroOk returns a tuple with the Macro field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMacro + +`func (o *Action) SetMacro(v string)` + +SetMacro sets Macro field to given value. + +### HasMacro + +`func (o *Action) HasMacro() bool` + +HasMacro 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/ActivateFactorRequest.md b/docs/ActivateFactorRequest.md new file mode 100644 index 0000000..16e1a7a --- /dev/null +++ b/docs/ActivateFactorRequest.md @@ -0,0 +1,134 @@ +# ActivateFactorRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DeviceId** | Pointer to **int32** | Required. Specifies the factor to be verified. | [optional] +**ExpiresIn** | Pointer to **int32** | Optional. Sets the window of time in seconds that the factor must be verified within. | [optional] +**RedirectTo** | Pointer to **string** | Optional. Only applies to Email MagicLink factor. | [optional] +**CustomMessage** | Pointer to **string** | Optional. Only applies to SMS factor. A message template that will be sent via SMS. | [optional] + +## Methods + +### NewActivateFactorRequest + +`func NewActivateFactorRequest() *ActivateFactorRequest` + +NewActivateFactorRequest instantiates a new ActivateFactorRequest 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 + +### NewActivateFactorRequestWithDefaults + +`func NewActivateFactorRequestWithDefaults() *ActivateFactorRequest` + +NewActivateFactorRequestWithDefaults instantiates a new ActivateFactorRequest 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 + +### GetDeviceId + +`func (o *ActivateFactorRequest) GetDeviceId() int32` + +GetDeviceId returns the DeviceId field if non-nil, zero value otherwise. + +### GetDeviceIdOk + +`func (o *ActivateFactorRequest) GetDeviceIdOk() (*int32, bool)` + +GetDeviceIdOk returns a tuple with the DeviceId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDeviceId + +`func (o *ActivateFactorRequest) SetDeviceId(v int32)` + +SetDeviceId sets DeviceId field to given value. + +### HasDeviceId + +`func (o *ActivateFactorRequest) HasDeviceId() bool` + +HasDeviceId returns a boolean if a field has been set. + +### GetExpiresIn + +`func (o *ActivateFactorRequest) GetExpiresIn() int32` + +GetExpiresIn returns the ExpiresIn field if non-nil, zero value otherwise. + +### GetExpiresInOk + +`func (o *ActivateFactorRequest) GetExpiresInOk() (*int32, bool)` + +GetExpiresInOk returns a tuple with the ExpiresIn field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExpiresIn + +`func (o *ActivateFactorRequest) SetExpiresIn(v int32)` + +SetExpiresIn sets ExpiresIn field to given value. + +### HasExpiresIn + +`func (o *ActivateFactorRequest) HasExpiresIn() bool` + +HasExpiresIn returns a boolean if a field has been set. + +### GetRedirectTo + +`func (o *ActivateFactorRequest) GetRedirectTo() string` + +GetRedirectTo returns the RedirectTo field if non-nil, zero value otherwise. + +### GetRedirectToOk + +`func (o *ActivateFactorRequest) GetRedirectToOk() (*string, bool)` + +GetRedirectToOk returns a tuple with the RedirectTo field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRedirectTo + +`func (o *ActivateFactorRequest) SetRedirectTo(v string)` + +SetRedirectTo sets RedirectTo field to given value. + +### HasRedirectTo + +`func (o *ActivateFactorRequest) HasRedirectTo() bool` + +HasRedirectTo returns a boolean if a field has been set. + +### GetCustomMessage + +`func (o *ActivateFactorRequest) GetCustomMessage() string` + +GetCustomMessage returns the CustomMessage field if non-nil, zero value otherwise. + +### GetCustomMessageOk + +`func (o *ActivateFactorRequest) GetCustomMessageOk() (*string, bool)` + +GetCustomMessageOk returns a tuple with the CustomMessage field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustomMessage + +`func (o *ActivateFactorRequest) SetCustomMessage(v string)` + +SetCustomMessage sets CustomMessage field to given value. + +### HasCustomMessage + +`func (o *ActivateFactorRequest) HasCustomMessage() bool` + +HasCustomMessage 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/AddAccessTokenClaimRequest.md b/docs/AddAccessTokenClaimRequest.md new file mode 100644 index 0000000..ac8e4ba --- /dev/null +++ b/docs/AddAccessTokenClaimRequest.md @@ -0,0 +1,108 @@ +# AddAccessTokenClaimRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | | [optional] +**UserAttributeMappings** | Pointer to **string** | | [optional] +**UserAttributeMacros** | Pointer to **string** | | [optional] + +## Methods + +### NewAddAccessTokenClaimRequest + +`func NewAddAccessTokenClaimRequest() *AddAccessTokenClaimRequest` + +NewAddAccessTokenClaimRequest instantiates a new AddAccessTokenClaimRequest 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 + +### NewAddAccessTokenClaimRequestWithDefaults + +`func NewAddAccessTokenClaimRequestWithDefaults() *AddAccessTokenClaimRequest` + +NewAddAccessTokenClaimRequestWithDefaults instantiates a new AddAccessTokenClaimRequest 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 *AddAccessTokenClaimRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *AddAccessTokenClaimRequest) 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 *AddAccessTokenClaimRequest) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *AddAccessTokenClaimRequest) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetUserAttributeMappings + +`func (o *AddAccessTokenClaimRequest) GetUserAttributeMappings() string` + +GetUserAttributeMappings returns the UserAttributeMappings field if non-nil, zero value otherwise. + +### GetUserAttributeMappingsOk + +`func (o *AddAccessTokenClaimRequest) GetUserAttributeMappingsOk() (*string, bool)` + +GetUserAttributeMappingsOk returns a tuple with the UserAttributeMappings field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUserAttributeMappings + +`func (o *AddAccessTokenClaimRequest) SetUserAttributeMappings(v string)` + +SetUserAttributeMappings sets UserAttributeMappings field to given value. + +### HasUserAttributeMappings + +`func (o *AddAccessTokenClaimRequest) HasUserAttributeMappings() bool` + +HasUserAttributeMappings returns a boolean if a field has been set. + +### GetUserAttributeMacros + +`func (o *AddAccessTokenClaimRequest) GetUserAttributeMacros() string` + +GetUserAttributeMacros returns the UserAttributeMacros field if non-nil, zero value otherwise. + +### GetUserAttributeMacrosOk + +`func (o *AddAccessTokenClaimRequest) GetUserAttributeMacrosOk() (*string, bool)` + +GetUserAttributeMacrosOk returns a tuple with the UserAttributeMacros field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUserAttributeMacros + +`func (o *AddAccessTokenClaimRequest) SetUserAttributeMacros(v string)` + +SetUserAttributeMacros sets UserAttributeMacros field to given value. + +### HasUserAttributeMacros + +`func (o *AddAccessTokenClaimRequest) HasUserAttributeMacros() bool` + +HasUserAttributeMacros 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/AddClientAppRequest.md b/docs/AddClientAppRequest.md new file mode 100644 index 0000000..807589f --- /dev/null +++ b/docs/AddClientAppRequest.md @@ -0,0 +1,82 @@ +# AddClientAppRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AppId** | Pointer to **int32** | | [optional] +**Scopes** | Pointer to **[]int32** | | [optional] + +## Methods + +### NewAddClientAppRequest + +`func NewAddClientAppRequest() *AddClientAppRequest` + +NewAddClientAppRequest instantiates a new AddClientAppRequest 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 + +### NewAddClientAppRequestWithDefaults + +`func NewAddClientAppRequestWithDefaults() *AddClientAppRequest` + +NewAddClientAppRequestWithDefaults instantiates a new AddClientAppRequest 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 + +### GetAppId + +`func (o *AddClientAppRequest) GetAppId() int32` + +GetAppId returns the AppId field if non-nil, zero value otherwise. + +### GetAppIdOk + +`func (o *AddClientAppRequest) GetAppIdOk() (*int32, bool)` + +GetAppIdOk returns a tuple with the AppId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAppId + +`func (o *AddClientAppRequest) SetAppId(v int32)` + +SetAppId sets AppId field to given value. + +### HasAppId + +`func (o *AddClientAppRequest) HasAppId() bool` + +HasAppId returns a boolean if a field has been set. + +### GetScopes + +`func (o *AddClientAppRequest) GetScopes() []int32` + +GetScopes returns the Scopes field if non-nil, zero value otherwise. + +### GetScopesOk + +`func (o *AddClientAppRequest) GetScopesOk() (*[]int32, bool)` + +GetScopesOk returns a tuple with the Scopes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetScopes + +`func (o *AddClientAppRequest) SetScopes(v []int32)` + +SetScopes sets Scopes field to given value. + +### HasScopes + +`func (o *AddClientAppRequest) HasScopes() bool` + +HasScopes 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/AddRoleUsers200ResponseInner.md b/docs/AddRoleUsers200ResponseInner.md new file mode 100644 index 0000000..f615e77 --- /dev/null +++ b/docs/AddRoleUsers200ResponseInner.md @@ -0,0 +1,56 @@ +# AddRoleUsers200ResponseInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **int32** | | [optional] + +## Methods + +### NewAddRoleUsers200ResponseInner + +`func NewAddRoleUsers200ResponseInner() *AddRoleUsers200ResponseInner` + +NewAddRoleUsers200ResponseInner instantiates a new AddRoleUsers200ResponseInner 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 + +### NewAddRoleUsers200ResponseInnerWithDefaults + +`func NewAddRoleUsers200ResponseInnerWithDefaults() *AddRoleUsers200ResponseInner` + +NewAddRoleUsers200ResponseInnerWithDefaults instantiates a new AddRoleUsers200ResponseInner 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 + +### GetId + +`func (o *AddRoleUsers200ResponseInner) GetId() int32` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *AddRoleUsers200ResponseInner) GetIdOk() (*int32, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *AddRoleUsers200ResponseInner) SetId(v int32)` + +SetId sets Id field to given value. + +### HasId + +`func (o *AddRoleUsers200ResponseInner) HasId() bool` + +HasId 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/AddScopeRequest.md b/docs/AddScopeRequest.md new file mode 100644 index 0000000..183b9d7 --- /dev/null +++ b/docs/AddScopeRequest.md @@ -0,0 +1,82 @@ +# AddScopeRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | Pointer to **string** | | [optional] +**Description** | Pointer to **string** | | [optional] + +## Methods + +### NewAddScopeRequest + +`func NewAddScopeRequest() *AddScopeRequest` + +NewAddScopeRequest instantiates a new AddScopeRequest 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 + +### NewAddScopeRequestWithDefaults + +`func NewAddScopeRequestWithDefaults() *AddScopeRequest` + +NewAddScopeRequestWithDefaults instantiates a new AddScopeRequest 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 + +### GetValue + +`func (o *AddScopeRequest) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *AddScopeRequest) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *AddScopeRequest) SetValue(v string)` + +SetValue sets Value field to given value. + +### HasValue + +`func (o *AddScopeRequest) HasValue() bool` + +HasValue returns a boolean if a field has been set. + +### GetDescription + +`func (o *AddScopeRequest) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *AddScopeRequest) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *AddScopeRequest) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *AddScopeRequest) HasDescription() bool` + +HasDescription 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/AuthMethod.md b/docs/AuthMethod.md new file mode 100644 index 0000000..2b9ea14 --- /dev/null +++ b/docs/AuthMethod.md @@ -0,0 +1,25 @@ +# AuthMethod + +## Enum + + +* `_0` (value: `0`) + +* `_1` (value: `1`) + +* `_2` (value: `2`) + +* `_3` (value: `3`) + +* `_4` (value: `4`) + +* `_6` (value: `6`) + +* `_7` (value: `7`) + +* `_8` (value: `8`) + + +[[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/AuthServerConfiguration.md b/docs/AuthServerConfiguration.md new file mode 100644 index 0000000..f3c1b28 --- /dev/null +++ b/docs/AuthServerConfiguration.md @@ -0,0 +1,134 @@ +# AuthServerConfiguration + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Audiences** | Pointer to **[]string** | | [optional] +**RefreshTokenExpirationMinutes** | Pointer to **int32** | | [optional] +**ResourceIdentifier** | Pointer to **string** | | [optional] +**AccessTokenExpirationMinutes** | Pointer to **int32** | | [optional] + +## Methods + +### NewAuthServerConfiguration + +`func NewAuthServerConfiguration() *AuthServerConfiguration` + +NewAuthServerConfiguration instantiates a new AuthServerConfiguration 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 + +### NewAuthServerConfigurationWithDefaults + +`func NewAuthServerConfigurationWithDefaults() *AuthServerConfiguration` + +NewAuthServerConfigurationWithDefaults instantiates a new AuthServerConfiguration 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 + +### GetAudiences + +`func (o *AuthServerConfiguration) GetAudiences() []string` + +GetAudiences returns the Audiences field if non-nil, zero value otherwise. + +### GetAudiencesOk + +`func (o *AuthServerConfiguration) GetAudiencesOk() (*[]string, bool)` + +GetAudiencesOk returns a tuple with the Audiences field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAudiences + +`func (o *AuthServerConfiguration) SetAudiences(v []string)` + +SetAudiences sets Audiences field to given value. + +### HasAudiences + +`func (o *AuthServerConfiguration) HasAudiences() bool` + +HasAudiences returns a boolean if a field has been set. + +### GetRefreshTokenExpirationMinutes + +`func (o *AuthServerConfiguration) GetRefreshTokenExpirationMinutes() int32` + +GetRefreshTokenExpirationMinutes returns the RefreshTokenExpirationMinutes field if non-nil, zero value otherwise. + +### GetRefreshTokenExpirationMinutesOk + +`func (o *AuthServerConfiguration) GetRefreshTokenExpirationMinutesOk() (*int32, bool)` + +GetRefreshTokenExpirationMinutesOk returns a tuple with the RefreshTokenExpirationMinutes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRefreshTokenExpirationMinutes + +`func (o *AuthServerConfiguration) SetRefreshTokenExpirationMinutes(v int32)` + +SetRefreshTokenExpirationMinutes sets RefreshTokenExpirationMinutes field to given value. + +### HasRefreshTokenExpirationMinutes + +`func (o *AuthServerConfiguration) HasRefreshTokenExpirationMinutes() bool` + +HasRefreshTokenExpirationMinutes returns a boolean if a field has been set. + +### GetResourceIdentifier + +`func (o *AuthServerConfiguration) GetResourceIdentifier() string` + +GetResourceIdentifier returns the ResourceIdentifier field if non-nil, zero value otherwise. + +### GetResourceIdentifierOk + +`func (o *AuthServerConfiguration) GetResourceIdentifierOk() (*string, bool)` + +GetResourceIdentifierOk returns a tuple with the ResourceIdentifier field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResourceIdentifier + +`func (o *AuthServerConfiguration) SetResourceIdentifier(v string)` + +SetResourceIdentifier sets ResourceIdentifier field to given value. + +### HasResourceIdentifier + +`func (o *AuthServerConfiguration) HasResourceIdentifier() bool` + +HasResourceIdentifier returns a boolean if a field has been set. + +### GetAccessTokenExpirationMinutes + +`func (o *AuthServerConfiguration) GetAccessTokenExpirationMinutes() int32` + +GetAccessTokenExpirationMinutes returns the AccessTokenExpirationMinutes field if non-nil, zero value otherwise. + +### GetAccessTokenExpirationMinutesOk + +`func (o *AuthServerConfiguration) GetAccessTokenExpirationMinutesOk() (*int32, bool)` + +GetAccessTokenExpirationMinutesOk returns a tuple with the AccessTokenExpirationMinutes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccessTokenExpirationMinutes + +`func (o *AuthServerConfiguration) SetAccessTokenExpirationMinutes(v int32)` + +SetAccessTokenExpirationMinutes sets AccessTokenExpirationMinutes field to given value. + +### HasAccessTokenExpirationMinutes + +`func (o *AuthServerConfiguration) HasAccessTokenExpirationMinutes() bool` + +HasAccessTokenExpirationMinutes 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/ClientApp.md b/docs/ClientApp.md new file mode 100644 index 0000000..88d0163 --- /dev/null +++ b/docs/ClientApp.md @@ -0,0 +1,82 @@ +# ClientApp + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AppId** | Pointer to **int32** | | [optional] +**ApiAuthId** | Pointer to **int32** | | [optional] + +## Methods + +### NewClientApp + +`func NewClientApp() *ClientApp` + +NewClientApp instantiates a new ClientApp 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 + +### NewClientAppWithDefaults + +`func NewClientAppWithDefaults() *ClientApp` + +NewClientAppWithDefaults instantiates a new ClientApp 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 + +### GetAppId + +`func (o *ClientApp) GetAppId() int32` + +GetAppId returns the AppId field if non-nil, zero value otherwise. + +### GetAppIdOk + +`func (o *ClientApp) GetAppIdOk() (*int32, bool)` + +GetAppIdOk returns a tuple with the AppId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAppId + +`func (o *ClientApp) SetAppId(v int32)` + +SetAppId sets AppId field to given value. + +### HasAppId + +`func (o *ClientApp) HasAppId() bool` + +HasAppId returns a boolean if a field has been set. + +### GetApiAuthId + +`func (o *ClientApp) GetApiAuthId() int32` + +GetApiAuthId returns the ApiAuthId field if non-nil, zero value otherwise. + +### GetApiAuthIdOk + +`func (o *ClientApp) GetApiAuthIdOk() (*int32, bool)` + +GetApiAuthIdOk returns a tuple with the ApiAuthId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetApiAuthId + +`func (o *ClientApp) SetApiAuthId(v int32)` + +SetApiAuthId sets ApiAuthId field to given value. + +### HasApiAuthId + +`func (o *ClientApp) HasApiAuthId() bool` + +HasApiAuthId 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/Condition.md b/docs/Condition.md new file mode 100644 index 0000000..e918ca3 --- /dev/null +++ b/docs/Condition.md @@ -0,0 +1,108 @@ +# Condition + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Source** | Pointer to **string** | The source field to check. | [optional] +**Operator** | Pointer to **string** | A valid operator for the selected condition source | [optional] +**Value** | Pointer to **string** | A plain text string or valid value for the selected condition source. | [optional] + +## Methods + +### NewCondition + +`func NewCondition() *Condition` + +NewCondition instantiates a new Condition 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 + +### NewConditionWithDefaults + +`func NewConditionWithDefaults() *Condition` + +NewConditionWithDefaults instantiates a new Condition 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 + +### GetSource + +`func (o *Condition) GetSource() string` + +GetSource returns the Source field if non-nil, zero value otherwise. + +### GetSourceOk + +`func (o *Condition) GetSourceOk() (*string, 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 *Condition) SetSource(v string)` + +SetSource sets Source field to given value. + +### HasSource + +`func (o *Condition) HasSource() bool` + +HasSource returns a boolean if a field has been set. + +### GetOperator + +`func (o *Condition) GetOperator() string` + +GetOperator returns the Operator field if non-nil, zero value otherwise. + +### GetOperatorOk + +`func (o *Condition) GetOperatorOk() (*string, bool)` + +GetOperatorOk returns a tuple with the Operator field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOperator + +`func (o *Condition) SetOperator(v string)` + +SetOperator sets Operator field to given value. + +### HasOperator + +`func (o *Condition) HasOperator() bool` + +HasOperator returns a boolean if a field has been set. + +### GetValue + +`func (o *Condition) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *Condition) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *Condition) SetValue(v string)` + +SetValue sets Value field to given value. + +### HasValue + +`func (o *Condition) HasValue() bool` + +HasValue 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/Connector.md b/docs/Connector.md new file mode 100644 index 0000000..eff1d8f --- /dev/null +++ b/docs/Connector.md @@ -0,0 +1,160 @@ +# Connector + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **int32** | The connectors unique ID in OneLogin. | [optional] +**Name** | Pointer to **string** | The name of the connector. | [optional] +**AuthMethod** | Pointer to [**AuthMethod**](AuthMethod.md) | | [optional] +**AllowsNewParameters** | Pointer to **bool** | Indicates if apps created using this connector will be allowed to create custom parameters. | [optional] +**IconUrl** | Pointer to **string** | A link to the apps icon url. | [optional] + +## Methods + +### NewConnector + +`func NewConnector() *Connector` + +NewConnector instantiates a new Connector 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 + +### NewConnectorWithDefaults + +`func NewConnectorWithDefaults() *Connector` + +NewConnectorWithDefaults instantiates a new Connector 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 + +### GetId + +`func (o *Connector) GetId() int32` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Connector) GetIdOk() (*int32, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Connector) SetId(v int32)` + +SetId sets Id field to given value. + +### HasId + +`func (o *Connector) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetName + +`func (o *Connector) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Connector) 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 *Connector) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *Connector) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetAuthMethod + +`func (o *Connector) GetAuthMethod() AuthMethod` + +GetAuthMethod returns the AuthMethod field if non-nil, zero value otherwise. + +### GetAuthMethodOk + +`func (o *Connector) GetAuthMethodOk() (*AuthMethod, bool)` + +GetAuthMethodOk returns a tuple with the AuthMethod field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAuthMethod + +`func (o *Connector) SetAuthMethod(v AuthMethod)` + +SetAuthMethod sets AuthMethod field to given value. + +### HasAuthMethod + +`func (o *Connector) HasAuthMethod() bool` + +HasAuthMethod returns a boolean if a field has been set. + +### GetAllowsNewParameters + +`func (o *Connector) GetAllowsNewParameters() bool` + +GetAllowsNewParameters returns the AllowsNewParameters field if non-nil, zero value otherwise. + +### GetAllowsNewParametersOk + +`func (o *Connector) GetAllowsNewParametersOk() (*bool, bool)` + +GetAllowsNewParametersOk returns a tuple with the AllowsNewParameters field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAllowsNewParameters + +`func (o *Connector) SetAllowsNewParameters(v bool)` + +SetAllowsNewParameters sets AllowsNewParameters field to given value. + +### HasAllowsNewParameters + +`func (o *Connector) HasAllowsNewParameters() bool` + +HasAllowsNewParameters returns a boolean if a field has been set. + +### GetIconUrl + +`func (o *Connector) GetIconUrl() string` + +GetIconUrl returns the IconUrl field if non-nil, zero value otherwise. + +### GetIconUrlOk + +`func (o *Connector) GetIconUrlOk() (*string, bool)` + +GetIconUrlOk returns a tuple with the IconUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIconUrl + +`func (o *Connector) SetIconUrl(v string)` + +SetIconUrl sets IconUrl field to given value. + +### HasIconUrl + +`func (o *Connector) HasIconUrl() bool` + +HasIconUrl 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/CreateAuthorizationServerRequest.md b/docs/CreateAuthorizationServerRequest.md new file mode 100644 index 0000000..9a089e4 --- /dev/null +++ b/docs/CreateAuthorizationServerRequest.md @@ -0,0 +1,108 @@ +# CreateAuthorizationServerRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | | [optional] +**Description** | Pointer to **string** | | [optional] +**Configuration** | Pointer to [**AuthServerConfiguration**](AuthServerConfiguration.md) | | [optional] + +## Methods + +### NewCreateAuthorizationServerRequest + +`func NewCreateAuthorizationServerRequest() *CreateAuthorizationServerRequest` + +NewCreateAuthorizationServerRequest instantiates a new CreateAuthorizationServerRequest 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 + +### NewCreateAuthorizationServerRequestWithDefaults + +`func NewCreateAuthorizationServerRequestWithDefaults() *CreateAuthorizationServerRequest` + +NewCreateAuthorizationServerRequestWithDefaults instantiates a new CreateAuthorizationServerRequest 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 *CreateAuthorizationServerRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *CreateAuthorizationServerRequest) 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 *CreateAuthorizationServerRequest) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *CreateAuthorizationServerRequest) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetDescription + +`func (o *CreateAuthorizationServerRequest) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *CreateAuthorizationServerRequest) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *CreateAuthorizationServerRequest) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *CreateAuthorizationServerRequest) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetConfiguration + +`func (o *CreateAuthorizationServerRequest) GetConfiguration() AuthServerConfiguration` + +GetConfiguration returns the Configuration field if non-nil, zero value otherwise. + +### GetConfigurationOk + +`func (o *CreateAuthorizationServerRequest) GetConfigurationOk() (*AuthServerConfiguration, bool)` + +GetConfigurationOk returns a tuple with the Configuration field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConfiguration + +`func (o *CreateAuthorizationServerRequest) SetConfiguration(v AuthServerConfiguration)` + +SetConfiguration sets Configuration field to given value. + +### HasConfiguration + +`func (o *CreateAuthorizationServerRequest) HasConfiguration() bool` + +HasConfiguration 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/CreateEnvironmentVariableRequest.md b/docs/CreateEnvironmentVariableRequest.md new file mode 100644 index 0000000..5035ab4 --- /dev/null +++ b/docs/CreateEnvironmentVariableRequest.md @@ -0,0 +1,72 @@ +# CreateEnvironmentVariableRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name for the environment variable that will be used to retrieve the value from a hook function. | +**Value** | **string** | The secret value that will be encrypted at rest and injected in applicable hook functions at run time. | + +## Methods + +### NewCreateEnvironmentVariableRequest + +`func NewCreateEnvironmentVariableRequest(name string, value string, ) *CreateEnvironmentVariableRequest` + +NewCreateEnvironmentVariableRequest instantiates a new CreateEnvironmentVariableRequest 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 + +### NewCreateEnvironmentVariableRequestWithDefaults + +`func NewCreateEnvironmentVariableRequestWithDefaults() *CreateEnvironmentVariableRequest` + +NewCreateEnvironmentVariableRequestWithDefaults instantiates a new CreateEnvironmentVariableRequest 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 *CreateEnvironmentVariableRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *CreateEnvironmentVariableRequest) 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 *CreateEnvironmentVariableRequest) SetName(v string)` + +SetName sets Name field to given value. + + +### GetValue + +`func (o *CreateEnvironmentVariableRequest) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *CreateEnvironmentVariableRequest) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *CreateEnvironmentVariableRequest) SetValue(v string)` + +SetValue sets Value 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/CreateRoles201ResponseInner.md b/docs/CreateRoles201ResponseInner.md new file mode 100644 index 0000000..c78fc7e --- /dev/null +++ b/docs/CreateRoles201ResponseInner.md @@ -0,0 +1,56 @@ +# CreateRoles201ResponseInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **int32** | | [optional] + +## Methods + +### NewCreateRoles201ResponseInner + +`func NewCreateRoles201ResponseInner() *CreateRoles201ResponseInner` + +NewCreateRoles201ResponseInner instantiates a new CreateRoles201ResponseInner 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 + +### NewCreateRoles201ResponseInnerWithDefaults + +`func NewCreateRoles201ResponseInnerWithDefaults() *CreateRoles201ResponseInner` + +NewCreateRoles201ResponseInnerWithDefaults instantiates a new CreateRoles201ResponseInner 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 + +### GetId + +`func (o *CreateRoles201ResponseInner) GetId() int32` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *CreateRoles201ResponseInner) GetIdOk() (*int32, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *CreateRoles201ResponseInner) SetId(v int32)` + +SetId sets Id field to given value. + +### HasId + +`func (o *CreateRoles201ResponseInner) HasId() bool` + +HasId 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/DefaultApi.md b/docs/DefaultApi.md new file mode 100644 index 0000000..ca98089 --- /dev/null +++ b/docs/DefaultApi.md @@ -0,0 +1,7263 @@ +# \DefaultApi + +All URIs are relative to *https://onelogininc.onelogin.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ActivateFactor**](DefaultApi.md#ActivateFactor) | **Post** /api/2/mfa/users/{user_id}/verifications | +[**AddAccessTokenClaim**](DefaultApi.md#AddAccessTokenClaim) | **Post** /api/2/api_authorizations/{id}/claims | +[**AddClientApp**](DefaultApi.md#AddClientApp) | **Post** /api/2/api_authorizations/{id}/clients | +[**AddRoleAdmins**](DefaultApi.md#AddRoleAdmins) | **Post** /api/2/roles/{role_id}/admins | +[**AddRoleUsers**](DefaultApi.md#AddRoleUsers) | **Post** /api/2/roles/{role_id}/users | +[**AddScope**](DefaultApi.md#AddScope) | **Post** /api/2/api_authorizations/{id}/scopes | +[**BulkMappingSort**](DefaultApi.md#BulkMappingSort) | **Put** /api/2/apps/mappings/sort | +[**BulkSort**](DefaultApi.md#BulkSort) | **Put** /api/2/apps/{app_id}/rules/sort | +[**CreateApp**](DefaultApi.md#CreateApp) | **Post** /api/2/apps | +[**CreateAuthorizationServer**](DefaultApi.md#CreateAuthorizationServer) | **Post** /api/2/api_authorizations | +[**CreateEnvironmentVariable**](DefaultApi.md#CreateEnvironmentVariable) | **Post** /api/2/hooks/envs | +[**CreateHook**](DefaultApi.md#CreateHook) | **Post** /api/2/hooks | +[**CreateMapping**](DefaultApi.md#CreateMapping) | **Post** /api/2/mappings | +[**CreateRiskRule**](DefaultApi.md#CreateRiskRule) | **Post** /api/2/risk/rules | +[**CreateRoles**](DefaultApi.md#CreateRoles) | **Post** /api/2/roles | +[**CreateRule**](DefaultApi.md#CreateRule) | **Post** /api/2/apps/{app_id}/rules | +[**CreateUser**](DefaultApi.md#CreateUser) | **Post** /api/2/users | +[**DeleteAccessTokenClaim**](DefaultApi.md#DeleteAccessTokenClaim) | **Delete** /api/2/api_authorizations/{id}/claims/{claim_id} | +[**DeleteApp**](DefaultApi.md#DeleteApp) | **Delete** /api/2/apps/{app_id} | +[**DeleteAppParameter**](DefaultApi.md#DeleteAppParameter) | **Delete** /api/2/apps/{app_id}/parameters/{parameter_id} | +[**DeleteAuthorizationServer**](DefaultApi.md#DeleteAuthorizationServer) | **Delete** /api/2/api_authorizations/{id} | +[**DeleteEnvironmentVariable**](DefaultApi.md#DeleteEnvironmentVariable) | **Delete** /api/2/hooks/envs/{envvar_id} | +[**DeleteFactor**](DefaultApi.md#DeleteFactor) | **Delete** /api/2/mfa/users/{user_id}/devices/{device_id} | +[**DeleteHook**](DefaultApi.md#DeleteHook) | **Delete** /api/2/hooks/{hook_id} | +[**DeleteMapping**](DefaultApi.md#DeleteMapping) | **Delete** /api/2/mappings/{mapping_id} | +[**DeleteRiskRule**](DefaultApi.md#DeleteRiskRule) | **Delete** /api/2/risk/rules/{risk_rule_id} | +[**DeleteRole**](DefaultApi.md#DeleteRole) | **Delete** /api/2/roles/{role_id} | +[**DeleteRule**](DefaultApi.md#DeleteRule) | **Delete** /api/2/apps/{app_id}/rules/{rule_id} | +[**DeleteScope**](DefaultApi.md#DeleteScope) | **Delete** /api/2/api_authorizations/{id}/scopes/{scope_id} | +[**DeleteUser**](DefaultApi.md#DeleteUser) | **Delete** /api/2/users/{user_id} | +[**DryRunMapping**](DefaultApi.md#DryRunMapping) | **Post** /api/2/mappings/{mapping_id}/dryrun | +[**EnrollFactor**](DefaultApi.md#EnrollFactor) | **Post** /api/2/mfa/users/{user_id}/registrations | +[**GenerateMfaToken**](DefaultApi.md#GenerateMfaToken) | **Post** /api/2/mfs/users/{user_id}/mfa_token | +[**GenerateSamlAssertion**](DefaultApi.md#GenerateSamlAssertion) | **Post** /api/2/saml_assertion | +[**GenerateToken**](DefaultApi.md#GenerateToken) | **Post** /auth/oauth2/v2/token | +[**GetApp**](DefaultApi.md#GetApp) | **Get** /api/2/apps/{app_id} | +[**GetAuthorizationServer**](DefaultApi.md#GetAuthorizationServer) | **Get** /api/2/api_authorizations/{id} | +[**GetAvailableFactors**](DefaultApi.md#GetAvailableFactors) | **Get** /api/2/mfa/users/{user_id}/factors | +[**GetClientApps**](DefaultApi.md#GetClientApps) | **Get** /api/2/api_authorizations/{id}/clients | +[**GetEnrolledFactors**](DefaultApi.md#GetEnrolledFactors) | **Get** /api/2/mfa/users/{user_id}/devices | +[**GetEnvironmentVariable**](DefaultApi.md#GetEnvironmentVariable) | **Get** /api/2/hooks/envs/{envvar_id} | +[**GetHook**](DefaultApi.md#GetHook) | **Get** /api/2/hooks/{hook_id} | +[**GetLogs**](DefaultApi.md#GetLogs) | **Get** /api/2/hooks/{hook_id}/logs | +[**GetMapping**](DefaultApi.md#GetMapping) | **Get** /api/2/mappings/{mapping_id} | +[**GetRateLimit**](DefaultApi.md#GetRateLimit) | **Get** /auth/rate_limit | +[**GetRiskRule**](DefaultApi.md#GetRiskRule) | **Get** /api/2/risk/rules/{risk_rule_id} | +[**GetRiskScore**](DefaultApi.md#GetRiskScore) | **Post** /api/2/risk/verify | +[**GetRole**](DefaultApi.md#GetRole) | **Get** /api/2/roles/{role_id} | +[**GetRoleAdmins**](DefaultApi.md#GetRoleAdmins) | **Get** /api/2/roles/{role_id}/admins | +[**GetRoleApps**](DefaultApi.md#GetRoleApps) | **Get** /api/2/roles/{role_id}/apps | +[**GetRoleUsers**](DefaultApi.md#GetRoleUsers) | **Get** /api/2/roles/{role_id}/users | +[**GetRule**](DefaultApi.md#GetRule) | **Get** /api/2/apps/{app_id}/rules/{rule_id} | +[**GetScoreInsights**](DefaultApi.md#GetScoreInsights) | **Get** /api/2/risk/scores | +[**GetUser**](DefaultApi.md#GetUser) | **Get** /api/2/users/{user_id} | +[**GetUserApps**](DefaultApi.md#GetUserApps) | **Get** /api/2/users/{user_id}/apps | +[**ListAccessTokenClaims**](DefaultApi.md#ListAccessTokenClaims) | **Get** /api/2/api_authorizations/{id}/claims | +[**ListActionValues**](DefaultApi.md#ListActionValues) | **Get** /api/2/apps/{app_id}/rules/actions/{actuion_value}/values | +[**ListActions**](DefaultApi.md#ListActions) | **Get** /api/2/apps/{app_id}/rules/actions | +[**ListAppUsers**](DefaultApi.md#ListAppUsers) | **Get** /api/2/apps/{app_id}/users | +[**ListApps**](DefaultApi.md#ListApps) | **Get** /api/2/apps | +[**ListAuthorizationServers**](DefaultApi.md#ListAuthorizationServers) | **Get** /api/2/api_authorizations | +[**ListConditionOperators**](DefaultApi.md#ListConditionOperators) | **Get** /api/2/apps/{app_id}/rules/conditions/{condition_value}/operators | +[**ListConditionValues**](DefaultApi.md#ListConditionValues) | **Get** /api/2/apps/{app_id}/rules/conditions/{condition_value}/values | +[**ListConditions**](DefaultApi.md#ListConditions) | **Get** /api/2/apps/{app_id}/rules/conditions | +[**ListConnectors**](DefaultApi.md#ListConnectors) | **Get** /api/2/connectors | +[**ListEnvironmentVariables**](DefaultApi.md#ListEnvironmentVariables) | **Get** /api/2/hooks/envs | +[**ListHooks**](DefaultApi.md#ListHooks) | **Get** /api/2/hooks | +[**ListMappingActionValues**](DefaultApi.md#ListMappingActionValues) | **Get** /api/2/apps/mappings/actions/{actuion_value}/values | +[**ListMappingActions**](DefaultApi.md#ListMappingActions) | **Get** /api/2/apps/mappings/actions | +[**ListMappingConditionOperators**](DefaultApi.md#ListMappingConditionOperators) | **Get** /api/2/apps/mappings/conditions/{condition_value}/operators | +[**ListMappingConditionValues**](DefaultApi.md#ListMappingConditionValues) | **Get** /api/2/apps/mappings/conditions/{condition_value}/values | +[**ListMappingConditions**](DefaultApi.md#ListMappingConditions) | **Get** /api/2/apps/mappings/conditions | +[**ListMappings**](DefaultApi.md#ListMappings) | **Get** /api/2/mappings | +[**ListRiskRules**](DefaultApi.md#ListRiskRules) | **Get** /api/2/risk/rules | +[**ListRoles**](DefaultApi.md#ListRoles) | **Get** /api/2/roles | +[**ListRules**](DefaultApi.md#ListRules) | **Get** /api/2/apps/{app_id}/rules | +[**ListScopes**](DefaultApi.md#ListScopes) | **Get** /api/2/api_authorizations/{id}/scopes | +[**ListUsers**](DefaultApi.md#ListUsers) | **Get** /api/2/users | +[**RemoveClientApp**](DefaultApi.md#RemoveClientApp) | **Delete** /api/2/api_authorizations/{id}/clients/{client_app_id} | +[**RemoveRoleAdmins**](DefaultApi.md#RemoveRoleAdmins) | **Delete** /api/2/roles/{role_id}/admins | +[**RemoveRoleUsers**](DefaultApi.md#RemoveRoleUsers) | **Delete** /api/2/roles/{role_id}/users | +[**RevokeToken**](DefaultApi.md#RevokeToken) | **Post** /auth/oauth2/revoke | +[**SetRoleApps**](DefaultApi.md#SetRoleApps) | **Put** /api/2/roles/{role_id}/apps | +[**TrackEvent**](DefaultApi.md#TrackEvent) | **Post** /api/2/risk/events | +[**UpdateAccessTokenClaim**](DefaultApi.md#UpdateAccessTokenClaim) | **Put** /api/2/api_authorizations/{id}/claims/{claim_id} | +[**UpdateApp**](DefaultApi.md#UpdateApp) | **Put** /api/2/apps/{app_id} | +[**UpdateAuthorizationServer**](DefaultApi.md#UpdateAuthorizationServer) | **Put** /api/2/api_authorizations/{id} | +[**UpdateClientApp**](DefaultApi.md#UpdateClientApp) | **Put** /api/2/api_authorizations/{id}/clients/{client_app_id} | +[**UpdateEnvironmentVariable**](DefaultApi.md#UpdateEnvironmentVariable) | **Put** /api/2/hooks/envs/{envvar_id} | +[**UpdateHook**](DefaultApi.md#UpdateHook) | **Put** /api/2/hooks/{hook_id} | +[**UpdateMapping**](DefaultApi.md#UpdateMapping) | **Put** /api/2/mappings/{mapping_id} | +[**UpdateRiskRule**](DefaultApi.md#UpdateRiskRule) | **Put** /api/2/risk/rules/{risk_rule_id} | +[**UpdateRole**](DefaultApi.md#UpdateRole) | **Put** /api/2/roles/{role_id} | +[**UpdateRule**](DefaultApi.md#UpdateRule) | **Put** /api/2/apps/{app_id}/rules/{rule_id} | +[**UpdateScope**](DefaultApi.md#UpdateScope) | **Put** /api/2/api_authorizations/{id}/scopes/{scope_id} | +[**UpdateUser**](DefaultApi.md#UpdateUser) | **Put** /api/2/users/{user_id} | +[**VerifyEnrollment**](DefaultApi.md#VerifyEnrollment) | **Put** /api/2/mfa/users/{user_id}/registrations/{registration_id} | +[**VerifyEnrollmentVoiceProtect**](DefaultApi.md#VerifyEnrollmentVoiceProtect) | **Get** /api/2/mfa/users/{user_id}/registrations/{registration_id} | +[**VerifyFactor**](DefaultApi.md#VerifyFactor) | **Put** /api/2/mfa/users/{user_id}/verifications/{verification_id} | +[**VerifyFactorSaml**](DefaultApi.md#VerifyFactorSaml) | **Post** /api/2/saml_assertion/verify_factor | +[**VerifyFactorVoice**](DefaultApi.md#VerifyFactorVoice) | **Get** /api/2/mfa/users/{user_id}/verifications/{verification_id} | + + + +## ActivateFactor + +> ActivateFactor(ctx, userId).Authorization(authorization).ActivateFactorRequest(activateFactorRequest).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + userId := int32(56) // int32 | Set to the id of the user. + activateFactorRequest := *openapiclient.NewActivateFactorRequest() // ActivateFactorRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.ActivateFactor(context.Background(), userId).Authorization(authorization).ActivateFactorRequest(activateFactorRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.ActivateFactor``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**userId** | **int32** | Set to the id of the user. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiActivateFactorRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + + **activateFactorRequest** | [**ActivateFactorRequest**](ActivateFactorRequest.md) | | + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## AddAccessTokenClaim + +> Id AddAccessTokenClaim(ctx, id).Authorization(authorization).AddAccessTokenClaimRequest(addAccessTokenClaimRequest).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + id := int32(56) // int32 | + addAccessTokenClaimRequest := *openapiclient.NewAddAccessTokenClaimRequest() // AddAccessTokenClaimRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.AddAccessTokenClaim(context.Background(), id).Authorization(authorization).AddAccessTokenClaimRequest(addAccessTokenClaimRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.AddAccessTokenClaim``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AddAccessTokenClaim`: Id + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.AddAccessTokenClaim`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **int32** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiAddAccessTokenClaimRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + + **addAccessTokenClaimRequest** | [**AddAccessTokenClaimRequest**](AddAccessTokenClaimRequest.md) | | + +### Return type + +[**Id**](Id.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## AddClientApp + +> ClientApp AddClientApp(ctx, id).Authorization(authorization).AddClientAppRequest(addClientAppRequest).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + id := int32(56) // int32 | + addClientAppRequest := *openapiclient.NewAddClientAppRequest() // AddClientAppRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.AddClientApp(context.Background(), id).Authorization(authorization).AddClientAppRequest(addClientAppRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.AddClientApp``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AddClientApp`: ClientApp + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.AddClientApp`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **int32** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiAddClientAppRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + + **addClientAppRequest** | [**AddClientAppRequest**](AddClientAppRequest.md) | | + +### Return type + +[**ClientApp**](ClientApp.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## AddRoleAdmins + +> []AddRoleUsers200ResponseInner AddRoleAdmins(ctx, roleId).Authorization(authorization).RequestBody(requestBody).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + roleId := int32(56) // int32 | Set to the id of the role you want to return. + requestBody := []int32{int32(123)} // []int32 | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.AddRoleAdmins(context.Background(), roleId).Authorization(authorization).RequestBody(requestBody).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.AddRoleAdmins``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AddRoleAdmins`: []AddRoleUsers200ResponseInner + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.AddRoleAdmins`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**roleId** | **int32** | Set to the id of the role you want to return. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiAddRoleAdminsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + + **requestBody** | **[]int32** | | + +### Return type + +[**[]AddRoleUsers200ResponseInner**](AddRoleUsers200ResponseInner.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## AddRoleUsers + +> []AddRoleUsers200ResponseInner AddRoleUsers(ctx, roleId).Authorization(authorization).RequestBody(requestBody).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + roleId := int32(56) // int32 | Set to the id of the role you want to return. + requestBody := []int32{int32(123)} // []int32 | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.AddRoleUsers(context.Background(), roleId).Authorization(authorization).RequestBody(requestBody).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.AddRoleUsers``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AddRoleUsers`: []AddRoleUsers200ResponseInner + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.AddRoleUsers`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**roleId** | **int32** | Set to the id of the role you want to return. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiAddRoleUsersRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + + **requestBody** | **[]int32** | | + +### Return type + +[**[]AddRoleUsers200ResponseInner**](AddRoleUsers200ResponseInner.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## AddScope + +> Id AddScope(ctx, id).Authorization(authorization).AddScopeRequest(addScopeRequest).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + id := int32(56) // int32 | + addScopeRequest := *openapiclient.NewAddScopeRequest() // AddScopeRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.AddScope(context.Background(), id).Authorization(authorization).AddScopeRequest(addScopeRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.AddScope``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AddScope`: Id + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.AddScope`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **int32** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiAddScopeRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + + **addScopeRequest** | [**AddScopeRequest**](AddScopeRequest.md) | | + +### Return type + +[**Id**](Id.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## BulkMappingSort + +> []int32 BulkMappingSort(ctx).Authorization(authorization).RequestBody(requestBody).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + requestBody := []int32{int32(123)} // []int32 | The request body must contain an array of User Mapping IDs in the desired order. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.BulkMappingSort(context.Background()).Authorization(authorization).RequestBody(requestBody).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.BulkMappingSort``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `BulkMappingSort`: []int32 + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.BulkMappingSort`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiBulkMappingSortRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + **requestBody** | **[]int32** | The request body must contain an array of User Mapping IDs in the desired order. | + +### Return type + +**[]int32** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## BulkSort + +> []int32 BulkSort(ctx, appId).Authorization(authorization).RequestBody(requestBody).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + appId := int32(56) // int32 | + requestBody := []int32{int32(123)} // []int32 | The request body must contain an array of App Rule IDs in the desired order. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.BulkSort(context.Background(), appId).Authorization(authorization).RequestBody(requestBody).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.BulkSort``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `BulkSort`: []int32 + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.BulkSort`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**appId** | **int32** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiBulkSortRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + + **requestBody** | **[]int32** | The request body must contain an array of App Rule IDs in the desired order. | + +### Return type + +**[]int32** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateApp + +> Schema CreateApp(ctx).Authorization(authorization).Schema(schema).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + schema := *openapiclient.NewSchema() // Schema | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.CreateApp(context.Background()).Authorization(authorization).Schema(schema).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.CreateApp``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateApp`: Schema + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.CreateApp`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateAppRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + **schema** | [**Schema**](Schema.md) | | + +### Return type + +[**Schema**](Schema.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateAuthorizationServer + +> Id CreateAuthorizationServer(ctx).Authorization(authorization).CreateAuthorizationServerRequest(createAuthorizationServerRequest).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + createAuthorizationServerRequest := *openapiclient.NewCreateAuthorizationServerRequest() // CreateAuthorizationServerRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.CreateAuthorizationServer(context.Background()).Authorization(authorization).CreateAuthorizationServerRequest(createAuthorizationServerRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.CreateAuthorizationServer``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateAuthorizationServer`: Id + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.CreateAuthorizationServer`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateAuthorizationServerRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + **createAuthorizationServerRequest** | [**CreateAuthorizationServerRequest**](CreateAuthorizationServerRequest.md) | | + +### Return type + +[**Id**](Id.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateEnvironmentVariable + +> Envvar CreateEnvironmentVariable(ctx).Authorization(authorization).CreateEnvironmentVariableRequest(createEnvironmentVariableRequest).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + createEnvironmentVariableRequest := *openapiclient.NewCreateEnvironmentVariableRequest("Name_example", "Value_example") // CreateEnvironmentVariableRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.CreateEnvironmentVariable(context.Background()).Authorization(authorization).CreateEnvironmentVariableRequest(createEnvironmentVariableRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.CreateEnvironmentVariable``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateEnvironmentVariable`: Envvar + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.CreateEnvironmentVariable`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateEnvironmentVariableRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + **createEnvironmentVariableRequest** | [**CreateEnvironmentVariableRequest**](CreateEnvironmentVariableRequest.md) | | + +### Return type + +[**Envvar**](Envvar.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateHook + +> CreateHook(ctx).Authorization(authorization).Hook(hook).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + hook := *openapiclient.NewHook("Type_example", false, int32(123), []string{"EnvVars_example"}, "Runtime_example", int32(123), map[string]interface{}(123), "Function_example") // Hook | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.CreateHook(context.Background()).Authorization(authorization).Hook(hook).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.CreateHook``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateHookRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + **hook** | [**Hook**](Hook.md) | | + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateMapping + +> int32 CreateMapping(ctx).Authorization(authorization).Mapping(mapping).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + mapping := *openapiclient.NewMapping("Name_example", false, "Match_example", int32(123), []openapiclient.Action{*openapiclient.NewAction()}) // Mapping | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.CreateMapping(context.Background()).Authorization(authorization).Mapping(mapping).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.CreateMapping``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateMapping`: int32 + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.CreateMapping`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateMappingRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + **mapping** | [**Mapping**](Mapping.md) | | + +### Return type + +**int32** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateRiskRule + +> CreateRiskRule(ctx).Authorization(authorization).RiskRule(riskRule).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + riskRule := *openapiclient.NewRiskRule() // RiskRule | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.CreateRiskRule(context.Background()).Authorization(authorization).RiskRule(riskRule).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.CreateRiskRule``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateRiskRuleRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + **riskRule** | [**RiskRule**](RiskRule.md) | | + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateRoles + +> []CreateRoles201ResponseInner CreateRoles(ctx).Authorization(authorization).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.CreateRoles(context.Background()).Authorization(authorization).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.CreateRoles``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateRoles`: []CreateRoles201ResponseInner + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.CreateRoles`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateRolesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + +### Return type + +[**[]CreateRoles201ResponseInner**](CreateRoles201ResponseInner.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateRule + +> RuleId CreateRule(ctx, appId).Authorization(authorization).Rule(rule).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + appId := int32(56) // int32 | + rule := *openapiclient.NewRule() // Rule | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.CreateRule(context.Background(), appId).Authorization(authorization).Rule(rule).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.CreateRule``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateRule`: RuleId + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.CreateRule`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**appId** | **int32** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateRuleRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + + **rule** | [**Rule**](Rule.md) | | + +### Return type + +[**RuleId**](RuleId.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateUser + +> User CreateUser(ctx).Authorization(authorization).User(user).Mappings(mappings).ValidatePolicy(validatePolicy).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + user := *openapiclient.NewUser() // User | + mappings := "mappings_example" // string | Controls how mappings will be applied to the user on creation. Defaults to async. (optional) + validatePolicy := true // bool | Will passwords validate against the User Policy? Defaults to true. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.CreateUser(context.Background()).Authorization(authorization).User(user).Mappings(mappings).ValidatePolicy(validatePolicy).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.CreateUser``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateUser`: User + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.CreateUser`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateUserRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + **user** | [**User**](User.md) | | + **mappings** | **string** | Controls how mappings will be applied to the user on creation. Defaults to async. | + **validatePolicy** | **bool** | Will passwords validate against the User Policy? Defaults to true. | + +### Return type + +[**User**](User.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteAccessTokenClaim + +> DeleteAccessTokenClaim(ctx, id, claimId).Authorization(authorization).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + id := int32(56) // int32 | + claimId := int32(56) // int32 | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.DeleteAccessTokenClaim(context.Background(), id, claimId).Authorization(authorization).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.DeleteAccessTokenClaim``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **int32** | | +**claimId** | **int32** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteAccessTokenClaimRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + + + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteApp + +> DeleteApp(ctx, appId).Authorization(authorization).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + appId := int32(56) // int32 | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.DeleteApp(context.Background(), appId).Authorization(authorization).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.DeleteApp``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**appId** | **int32** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteAppRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteAppParameter + +> DeleteAppParameter(ctx, appId, parameterId).Authorization(authorization).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + appId := int32(56) // int32 | + parameterId := int32(56) // int32 | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.DeleteAppParameter(context.Background(), appId, parameterId).Authorization(authorization).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.DeleteAppParameter``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**appId** | **int32** | | +**parameterId** | **int32** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteAppParameterRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + + + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteAuthorizationServer + +> DeleteAuthorizationServer(ctx, id).Authorization(authorization).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + id := int32(56) // int32 | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.DeleteAuthorizationServer(context.Background(), id).Authorization(authorization).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.DeleteAuthorizationServer``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **int32** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteAuthorizationServerRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteEnvironmentVariable + +> DeleteEnvironmentVariable(ctx, envvarId).Authorization(authorization).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + envvarId := "envvarId_example" // string | Set to the id of the Hook Environment Variable that you want to fetch. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.DeleteEnvironmentVariable(context.Background(), envvarId).Authorization(authorization).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.DeleteEnvironmentVariable``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**envvarId** | **string** | Set to the id of the Hook Environment Variable that you want to fetch. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteEnvironmentVariableRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteFactor + +> DeleteFactor(ctx, userId, deviceId).Authorization(authorization).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + userId := int32(56) // int32 | Set to the id of the user. + deviceId := int32(56) // int32 | Set to the device_id of the MFA device. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.DeleteFactor(context.Background(), userId, deviceId).Authorization(authorization).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.DeleteFactor``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**userId** | **int32** | Set to the id of the user. | +**deviceId** | **int32** | Set to the device_id of the MFA device. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteFactorRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + + + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteHook + +> DeleteHook(ctx, hookId).Authorization(authorization).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + hookId := "hookId_example" // string | Set to the id of the Hook that you want to return. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.DeleteHook(context.Background(), hookId).Authorization(authorization).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.DeleteHook``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**hookId** | **string** | Set to the id of the Hook that you want to return. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteHookRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteMapping + +> DeleteMapping(ctx, mappingId).Authorization(authorization).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + mappingId := int32(56) // int32 | The id of the user mapping to locate. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.DeleteMapping(context.Background(), mappingId).Authorization(authorization).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.DeleteMapping``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**mappingId** | **int32** | The id of the user mapping to locate. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteMappingRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteRiskRule + +> RiskRule DeleteRiskRule(ctx, riskRuleId).Authorization(authorization).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + riskRuleId := "riskRuleId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.DeleteRiskRule(context.Background(), riskRuleId).Authorization(authorization).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.DeleteRiskRule``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DeleteRiskRule`: RiskRule + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.DeleteRiskRule`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**riskRuleId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteRiskRuleRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + + +### Return type + +[**RiskRule**](RiskRule.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteRole + +> DeleteRole(ctx, roleId).Authorization(authorization).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + roleId := int32(56) // int32 | Set to the id of the role you want to return. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.DeleteRole(context.Background(), roleId).Authorization(authorization).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.DeleteRole``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**roleId** | **int32** | Set to the id of the role you want to return. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteRoleRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteRule + +> DeleteRule(ctx, appId, ruleId).Authorization(authorization).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + appId := int32(56) // int32 | + ruleId := int32(56) // int32 | The id of the app rule to locate. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.DeleteRule(context.Background(), appId, ruleId).Authorization(authorization).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.DeleteRule``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**appId** | **int32** | | +**ruleId** | **int32** | The id of the app rule to locate. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteRuleRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + + + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteScope + +> DeleteScope(ctx, id, scopeId).Authorization(authorization).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + id := int32(56) // int32 | + scopeId := int32(56) // int32 | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.DeleteScope(context.Background(), id, scopeId).Authorization(authorization).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.DeleteScope``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **int32** | | +**scopeId** | **int32** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteScopeRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + + + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteUser + +> DeleteUser(ctx, userId).Authorization(authorization).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + userId := int32(56) // int32 | Set to the id of the user that you want to return. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.DeleteUser(context.Background(), userId).Authorization(authorization).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.DeleteUser``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**userId** | **int32** | Set to the id of the user that you want to return. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteUserRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DryRunMapping + +> []map[string]interface{} DryRunMapping(ctx, mappingId).Authorization(authorization).RequestBody(requestBody).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + mappingId := int32(56) // int32 | The id of the user mapping to locate. + requestBody := []int32{int32(123)} // []int32 | Request body is a list of user IDs tested against the mapping conditions to verify that the mapping would be applied + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.DryRunMapping(context.Background(), mappingId).Authorization(authorization).RequestBody(requestBody).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.DryRunMapping``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DryRunMapping`: []map[string]interface{} + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.DryRunMapping`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**mappingId** | **int32** | The id of the user mapping to locate. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDryRunMappingRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + + **requestBody** | **[]int32** | Request body is a list of user IDs tested against the mapping conditions to verify that the mapping would be applied | + +### Return type + +**[]map[string]interface{}** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## EnrollFactor + +> [][]FactorInner EnrollFactor(ctx, userId).Authorization(authorization).EnrollFactorRequest(enrollFactorRequest).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + userId := int32(56) // int32 | Set to the id of the user. + enrollFactorRequest := *openapiclient.NewEnrollFactorRequest(int32(123), "DisplayName_example") // EnrollFactorRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.EnrollFactor(context.Background(), userId).Authorization(authorization).EnrollFactorRequest(enrollFactorRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.EnrollFactor``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `EnrollFactor`: [][]FactorInner + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.EnrollFactor`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**userId** | **int32** | Set to the id of the user. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiEnrollFactorRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + + **enrollFactorRequest** | [**EnrollFactorRequest**](EnrollFactorRequest.md) | | + +### Return type + +[**[][]FactorInner**](array.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GenerateMfaToken + +> GenerateMfaToken200Response GenerateMfaToken(ctx).Authorization(authorization).GenerateMfaTokenRequest(generateMfaTokenRequest).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + generateMfaTokenRequest := *openapiclient.NewGenerateMfaTokenRequest() // GenerateMfaTokenRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.GenerateMfaToken(context.Background()).Authorization(authorization).GenerateMfaTokenRequest(generateMfaTokenRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GenerateMfaToken``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GenerateMfaToken`: GenerateMfaToken200Response + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.GenerateMfaToken`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiGenerateMfaTokenRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + **generateMfaTokenRequest** | [**GenerateMfaTokenRequest**](GenerateMfaTokenRequest.md) | | + +### Return type + +[**GenerateMfaToken200Response**](GenerateMfaToken200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GenerateSamlAssertion + +> GenerateSamlAssertion(ctx).Authorization(authorization).GenerateSamlAssertionRequest(generateSamlAssertionRequest).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + generateSamlAssertionRequest := *openapiclient.NewGenerateSamlAssertionRequest("UsernameOrEmail_example", "Password_example", "AppId_example", "Subdomain_example") // GenerateSamlAssertionRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.GenerateSamlAssertion(context.Background()).Authorization(authorization).GenerateSamlAssertionRequest(generateSamlAssertionRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GenerateSamlAssertion``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiGenerateSamlAssertionRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + **generateSamlAssertionRequest** | [**GenerateSamlAssertionRequest**](GenerateSamlAssertionRequest.md) | | + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GenerateToken + +> GenerateToken200Response GenerateToken(ctx).Authorization(authorization).GenerateTokenRequest(generateTokenRequest).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + generateTokenRequest := *openapiclient.NewGenerateTokenRequest() // GenerateTokenRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.GenerateToken(context.Background()).Authorization(authorization).GenerateTokenRequest(generateTokenRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GenerateToken``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GenerateToken`: GenerateToken200Response + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.GenerateToken`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiGenerateTokenRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + **generateTokenRequest** | [**GenerateTokenRequest**](GenerateTokenRequest.md) | | + +### Return type + +[**GenerateToken200Response**](GenerateToken200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetApp + +> Schema GetApp(ctx, appId).Authorization(authorization).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + appId := int32(56) // int32 | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.GetApp(context.Background(), appId).Authorization(authorization).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GetApp``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetApp`: Schema + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.GetApp`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**appId** | **int32** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetAppRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + + +### Return type + +[**Schema**](Schema.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetAuthorizationServer + +> GetAuthorizationServer200Response GetAuthorizationServer(ctx, id).Authorization(authorization).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + id := int32(56) // int32 | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.GetAuthorizationServer(context.Background(), id).Authorization(authorization).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GetAuthorizationServer``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetAuthorizationServer`: GetAuthorizationServer200Response + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.GetAuthorizationServer`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **int32** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetAuthorizationServerRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + + +### Return type + +[**GetAuthorizationServer200Response**](GetAuthorizationServer200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetAvailableFactors + +> []GetAvailableFactors200ResponseInner GetAvailableFactors(ctx, userId).Authorization(authorization).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + userId := int32(56) // int32 | Set to the id of the user. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.GetAvailableFactors(context.Background(), userId).Authorization(authorization).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GetAvailableFactors``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetAvailableFactors`: []GetAvailableFactors200ResponseInner + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.GetAvailableFactors`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**userId** | **int32** | Set to the id of the user. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetAvailableFactorsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + + +### Return type + +[**[]GetAvailableFactors200ResponseInner**](GetAvailableFactors200ResponseInner.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetClientApps + +> []GetClientApps200ResponseInner GetClientApps(ctx, id).Authorization(authorization).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + id := int32(56) // int32 | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.GetClientApps(context.Background(), id).Authorization(authorization).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GetClientApps``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetClientApps`: []GetClientApps200ResponseInner + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.GetClientApps`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **int32** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetClientAppsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + + +### Return type + +[**[]GetClientApps200ResponseInner**](GetClientApps200ResponseInner.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetEnrolledFactors + +> []Device GetEnrolledFactors(ctx, userId).Authorization(authorization).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + userId := int32(56) // int32 | Set to the id of the user. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.GetEnrolledFactors(context.Background(), userId).Authorization(authorization).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GetEnrolledFactors``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetEnrolledFactors`: []Device + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.GetEnrolledFactors`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**userId** | **int32** | Set to the id of the user. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetEnrolledFactorsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + + +### Return type + +[**[]Device**](Device.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetEnvironmentVariable + +> Envvar GetEnvironmentVariable(ctx, envvarId).Authorization(authorization).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + envvarId := "envvarId_example" // string | Set to the id of the Hook Environment Variable that you want to fetch. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.GetEnvironmentVariable(context.Background(), envvarId).Authorization(authorization).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GetEnvironmentVariable``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetEnvironmentVariable`: Envvar + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.GetEnvironmentVariable`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**envvarId** | **string** | Set to the id of the Hook Environment Variable that you want to fetch. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetEnvironmentVariableRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + + +### Return type + +[**Envvar**](Envvar.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetHook + +> Hook GetHook(ctx, hookId).Authorization(authorization).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + hookId := "hookId_example" // string | Set to the id of the Hook that you want to return. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.GetHook(context.Background(), hookId).Authorization(authorization).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GetHook``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetHook`: Hook + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.GetHook`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**hookId** | **string** | Set to the id of the Hook that you want to return. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetHookRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + + +### Return type + +[**Hook**](Hook.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetLogs + +> []Log GetLogs(ctx, hookId).Authorization(authorization).Limit(limit).Page(page).Cursor(cursor).RequestId(requestId).CorrelationId(correlationId).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + hookId := "hookId_example" // string | Set to the id of the Hook that you want to return. + limit := int32(56) // int32 | The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. (optional) + page := int32(56) // int32 | The page number of results to return. (optional) + cursor := "cursor_example" // string | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. (optional) + requestId := "requestId_example" // string | Returns logs that contain this request_id. (optional) + correlationId := "correlationId_example" // string | Returns logs that contain this correlation_id. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.GetLogs(context.Background(), hookId).Authorization(authorization).Limit(limit).Page(page).Cursor(cursor).RequestId(requestId).CorrelationId(correlationId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GetLogs``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetLogs`: []Log + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.GetLogs`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**hookId** | **string** | Set to the id of the Hook that you want to return. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetLogsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + + **limit** | **int32** | The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. | + **page** | **int32** | The page number of results to return. | + **cursor** | **string** | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. | + **requestId** | **string** | Returns logs that contain this request_id. | + **correlationId** | **string** | Returns logs that contain this correlation_id. | + +### Return type + +[**[]Log**](Log.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetMapping + +> Mapping GetMapping(ctx, mappingId).Authorization(authorization).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + mappingId := int32(56) // int32 | The id of the user mapping to locate. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.GetMapping(context.Background(), mappingId).Authorization(authorization).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GetMapping``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetMapping`: Mapping + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.GetMapping`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**mappingId** | **int32** | The id of the user mapping to locate. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetMappingRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + + +### Return type + +[**Mapping**](Mapping.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetRateLimit + +> GetRateLimit200Response GetRateLimit(ctx).Authorization(authorization).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.GetRateLimit(context.Background()).Authorization(authorization).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GetRateLimit``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetRateLimit`: GetRateLimit200Response + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.GetRateLimit`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetRateLimitRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + +### Return type + +[**GetRateLimit200Response**](GetRateLimit200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetRiskRule + +> GetRiskRule(ctx, riskRuleId).Authorization(authorization).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + riskRuleId := "riskRuleId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.GetRiskRule(context.Background(), riskRuleId).Authorization(authorization).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GetRiskRule``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**riskRuleId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetRiskRuleRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetRiskScore + +> GetRiskScore200Response GetRiskScore(ctx).Authorization(authorization).GetRiskScoreRequest(getRiskScoreRequest).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + getRiskScoreRequest := *openapiclient.NewGetRiskScoreRequest("Ip_example", "UserAgent_example", *openapiclient.NewRiskUser("Id_example")) // GetRiskScoreRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.GetRiskScore(context.Background()).Authorization(authorization).GetRiskScoreRequest(getRiskScoreRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GetRiskScore``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetRiskScore`: GetRiskScore200Response + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.GetRiskScore`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetRiskScoreRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + **getRiskScoreRequest** | [**GetRiskScoreRequest**](GetRiskScoreRequest.md) | | + +### Return type + +[**GetRiskScore200Response**](GetRiskScore200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetRole + +> Role GetRole(ctx, roleId).Authorization(authorization).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + roleId := int32(56) // int32 | Set to the id of the role you want to return. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.GetRole(context.Background(), roleId).Authorization(authorization).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GetRole``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetRole`: Role + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.GetRole`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**roleId** | **int32** | Set to the id of the role you want to return. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetRoleRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + + +### Return type + +[**Role**](Role.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetRoleAdmins + +> []Schema1 GetRoleAdmins(ctx, roleId).Authorization(authorization).Limit(limit).Page(page).Cursor(cursor).Name(name).IncludeUnassigned(includeUnassigned).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + roleId := int32(56) // int32 | Set to the id of the role you want to return. + limit := int32(56) // int32 | The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. (optional) + page := int32(56) // int32 | The page number of results to return. (optional) + cursor := "cursor_example" // string | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. (optional) + name := "name_example" // string | Allows you to filter on first name, last name, username, and email address. (optional) + includeUnassigned := true // bool | Optional. Defaults to false. Include users that aren’t assigned to the role. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.GetRoleAdmins(context.Background(), roleId).Authorization(authorization).Limit(limit).Page(page).Cursor(cursor).Name(name).IncludeUnassigned(includeUnassigned).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GetRoleAdmins``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetRoleAdmins`: []Schema1 + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.GetRoleAdmins`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**roleId** | **int32** | Set to the id of the role you want to return. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetRoleAdminsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + + **limit** | **int32** | The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. | + **page** | **int32** | The page number of results to return. | + **cursor** | **string** | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. | + **name** | **string** | Allows you to filter on first name, last name, username, and email address. | + **includeUnassigned** | **bool** | Optional. Defaults to false. Include users that aren’t assigned to the role. | + +### Return type + +[**[]Schema1**](Schema1.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: applcation/json, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetRoleApps + +> []Schema GetRoleApps(ctx, roleId).Authorization(authorization).Limit(limit).Page(page).Cursor(cursor).Assigned(assigned).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + roleId := int32(56) // int32 | Set to the id of the role you want to return. + limit := int32(56) // int32 | The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. (optional) + page := int32(56) // int32 | The page number of results to return. (optional) + cursor := "cursor_example" // string | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. (optional) + assigned := true // bool | Optional. Defaults to true. Returns all apps not yet assigned to the role. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.GetRoleApps(context.Background(), roleId).Authorization(authorization).Limit(limit).Page(page).Cursor(cursor).Assigned(assigned).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GetRoleApps``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetRoleApps`: []Schema + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.GetRoleApps`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**roleId** | **int32** | Set to the id of the role you want to return. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetRoleAppsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + + **limit** | **int32** | The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. | + **page** | **int32** | The page number of results to return. | + **cursor** | **string** | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. | + **assigned** | **bool** | Optional. Defaults to true. Returns all apps not yet assigned to the role. | + +### Return type + +[**[]Schema**](Schema.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: applcation/json, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetRoleUsers + +> []Schema1 GetRoleUsers(ctx, roleId).Authorization(authorization).Limit(limit).Page(page).Cursor(cursor).Name(name).IncludeUnassigned(includeUnassigned).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + roleId := int32(56) // int32 | Set to the id of the role you want to return. + limit := int32(56) // int32 | The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. (optional) + page := int32(56) // int32 | The page number of results to return. (optional) + cursor := "cursor_example" // string | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. (optional) + name := "name_example" // string | Allows you to filter on first name, last name, username, and email address. (optional) + includeUnassigned := true // bool | Optional. Defaults to false. Include users that aren’t assigned to the role. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.GetRoleUsers(context.Background(), roleId).Authorization(authorization).Limit(limit).Page(page).Cursor(cursor).Name(name).IncludeUnassigned(includeUnassigned).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GetRoleUsers``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetRoleUsers`: []Schema1 + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.GetRoleUsers`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**roleId** | **int32** | Set to the id of the role you want to return. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetRoleUsersRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + + **limit** | **int32** | The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. | + **page** | **int32** | The page number of results to return. | + **cursor** | **string** | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. | + **name** | **string** | Allows you to filter on first name, last name, username, and email address. | + **includeUnassigned** | **bool** | Optional. Defaults to false. Include users that aren’t assigned to the role. | + +### Return type + +[**[]Schema1**](Schema1.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: applcation/json, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetRule + +> Rule GetRule(ctx, appId, ruleId).Authorization(authorization).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + appId := int32(56) // int32 | + ruleId := int32(56) // int32 | The id of the app rule to locate. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.GetRule(context.Background(), appId, ruleId).Authorization(authorization).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GetRule``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetRule`: Rule + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.GetRule`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**appId** | **int32** | | +**ruleId** | **int32** | The id of the app rule to locate. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetRuleRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + + + +### Return type + +[**Rule**](Rule.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetScoreInsights + +> GetScoreInsights200Response GetScoreInsights(ctx).Authorization(authorization).Before(before).After(after).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + before := "before_example" // string | Optional ISO8601 formatted date string. Defaults to current date. Maximum date is 90 days ago. (optional) + after := "after_example" // string | Optional ISO8601 formatted date string. Defaults to 30 days ago. Maximum date is 90 days ago. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.GetScoreInsights(context.Background()).Authorization(authorization).Before(before).After(after).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GetScoreInsights``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetScoreInsights`: GetScoreInsights200Response + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.GetScoreInsights`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetScoreInsightsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + **before** | **string** | Optional ISO8601 formatted date string. Defaults to current date. Maximum date is 90 days ago. | + **after** | **string** | Optional ISO8601 formatted date string. Defaults to 30 days ago. Maximum date is 90 days ago. | + +### Return type + +[**GetScoreInsights200Response**](GetScoreInsights200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetUser + +> User GetUser(ctx, userId).Authorization(authorization).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + userId := int32(56) // int32 | Set to the id of the user that you want to return. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.GetUser(context.Background(), userId).Authorization(authorization).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GetUser``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetUser`: User + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.GetUser`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**userId** | **int32** | Set to the id of the user that you want to return. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetUserRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + + +### Return type + +[**User**](User.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetUserApps + +> []GetUserApps200ResponseInner GetUserApps(ctx, userId).Authorization(authorization).IgnoreVisibility(ignoreVisibility).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + userId := int32(56) // int32 | Set to the id of the user that you want to return. + ignoreVisibility := true // bool | Defaults to `false`. When `true` will show all apps that are assigned to a user regardless of their portal visibility setting. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.GetUserApps(context.Background(), userId).Authorization(authorization).IgnoreVisibility(ignoreVisibility).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GetUserApps``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetUserApps`: []GetUserApps200ResponseInner + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.GetUserApps`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**userId** | **int32** | Set to the id of the user that you want to return. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetUserAppsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + + **ignoreVisibility** | **bool** | Defaults to `false`. When `true` will show all apps that are assigned to a user regardless of their portal visibility setting. | + +### Return type + +[**[]GetUserApps200ResponseInner**](GetUserApps200ResponseInner.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListAccessTokenClaims + +> []ListAccessTokenClaims200ResponseInner ListAccessTokenClaims(ctx, id).Authorization(authorization).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + id := int32(56) // int32 | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.ListAccessTokenClaims(context.Background(), id).Authorization(authorization).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.ListAccessTokenClaims``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListAccessTokenClaims`: []ListAccessTokenClaims200ResponseInner + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.ListAccessTokenClaims`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **int32** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListAccessTokenClaimsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + + +### Return type + +[**[]ListAccessTokenClaims200ResponseInner**](ListAccessTokenClaims200ResponseInner.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListActionValues + +> []ListConditionValues200ResponseInner ListActionValues(ctx, appId, actionValue).Authorization(authorization).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + appId := int32(56) // int32 | + actionValue := "actionValue_example" // string | The value for the selected action. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.ListActionValues(context.Background(), appId, actionValue).Authorization(authorization).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.ListActionValues``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListActionValues`: []ListConditionValues200ResponseInner + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.ListActionValues`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**appId** | **int32** | | +**actionValue** | **string** | The value for the selected action. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListActionValuesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + + + +### Return type + +[**[]ListConditionValues200ResponseInner**](ListConditionValues200ResponseInner.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListActions + +> []ListActions200ResponseInner ListActions(ctx, appId).Authorization(authorization).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + appId := int32(56) // int32 | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.ListActions(context.Background(), appId).Authorization(authorization).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.ListActions``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListActions`: []ListActions200ResponseInner + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.ListActions`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**appId** | **int32** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListActionsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + + +### Return type + +[**[]ListActions200ResponseInner**](ListActions200ResponseInner.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListAppUsers + +> []ListAppUsers200ResponseInner ListAppUsers(ctx, appId).Authorization(authorization).Limit(limit).Page(page).Cursor(cursor).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + appId := int32(56) // int32 | + limit := int32(56) // int32 | The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. (optional) + page := int32(56) // int32 | The page number of results to return. (optional) + cursor := "cursor_example" // string | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.ListAppUsers(context.Background(), appId).Authorization(authorization).Limit(limit).Page(page).Cursor(cursor).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.ListAppUsers``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListAppUsers`: []ListAppUsers200ResponseInner + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.ListAppUsers`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**appId** | **int32** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListAppUsersRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + + **limit** | **int32** | The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. | + **page** | **int32** | The page number of results to return. | + **cursor** | **string** | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. | + +### Return type + +[**[]ListAppUsers200ResponseInner**](ListAppUsers200ResponseInner.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListApps + +> []Schema ListApps(ctx).Authorization(authorization).Limit(limit).Page(page).Cursor(cursor).Name(name).ConnectorId(connectorId).AuthMethod(authMethod).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + limit := int32(56) // int32 | The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. (optional) + page := int32(56) // int32 | The page number of results to return. (optional) + cursor := "cursor_example" // string | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. (optional) + name := "name_example" // string | The name or partial name of the app to search for. When using a partial name you must append a wildcard `*` (optional) + connectorId := int32(56) // int32 | Returns all apps based off a specific connector. See List Connectors for a complete list of Connector IDs. (optional) + authMethod := openapiclient.auth_method(0) // AuthMethod | Returns all apps based of a given type. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.ListApps(context.Background()).Authorization(authorization).Limit(limit).Page(page).Cursor(cursor).Name(name).ConnectorId(connectorId).AuthMethod(authMethod).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.ListApps``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListApps`: []Schema + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.ListApps`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListAppsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + **limit** | **int32** | The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. | + **page** | **int32** | The page number of results to return. | + **cursor** | **string** | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. | + **name** | **string** | The name or partial name of the app to search for. When using a partial name you must append a wildcard `*` | + **connectorId** | **int32** | Returns all apps based off a specific connector. See List Connectors for a complete list of Connector IDs. | + **authMethod** | [**AuthMethod**](AuthMethod.md) | Returns all apps based of a given type. | + +### Return type + +[**[]Schema**](Schema.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListAuthorizationServers + +> []ListAuthorizationServers200ResponseInner ListAuthorizationServers(ctx).Authorization(authorization).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.ListAuthorizationServers(context.Background()).Authorization(authorization).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.ListAuthorizationServers``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListAuthorizationServers`: []ListAuthorizationServers200ResponseInner + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.ListAuthorizationServers`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListAuthorizationServersRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + +### Return type + +[**[]ListAuthorizationServers200ResponseInner**](ListAuthorizationServers200ResponseInner.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListConditionOperators + +> []ListConditionOperators200ResponseInner ListConditionOperators(ctx, appId, conditionValue).Authorization(authorization).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + appId := int32(56) // int32 | + conditionValue := "conditionValue_example" // string | The value for the selected condition. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.ListConditionOperators(context.Background(), appId, conditionValue).Authorization(authorization).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.ListConditionOperators``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListConditionOperators`: []ListConditionOperators200ResponseInner + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.ListConditionOperators`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**appId** | **int32** | | +**conditionValue** | **string** | The value for the selected condition. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListConditionOperatorsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + + + +### Return type + +[**[]ListConditionOperators200ResponseInner**](ListConditionOperators200ResponseInner.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListConditionValues + +> []ListConditionValues200ResponseInner ListConditionValues(ctx, appId, conditionValue).Authorization(authorization).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + appId := int32(56) // int32 | + conditionValue := "conditionValue_example" // string | The value for the selected condition. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.ListConditionValues(context.Background(), appId, conditionValue).Authorization(authorization).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.ListConditionValues``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListConditionValues`: []ListConditionValues200ResponseInner + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.ListConditionValues`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**appId** | **int32** | | +**conditionValue** | **string** | The value for the selected condition. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListConditionValuesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + + + +### Return type + +[**[]ListConditionValues200ResponseInner**](ListConditionValues200ResponseInner.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListConditions + +> []ListConditions200ResponseInner ListConditions(ctx, appId).Authorization(authorization).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + appId := int32(56) // int32 | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.ListConditions(context.Background(), appId).Authorization(authorization).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.ListConditions``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListConditions`: []ListConditions200ResponseInner + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.ListConditions`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**appId** | **int32** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListConditionsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + + +### Return type + +[**[]ListConditions200ResponseInner**](ListConditions200ResponseInner.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListConnectors + +> []Connector ListConnectors(ctx).Authorization(authorization).Limit(limit).Page(page).Cursor(cursor).Name(name).AuthMethod(authMethod).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + limit := int32(56) // int32 | The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. (optional) + page := int32(56) // int32 | The page number of results to return. (optional) + cursor := "cursor_example" // string | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. (optional) + name := "name_example" // string | The name or partial name of the connector to search for. When using a partial name you must append a wildcard `*` (optional) + authMethod := openapiclient.auth_method(0) // AuthMethod | Returns all connectors of a given type. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.ListConnectors(context.Background()).Authorization(authorization).Limit(limit).Page(page).Cursor(cursor).Name(name).AuthMethod(authMethod).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.ListConnectors``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListConnectors`: []Connector + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.ListConnectors`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListConnectorsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + **limit** | **int32** | The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. | + **page** | **int32** | The page number of results to return. | + **cursor** | **string** | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. | + **name** | **string** | The name or partial name of the connector to search for. When using a partial name you must append a wildcard `*` | + **authMethod** | [**AuthMethod**](AuthMethod.md) | Returns all connectors of a given type. | + +### Return type + +[**[]Connector**](Connector.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListEnvironmentVariables + +> []Envvar ListEnvironmentVariables(ctx).Authorization(authorization).Limit(limit).Page(page).Cursor(cursor).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + limit := int32(56) // int32 | The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. (optional) + page := int32(56) // int32 | The page number of results to return. (optional) + cursor := "cursor_example" // string | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.ListEnvironmentVariables(context.Background()).Authorization(authorization).Limit(limit).Page(page).Cursor(cursor).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.ListEnvironmentVariables``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListEnvironmentVariables`: []Envvar + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.ListEnvironmentVariables`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListEnvironmentVariablesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + **limit** | **int32** | The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. | + **page** | **int32** | The page number of results to return. | + **cursor** | **string** | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. | + +### Return type + +[**[]Envvar**](Envvar.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListHooks + +> []Hook ListHooks(ctx).Authorization(authorization).Limit(limit).Page(page).Cursor(cursor).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + limit := int32(56) // int32 | The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. (optional) + page := int32(56) // int32 | The page number of results to return. (optional) + cursor := "cursor_example" // string | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.ListHooks(context.Background()).Authorization(authorization).Limit(limit).Page(page).Cursor(cursor).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.ListHooks``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListHooks`: []Hook + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.ListHooks`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListHooksRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + **limit** | **int32** | The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. | + **page** | **int32** | The page number of results to return. | + **cursor** | **string** | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. | + +### Return type + +[**[]Hook**](Hook.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListMappingActionValues + +> []ListConditionValues200ResponseInner ListMappingActionValues(ctx, actionValue).Authorization(authorization).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + actionValue := "actionValue_example" // string | The value for the selected action. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.ListMappingActionValues(context.Background(), actionValue).Authorization(authorization).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.ListMappingActionValues``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListMappingActionValues`: []ListConditionValues200ResponseInner + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.ListMappingActionValues`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**actionValue** | **string** | The value for the selected action. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListMappingActionValuesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + + +### Return type + +[**[]ListConditionValues200ResponseInner**](ListConditionValues200ResponseInner.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListMappingActions + +> []ListActions200ResponseInner ListMappingActions(ctx).Authorization(authorization).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.ListMappingActions(context.Background()).Authorization(authorization).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.ListMappingActions``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListMappingActions`: []ListActions200ResponseInner + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.ListMappingActions`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListMappingActionsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + +### Return type + +[**[]ListActions200ResponseInner**](ListActions200ResponseInner.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListMappingConditionOperators + +> []ListMappingConditionOperators200ResponseInner ListMappingConditionOperators(ctx, conditionValue).Authorization(authorization).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + conditionValue := "conditionValue_example" // string | The value for the selected condition. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.ListMappingConditionOperators(context.Background(), conditionValue).Authorization(authorization).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.ListMappingConditionOperators``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListMappingConditionOperators`: []ListMappingConditionOperators200ResponseInner + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.ListMappingConditionOperators`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**conditionValue** | **string** | The value for the selected condition. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListMappingConditionOperatorsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + + +### Return type + +[**[]ListMappingConditionOperators200ResponseInner**](ListMappingConditionOperators200ResponseInner.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListMappingConditionValues + +> []ListConditionValues200ResponseInner ListMappingConditionValues(ctx, conditionValue).Authorization(authorization).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + conditionValue := "conditionValue_example" // string | The value for the selected condition. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.ListMappingConditionValues(context.Background(), conditionValue).Authorization(authorization).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.ListMappingConditionValues``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListMappingConditionValues`: []ListConditionValues200ResponseInner + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.ListMappingConditionValues`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**conditionValue** | **string** | The value for the selected condition. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListMappingConditionValuesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + + +### Return type + +[**[]ListConditionValues200ResponseInner**](ListConditionValues200ResponseInner.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListMappingConditions + +> []ListMappingConditions200ResponseInner ListMappingConditions(ctx).Authorization(authorization).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.ListMappingConditions(context.Background()).Authorization(authorization).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.ListMappingConditions``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListMappingConditions`: []ListMappingConditions200ResponseInner + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.ListMappingConditions`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListMappingConditionsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + +### Return type + +[**[]ListMappingConditions200ResponseInner**](ListMappingConditions200ResponseInner.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListMappings + +> []Mapping ListMappings(ctx).Authorization(authorization).Enabled(enabled).HasCondition(hasCondition).HasConditionType(hasConditionType).HasAction(hasAction).HasActionType(hasActionType).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + enabled := true // bool | Defaults to true. When set to `false` will return all disabled mappings. (optional) (default to true) + hasCondition := "has_condition=has_role:123456,status:1" // string | Filters Mappings based on their Conditions. (optional) + hasConditionType := "hasConditionType_example" // string | Filters Mappings based on their condition types. (optional) + hasAction := "has_action=set_groups:123456,set_usertype:*" // string | Filters Mappings based on their Actions. (optional) + hasActionType := "hasActionType_example" // string | Filters Mappings based on their action types. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.ListMappings(context.Background()).Authorization(authorization).Enabled(enabled).HasCondition(hasCondition).HasConditionType(hasConditionType).HasAction(hasAction).HasActionType(hasActionType).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.ListMappings``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListMappings`: []Mapping + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.ListMappings`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListMappingsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + **enabled** | **bool** | Defaults to true. When set to `false` will return all disabled mappings. | [default to true] + **hasCondition** | **string** | Filters Mappings based on their Conditions. | + **hasConditionType** | **string** | Filters Mappings based on their condition types. | + **hasAction** | **string** | Filters Mappings based on their Actions. | + **hasActionType** | **string** | Filters Mappings based on their action types. | + +### Return type + +[**[]Mapping**](Mapping.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListRiskRules + +> ListRiskRules(ctx).Authorization(authorization).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.ListRiskRules(context.Background()).Authorization(authorization).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.ListRiskRules``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListRiskRulesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListRoles + +> []Role ListRoles(ctx).Authorization(authorization).Limit(limit).Page(page).Cursor(cursor).Name(name).AppId(appId).Fields(fields).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + limit := int32(56) // int32 | The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. (optional) + page := int32(56) // int32 | The page number of results to return. (optional) + cursor := "cursor_example" // string | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. (optional) + name := "name_example" // string | Optional. Filters by role name. (optional) + appId := "appId_example" // string | Optional. Returns roles that contain this app name. (optional) + fields := "fields_example" // string | Optional. Comma delimited list of fields to return. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.ListRoles(context.Background()).Authorization(authorization).Limit(limit).Page(page).Cursor(cursor).Name(name).AppId(appId).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.ListRoles``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListRoles`: []Role + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.ListRoles`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListRolesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + **limit** | **int32** | The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. | + **page** | **int32** | The page number of results to return. | + **cursor** | **string** | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. | + **name** | **string** | Optional. Filters by role name. | + **appId** | **string** | Optional. Returns roles that contain this app name. | + **fields** | **string** | Optional. Comma delimited list of fields to return. | + +### Return type + +[**[]Role**](Role.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListRules + +> []Rule ListRules(ctx, appId).Authorization(authorization).Enabled(enabled).HasCondition(hasCondition).HasConditionType(hasConditionType).HasAction(hasAction).HasActionType(hasActionType).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + appId := int32(56) // int32 | + enabled := true // bool | Defaults to true. When set to `false` will return all disabled rules. (optional) + hasCondition := "hasCondition_example" // string | Filters Rules based on their Conditions. (optional) + hasConditionType := "hasConditionType_example" // string | Filters Rules based on their condition types. (optional) + hasAction := "hasAction_example" // string | Filters Rules based on their Actions. (optional) + hasActionType := "hasActionType_example" // string | Filters Rules based on their action types. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.ListRules(context.Background(), appId).Authorization(authorization).Enabled(enabled).HasCondition(hasCondition).HasConditionType(hasConditionType).HasAction(hasAction).HasActionType(hasActionType).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.ListRules``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListRules`: []Rule + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.ListRules`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**appId** | **int32** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListRulesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + + **enabled** | **bool** | Defaults to true. When set to `false` will return all disabled rules. | + **hasCondition** | **string** | Filters Rules based on their Conditions. | + **hasConditionType** | **string** | Filters Rules based on their condition types. | + **hasAction** | **string** | Filters Rules based on their Actions. | + **hasActionType** | **string** | Filters Rules based on their action types. | + +### Return type + +[**[]Rule**](Rule.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListScopes + +> []ListScopes200ResponseInner ListScopes(ctx, id).Authorization(authorization).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + id := int32(56) // int32 | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.ListScopes(context.Background(), id).Authorization(authorization).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.ListScopes``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListScopes`: []ListScopes200ResponseInner + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.ListScopes`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **int32** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListScopesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + + +### Return type + +[**[]ListScopes200ResponseInner**](ListScopes200ResponseInner.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListUsers + +> []User ListUsers(ctx).Authorization(authorization).Limit(limit).Page(page).Cursor(cursor).CreatedSince(createdSince).CreatedUntil(createdUntil).UpdatedSince(updatedSince).UpdatedUntil(updatedUntil).LastLoginSince(lastLoginSince).LastLoginUntil(lastLoginUntil).Firstname(firstname).Lastname(lastname).Email(email).Username(username).Samaccountname(samaccountname).DirectoryId(directoryId).ExternalId(externalId).AppId(appId).UserIds(userIds).CustomAttributesAttributeName(customAttributesAttributeName).Fields(fields).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + limit := int32(56) // int32 | The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. (optional) + page := int32(56) // int32 | The page number of results to return. (optional) + cursor := "cursor_example" // string | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. (optional) + createdSince := "createdSince_example" // string | An ISO8601 timestamp value that returns all users created after a given date & time. (optional) + createdUntil := "createdUntil_example" // string | An ISO8601 timestamp value that returns all users created before a given date & time. (optional) + updatedSince := "updatedSince_example" // string | An ISO8601 timestamp value that returns all users updated after a given date & time. (optional) + updatedUntil := "updatedUntil_example" // string | An ISO8601 timestamp value that returns all users updated before a given date & time. (optional) + lastLoginSince := "lastLoginSince_example" // string | An ISO8601 timestamp value that returns all users that logged in after a given date & time. (optional) + lastLoginUntil := "lastLoginUntil_example" // string | (optional) + firstname := "firstname_example" // string | The first name of the user (optional) + lastname := "lastname_example" // string | The last name of the user (optional) + email := "email_example" // string | The email address of the user (optional) + username := "username_example" // string | The username for the user (optional) + samaccountname := "samaccountname_example" // string | The AD login name for the user (optional) + directoryId := "directoryId_example" // string | The ID in OneLogin of the Directory that the user belongs to (optional) + externalId := "externalId_example" // string | An external identifier that has been set on the user (optional) + appId := "appId_example" // string | The ID of a OneLogin Application (optional) + userIds := "userIds_example" // string | A comma separated list of OneLogin User IDs (optional) + customAttributesAttributeName := "customAttributesAttributeName_example" // string | The short name of a custom attribute. Note that the attribute name is prefixed with custom_attributes. (optional) + fields := "fields_example" // string | A comma separated list user attributes to return. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.ListUsers(context.Background()).Authorization(authorization).Limit(limit).Page(page).Cursor(cursor).CreatedSince(createdSince).CreatedUntil(createdUntil).UpdatedSince(updatedSince).UpdatedUntil(updatedUntil).LastLoginSince(lastLoginSince).LastLoginUntil(lastLoginUntil).Firstname(firstname).Lastname(lastname).Email(email).Username(username).Samaccountname(samaccountname).DirectoryId(directoryId).ExternalId(externalId).AppId(appId).UserIds(userIds).CustomAttributesAttributeName(customAttributesAttributeName).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.ListUsers``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListUsers`: []User + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.ListUsers`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListUsersRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + **limit** | **int32** | The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. | + **page** | **int32** | The page number of results to return. | + **cursor** | **string** | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. | + **createdSince** | **string** | An ISO8601 timestamp value that returns all users created after a given date & time. | + **createdUntil** | **string** | An ISO8601 timestamp value that returns all users created before a given date & time. | + **updatedSince** | **string** | An ISO8601 timestamp value that returns all users updated after a given date & time. | + **updatedUntil** | **string** | An ISO8601 timestamp value that returns all users updated before a given date & time. | + **lastLoginSince** | **string** | An ISO8601 timestamp value that returns all users that logged in after a given date & time. | + **lastLoginUntil** | **string** | | + **firstname** | **string** | The first name of the user | + **lastname** | **string** | The last name of the user | + **email** | **string** | The email address of the user | + **username** | **string** | The username for the user | + **samaccountname** | **string** | The AD login name for the user | + **directoryId** | **string** | The ID in OneLogin of the Directory that the user belongs to | + **externalId** | **string** | An external identifier that has been set on the user | + **appId** | **string** | The ID of a OneLogin Application | + **userIds** | **string** | A comma separated list of OneLogin User IDs | + **customAttributesAttributeName** | **string** | The short name of a custom attribute. Note that the attribute name is prefixed with custom_attributes. | + **fields** | **string** | A comma separated list user attributes to return. | + +### Return type + +[**[]User**](User.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RemoveClientApp + +> RemoveClientApp(ctx, id, clientAppId).Authorization(authorization).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + id := int32(56) // int32 | + clientAppId := int32(56) // int32 | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.RemoveClientApp(context.Background(), id, clientAppId).Authorization(authorization).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.RemoveClientApp``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **int32** | | +**clientAppId** | **int32** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRemoveClientAppRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + + + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RemoveRoleAdmins + +> RemoveRoleAdmins(ctx, roleId).Authorization(authorization).RemoveRoleUsersRequest(removeRoleUsersRequest).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + roleId := int32(56) // int32 | Set to the id of the role you want to return. + removeRoleUsersRequest := *openapiclient.NewRemoveRoleUsersRequest() // RemoveRoleUsersRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.RemoveRoleAdmins(context.Background(), roleId).Authorization(authorization).RemoveRoleUsersRequest(removeRoleUsersRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.RemoveRoleAdmins``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**roleId** | **int32** | Set to the id of the role you want to return. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRemoveRoleAdminsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + + **removeRoleUsersRequest** | [**RemoveRoleUsersRequest**](RemoveRoleUsersRequest.md) | | + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RemoveRoleUsers + +> RemoveRoleUsers(ctx, roleId).Authorization(authorization).RemoveRoleUsersRequest(removeRoleUsersRequest).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + roleId := int32(56) // int32 | Set to the id of the role you want to return. + removeRoleUsersRequest := *openapiclient.NewRemoveRoleUsersRequest() // RemoveRoleUsersRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.RemoveRoleUsers(context.Background(), roleId).Authorization(authorization).RemoveRoleUsersRequest(removeRoleUsersRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.RemoveRoleUsers``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**roleId** | **int32** | Set to the id of the role you want to return. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRemoveRoleUsersRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + + **removeRoleUsersRequest** | [**RemoveRoleUsersRequest**](RemoveRoleUsersRequest.md) | | + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RevokeToken + +> GenerateToken400Response RevokeToken(ctx).Authorization(authorization).RevokeTokenRequest(revokeTokenRequest).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + revokeTokenRequest := *openapiclient.NewRevokeTokenRequest() // RevokeTokenRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.RevokeToken(context.Background()).Authorization(authorization).RevokeTokenRequest(revokeTokenRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.RevokeToken``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RevokeToken`: GenerateToken400Response + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.RevokeToken`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiRevokeTokenRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + **revokeTokenRequest** | [**RevokeTokenRequest**](RevokeTokenRequest.md) | | + +### Return type + +[**GenerateToken400Response**](GenerateToken400Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SetRoleApps + +> []SetRoleApps200ResponseInner SetRoleApps(ctx, roleId).Authorization(authorization).RequestBody(requestBody).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + roleId := int32(56) // int32 | Set to the id of the role you want to return. + requestBody := []int32{int32(123)} // []int32 | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.SetRoleApps(context.Background(), roleId).Authorization(authorization).RequestBody(requestBody).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.SetRoleApps``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SetRoleApps`: []SetRoleApps200ResponseInner + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.SetRoleApps`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**roleId** | **int32** | Set to the id of the role you want to return. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSetRoleAppsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + + **requestBody** | **[]int32** | | + +### Return type + +[**[]SetRoleApps200ResponseInner**](SetRoleApps200ResponseInner.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TrackEvent + +> TrackEvent(ctx).Authorization(authorization).TrackEventRequest(trackEventRequest).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + trackEventRequest := *openapiclient.NewTrackEventRequest("Verb_example", "Ip_example", "UserAgent_example", *openapiclient.NewRiskUser("Id_example")) // TrackEventRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.TrackEvent(context.Background()).Authorization(authorization).TrackEventRequest(trackEventRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.TrackEvent``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiTrackEventRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + **trackEventRequest** | [**TrackEventRequest**](TrackEventRequest.md) | | + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateAccessTokenClaim + +> Id UpdateAccessTokenClaim(ctx, id, claimId).Authorization(authorization).AddAccessTokenClaimRequest(addAccessTokenClaimRequest).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + id := int32(56) // int32 | + claimId := int32(56) // int32 | + addAccessTokenClaimRequest := *openapiclient.NewAddAccessTokenClaimRequest() // AddAccessTokenClaimRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.UpdateAccessTokenClaim(context.Background(), id, claimId).Authorization(authorization).AddAccessTokenClaimRequest(addAccessTokenClaimRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.UpdateAccessTokenClaim``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateAccessTokenClaim`: Id + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.UpdateAccessTokenClaim`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **int32** | | +**claimId** | **int32** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateAccessTokenClaimRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + + + **addAccessTokenClaimRequest** | [**AddAccessTokenClaimRequest**](AddAccessTokenClaimRequest.md) | | + +### Return type + +[**Id**](Id.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateApp + +> Schema UpdateApp(ctx, appId).Authorization(authorization).Schema(schema).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + appId := int32(56) // int32 | + schema := *openapiclient.NewSchema() // Schema | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.UpdateApp(context.Background(), appId).Authorization(authorization).Schema(schema).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.UpdateApp``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateApp`: Schema + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.UpdateApp`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**appId** | **int32** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateAppRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + + **schema** | [**Schema**](Schema.md) | | + +### Return type + +[**Schema**](Schema.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateAuthorizationServer + +> Id UpdateAuthorizationServer(ctx, id).Authorization(authorization).CreateAuthorizationServerRequest(createAuthorizationServerRequest).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + id := int32(56) // int32 | + createAuthorizationServerRequest := *openapiclient.NewCreateAuthorizationServerRequest() // CreateAuthorizationServerRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.UpdateAuthorizationServer(context.Background(), id).Authorization(authorization).CreateAuthorizationServerRequest(createAuthorizationServerRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.UpdateAuthorizationServer``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateAuthorizationServer`: Id + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.UpdateAuthorizationServer`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **int32** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateAuthorizationServerRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + + **createAuthorizationServerRequest** | [**CreateAuthorizationServerRequest**](CreateAuthorizationServerRequest.md) | | + +### Return type + +[**Id**](Id.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateClientApp + +> ClientApp UpdateClientApp(ctx, id, clientAppId).Authorization(authorization).UpdateClientAppRequest(updateClientAppRequest).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + id := int32(56) // int32 | + clientAppId := int32(56) // int32 | + updateClientAppRequest := *openapiclient.NewUpdateClientAppRequest() // UpdateClientAppRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.UpdateClientApp(context.Background(), id, clientAppId).Authorization(authorization).UpdateClientAppRequest(updateClientAppRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.UpdateClientApp``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateClientApp`: ClientApp + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.UpdateClientApp`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **int32** | | +**clientAppId** | **int32** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateClientAppRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + + + **updateClientAppRequest** | [**UpdateClientAppRequest**](UpdateClientAppRequest.md) | | + +### Return type + +[**ClientApp**](ClientApp.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateEnvironmentVariable + +> Envvar UpdateEnvironmentVariable(ctx, envvarId).Authorization(authorization).UpdateEnvironmentVariableRequest(updateEnvironmentVariableRequest).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + envvarId := "envvarId_example" // string | Set to the id of the Hook Environment Variable that you want to fetch. + updateEnvironmentVariableRequest := *openapiclient.NewUpdateEnvironmentVariableRequest("Value_example") // UpdateEnvironmentVariableRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.UpdateEnvironmentVariable(context.Background(), envvarId).Authorization(authorization).UpdateEnvironmentVariableRequest(updateEnvironmentVariableRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.UpdateEnvironmentVariable``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateEnvironmentVariable`: Envvar + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.UpdateEnvironmentVariable`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**envvarId** | **string** | Set to the id of the Hook Environment Variable that you want to fetch. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateEnvironmentVariableRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + + **updateEnvironmentVariableRequest** | [**UpdateEnvironmentVariableRequest**](UpdateEnvironmentVariableRequest.md) | | + +### Return type + +[**Envvar**](Envvar.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateHook + +> Hook UpdateHook(ctx, hookId).Authorization(authorization).Hook(hook).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + hookId := "hookId_example" // string | Set to the id of the Hook that you want to return. + hook := *openapiclient.NewHook("Type_example", false, int32(123), []string{"EnvVars_example"}, "Runtime_example", int32(123), map[string]interface{}(123), "Function_example") // Hook | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.UpdateHook(context.Background(), hookId).Authorization(authorization).Hook(hook).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.UpdateHook``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateHook`: Hook + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.UpdateHook`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**hookId** | **string** | Set to the id of the Hook that you want to return. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateHookRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + + **hook** | [**Hook**](Hook.md) | | + +### Return type + +[**Hook**](Hook.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateMapping + +> int32 UpdateMapping(ctx, mappingId).Authorization(authorization).Mapping(mapping).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + mappingId := int32(56) // int32 | The id of the user mapping to locate. + mapping := *openapiclient.NewMapping("Name_example", false, "Match_example", int32(123), []openapiclient.Action{*openapiclient.NewAction()}) // Mapping | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.UpdateMapping(context.Background(), mappingId).Authorization(authorization).Mapping(mapping).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.UpdateMapping``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateMapping`: int32 + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.UpdateMapping`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**mappingId** | **int32** | The id of the user mapping to locate. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateMappingRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + + **mapping** | [**Mapping**](Mapping.md) | | + +### Return type + +**int32** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateRiskRule + +> RiskRule UpdateRiskRule(ctx, riskRuleId).Authorization(authorization).RiskRule(riskRule).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + riskRuleId := "riskRuleId_example" // string | + riskRule := *openapiclient.NewRiskRule() // RiskRule | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.UpdateRiskRule(context.Background(), riskRuleId).Authorization(authorization).RiskRule(riskRule).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.UpdateRiskRule``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateRiskRule`: RiskRule + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.UpdateRiskRule`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**riskRuleId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateRiskRuleRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + + **riskRule** | [**RiskRule**](RiskRule.md) | | + +### Return type + +[**RiskRule**](RiskRule.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateRole + +> UpdateRole200Response UpdateRole(ctx, roleId).Authorization(authorization).Role(role).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + roleId := int32(56) // int32 | Set to the id of the role you want to return. + role := *openapiclient.NewRole("Name_example") // Role | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.UpdateRole(context.Background(), roleId).Authorization(authorization).Role(role).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.UpdateRole``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateRole`: UpdateRole200Response + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.UpdateRole`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**roleId** | **int32** | Set to the id of the role you want to return. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateRoleRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + + **role** | [**Role**](Role.md) | | + +### Return type + +[**UpdateRole200Response**](UpdateRole200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateRule + +> RuleId UpdateRule(ctx, appId, ruleId).Authorization(authorization).Rule(rule).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + appId := int32(56) // int32 | + ruleId := int32(56) // int32 | The id of the app rule to locate. + rule := *openapiclient.NewRule() // Rule | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.UpdateRule(context.Background(), appId, ruleId).Authorization(authorization).Rule(rule).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.UpdateRule``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateRule`: RuleId + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.UpdateRule`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**appId** | **int32** | | +**ruleId** | **int32** | The id of the app rule to locate. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateRuleRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + + + **rule** | [**Rule**](Rule.md) | | + +### Return type + +[**RuleId**](RuleId.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateScope + +> Id UpdateScope(ctx, id, scopeId).Authorization(authorization).AddScopeRequest(addScopeRequest).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + id := int32(56) // int32 | + scopeId := int32(56) // int32 | + addScopeRequest := *openapiclient.NewAddScopeRequest() // AddScopeRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.UpdateScope(context.Background(), id, scopeId).Authorization(authorization).AddScopeRequest(addScopeRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.UpdateScope``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateScope`: Id + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.UpdateScope`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **int32** | | +**scopeId** | **int32** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateScopeRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + + + **addScopeRequest** | [**AddScopeRequest**](AddScopeRequest.md) | | + +### Return type + +[**Id**](Id.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateUser + +> User UpdateUser(ctx, userId).Authorization(authorization).User(user).Mappings(mappings).ValidatePolicy(validatePolicy).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + userId := int32(56) // int32 | Set to the id of the user that you want to return. + user := *openapiclient.NewUser() // User | + mappings := "mappings_example" // string | Controls how mappings will be applied to the user on creation. Defaults to async. (optional) + validatePolicy := true // bool | Will passwords validate against the User Policy? Defaults to true. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.UpdateUser(context.Background(), userId).Authorization(authorization).User(user).Mappings(mappings).ValidatePolicy(validatePolicy).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.UpdateUser``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateUser`: User + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.UpdateUser`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**userId** | **int32** | Set to the id of the user that you want to return. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateUserRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + + **user** | [**User**](User.md) | | + **mappings** | **string** | Controls how mappings will be applied to the user on creation. Defaults to async. | + **validatePolicy** | **bool** | Will passwords validate against the User Policy? Defaults to true. | + +### Return type + +[**User**](User.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## VerifyEnrollment + +> []Registration VerifyEnrollment(ctx, userId, registrationId).Authorization(authorization).VerifyEnrollmentRequest(verifyEnrollmentRequest).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + userId := int32(56) // int32 | Set to the id of the user. + registrationId := int32(56) // int32 | Set to the uuid of the registration. This was included in the response as part of the initial request in Enroll Factor. + verifyEnrollmentRequest := *openapiclient.NewVerifyEnrollmentRequest() // VerifyEnrollmentRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.VerifyEnrollment(context.Background(), userId, registrationId).Authorization(authorization).VerifyEnrollmentRequest(verifyEnrollmentRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.VerifyEnrollment``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `VerifyEnrollment`: []Registration + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.VerifyEnrollment`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**userId** | **int32** | Set to the id of the user. | +**registrationId** | **int32** | Set to the uuid of the registration. This was included in the response as part of the initial request in Enroll Factor. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiVerifyEnrollmentRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + + + **verifyEnrollmentRequest** | [**VerifyEnrollmentRequest**](VerifyEnrollmentRequest.md) | | + +### Return type + +[**[]Registration**](Registration.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## VerifyEnrollmentVoiceProtect + +> []Registration VerifyEnrollmentVoiceProtect(ctx, userId, registrationId).Authorization(authorization).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + userId := int32(56) // int32 | Set to the id of the user. + registrationId := int32(56) // int32 | Set to the uuid of the registration. This was included in the response as part of the initial request in Enroll Factor. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.VerifyEnrollmentVoiceProtect(context.Background(), userId, registrationId).Authorization(authorization).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.VerifyEnrollmentVoiceProtect``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `VerifyEnrollmentVoiceProtect`: []Registration + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.VerifyEnrollmentVoiceProtect`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**userId** | **int32** | Set to the id of the user. | +**registrationId** | **int32** | Set to the uuid of the registration. This was included in the response as part of the initial request in Enroll Factor. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiVerifyEnrollmentVoiceProtectRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + + + +### Return type + +[**[]Registration**](Registration.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## VerifyFactor + +> Status2 VerifyFactor(ctx, userId, verificationId).Authorization(authorization).VerifyFactorRequest(verifyFactorRequest).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + userId := int32(56) // int32 | Set to the id of the user. + verificationId := int32(56) // int32 | The verification_id is returned on activation of the factor or you can get the device_id using the Activate Factor API call. + verifyFactorRequest := *openapiclient.NewVerifyFactorRequest() // VerifyFactorRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.VerifyFactor(context.Background(), userId, verificationId).Authorization(authorization).VerifyFactorRequest(verifyFactorRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.VerifyFactor``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `VerifyFactor`: Status2 + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.VerifyFactor`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**userId** | **int32** | Set to the id of the user. | +**verificationId** | **int32** | The verification_id is returned on activation of the factor or you can get the device_id using the Activate Factor API call. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiVerifyFactorRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + + + **verifyFactorRequest** | [**VerifyFactorRequest**](VerifyFactorRequest.md) | | + +### Return type + +[**Status2**](Status2.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## VerifyFactorSaml + +> VerifyFactorSaml200Response VerifyFactorSaml(ctx).Authorization(authorization).VerifyFactorSamlRequest(verifyFactorSamlRequest).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + verifyFactorSamlRequest := *openapiclient.NewVerifyFactorSamlRequest("AppId_example", "DeviceId_example", "StateToken_example") // VerifyFactorSamlRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.VerifyFactorSaml(context.Background()).Authorization(authorization).VerifyFactorSamlRequest(verifyFactorSamlRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.VerifyFactorSaml``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `VerifyFactorSaml`: VerifyFactorSaml200Response + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.VerifyFactorSaml`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiVerifyFactorSamlRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + **verifyFactorSamlRequest** | [**VerifyFactorSamlRequest**](VerifyFactorSamlRequest.md) | | + +### Return type + +[**VerifyFactorSaml200Response**](VerifyFactorSaml200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## VerifyFactorVoice + +> []VerifyFactorVoice200ResponseInner VerifyFactorVoice(ctx, userId, verificationId).Authorization(authorization).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorization := "authorization_example" // string | + userId := int32(56) // int32 | Set to the id of the user. + verificationId := int32(56) // int32 | The verification_id is returned on activation of the factor or you can get the device_id using the Activate Factor API call. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DefaultApi.VerifyFactorVoice(context.Background(), userId, verificationId).Authorization(authorization).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.VerifyFactorVoice``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `VerifyFactorVoice`: []VerifyFactorVoice200ResponseInner + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.VerifyFactorVoice`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**userId** | **int32** | Set to the id of the user. | +**verificationId** | **int32** | The verification_id is returned on activation of the factor or you can get the device_id using the Activate Factor API call. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiVerifyFactorVoiceRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorization** | **string** | | + + + +### Return type + +[**[]VerifyFactorVoice200ResponseInner**](VerifyFactorVoice200ResponseInner.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/docs/Device.md b/docs/Device.md new file mode 100644 index 0000000..59e6b58 --- /dev/null +++ b/docs/Device.md @@ -0,0 +1,160 @@ +# Device + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DeviceId** | Pointer to **string** | | [optional] +**UserDisplayName** | Pointer to **string** | | [optional] +**TypeDisplayName** | Pointer to **string** | | [optional] +**AuthFactorName** | Pointer to **string** | | [optional] +**Default** | Pointer to **bool** | | [optional] + +## Methods + +### NewDevice + +`func NewDevice() *Device` + +NewDevice instantiates a new Device 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 + +### NewDeviceWithDefaults + +`func NewDeviceWithDefaults() *Device` + +NewDeviceWithDefaults instantiates a new Device 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 + +### GetDeviceId + +`func (o *Device) GetDeviceId() string` + +GetDeviceId returns the DeviceId field if non-nil, zero value otherwise. + +### GetDeviceIdOk + +`func (o *Device) GetDeviceIdOk() (*string, bool)` + +GetDeviceIdOk returns a tuple with the DeviceId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDeviceId + +`func (o *Device) SetDeviceId(v string)` + +SetDeviceId sets DeviceId field to given value. + +### HasDeviceId + +`func (o *Device) HasDeviceId() bool` + +HasDeviceId returns a boolean if a field has been set. + +### GetUserDisplayName + +`func (o *Device) GetUserDisplayName() string` + +GetUserDisplayName returns the UserDisplayName field if non-nil, zero value otherwise. + +### GetUserDisplayNameOk + +`func (o *Device) GetUserDisplayNameOk() (*string, bool)` + +GetUserDisplayNameOk returns a tuple with the UserDisplayName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUserDisplayName + +`func (o *Device) SetUserDisplayName(v string)` + +SetUserDisplayName sets UserDisplayName field to given value. + +### HasUserDisplayName + +`func (o *Device) HasUserDisplayName() bool` + +HasUserDisplayName returns a boolean if a field has been set. + +### GetTypeDisplayName + +`func (o *Device) GetTypeDisplayName() string` + +GetTypeDisplayName returns the TypeDisplayName field if non-nil, zero value otherwise. + +### GetTypeDisplayNameOk + +`func (o *Device) GetTypeDisplayNameOk() (*string, bool)` + +GetTypeDisplayNameOk returns a tuple with the TypeDisplayName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTypeDisplayName + +`func (o *Device) SetTypeDisplayName(v string)` + +SetTypeDisplayName sets TypeDisplayName field to given value. + +### HasTypeDisplayName + +`func (o *Device) HasTypeDisplayName() bool` + +HasTypeDisplayName returns a boolean if a field has been set. + +### GetAuthFactorName + +`func (o *Device) GetAuthFactorName() string` + +GetAuthFactorName returns the AuthFactorName field if non-nil, zero value otherwise. + +### GetAuthFactorNameOk + +`func (o *Device) GetAuthFactorNameOk() (*string, bool)` + +GetAuthFactorNameOk returns a tuple with the AuthFactorName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAuthFactorName + +`func (o *Device) SetAuthFactorName(v string)` + +SetAuthFactorName sets AuthFactorName field to given value. + +### HasAuthFactorName + +`func (o *Device) HasAuthFactorName() bool` + +HasAuthFactorName returns a boolean if a field has been set. + +### GetDefault + +`func (o *Device) GetDefault() bool` + +GetDefault returns the Default field if non-nil, zero value otherwise. + +### GetDefaultOk + +`func (o *Device) GetDefaultOk() (*bool, bool)` + +GetDefaultOk returns a tuple with the Default field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDefault + +`func (o *Device) SetDefault(v bool)` + +SetDefault sets Default field to given value. + +### HasDefault + +`func (o *Device) HasDefault() bool` + +HasDefault 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/EnrollFactorRequest.md b/docs/EnrollFactorRequest.md new file mode 100644 index 0000000..df3aad1 --- /dev/null +++ b/docs/EnrollFactorRequest.md @@ -0,0 +1,176 @@ +# EnrollFactorRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FactorId** | **int32** | The identifier of the factor to enroll the user with. | +**DisplayName** | **string** | A name for the users device. | +**ExpiresIn** | Pointer to **string** | Defaults to 120. Valid values are: 120-900 seconds. | [optional] +**Verified** | Pointer to **bool** | Defaults to false. | [optional] +**RedirectTo** | Pointer to **string** | Redirects MagicLink success page to specified URL after 2 seconds. | [optional] +**CustomMessage** | Pointer to **string** | A message template that will be sent via SMS. Max length of the message after template items are inserted is 160 characters including the OTP code. | [optional] + +## Methods + +### NewEnrollFactorRequest + +`func NewEnrollFactorRequest(factorId int32, displayName string, ) *EnrollFactorRequest` + +NewEnrollFactorRequest instantiates a new EnrollFactorRequest 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 + +### NewEnrollFactorRequestWithDefaults + +`func NewEnrollFactorRequestWithDefaults() *EnrollFactorRequest` + +NewEnrollFactorRequestWithDefaults instantiates a new EnrollFactorRequest 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 + +### GetFactorId + +`func (o *EnrollFactorRequest) GetFactorId() int32` + +GetFactorId returns the FactorId field if non-nil, zero value otherwise. + +### GetFactorIdOk + +`func (o *EnrollFactorRequest) GetFactorIdOk() (*int32, bool)` + +GetFactorIdOk returns a tuple with the FactorId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFactorId + +`func (o *EnrollFactorRequest) SetFactorId(v int32)` + +SetFactorId sets FactorId field to given value. + + +### GetDisplayName + +`func (o *EnrollFactorRequest) GetDisplayName() string` + +GetDisplayName returns the DisplayName field if non-nil, zero value otherwise. + +### GetDisplayNameOk + +`func (o *EnrollFactorRequest) GetDisplayNameOk() (*string, bool)` + +GetDisplayNameOk returns a tuple with the DisplayName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDisplayName + +`func (o *EnrollFactorRequest) SetDisplayName(v string)` + +SetDisplayName sets DisplayName field to given value. + + +### GetExpiresIn + +`func (o *EnrollFactorRequest) GetExpiresIn() string` + +GetExpiresIn returns the ExpiresIn field if non-nil, zero value otherwise. + +### GetExpiresInOk + +`func (o *EnrollFactorRequest) GetExpiresInOk() (*string, bool)` + +GetExpiresInOk returns a tuple with the ExpiresIn field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExpiresIn + +`func (o *EnrollFactorRequest) SetExpiresIn(v string)` + +SetExpiresIn sets ExpiresIn field to given value. + +### HasExpiresIn + +`func (o *EnrollFactorRequest) HasExpiresIn() bool` + +HasExpiresIn returns a boolean if a field has been set. + +### GetVerified + +`func (o *EnrollFactorRequest) GetVerified() bool` + +GetVerified returns the Verified field if non-nil, zero value otherwise. + +### GetVerifiedOk + +`func (o *EnrollFactorRequest) GetVerifiedOk() (*bool, bool)` + +GetVerifiedOk returns a tuple with the Verified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVerified + +`func (o *EnrollFactorRequest) SetVerified(v bool)` + +SetVerified sets Verified field to given value. + +### HasVerified + +`func (o *EnrollFactorRequest) HasVerified() bool` + +HasVerified returns a boolean if a field has been set. + +### GetRedirectTo + +`func (o *EnrollFactorRequest) GetRedirectTo() string` + +GetRedirectTo returns the RedirectTo field if non-nil, zero value otherwise. + +### GetRedirectToOk + +`func (o *EnrollFactorRequest) GetRedirectToOk() (*string, bool)` + +GetRedirectToOk returns a tuple with the RedirectTo field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRedirectTo + +`func (o *EnrollFactorRequest) SetRedirectTo(v string)` + +SetRedirectTo sets RedirectTo field to given value. + +### HasRedirectTo + +`func (o *EnrollFactorRequest) HasRedirectTo() bool` + +HasRedirectTo returns a boolean if a field has been set. + +### GetCustomMessage + +`func (o *EnrollFactorRequest) GetCustomMessage() string` + +GetCustomMessage returns the CustomMessage field if non-nil, zero value otherwise. + +### GetCustomMessageOk + +`func (o *EnrollFactorRequest) GetCustomMessageOk() (*string, bool)` + +GetCustomMessageOk returns a tuple with the CustomMessage field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustomMessage + +`func (o *EnrollFactorRequest) SetCustomMessage(v string)` + +SetCustomMessage sets CustomMessage field to given value. + +### HasCustomMessage + +`func (o *EnrollFactorRequest) HasCustomMessage() bool` + +HasCustomMessage 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/Envvar.md b/docs/Envvar.md new file mode 100644 index 0000000..5449227 --- /dev/null +++ b/docs/Envvar.md @@ -0,0 +1,134 @@ +# Envvar + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **string** | A unique identifier for the Hook Environment Variable | [optional] +**Name** | Pointer to **string** | The name of the environment variable. | [optional] +**CreatedAt** | Pointer to **string** | The ISO8601 formatted date that the environment variable was created. | [optional] +**UpdatedAt** | Pointer to **string** | The ISO8601 formatted date that the environment variable was last updated. | [optional] + +## Methods + +### NewEnvvar + +`func NewEnvvar() *Envvar` + +NewEnvvar instantiates a new Envvar 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 + +### NewEnvvarWithDefaults + +`func NewEnvvarWithDefaults() *Envvar` + +NewEnvvarWithDefaults instantiates a new Envvar 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 + +### GetId + +`func (o *Envvar) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Envvar) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Envvar) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *Envvar) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetName + +`func (o *Envvar) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Envvar) 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 *Envvar) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *Envvar) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetCreatedAt + +`func (o *Envvar) GetCreatedAt() string` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *Envvar) GetCreatedAtOk() (*string, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *Envvar) SetCreatedAt(v string)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *Envvar) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### GetUpdatedAt + +`func (o *Envvar) GetUpdatedAt() string` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *Envvar) GetUpdatedAtOk() (*string, bool)` + +GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedAt + +`func (o *Envvar) SetUpdatedAt(v string)` + +SetUpdatedAt sets UpdatedAt field to given value. + +### HasUpdatedAt + +`func (o *Envvar) HasUpdatedAt() bool` + +HasUpdatedAt 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/ErrorStatus.md b/docs/ErrorStatus.md new file mode 100644 index 0000000..bba16ba --- /dev/null +++ b/docs/ErrorStatus.md @@ -0,0 +1,108 @@ +# ErrorStatus + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Code** | Pointer to **int32** | | [optional] +**Message** | Pointer to **string** | | [optional] +**Errors** | Pointer to [**[]ErrorStatusErrorsInner**](ErrorStatusErrorsInner.md) | | [optional] + +## Methods + +### NewErrorStatus + +`func NewErrorStatus() *ErrorStatus` + +NewErrorStatus instantiates a new ErrorStatus 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 + +### NewErrorStatusWithDefaults + +`func NewErrorStatusWithDefaults() *ErrorStatus` + +NewErrorStatusWithDefaults instantiates a new ErrorStatus 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 + +### GetCode + +`func (o *ErrorStatus) GetCode() int32` + +GetCode returns the Code field if non-nil, zero value otherwise. + +### GetCodeOk + +`func (o *ErrorStatus) GetCodeOk() (*int32, bool)` + +GetCodeOk returns a tuple with the Code field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCode + +`func (o *ErrorStatus) SetCode(v int32)` + +SetCode sets Code field to given value. + +### HasCode + +`func (o *ErrorStatus) HasCode() bool` + +HasCode returns a boolean if a field has been set. + +### GetMessage + +`func (o *ErrorStatus) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *ErrorStatus) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *ErrorStatus) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *ErrorStatus) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + +### GetErrors + +`func (o *ErrorStatus) GetErrors() []ErrorStatusErrorsInner` + +GetErrors returns the Errors field if non-nil, zero value otherwise. + +### GetErrorsOk + +`func (o *ErrorStatus) GetErrorsOk() (*[]ErrorStatusErrorsInner, bool)` + +GetErrorsOk returns a tuple with the Errors field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetErrors + +`func (o *ErrorStatus) SetErrors(v []ErrorStatusErrorsInner)` + +SetErrors sets Errors field to given value. + +### HasErrors + +`func (o *ErrorStatus) HasErrors() bool` + +HasErrors 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/ErrorStatusErrorsInner.md b/docs/ErrorStatusErrorsInner.md new file mode 100644 index 0000000..702315e --- /dev/null +++ b/docs/ErrorStatusErrorsInner.md @@ -0,0 +1,82 @@ +# ErrorStatusErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Field** | Pointer to **string** | | [optional] +**Message** | Pointer to **[]string** | | [optional] + +## Methods + +### NewErrorStatusErrorsInner + +`func NewErrorStatusErrorsInner() *ErrorStatusErrorsInner` + +NewErrorStatusErrorsInner instantiates a new ErrorStatusErrorsInner 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 + +### NewErrorStatusErrorsInnerWithDefaults + +`func NewErrorStatusErrorsInnerWithDefaults() *ErrorStatusErrorsInner` + +NewErrorStatusErrorsInnerWithDefaults instantiates a new ErrorStatusErrorsInner 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 + +### GetField + +`func (o *ErrorStatusErrorsInner) GetField() string` + +GetField returns the Field field if non-nil, zero value otherwise. + +### GetFieldOk + +`func (o *ErrorStatusErrorsInner) GetFieldOk() (*string, bool)` + +GetFieldOk returns a tuple with the Field field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetField + +`func (o *ErrorStatusErrorsInner) SetField(v string)` + +SetField sets Field field to given value. + +### HasField + +`func (o *ErrorStatusErrorsInner) HasField() bool` + +HasField returns a boolean if a field has been set. + +### GetMessage + +`func (o *ErrorStatusErrorsInner) GetMessage() []string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *ErrorStatusErrorsInner) GetMessageOk() (*[]string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *ErrorStatusErrorsInner) SetMessage(v []string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *ErrorStatusErrorsInner) HasMessage() bool` + +HasMessage 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/FactorInner.md b/docs/FactorInner.md new file mode 100644 index 0000000..4a0ffde --- /dev/null +++ b/docs/FactorInner.md @@ -0,0 +1,238 @@ +# FactorInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **string** | MFA device identifier. | [optional] +**Status** | Pointer to **string** | accepted : factor has been verified. pending: registered but has not been verified. | [optional] +**Default** | Pointer to **bool** | True = is user's default MFA device for OneLogin. | [optional] +**AuthFactorName** | Pointer to **string** | \"Official\" authentication factor name, as it appears to administrators in OneLogin. | [optional] +**TypeDisplayName** | Pointer to **string** | Authentication factor display name as it appears to users upon initial registration, as defined by admins at Settings > Authentication Factors. | [optional] +**UserDisplayName** | Pointer to **string** | Authentication factor display name assigned by users when they enroll the device. | [optional] +**ExpiresAt** | Pointer to **string** | A short lived token that is required to Verify the Factor. This token expires based on the expires_in parameter passed in. | [optional] +**FactorData** | Pointer to [**FactorInnerFactorData**](FactorInnerFactorData.md) | | [optional] + +## Methods + +### NewFactorInner + +`func NewFactorInner() *FactorInner` + +NewFactorInner instantiates a new FactorInner 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 + +### NewFactorInnerWithDefaults + +`func NewFactorInnerWithDefaults() *FactorInner` + +NewFactorInnerWithDefaults instantiates a new FactorInner 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 + +### GetId + +`func (o *FactorInner) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *FactorInner) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *FactorInner) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *FactorInner) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetStatus + +`func (o *FactorInner) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *FactorInner) GetStatusOk() (*string, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *FactorInner) SetStatus(v string)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *FactorInner) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### GetDefault + +`func (o *FactorInner) GetDefault() bool` + +GetDefault returns the Default field if non-nil, zero value otherwise. + +### GetDefaultOk + +`func (o *FactorInner) GetDefaultOk() (*bool, bool)` + +GetDefaultOk returns a tuple with the Default field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDefault + +`func (o *FactorInner) SetDefault(v bool)` + +SetDefault sets Default field to given value. + +### HasDefault + +`func (o *FactorInner) HasDefault() bool` + +HasDefault returns a boolean if a field has been set. + +### GetAuthFactorName + +`func (o *FactorInner) GetAuthFactorName() string` + +GetAuthFactorName returns the AuthFactorName field if non-nil, zero value otherwise. + +### GetAuthFactorNameOk + +`func (o *FactorInner) GetAuthFactorNameOk() (*string, bool)` + +GetAuthFactorNameOk returns a tuple with the AuthFactorName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAuthFactorName + +`func (o *FactorInner) SetAuthFactorName(v string)` + +SetAuthFactorName sets AuthFactorName field to given value. + +### HasAuthFactorName + +`func (o *FactorInner) HasAuthFactorName() bool` + +HasAuthFactorName returns a boolean if a field has been set. + +### GetTypeDisplayName + +`func (o *FactorInner) GetTypeDisplayName() string` + +GetTypeDisplayName returns the TypeDisplayName field if non-nil, zero value otherwise. + +### GetTypeDisplayNameOk + +`func (o *FactorInner) GetTypeDisplayNameOk() (*string, bool)` + +GetTypeDisplayNameOk returns a tuple with the TypeDisplayName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTypeDisplayName + +`func (o *FactorInner) SetTypeDisplayName(v string)` + +SetTypeDisplayName sets TypeDisplayName field to given value. + +### HasTypeDisplayName + +`func (o *FactorInner) HasTypeDisplayName() bool` + +HasTypeDisplayName returns a boolean if a field has been set. + +### GetUserDisplayName + +`func (o *FactorInner) GetUserDisplayName() string` + +GetUserDisplayName returns the UserDisplayName field if non-nil, zero value otherwise. + +### GetUserDisplayNameOk + +`func (o *FactorInner) GetUserDisplayNameOk() (*string, bool)` + +GetUserDisplayNameOk returns a tuple with the UserDisplayName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUserDisplayName + +`func (o *FactorInner) SetUserDisplayName(v string)` + +SetUserDisplayName sets UserDisplayName field to given value. + +### HasUserDisplayName + +`func (o *FactorInner) HasUserDisplayName() bool` + +HasUserDisplayName returns a boolean if a field has been set. + +### GetExpiresAt + +`func (o *FactorInner) GetExpiresAt() string` + +GetExpiresAt returns the ExpiresAt field if non-nil, zero value otherwise. + +### GetExpiresAtOk + +`func (o *FactorInner) GetExpiresAtOk() (*string, bool)` + +GetExpiresAtOk returns a tuple with the ExpiresAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExpiresAt + +`func (o *FactorInner) SetExpiresAt(v string)` + +SetExpiresAt sets ExpiresAt field to given value. + +### HasExpiresAt + +`func (o *FactorInner) HasExpiresAt() bool` + +HasExpiresAt returns a boolean if a field has been set. + +### GetFactorData + +`func (o *FactorInner) GetFactorData() FactorInnerFactorData` + +GetFactorData returns the FactorData field if non-nil, zero value otherwise. + +### GetFactorDataOk + +`func (o *FactorInner) GetFactorDataOk() (*FactorInnerFactorData, bool)` + +GetFactorDataOk returns a tuple with the FactorData field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFactorData + +`func (o *FactorInner) SetFactorData(v FactorInnerFactorData)` + +SetFactorData sets FactorData field to given value. + +### HasFactorData + +`func (o *FactorInner) HasFactorData() bool` + +HasFactorData 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/FactorInnerFactorData.md b/docs/FactorInnerFactorData.md new file mode 100644 index 0000000..191fb43 --- /dev/null +++ b/docs/FactorInnerFactorData.md @@ -0,0 +1,82 @@ +# FactorInnerFactorData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**VerificationToken** | Pointer to **string** | The token which can be used to verify the factor registration. | [optional] +**TotpUrl** | Pointer to **string** | OTP Url that can be leveraged for any authenticator that supports the key uri format. | [optional] + +## Methods + +### NewFactorInnerFactorData + +`func NewFactorInnerFactorData() *FactorInnerFactorData` + +NewFactorInnerFactorData instantiates a new FactorInnerFactorData 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 + +### NewFactorInnerFactorDataWithDefaults + +`func NewFactorInnerFactorDataWithDefaults() *FactorInnerFactorData` + +NewFactorInnerFactorDataWithDefaults instantiates a new FactorInnerFactorData 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 + +### GetVerificationToken + +`func (o *FactorInnerFactorData) GetVerificationToken() string` + +GetVerificationToken returns the VerificationToken field if non-nil, zero value otherwise. + +### GetVerificationTokenOk + +`func (o *FactorInnerFactorData) GetVerificationTokenOk() (*string, bool)` + +GetVerificationTokenOk returns a tuple with the VerificationToken field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVerificationToken + +`func (o *FactorInnerFactorData) SetVerificationToken(v string)` + +SetVerificationToken sets VerificationToken field to given value. + +### HasVerificationToken + +`func (o *FactorInnerFactorData) HasVerificationToken() bool` + +HasVerificationToken returns a boolean if a field has been set. + +### GetTotpUrl + +`func (o *FactorInnerFactorData) GetTotpUrl() string` + +GetTotpUrl returns the TotpUrl field if non-nil, zero value otherwise. + +### GetTotpUrlOk + +`func (o *FactorInnerFactorData) GetTotpUrlOk() (*string, bool)` + +GetTotpUrlOk returns a tuple with the TotpUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotpUrl + +`func (o *FactorInnerFactorData) SetTotpUrl(v string)` + +SetTotpUrl sets TotpUrl field to given value. + +### HasTotpUrl + +`func (o *FactorInnerFactorData) HasTotpUrl() bool` + +HasTotpUrl 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/GenerateMfaToken200Response.md b/docs/GenerateMfaToken200Response.md new file mode 100644 index 0000000..b93fcf2 --- /dev/null +++ b/docs/GenerateMfaToken200Response.md @@ -0,0 +1,134 @@ +# GenerateMfaToken200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**MfaToken** | Pointer to **string** | Token can function as a temporary MFA token. It can be used to authenticate for any app when valid. | [optional] +**Reusable** | Pointer to **bool** | true indcates the token can be used multiple times. false indicates the token is invalid after a single use | [optional] +**ExpiresAt** | Pointer to **string** | Defines the expiration time and date for the token. Format is UTC time. | [optional] +**DeviceId** | Pointer to **string** | Defines the expiration time and date for the token. Format is UTC time. | [optional] + +## Methods + +### NewGenerateMfaToken200Response + +`func NewGenerateMfaToken200Response() *GenerateMfaToken200Response` + +NewGenerateMfaToken200Response instantiates a new GenerateMfaToken200Response 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 + +### NewGenerateMfaToken200ResponseWithDefaults + +`func NewGenerateMfaToken200ResponseWithDefaults() *GenerateMfaToken200Response` + +NewGenerateMfaToken200ResponseWithDefaults instantiates a new GenerateMfaToken200Response 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 + +### GetMfaToken + +`func (o *GenerateMfaToken200Response) GetMfaToken() string` + +GetMfaToken returns the MfaToken field if non-nil, zero value otherwise. + +### GetMfaTokenOk + +`func (o *GenerateMfaToken200Response) GetMfaTokenOk() (*string, bool)` + +GetMfaTokenOk returns a tuple with the MfaToken field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMfaToken + +`func (o *GenerateMfaToken200Response) SetMfaToken(v string)` + +SetMfaToken sets MfaToken field to given value. + +### HasMfaToken + +`func (o *GenerateMfaToken200Response) HasMfaToken() bool` + +HasMfaToken returns a boolean if a field has been set. + +### GetReusable + +`func (o *GenerateMfaToken200Response) GetReusable() bool` + +GetReusable returns the Reusable field if non-nil, zero value otherwise. + +### GetReusableOk + +`func (o *GenerateMfaToken200Response) GetReusableOk() (*bool, bool)` + +GetReusableOk returns a tuple with the Reusable field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReusable + +`func (o *GenerateMfaToken200Response) SetReusable(v bool)` + +SetReusable sets Reusable field to given value. + +### HasReusable + +`func (o *GenerateMfaToken200Response) HasReusable() bool` + +HasReusable returns a boolean if a field has been set. + +### GetExpiresAt + +`func (o *GenerateMfaToken200Response) GetExpiresAt() string` + +GetExpiresAt returns the ExpiresAt field if non-nil, zero value otherwise. + +### GetExpiresAtOk + +`func (o *GenerateMfaToken200Response) GetExpiresAtOk() (*string, bool)` + +GetExpiresAtOk returns a tuple with the ExpiresAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExpiresAt + +`func (o *GenerateMfaToken200Response) SetExpiresAt(v string)` + +SetExpiresAt sets ExpiresAt field to given value. + +### HasExpiresAt + +`func (o *GenerateMfaToken200Response) HasExpiresAt() bool` + +HasExpiresAt returns a boolean if a field has been set. + +### GetDeviceId + +`func (o *GenerateMfaToken200Response) GetDeviceId() string` + +GetDeviceId returns the DeviceId field if non-nil, zero value otherwise. + +### GetDeviceIdOk + +`func (o *GenerateMfaToken200Response) GetDeviceIdOk() (*string, bool)` + +GetDeviceIdOk returns a tuple with the DeviceId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDeviceId + +`func (o *GenerateMfaToken200Response) SetDeviceId(v string)` + +SetDeviceId sets DeviceId field to given value. + +### HasDeviceId + +`func (o *GenerateMfaToken200Response) HasDeviceId() bool` + +HasDeviceId 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/GenerateMfaToken422Response.md b/docs/GenerateMfaToken422Response.md new file mode 100644 index 0000000..630a531 --- /dev/null +++ b/docs/GenerateMfaToken422Response.md @@ -0,0 +1,134 @@ +# GenerateMfaToken422Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**StatusCode** | Pointer to **int32** | | [optional] +**Name** | Pointer to **string** | | [optional] +**Message** | Pointer to **string** | | [optional] +**Details** | Pointer to [**GenerateMfaToken422ResponseDetails**](GenerateMfaToken422ResponseDetails.md) | | [optional] + +## Methods + +### NewGenerateMfaToken422Response + +`func NewGenerateMfaToken422Response() *GenerateMfaToken422Response` + +NewGenerateMfaToken422Response instantiates a new GenerateMfaToken422Response 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 + +### NewGenerateMfaToken422ResponseWithDefaults + +`func NewGenerateMfaToken422ResponseWithDefaults() *GenerateMfaToken422Response` + +NewGenerateMfaToken422ResponseWithDefaults instantiates a new GenerateMfaToken422Response 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 + +### GetStatusCode + +`func (o *GenerateMfaToken422Response) GetStatusCode() int32` + +GetStatusCode returns the StatusCode field if non-nil, zero value otherwise. + +### GetStatusCodeOk + +`func (o *GenerateMfaToken422Response) GetStatusCodeOk() (*int32, bool)` + +GetStatusCodeOk returns a tuple with the StatusCode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatusCode + +`func (o *GenerateMfaToken422Response) SetStatusCode(v int32)` + +SetStatusCode sets StatusCode field to given value. + +### HasStatusCode + +`func (o *GenerateMfaToken422Response) HasStatusCode() bool` + +HasStatusCode returns a boolean if a field has been set. + +### GetName + +`func (o *GenerateMfaToken422Response) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *GenerateMfaToken422Response) 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 *GenerateMfaToken422Response) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *GenerateMfaToken422Response) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetMessage + +`func (o *GenerateMfaToken422Response) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *GenerateMfaToken422Response) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *GenerateMfaToken422Response) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *GenerateMfaToken422Response) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + +### GetDetails + +`func (o *GenerateMfaToken422Response) GetDetails() GenerateMfaToken422ResponseDetails` + +GetDetails returns the Details field if non-nil, zero value otherwise. + +### GetDetailsOk + +`func (o *GenerateMfaToken422Response) GetDetailsOk() (*GenerateMfaToken422ResponseDetails, bool)` + +GetDetailsOk returns a tuple with the Details field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDetails + +`func (o *GenerateMfaToken422Response) SetDetails(v GenerateMfaToken422ResponseDetails)` + +SetDetails sets Details field to given value. + +### HasDetails + +`func (o *GenerateMfaToken422Response) HasDetails() bool` + +HasDetails 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/GenerateMfaToken422ResponseDetails.md b/docs/GenerateMfaToken422ResponseDetails.md new file mode 100644 index 0000000..687352f --- /dev/null +++ b/docs/GenerateMfaToken422ResponseDetails.md @@ -0,0 +1,56 @@ +# GenerateMfaToken422ResponseDetails + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Parameters** | Pointer to **[]string** | | [optional] + +## Methods + +### NewGenerateMfaToken422ResponseDetails + +`func NewGenerateMfaToken422ResponseDetails() *GenerateMfaToken422ResponseDetails` + +NewGenerateMfaToken422ResponseDetails instantiates a new GenerateMfaToken422ResponseDetails 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 + +### NewGenerateMfaToken422ResponseDetailsWithDefaults + +`func NewGenerateMfaToken422ResponseDetailsWithDefaults() *GenerateMfaToken422ResponseDetails` + +NewGenerateMfaToken422ResponseDetailsWithDefaults instantiates a new GenerateMfaToken422ResponseDetails 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 + +### GetParameters + +`func (o *GenerateMfaToken422ResponseDetails) GetParameters() []string` + +GetParameters returns the Parameters field if non-nil, zero value otherwise. + +### GetParametersOk + +`func (o *GenerateMfaToken422ResponseDetails) GetParametersOk() (*[]string, bool)` + +GetParametersOk returns a tuple with the Parameters field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetParameters + +`func (o *GenerateMfaToken422ResponseDetails) SetParameters(v []string)` + +SetParameters sets Parameters field to given value. + +### HasParameters + +`func (o *GenerateMfaToken422ResponseDetails) HasParameters() bool` + +HasParameters 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/GenerateMfaTokenRequest.md b/docs/GenerateMfaTokenRequest.md new file mode 100644 index 0000000..22784cb --- /dev/null +++ b/docs/GenerateMfaTokenRequest.md @@ -0,0 +1,82 @@ +# GenerateMfaTokenRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ExpiresIn** | Pointer to **string** | Set the duration of the token in seconds. | [optional] +**Reusable** | Pointer to **bool** | Defines if the token is reusable multiple times within the expiry window. | [optional] + +## Methods + +### NewGenerateMfaTokenRequest + +`func NewGenerateMfaTokenRequest() *GenerateMfaTokenRequest` + +NewGenerateMfaTokenRequest instantiates a new GenerateMfaTokenRequest 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 + +### NewGenerateMfaTokenRequestWithDefaults + +`func NewGenerateMfaTokenRequestWithDefaults() *GenerateMfaTokenRequest` + +NewGenerateMfaTokenRequestWithDefaults instantiates a new GenerateMfaTokenRequest 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 + +### GetExpiresIn + +`func (o *GenerateMfaTokenRequest) GetExpiresIn() string` + +GetExpiresIn returns the ExpiresIn field if non-nil, zero value otherwise. + +### GetExpiresInOk + +`func (o *GenerateMfaTokenRequest) GetExpiresInOk() (*string, bool)` + +GetExpiresInOk returns a tuple with the ExpiresIn field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExpiresIn + +`func (o *GenerateMfaTokenRequest) SetExpiresIn(v string)` + +SetExpiresIn sets ExpiresIn field to given value. + +### HasExpiresIn + +`func (o *GenerateMfaTokenRequest) HasExpiresIn() bool` + +HasExpiresIn returns a boolean if a field has been set. + +### GetReusable + +`func (o *GenerateMfaTokenRequest) GetReusable() bool` + +GetReusable returns the Reusable field if non-nil, zero value otherwise. + +### GetReusableOk + +`func (o *GenerateMfaTokenRequest) GetReusableOk() (*bool, bool)` + +GetReusableOk returns a tuple with the Reusable field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReusable + +`func (o *GenerateMfaTokenRequest) SetReusable(v bool)` + +SetReusable sets Reusable field to given value. + +### HasReusable + +`func (o *GenerateMfaTokenRequest) HasReusable() bool` + +HasReusable 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/GenerateSamlAssertionRequest.md b/docs/GenerateSamlAssertionRequest.md new file mode 100644 index 0000000..9327a68 --- /dev/null +++ b/docs/GenerateSamlAssertionRequest.md @@ -0,0 +1,140 @@ +# GenerateSamlAssertionRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**UsernameOrEmail** | **string** | Set this to the username or email of the OneLogin user accessing the app for which you want to generate a SAML token. | +**Password** | **string** | Password of the OneLogin user accessing the app for which you want to generate a SAML token. | +**AppId** | **string** | App ID of the app for which you want to generate a SAML token. This is the app ID in OneLogin. | +**Subdomain** | **string** | Set to the subdomain of the OneLogin user accessing the app for which you want to generate a SAML token. | +**IpAddress** | Pointer to **string** | Whitelisted IP address, if MFA is required and you need to honor IP address whitelisting defined in MFA policies. | [optional] + +## Methods + +### NewGenerateSamlAssertionRequest + +`func NewGenerateSamlAssertionRequest(usernameOrEmail string, password string, appId string, subdomain string, ) *GenerateSamlAssertionRequest` + +NewGenerateSamlAssertionRequest instantiates a new GenerateSamlAssertionRequest 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 + +### NewGenerateSamlAssertionRequestWithDefaults + +`func NewGenerateSamlAssertionRequestWithDefaults() *GenerateSamlAssertionRequest` + +NewGenerateSamlAssertionRequestWithDefaults instantiates a new GenerateSamlAssertionRequest 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 + +### GetUsernameOrEmail + +`func (o *GenerateSamlAssertionRequest) GetUsernameOrEmail() string` + +GetUsernameOrEmail returns the UsernameOrEmail field if non-nil, zero value otherwise. + +### GetUsernameOrEmailOk + +`func (o *GenerateSamlAssertionRequest) GetUsernameOrEmailOk() (*string, bool)` + +GetUsernameOrEmailOk returns a tuple with the UsernameOrEmail field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUsernameOrEmail + +`func (o *GenerateSamlAssertionRequest) SetUsernameOrEmail(v string)` + +SetUsernameOrEmail sets UsernameOrEmail field to given value. + + +### GetPassword + +`func (o *GenerateSamlAssertionRequest) GetPassword() string` + +GetPassword returns the Password field if non-nil, zero value otherwise. + +### GetPasswordOk + +`func (o *GenerateSamlAssertionRequest) GetPasswordOk() (*string, bool)` + +GetPasswordOk returns a tuple with the Password field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPassword + +`func (o *GenerateSamlAssertionRequest) SetPassword(v string)` + +SetPassword sets Password field to given value. + + +### GetAppId + +`func (o *GenerateSamlAssertionRequest) GetAppId() string` + +GetAppId returns the AppId field if non-nil, zero value otherwise. + +### GetAppIdOk + +`func (o *GenerateSamlAssertionRequest) GetAppIdOk() (*string, bool)` + +GetAppIdOk returns a tuple with the AppId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAppId + +`func (o *GenerateSamlAssertionRequest) SetAppId(v string)` + +SetAppId sets AppId field to given value. + + +### GetSubdomain + +`func (o *GenerateSamlAssertionRequest) GetSubdomain() string` + +GetSubdomain returns the Subdomain field if non-nil, zero value otherwise. + +### GetSubdomainOk + +`func (o *GenerateSamlAssertionRequest) GetSubdomainOk() (*string, bool)` + +GetSubdomainOk returns a tuple with the Subdomain field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSubdomain + +`func (o *GenerateSamlAssertionRequest) SetSubdomain(v string)` + +SetSubdomain sets Subdomain field to given value. + + +### GetIpAddress + +`func (o *GenerateSamlAssertionRequest) GetIpAddress() string` + +GetIpAddress returns the IpAddress field if non-nil, zero value otherwise. + +### GetIpAddressOk + +`func (o *GenerateSamlAssertionRequest) GetIpAddressOk() (*string, bool)` + +GetIpAddressOk returns a tuple with the IpAddress field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIpAddress + +`func (o *GenerateSamlAssertionRequest) SetIpAddress(v string)` + +SetIpAddress sets IpAddress field to given value. + +### HasIpAddress + +`func (o *GenerateSamlAssertionRequest) HasIpAddress() bool` + +HasIpAddress 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/GenerateToken200Response.md b/docs/GenerateToken200Response.md new file mode 100644 index 0000000..2dfa44f --- /dev/null +++ b/docs/GenerateToken200Response.md @@ -0,0 +1,186 @@ +# GenerateToken200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccessToken** | Pointer to **string** | | [optional] +**CreatedAt** | Pointer to **string** | | [optional] +**ExpiresIn** | Pointer to **int32** | | [optional] +**RefreshToken** | Pointer to **string** | | [optional] +**TokenType** | Pointer to **string** | | [optional] +**AccounttId** | Pointer to **int32** | | [optional] + +## Methods + +### NewGenerateToken200Response + +`func NewGenerateToken200Response() *GenerateToken200Response` + +NewGenerateToken200Response instantiates a new GenerateToken200Response 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 + +### NewGenerateToken200ResponseWithDefaults + +`func NewGenerateToken200ResponseWithDefaults() *GenerateToken200Response` + +NewGenerateToken200ResponseWithDefaults instantiates a new GenerateToken200Response 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 + +### GetAccessToken + +`func (o *GenerateToken200Response) GetAccessToken() string` + +GetAccessToken returns the AccessToken field if non-nil, zero value otherwise. + +### GetAccessTokenOk + +`func (o *GenerateToken200Response) GetAccessTokenOk() (*string, bool)` + +GetAccessTokenOk returns a tuple with the AccessToken field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccessToken + +`func (o *GenerateToken200Response) SetAccessToken(v string)` + +SetAccessToken sets AccessToken field to given value. + +### HasAccessToken + +`func (o *GenerateToken200Response) HasAccessToken() bool` + +HasAccessToken returns a boolean if a field has been set. + +### GetCreatedAt + +`func (o *GenerateToken200Response) GetCreatedAt() string` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *GenerateToken200Response) GetCreatedAtOk() (*string, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *GenerateToken200Response) SetCreatedAt(v string)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *GenerateToken200Response) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### GetExpiresIn + +`func (o *GenerateToken200Response) GetExpiresIn() int32` + +GetExpiresIn returns the ExpiresIn field if non-nil, zero value otherwise. + +### GetExpiresInOk + +`func (o *GenerateToken200Response) GetExpiresInOk() (*int32, bool)` + +GetExpiresInOk returns a tuple with the ExpiresIn field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExpiresIn + +`func (o *GenerateToken200Response) SetExpiresIn(v int32)` + +SetExpiresIn sets ExpiresIn field to given value. + +### HasExpiresIn + +`func (o *GenerateToken200Response) HasExpiresIn() bool` + +HasExpiresIn returns a boolean if a field has been set. + +### GetRefreshToken + +`func (o *GenerateToken200Response) GetRefreshToken() string` + +GetRefreshToken returns the RefreshToken field if non-nil, zero value otherwise. + +### GetRefreshTokenOk + +`func (o *GenerateToken200Response) GetRefreshTokenOk() (*string, bool)` + +GetRefreshTokenOk returns a tuple with the RefreshToken field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRefreshToken + +`func (o *GenerateToken200Response) SetRefreshToken(v string)` + +SetRefreshToken sets RefreshToken field to given value. + +### HasRefreshToken + +`func (o *GenerateToken200Response) HasRefreshToken() bool` + +HasRefreshToken returns a boolean if a field has been set. + +### GetTokenType + +`func (o *GenerateToken200Response) GetTokenType() string` + +GetTokenType returns the TokenType field if non-nil, zero value otherwise. + +### GetTokenTypeOk + +`func (o *GenerateToken200Response) GetTokenTypeOk() (*string, bool)` + +GetTokenTypeOk returns a tuple with the TokenType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTokenType + +`func (o *GenerateToken200Response) SetTokenType(v string)` + +SetTokenType sets TokenType field to given value. + +### HasTokenType + +`func (o *GenerateToken200Response) HasTokenType() bool` + +HasTokenType returns a boolean if a field has been set. + +### GetAccounttId + +`func (o *GenerateToken200Response) GetAccounttId() int32` + +GetAccounttId returns the AccounttId field if non-nil, zero value otherwise. + +### GetAccounttIdOk + +`func (o *GenerateToken200Response) GetAccounttIdOk() (*int32, bool)` + +GetAccounttIdOk returns a tuple with the AccounttId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccounttId + +`func (o *GenerateToken200Response) SetAccounttId(v int32)` + +SetAccounttId sets AccounttId field to given value. + +### HasAccounttId + +`func (o *GenerateToken200Response) HasAccounttId() bool` + +HasAccounttId 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/GenerateToken400Response.md b/docs/GenerateToken400Response.md new file mode 100644 index 0000000..f75264f --- /dev/null +++ b/docs/GenerateToken400Response.md @@ -0,0 +1,56 @@ +# GenerateToken400Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Status** | Pointer to [**Status**](Status.md) | | [optional] + +## Methods + +### NewGenerateToken400Response + +`func NewGenerateToken400Response() *GenerateToken400Response` + +NewGenerateToken400Response instantiates a new GenerateToken400Response 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 + +### NewGenerateToken400ResponseWithDefaults + +`func NewGenerateToken400ResponseWithDefaults() *GenerateToken400Response` + +NewGenerateToken400ResponseWithDefaults instantiates a new GenerateToken400Response 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 + +### GetStatus + +`func (o *GenerateToken400Response) GetStatus() Status` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *GenerateToken400Response) GetStatusOk() (*Status, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *GenerateToken400Response) SetStatus(v Status)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *GenerateToken400Response) HasStatus() bool` + +HasStatus 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/GenerateTokenRequest.md b/docs/GenerateTokenRequest.md new file mode 100644 index 0000000..076c46b --- /dev/null +++ b/docs/GenerateTokenRequest.md @@ -0,0 +1,56 @@ +# GenerateTokenRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**GrantType** | Pointer to **string** | | [optional] + +## Methods + +### NewGenerateTokenRequest + +`func NewGenerateTokenRequest() *GenerateTokenRequest` + +NewGenerateTokenRequest instantiates a new GenerateTokenRequest 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 + +### NewGenerateTokenRequestWithDefaults + +`func NewGenerateTokenRequestWithDefaults() *GenerateTokenRequest` + +NewGenerateTokenRequestWithDefaults instantiates a new GenerateTokenRequest 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 + +### GetGrantType + +`func (o *GenerateTokenRequest) GetGrantType() string` + +GetGrantType returns the GrantType field if non-nil, zero value otherwise. + +### GetGrantTypeOk + +`func (o *GenerateTokenRequest) GetGrantTypeOk() (*string, bool)` + +GetGrantTypeOk returns a tuple with the GrantType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetGrantType + +`func (o *GenerateTokenRequest) SetGrantType(v string)` + +SetGrantType sets GrantType field to given value. + +### HasGrantType + +`func (o *GenerateTokenRequest) HasGrantType() bool` + +HasGrantType 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/GetAuthorizationServer200Response.md b/docs/GetAuthorizationServer200Response.md new file mode 100644 index 0000000..ad4ef83 --- /dev/null +++ b/docs/GetAuthorizationServer200Response.md @@ -0,0 +1,134 @@ +# GetAuthorizationServer200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Configuration** | Pointer to [**AuthServerConfiguration**](AuthServerConfiguration.md) | | [optional] +**Id** | Pointer to **int32** | | [optional] +**Description** | Pointer to **string** | | [optional] +**Name** | Pointer to **string** | | [optional] + +## Methods + +### NewGetAuthorizationServer200Response + +`func NewGetAuthorizationServer200Response() *GetAuthorizationServer200Response` + +NewGetAuthorizationServer200Response instantiates a new GetAuthorizationServer200Response 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 + +### NewGetAuthorizationServer200ResponseWithDefaults + +`func NewGetAuthorizationServer200ResponseWithDefaults() *GetAuthorizationServer200Response` + +NewGetAuthorizationServer200ResponseWithDefaults instantiates a new GetAuthorizationServer200Response 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 + +### GetConfiguration + +`func (o *GetAuthorizationServer200Response) GetConfiguration() AuthServerConfiguration` + +GetConfiguration returns the Configuration field if non-nil, zero value otherwise. + +### GetConfigurationOk + +`func (o *GetAuthorizationServer200Response) GetConfigurationOk() (*AuthServerConfiguration, bool)` + +GetConfigurationOk returns a tuple with the Configuration field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConfiguration + +`func (o *GetAuthorizationServer200Response) SetConfiguration(v AuthServerConfiguration)` + +SetConfiguration sets Configuration field to given value. + +### HasConfiguration + +`func (o *GetAuthorizationServer200Response) HasConfiguration() bool` + +HasConfiguration returns a boolean if a field has been set. + +### GetId + +`func (o *GetAuthorizationServer200Response) GetId() int32` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *GetAuthorizationServer200Response) GetIdOk() (*int32, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *GetAuthorizationServer200Response) SetId(v int32)` + +SetId sets Id field to given value. + +### HasId + +`func (o *GetAuthorizationServer200Response) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetDescription + +`func (o *GetAuthorizationServer200Response) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *GetAuthorizationServer200Response) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *GetAuthorizationServer200Response) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *GetAuthorizationServer200Response) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetName + +`func (o *GetAuthorizationServer200Response) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *GetAuthorizationServer200Response) 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 *GetAuthorizationServer200Response) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *GetAuthorizationServer200Response) HasName() bool` + +HasName 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/GetAvailableFactors200ResponseInner.md b/docs/GetAvailableFactors200ResponseInner.md new file mode 100644 index 0000000..3111d25 --- /dev/null +++ b/docs/GetAvailableFactors200ResponseInner.md @@ -0,0 +1,108 @@ +# GetAvailableFactors200ResponseInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FactorId** | Pointer to **int32** | Identifier for the factor which will be used for user enrollment | [optional] +**Name** | Pointer to **string** | Authentication factor name, as it appears to administrators in OneLogin. | [optional] +**AuthFactorName** | Pointer to **string** | Internal use only | [optional] + +## Methods + +### NewGetAvailableFactors200ResponseInner + +`func NewGetAvailableFactors200ResponseInner() *GetAvailableFactors200ResponseInner` + +NewGetAvailableFactors200ResponseInner instantiates a new GetAvailableFactors200ResponseInner 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 + +### NewGetAvailableFactors200ResponseInnerWithDefaults + +`func NewGetAvailableFactors200ResponseInnerWithDefaults() *GetAvailableFactors200ResponseInner` + +NewGetAvailableFactors200ResponseInnerWithDefaults instantiates a new GetAvailableFactors200ResponseInner 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 + +### GetFactorId + +`func (o *GetAvailableFactors200ResponseInner) GetFactorId() int32` + +GetFactorId returns the FactorId field if non-nil, zero value otherwise. + +### GetFactorIdOk + +`func (o *GetAvailableFactors200ResponseInner) GetFactorIdOk() (*int32, bool)` + +GetFactorIdOk returns a tuple with the FactorId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFactorId + +`func (o *GetAvailableFactors200ResponseInner) SetFactorId(v int32)` + +SetFactorId sets FactorId field to given value. + +### HasFactorId + +`func (o *GetAvailableFactors200ResponseInner) HasFactorId() bool` + +HasFactorId returns a boolean if a field has been set. + +### GetName + +`func (o *GetAvailableFactors200ResponseInner) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *GetAvailableFactors200ResponseInner) 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 *GetAvailableFactors200ResponseInner) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *GetAvailableFactors200ResponseInner) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetAuthFactorName + +`func (o *GetAvailableFactors200ResponseInner) GetAuthFactorName() string` + +GetAuthFactorName returns the AuthFactorName field if non-nil, zero value otherwise. + +### GetAuthFactorNameOk + +`func (o *GetAvailableFactors200ResponseInner) GetAuthFactorNameOk() (*string, bool)` + +GetAuthFactorNameOk returns a tuple with the AuthFactorName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAuthFactorName + +`func (o *GetAvailableFactors200ResponseInner) SetAuthFactorName(v string)` + +SetAuthFactorName sets AuthFactorName field to given value. + +### HasAuthFactorName + +`func (o *GetAvailableFactors200ResponseInner) HasAuthFactorName() bool` + +HasAuthFactorName 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/GetClientApps200ResponseInner.md b/docs/GetClientApps200ResponseInner.md new file mode 100644 index 0000000..68e4457 --- /dev/null +++ b/docs/GetClientApps200ResponseInner.md @@ -0,0 +1,134 @@ +# GetClientApps200ResponseInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Scopes** | Pointer to [**[]GetClientApps200ResponseInnerScopesInner**](GetClientApps200ResponseInnerScopesInner.md) | | [optional] +**AppId** | Pointer to **int32** | | [optional] +**Name** | Pointer to **string** | | [optional] +**ApiAuthId** | Pointer to **int32** | | [optional] + +## Methods + +### NewGetClientApps200ResponseInner + +`func NewGetClientApps200ResponseInner() *GetClientApps200ResponseInner` + +NewGetClientApps200ResponseInner instantiates a new GetClientApps200ResponseInner 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 + +### NewGetClientApps200ResponseInnerWithDefaults + +`func NewGetClientApps200ResponseInnerWithDefaults() *GetClientApps200ResponseInner` + +NewGetClientApps200ResponseInnerWithDefaults instantiates a new GetClientApps200ResponseInner 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 + +### GetScopes + +`func (o *GetClientApps200ResponseInner) GetScopes() []GetClientApps200ResponseInnerScopesInner` + +GetScopes returns the Scopes field if non-nil, zero value otherwise. + +### GetScopesOk + +`func (o *GetClientApps200ResponseInner) GetScopesOk() (*[]GetClientApps200ResponseInnerScopesInner, bool)` + +GetScopesOk returns a tuple with the Scopes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetScopes + +`func (o *GetClientApps200ResponseInner) SetScopes(v []GetClientApps200ResponseInnerScopesInner)` + +SetScopes sets Scopes field to given value. + +### HasScopes + +`func (o *GetClientApps200ResponseInner) HasScopes() bool` + +HasScopes returns a boolean if a field has been set. + +### GetAppId + +`func (o *GetClientApps200ResponseInner) GetAppId() int32` + +GetAppId returns the AppId field if non-nil, zero value otherwise. + +### GetAppIdOk + +`func (o *GetClientApps200ResponseInner) GetAppIdOk() (*int32, bool)` + +GetAppIdOk returns a tuple with the AppId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAppId + +`func (o *GetClientApps200ResponseInner) SetAppId(v int32)` + +SetAppId sets AppId field to given value. + +### HasAppId + +`func (o *GetClientApps200ResponseInner) HasAppId() bool` + +HasAppId returns a boolean if a field has been set. + +### GetName + +`func (o *GetClientApps200ResponseInner) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *GetClientApps200ResponseInner) 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 *GetClientApps200ResponseInner) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *GetClientApps200ResponseInner) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetApiAuthId + +`func (o *GetClientApps200ResponseInner) GetApiAuthId() int32` + +GetApiAuthId returns the ApiAuthId field if non-nil, zero value otherwise. + +### GetApiAuthIdOk + +`func (o *GetClientApps200ResponseInner) GetApiAuthIdOk() (*int32, bool)` + +GetApiAuthIdOk returns a tuple with the ApiAuthId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetApiAuthId + +`func (o *GetClientApps200ResponseInner) SetApiAuthId(v int32)` + +SetApiAuthId sets ApiAuthId field to given value. + +### HasApiAuthId + +`func (o *GetClientApps200ResponseInner) HasApiAuthId() bool` + +HasApiAuthId 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/GetClientApps200ResponseInnerScopesInner.md b/docs/GetClientApps200ResponseInnerScopesInner.md new file mode 100644 index 0000000..bad8019 --- /dev/null +++ b/docs/GetClientApps200ResponseInnerScopesInner.md @@ -0,0 +1,108 @@ +# GetClientApps200ResponseInnerScopesInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Description** | Pointer to **string** | | [optional] +**Value** | Pointer to **string** | | [optional] +**Id** | Pointer to **int32** | | [optional] + +## Methods + +### NewGetClientApps200ResponseInnerScopesInner + +`func NewGetClientApps200ResponseInnerScopesInner() *GetClientApps200ResponseInnerScopesInner` + +NewGetClientApps200ResponseInnerScopesInner instantiates a new GetClientApps200ResponseInnerScopesInner 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 + +### NewGetClientApps200ResponseInnerScopesInnerWithDefaults + +`func NewGetClientApps200ResponseInnerScopesInnerWithDefaults() *GetClientApps200ResponseInnerScopesInner` + +NewGetClientApps200ResponseInnerScopesInnerWithDefaults instantiates a new GetClientApps200ResponseInnerScopesInner 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 + +### GetDescription + +`func (o *GetClientApps200ResponseInnerScopesInner) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *GetClientApps200ResponseInnerScopesInner) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *GetClientApps200ResponseInnerScopesInner) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *GetClientApps200ResponseInnerScopesInner) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetValue + +`func (o *GetClientApps200ResponseInnerScopesInner) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *GetClientApps200ResponseInnerScopesInner) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *GetClientApps200ResponseInnerScopesInner) SetValue(v string)` + +SetValue sets Value field to given value. + +### HasValue + +`func (o *GetClientApps200ResponseInnerScopesInner) HasValue() bool` + +HasValue returns a boolean if a field has been set. + +### GetId + +`func (o *GetClientApps200ResponseInnerScopesInner) GetId() int32` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *GetClientApps200ResponseInnerScopesInner) GetIdOk() (*int32, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *GetClientApps200ResponseInnerScopesInner) SetId(v int32)` + +SetId sets Id field to given value. + +### HasId + +`func (o *GetClientApps200ResponseInnerScopesInner) HasId() bool` + +HasId 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/GetRateLimit200Response.md b/docs/GetRateLimit200Response.md new file mode 100644 index 0000000..0f524c9 --- /dev/null +++ b/docs/GetRateLimit200Response.md @@ -0,0 +1,82 @@ +# GetRateLimit200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Status** | Pointer to [**Status**](Status.md) | | [optional] +**Data** | Pointer to [**GetRateLimit200ResponseData**](GetRateLimit200ResponseData.md) | | [optional] + +## Methods + +### NewGetRateLimit200Response + +`func NewGetRateLimit200Response() *GetRateLimit200Response` + +NewGetRateLimit200Response instantiates a new GetRateLimit200Response 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 + +### NewGetRateLimit200ResponseWithDefaults + +`func NewGetRateLimit200ResponseWithDefaults() *GetRateLimit200Response` + +NewGetRateLimit200ResponseWithDefaults instantiates a new GetRateLimit200Response 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 + +### GetStatus + +`func (o *GetRateLimit200Response) GetStatus() Status` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *GetRateLimit200Response) GetStatusOk() (*Status, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *GetRateLimit200Response) SetStatus(v Status)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *GetRateLimit200Response) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### GetData + +`func (o *GetRateLimit200Response) GetData() GetRateLimit200ResponseData` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *GetRateLimit200Response) GetDataOk() (*GetRateLimit200ResponseData, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *GetRateLimit200Response) SetData(v GetRateLimit200ResponseData)` + +SetData sets Data field to given value. + +### HasData + +`func (o *GetRateLimit200Response) HasData() bool` + +HasData 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/GetRateLimit200ResponseData.md b/docs/GetRateLimit200ResponseData.md new file mode 100644 index 0000000..355c443 --- /dev/null +++ b/docs/GetRateLimit200ResponseData.md @@ -0,0 +1,108 @@ +# GetRateLimit200ResponseData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**XRateLimitLimit** | Pointer to **int32** | | [optional] +**XRateLimitRemaining** | Pointer to **int32** | | [optional] +**XRateLimitReset** | Pointer to **int32** | | [optional] + +## Methods + +### NewGetRateLimit200ResponseData + +`func NewGetRateLimit200ResponseData() *GetRateLimit200ResponseData` + +NewGetRateLimit200ResponseData instantiates a new GetRateLimit200ResponseData 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 + +### NewGetRateLimit200ResponseDataWithDefaults + +`func NewGetRateLimit200ResponseDataWithDefaults() *GetRateLimit200ResponseData` + +NewGetRateLimit200ResponseDataWithDefaults instantiates a new GetRateLimit200ResponseData 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 + +### GetXRateLimitLimit + +`func (o *GetRateLimit200ResponseData) GetXRateLimitLimit() int32` + +GetXRateLimitLimit returns the XRateLimitLimit field if non-nil, zero value otherwise. + +### GetXRateLimitLimitOk + +`func (o *GetRateLimit200ResponseData) GetXRateLimitLimitOk() (*int32, bool)` + +GetXRateLimitLimitOk returns a tuple with the XRateLimitLimit field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetXRateLimitLimit + +`func (o *GetRateLimit200ResponseData) SetXRateLimitLimit(v int32)` + +SetXRateLimitLimit sets XRateLimitLimit field to given value. + +### HasXRateLimitLimit + +`func (o *GetRateLimit200ResponseData) HasXRateLimitLimit() bool` + +HasXRateLimitLimit returns a boolean if a field has been set. + +### GetXRateLimitRemaining + +`func (o *GetRateLimit200ResponseData) GetXRateLimitRemaining() int32` + +GetXRateLimitRemaining returns the XRateLimitRemaining field if non-nil, zero value otherwise. + +### GetXRateLimitRemainingOk + +`func (o *GetRateLimit200ResponseData) GetXRateLimitRemainingOk() (*int32, bool)` + +GetXRateLimitRemainingOk returns a tuple with the XRateLimitRemaining field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetXRateLimitRemaining + +`func (o *GetRateLimit200ResponseData) SetXRateLimitRemaining(v int32)` + +SetXRateLimitRemaining sets XRateLimitRemaining field to given value. + +### HasXRateLimitRemaining + +`func (o *GetRateLimit200ResponseData) HasXRateLimitRemaining() bool` + +HasXRateLimitRemaining returns a boolean if a field has been set. + +### GetXRateLimitReset + +`func (o *GetRateLimit200ResponseData) GetXRateLimitReset() int32` + +GetXRateLimitReset returns the XRateLimitReset field if non-nil, zero value otherwise. + +### GetXRateLimitResetOk + +`func (o *GetRateLimit200ResponseData) GetXRateLimitResetOk() (*int32, bool)` + +GetXRateLimitResetOk returns a tuple with the XRateLimitReset field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetXRateLimitReset + +`func (o *GetRateLimit200ResponseData) SetXRateLimitReset(v int32)` + +SetXRateLimitReset sets XRateLimitReset field to given value. + +### HasXRateLimitReset + +`func (o *GetRateLimit200ResponseData) HasXRateLimitReset() bool` + +HasXRateLimitReset 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/GetRiskScore200Response.md b/docs/GetRiskScore200Response.md new file mode 100644 index 0000000..2594773 --- /dev/null +++ b/docs/GetRiskScore200Response.md @@ -0,0 +1,82 @@ +# GetRiskScore200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Score** | Pointer to **float32** | A risk score 0 is low risk and 100 is the highest risk level possible. | [optional] +**Triggers** | Pointer to **[]string** | Triggers are indicators of some of the key items that influenced the risk score. | [optional] + +## Methods + +### NewGetRiskScore200Response + +`func NewGetRiskScore200Response() *GetRiskScore200Response` + +NewGetRiskScore200Response instantiates a new GetRiskScore200Response 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 + +### NewGetRiskScore200ResponseWithDefaults + +`func NewGetRiskScore200ResponseWithDefaults() *GetRiskScore200Response` + +NewGetRiskScore200ResponseWithDefaults instantiates a new GetRiskScore200Response 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 + +### GetScore + +`func (o *GetRiskScore200Response) GetScore() float32` + +GetScore returns the Score field if non-nil, zero value otherwise. + +### GetScoreOk + +`func (o *GetRiskScore200Response) GetScoreOk() (*float32, bool)` + +GetScoreOk returns a tuple with the Score field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetScore + +`func (o *GetRiskScore200Response) SetScore(v float32)` + +SetScore sets Score field to given value. + +### HasScore + +`func (o *GetRiskScore200Response) HasScore() bool` + +HasScore returns a boolean if a field has been set. + +### GetTriggers + +`func (o *GetRiskScore200Response) GetTriggers() []string` + +GetTriggers returns the Triggers field if non-nil, zero value otherwise. + +### GetTriggersOk + +`func (o *GetRiskScore200Response) GetTriggersOk() (*[]string, bool)` + +GetTriggersOk returns a tuple with the Triggers field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTriggers + +`func (o *GetRiskScore200Response) SetTriggers(v []string)` + +SetTriggers sets Triggers field to given value. + +### HasTriggers + +`func (o *GetRiskScore200Response) HasTriggers() bool` + +HasTriggers 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/GetRiskScore400Response.md b/docs/GetRiskScore400Response.md new file mode 100644 index 0000000..f770eae --- /dev/null +++ b/docs/GetRiskScore400Response.md @@ -0,0 +1,56 @@ +# GetRiskScore400Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Messages** | Pointer to **[]string** | | [optional] + +## Methods + +### NewGetRiskScore400Response + +`func NewGetRiskScore400Response() *GetRiskScore400Response` + +NewGetRiskScore400Response instantiates a new GetRiskScore400Response 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 + +### NewGetRiskScore400ResponseWithDefaults + +`func NewGetRiskScore400ResponseWithDefaults() *GetRiskScore400Response` + +NewGetRiskScore400ResponseWithDefaults instantiates a new GetRiskScore400Response 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 + +### GetMessages + +`func (o *GetRiskScore400Response) GetMessages() []string` + +GetMessages returns the Messages field if non-nil, zero value otherwise. + +### GetMessagesOk + +`func (o *GetRiskScore400Response) GetMessagesOk() (*[]string, bool)` + +GetMessagesOk returns a tuple with the Messages field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessages + +`func (o *GetRiskScore400Response) SetMessages(v []string)` + +SetMessages sets Messages field to given value. + +### HasMessages + +`func (o *GetRiskScore400Response) HasMessages() bool` + +HasMessages 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/GetRiskScoreRequest.md b/docs/GetRiskScoreRequest.md new file mode 100644 index 0000000..54623b1 --- /dev/null +++ b/docs/GetRiskScoreRequest.md @@ -0,0 +1,197 @@ +# GetRiskScoreRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Ip** | **string** | The IP address of the User's request. | +**UserAgent** | **string** | The user agent of the User's request. | +**User** | [**RiskUser**](RiskUser.md) | | +**Source** | Pointer to [**Source**](Source.md) | | [optional] +**Session** | Pointer to [**Session**](Session.md) | | [optional] +**Device** | Pointer to [**RiskDevice**](RiskDevice.md) | | [optional] +**Fp** | Pointer to **string** | Set to the value of the __tdli_fp cookie. | [optional] + +## Methods + +### NewGetRiskScoreRequest + +`func NewGetRiskScoreRequest(ip string, userAgent string, user RiskUser, ) *GetRiskScoreRequest` + +NewGetRiskScoreRequest instantiates a new GetRiskScoreRequest 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 + +### NewGetRiskScoreRequestWithDefaults + +`func NewGetRiskScoreRequestWithDefaults() *GetRiskScoreRequest` + +NewGetRiskScoreRequestWithDefaults instantiates a new GetRiskScoreRequest 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 + +### GetIp + +`func (o *GetRiskScoreRequest) GetIp() string` + +GetIp returns the Ip field if non-nil, zero value otherwise. + +### GetIpOk + +`func (o *GetRiskScoreRequest) GetIpOk() (*string, bool)` + +GetIpOk returns a tuple with the Ip field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIp + +`func (o *GetRiskScoreRequest) SetIp(v string)` + +SetIp sets Ip field to given value. + + +### GetUserAgent + +`func (o *GetRiskScoreRequest) GetUserAgent() string` + +GetUserAgent returns the UserAgent field if non-nil, zero value otherwise. + +### GetUserAgentOk + +`func (o *GetRiskScoreRequest) GetUserAgentOk() (*string, bool)` + +GetUserAgentOk returns a tuple with the UserAgent field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUserAgent + +`func (o *GetRiskScoreRequest) SetUserAgent(v string)` + +SetUserAgent sets UserAgent field to given value. + + +### GetUser + +`func (o *GetRiskScoreRequest) GetUser() RiskUser` + +GetUser returns the User field if non-nil, zero value otherwise. + +### GetUserOk + +`func (o *GetRiskScoreRequest) GetUserOk() (*RiskUser, bool)` + +GetUserOk returns a tuple with the User field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUser + +`func (o *GetRiskScoreRequest) SetUser(v RiskUser)` + +SetUser sets User field to given value. + + +### GetSource + +`func (o *GetRiskScoreRequest) GetSource() Source` + +GetSource returns the Source field if non-nil, zero value otherwise. + +### GetSourceOk + +`func (o *GetRiskScoreRequest) 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 *GetRiskScoreRequest) SetSource(v Source)` + +SetSource sets Source field to given value. + +### HasSource + +`func (o *GetRiskScoreRequest) HasSource() bool` + +HasSource returns a boolean if a field has been set. + +### GetSession + +`func (o *GetRiskScoreRequest) GetSession() Session` + +GetSession returns the Session field if non-nil, zero value otherwise. + +### GetSessionOk + +`func (o *GetRiskScoreRequest) GetSessionOk() (*Session, bool)` + +GetSessionOk returns a tuple with the Session field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSession + +`func (o *GetRiskScoreRequest) SetSession(v Session)` + +SetSession sets Session field to given value. + +### HasSession + +`func (o *GetRiskScoreRequest) HasSession() bool` + +HasSession returns a boolean if a field has been set. + +### GetDevice + +`func (o *GetRiskScoreRequest) GetDevice() RiskDevice` + +GetDevice returns the Device field if non-nil, zero value otherwise. + +### GetDeviceOk + +`func (o *GetRiskScoreRequest) GetDeviceOk() (*RiskDevice, bool)` + +GetDeviceOk returns a tuple with the Device field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDevice + +`func (o *GetRiskScoreRequest) SetDevice(v RiskDevice)` + +SetDevice sets Device field to given value. + +### HasDevice + +`func (o *GetRiskScoreRequest) HasDevice() bool` + +HasDevice returns a boolean if a field has been set. + +### GetFp + +`func (o *GetRiskScoreRequest) GetFp() string` + +GetFp returns the Fp field if non-nil, zero value otherwise. + +### GetFpOk + +`func (o *GetRiskScoreRequest) GetFpOk() (*string, bool)` + +GetFpOk returns a tuple with the Fp field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFp + +`func (o *GetRiskScoreRequest) SetFp(v string)` + +SetFp sets Fp field to given value. + +### HasFp + +`func (o *GetRiskScoreRequest) HasFp() bool` + +HasFp 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/GetScoreInsights200Response.md b/docs/GetScoreInsights200Response.md new file mode 100644 index 0000000..fb0b0bd --- /dev/null +++ b/docs/GetScoreInsights200Response.md @@ -0,0 +1,82 @@ +# GetScoreInsights200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Scores** | Pointer to [**GetScoreInsights200ResponseScores**](GetScoreInsights200ResponseScores.md) | | [optional] +**Total** | Pointer to **int32** | | [optional] + +## Methods + +### NewGetScoreInsights200Response + +`func NewGetScoreInsights200Response() *GetScoreInsights200Response` + +NewGetScoreInsights200Response instantiates a new GetScoreInsights200Response 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 + +### NewGetScoreInsights200ResponseWithDefaults + +`func NewGetScoreInsights200ResponseWithDefaults() *GetScoreInsights200Response` + +NewGetScoreInsights200ResponseWithDefaults instantiates a new GetScoreInsights200Response 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 + +### GetScores + +`func (o *GetScoreInsights200Response) GetScores() GetScoreInsights200ResponseScores` + +GetScores returns the Scores field if non-nil, zero value otherwise. + +### GetScoresOk + +`func (o *GetScoreInsights200Response) GetScoresOk() (*GetScoreInsights200ResponseScores, bool)` + +GetScoresOk returns a tuple with the Scores field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetScores + +`func (o *GetScoreInsights200Response) SetScores(v GetScoreInsights200ResponseScores)` + +SetScores sets Scores field to given value. + +### HasScores + +`func (o *GetScoreInsights200Response) HasScores() bool` + +HasScores returns a boolean if a field has been set. + +### GetTotal + +`func (o *GetScoreInsights200Response) GetTotal() int32` + +GetTotal returns the Total field if non-nil, zero value otherwise. + +### GetTotalOk + +`func (o *GetScoreInsights200Response) GetTotalOk() (*int32, bool)` + +GetTotalOk returns a tuple with the Total field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotal + +`func (o *GetScoreInsights200Response) SetTotal(v int32)` + +SetTotal sets Total field to given value. + +### HasTotal + +`func (o *GetScoreInsights200Response) HasTotal() bool` + +HasTotal 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/GetScoreInsights200ResponseScores.md b/docs/GetScoreInsights200ResponseScores.md new file mode 100644 index 0000000..d48aa48 --- /dev/null +++ b/docs/GetScoreInsights200ResponseScores.md @@ -0,0 +1,160 @@ +# GetScoreInsights200ResponseScores + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Minimal** | Pointer to **int32** | | [optional] +**Low** | Pointer to **int32** | | [optional] +**Medium** | Pointer to **int32** | | [optional] +**High** | Pointer to **int32** | | [optional] +**VeryHigh** | Pointer to **int32** | | [optional] + +## Methods + +### NewGetScoreInsights200ResponseScores + +`func NewGetScoreInsights200ResponseScores() *GetScoreInsights200ResponseScores` + +NewGetScoreInsights200ResponseScores instantiates a new GetScoreInsights200ResponseScores 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 + +### NewGetScoreInsights200ResponseScoresWithDefaults + +`func NewGetScoreInsights200ResponseScoresWithDefaults() *GetScoreInsights200ResponseScores` + +NewGetScoreInsights200ResponseScoresWithDefaults instantiates a new GetScoreInsights200ResponseScores 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 + +### GetMinimal + +`func (o *GetScoreInsights200ResponseScores) GetMinimal() int32` + +GetMinimal returns the Minimal field if non-nil, zero value otherwise. + +### GetMinimalOk + +`func (o *GetScoreInsights200ResponseScores) GetMinimalOk() (*int32, bool)` + +GetMinimalOk returns a tuple with the Minimal field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMinimal + +`func (o *GetScoreInsights200ResponseScores) SetMinimal(v int32)` + +SetMinimal sets Minimal field to given value. + +### HasMinimal + +`func (o *GetScoreInsights200ResponseScores) HasMinimal() bool` + +HasMinimal returns a boolean if a field has been set. + +### GetLow + +`func (o *GetScoreInsights200ResponseScores) GetLow() int32` + +GetLow returns the Low field if non-nil, zero value otherwise. + +### GetLowOk + +`func (o *GetScoreInsights200ResponseScores) GetLowOk() (*int32, bool)` + +GetLowOk returns a tuple with the Low field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLow + +`func (o *GetScoreInsights200ResponseScores) SetLow(v int32)` + +SetLow sets Low field to given value. + +### HasLow + +`func (o *GetScoreInsights200ResponseScores) HasLow() bool` + +HasLow returns a boolean if a field has been set. + +### GetMedium + +`func (o *GetScoreInsights200ResponseScores) GetMedium() int32` + +GetMedium returns the Medium field if non-nil, zero value otherwise. + +### GetMediumOk + +`func (o *GetScoreInsights200ResponseScores) GetMediumOk() (*int32, bool)` + +GetMediumOk returns a tuple with the Medium field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMedium + +`func (o *GetScoreInsights200ResponseScores) SetMedium(v int32)` + +SetMedium sets Medium field to given value. + +### HasMedium + +`func (o *GetScoreInsights200ResponseScores) HasMedium() bool` + +HasMedium returns a boolean if a field has been set. + +### GetHigh + +`func (o *GetScoreInsights200ResponseScores) GetHigh() int32` + +GetHigh returns the High field if non-nil, zero value otherwise. + +### GetHighOk + +`func (o *GetScoreInsights200ResponseScores) GetHighOk() (*int32, bool)` + +GetHighOk returns a tuple with the High field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHigh + +`func (o *GetScoreInsights200ResponseScores) SetHigh(v int32)` + +SetHigh sets High field to given value. + +### HasHigh + +`func (o *GetScoreInsights200ResponseScores) HasHigh() bool` + +HasHigh returns a boolean if a field has been set. + +### GetVeryHigh + +`func (o *GetScoreInsights200ResponseScores) GetVeryHigh() int32` + +GetVeryHigh returns the VeryHigh field if non-nil, zero value otherwise. + +### GetVeryHighOk + +`func (o *GetScoreInsights200ResponseScores) GetVeryHighOk() (*int32, bool)` + +GetVeryHighOk returns a tuple with the VeryHigh field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVeryHigh + +`func (o *GetScoreInsights200ResponseScores) SetVeryHigh(v int32)` + +SetVeryHigh sets VeryHigh field to given value. + +### HasVeryHigh + +`func (o *GetScoreInsights200ResponseScores) HasVeryHigh() bool` + +HasVeryHigh 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/GetUserApps200ResponseInner.md b/docs/GetUserApps200ResponseInner.md new file mode 100644 index 0000000..6290706 --- /dev/null +++ b/docs/GetUserApps200ResponseInner.md @@ -0,0 +1,238 @@ +# GetUserApps200ResponseInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **int32** | The App ID | [optional] +**IconUrl** | Pointer to **string** | A url for the icon that represents the app in the OneLogin portal | [optional] +**Extension** | Pointer to **bool** | Boolean that indicates if the OneLogin browser extension is required to launch this app. | [optional] +**LoginId** | Pointer to **int32** | Unqiue identifier for this user and app combination. | [optional] +**Name** | Pointer to **string** | The name of the app. | [optional] +**ProvisioningStatus** | Pointer to **string** | | [optional] +**ProvisioningState** | Pointer to **string** | If provisioning is enabled this indicates the state of provisioning for the given user. | [optional] +**ProvisioningEnabled** | Pointer to **bool** | Indicates if provisioning is enabled for this app. | [optional] + +## Methods + +### NewGetUserApps200ResponseInner + +`func NewGetUserApps200ResponseInner() *GetUserApps200ResponseInner` + +NewGetUserApps200ResponseInner instantiates a new GetUserApps200ResponseInner 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 + +### NewGetUserApps200ResponseInnerWithDefaults + +`func NewGetUserApps200ResponseInnerWithDefaults() *GetUserApps200ResponseInner` + +NewGetUserApps200ResponseInnerWithDefaults instantiates a new GetUserApps200ResponseInner 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 + +### GetId + +`func (o *GetUserApps200ResponseInner) GetId() int32` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *GetUserApps200ResponseInner) GetIdOk() (*int32, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *GetUserApps200ResponseInner) SetId(v int32)` + +SetId sets Id field to given value. + +### HasId + +`func (o *GetUserApps200ResponseInner) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetIconUrl + +`func (o *GetUserApps200ResponseInner) GetIconUrl() string` + +GetIconUrl returns the IconUrl field if non-nil, zero value otherwise. + +### GetIconUrlOk + +`func (o *GetUserApps200ResponseInner) GetIconUrlOk() (*string, bool)` + +GetIconUrlOk returns a tuple with the IconUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIconUrl + +`func (o *GetUserApps200ResponseInner) SetIconUrl(v string)` + +SetIconUrl sets IconUrl field to given value. + +### HasIconUrl + +`func (o *GetUserApps200ResponseInner) HasIconUrl() bool` + +HasIconUrl returns a boolean if a field has been set. + +### GetExtension + +`func (o *GetUserApps200ResponseInner) GetExtension() bool` + +GetExtension returns the Extension field if non-nil, zero value otherwise. + +### GetExtensionOk + +`func (o *GetUserApps200ResponseInner) GetExtensionOk() (*bool, bool)` + +GetExtensionOk returns a tuple with the Extension field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExtension + +`func (o *GetUserApps200ResponseInner) SetExtension(v bool)` + +SetExtension sets Extension field to given value. + +### HasExtension + +`func (o *GetUserApps200ResponseInner) HasExtension() bool` + +HasExtension returns a boolean if a field has been set. + +### GetLoginId + +`func (o *GetUserApps200ResponseInner) GetLoginId() int32` + +GetLoginId returns the LoginId field if non-nil, zero value otherwise. + +### GetLoginIdOk + +`func (o *GetUserApps200ResponseInner) GetLoginIdOk() (*int32, bool)` + +GetLoginIdOk returns a tuple with the LoginId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLoginId + +`func (o *GetUserApps200ResponseInner) SetLoginId(v int32)` + +SetLoginId sets LoginId field to given value. + +### HasLoginId + +`func (o *GetUserApps200ResponseInner) HasLoginId() bool` + +HasLoginId returns a boolean if a field has been set. + +### GetName + +`func (o *GetUserApps200ResponseInner) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *GetUserApps200ResponseInner) 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 *GetUserApps200ResponseInner) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *GetUserApps200ResponseInner) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetProvisioningStatus + +`func (o *GetUserApps200ResponseInner) GetProvisioningStatus() string` + +GetProvisioningStatus returns the ProvisioningStatus field if non-nil, zero value otherwise. + +### GetProvisioningStatusOk + +`func (o *GetUserApps200ResponseInner) GetProvisioningStatusOk() (*string, bool)` + +GetProvisioningStatusOk returns a tuple with the ProvisioningStatus field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProvisioningStatus + +`func (o *GetUserApps200ResponseInner) SetProvisioningStatus(v string)` + +SetProvisioningStatus sets ProvisioningStatus field to given value. + +### HasProvisioningStatus + +`func (o *GetUserApps200ResponseInner) HasProvisioningStatus() bool` + +HasProvisioningStatus returns a boolean if a field has been set. + +### GetProvisioningState + +`func (o *GetUserApps200ResponseInner) GetProvisioningState() string` + +GetProvisioningState returns the ProvisioningState field if non-nil, zero value otherwise. + +### GetProvisioningStateOk + +`func (o *GetUserApps200ResponseInner) GetProvisioningStateOk() (*string, bool)` + +GetProvisioningStateOk returns a tuple with the ProvisioningState field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProvisioningState + +`func (o *GetUserApps200ResponseInner) SetProvisioningState(v string)` + +SetProvisioningState sets ProvisioningState field to given value. + +### HasProvisioningState + +`func (o *GetUserApps200ResponseInner) HasProvisioningState() bool` + +HasProvisioningState returns a boolean if a field has been set. + +### GetProvisioningEnabled + +`func (o *GetUserApps200ResponseInner) GetProvisioningEnabled() bool` + +GetProvisioningEnabled returns the ProvisioningEnabled field if non-nil, zero value otherwise. + +### GetProvisioningEnabledOk + +`func (o *GetUserApps200ResponseInner) GetProvisioningEnabledOk() (*bool, bool)` + +GetProvisioningEnabledOk returns a tuple with the ProvisioningEnabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProvisioningEnabled + +`func (o *GetUserApps200ResponseInner) SetProvisioningEnabled(v bool)` + +SetProvisioningEnabled sets ProvisioningEnabled field to given value. + +### HasProvisioningEnabled + +`func (o *GetUserApps200ResponseInner) HasProvisioningEnabled() bool` + +HasProvisioningEnabled 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/Hook.md b/docs/Hook.md new file mode 100644 index 0000000..b42260e --- /dev/null +++ b/docs/Hook.md @@ -0,0 +1,380 @@ +# Hook + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **string** | The Hook unique ID in OneLogin. | [optional] +**Type** | **string** | A string describing the type of hook. e.g. `pre-authentication` | +**Disabled** | **bool** | Boolean to enable or disable the hook. Disabled hooks will not run. | [default to true] +**Timeout** | **int32** | The number of seconds to allow the hook function to run before before timing out. Maximum timeout varies based on the type of hook. | [default to 1] +**EnvVars** | **[]string** | Environment Variable objects that will be available via process.env.ENV_VAR_NAME in the hook code. | +**Runtime** | **string** | The Smart Hooks supported Node.js version to execute this hook with. | +**Retries** | **int32** | Number of retries if execution fails. | [default to 0] +**Packages** | **map[string]interface{}** | An object containing NPM packages that are bundled with the hook function. | +**Function** | **string** | A base64 encoded string containing the javascript function code. | +**ContextVersion** | Pointer to **string** | The semantic version of the content that will be injected into this hook. | [optional] +**Status** | Pointer to **string** | String describing the state of the hook function. When a hook is ready and disabled is false it will be executed. | [optional] +**Options** | Pointer to [**HookOptions**](HookOptions.md) | | [optional] +**Conditions** | Pointer to [**[]HookConditionsInner**](HookConditionsInner.md) | An array of objects that let you limit the execution of a hook to users in specific roles. | [optional] +**CreatedAt** | Pointer to **string** | ISO8601 format date that they hook function was created. | [optional] +**UpdatedAt** | Pointer to **string** | ISO8601 format date that they hook function was last updated. | [optional] + +## Methods + +### NewHook + +`func NewHook(type_ string, disabled bool, timeout int32, envVars []string, runtime string, retries int32, packages map[string]interface{}, function string, ) *Hook` + +NewHook instantiates a new Hook 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 + +### NewHookWithDefaults + +`func NewHookWithDefaults() *Hook` + +NewHookWithDefaults instantiates a new Hook 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 + +### GetId + +`func (o *Hook) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Hook) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Hook) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *Hook) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetType + +`func (o *Hook) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *Hook) GetTypeOk() (*string, 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 *Hook) SetType(v string)` + +SetType sets Type field to given value. + + +### GetDisabled + +`func (o *Hook) GetDisabled() bool` + +GetDisabled returns the Disabled field if non-nil, zero value otherwise. + +### GetDisabledOk + +`func (o *Hook) GetDisabledOk() (*bool, bool)` + +GetDisabledOk returns a tuple with the Disabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDisabled + +`func (o *Hook) SetDisabled(v bool)` + +SetDisabled sets Disabled field to given value. + + +### GetTimeout + +`func (o *Hook) GetTimeout() int32` + +GetTimeout returns the Timeout field if non-nil, zero value otherwise. + +### GetTimeoutOk + +`func (o *Hook) GetTimeoutOk() (*int32, bool)` + +GetTimeoutOk returns a tuple with the Timeout field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTimeout + +`func (o *Hook) SetTimeout(v int32)` + +SetTimeout sets Timeout field to given value. + + +### GetEnvVars + +`func (o *Hook) GetEnvVars() []string` + +GetEnvVars returns the EnvVars field if non-nil, zero value otherwise. + +### GetEnvVarsOk + +`func (o *Hook) GetEnvVarsOk() (*[]string, bool)` + +GetEnvVarsOk returns a tuple with the EnvVars field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnvVars + +`func (o *Hook) SetEnvVars(v []string)` + +SetEnvVars sets EnvVars field to given value. + + +### GetRuntime + +`func (o *Hook) GetRuntime() string` + +GetRuntime returns the Runtime field if non-nil, zero value otherwise. + +### GetRuntimeOk + +`func (o *Hook) GetRuntimeOk() (*string, bool)` + +GetRuntimeOk returns a tuple with the Runtime field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRuntime + +`func (o *Hook) SetRuntime(v string)` + +SetRuntime sets Runtime field to given value. + + +### GetRetries + +`func (o *Hook) GetRetries() int32` + +GetRetries returns the Retries field if non-nil, zero value otherwise. + +### GetRetriesOk + +`func (o *Hook) GetRetriesOk() (*int32, bool)` + +GetRetriesOk returns a tuple with the Retries field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRetries + +`func (o *Hook) SetRetries(v int32)` + +SetRetries sets Retries field to given value. + + +### GetPackages + +`func (o *Hook) GetPackages() map[string]interface{}` + +GetPackages returns the Packages field if non-nil, zero value otherwise. + +### GetPackagesOk + +`func (o *Hook) GetPackagesOk() (*map[string]interface{}, bool)` + +GetPackagesOk returns a tuple with the Packages field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPackages + +`func (o *Hook) SetPackages(v map[string]interface{})` + +SetPackages sets Packages field to given value. + + +### GetFunction + +`func (o *Hook) GetFunction() string` + +GetFunction returns the Function field if non-nil, zero value otherwise. + +### GetFunctionOk + +`func (o *Hook) GetFunctionOk() (*string, bool)` + +GetFunctionOk returns a tuple with the Function field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFunction + +`func (o *Hook) SetFunction(v string)` + +SetFunction sets Function field to given value. + + +### GetContextVersion + +`func (o *Hook) GetContextVersion() string` + +GetContextVersion returns the ContextVersion field if non-nil, zero value otherwise. + +### GetContextVersionOk + +`func (o *Hook) GetContextVersionOk() (*string, bool)` + +GetContextVersionOk returns a tuple with the ContextVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContextVersion + +`func (o *Hook) SetContextVersion(v string)` + +SetContextVersion sets ContextVersion field to given value. + +### HasContextVersion + +`func (o *Hook) HasContextVersion() bool` + +HasContextVersion returns a boolean if a field has been set. + +### GetStatus + +`func (o *Hook) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *Hook) GetStatusOk() (*string, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *Hook) SetStatus(v string)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *Hook) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### GetOptions + +`func (o *Hook) GetOptions() HookOptions` + +GetOptions returns the Options field if non-nil, zero value otherwise. + +### GetOptionsOk + +`func (o *Hook) GetOptionsOk() (*HookOptions, bool)` + +GetOptionsOk returns a tuple with the Options field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOptions + +`func (o *Hook) SetOptions(v HookOptions)` + +SetOptions sets Options field to given value. + +### HasOptions + +`func (o *Hook) HasOptions() bool` + +HasOptions returns a boolean if a field has been set. + +### GetConditions + +`func (o *Hook) GetConditions() []HookConditionsInner` + +GetConditions returns the Conditions field if non-nil, zero value otherwise. + +### GetConditionsOk + +`func (o *Hook) GetConditionsOk() (*[]HookConditionsInner, bool)` + +GetConditionsOk returns a tuple with the Conditions field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConditions + +`func (o *Hook) SetConditions(v []HookConditionsInner)` + +SetConditions sets Conditions field to given value. + +### HasConditions + +`func (o *Hook) HasConditions() bool` + +HasConditions returns a boolean if a field has been set. + +### GetCreatedAt + +`func (o *Hook) GetCreatedAt() string` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *Hook) GetCreatedAtOk() (*string, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *Hook) SetCreatedAt(v string)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *Hook) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### GetUpdatedAt + +`func (o *Hook) GetUpdatedAt() string` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *Hook) GetUpdatedAtOk() (*string, bool)` + +GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedAt + +`func (o *Hook) SetUpdatedAt(v string)` + +SetUpdatedAt sets UpdatedAt field to given value. + +### HasUpdatedAt + +`func (o *Hook) HasUpdatedAt() bool` + +HasUpdatedAt 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/HookConditionsInner.md b/docs/HookConditionsInner.md new file mode 100644 index 0000000..822754d --- /dev/null +++ b/docs/HookConditionsInner.md @@ -0,0 +1,108 @@ +# HookConditionsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Source** | Pointer to **string** | | [optional] +**Operator** | Pointer to **string** | | [optional] +**Value** | Pointer to **string** | | [optional] + +## Methods + +### NewHookConditionsInner + +`func NewHookConditionsInner() *HookConditionsInner` + +NewHookConditionsInner instantiates a new HookConditionsInner 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 + +### NewHookConditionsInnerWithDefaults + +`func NewHookConditionsInnerWithDefaults() *HookConditionsInner` + +NewHookConditionsInnerWithDefaults instantiates a new HookConditionsInner 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 + +### GetSource + +`func (o *HookConditionsInner) GetSource() string` + +GetSource returns the Source field if non-nil, zero value otherwise. + +### GetSourceOk + +`func (o *HookConditionsInner) GetSourceOk() (*string, 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 *HookConditionsInner) SetSource(v string)` + +SetSource sets Source field to given value. + +### HasSource + +`func (o *HookConditionsInner) HasSource() bool` + +HasSource returns a boolean if a field has been set. + +### GetOperator + +`func (o *HookConditionsInner) GetOperator() string` + +GetOperator returns the Operator field if non-nil, zero value otherwise. + +### GetOperatorOk + +`func (o *HookConditionsInner) GetOperatorOk() (*string, bool)` + +GetOperatorOk returns a tuple with the Operator field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOperator + +`func (o *HookConditionsInner) SetOperator(v string)` + +SetOperator sets Operator field to given value. + +### HasOperator + +`func (o *HookConditionsInner) HasOperator() bool` + +HasOperator returns a boolean if a field has been set. + +### GetValue + +`func (o *HookConditionsInner) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *HookConditionsInner) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *HookConditionsInner) SetValue(v string)` + +SetValue sets Value field to given value. + +### HasValue + +`func (o *HookConditionsInner) HasValue() bool` + +HasValue 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/HookOptions.md b/docs/HookOptions.md new file mode 100644 index 0000000..51a5f15 --- /dev/null +++ b/docs/HookOptions.md @@ -0,0 +1,108 @@ +# HookOptions + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**RiskEnabled** | Pointer to **bool** | | [optional] +**LocationEnabled** | Pointer to **bool** | | [optional] +**MfaDeviceInfoEnabled** | Pointer to **bool** | | [optional] + +## Methods + +### NewHookOptions + +`func NewHookOptions() *HookOptions` + +NewHookOptions instantiates a new HookOptions 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 + +### NewHookOptionsWithDefaults + +`func NewHookOptionsWithDefaults() *HookOptions` + +NewHookOptionsWithDefaults instantiates a new HookOptions 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 + +### GetRiskEnabled + +`func (o *HookOptions) GetRiskEnabled() bool` + +GetRiskEnabled returns the RiskEnabled field if non-nil, zero value otherwise. + +### GetRiskEnabledOk + +`func (o *HookOptions) GetRiskEnabledOk() (*bool, bool)` + +GetRiskEnabledOk returns a tuple with the RiskEnabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRiskEnabled + +`func (o *HookOptions) SetRiskEnabled(v bool)` + +SetRiskEnabled sets RiskEnabled field to given value. + +### HasRiskEnabled + +`func (o *HookOptions) HasRiskEnabled() bool` + +HasRiskEnabled returns a boolean if a field has been set. + +### GetLocationEnabled + +`func (o *HookOptions) GetLocationEnabled() bool` + +GetLocationEnabled returns the LocationEnabled field if non-nil, zero value otherwise. + +### GetLocationEnabledOk + +`func (o *HookOptions) GetLocationEnabledOk() (*bool, bool)` + +GetLocationEnabledOk returns a tuple with the LocationEnabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLocationEnabled + +`func (o *HookOptions) SetLocationEnabled(v bool)` + +SetLocationEnabled sets LocationEnabled field to given value. + +### HasLocationEnabled + +`func (o *HookOptions) HasLocationEnabled() bool` + +HasLocationEnabled returns a boolean if a field has been set. + +### GetMfaDeviceInfoEnabled + +`func (o *HookOptions) GetMfaDeviceInfoEnabled() bool` + +GetMfaDeviceInfoEnabled returns the MfaDeviceInfoEnabled field if non-nil, zero value otherwise. + +### GetMfaDeviceInfoEnabledOk + +`func (o *HookOptions) GetMfaDeviceInfoEnabledOk() (*bool, bool)` + +GetMfaDeviceInfoEnabledOk returns a tuple with the MfaDeviceInfoEnabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMfaDeviceInfoEnabled + +`func (o *HookOptions) SetMfaDeviceInfoEnabled(v bool)` + +SetMfaDeviceInfoEnabled sets MfaDeviceInfoEnabled field to given value. + +### HasMfaDeviceInfoEnabled + +`func (o *HookOptions) HasMfaDeviceInfoEnabled() bool` + +HasMfaDeviceInfoEnabled 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/HookStatus.md b/docs/HookStatus.md new file mode 100644 index 0000000..328c3db --- /dev/null +++ b/docs/HookStatus.md @@ -0,0 +1,82 @@ +# HookStatus + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | | [optional] +**Message** | Pointer to **string** | | [optional] + +## Methods + +### NewHookStatus + +`func NewHookStatus() *HookStatus` + +NewHookStatus instantiates a new HookStatus 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 + +### NewHookStatusWithDefaults + +`func NewHookStatusWithDefaults() *HookStatus` + +NewHookStatusWithDefaults instantiates a new HookStatus 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 *HookStatus) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *HookStatus) 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 *HookStatus) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *HookStatus) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetMessage + +`func (o *HookStatus) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *HookStatus) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *HookStatus) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *HookStatus) HasMessage() bool` + +HasMessage 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/Id.md b/docs/Id.md new file mode 100644 index 0000000..e14411d --- /dev/null +++ b/docs/Id.md @@ -0,0 +1,56 @@ +# Id + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **string** | | [optional] + +## Methods + +### NewId + +`func NewId() *Id` + +NewId instantiates a new Id 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 + +### NewIdWithDefaults + +`func NewIdWithDefaults() *Id` + +NewIdWithDefaults instantiates a new Id 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 + +### GetId + +`func (o *Id) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Id) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Id) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *Id) HasId() bool` + +HasId 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/ListAccessTokenClaims200ResponseInner.md b/docs/ListAccessTokenClaims200ResponseInner.md new file mode 100644 index 0000000..5d361c6 --- /dev/null +++ b/docs/ListAccessTokenClaims200ResponseInner.md @@ -0,0 +1,264 @@ +# ListAccessTokenClaims200ResponseInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **int32** | | [optional] +**Label** | Pointer to **string** | | [optional] +**UserAttributeMappings** | Pointer to **string** | | [optional] +**UserAttributeMacros** | Pointer to **string** | | [optional] +**AttributesTransformations** | Pointer to **string** | | [optional] +**SkipIfBlank** | Pointer to **bool** | | [optional] +**Values** | Pointer to **[]string** | | [optional] +**DefaultValues** | Pointer to **string** | | [optional] +**ProvisionedEntitlements** | Pointer to **bool** | | [optional] + +## Methods + +### NewListAccessTokenClaims200ResponseInner + +`func NewListAccessTokenClaims200ResponseInner() *ListAccessTokenClaims200ResponseInner` + +NewListAccessTokenClaims200ResponseInner instantiates a new ListAccessTokenClaims200ResponseInner 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 + +### NewListAccessTokenClaims200ResponseInnerWithDefaults + +`func NewListAccessTokenClaims200ResponseInnerWithDefaults() *ListAccessTokenClaims200ResponseInner` + +NewListAccessTokenClaims200ResponseInnerWithDefaults instantiates a new ListAccessTokenClaims200ResponseInner 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 + +### GetId + +`func (o *ListAccessTokenClaims200ResponseInner) GetId() int32` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ListAccessTokenClaims200ResponseInner) GetIdOk() (*int32, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ListAccessTokenClaims200ResponseInner) SetId(v int32)` + +SetId sets Id field to given value. + +### HasId + +`func (o *ListAccessTokenClaims200ResponseInner) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetLabel + +`func (o *ListAccessTokenClaims200ResponseInner) GetLabel() string` + +GetLabel returns the Label field if non-nil, zero value otherwise. + +### GetLabelOk + +`func (o *ListAccessTokenClaims200ResponseInner) GetLabelOk() (*string, bool)` + +GetLabelOk returns a tuple with the Label field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLabel + +`func (o *ListAccessTokenClaims200ResponseInner) SetLabel(v string)` + +SetLabel sets Label field to given value. + +### HasLabel + +`func (o *ListAccessTokenClaims200ResponseInner) HasLabel() bool` + +HasLabel returns a boolean if a field has been set. + +### GetUserAttributeMappings + +`func (o *ListAccessTokenClaims200ResponseInner) GetUserAttributeMappings() string` + +GetUserAttributeMappings returns the UserAttributeMappings field if non-nil, zero value otherwise. + +### GetUserAttributeMappingsOk + +`func (o *ListAccessTokenClaims200ResponseInner) GetUserAttributeMappingsOk() (*string, bool)` + +GetUserAttributeMappingsOk returns a tuple with the UserAttributeMappings field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUserAttributeMappings + +`func (o *ListAccessTokenClaims200ResponseInner) SetUserAttributeMappings(v string)` + +SetUserAttributeMappings sets UserAttributeMappings field to given value. + +### HasUserAttributeMappings + +`func (o *ListAccessTokenClaims200ResponseInner) HasUserAttributeMappings() bool` + +HasUserAttributeMappings returns a boolean if a field has been set. + +### GetUserAttributeMacros + +`func (o *ListAccessTokenClaims200ResponseInner) GetUserAttributeMacros() string` + +GetUserAttributeMacros returns the UserAttributeMacros field if non-nil, zero value otherwise. + +### GetUserAttributeMacrosOk + +`func (o *ListAccessTokenClaims200ResponseInner) GetUserAttributeMacrosOk() (*string, bool)` + +GetUserAttributeMacrosOk returns a tuple with the UserAttributeMacros field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUserAttributeMacros + +`func (o *ListAccessTokenClaims200ResponseInner) SetUserAttributeMacros(v string)` + +SetUserAttributeMacros sets UserAttributeMacros field to given value. + +### HasUserAttributeMacros + +`func (o *ListAccessTokenClaims200ResponseInner) HasUserAttributeMacros() bool` + +HasUserAttributeMacros returns a boolean if a field has been set. + +### GetAttributesTransformations + +`func (o *ListAccessTokenClaims200ResponseInner) GetAttributesTransformations() string` + +GetAttributesTransformations returns the AttributesTransformations field if non-nil, zero value otherwise. + +### GetAttributesTransformationsOk + +`func (o *ListAccessTokenClaims200ResponseInner) GetAttributesTransformationsOk() (*string, bool)` + +GetAttributesTransformationsOk returns a tuple with the AttributesTransformations field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAttributesTransformations + +`func (o *ListAccessTokenClaims200ResponseInner) SetAttributesTransformations(v string)` + +SetAttributesTransformations sets AttributesTransformations field to given value. + +### HasAttributesTransformations + +`func (o *ListAccessTokenClaims200ResponseInner) HasAttributesTransformations() bool` + +HasAttributesTransformations returns a boolean if a field has been set. + +### GetSkipIfBlank + +`func (o *ListAccessTokenClaims200ResponseInner) GetSkipIfBlank() bool` + +GetSkipIfBlank returns the SkipIfBlank field if non-nil, zero value otherwise. + +### GetSkipIfBlankOk + +`func (o *ListAccessTokenClaims200ResponseInner) GetSkipIfBlankOk() (*bool, bool)` + +GetSkipIfBlankOk returns a tuple with the SkipIfBlank field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSkipIfBlank + +`func (o *ListAccessTokenClaims200ResponseInner) SetSkipIfBlank(v bool)` + +SetSkipIfBlank sets SkipIfBlank field to given value. + +### HasSkipIfBlank + +`func (o *ListAccessTokenClaims200ResponseInner) HasSkipIfBlank() bool` + +HasSkipIfBlank returns a boolean if a field has been set. + +### GetValues + +`func (o *ListAccessTokenClaims200ResponseInner) GetValues() []string` + +GetValues returns the Values field if non-nil, zero value otherwise. + +### GetValuesOk + +`func (o *ListAccessTokenClaims200ResponseInner) GetValuesOk() (*[]string, bool)` + +GetValuesOk returns a tuple with the Values field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValues + +`func (o *ListAccessTokenClaims200ResponseInner) SetValues(v []string)` + +SetValues sets Values field to given value. + +### HasValues + +`func (o *ListAccessTokenClaims200ResponseInner) HasValues() bool` + +HasValues returns a boolean if a field has been set. + +### GetDefaultValues + +`func (o *ListAccessTokenClaims200ResponseInner) GetDefaultValues() string` + +GetDefaultValues returns the DefaultValues field if non-nil, zero value otherwise. + +### GetDefaultValuesOk + +`func (o *ListAccessTokenClaims200ResponseInner) GetDefaultValuesOk() (*string, bool)` + +GetDefaultValuesOk returns a tuple with the DefaultValues field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDefaultValues + +`func (o *ListAccessTokenClaims200ResponseInner) SetDefaultValues(v string)` + +SetDefaultValues sets DefaultValues field to given value. + +### HasDefaultValues + +`func (o *ListAccessTokenClaims200ResponseInner) HasDefaultValues() bool` + +HasDefaultValues returns a boolean if a field has been set. + +### GetProvisionedEntitlements + +`func (o *ListAccessTokenClaims200ResponseInner) GetProvisionedEntitlements() bool` + +GetProvisionedEntitlements returns the ProvisionedEntitlements field if non-nil, zero value otherwise. + +### GetProvisionedEntitlementsOk + +`func (o *ListAccessTokenClaims200ResponseInner) GetProvisionedEntitlementsOk() (*bool, bool)` + +GetProvisionedEntitlementsOk returns a tuple with the ProvisionedEntitlements field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProvisionedEntitlements + +`func (o *ListAccessTokenClaims200ResponseInner) SetProvisionedEntitlements(v bool)` + +SetProvisionedEntitlements sets ProvisionedEntitlements field to given value. + +### HasProvisionedEntitlements + +`func (o *ListAccessTokenClaims200ResponseInner) HasProvisionedEntitlements() bool` + +HasProvisionedEntitlements 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/ListActions200ResponseInner.md b/docs/ListActions200ResponseInner.md new file mode 100644 index 0000000..d977d81 --- /dev/null +++ b/docs/ListActions200ResponseInner.md @@ -0,0 +1,82 @@ +# ListActions200ResponseInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | The name of the Action. | [optional] +**Value** | Pointer to **string** | The unique identifier of the action. This should be used when defining actions for a User Mapping. | [optional] + +## Methods + +### NewListActions200ResponseInner + +`func NewListActions200ResponseInner() *ListActions200ResponseInner` + +NewListActions200ResponseInner instantiates a new ListActions200ResponseInner 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 + +### NewListActions200ResponseInnerWithDefaults + +`func NewListActions200ResponseInnerWithDefaults() *ListActions200ResponseInner` + +NewListActions200ResponseInnerWithDefaults instantiates a new ListActions200ResponseInner 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 *ListActions200ResponseInner) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ListActions200ResponseInner) 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 *ListActions200ResponseInner) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *ListActions200ResponseInner) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetValue + +`func (o *ListActions200ResponseInner) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *ListActions200ResponseInner) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *ListActions200ResponseInner) SetValue(v string)` + +SetValue sets Value field to given value. + +### HasValue + +`func (o *ListActions200ResponseInner) HasValue() bool` + +HasValue 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/ListAppUsers200ResponseInner.md b/docs/ListAppUsers200ResponseInner.md new file mode 100644 index 0000000..56ca886 --- /dev/null +++ b/docs/ListAppUsers200ResponseInner.md @@ -0,0 +1,160 @@ +# ListAppUsers200ResponseInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Firstname** | Pointer to **string** | | [optional] +**Id** | Pointer to **int32** | | [optional] +**Email** | Pointer to **string** | | [optional] +**Lastname** | Pointer to **string** | | [optional] +**Username** | Pointer to **string** | | [optional] + +## Methods + +### NewListAppUsers200ResponseInner + +`func NewListAppUsers200ResponseInner() *ListAppUsers200ResponseInner` + +NewListAppUsers200ResponseInner instantiates a new ListAppUsers200ResponseInner 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 + +### NewListAppUsers200ResponseInnerWithDefaults + +`func NewListAppUsers200ResponseInnerWithDefaults() *ListAppUsers200ResponseInner` + +NewListAppUsers200ResponseInnerWithDefaults instantiates a new ListAppUsers200ResponseInner 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 + +### GetFirstname + +`func (o *ListAppUsers200ResponseInner) GetFirstname() string` + +GetFirstname returns the Firstname field if non-nil, zero value otherwise. + +### GetFirstnameOk + +`func (o *ListAppUsers200ResponseInner) GetFirstnameOk() (*string, bool)` + +GetFirstnameOk returns a tuple with the Firstname field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFirstname + +`func (o *ListAppUsers200ResponseInner) SetFirstname(v string)` + +SetFirstname sets Firstname field to given value. + +### HasFirstname + +`func (o *ListAppUsers200ResponseInner) HasFirstname() bool` + +HasFirstname returns a boolean if a field has been set. + +### GetId + +`func (o *ListAppUsers200ResponseInner) GetId() int32` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ListAppUsers200ResponseInner) GetIdOk() (*int32, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ListAppUsers200ResponseInner) SetId(v int32)` + +SetId sets Id field to given value. + +### HasId + +`func (o *ListAppUsers200ResponseInner) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetEmail + +`func (o *ListAppUsers200ResponseInner) GetEmail() string` + +GetEmail returns the Email field if non-nil, zero value otherwise. + +### GetEmailOk + +`func (o *ListAppUsers200ResponseInner) 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 *ListAppUsers200ResponseInner) SetEmail(v string)` + +SetEmail sets Email field to given value. + +### HasEmail + +`func (o *ListAppUsers200ResponseInner) HasEmail() bool` + +HasEmail returns a boolean if a field has been set. + +### GetLastname + +`func (o *ListAppUsers200ResponseInner) GetLastname() string` + +GetLastname returns the Lastname field if non-nil, zero value otherwise. + +### GetLastnameOk + +`func (o *ListAppUsers200ResponseInner) GetLastnameOk() (*string, bool)` + +GetLastnameOk returns a tuple with the Lastname field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastname + +`func (o *ListAppUsers200ResponseInner) SetLastname(v string)` + +SetLastname sets Lastname field to given value. + +### HasLastname + +`func (o *ListAppUsers200ResponseInner) HasLastname() bool` + +HasLastname returns a boolean if a field has been set. + +### GetUsername + +`func (o *ListAppUsers200ResponseInner) GetUsername() string` + +GetUsername returns the Username field if non-nil, zero value otherwise. + +### GetUsernameOk + +`func (o *ListAppUsers200ResponseInner) 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 *ListAppUsers200ResponseInner) SetUsername(v string)` + +SetUsername sets Username field to given value. + +### HasUsername + +`func (o *ListAppUsers200ResponseInner) HasUsername() bool` + +HasUsername 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/ListAuthorizationServers200ResponseInner.md b/docs/ListAuthorizationServers200ResponseInner.md new file mode 100644 index 0000000..007072e --- /dev/null +++ b/docs/ListAuthorizationServers200ResponseInner.md @@ -0,0 +1,134 @@ +# ListAuthorizationServers200ResponseInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **int32** | | [optional] +**Name** | Pointer to **string** | | [optional] +**Configuration** | Pointer to [**ListAuthorizationServers200ResponseInnerConfiguration**](ListAuthorizationServers200ResponseInnerConfiguration.md) | | [optional] +**Description** | Pointer to **string** | | [optional] + +## Methods + +### NewListAuthorizationServers200ResponseInner + +`func NewListAuthorizationServers200ResponseInner() *ListAuthorizationServers200ResponseInner` + +NewListAuthorizationServers200ResponseInner instantiates a new ListAuthorizationServers200ResponseInner 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 + +### NewListAuthorizationServers200ResponseInnerWithDefaults + +`func NewListAuthorizationServers200ResponseInnerWithDefaults() *ListAuthorizationServers200ResponseInner` + +NewListAuthorizationServers200ResponseInnerWithDefaults instantiates a new ListAuthorizationServers200ResponseInner 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 + +### GetId + +`func (o *ListAuthorizationServers200ResponseInner) GetId() int32` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ListAuthorizationServers200ResponseInner) GetIdOk() (*int32, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ListAuthorizationServers200ResponseInner) SetId(v int32)` + +SetId sets Id field to given value. + +### HasId + +`func (o *ListAuthorizationServers200ResponseInner) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetName + +`func (o *ListAuthorizationServers200ResponseInner) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ListAuthorizationServers200ResponseInner) 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 *ListAuthorizationServers200ResponseInner) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *ListAuthorizationServers200ResponseInner) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetConfiguration + +`func (o *ListAuthorizationServers200ResponseInner) GetConfiguration() ListAuthorizationServers200ResponseInnerConfiguration` + +GetConfiguration returns the Configuration field if non-nil, zero value otherwise. + +### GetConfigurationOk + +`func (o *ListAuthorizationServers200ResponseInner) GetConfigurationOk() (*ListAuthorizationServers200ResponseInnerConfiguration, bool)` + +GetConfigurationOk returns a tuple with the Configuration field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConfiguration + +`func (o *ListAuthorizationServers200ResponseInner) SetConfiguration(v ListAuthorizationServers200ResponseInnerConfiguration)` + +SetConfiguration sets Configuration field to given value. + +### HasConfiguration + +`func (o *ListAuthorizationServers200ResponseInner) HasConfiguration() bool` + +HasConfiguration returns a boolean if a field has been set. + +### GetDescription + +`func (o *ListAuthorizationServers200ResponseInner) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *ListAuthorizationServers200ResponseInner) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *ListAuthorizationServers200ResponseInner) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *ListAuthorizationServers200ResponseInner) HasDescription() bool` + +HasDescription 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/ListAuthorizationServers200ResponseInnerConfiguration.md b/docs/ListAuthorizationServers200ResponseInnerConfiguration.md new file mode 100644 index 0000000..22f10f6 --- /dev/null +++ b/docs/ListAuthorizationServers200ResponseInnerConfiguration.md @@ -0,0 +1,82 @@ +# ListAuthorizationServers200ResponseInnerConfiguration + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ResourceIdentifier** | Pointer to **string** | | [optional] +**Audiences** | Pointer to **[]string** | | [optional] + +## Methods + +### NewListAuthorizationServers200ResponseInnerConfiguration + +`func NewListAuthorizationServers200ResponseInnerConfiguration() *ListAuthorizationServers200ResponseInnerConfiguration` + +NewListAuthorizationServers200ResponseInnerConfiguration instantiates a new ListAuthorizationServers200ResponseInnerConfiguration 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 + +### NewListAuthorizationServers200ResponseInnerConfigurationWithDefaults + +`func NewListAuthorizationServers200ResponseInnerConfigurationWithDefaults() *ListAuthorizationServers200ResponseInnerConfiguration` + +NewListAuthorizationServers200ResponseInnerConfigurationWithDefaults instantiates a new ListAuthorizationServers200ResponseInnerConfiguration 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 + +### GetResourceIdentifier + +`func (o *ListAuthorizationServers200ResponseInnerConfiguration) GetResourceIdentifier() string` + +GetResourceIdentifier returns the ResourceIdentifier field if non-nil, zero value otherwise. + +### GetResourceIdentifierOk + +`func (o *ListAuthorizationServers200ResponseInnerConfiguration) GetResourceIdentifierOk() (*string, bool)` + +GetResourceIdentifierOk returns a tuple with the ResourceIdentifier field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResourceIdentifier + +`func (o *ListAuthorizationServers200ResponseInnerConfiguration) SetResourceIdentifier(v string)` + +SetResourceIdentifier sets ResourceIdentifier field to given value. + +### HasResourceIdentifier + +`func (o *ListAuthorizationServers200ResponseInnerConfiguration) HasResourceIdentifier() bool` + +HasResourceIdentifier returns a boolean if a field has been set. + +### GetAudiences + +`func (o *ListAuthorizationServers200ResponseInnerConfiguration) GetAudiences() []string` + +GetAudiences returns the Audiences field if non-nil, zero value otherwise. + +### GetAudiencesOk + +`func (o *ListAuthorizationServers200ResponseInnerConfiguration) GetAudiencesOk() (*[]string, bool)` + +GetAudiencesOk returns a tuple with the Audiences field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAudiences + +`func (o *ListAuthorizationServers200ResponseInnerConfiguration) SetAudiences(v []string)` + +SetAudiences sets Audiences field to given value. + +### HasAudiences + +`func (o *ListAuthorizationServers200ResponseInnerConfiguration) HasAudiences() bool` + +HasAudiences 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/ListConditionOperators200ResponseInner.md b/docs/ListConditionOperators200ResponseInner.md new file mode 100644 index 0000000..9902a52 --- /dev/null +++ b/docs/ListConditionOperators200ResponseInner.md @@ -0,0 +1,82 @@ +# ListConditionOperators200ResponseInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | The name or description of the operator. | [optional] +**Value** | Pointer to **string** | The condition operator value to use when creating or updating App Rules. | [optional] + +## Methods + +### NewListConditionOperators200ResponseInner + +`func NewListConditionOperators200ResponseInner() *ListConditionOperators200ResponseInner` + +NewListConditionOperators200ResponseInner instantiates a new ListConditionOperators200ResponseInner 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 + +### NewListConditionOperators200ResponseInnerWithDefaults + +`func NewListConditionOperators200ResponseInnerWithDefaults() *ListConditionOperators200ResponseInner` + +NewListConditionOperators200ResponseInnerWithDefaults instantiates a new ListConditionOperators200ResponseInner 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 *ListConditionOperators200ResponseInner) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ListConditionOperators200ResponseInner) 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 *ListConditionOperators200ResponseInner) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *ListConditionOperators200ResponseInner) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetValue + +`func (o *ListConditionOperators200ResponseInner) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *ListConditionOperators200ResponseInner) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *ListConditionOperators200ResponseInner) SetValue(v string)` + +SetValue sets Value field to given value. + +### HasValue + +`func (o *ListConditionOperators200ResponseInner) HasValue() bool` + +HasValue 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/ListConditionValues200ResponseInner.md b/docs/ListConditionValues200ResponseInner.md new file mode 100644 index 0000000..f9af85c --- /dev/null +++ b/docs/ListConditionValues200ResponseInner.md @@ -0,0 +1,82 @@ +# ListConditionValues200ResponseInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | | [optional] +**Value** | Pointer to **string** | | [optional] + +## Methods + +### NewListConditionValues200ResponseInner + +`func NewListConditionValues200ResponseInner() *ListConditionValues200ResponseInner` + +NewListConditionValues200ResponseInner instantiates a new ListConditionValues200ResponseInner 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 + +### NewListConditionValues200ResponseInnerWithDefaults + +`func NewListConditionValues200ResponseInnerWithDefaults() *ListConditionValues200ResponseInner` + +NewListConditionValues200ResponseInnerWithDefaults instantiates a new ListConditionValues200ResponseInner 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 *ListConditionValues200ResponseInner) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ListConditionValues200ResponseInner) 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 *ListConditionValues200ResponseInner) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *ListConditionValues200ResponseInner) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetValue + +`func (o *ListConditionValues200ResponseInner) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *ListConditionValues200ResponseInner) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *ListConditionValues200ResponseInner) SetValue(v string)` + +SetValue sets Value field to given value. + +### HasValue + +`func (o *ListConditionValues200ResponseInner) HasValue() bool` + +HasValue 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/ListConditions200ResponseInner.md b/docs/ListConditions200ResponseInner.md new file mode 100644 index 0000000..66b7a55 --- /dev/null +++ b/docs/ListConditions200ResponseInner.md @@ -0,0 +1,82 @@ +# ListConditions200ResponseInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | The name of the Condition. | [optional] +**Value** | Pointer to **string** | The unique identifier of the condition. This should be used when defining conditions for a rule. | [optional] + +## Methods + +### NewListConditions200ResponseInner + +`func NewListConditions200ResponseInner() *ListConditions200ResponseInner` + +NewListConditions200ResponseInner instantiates a new ListConditions200ResponseInner 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 + +### NewListConditions200ResponseInnerWithDefaults + +`func NewListConditions200ResponseInnerWithDefaults() *ListConditions200ResponseInner` + +NewListConditions200ResponseInnerWithDefaults instantiates a new ListConditions200ResponseInner 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 *ListConditions200ResponseInner) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ListConditions200ResponseInner) 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 *ListConditions200ResponseInner) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *ListConditions200ResponseInner) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetValue + +`func (o *ListConditions200ResponseInner) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *ListConditions200ResponseInner) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *ListConditions200ResponseInner) SetValue(v string)` + +SetValue sets Value field to given value. + +### HasValue + +`func (o *ListConditions200ResponseInner) HasValue() bool` + +HasValue 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/ListMappingConditionOperators200ResponseInner.md b/docs/ListMappingConditionOperators200ResponseInner.md new file mode 100644 index 0000000..f09b72e --- /dev/null +++ b/docs/ListMappingConditionOperators200ResponseInner.md @@ -0,0 +1,82 @@ +# ListMappingConditionOperators200ResponseInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | The name or description of the operator. | [optional] +**Value** | Pointer to **string** | The condition operator value to use when creating or updating User Mappings. | [optional] + +## Methods + +### NewListMappingConditionOperators200ResponseInner + +`func NewListMappingConditionOperators200ResponseInner() *ListMappingConditionOperators200ResponseInner` + +NewListMappingConditionOperators200ResponseInner instantiates a new ListMappingConditionOperators200ResponseInner 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 + +### NewListMappingConditionOperators200ResponseInnerWithDefaults + +`func NewListMappingConditionOperators200ResponseInnerWithDefaults() *ListMappingConditionOperators200ResponseInner` + +NewListMappingConditionOperators200ResponseInnerWithDefaults instantiates a new ListMappingConditionOperators200ResponseInner 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 *ListMappingConditionOperators200ResponseInner) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ListMappingConditionOperators200ResponseInner) 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 *ListMappingConditionOperators200ResponseInner) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *ListMappingConditionOperators200ResponseInner) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetValue + +`func (o *ListMappingConditionOperators200ResponseInner) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *ListMappingConditionOperators200ResponseInner) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *ListMappingConditionOperators200ResponseInner) SetValue(v string)` + +SetValue sets Value field to given value. + +### HasValue + +`func (o *ListMappingConditionOperators200ResponseInner) HasValue() bool` + +HasValue 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/ListMappingConditions200ResponseInner.md b/docs/ListMappingConditions200ResponseInner.md new file mode 100644 index 0000000..bb51c08 --- /dev/null +++ b/docs/ListMappingConditions200ResponseInner.md @@ -0,0 +1,82 @@ +# ListMappingConditions200ResponseInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | The name of the Condition. | [optional] +**Value** | Pointer to **string** | The unique identifier of the condition. This should be used when defining conditions for a User Mapping. | [optional] + +## Methods + +### NewListMappingConditions200ResponseInner + +`func NewListMappingConditions200ResponseInner() *ListMappingConditions200ResponseInner` + +NewListMappingConditions200ResponseInner instantiates a new ListMappingConditions200ResponseInner 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 + +### NewListMappingConditions200ResponseInnerWithDefaults + +`func NewListMappingConditions200ResponseInnerWithDefaults() *ListMappingConditions200ResponseInner` + +NewListMappingConditions200ResponseInnerWithDefaults instantiates a new ListMappingConditions200ResponseInner 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 *ListMappingConditions200ResponseInner) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ListMappingConditions200ResponseInner) 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 *ListMappingConditions200ResponseInner) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *ListMappingConditions200ResponseInner) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetValue + +`func (o *ListMappingConditions200ResponseInner) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *ListMappingConditions200ResponseInner) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *ListMappingConditions200ResponseInner) SetValue(v string)` + +SetValue sets Value field to given value. + +### HasValue + +`func (o *ListMappingConditions200ResponseInner) HasValue() bool` + +HasValue 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/ListScopes200ResponseInner.md b/docs/ListScopes200ResponseInner.md new file mode 100644 index 0000000..51fef92 --- /dev/null +++ b/docs/ListScopes200ResponseInner.md @@ -0,0 +1,108 @@ +# ListScopes200ResponseInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **int32** | | [optional] +**Value** | Pointer to **string** | | [optional] +**Description** | Pointer to **string** | | [optional] + +## Methods + +### NewListScopes200ResponseInner + +`func NewListScopes200ResponseInner() *ListScopes200ResponseInner` + +NewListScopes200ResponseInner instantiates a new ListScopes200ResponseInner 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 + +### NewListScopes200ResponseInnerWithDefaults + +`func NewListScopes200ResponseInnerWithDefaults() *ListScopes200ResponseInner` + +NewListScopes200ResponseInnerWithDefaults instantiates a new ListScopes200ResponseInner 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 + +### GetId + +`func (o *ListScopes200ResponseInner) GetId() int32` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ListScopes200ResponseInner) GetIdOk() (*int32, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ListScopes200ResponseInner) SetId(v int32)` + +SetId sets Id field to given value. + +### HasId + +`func (o *ListScopes200ResponseInner) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetValue + +`func (o *ListScopes200ResponseInner) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *ListScopes200ResponseInner) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *ListScopes200ResponseInner) SetValue(v string)` + +SetValue sets Value field to given value. + +### HasValue + +`func (o *ListScopes200ResponseInner) HasValue() bool` + +HasValue returns a boolean if a field has been set. + +### GetDescription + +`func (o *ListScopes200ResponseInner) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *ListScopes200ResponseInner) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *ListScopes200ResponseInner) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *ListScopes200ResponseInner) HasDescription() bool` + +HasDescription 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/Log.md b/docs/Log.md new file mode 100644 index 0000000..a9608da --- /dev/null +++ b/docs/Log.md @@ -0,0 +1,134 @@ +# Log + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**RequestId** | Pointer to **string** | | [optional] +**CorrelationId** | Pointer to **string** | | [optional] +**CreatedAt** | Pointer to **string** | | [optional] +**Events** | Pointer to **[]string** | | [optional] + +## Methods + +### NewLog + +`func NewLog() *Log` + +NewLog instantiates a new Log 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 + +### NewLogWithDefaults + +`func NewLogWithDefaults() *Log` + +NewLogWithDefaults instantiates a new Log 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 + +### GetRequestId + +`func (o *Log) GetRequestId() string` + +GetRequestId returns the RequestId field if non-nil, zero value otherwise. + +### GetRequestIdOk + +`func (o *Log) GetRequestIdOk() (*string, bool)` + +GetRequestIdOk returns a tuple with the RequestId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRequestId + +`func (o *Log) SetRequestId(v string)` + +SetRequestId sets RequestId field to given value. + +### HasRequestId + +`func (o *Log) HasRequestId() bool` + +HasRequestId returns a boolean if a field has been set. + +### GetCorrelationId + +`func (o *Log) GetCorrelationId() string` + +GetCorrelationId returns the CorrelationId field if non-nil, zero value otherwise. + +### GetCorrelationIdOk + +`func (o *Log) GetCorrelationIdOk() (*string, bool)` + +GetCorrelationIdOk returns a tuple with the CorrelationId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCorrelationId + +`func (o *Log) SetCorrelationId(v string)` + +SetCorrelationId sets CorrelationId field to given value. + +### HasCorrelationId + +`func (o *Log) HasCorrelationId() bool` + +HasCorrelationId returns a boolean if a field has been set. + +### GetCreatedAt + +`func (o *Log) GetCreatedAt() string` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *Log) GetCreatedAtOk() (*string, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *Log) SetCreatedAt(v string)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *Log) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### GetEvents + +`func (o *Log) GetEvents() []string` + +GetEvents returns the Events field if non-nil, zero value otherwise. + +### GetEventsOk + +`func (o *Log) GetEventsOk() (*[]string, bool)` + +GetEventsOk returns a tuple with the Events field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEvents + +`func (o *Log) SetEvents(v []string)` + +SetEvents sets Events field to given value. + +### HasEvents + +`func (o *Log) HasEvents() bool` + +HasEvents 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/Mapping.md b/docs/Mapping.md new file mode 100644 index 0000000..5944683 --- /dev/null +++ b/docs/Mapping.md @@ -0,0 +1,187 @@ +# Mapping + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **int32** | | [optional] +**Name** | **string** | The name of the mapping. | +**Enabled** | **bool** | Indicates if the mapping is enabled or not. | +**Match** | **string** | Indicates how conditions should be matched. | +**Position** | **int32** | Indicates the order of the mapping. When `null` this will default to last position. | +**Conditions** | Pointer to [**[]Condition**](Condition.md) | An array of conditions that the user must meet in order for the mapping to be applied. | [optional] +**Actions** | [**[]Action**](Action.md) | An array of actions that will be applied to the users that are matched by the conditions. | + +## Methods + +### NewMapping + +`func NewMapping(name string, enabled bool, match string, position int32, actions []Action, ) *Mapping` + +NewMapping instantiates a new Mapping 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 + +### NewMappingWithDefaults + +`func NewMappingWithDefaults() *Mapping` + +NewMappingWithDefaults instantiates a new Mapping 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 + +### GetId + +`func (o *Mapping) GetId() int32` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Mapping) GetIdOk() (*int32, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Mapping) SetId(v int32)` + +SetId sets Id field to given value. + +### HasId + +`func (o *Mapping) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetName + +`func (o *Mapping) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Mapping) 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 *Mapping) SetName(v string)` + +SetName sets Name field to given value. + + +### GetEnabled + +`func (o *Mapping) GetEnabled() bool` + +GetEnabled returns the Enabled field if non-nil, zero value otherwise. + +### GetEnabledOk + +`func (o *Mapping) 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 *Mapping) SetEnabled(v bool)` + +SetEnabled sets Enabled field to given value. + + +### GetMatch + +`func (o *Mapping) GetMatch() string` + +GetMatch returns the Match field if non-nil, zero value otherwise. + +### GetMatchOk + +`func (o *Mapping) GetMatchOk() (*string, bool)` + +GetMatchOk returns a tuple with the Match field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMatch + +`func (o *Mapping) SetMatch(v string)` + +SetMatch sets Match field to given value. + + +### GetPosition + +`func (o *Mapping) GetPosition() int32` + +GetPosition returns the Position field if non-nil, zero value otherwise. + +### GetPositionOk + +`func (o *Mapping) GetPositionOk() (*int32, bool)` + +GetPositionOk returns a tuple with the Position field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPosition + +`func (o *Mapping) SetPosition(v int32)` + +SetPosition sets Position field to given value. + + +### GetConditions + +`func (o *Mapping) GetConditions() []Condition` + +GetConditions returns the Conditions field if non-nil, zero value otherwise. + +### GetConditionsOk + +`func (o *Mapping) GetConditionsOk() (*[]Condition, bool)` + +GetConditionsOk returns a tuple with the Conditions field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConditions + +`func (o *Mapping) SetConditions(v []Condition)` + +SetConditions sets Conditions field to given value. + +### HasConditions + +`func (o *Mapping) HasConditions() bool` + +HasConditions returns a boolean if a field has been set. + +### GetActions + +`func (o *Mapping) GetActions() []Action` + +GetActions returns the Actions field if non-nil, zero value otherwise. + +### GetActionsOk + +`func (o *Mapping) GetActionsOk() (*[]Action, bool)` + +GetActionsOk returns a tuple with the Actions field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActions + +`func (o *Mapping) SetActions(v []Action)` + +SetActions sets Actions 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/Registration.md b/docs/Registration.md new file mode 100644 index 0000000..4f79875 --- /dev/null +++ b/docs/Registration.md @@ -0,0 +1,108 @@ +# Registration + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **string** | Registration identifier. | [optional] +**Status** | Pointer to **string** | pending registration has not been completed successfully. accepted registration has successfully completed. | [optional] +**DeviceId** | Pointer to **string** | Device id to be used with Verify the Factor. | [optional] + +## Methods + +### NewRegistration + +`func NewRegistration() *Registration` + +NewRegistration instantiates a new Registration 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 + +### NewRegistrationWithDefaults + +`func NewRegistrationWithDefaults() *Registration` + +NewRegistrationWithDefaults instantiates a new Registration 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 + +### GetId + +`func (o *Registration) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Registration) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Registration) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *Registration) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetStatus + +`func (o *Registration) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *Registration) GetStatusOk() (*string, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *Registration) SetStatus(v string)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *Registration) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### GetDeviceId + +`func (o *Registration) GetDeviceId() string` + +GetDeviceId returns the DeviceId field if non-nil, zero value otherwise. + +### GetDeviceIdOk + +`func (o *Registration) GetDeviceIdOk() (*string, bool)` + +GetDeviceIdOk returns a tuple with the DeviceId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDeviceId + +`func (o *Registration) SetDeviceId(v string)` + +SetDeviceId sets DeviceId field to given value. + +### HasDeviceId + +`func (o *Registration) HasDeviceId() bool` + +HasDeviceId 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/RemoveRoleUsersRequest.md b/docs/RemoveRoleUsersRequest.md new file mode 100644 index 0000000..fc29925 --- /dev/null +++ b/docs/RemoveRoleUsersRequest.md @@ -0,0 +1,56 @@ +# RemoveRoleUsersRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**UserId** | Pointer to **[]int32** | | [optional] + +## Methods + +### NewRemoveRoleUsersRequest + +`func NewRemoveRoleUsersRequest() *RemoveRoleUsersRequest` + +NewRemoveRoleUsersRequest instantiates a new RemoveRoleUsersRequest 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 + +### NewRemoveRoleUsersRequestWithDefaults + +`func NewRemoveRoleUsersRequestWithDefaults() *RemoveRoleUsersRequest` + +NewRemoveRoleUsersRequestWithDefaults instantiates a new RemoveRoleUsersRequest 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 + +### GetUserId + +`func (o *RemoveRoleUsersRequest) GetUserId() []int32` + +GetUserId returns the UserId field if non-nil, zero value otherwise. + +### GetUserIdOk + +`func (o *RemoveRoleUsersRequest) GetUserIdOk() (*[]int32, bool)` + +GetUserIdOk returns a tuple with the UserId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUserId + +`func (o *RemoveRoleUsersRequest) SetUserId(v []int32)` + +SetUserId sets UserId field to given value. + +### HasUserId + +`func (o *RemoveRoleUsersRequest) HasUserId() bool` + +HasUserId 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/RevokeTokenRequest.md b/docs/RevokeTokenRequest.md new file mode 100644 index 0000000..f609219 --- /dev/null +++ b/docs/RevokeTokenRequest.md @@ -0,0 +1,56 @@ +# RevokeTokenRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccessToken** | Pointer to **string** | | [optional] + +## Methods + +### NewRevokeTokenRequest + +`func NewRevokeTokenRequest() *RevokeTokenRequest` + +NewRevokeTokenRequest instantiates a new RevokeTokenRequest 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 + +### NewRevokeTokenRequestWithDefaults + +`func NewRevokeTokenRequestWithDefaults() *RevokeTokenRequest` + +NewRevokeTokenRequestWithDefaults instantiates a new RevokeTokenRequest 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 + +### GetAccessToken + +`func (o *RevokeTokenRequest) GetAccessToken() string` + +GetAccessToken returns the AccessToken field if non-nil, zero value otherwise. + +### GetAccessTokenOk + +`func (o *RevokeTokenRequest) GetAccessTokenOk() (*string, bool)` + +GetAccessTokenOk returns a tuple with the AccessToken field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccessToken + +`func (o *RevokeTokenRequest) SetAccessToken(v string)` + +SetAccessToken sets AccessToken field to given value. + +### HasAccessToken + +`func (o *RevokeTokenRequest) HasAccessToken() bool` + +HasAccessToken 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/RiskDevice.md b/docs/RiskDevice.md new file mode 100644 index 0000000..98827ad --- /dev/null +++ b/docs/RiskDevice.md @@ -0,0 +1,56 @@ +# RiskDevice + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **string** | This device's unique identifier | [optional] + +## Methods + +### NewRiskDevice + +`func NewRiskDevice() *RiskDevice` + +NewRiskDevice instantiates a new RiskDevice 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 + +### NewRiskDeviceWithDefaults + +`func NewRiskDeviceWithDefaults() *RiskDevice` + +NewRiskDeviceWithDefaults instantiates a new RiskDevice 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 + +### GetId + +`func (o *RiskDevice) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *RiskDevice) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *RiskDevice) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *RiskDevice) HasId() bool` + +HasId 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/RiskRule.md b/docs/RiskRule.md new file mode 100644 index 0000000..1c6eeec --- /dev/null +++ b/docs/RiskRule.md @@ -0,0 +1,212 @@ +# RiskRule + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **string** | | [optional] +**Name** | Pointer to **string** | The name of this rule | [optional] +**Description** | Pointer to **string** | | [optional] +**Type** | Pointer to **string** | The type parameter specifies the type of rule that will be created. | [optional] +**Target** | Pointer to **string** | The target parameter that will be used when evaluating the rule against an incoming event. | [optional] +**Filters** | Pointer to **[]string** | A list of IP addresses or country codes or names to evaluate against each event. | [optional] +**Source** | Pointer to [**Source**](Source.md) | | [optional] + +## Methods + +### NewRiskRule + +`func NewRiskRule() *RiskRule` + +NewRiskRule instantiates a new RiskRule 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 + +### NewRiskRuleWithDefaults + +`func NewRiskRuleWithDefaults() *RiskRule` + +NewRiskRuleWithDefaults instantiates a new RiskRule 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 + +### GetId + +`func (o *RiskRule) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *RiskRule) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *RiskRule) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *RiskRule) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetName + +`func (o *RiskRule) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *RiskRule) 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 *RiskRule) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *RiskRule) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetDescription + +`func (o *RiskRule) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *RiskRule) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *RiskRule) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *RiskRule) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetType + +`func (o *RiskRule) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *RiskRule) GetTypeOk() (*string, 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 *RiskRule) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *RiskRule) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetTarget + +`func (o *RiskRule) GetTarget() string` + +GetTarget returns the Target field if non-nil, zero value otherwise. + +### GetTargetOk + +`func (o *RiskRule) 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 *RiskRule) SetTarget(v string)` + +SetTarget sets Target field to given value. + +### HasTarget + +`func (o *RiskRule) HasTarget() bool` + +HasTarget returns a boolean if a field has been set. + +### GetFilters + +`func (o *RiskRule) GetFilters() []string` + +GetFilters returns the Filters field if non-nil, zero value otherwise. + +### GetFiltersOk + +`func (o *RiskRule) GetFiltersOk() (*[]string, bool)` + +GetFiltersOk returns a tuple with the Filters field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFilters + +`func (o *RiskRule) SetFilters(v []string)` + +SetFilters sets Filters field to given value. + +### HasFilters + +`func (o *RiskRule) HasFilters() bool` + +HasFilters returns a boolean if a field has been set. + +### GetSource + +`func (o *RiskRule) GetSource() Source` + +GetSource returns the Source field if non-nil, zero value otherwise. + +### GetSourceOk + +`func (o *RiskRule) 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 *RiskRule) SetSource(v Source)` + +SetSource sets Source field to given value. + +### HasSource + +`func (o *RiskRule) HasSource() bool` + +HasSource 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/RiskUser.md b/docs/RiskUser.md new file mode 100644 index 0000000..5ac06b1 --- /dev/null +++ b/docs/RiskUser.md @@ -0,0 +1,103 @@ +# RiskUser + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | A unique identifier for the user. | +**Name** | Pointer to **string** | A name for the user. | [optional] +**Authenticated** | Pointer to **bool** | Indicates if the metadata supplied in this event should be considered as trusted for the user. | [optional] [default to false] + +## Methods + +### NewRiskUser + +`func NewRiskUser(id string, ) *RiskUser` + +NewRiskUser instantiates a new RiskUser 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 + +### NewRiskUserWithDefaults + +`func NewRiskUserWithDefaults() *RiskUser` + +NewRiskUserWithDefaults instantiates a new RiskUser 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 + +### GetId + +`func (o *RiskUser) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *RiskUser) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *RiskUser) SetId(v string)` + +SetId sets Id field to given value. + + +### GetName + +`func (o *RiskUser) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *RiskUser) 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 *RiskUser) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *RiskUser) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetAuthenticated + +`func (o *RiskUser) GetAuthenticated() bool` + +GetAuthenticated returns the Authenticated field if non-nil, zero value otherwise. + +### GetAuthenticatedOk + +`func (o *RiskUser) GetAuthenticatedOk() (*bool, bool)` + +GetAuthenticatedOk returns a tuple with the Authenticated field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAuthenticated + +`func (o *RiskUser) SetAuthenticated(v bool)` + +SetAuthenticated sets Authenticated field to given value. + +### HasAuthenticated + +`func (o *RiskUser) HasAuthenticated() bool` + +HasAuthenticated 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/Role.md b/docs/Role.md new file mode 100644 index 0000000..50795c3 --- /dev/null +++ b/docs/Role.md @@ -0,0 +1,155 @@ +# Role + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **int32** | | [optional] +**Name** | **string** | | +**Apps** | Pointer to **[]int32** | | [optional] +**Users** | Pointer to **[]int32** | | [optional] +**Admins** | Pointer to **[]int32** | | [optional] + +## Methods + +### NewRole + +`func NewRole(name string, ) *Role` + +NewRole instantiates a new Role 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 + +### NewRoleWithDefaults + +`func NewRoleWithDefaults() *Role` + +NewRoleWithDefaults instantiates a new Role 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 + +### GetId + +`func (o *Role) GetId() int32` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Role) GetIdOk() (*int32, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Role) SetId(v int32)` + +SetId sets Id field to given value. + +### HasId + +`func (o *Role) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetName + +`func (o *Role) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Role) 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 *Role) SetName(v string)` + +SetName sets Name field to given value. + + +### GetApps + +`func (o *Role) GetApps() []int32` + +GetApps returns the Apps field if non-nil, zero value otherwise. + +### GetAppsOk + +`func (o *Role) GetAppsOk() (*[]int32, bool)` + +GetAppsOk returns a tuple with the Apps field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetApps + +`func (o *Role) SetApps(v []int32)` + +SetApps sets Apps field to given value. + +### HasApps + +`func (o *Role) HasApps() bool` + +HasApps returns a boolean if a field has been set. + +### GetUsers + +`func (o *Role) GetUsers() []int32` + +GetUsers returns the Users field if non-nil, zero value otherwise. + +### GetUsersOk + +`func (o *Role) 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 *Role) SetUsers(v []int32)` + +SetUsers sets Users field to given value. + +### HasUsers + +`func (o *Role) HasUsers() bool` + +HasUsers returns a boolean if a field has been set. + +### GetAdmins + +`func (o *Role) GetAdmins() []int32` + +GetAdmins returns the Admins field if non-nil, zero value otherwise. + +### GetAdminsOk + +`func (o *Role) GetAdminsOk() (*[]int32, bool)` + +GetAdminsOk returns a tuple with the Admins field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAdmins + +`func (o *Role) SetAdmins(v []int32)` + +SetAdmins sets Admins field to given value. + +### HasAdmins + +`func (o *Role) HasAdmins() bool` + +HasAdmins 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/Rule.md b/docs/Rule.md new file mode 100644 index 0000000..eff7265 --- /dev/null +++ b/docs/Rule.md @@ -0,0 +1,212 @@ +# Rule + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **int32** | | [optional] +**Name** | Pointer to **string** | The name of the rule. | [optional] +**Match** | Pointer to **string** | Indicates how conditions should be matched. | [optional] +**Enabled** | Pointer to **bool** | Indicates if the rule is enabled or not. | [optional] +**Position** | Pointer to **int32** | Indicates the order of the rule. When `null` this will default to last position. | [optional] +**Conditions** | Pointer to [**[]Condition**](Condition.md) | An array of conditions that the user must meet in order for the rule to be applied. | [optional] +**Actions** | Pointer to [**[]Action**](Action.md) | An array of actions that will be applied to the users that are matched by the conditions. | [optional] + +## Methods + +### NewRule + +`func NewRule() *Rule` + +NewRule instantiates a new Rule 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 + +### NewRuleWithDefaults + +`func NewRuleWithDefaults() *Rule` + +NewRuleWithDefaults instantiates a new Rule 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 + +### GetId + +`func (o *Rule) GetId() int32` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Rule) GetIdOk() (*int32, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Rule) SetId(v int32)` + +SetId sets Id field to given value. + +### HasId + +`func (o *Rule) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetName + +`func (o *Rule) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Rule) 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 *Rule) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *Rule) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetMatch + +`func (o *Rule) GetMatch() string` + +GetMatch returns the Match field if non-nil, zero value otherwise. + +### GetMatchOk + +`func (o *Rule) GetMatchOk() (*string, bool)` + +GetMatchOk returns a tuple with the Match field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMatch + +`func (o *Rule) SetMatch(v string)` + +SetMatch sets Match field to given value. + +### HasMatch + +`func (o *Rule) HasMatch() bool` + +HasMatch returns a boolean if a field has been set. + +### GetEnabled + +`func (o *Rule) GetEnabled() bool` + +GetEnabled returns the Enabled field if non-nil, zero value otherwise. + +### GetEnabledOk + +`func (o *Rule) 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 *Rule) SetEnabled(v bool)` + +SetEnabled sets Enabled field to given value. + +### HasEnabled + +`func (o *Rule) HasEnabled() bool` + +HasEnabled returns a boolean if a field has been set. + +### GetPosition + +`func (o *Rule) GetPosition() int32` + +GetPosition returns the Position field if non-nil, zero value otherwise. + +### GetPositionOk + +`func (o *Rule) GetPositionOk() (*int32, bool)` + +GetPositionOk returns a tuple with the Position field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPosition + +`func (o *Rule) SetPosition(v int32)` + +SetPosition sets Position field to given value. + +### HasPosition + +`func (o *Rule) HasPosition() bool` + +HasPosition returns a boolean if a field has been set. + +### GetConditions + +`func (o *Rule) GetConditions() []Condition` + +GetConditions returns the Conditions field if non-nil, zero value otherwise. + +### GetConditionsOk + +`func (o *Rule) GetConditionsOk() (*[]Condition, bool)` + +GetConditionsOk returns a tuple with the Conditions field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConditions + +`func (o *Rule) SetConditions(v []Condition)` + +SetConditions sets Conditions field to given value. + +### HasConditions + +`func (o *Rule) HasConditions() bool` + +HasConditions returns a boolean if a field has been set. + +### GetActions + +`func (o *Rule) GetActions() []Action` + +GetActions returns the Actions field if non-nil, zero value otherwise. + +### GetActionsOk + +`func (o *Rule) GetActionsOk() (*[]Action, bool)` + +GetActionsOk returns a tuple with the Actions field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActions + +`func (o *Rule) SetActions(v []Action)` + +SetActions sets Actions field to given value. + +### HasActions + +`func (o *Rule) HasActions() bool` + +HasActions 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/RuleId.md b/docs/RuleId.md new file mode 100644 index 0000000..b81292a --- /dev/null +++ b/docs/RuleId.md @@ -0,0 +1,56 @@ +# RuleId + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **int32** | | [optional] + +## Methods + +### NewRuleId + +`func NewRuleId() *RuleId` + +NewRuleId instantiates a new RuleId 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 + +### NewRuleIdWithDefaults + +`func NewRuleIdWithDefaults() *RuleId` + +NewRuleIdWithDefaults instantiates a new RuleId 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 + +### GetId + +`func (o *RuleId) GetId() int32` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *RuleId) GetIdOk() (*int32, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *RuleId) SetId(v int32)` + +SetId sets Id field to given value. + +### HasId + +`func (o *RuleId) HasId() bool` + +HasId 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/Schema.md b/docs/Schema.md new file mode 100644 index 0000000..d7426b4 --- /dev/null +++ b/docs/Schema.md @@ -0,0 +1,550 @@ +# Schema + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **int32** | Apps unique ID in OneLogin. | [optional] +**ConnectorId** | Pointer to **int32** | ID of the apps underlying connector. | [optional] +**Name** | Pointer to **string** | App name. | [optional] +**Description** | Pointer to **string** | Freeform description of the app. | [optional] +**Notes** | Pointer to **string** | Freeform notes about the app. | [optional] +**PolicyId** | Pointer to **int32** | The security policy assigned to the app. | [optional] +**BrandId** | Pointer to **int32** | The custom login page branding to use for this app. Applies to app initiated logins via OIDC or SAML. | [optional] +**IconUrl** | Pointer to **string** | A link to the apps icon url. | [optional] +**Visible** | Pointer to **bool** | Indicates if the app is visible in the OneLogin portal. | [optional] +**AuthMethod** | Pointer to **int32** | An ID indicating the type of app. | [optional] +**TabId** | Pointer to **int32** | ID of the OneLogin portal tab that the app is assigned to. | [optional] +**CreatedAt** | Pointer to **string** | The date the app was created. | [optional] +**UpdatedAt** | Pointer to **string** | The date the app was last updated. | [optional] +**RoleIds** | Pointer to **[]int32** | List of Role IDs that are assigned to the app. On App Create or Update the entire array is replaced with the values provided. | [optional] +**AllowAssumedSignin** | Pointer to **bool** | Indicates whether or not administrators can access the app as a user that they have assumed control over. | [optional] +**Provisioning** | Pointer to [**SchemaProvisioning**](SchemaProvisioning.md) | | [optional] +**Sso** | Pointer to **map[string]interface{}** | | [optional] +**Configuration** | Pointer to **map[string]interface{}** | | [optional] +**Parameters** | Pointer to **map[string]interface{}** | | [optional] +**EnforcementPoint** | Pointer to **map[string]interface{}** | | [optional] + +## Methods + +### NewSchema + +`func NewSchema() *Schema` + +NewSchema instantiates a new Schema 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 + +### NewSchemaWithDefaults + +`func NewSchemaWithDefaults() *Schema` + +NewSchemaWithDefaults instantiates a new Schema 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 + +### GetId + +`func (o *Schema) GetId() int32` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Schema) GetIdOk() (*int32, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Schema) SetId(v int32)` + +SetId sets Id field to given value. + +### HasId + +`func (o *Schema) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetConnectorId + +`func (o *Schema) GetConnectorId() int32` + +GetConnectorId returns the ConnectorId field if non-nil, zero value otherwise. + +### GetConnectorIdOk + +`func (o *Schema) GetConnectorIdOk() (*int32, bool)` + +GetConnectorIdOk returns a tuple with the ConnectorId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConnectorId + +`func (o *Schema) SetConnectorId(v int32)` + +SetConnectorId sets ConnectorId field to given value. + +### HasConnectorId + +`func (o *Schema) HasConnectorId() bool` + +HasConnectorId returns a boolean if a field has been set. + +### GetName + +`func (o *Schema) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Schema) 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 *Schema) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *Schema) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetDescription + +`func (o *Schema) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *Schema) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *Schema) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *Schema) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetNotes + +`func (o *Schema) GetNotes() string` + +GetNotes returns the Notes field if non-nil, zero value otherwise. + +### GetNotesOk + +`func (o *Schema) GetNotesOk() (*string, bool)` + +GetNotesOk returns a tuple with the Notes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNotes + +`func (o *Schema) SetNotes(v string)` + +SetNotes sets Notes field to given value. + +### HasNotes + +`func (o *Schema) HasNotes() bool` + +HasNotes returns a boolean if a field has been set. + +### GetPolicyId + +`func (o *Schema) GetPolicyId() int32` + +GetPolicyId returns the PolicyId field if non-nil, zero value otherwise. + +### GetPolicyIdOk + +`func (o *Schema) GetPolicyIdOk() (*int32, bool)` + +GetPolicyIdOk returns a tuple with the PolicyId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPolicyId + +`func (o *Schema) SetPolicyId(v int32)` + +SetPolicyId sets PolicyId field to given value. + +### HasPolicyId + +`func (o *Schema) HasPolicyId() bool` + +HasPolicyId returns a boolean if a field has been set. + +### GetBrandId + +`func (o *Schema) GetBrandId() int32` + +GetBrandId returns the BrandId field if non-nil, zero value otherwise. + +### GetBrandIdOk + +`func (o *Schema) GetBrandIdOk() (*int32, bool)` + +GetBrandIdOk returns a tuple with the BrandId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBrandId + +`func (o *Schema) SetBrandId(v int32)` + +SetBrandId sets BrandId field to given value. + +### HasBrandId + +`func (o *Schema) HasBrandId() bool` + +HasBrandId returns a boolean if a field has been set. + +### GetIconUrl + +`func (o *Schema) GetIconUrl() string` + +GetIconUrl returns the IconUrl field if non-nil, zero value otherwise. + +### GetIconUrlOk + +`func (o *Schema) GetIconUrlOk() (*string, bool)` + +GetIconUrlOk returns a tuple with the IconUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIconUrl + +`func (o *Schema) SetIconUrl(v string)` + +SetIconUrl sets IconUrl field to given value. + +### HasIconUrl + +`func (o *Schema) HasIconUrl() bool` + +HasIconUrl returns a boolean if a field has been set. + +### GetVisible + +`func (o *Schema) GetVisible() bool` + +GetVisible returns the Visible field if non-nil, zero value otherwise. + +### GetVisibleOk + +`func (o *Schema) GetVisibleOk() (*bool, bool)` + +GetVisibleOk returns a tuple with the Visible field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVisible + +`func (o *Schema) SetVisible(v bool)` + +SetVisible sets Visible field to given value. + +### HasVisible + +`func (o *Schema) HasVisible() bool` + +HasVisible returns a boolean if a field has been set. + +### GetAuthMethod + +`func (o *Schema) GetAuthMethod() int32` + +GetAuthMethod returns the AuthMethod field if non-nil, zero value otherwise. + +### GetAuthMethodOk + +`func (o *Schema) GetAuthMethodOk() (*int32, bool)` + +GetAuthMethodOk returns a tuple with the AuthMethod field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAuthMethod + +`func (o *Schema) SetAuthMethod(v int32)` + +SetAuthMethod sets AuthMethod field to given value. + +### HasAuthMethod + +`func (o *Schema) HasAuthMethod() bool` + +HasAuthMethod returns a boolean if a field has been set. + +### GetTabId + +`func (o *Schema) GetTabId() int32` + +GetTabId returns the TabId field if non-nil, zero value otherwise. + +### GetTabIdOk + +`func (o *Schema) GetTabIdOk() (*int32, bool)` + +GetTabIdOk returns a tuple with the TabId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTabId + +`func (o *Schema) SetTabId(v int32)` + +SetTabId sets TabId field to given value. + +### HasTabId + +`func (o *Schema) HasTabId() bool` + +HasTabId returns a boolean if a field has been set. + +### GetCreatedAt + +`func (o *Schema) GetCreatedAt() string` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *Schema) GetCreatedAtOk() (*string, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *Schema) SetCreatedAt(v string)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *Schema) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### GetUpdatedAt + +`func (o *Schema) GetUpdatedAt() string` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *Schema) GetUpdatedAtOk() (*string, bool)` + +GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedAt + +`func (o *Schema) SetUpdatedAt(v string)` + +SetUpdatedAt sets UpdatedAt field to given value. + +### HasUpdatedAt + +`func (o *Schema) HasUpdatedAt() bool` + +HasUpdatedAt returns a boolean if a field has been set. + +### GetRoleIds + +`func (o *Schema) GetRoleIds() []int32` + +GetRoleIds returns the RoleIds field if non-nil, zero value otherwise. + +### GetRoleIdsOk + +`func (o *Schema) GetRoleIdsOk() (*[]int32, bool)` + +GetRoleIdsOk returns a tuple with the RoleIds field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRoleIds + +`func (o *Schema) SetRoleIds(v []int32)` + +SetRoleIds sets RoleIds field to given value. + +### HasRoleIds + +`func (o *Schema) HasRoleIds() bool` + +HasRoleIds returns a boolean if a field has been set. + +### GetAllowAssumedSignin + +`func (o *Schema) GetAllowAssumedSignin() bool` + +GetAllowAssumedSignin returns the AllowAssumedSignin field if non-nil, zero value otherwise. + +### GetAllowAssumedSigninOk + +`func (o *Schema) GetAllowAssumedSigninOk() (*bool, bool)` + +GetAllowAssumedSigninOk returns a tuple with the AllowAssumedSignin field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAllowAssumedSignin + +`func (o *Schema) SetAllowAssumedSignin(v bool)` + +SetAllowAssumedSignin sets AllowAssumedSignin field to given value. + +### HasAllowAssumedSignin + +`func (o *Schema) HasAllowAssumedSignin() bool` + +HasAllowAssumedSignin returns a boolean if a field has been set. + +### GetProvisioning + +`func (o *Schema) GetProvisioning() SchemaProvisioning` + +GetProvisioning returns the Provisioning field if non-nil, zero value otherwise. + +### GetProvisioningOk + +`func (o *Schema) GetProvisioningOk() (*SchemaProvisioning, bool)` + +GetProvisioningOk returns a tuple with the Provisioning field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProvisioning + +`func (o *Schema) SetProvisioning(v SchemaProvisioning)` + +SetProvisioning sets Provisioning field to given value. + +### HasProvisioning + +`func (o *Schema) HasProvisioning() bool` + +HasProvisioning returns a boolean if a field has been set. + +### GetSso + +`func (o *Schema) GetSso() map[string]interface{}` + +GetSso returns the Sso field if non-nil, zero value otherwise. + +### GetSsoOk + +`func (o *Schema) GetSsoOk() (*map[string]interface{}, bool)` + +GetSsoOk returns a tuple with the Sso field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSso + +`func (o *Schema) SetSso(v map[string]interface{})` + +SetSso sets Sso field to given value. + +### HasSso + +`func (o *Schema) HasSso() bool` + +HasSso returns a boolean if a field has been set. + +### GetConfiguration + +`func (o *Schema) GetConfiguration() map[string]interface{}` + +GetConfiguration returns the Configuration field if non-nil, zero value otherwise. + +### GetConfigurationOk + +`func (o *Schema) GetConfigurationOk() (*map[string]interface{}, bool)` + +GetConfigurationOk returns a tuple with the Configuration field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConfiguration + +`func (o *Schema) SetConfiguration(v map[string]interface{})` + +SetConfiguration sets Configuration field to given value. + +### HasConfiguration + +`func (o *Schema) HasConfiguration() bool` + +HasConfiguration returns a boolean if a field has been set. + +### GetParameters + +`func (o *Schema) GetParameters() map[string]interface{}` + +GetParameters returns the Parameters field if non-nil, zero value otherwise. + +### GetParametersOk + +`func (o *Schema) GetParametersOk() (*map[string]interface{}, bool)` + +GetParametersOk returns a tuple with the Parameters field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetParameters + +`func (o *Schema) SetParameters(v map[string]interface{})` + +SetParameters sets Parameters field to given value. + +### HasParameters + +`func (o *Schema) HasParameters() bool` + +HasParameters returns a boolean if a field has been set. + +### GetEnforcementPoint + +`func (o *Schema) GetEnforcementPoint() map[string]interface{}` + +GetEnforcementPoint returns the EnforcementPoint field if non-nil, zero value otherwise. + +### GetEnforcementPointOk + +`func (o *Schema) GetEnforcementPointOk() (*map[string]interface{}, bool)` + +GetEnforcementPointOk returns a tuple with the EnforcementPoint field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnforcementPoint + +`func (o *Schema) SetEnforcementPoint(v map[string]interface{})` + +SetEnforcementPoint sets EnforcementPoint field to given value. + +### HasEnforcementPoint + +`func (o *Schema) HasEnforcementPoint() bool` + +HasEnforcementPoint 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/Schema1.md b/docs/Schema1.md new file mode 100644 index 0000000..ec2766b --- /dev/null +++ b/docs/Schema1.md @@ -0,0 +1,186 @@ +# Schema1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **int32** | | [optional] +**Name** | Pointer to **string** | | [optional] +**Username** | Pointer to **string** | | [optional] +**AddedBy** | Pointer to [**Schema1AddedBy**](Schema1AddedBy.md) | | [optional] +**AddedAt** | Pointer to **string** | | [optional] +**Assigned** | Pointer to **bool** | Indicates if assigned to role or not. Defaults to true. | [optional] + +## Methods + +### NewSchema1 + +`func NewSchema1() *Schema1` + +NewSchema1 instantiates a new Schema1 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 + +### NewSchema1WithDefaults + +`func NewSchema1WithDefaults() *Schema1` + +NewSchema1WithDefaults instantiates a new Schema1 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 + +### GetId + +`func (o *Schema1) GetId() int32` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Schema1) GetIdOk() (*int32, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Schema1) SetId(v int32)` + +SetId sets Id field to given value. + +### HasId + +`func (o *Schema1) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetName + +`func (o *Schema1) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Schema1) 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 *Schema1) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *Schema1) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetUsername + +`func (o *Schema1) GetUsername() string` + +GetUsername returns the Username field if non-nil, zero value otherwise. + +### GetUsernameOk + +`func (o *Schema1) 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 *Schema1) SetUsername(v string)` + +SetUsername sets Username field to given value. + +### HasUsername + +`func (o *Schema1) HasUsername() bool` + +HasUsername returns a boolean if a field has been set. + +### GetAddedBy + +`func (o *Schema1) GetAddedBy() Schema1AddedBy` + +GetAddedBy returns the AddedBy field if non-nil, zero value otherwise. + +### GetAddedByOk + +`func (o *Schema1) GetAddedByOk() (*Schema1AddedBy, bool)` + +GetAddedByOk returns a tuple with the AddedBy field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAddedBy + +`func (o *Schema1) SetAddedBy(v Schema1AddedBy)` + +SetAddedBy sets AddedBy field to given value. + +### HasAddedBy + +`func (o *Schema1) HasAddedBy() bool` + +HasAddedBy returns a boolean if a field has been set. + +### GetAddedAt + +`func (o *Schema1) GetAddedAt() string` + +GetAddedAt returns the AddedAt field if non-nil, zero value otherwise. + +### GetAddedAtOk + +`func (o *Schema1) GetAddedAtOk() (*string, bool)` + +GetAddedAtOk returns a tuple with the AddedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAddedAt + +`func (o *Schema1) SetAddedAt(v string)` + +SetAddedAt sets AddedAt field to given value. + +### HasAddedAt + +`func (o *Schema1) HasAddedAt() bool` + +HasAddedAt returns a boolean if a field has been set. + +### GetAssigned + +`func (o *Schema1) GetAssigned() bool` + +GetAssigned returns the Assigned field if non-nil, zero value otherwise. + +### GetAssignedOk + +`func (o *Schema1) GetAssignedOk() (*bool, bool)` + +GetAssignedOk returns a tuple with the Assigned field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAssigned + +`func (o *Schema1) SetAssigned(v bool)` + +SetAssigned sets Assigned field to given value. + +### HasAssigned + +`func (o *Schema1) HasAssigned() bool` + +HasAssigned 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/Schema1AddedBy.md b/docs/Schema1AddedBy.md new file mode 100644 index 0000000..4d688c9 --- /dev/null +++ b/docs/Schema1AddedBy.md @@ -0,0 +1,82 @@ +# Schema1AddedBy + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **int32** | | [optional] +**Name** | Pointer to **string** | | [optional] + +## Methods + +### NewSchema1AddedBy + +`func NewSchema1AddedBy() *Schema1AddedBy` + +NewSchema1AddedBy instantiates a new Schema1AddedBy 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 + +### NewSchema1AddedByWithDefaults + +`func NewSchema1AddedByWithDefaults() *Schema1AddedBy` + +NewSchema1AddedByWithDefaults instantiates a new Schema1AddedBy 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 + +### GetId + +`func (o *Schema1AddedBy) GetId() int32` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Schema1AddedBy) GetIdOk() (*int32, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Schema1AddedBy) SetId(v int32)` + +SetId sets Id field to given value. + +### HasId + +`func (o *Schema1AddedBy) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetName + +`func (o *Schema1AddedBy) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Schema1AddedBy) 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 *Schema1AddedBy) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *Schema1AddedBy) HasName() bool` + +HasName 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/SchemaProvisioning.md b/docs/SchemaProvisioning.md new file mode 100644 index 0000000..5b8a65e --- /dev/null +++ b/docs/SchemaProvisioning.md @@ -0,0 +1,56 @@ +# SchemaProvisioning + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | Pointer to **bool** | Indicates if provisioning is enabled for this app. | [optional] + +## Methods + +### NewSchemaProvisioning + +`func NewSchemaProvisioning() *SchemaProvisioning` + +NewSchemaProvisioning instantiates a new SchemaProvisioning 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 + +### NewSchemaProvisioningWithDefaults + +`func NewSchemaProvisioningWithDefaults() *SchemaProvisioning` + +NewSchemaProvisioningWithDefaults instantiates a new SchemaProvisioning 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 + +### GetEnabled + +`func (o *SchemaProvisioning) GetEnabled() bool` + +GetEnabled returns the Enabled field if non-nil, zero value otherwise. + +### GetEnabledOk + +`func (o *SchemaProvisioning) 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 *SchemaProvisioning) SetEnabled(v bool)` + +SetEnabled sets Enabled field to given value. + +### HasEnabled + +`func (o *SchemaProvisioning) HasEnabled() bool` + +HasEnabled 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/Session.md b/docs/Session.md new file mode 100644 index 0000000..8137467 --- /dev/null +++ b/docs/Session.md @@ -0,0 +1,56 @@ +# Session + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **string** | If you use a database to track sessions, you can send us the session ID. | [optional] + +## Methods + +### NewSession + +`func NewSession() *Session` + +NewSession instantiates a new Session 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 + +### NewSessionWithDefaults + +`func NewSessionWithDefaults() *Session` + +NewSessionWithDefaults instantiates a new Session 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 + +### GetId + +`func (o *Session) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Session) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Session) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *Session) HasId() bool` + +HasId 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/SetRoleApps200ResponseInner.md b/docs/SetRoleApps200ResponseInner.md new file mode 100644 index 0000000..27d92ff --- /dev/null +++ b/docs/SetRoleApps200ResponseInner.md @@ -0,0 +1,56 @@ +# SetRoleApps200ResponseInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **int32** | Apps unique ID in OneLogin. | [optional] + +## Methods + +### NewSetRoleApps200ResponseInner + +`func NewSetRoleApps200ResponseInner() *SetRoleApps200ResponseInner` + +NewSetRoleApps200ResponseInner instantiates a new SetRoleApps200ResponseInner 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 + +### NewSetRoleApps200ResponseInnerWithDefaults + +`func NewSetRoleApps200ResponseInnerWithDefaults() *SetRoleApps200ResponseInner` + +NewSetRoleApps200ResponseInnerWithDefaults instantiates a new SetRoleApps200ResponseInner 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 + +### GetId + +`func (o *SetRoleApps200ResponseInner) GetId() int32` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *SetRoleApps200ResponseInner) GetIdOk() (*int32, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *SetRoleApps200ResponseInner) SetId(v int32)` + +SetId sets Id field to given value. + +### HasId + +`func (o *SetRoleApps200ResponseInner) HasId() bool` + +HasId 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/Source.md b/docs/Source.md new file mode 100644 index 0000000..79f2b46 --- /dev/null +++ b/docs/Source.md @@ -0,0 +1,82 @@ +# Source + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **string** | | [optional] +**Name** | Pointer to **string** | The name of the source | [optional] + +## Methods + +### NewSource + +`func NewSource() *Source` + +NewSource instantiates a new Source 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 + +### NewSourceWithDefaults + +`func NewSourceWithDefaults() *Source` + +NewSourceWithDefaults instantiates a new Source 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 + +### GetId + +`func (o *Source) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Source) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Source) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *Source) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetName + +`func (o *Source) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Source) 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 *Source) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *Source) HasName() bool` + +HasName 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/Status.md b/docs/Status.md new file mode 100644 index 0000000..205b3f2 --- /dev/null +++ b/docs/Status.md @@ -0,0 +1,134 @@ +# Status + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Error** | Pointer to **bool** | | [optional] +**Code** | Pointer to **int32** | | [optional] +**Type** | Pointer to **string** | | [optional] +**Message** | Pointer to **string** | | [optional] + +## Methods + +### NewStatus + +`func NewStatus() *Status` + +NewStatus instantiates a new Status 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 + +### NewStatusWithDefaults + +`func NewStatusWithDefaults() *Status` + +NewStatusWithDefaults instantiates a new Status 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 + +### GetError + +`func (o *Status) GetError() bool` + +GetError returns the Error field if non-nil, zero value otherwise. + +### GetErrorOk + +`func (o *Status) GetErrorOk() (*bool, bool)` + +GetErrorOk returns a tuple with the Error field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetError + +`func (o *Status) SetError(v bool)` + +SetError sets Error field to given value. + +### HasError + +`func (o *Status) HasError() bool` + +HasError returns a boolean if a field has been set. + +### GetCode + +`func (o *Status) GetCode() int32` + +GetCode returns the Code field if non-nil, zero value otherwise. + +### GetCodeOk + +`func (o *Status) GetCodeOk() (*int32, bool)` + +GetCodeOk returns a tuple with the Code field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCode + +`func (o *Status) SetCode(v int32)` + +SetCode sets Code field to given value. + +### HasCode + +`func (o *Status) HasCode() bool` + +HasCode returns a boolean if a field has been set. + +### GetType + +`func (o *Status) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *Status) GetTypeOk() (*string, 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 *Status) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *Status) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetMessage + +`func (o *Status) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *Status) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *Status) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *Status) HasMessage() bool` + +HasMessage 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/Status1.md b/docs/Status1.md new file mode 100644 index 0000000..58867c6 --- /dev/null +++ b/docs/Status1.md @@ -0,0 +1,108 @@ +# Status1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | Pointer to **string** | | [optional] +**StatusCode** | Pointer to **int32** | | [optional] +**Name** | Pointer to **string** | | [optional] + +## Methods + +### NewStatus1 + +`func NewStatus1() *Status1` + +NewStatus1 instantiates a new Status1 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 + +### NewStatus1WithDefaults + +`func NewStatus1WithDefaults() *Status1` + +NewStatus1WithDefaults instantiates a new Status1 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 + +### GetMessage + +`func (o *Status1) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *Status1) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *Status1) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *Status1) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + +### GetStatusCode + +`func (o *Status1) GetStatusCode() int32` + +GetStatusCode returns the StatusCode field if non-nil, zero value otherwise. + +### GetStatusCodeOk + +`func (o *Status1) GetStatusCodeOk() (*int32, bool)` + +GetStatusCodeOk returns a tuple with the StatusCode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatusCode + +`func (o *Status1) SetStatusCode(v int32)` + +SetStatusCode sets StatusCode field to given value. + +### HasStatusCode + +`func (o *Status1) HasStatusCode() bool` + +HasStatusCode returns a boolean if a field has been set. + +### GetName + +`func (o *Status1) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Status1) 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 *Status1) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *Status1) HasName() bool` + +HasName 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/Status2.md b/docs/Status2.md new file mode 100644 index 0000000..4efc1ec --- /dev/null +++ b/docs/Status2.md @@ -0,0 +1,56 @@ +# Status2 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Status** | Pointer to [**Status2Status**](Status2Status.md) | | [optional] + +## Methods + +### NewStatus2 + +`func NewStatus2() *Status2` + +NewStatus2 instantiates a new Status2 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 + +### NewStatus2WithDefaults + +`func NewStatus2WithDefaults() *Status2` + +NewStatus2WithDefaults instantiates a new Status2 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 + +### GetStatus + +`func (o *Status2) GetStatus() Status2Status` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *Status2) GetStatusOk() (*Status2Status, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *Status2) SetStatus(v Status2Status)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *Status2) HasStatus() bool` + +HasStatus 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/Status2Status.md b/docs/Status2Status.md new file mode 100644 index 0000000..70a60b8 --- /dev/null +++ b/docs/Status2Status.md @@ -0,0 +1,134 @@ +# Status2Status + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | Pointer to **string** | | [optional] +**Code** | Pointer to **int32** | | [optional] +**Message** | Pointer to **string** | | [optional] +**Error** | Pointer to **bool** | | [optional] + +## Methods + +### NewStatus2Status + +`func NewStatus2Status() *Status2Status` + +NewStatus2Status instantiates a new Status2Status 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 + +### NewStatus2StatusWithDefaults + +`func NewStatus2StatusWithDefaults() *Status2Status` + +NewStatus2StatusWithDefaults instantiates a new Status2Status 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 + +### GetType + +`func (o *Status2Status) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *Status2Status) GetTypeOk() (*string, 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 *Status2Status) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *Status2Status) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetCode + +`func (o *Status2Status) GetCode() int32` + +GetCode returns the Code field if non-nil, zero value otherwise. + +### GetCodeOk + +`func (o *Status2Status) GetCodeOk() (*int32, bool)` + +GetCodeOk returns a tuple with the Code field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCode + +`func (o *Status2Status) SetCode(v int32)` + +SetCode sets Code field to given value. + +### HasCode + +`func (o *Status2Status) HasCode() bool` + +HasCode returns a boolean if a field has been set. + +### GetMessage + +`func (o *Status2Status) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *Status2Status) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *Status2Status) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *Status2Status) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + +### GetError + +`func (o *Status2Status) GetError() bool` + +GetError returns the Error field if non-nil, zero value otherwise. + +### GetErrorOk + +`func (o *Status2Status) GetErrorOk() (*bool, bool)` + +GetErrorOk returns a tuple with the Error field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetError + +`func (o *Status2Status) SetError(v bool)` + +SetError sets Error field to given value. + +### HasError + +`func (o *Status2Status) HasError() bool` + +HasError 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/TrackEventRequest.md b/docs/TrackEventRequest.md new file mode 100644 index 0000000..d8d99aa --- /dev/null +++ b/docs/TrackEventRequest.md @@ -0,0 +1,244 @@ +# TrackEventRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Verb** | **string** | Verbs are used to distinguish between different types of events. | +**Ip** | **string** | The IP address of the User's request. | +**UserAgent** | **string** | The user agent of the User's request. | +**User** | [**RiskUser**](RiskUser.md) | | +**Source** | Pointer to [**Source**](Source.md) | | [optional] +**Session** | Pointer to [**Session**](Session.md) | | [optional] +**Device** | Pointer to [**RiskDevice**](RiskDevice.md) | | [optional] +**Fp** | Pointer to **string** | Set to the value of the __tdli_fp cookie. | [optional] +**Published** | Pointer to **string** | Date and time of the event in IS08601 format. Useful for preloading old events. Defaults to date time this API request is received. | [optional] + +## Methods + +### NewTrackEventRequest + +`func NewTrackEventRequest(verb string, ip string, userAgent string, user RiskUser, ) *TrackEventRequest` + +NewTrackEventRequest instantiates a new TrackEventRequest 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 + +### NewTrackEventRequestWithDefaults + +`func NewTrackEventRequestWithDefaults() *TrackEventRequest` + +NewTrackEventRequestWithDefaults instantiates a new TrackEventRequest 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 + +### GetVerb + +`func (o *TrackEventRequest) GetVerb() string` + +GetVerb returns the Verb field if non-nil, zero value otherwise. + +### GetVerbOk + +`func (o *TrackEventRequest) GetVerbOk() (*string, bool)` + +GetVerbOk returns a tuple with the Verb field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVerb + +`func (o *TrackEventRequest) SetVerb(v string)` + +SetVerb sets Verb field to given value. + + +### GetIp + +`func (o *TrackEventRequest) GetIp() string` + +GetIp returns the Ip field if non-nil, zero value otherwise. + +### GetIpOk + +`func (o *TrackEventRequest) GetIpOk() (*string, bool)` + +GetIpOk returns a tuple with the Ip field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIp + +`func (o *TrackEventRequest) SetIp(v string)` + +SetIp sets Ip field to given value. + + +### GetUserAgent + +`func (o *TrackEventRequest) GetUserAgent() string` + +GetUserAgent returns the UserAgent field if non-nil, zero value otherwise. + +### GetUserAgentOk + +`func (o *TrackEventRequest) GetUserAgentOk() (*string, bool)` + +GetUserAgentOk returns a tuple with the UserAgent field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUserAgent + +`func (o *TrackEventRequest) SetUserAgent(v string)` + +SetUserAgent sets UserAgent field to given value. + + +### GetUser + +`func (o *TrackEventRequest) GetUser() RiskUser` + +GetUser returns the User field if non-nil, zero value otherwise. + +### GetUserOk + +`func (o *TrackEventRequest) GetUserOk() (*RiskUser, bool)` + +GetUserOk returns a tuple with the User field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUser + +`func (o *TrackEventRequest) SetUser(v RiskUser)` + +SetUser sets User field to given value. + + +### GetSource + +`func (o *TrackEventRequest) GetSource() Source` + +GetSource returns the Source field if non-nil, zero value otherwise. + +### GetSourceOk + +`func (o *TrackEventRequest) 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 *TrackEventRequest) SetSource(v Source)` + +SetSource sets Source field to given value. + +### HasSource + +`func (o *TrackEventRequest) HasSource() bool` + +HasSource returns a boolean if a field has been set. + +### GetSession + +`func (o *TrackEventRequest) GetSession() Session` + +GetSession returns the Session field if non-nil, zero value otherwise. + +### GetSessionOk + +`func (o *TrackEventRequest) GetSessionOk() (*Session, bool)` + +GetSessionOk returns a tuple with the Session field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSession + +`func (o *TrackEventRequest) SetSession(v Session)` + +SetSession sets Session field to given value. + +### HasSession + +`func (o *TrackEventRequest) HasSession() bool` + +HasSession returns a boolean if a field has been set. + +### GetDevice + +`func (o *TrackEventRequest) GetDevice() RiskDevice` + +GetDevice returns the Device field if non-nil, zero value otherwise. + +### GetDeviceOk + +`func (o *TrackEventRequest) GetDeviceOk() (*RiskDevice, bool)` + +GetDeviceOk returns a tuple with the Device field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDevice + +`func (o *TrackEventRequest) SetDevice(v RiskDevice)` + +SetDevice sets Device field to given value. + +### HasDevice + +`func (o *TrackEventRequest) HasDevice() bool` + +HasDevice returns a boolean if a field has been set. + +### GetFp + +`func (o *TrackEventRequest) GetFp() string` + +GetFp returns the Fp field if non-nil, zero value otherwise. + +### GetFpOk + +`func (o *TrackEventRequest) GetFpOk() (*string, bool)` + +GetFpOk returns a tuple with the Fp field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFp + +`func (o *TrackEventRequest) SetFp(v string)` + +SetFp sets Fp field to given value. + +### HasFp + +`func (o *TrackEventRequest) HasFp() bool` + +HasFp returns a boolean if a field has been set. + +### GetPublished + +`func (o *TrackEventRequest) GetPublished() string` + +GetPublished returns the Published field if non-nil, zero value otherwise. + +### GetPublishedOk + +`func (o *TrackEventRequest) GetPublishedOk() (*string, bool)` + +GetPublishedOk returns a tuple with the Published field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPublished + +`func (o *TrackEventRequest) SetPublished(v string)` + +SetPublished sets Published field to given value. + +### HasPublished + +`func (o *TrackEventRequest) HasPublished() bool` + +HasPublished 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/UpdateAuthorizationServer400Response.md b/docs/UpdateAuthorizationServer400Response.md new file mode 100644 index 0000000..105d459 --- /dev/null +++ b/docs/UpdateAuthorizationServer400Response.md @@ -0,0 +1,134 @@ +# UpdateAuthorizationServer400Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Field** | Pointer to **string** | | [optional] +**Message** | Pointer to **string** | | [optional] +**StatusCode** | Pointer to **int32** | | [optional] +**Name** | Pointer to **string** | | [optional] + +## Methods + +### NewUpdateAuthorizationServer400Response + +`func NewUpdateAuthorizationServer400Response() *UpdateAuthorizationServer400Response` + +NewUpdateAuthorizationServer400Response instantiates a new UpdateAuthorizationServer400Response 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 + +### NewUpdateAuthorizationServer400ResponseWithDefaults + +`func NewUpdateAuthorizationServer400ResponseWithDefaults() *UpdateAuthorizationServer400Response` + +NewUpdateAuthorizationServer400ResponseWithDefaults instantiates a new UpdateAuthorizationServer400Response 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 + +### GetField + +`func (o *UpdateAuthorizationServer400Response) GetField() string` + +GetField returns the Field field if non-nil, zero value otherwise. + +### GetFieldOk + +`func (o *UpdateAuthorizationServer400Response) GetFieldOk() (*string, bool)` + +GetFieldOk returns a tuple with the Field field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetField + +`func (o *UpdateAuthorizationServer400Response) SetField(v string)` + +SetField sets Field field to given value. + +### HasField + +`func (o *UpdateAuthorizationServer400Response) HasField() bool` + +HasField returns a boolean if a field has been set. + +### GetMessage + +`func (o *UpdateAuthorizationServer400Response) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *UpdateAuthorizationServer400Response) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *UpdateAuthorizationServer400Response) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *UpdateAuthorizationServer400Response) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + +### GetStatusCode + +`func (o *UpdateAuthorizationServer400Response) GetStatusCode() int32` + +GetStatusCode returns the StatusCode field if non-nil, zero value otherwise. + +### GetStatusCodeOk + +`func (o *UpdateAuthorizationServer400Response) GetStatusCodeOk() (*int32, bool)` + +GetStatusCodeOk returns a tuple with the StatusCode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatusCode + +`func (o *UpdateAuthorizationServer400Response) SetStatusCode(v int32)` + +SetStatusCode sets StatusCode field to given value. + +### HasStatusCode + +`func (o *UpdateAuthorizationServer400Response) HasStatusCode() bool` + +HasStatusCode returns a boolean if a field has been set. + +### GetName + +`func (o *UpdateAuthorizationServer400Response) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *UpdateAuthorizationServer400Response) 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 *UpdateAuthorizationServer400Response) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *UpdateAuthorizationServer400Response) HasName() bool` + +HasName 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/UpdateClientAppRequest.md b/docs/UpdateClientAppRequest.md new file mode 100644 index 0000000..0638d0d --- /dev/null +++ b/docs/UpdateClientAppRequest.md @@ -0,0 +1,56 @@ +# UpdateClientAppRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Scopes** | Pointer to **[]int32** | | [optional] + +## Methods + +### NewUpdateClientAppRequest + +`func NewUpdateClientAppRequest() *UpdateClientAppRequest` + +NewUpdateClientAppRequest instantiates a new UpdateClientAppRequest 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 + +### NewUpdateClientAppRequestWithDefaults + +`func NewUpdateClientAppRequestWithDefaults() *UpdateClientAppRequest` + +NewUpdateClientAppRequestWithDefaults instantiates a new UpdateClientAppRequest 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 + +### GetScopes + +`func (o *UpdateClientAppRequest) GetScopes() []int32` + +GetScopes returns the Scopes field if non-nil, zero value otherwise. + +### GetScopesOk + +`func (o *UpdateClientAppRequest) GetScopesOk() (*[]int32, bool)` + +GetScopesOk returns a tuple with the Scopes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetScopes + +`func (o *UpdateClientAppRequest) SetScopes(v []int32)` + +SetScopes sets Scopes field to given value. + +### HasScopes + +`func (o *UpdateClientAppRequest) HasScopes() bool` + +HasScopes 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/UpdateEnvironmentVariableRequest.md b/docs/UpdateEnvironmentVariableRequest.md new file mode 100644 index 0000000..829f0e5 --- /dev/null +++ b/docs/UpdateEnvironmentVariableRequest.md @@ -0,0 +1,51 @@ +# UpdateEnvironmentVariableRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | The secret value that will be encrypted at rest and injected in applicable hook functions at run time. | + +## Methods + +### NewUpdateEnvironmentVariableRequest + +`func NewUpdateEnvironmentVariableRequest(value string, ) *UpdateEnvironmentVariableRequest` + +NewUpdateEnvironmentVariableRequest instantiates a new UpdateEnvironmentVariableRequest 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 + +### NewUpdateEnvironmentVariableRequestWithDefaults + +`func NewUpdateEnvironmentVariableRequestWithDefaults() *UpdateEnvironmentVariableRequest` + +NewUpdateEnvironmentVariableRequestWithDefaults instantiates a new UpdateEnvironmentVariableRequest 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 + +### GetValue + +`func (o *UpdateEnvironmentVariableRequest) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *UpdateEnvironmentVariableRequest) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *UpdateEnvironmentVariableRequest) SetValue(v string)` + +SetValue sets Value 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/UpdateRole200Response.md b/docs/UpdateRole200Response.md new file mode 100644 index 0000000..d06efc9 --- /dev/null +++ b/docs/UpdateRole200Response.md @@ -0,0 +1,56 @@ +# UpdateRole200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **int32** | | [optional] + +## Methods + +### NewUpdateRole200Response + +`func NewUpdateRole200Response() *UpdateRole200Response` + +NewUpdateRole200Response instantiates a new UpdateRole200Response 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 + +### NewUpdateRole200ResponseWithDefaults + +`func NewUpdateRole200ResponseWithDefaults() *UpdateRole200Response` + +NewUpdateRole200ResponseWithDefaults instantiates a new UpdateRole200Response 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 + +### GetId + +`func (o *UpdateRole200Response) GetId() int32` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *UpdateRole200Response) GetIdOk() (*int32, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *UpdateRole200Response) SetId(v int32)` + +SetId sets Id field to given value. + +### HasId + +`func (o *UpdateRole200Response) HasId() bool` + +HasId 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/User.md b/docs/User.md new file mode 100644 index 0000000..02caf89 --- /dev/null +++ b/docs/User.md @@ -0,0 +1,992 @@ +# User + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **int32** | | [optional] +**Username** | Pointer to **string** | A username for the user. | [optional] +**Email** | Pointer to **string** | A valid email for the user. | [optional] +**Firstname** | Pointer to **string** | The user's first name. | [optional] +**Lastname** | Pointer to **string** | The user's last name. | [optional] +**Title** | Pointer to **string** | The user's job title. | [optional] +**Department** | Pointer to **string** | The user's department. | [optional] +**Company** | Pointer to **string** | The user's company. | [optional] +**Comment** | Pointer to **string** | Free text related to the user. | [optional] +**GroupId** | Pointer to **int32** | The ID of the Group in OneLogin that the user is assigned to. | [optional] +**RoleIds** | Pointer to **[]int32** | A list of OneLogin Role IDs of the user | [optional] +**Phone** | Pointer to **string** | The E.164 format phone number for a user. | [optional] +**State** | Pointer to **int32** | | [optional] +**Status** | Pointer to **int32** | | [optional] +**DirectoryId** | Pointer to **int32** | The ID of the OneLogin Directory of the user. | [optional] +**TrustedIdpId** | Pointer to **int32** | The ID of the OneLogin Trusted IDP of the user. | [optional] +**ManagerAdId** | Pointer to **string** | The ID of the user's manager in Active Directory. | [optional] +**ManagerUserId** | Pointer to **string** | The OneLogin User ID for the user's manager. | [optional] +**SamaccountName** | Pointer to **string** | The user's Active Directory username. | [optional] +**MemberOf** | Pointer to **string** | The user's directory membership. | [optional] +**Userprincipalname** | Pointer to **string** | The principle name of the user. | [optional] +**DistinguishedName** | Pointer to **string** | The distinguished name of the user. | [optional] +**ExternalId** | Pointer to **string** | The ID of the user in an external directory. | [optional] +**ActivatedAt** | Pointer to **string** | | [optional] +**LastLogin** | Pointer to **string** | | [optional] +**InvitationSentAt** | Pointer to **string** | | [optional] +**UpdatedAt** | Pointer to **string** | | [optional] +**PreferredLocaleCode** | Pointer to **string** | | [optional] +**CreatedAt** | Pointer to **string** | | [optional] +**CustomAttributes** | Pointer to **map[string]interface{}** | | [optional] +**InvalidLoginAttempts** | Pointer to **int32** | | [optional] +**LockedUntil** | Pointer to **string** | | [optional] +**PasswordChangedAt** | Pointer to **string** | | [optional] +**Password** | Pointer to **string** | The password to set for a user. | [optional] +**PasswordConfirmation** | Pointer to **string** | Required if the password is being set. | [optional] +**PasswordAlgorithm** | Pointer to **string** | Use this when importing a password that's already hashed. Prepend the salt value to the cleartext password value before SHA-256-encoding it | [optional] +**Salt** | Pointer to **string** | The salt value used with the password_algorithm. | [optional] + +## Methods + +### NewUser + +`func NewUser() *User` + +NewUser instantiates a new User 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 + +### NewUserWithDefaults + +`func NewUserWithDefaults() *User` + +NewUserWithDefaults instantiates a new User 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 + +### GetId + +`func (o *User) GetId() int32` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *User) GetIdOk() (*int32, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *User) SetId(v int32)` + +SetId sets Id field to given value. + +### HasId + +`func (o *User) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetUsername + +`func (o *User) GetUsername() string` + +GetUsername returns the Username field if non-nil, zero value otherwise. + +### GetUsernameOk + +`func (o *User) 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 *User) SetUsername(v string)` + +SetUsername sets Username field to given value. + +### HasUsername + +`func (o *User) HasUsername() bool` + +HasUsername returns a boolean if a field has been set. + +### GetEmail + +`func (o *User) GetEmail() string` + +GetEmail returns the Email field if non-nil, zero value otherwise. + +### GetEmailOk + +`func (o *User) 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 *User) SetEmail(v string)` + +SetEmail sets Email field to given value. + +### HasEmail + +`func (o *User) HasEmail() bool` + +HasEmail returns a boolean if a field has been set. + +### GetFirstname + +`func (o *User) GetFirstname() string` + +GetFirstname returns the Firstname field if non-nil, zero value otherwise. + +### GetFirstnameOk + +`func (o *User) GetFirstnameOk() (*string, bool)` + +GetFirstnameOk returns a tuple with the Firstname field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFirstname + +`func (o *User) SetFirstname(v string)` + +SetFirstname sets Firstname field to given value. + +### HasFirstname + +`func (o *User) HasFirstname() bool` + +HasFirstname returns a boolean if a field has been set. + +### GetLastname + +`func (o *User) GetLastname() string` + +GetLastname returns the Lastname field if non-nil, zero value otherwise. + +### GetLastnameOk + +`func (o *User) GetLastnameOk() (*string, bool)` + +GetLastnameOk returns a tuple with the Lastname field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastname + +`func (o *User) SetLastname(v string)` + +SetLastname sets Lastname field to given value. + +### HasLastname + +`func (o *User) HasLastname() bool` + +HasLastname returns a boolean if a field has been set. + +### GetTitle + +`func (o *User) GetTitle() string` + +GetTitle returns the Title field if non-nil, zero value otherwise. + +### GetTitleOk + +`func (o *User) 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 *User) SetTitle(v string)` + +SetTitle sets Title field to given value. + +### HasTitle + +`func (o *User) HasTitle() bool` + +HasTitle returns a boolean if a field has been set. + +### GetDepartment + +`func (o *User) GetDepartment() string` + +GetDepartment returns the Department field if non-nil, zero value otherwise. + +### GetDepartmentOk + +`func (o *User) GetDepartmentOk() (*string, bool)` + +GetDepartmentOk returns a tuple with the Department field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDepartment + +`func (o *User) SetDepartment(v string)` + +SetDepartment sets Department field to given value. + +### HasDepartment + +`func (o *User) HasDepartment() bool` + +HasDepartment returns a boolean if a field has been set. + +### GetCompany + +`func (o *User) GetCompany() string` + +GetCompany returns the Company field if non-nil, zero value otherwise. + +### GetCompanyOk + +`func (o *User) GetCompanyOk() (*string, bool)` + +GetCompanyOk returns a tuple with the Company field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCompany + +`func (o *User) SetCompany(v string)` + +SetCompany sets Company field to given value. + +### HasCompany + +`func (o *User) HasCompany() bool` + +HasCompany returns a boolean if a field has been set. + +### GetComment + +`func (o *User) GetComment() string` + +GetComment returns the Comment field if non-nil, zero value otherwise. + +### GetCommentOk + +`func (o *User) GetCommentOk() (*string, bool)` + +GetCommentOk returns a tuple with the Comment field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetComment + +`func (o *User) SetComment(v string)` + +SetComment sets Comment field to given value. + +### HasComment + +`func (o *User) HasComment() bool` + +HasComment returns a boolean if a field has been set. + +### GetGroupId + +`func (o *User) GetGroupId() int32` + +GetGroupId returns the GroupId field if non-nil, zero value otherwise. + +### GetGroupIdOk + +`func (o *User) GetGroupIdOk() (*int32, bool)` + +GetGroupIdOk returns a tuple with the GroupId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetGroupId + +`func (o *User) SetGroupId(v int32)` + +SetGroupId sets GroupId field to given value. + +### HasGroupId + +`func (o *User) HasGroupId() bool` + +HasGroupId returns a boolean if a field has been set. + +### GetRoleIds + +`func (o *User) GetRoleIds() []int32` + +GetRoleIds returns the RoleIds field if non-nil, zero value otherwise. + +### GetRoleIdsOk + +`func (o *User) GetRoleIdsOk() (*[]int32, bool)` + +GetRoleIdsOk returns a tuple with the RoleIds field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRoleIds + +`func (o *User) SetRoleIds(v []int32)` + +SetRoleIds sets RoleIds field to given value. + +### HasRoleIds + +`func (o *User) HasRoleIds() bool` + +HasRoleIds returns a boolean if a field has been set. + +### GetPhone + +`func (o *User) GetPhone() string` + +GetPhone returns the Phone field if non-nil, zero value otherwise. + +### GetPhoneOk + +`func (o *User) GetPhoneOk() (*string, bool)` + +GetPhoneOk returns a tuple with the Phone field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPhone + +`func (o *User) SetPhone(v string)` + +SetPhone sets Phone field to given value. + +### HasPhone + +`func (o *User) HasPhone() bool` + +HasPhone returns a boolean if a field has been set. + +### GetState + +`func (o *User) GetState() int32` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *User) GetStateOk() (*int32, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *User) SetState(v int32)` + +SetState sets State field to given value. + +### HasState + +`func (o *User) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetStatus + +`func (o *User) GetStatus() int32` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *User) GetStatusOk() (*int32, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *User) SetStatus(v int32)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *User) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### GetDirectoryId + +`func (o *User) GetDirectoryId() int32` + +GetDirectoryId returns the DirectoryId field if non-nil, zero value otherwise. + +### GetDirectoryIdOk + +`func (o *User) GetDirectoryIdOk() (*int32, bool)` + +GetDirectoryIdOk returns a tuple with the DirectoryId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDirectoryId + +`func (o *User) SetDirectoryId(v int32)` + +SetDirectoryId sets DirectoryId field to given value. + +### HasDirectoryId + +`func (o *User) HasDirectoryId() bool` + +HasDirectoryId returns a boolean if a field has been set. + +### GetTrustedIdpId + +`func (o *User) GetTrustedIdpId() int32` + +GetTrustedIdpId returns the TrustedIdpId field if non-nil, zero value otherwise. + +### GetTrustedIdpIdOk + +`func (o *User) GetTrustedIdpIdOk() (*int32, bool)` + +GetTrustedIdpIdOk returns a tuple with the TrustedIdpId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTrustedIdpId + +`func (o *User) SetTrustedIdpId(v int32)` + +SetTrustedIdpId sets TrustedIdpId field to given value. + +### HasTrustedIdpId + +`func (o *User) HasTrustedIdpId() bool` + +HasTrustedIdpId returns a boolean if a field has been set. + +### GetManagerAdId + +`func (o *User) GetManagerAdId() string` + +GetManagerAdId returns the ManagerAdId field if non-nil, zero value otherwise. + +### GetManagerAdIdOk + +`func (o *User) GetManagerAdIdOk() (*string, bool)` + +GetManagerAdIdOk returns a tuple with the ManagerAdId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetManagerAdId + +`func (o *User) SetManagerAdId(v string)` + +SetManagerAdId sets ManagerAdId field to given value. + +### HasManagerAdId + +`func (o *User) HasManagerAdId() bool` + +HasManagerAdId returns a boolean if a field has been set. + +### GetManagerUserId + +`func (o *User) GetManagerUserId() string` + +GetManagerUserId returns the ManagerUserId field if non-nil, zero value otherwise. + +### GetManagerUserIdOk + +`func (o *User) GetManagerUserIdOk() (*string, bool)` + +GetManagerUserIdOk returns a tuple with the ManagerUserId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetManagerUserId + +`func (o *User) SetManagerUserId(v string)` + +SetManagerUserId sets ManagerUserId field to given value. + +### HasManagerUserId + +`func (o *User) HasManagerUserId() bool` + +HasManagerUserId returns a boolean if a field has been set. + +### GetSamaccountName + +`func (o *User) GetSamaccountName() string` + +GetSamaccountName returns the SamaccountName field if non-nil, zero value otherwise. + +### GetSamaccountNameOk + +`func (o *User) GetSamaccountNameOk() (*string, bool)` + +GetSamaccountNameOk returns a tuple with the SamaccountName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSamaccountName + +`func (o *User) SetSamaccountName(v string)` + +SetSamaccountName sets SamaccountName field to given value. + +### HasSamaccountName + +`func (o *User) HasSamaccountName() bool` + +HasSamaccountName returns a boolean if a field has been set. + +### GetMemberOf + +`func (o *User) GetMemberOf() string` + +GetMemberOf returns the MemberOf field if non-nil, zero value otherwise. + +### GetMemberOfOk + +`func (o *User) GetMemberOfOk() (*string, bool)` + +GetMemberOfOk returns a tuple with the MemberOf field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMemberOf + +`func (o *User) SetMemberOf(v string)` + +SetMemberOf sets MemberOf field to given value. + +### HasMemberOf + +`func (o *User) HasMemberOf() bool` + +HasMemberOf returns a boolean if a field has been set. + +### GetUserprincipalname + +`func (o *User) GetUserprincipalname() string` + +GetUserprincipalname returns the Userprincipalname field if non-nil, zero value otherwise. + +### GetUserprincipalnameOk + +`func (o *User) GetUserprincipalnameOk() (*string, bool)` + +GetUserprincipalnameOk returns a tuple with the Userprincipalname field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUserprincipalname + +`func (o *User) SetUserprincipalname(v string)` + +SetUserprincipalname sets Userprincipalname field to given value. + +### HasUserprincipalname + +`func (o *User) HasUserprincipalname() bool` + +HasUserprincipalname returns a boolean if a field has been set. + +### GetDistinguishedName + +`func (o *User) GetDistinguishedName() string` + +GetDistinguishedName returns the DistinguishedName field if non-nil, zero value otherwise. + +### GetDistinguishedNameOk + +`func (o *User) GetDistinguishedNameOk() (*string, bool)` + +GetDistinguishedNameOk returns a tuple with the DistinguishedName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDistinguishedName + +`func (o *User) SetDistinguishedName(v string)` + +SetDistinguishedName sets DistinguishedName field to given value. + +### HasDistinguishedName + +`func (o *User) HasDistinguishedName() bool` + +HasDistinguishedName returns a boolean if a field has been set. + +### GetExternalId + +`func (o *User) GetExternalId() string` + +GetExternalId returns the ExternalId field if non-nil, zero value otherwise. + +### GetExternalIdOk + +`func (o *User) GetExternalIdOk() (*string, bool)` + +GetExternalIdOk returns a tuple with the ExternalId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExternalId + +`func (o *User) SetExternalId(v string)` + +SetExternalId sets ExternalId field to given value. + +### HasExternalId + +`func (o *User) HasExternalId() bool` + +HasExternalId returns a boolean if a field has been set. + +### GetActivatedAt + +`func (o *User) GetActivatedAt() string` + +GetActivatedAt returns the ActivatedAt field if non-nil, zero value otherwise. + +### GetActivatedAtOk + +`func (o *User) GetActivatedAtOk() (*string, bool)` + +GetActivatedAtOk returns a tuple with the ActivatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActivatedAt + +`func (o *User) SetActivatedAt(v string)` + +SetActivatedAt sets ActivatedAt field to given value. + +### HasActivatedAt + +`func (o *User) HasActivatedAt() bool` + +HasActivatedAt returns a boolean if a field has been set. + +### GetLastLogin + +`func (o *User) GetLastLogin() string` + +GetLastLogin returns the LastLogin field if non-nil, zero value otherwise. + +### GetLastLoginOk + +`func (o *User) GetLastLoginOk() (*string, 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 *User) SetLastLogin(v string)` + +SetLastLogin sets LastLogin field to given value. + +### HasLastLogin + +`func (o *User) HasLastLogin() bool` + +HasLastLogin returns a boolean if a field has been set. + +### GetInvitationSentAt + +`func (o *User) GetInvitationSentAt() string` + +GetInvitationSentAt returns the InvitationSentAt field if non-nil, zero value otherwise. + +### GetInvitationSentAtOk + +`func (o *User) GetInvitationSentAtOk() (*string, bool)` + +GetInvitationSentAtOk returns a tuple with the InvitationSentAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetInvitationSentAt + +`func (o *User) SetInvitationSentAt(v string)` + +SetInvitationSentAt sets InvitationSentAt field to given value. + +### HasInvitationSentAt + +`func (o *User) HasInvitationSentAt() bool` + +HasInvitationSentAt returns a boolean if a field has been set. + +### GetUpdatedAt + +`func (o *User) GetUpdatedAt() string` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *User) GetUpdatedAtOk() (*string, bool)` + +GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedAt + +`func (o *User) SetUpdatedAt(v string)` + +SetUpdatedAt sets UpdatedAt field to given value. + +### HasUpdatedAt + +`func (o *User) HasUpdatedAt() bool` + +HasUpdatedAt returns a boolean if a field has been set. + +### GetPreferredLocaleCode + +`func (o *User) GetPreferredLocaleCode() string` + +GetPreferredLocaleCode returns the PreferredLocaleCode field if non-nil, zero value otherwise. + +### GetPreferredLocaleCodeOk + +`func (o *User) GetPreferredLocaleCodeOk() (*string, bool)` + +GetPreferredLocaleCodeOk returns a tuple with the PreferredLocaleCode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPreferredLocaleCode + +`func (o *User) SetPreferredLocaleCode(v string)` + +SetPreferredLocaleCode sets PreferredLocaleCode field to given value. + +### HasPreferredLocaleCode + +`func (o *User) HasPreferredLocaleCode() bool` + +HasPreferredLocaleCode returns a boolean if a field has been set. + +### GetCreatedAt + +`func (o *User) GetCreatedAt() string` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *User) GetCreatedAtOk() (*string, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *User) SetCreatedAt(v string)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *User) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### GetCustomAttributes + +`func (o *User) GetCustomAttributes() map[string]interface{}` + +GetCustomAttributes returns the CustomAttributes field if non-nil, zero value otherwise. + +### GetCustomAttributesOk + +`func (o *User) GetCustomAttributesOk() (*map[string]interface{}, bool)` + +GetCustomAttributesOk returns a tuple with the CustomAttributes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustomAttributes + +`func (o *User) SetCustomAttributes(v map[string]interface{})` + +SetCustomAttributes sets CustomAttributes field to given value. + +### HasCustomAttributes + +`func (o *User) HasCustomAttributes() bool` + +HasCustomAttributes returns a boolean if a field has been set. + +### GetInvalidLoginAttempts + +`func (o *User) GetInvalidLoginAttempts() int32` + +GetInvalidLoginAttempts returns the InvalidLoginAttempts field if non-nil, zero value otherwise. + +### GetInvalidLoginAttemptsOk + +`func (o *User) GetInvalidLoginAttemptsOk() (*int32, bool)` + +GetInvalidLoginAttemptsOk returns a tuple with the InvalidLoginAttempts field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetInvalidLoginAttempts + +`func (o *User) SetInvalidLoginAttempts(v int32)` + +SetInvalidLoginAttempts sets InvalidLoginAttempts field to given value. + +### HasInvalidLoginAttempts + +`func (o *User) HasInvalidLoginAttempts() bool` + +HasInvalidLoginAttempts returns a boolean if a field has been set. + +### GetLockedUntil + +`func (o *User) GetLockedUntil() string` + +GetLockedUntil returns the LockedUntil field if non-nil, zero value otherwise. + +### GetLockedUntilOk + +`func (o *User) GetLockedUntilOk() (*string, bool)` + +GetLockedUntilOk returns a tuple with the LockedUntil field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLockedUntil + +`func (o *User) SetLockedUntil(v string)` + +SetLockedUntil sets LockedUntil field to given value. + +### HasLockedUntil + +`func (o *User) HasLockedUntil() bool` + +HasLockedUntil returns a boolean if a field has been set. + +### GetPasswordChangedAt + +`func (o *User) GetPasswordChangedAt() string` + +GetPasswordChangedAt returns the PasswordChangedAt field if non-nil, zero value otherwise. + +### GetPasswordChangedAtOk + +`func (o *User) GetPasswordChangedAtOk() (*string, bool)` + +GetPasswordChangedAtOk returns a tuple with the PasswordChangedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPasswordChangedAt + +`func (o *User) SetPasswordChangedAt(v string)` + +SetPasswordChangedAt sets PasswordChangedAt field to given value. + +### HasPasswordChangedAt + +`func (o *User) HasPasswordChangedAt() bool` + +HasPasswordChangedAt returns a boolean if a field has been set. + +### GetPassword + +`func (o *User) GetPassword() string` + +GetPassword returns the Password field if non-nil, zero value otherwise. + +### GetPasswordOk + +`func (o *User) GetPasswordOk() (*string, bool)` + +GetPasswordOk returns a tuple with the Password field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPassword + +`func (o *User) SetPassword(v string)` + +SetPassword sets Password field to given value. + +### HasPassword + +`func (o *User) HasPassword() bool` + +HasPassword returns a boolean if a field has been set. + +### GetPasswordConfirmation + +`func (o *User) GetPasswordConfirmation() string` + +GetPasswordConfirmation returns the PasswordConfirmation field if non-nil, zero value otherwise. + +### GetPasswordConfirmationOk + +`func (o *User) GetPasswordConfirmationOk() (*string, bool)` + +GetPasswordConfirmationOk returns a tuple with the PasswordConfirmation field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPasswordConfirmation + +`func (o *User) SetPasswordConfirmation(v string)` + +SetPasswordConfirmation sets PasswordConfirmation field to given value. + +### HasPasswordConfirmation + +`func (o *User) HasPasswordConfirmation() bool` + +HasPasswordConfirmation returns a boolean if a field has been set. + +### GetPasswordAlgorithm + +`func (o *User) GetPasswordAlgorithm() string` + +GetPasswordAlgorithm returns the PasswordAlgorithm field if non-nil, zero value otherwise. + +### GetPasswordAlgorithmOk + +`func (o *User) GetPasswordAlgorithmOk() (*string, bool)` + +GetPasswordAlgorithmOk returns a tuple with the PasswordAlgorithm field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPasswordAlgorithm + +`func (o *User) SetPasswordAlgorithm(v string)` + +SetPasswordAlgorithm sets PasswordAlgorithm field to given value. + +### HasPasswordAlgorithm + +`func (o *User) HasPasswordAlgorithm() bool` + +HasPasswordAlgorithm returns a boolean if a field has been set. + +### GetSalt + +`func (o *User) GetSalt() string` + +GetSalt returns the Salt field if non-nil, zero value otherwise. + +### GetSaltOk + +`func (o *User) GetSaltOk() (*string, bool)` + +GetSaltOk returns a tuple with the Salt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSalt + +`func (o *User) SetSalt(v string)` + +SetSalt sets Salt field to given value. + +### HasSalt + +`func (o *User) HasSalt() bool` + +HasSalt 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/VerifyEnrollmentRequest.md b/docs/VerifyEnrollmentRequest.md new file mode 100644 index 0000000..4ffae4a --- /dev/null +++ b/docs/VerifyEnrollmentRequest.md @@ -0,0 +1,56 @@ +# VerifyEnrollmentRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Otp** | Pointer to **int32** | | [optional] + +## Methods + +### NewVerifyEnrollmentRequest + +`func NewVerifyEnrollmentRequest() *VerifyEnrollmentRequest` + +NewVerifyEnrollmentRequest instantiates a new VerifyEnrollmentRequest 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 + +### NewVerifyEnrollmentRequestWithDefaults + +`func NewVerifyEnrollmentRequestWithDefaults() *VerifyEnrollmentRequest` + +NewVerifyEnrollmentRequestWithDefaults instantiates a new VerifyEnrollmentRequest 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 + +### GetOtp + +`func (o *VerifyEnrollmentRequest) GetOtp() int32` + +GetOtp returns the Otp field if non-nil, zero value otherwise. + +### GetOtpOk + +`func (o *VerifyEnrollmentRequest) GetOtpOk() (*int32, bool)` + +GetOtpOk returns a tuple with the Otp field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOtp + +`func (o *VerifyEnrollmentRequest) SetOtp(v int32)` + +SetOtp sets Otp field to given value. + +### HasOtp + +`func (o *VerifyEnrollmentRequest) HasOtp() bool` + +HasOtp 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/VerifyFactorRequest.md b/docs/VerifyFactorRequest.md new file mode 100644 index 0000000..9d307d7 --- /dev/null +++ b/docs/VerifyFactorRequest.md @@ -0,0 +1,82 @@ +# VerifyFactorRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Otp** | Pointer to **string** | OTP code provided by the device or SMS message sent to user. | [optional] +**DeviceId** | Pointer to **int32** | ID of the specified device which has been registerd for the given user. | [optional] + +## Methods + +### NewVerifyFactorRequest + +`func NewVerifyFactorRequest() *VerifyFactorRequest` + +NewVerifyFactorRequest instantiates a new VerifyFactorRequest 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 + +### NewVerifyFactorRequestWithDefaults + +`func NewVerifyFactorRequestWithDefaults() *VerifyFactorRequest` + +NewVerifyFactorRequestWithDefaults instantiates a new VerifyFactorRequest 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 + +### GetOtp + +`func (o *VerifyFactorRequest) GetOtp() string` + +GetOtp returns the Otp field if non-nil, zero value otherwise. + +### GetOtpOk + +`func (o *VerifyFactorRequest) GetOtpOk() (*string, bool)` + +GetOtpOk returns a tuple with the Otp field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOtp + +`func (o *VerifyFactorRequest) SetOtp(v string)` + +SetOtp sets Otp field to given value. + +### HasOtp + +`func (o *VerifyFactorRequest) HasOtp() bool` + +HasOtp returns a boolean if a field has been set. + +### GetDeviceId + +`func (o *VerifyFactorRequest) GetDeviceId() int32` + +GetDeviceId returns the DeviceId field if non-nil, zero value otherwise. + +### GetDeviceIdOk + +`func (o *VerifyFactorRequest) GetDeviceIdOk() (*int32, bool)` + +GetDeviceIdOk returns a tuple with the DeviceId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDeviceId + +`func (o *VerifyFactorRequest) SetDeviceId(v int32)` + +SetDeviceId sets DeviceId field to given value. + +### HasDeviceId + +`func (o *VerifyFactorRequest) HasDeviceId() bool` + +HasDeviceId 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/VerifyFactorSaml200Response.md b/docs/VerifyFactorSaml200Response.md new file mode 100644 index 0000000..cc8b4c4 --- /dev/null +++ b/docs/VerifyFactorSaml200Response.md @@ -0,0 +1,82 @@ +# VerifyFactorSaml200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | Pointer to **string** | Provides the SAML assertion. | [optional] +**Message** | Pointer to **string** | Plain text description describing the outcome of the response. | [optional] + +## Methods + +### NewVerifyFactorSaml200Response + +`func NewVerifyFactorSaml200Response() *VerifyFactorSaml200Response` + +NewVerifyFactorSaml200Response instantiates a new VerifyFactorSaml200Response 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 + +### NewVerifyFactorSaml200ResponseWithDefaults + +`func NewVerifyFactorSaml200ResponseWithDefaults() *VerifyFactorSaml200Response` + +NewVerifyFactorSaml200ResponseWithDefaults instantiates a new VerifyFactorSaml200Response 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 + +### GetData + +`func (o *VerifyFactorSaml200Response) GetData() string` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *VerifyFactorSaml200Response) GetDataOk() (*string, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *VerifyFactorSaml200Response) SetData(v string)` + +SetData sets Data field to given value. + +### HasData + +`func (o *VerifyFactorSaml200Response) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetMessage + +`func (o *VerifyFactorSaml200Response) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *VerifyFactorSaml200Response) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *VerifyFactorSaml200Response) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *VerifyFactorSaml200Response) HasMessage() bool` + +HasMessage 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/VerifyFactorSamlRequest.md b/docs/VerifyFactorSamlRequest.md new file mode 100644 index 0000000..65c38d4 --- /dev/null +++ b/docs/VerifyFactorSamlRequest.md @@ -0,0 +1,145 @@ +# VerifyFactorSamlRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AppId** | **string** | App ID of the app for which you want to generate a SAML token. This is the app ID in OneLogin. | +**DeviceId** | **string** | Provide the MFA device_id you are submitting for verification. The device_id is supplied by the Generate SAML Assertion API. | +**StateToken** | **string** | state_token associated with the MFA device_id you are submitting. The state_token is supplied by the Generate SAML Assertion API. | +**OtpToken** | Pointer to **string** | Provide the OTP value for the MFA factor you are submitting for verification. | [optional] +**DoNotNotify** | Pointer to **bool** | When verifying MFA via Protect Push, set this to true to stop additional push notifications being sent to the OneLogin Protect device. | [optional] + +## Methods + +### NewVerifyFactorSamlRequest + +`func NewVerifyFactorSamlRequest(appId string, deviceId string, stateToken string, ) *VerifyFactorSamlRequest` + +NewVerifyFactorSamlRequest instantiates a new VerifyFactorSamlRequest 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 + +### NewVerifyFactorSamlRequestWithDefaults + +`func NewVerifyFactorSamlRequestWithDefaults() *VerifyFactorSamlRequest` + +NewVerifyFactorSamlRequestWithDefaults instantiates a new VerifyFactorSamlRequest 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 + +### GetAppId + +`func (o *VerifyFactorSamlRequest) GetAppId() string` + +GetAppId returns the AppId field if non-nil, zero value otherwise. + +### GetAppIdOk + +`func (o *VerifyFactorSamlRequest) GetAppIdOk() (*string, bool)` + +GetAppIdOk returns a tuple with the AppId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAppId + +`func (o *VerifyFactorSamlRequest) SetAppId(v string)` + +SetAppId sets AppId field to given value. + + +### GetDeviceId + +`func (o *VerifyFactorSamlRequest) GetDeviceId() string` + +GetDeviceId returns the DeviceId field if non-nil, zero value otherwise. + +### GetDeviceIdOk + +`func (o *VerifyFactorSamlRequest) GetDeviceIdOk() (*string, bool)` + +GetDeviceIdOk returns a tuple with the DeviceId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDeviceId + +`func (o *VerifyFactorSamlRequest) SetDeviceId(v string)` + +SetDeviceId sets DeviceId field to given value. + + +### GetStateToken + +`func (o *VerifyFactorSamlRequest) GetStateToken() string` + +GetStateToken returns the StateToken field if non-nil, zero value otherwise. + +### GetStateTokenOk + +`func (o *VerifyFactorSamlRequest) GetStateTokenOk() (*string, bool)` + +GetStateTokenOk returns a tuple with the StateToken field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStateToken + +`func (o *VerifyFactorSamlRequest) SetStateToken(v string)` + +SetStateToken sets StateToken field to given value. + + +### GetOtpToken + +`func (o *VerifyFactorSamlRequest) GetOtpToken() string` + +GetOtpToken returns the OtpToken field if non-nil, zero value otherwise. + +### GetOtpTokenOk + +`func (o *VerifyFactorSamlRequest) GetOtpTokenOk() (*string, bool)` + +GetOtpTokenOk returns a tuple with the OtpToken field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOtpToken + +`func (o *VerifyFactorSamlRequest) SetOtpToken(v string)` + +SetOtpToken sets OtpToken field to given value. + +### HasOtpToken + +`func (o *VerifyFactorSamlRequest) HasOtpToken() bool` + +HasOtpToken returns a boolean if a field has been set. + +### GetDoNotNotify + +`func (o *VerifyFactorSamlRequest) GetDoNotNotify() bool` + +GetDoNotNotify returns the DoNotNotify field if non-nil, zero value otherwise. + +### GetDoNotNotifyOk + +`func (o *VerifyFactorSamlRequest) GetDoNotNotifyOk() (*bool, bool)` + +GetDoNotNotifyOk returns a tuple with the DoNotNotify field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDoNotNotify + +`func (o *VerifyFactorSamlRequest) SetDoNotNotify(v bool)` + +SetDoNotNotify sets DoNotNotify field to given value. + +### HasDoNotNotify + +`func (o *VerifyFactorSamlRequest) HasDoNotNotify() bool` + +HasDoNotNotify 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/VerifyFactorVoice200ResponseInner.md b/docs/VerifyFactorVoice200ResponseInner.md new file mode 100644 index 0000000..5d6f62a --- /dev/null +++ b/docs/VerifyFactorVoice200ResponseInner.md @@ -0,0 +1,108 @@ +# VerifyFactorVoice200ResponseInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **string** | | [optional] +**Status** | Pointer to **string** | | [optional] +**DeviceId** | Pointer to **string** | | [optional] + +## Methods + +### NewVerifyFactorVoice200ResponseInner + +`func NewVerifyFactorVoice200ResponseInner() *VerifyFactorVoice200ResponseInner` + +NewVerifyFactorVoice200ResponseInner instantiates a new VerifyFactorVoice200ResponseInner 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 + +### NewVerifyFactorVoice200ResponseInnerWithDefaults + +`func NewVerifyFactorVoice200ResponseInnerWithDefaults() *VerifyFactorVoice200ResponseInner` + +NewVerifyFactorVoice200ResponseInnerWithDefaults instantiates a new VerifyFactorVoice200ResponseInner 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 + +### GetId + +`func (o *VerifyFactorVoice200ResponseInner) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *VerifyFactorVoice200ResponseInner) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *VerifyFactorVoice200ResponseInner) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *VerifyFactorVoice200ResponseInner) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetStatus + +`func (o *VerifyFactorVoice200ResponseInner) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *VerifyFactorVoice200ResponseInner) GetStatusOk() (*string, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *VerifyFactorVoice200ResponseInner) SetStatus(v string)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *VerifyFactorVoice200ResponseInner) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### GetDeviceId + +`func (o *VerifyFactorVoice200ResponseInner) GetDeviceId() string` + +GetDeviceId returns the DeviceId field if non-nil, zero value otherwise. + +### GetDeviceIdOk + +`func (o *VerifyFactorVoice200ResponseInner) GetDeviceIdOk() (*string, bool)` + +GetDeviceIdOk returns a tuple with the DeviceId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDeviceId + +`func (o *VerifyFactorVoice200ResponseInner) SetDeviceId(v string)` + +SetDeviceId sets DeviceId field to given value. + +### HasDeviceId + +`func (o *VerifyFactorVoice200ResponseInner) HasDeviceId() bool` + +HasDeviceId 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/git_push.sh b/git_push.sh new file mode 100644 index 0000000..f53a75d --- /dev/null +++ b/git_push.sh @@ -0,0 +1,57 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' diff --git a/go.mod b/go.mod index 7e7e29d..ead3260 100644 --- a/go.mod +++ b/go.mod @@ -1,13 +1,7 @@ -module github.com/onelogin/onelogin-go-sdk +module github.com/GIT_USER_ID/GIT_REPO_ID -go 1.12 +go 1.13 require ( - github.com/fatih/color v1.9.0 // indirect - github.com/fogleman/gg v1.3.0 // indirect - github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 // indirect - github.com/jpoles1/gopherbadger v2.4.0+incompatible // indirect - github.com/securego/gosec/v2 v2.3.0 // indirect - github.com/stretchr/testify v1.4.0 - golang.org/x/image v0.0.0-20200430140353-33d19683fad8 // indirect + golang.org/x/oauth2 v0.0.0-20210323180902-22b0adad7558 ) diff --git a/go.sum b/go.sum index 50bf988..734252e 100644 --- a/go.sum +++ b/go.sum @@ -1,78 +1,13 @@ -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/fatih/color v1.9.0 h1:8xPHl4/q1VyqGIPif1F+1V3Y3lSmrq01EabUW3CoW5s= -github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= -github.com/fogleman/gg v1.3.0 h1:/7zJX8F6AaYQc57WQCyN9cAIz+4bCJGO9B+dyW29am8= -github.com/fogleman/gg v1.3.0/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= -github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 h1:DACJavvAHhabrF08vX0COfcOBJRhZ8lUbR+ZWIs0Y5g= -github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/gookit/color v1.2.4/go.mod h1:AhIE+pS6D4Ql0SQWbBeXPHw7gY0/sjHoA4s/n1KB7xg= -github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/jpoles1/gopherbadger v2.2.0+incompatible h1:2aysGaPeOKyAMvpDRy8MwQoOysvcKLOe/VNq9Cw8QsA= -github.com/jpoles1/gopherbadger v2.2.0+incompatible/go.mod h1:DVwxsf5adYLiDOj955t/ejfCRWjKA5tme6Vejb72Ro0= -github.com/jpoles1/gopherbadger v2.4.0+incompatible h1:UHNcdQnmeUo8kAIAZfz55Dkev3zM/Jj2SMgeEwkMO8A= -github.com/jpoles1/gopherbadger v2.4.0+incompatible/go.mod h1:DVwxsf5adYLiDOj955t/ejfCRWjKA5tme6Vejb72Ro0= -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/mattn/go-colorable v0.1.4 h1:snbPLB8fVfU9iwbbo30TPtbLRzwWu6aJS6Xh4eaaviA= -github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.11 h1:FxPOTFNqGkuDUGi3H/qkUbQO4ZiBa2brKq5r0l8TGeM= -github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= -github.com/mozilla/tls-observatory v0.0.0-20200317151703-4fa42e1c2dee/go.mod h1:SrKMQvPiws7F7iqYp8/TX+IhxCYhzr6N/1yb8cwHsGk= -github.com/nbutton23/zxcvbn-go v0.0.0-20180912185939-ae427f1e4c1d/go.mod h1:o96djdrsSGy3AWPyBgZMAGfxZNfgntdJG+11KU4QvbU= -github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.12.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0HfGg= -github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= -github.com/onsi/gomega v1.9.0/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/securego/gosec v0.0.0-20200401082031-e946c8c39989 h1:rq2/kILQnPtq5oL4+IAjgVOjh5e2yj2aaCYi7squEvI= -github.com/securego/gosec/v2 v2.3.0 h1:y/9mCF2WPDbSDpL3QDWZD3HHGrSYw0QSHnCqTfs4JPE= -github.com/securego/gosec/v2 v2.3.0/go.mod h1:UzeVyUXbxukhLeHKV3VVqo7HdoQR9MrRfFmZYotn8ME= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/image v0.0.0-20200430140353-33d19683fad8 h1:6WW6V3x1P/jokJBpRQYUJnMHRP6isStQwCozxnU7XQw= -golang.org/x/image v0.0.0-20200430140353-33d19683fad8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/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/sync v0.0.0-20180314180146-1d60e4601c6f/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/sys v0.0.0-20180909124046-d0be0721c37e/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-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e h1:N7DeIrjYszNmSW409R3frPPwglRwMkXSBzwVbkOjLLA= -golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200331202046-9d5940d49312 h1:2PHG+Ia3gK1K2kjxZnSylizb//eyaMG8gDFbOG7wLV8= -golang.org/x/tools v0.0.0-20200331202046-9d5940d49312/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -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= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= -gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= diff --git a/internal/customerrors/errors.go b/internal/customerrors/errors.go deleted file mode 100644 index e7dfebc..0000000 --- a/internal/customerrors/errors.go +++ /dev/null @@ -1,25 +0,0 @@ -package customerrors - -import ( - "errors" - "strings" -) - -// Errors in services -var ( - ErrValueMissing = errors.New("A required parameter was not given") -) - -// StackErrors amalgamates a list of error messages into a single comma-separated error message. -func StackErrors(errs []error) error { - if len(errs) == 0 { - return nil - } - stackedErrors := make([]string, len(errs)) - for i, e := range errs { - if e != nil { - stackedErrors[i] = e.Error() - } - } - return errors.New(strings.Join(stackedErrors, ", ")) -} diff --git a/internal/customerrors/errors_test.go b/internal/customerrors/errors_test.go deleted file mode 100644 index 85b9e37..0000000 --- a/internal/customerrors/errors_test.go +++ /dev/null @@ -1,39 +0,0 @@ -package customerrors - -import ( - "errors" - "github.com/stretchr/testify/assert" - "testing" -) - -func TestStackedErrors(t *testing.T) { - errMsgs := []error{errors.New("Error 1"), errors.New("Error 2")} - - tests := map[string]struct { - inputErr []error - expectedMsg string - }{ - "error passed in": { - inputErr: errMsgs, - expectedMsg: "Error 1, Error 2", - }, - "error not passed in": { - inputErr: nil, - expectedMsg: "", - }, - } - - for testName, test := range tests { - t.Run(testName, func(t *testing.T) { - result := StackErrors(test.inputErr) - if test.inputErr != nil { - assert.NotNil(t, result) - assert.Equal(t, test.expectedMsg, result.Error()) - } else if test.inputErr == nil { - assert.Nil(t, result) - } else { - assert.Fail(t, "Test should not reach here") - } - }) - } -} diff --git a/internal/customerrors/oneloginerror.go b/internal/customerrors/oneloginerror.go deleted file mode 100644 index 06e2e71..0000000 --- a/internal/customerrors/oneloginerror.go +++ /dev/null @@ -1,30 +0,0 @@ -package customerrors - -import "fmt" - -// OneloginError used for any errors. -type OneloginError struct { - context string - err error -} - -// OneloginErrorWrapper creates a new OneloginError and returns, if an error is passed in, -// the pointer to the error struct. -func OneloginErrorWrapper(context string, err error) error { - if err == nil { - return nil - } - - return &OneloginError{ - context, - err, - } -} - -func (olError *OneloginError) Error() string { - errMsg := "" - if olError.err != nil { - errMsg = olError.err.Error() - } - return fmt.Sprintf("error: context: [%s], error_message: [%s]", olError.context, errMsg) -} diff --git a/internal/customerrors/oneloginerror_test.go b/internal/customerrors/oneloginerror_test.go deleted file mode 100644 index 2a9f9fc..0000000 --- a/internal/customerrors/oneloginerror_test.go +++ /dev/null @@ -1,47 +0,0 @@ -package customerrors - -import ( - "errors" - "fmt" - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestOneLoginErrorWrapper(t *testing.T) { - errMsg := "Test Error" - context := "Test" - - tests := map[string]struct { - context string - inputErr error - expectedMsg string - }{ - "error passed in": { - context: context, - inputErr: errors.New(errMsg), - expectedMsg: fmt.Sprintf("error: context: [%s], error_message: [%s]", context, errMsg), - }, - "error not passed in": { - context: context, - inputErr: nil, - expectedMsg: "", - }, - } - - for testName, test := range tests { - t.Run(testName, func(t *testing.T) { - result := OneloginErrorWrapper(test.context, test.inputErr) - - if test.inputErr != nil { - assert.NotNil(t, result) - assert.Equal(t, test.expectedMsg, result.Error()) - } else if test.inputErr == nil { - assert.Nil(t, result) - } else { - assert.Fail(t, "Test should not reach here") - } - }) - } - -} diff --git a/internal/customerrors/requesterror.go b/internal/customerrors/requesterror.go deleted file mode 100644 index becd81c..0000000 --- a/internal/customerrors/requesterror.go +++ /dev/null @@ -1,52 +0,0 @@ -package customerrors - -import ( - "errors" - "fmt" - "net/http" -) - -// RequestError used for http request errors. -type RequestError struct { - context string - err error - statusCode int -} - -// ReqErrorWrapper creates a new Request error and returns, -// the pointer to the request error. -func ReqErrorWrapper(resp *http.Response, context string, err error) error { - code := 0 - errToUse := err - - if resp != nil { - code = resp.StatusCode - } - - if errToUse == nil && code >= http.StatusBadRequest { - errToUse = errors.New(http.StatusText(code)) - } - - if errToUse == nil { - return nil - } - - return &RequestError{ - context, - errToUse, - code, - } -} - -func (errReq *RequestError) Error() string { - errMsg := "" - if errReq.err != nil { - errMsg = errReq.err.Error() - } - - if errReq.statusCode == 0 { - return fmt.Sprintf("request error: context: %s, error_message: %s", errReq.context, errMsg) - } - - return fmt.Sprintf("request error: context: %s, status_code: [%d], error_message: %s", errReq.context, errReq.statusCode, errMsg) -} diff --git a/internal/customerrors/requesterror_test.go b/internal/customerrors/requesterror_test.go deleted file mode 100644 index d8de869..0000000 --- a/internal/customerrors/requesterror_test.go +++ /dev/null @@ -1,53 +0,0 @@ -package customerrors - -import ( - "errors" - "fmt" - "net/http" - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestReqErrorWrapper(t *testing.T) { - context := "test" - testErrMsg := "Test error" - - tests := map[string]struct { - responseHttp *http.Response - err error - context string - expectedErrMsg string - }{ - "http response not nil and status code >= 400 and no error passed in": { - responseHttp: &http.Response{StatusCode: http.StatusBadRequest}, - err: nil, - context: context, - expectedErrMsg: fmt.Sprintf("request error: context: %s, status_code: [%d], error_message: %s", context, http.StatusBadRequest, http.StatusText(http.StatusBadRequest)), - }, - "err but no http response": { - responseHttp: nil, - err: errors.New(testErrMsg), - context: context, - expectedErrMsg: fmt.Sprintf("request error: context: %s, error_message: %s", context, testErrMsg), - }, - "no http response and no error passed in": { - responseHttp: nil, - err: nil, - context: context, - expectedErrMsg: "", - }, - } - - for name, test := range tests { - t.Run(name, func(t *testing.T) { - resultErr := ReqErrorWrapper(test.responseHttp, test.context, test.err) - if test.responseHttp == nil && test.err == nil { - assert.Nil(t, resultErr) - } else { - assert.NotNil(t, resultErr) - assert.Equal(t, test.expectedErrMsg, resultErr.Error()) - } - }) - } -} diff --git a/internal/test/test_repository.go b/internal/test/test_repository.go deleted file mode 100644 index 46543f4..0000000 --- a/internal/test/test_repository.go +++ /dev/null @@ -1,65 +0,0 @@ -package test - -import ( - "errors" -) - -type MockRepository struct { - ReadFunc func(r interface{}) ([][]byte, error) - ReReadFunc []func(r interface{}) ([][]byte, error) - CreateFunc func(r interface{}) ([]byte, error) - SubCreateFunc []func(r interface{}) ([]byte, error) - UpdateFunc func(r interface{}) ([]byte, error) - DestroyFunc func(r interface{}) ([]byte, error) - ReReads int - SubCreates int -} - -// Read will invoke a repository's ReadFunc. The ReadFunc is meant to describe the -// expected return value from the repository, and gives the opportunity to define the -// response based on request parameters such as the request URL. A ReReadFunc is allowed -// because RESTful reads are idempotent, however, you may want to mock a subsequent read, -// following an error recovery scenario where some updates were saved, but others were abandoned. -func (mr *MockRepository) Read(r interface{}) ([][]byte, error) { - if mr.ReReads > 0 && len(mr.ReReadFunc) > 0 { - mr.ReReads++ - return mr.ReReadFunc[mr.ReReads-2](r) - } - if mr.ReadFunc != nil { - mr.ReReads++ - return mr.ReadFunc(r) - } - return nil, errors.New("error") -} - -// Create invokes the repository's CreateFunc giving the opportunity to specify the return -// value for a repository's Create function -func (mr *MockRepository) Create(r interface{}) ([]byte, error) { - if mr.SubCreates > 0 && len(mr.SubCreateFunc) > 0 { - mr.SubCreates++ - return mr.SubCreateFunc[mr.SubCreates-2](r) - } - if mr.CreateFunc != nil { - mr.SubCreates++ - return mr.CreateFunc(r) - } - return nil, errors.New("error") -} - -// Update invokes the repository's UpdateFunc giving the opportunity to specify the return -// value for a repository's Update function -func (mr *MockRepository) Update(r interface{}) ([]byte, error) { - if mr.UpdateFunc != nil { - return mr.UpdateFunc(r) - } - return nil, errors.New("error") -} - -// Destroy invokes the repository's DestroyFunc giving the opportunity to specify the return -// value for a repository's Destroy function -func (mr *MockRepository) Destroy(r interface{}) ([]byte, error) { - if mr.DestroyFunc != nil { - return mr.DestroyFunc(r) - } - return nil, errors.New("error") -} diff --git a/model_action.go b/model_action.go new file mode 100644 index 0000000..b6a1534 --- /dev/null +++ b/model_action.go @@ -0,0 +1,264 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// Action struct for Action +type Action struct { + // The action to apply + Action *string `json:"action,omitempty"` + // Only applicable to provisioned and set_* actions. Items in the array will be a plain text string or valid value for the selected action. + Value []string `json:"value,omitempty"` + // A regular expression to extract a value. Applies to provisionable, multi-selects, and string actions. + Expression *string `json:"expression,omitempty"` + // A hash containing scriptlet code that returns a value. + Scriplet *string `json:"scriplet,omitempty"` + // A template to construct a value. Applies to default, string, and list actions. + Macro *string `json:"macro,omitempty"` +} + +// NewAction instantiates a new Action 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 NewAction() *Action { + this := Action{} + return &this +} + +// NewActionWithDefaults instantiates a new Action 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 NewActionWithDefaults() *Action { + this := Action{} + return &this +} + +// GetAction returns the Action field value if set, zero value otherwise. +func (o *Action) GetAction() string { + if o == nil || o.Action == nil { + var ret string + return ret + } + 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. +func (o *Action) GetActionOk() (*string, bool) { + if o == nil || o.Action == nil { + return nil, false + } + return o.Action, true +} + +// HasAction returns a boolean if a field has been set. +func (o *Action) HasAction() bool { + if o != nil && o.Action != nil { + return true + } + + return false +} + +// SetAction gets a reference to the given string and assigns it to the Action field. +func (o *Action) SetAction(v string) { + o.Action = &v +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *Action) GetValue() []string { + if o == nil || o.Value == nil { + var ret []string + return ret + } + return o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Action) GetValueOk() ([]string, bool) { + if o == nil || o.Value == nil { + return nil, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *Action) HasValue() bool { + if o != nil && o.Value != nil { + return true + } + + return false +} + +// SetValue gets a reference to the given []string and assigns it to the Value field. +func (o *Action) SetValue(v []string) { + o.Value = v +} + +// GetExpression returns the Expression field value if set, zero value otherwise. +func (o *Action) GetExpression() string { + if o == nil || o.Expression == nil { + var ret string + return ret + } + return *o.Expression +} + +// 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 *Action) GetExpressionOk() (*string, bool) { + if o == nil || o.Expression == nil { + return nil, false + } + return o.Expression, true +} + +// HasExpression returns a boolean if a field has been set. +func (o *Action) HasExpression() bool { + if o != nil && o.Expression != nil { + return true + } + + return false +} + +// SetExpression gets a reference to the given string and assigns it to the Expression field. +func (o *Action) SetExpression(v string) { + o.Expression = &v +} + +// GetScriplet returns the Scriplet field value if set, zero value otherwise. +func (o *Action) GetScriplet() string { + if o == nil || o.Scriplet == nil { + var ret string + return ret + } + return *o.Scriplet +} + +// GetScripletOk returns a tuple with the Scriplet field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Action) GetScripletOk() (*string, bool) { + if o == nil || o.Scriplet == nil { + return nil, false + } + return o.Scriplet, true +} + +// HasScriplet returns a boolean if a field has been set. +func (o *Action) HasScriplet() bool { + if o != nil && o.Scriplet != nil { + return true + } + + return false +} + +// SetScriplet gets a reference to the given string and assigns it to the Scriplet field. +func (o *Action) SetScriplet(v string) { + o.Scriplet = &v +} + +// GetMacro returns the Macro field value if set, zero value otherwise. +func (o *Action) GetMacro() string { + if o == nil || o.Macro == nil { + var ret string + return ret + } + return *o.Macro +} + +// GetMacroOk returns a tuple with the Macro field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Action) GetMacroOk() (*string, bool) { + if o == nil || o.Macro == nil { + return nil, false + } + return o.Macro, true +} + +// HasMacro returns a boolean if a field has been set. +func (o *Action) HasMacro() bool { + if o != nil && o.Macro != nil { + return true + } + + return false +} + +// SetMacro gets a reference to the given string and assigns it to the Macro field. +func (o *Action) SetMacro(v string) { + o.Macro = &v +} + +func (o Action) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Action != nil { + toSerialize["action"] = o.Action + } + if o.Value != nil { + toSerialize["value"] = o.Value + } + if o.Expression != nil { + toSerialize["expression"] = o.Expression + } + if o.Scriplet != nil { + toSerialize["scriplet"] = o.Scriplet + } + if o.Macro != nil { + toSerialize["macro"] = o.Macro + } + return json.Marshal(toSerialize) +} + +type NullableAction struct { + value *Action + isSet bool +} + +func (v NullableAction) Get() *Action { + return v.value +} + +func (v *NullableAction) Set(val *Action) { + v.value = val + v.isSet = true +} + +func (v NullableAction) IsSet() bool { + return v.isSet +} + +func (v *NullableAction) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAction(val *Action) *NullableAction { + return &NullableAction{value: val, isSet: true} +} + +func (v NullableAction) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAction) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_activate_factor_request.go b/model_activate_factor_request.go new file mode 100644 index 0000000..5827606 --- /dev/null +++ b/model_activate_factor_request.go @@ -0,0 +1,227 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// ActivateFactorRequest struct for ActivateFactorRequest +type ActivateFactorRequest struct { + // Required. Specifies the factor to be verified. + DeviceId *int32 `json:"device_id,omitempty"` + // Optional. Sets the window of time in seconds that the factor must be verified within. + ExpiresIn *int32 `json:"expires_in,omitempty"` + // Optional. Only applies to Email MagicLink factor. + RedirectTo *string `json:"redirect_to,omitempty"` + // Optional. Only applies to SMS factor. A message template that will be sent via SMS. + CustomMessage *string `json:"custom_message,omitempty"` +} + +// NewActivateFactorRequest instantiates a new ActivateFactorRequest 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 NewActivateFactorRequest() *ActivateFactorRequest { + this := ActivateFactorRequest{} + return &this +} + +// NewActivateFactorRequestWithDefaults instantiates a new ActivateFactorRequest 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 NewActivateFactorRequestWithDefaults() *ActivateFactorRequest { + this := ActivateFactorRequest{} + return &this +} + +// GetDeviceId returns the DeviceId field value if set, zero value otherwise. +func (o *ActivateFactorRequest) GetDeviceId() int32 { + if o == nil || o.DeviceId == nil { + var ret int32 + return ret + } + return *o.DeviceId +} + +// GetDeviceIdOk returns a tuple with the DeviceId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ActivateFactorRequest) GetDeviceIdOk() (*int32, bool) { + if o == nil || o.DeviceId == nil { + return nil, false + } + return o.DeviceId, true +} + +// HasDeviceId returns a boolean if a field has been set. +func (o *ActivateFactorRequest) HasDeviceId() bool { + if o != nil && o.DeviceId != nil { + return true + } + + return false +} + +// SetDeviceId gets a reference to the given int32 and assigns it to the DeviceId field. +func (o *ActivateFactorRequest) SetDeviceId(v int32) { + o.DeviceId = &v +} + +// GetExpiresIn returns the ExpiresIn field value if set, zero value otherwise. +func (o *ActivateFactorRequest) GetExpiresIn() int32 { + if o == nil || o.ExpiresIn == nil { + var ret int32 + return ret + } + return *o.ExpiresIn +} + +// GetExpiresInOk returns a tuple with the ExpiresIn field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ActivateFactorRequest) GetExpiresInOk() (*int32, bool) { + if o == nil || o.ExpiresIn == nil { + return nil, false + } + return o.ExpiresIn, true +} + +// HasExpiresIn returns a boolean if a field has been set. +func (o *ActivateFactorRequest) HasExpiresIn() bool { + if o != nil && o.ExpiresIn != nil { + return true + } + + return false +} + +// SetExpiresIn gets a reference to the given int32 and assigns it to the ExpiresIn field. +func (o *ActivateFactorRequest) SetExpiresIn(v int32) { + o.ExpiresIn = &v +} + +// GetRedirectTo returns the RedirectTo field value if set, zero value otherwise. +func (o *ActivateFactorRequest) GetRedirectTo() string { + if o == nil || o.RedirectTo == nil { + var ret string + return ret + } + return *o.RedirectTo +} + +// GetRedirectToOk returns a tuple with the RedirectTo field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ActivateFactorRequest) GetRedirectToOk() (*string, bool) { + if o == nil || o.RedirectTo == nil { + return nil, false + } + return o.RedirectTo, true +} + +// HasRedirectTo returns a boolean if a field has been set. +func (o *ActivateFactorRequest) HasRedirectTo() bool { + if o != nil && o.RedirectTo != nil { + return true + } + + return false +} + +// SetRedirectTo gets a reference to the given string and assigns it to the RedirectTo field. +func (o *ActivateFactorRequest) SetRedirectTo(v string) { + o.RedirectTo = &v +} + +// GetCustomMessage returns the CustomMessage field value if set, zero value otherwise. +func (o *ActivateFactorRequest) GetCustomMessage() string { + if o == nil || o.CustomMessage == nil { + var ret string + return ret + } + return *o.CustomMessage +} + +// GetCustomMessageOk returns a tuple with the CustomMessage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ActivateFactorRequest) GetCustomMessageOk() (*string, bool) { + if o == nil || o.CustomMessage == nil { + return nil, false + } + return o.CustomMessage, true +} + +// HasCustomMessage returns a boolean if a field has been set. +func (o *ActivateFactorRequest) HasCustomMessage() bool { + if o != nil && o.CustomMessage != nil { + return true + } + + return false +} + +// SetCustomMessage gets a reference to the given string and assigns it to the CustomMessage field. +func (o *ActivateFactorRequest) SetCustomMessage(v string) { + o.CustomMessage = &v +} + +func (o ActivateFactorRequest) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.DeviceId != nil { + toSerialize["device_id"] = o.DeviceId + } + if o.ExpiresIn != nil { + toSerialize["expires_in"] = o.ExpiresIn + } + if o.RedirectTo != nil { + toSerialize["redirect_to"] = o.RedirectTo + } + if o.CustomMessage != nil { + toSerialize["custom_message"] = o.CustomMessage + } + return json.Marshal(toSerialize) +} + +type NullableActivateFactorRequest struct { + value *ActivateFactorRequest + isSet bool +} + +func (v NullableActivateFactorRequest) Get() *ActivateFactorRequest { + return v.value +} + +func (v *NullableActivateFactorRequest) Set(val *ActivateFactorRequest) { + v.value = val + v.isSet = true +} + +func (v NullableActivateFactorRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableActivateFactorRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableActivateFactorRequest(val *ActivateFactorRequest) *NullableActivateFactorRequest { + return &NullableActivateFactorRequest{value: val, isSet: true} +} + +func (v NullableActivateFactorRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableActivateFactorRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_add_access_token_claim_request.go b/model_add_access_token_claim_request.go new file mode 100644 index 0000000..565ce22 --- /dev/null +++ b/model_add_access_token_claim_request.go @@ -0,0 +1,187 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// AddAccessTokenClaimRequest struct for AddAccessTokenClaimRequest +type AddAccessTokenClaimRequest struct { + Name *string `json:"name,omitempty"` + UserAttributeMappings *string `json:"user_attribute_mappings,omitempty"` + UserAttributeMacros *string `json:"user_attribute_macros,omitempty"` +} + +// NewAddAccessTokenClaimRequest instantiates a new AddAccessTokenClaimRequest 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 NewAddAccessTokenClaimRequest() *AddAccessTokenClaimRequest { + this := AddAccessTokenClaimRequest{} + return &this +} + +// NewAddAccessTokenClaimRequestWithDefaults instantiates a new AddAccessTokenClaimRequest 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 NewAddAccessTokenClaimRequestWithDefaults() *AddAccessTokenClaimRequest { + this := AddAccessTokenClaimRequest{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *AddAccessTokenClaimRequest) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// 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 *AddAccessTokenClaimRequest) GetNameOk() (*string, bool) { + if o == nil || o.Name == nil { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *AddAccessTokenClaimRequest) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *AddAccessTokenClaimRequest) SetName(v string) { + o.Name = &v +} + +// GetUserAttributeMappings returns the UserAttributeMappings field value if set, zero value otherwise. +func (o *AddAccessTokenClaimRequest) GetUserAttributeMappings() string { + if o == nil || o.UserAttributeMappings == nil { + var ret string + return ret + } + return *o.UserAttributeMappings +} + +// GetUserAttributeMappingsOk returns a tuple with the UserAttributeMappings field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AddAccessTokenClaimRequest) GetUserAttributeMappingsOk() (*string, bool) { + if o == nil || o.UserAttributeMappings == nil { + return nil, false + } + return o.UserAttributeMappings, true +} + +// HasUserAttributeMappings returns a boolean if a field has been set. +func (o *AddAccessTokenClaimRequest) HasUserAttributeMappings() bool { + if o != nil && o.UserAttributeMappings != nil { + return true + } + + return false +} + +// SetUserAttributeMappings gets a reference to the given string and assigns it to the UserAttributeMappings field. +func (o *AddAccessTokenClaimRequest) SetUserAttributeMappings(v string) { + o.UserAttributeMappings = &v +} + +// GetUserAttributeMacros returns the UserAttributeMacros field value if set, zero value otherwise. +func (o *AddAccessTokenClaimRequest) GetUserAttributeMacros() string { + if o == nil || o.UserAttributeMacros == nil { + var ret string + return ret + } + return *o.UserAttributeMacros +} + +// GetUserAttributeMacrosOk returns a tuple with the UserAttributeMacros field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AddAccessTokenClaimRequest) GetUserAttributeMacrosOk() (*string, bool) { + if o == nil || o.UserAttributeMacros == nil { + return nil, false + } + return o.UserAttributeMacros, true +} + +// HasUserAttributeMacros returns a boolean if a field has been set. +func (o *AddAccessTokenClaimRequest) HasUserAttributeMacros() bool { + if o != nil && o.UserAttributeMacros != nil { + return true + } + + return false +} + +// SetUserAttributeMacros gets a reference to the given string and assigns it to the UserAttributeMacros field. +func (o *AddAccessTokenClaimRequest) SetUserAttributeMacros(v string) { + o.UserAttributeMacros = &v +} + +func (o AddAccessTokenClaimRequest) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Name != nil { + toSerialize["name"] = o.Name + } + if o.UserAttributeMappings != nil { + toSerialize["user_attribute_mappings"] = o.UserAttributeMappings + } + if o.UserAttributeMacros != nil { + toSerialize["user_attribute_macros"] = o.UserAttributeMacros + } + return json.Marshal(toSerialize) +} + +type NullableAddAccessTokenClaimRequest struct { + value *AddAccessTokenClaimRequest + isSet bool +} + +func (v NullableAddAccessTokenClaimRequest) Get() *AddAccessTokenClaimRequest { + return v.value +} + +func (v *NullableAddAccessTokenClaimRequest) Set(val *AddAccessTokenClaimRequest) { + v.value = val + v.isSet = true +} + +func (v NullableAddAccessTokenClaimRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableAddAccessTokenClaimRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAddAccessTokenClaimRequest(val *AddAccessTokenClaimRequest) *NullableAddAccessTokenClaimRequest { + return &NullableAddAccessTokenClaimRequest{value: val, isSet: true} +} + +func (v NullableAddAccessTokenClaimRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAddAccessTokenClaimRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_add_client_app_request.go b/model_add_client_app_request.go new file mode 100644 index 0000000..a983d0c --- /dev/null +++ b/model_add_client_app_request.go @@ -0,0 +1,151 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// AddClientAppRequest struct for AddClientAppRequest +type AddClientAppRequest struct { + AppId *int32 `json:"app_id,omitempty"` + Scopes []int32 `json:"scopes,omitempty"` +} + +// NewAddClientAppRequest instantiates a new AddClientAppRequest 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 NewAddClientAppRequest() *AddClientAppRequest { + this := AddClientAppRequest{} + return &this +} + +// NewAddClientAppRequestWithDefaults instantiates a new AddClientAppRequest 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 NewAddClientAppRequestWithDefaults() *AddClientAppRequest { + this := AddClientAppRequest{} + return &this +} + +// GetAppId returns the AppId field value if set, zero value otherwise. +func (o *AddClientAppRequest) GetAppId() int32 { + if o == nil || o.AppId == nil { + var ret int32 + return ret + } + return *o.AppId +} + +// GetAppIdOk returns a tuple with the AppId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AddClientAppRequest) GetAppIdOk() (*int32, bool) { + if o == nil || o.AppId == nil { + return nil, false + } + return o.AppId, true +} + +// HasAppId returns a boolean if a field has been set. +func (o *AddClientAppRequest) HasAppId() bool { + if o != nil && o.AppId != nil { + return true + } + + return false +} + +// SetAppId gets a reference to the given int32 and assigns it to the AppId field. +func (o *AddClientAppRequest) SetAppId(v int32) { + o.AppId = &v +} + +// GetScopes returns the Scopes field value if set, zero value otherwise. +func (o *AddClientAppRequest) GetScopes() []int32 { + if o == nil || o.Scopes == nil { + var ret []int32 + return ret + } + return o.Scopes +} + +// GetScopesOk returns a tuple with the Scopes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AddClientAppRequest) GetScopesOk() ([]int32, bool) { + if o == nil || o.Scopes == nil { + return nil, false + } + return o.Scopes, true +} + +// HasScopes returns a boolean if a field has been set. +func (o *AddClientAppRequest) HasScopes() bool { + if o != nil && o.Scopes != nil { + return true + } + + return false +} + +// SetScopes gets a reference to the given []int32 and assigns it to the Scopes field. +func (o *AddClientAppRequest) SetScopes(v []int32) { + o.Scopes = v +} + +func (o AddClientAppRequest) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.AppId != nil { + toSerialize["app_id"] = o.AppId + } + if o.Scopes != nil { + toSerialize["scopes"] = o.Scopes + } + return json.Marshal(toSerialize) +} + +type NullableAddClientAppRequest struct { + value *AddClientAppRequest + isSet bool +} + +func (v NullableAddClientAppRequest) Get() *AddClientAppRequest { + return v.value +} + +func (v *NullableAddClientAppRequest) Set(val *AddClientAppRequest) { + v.value = val + v.isSet = true +} + +func (v NullableAddClientAppRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableAddClientAppRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAddClientAppRequest(val *AddClientAppRequest) *NullableAddClientAppRequest { + return &NullableAddClientAppRequest{value: val, isSet: true} +} + +func (v NullableAddClientAppRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAddClientAppRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_add_role_users_200_response_inner.go b/model_add_role_users_200_response_inner.go new file mode 100644 index 0000000..b284006 --- /dev/null +++ b/model_add_role_users_200_response_inner.go @@ -0,0 +1,115 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// AddRoleUsers200ResponseInner struct for AddRoleUsers200ResponseInner +type AddRoleUsers200ResponseInner struct { + Id *int32 `json:"id,omitempty"` +} + +// NewAddRoleUsers200ResponseInner instantiates a new AddRoleUsers200ResponseInner 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 NewAddRoleUsers200ResponseInner() *AddRoleUsers200ResponseInner { + this := AddRoleUsers200ResponseInner{} + return &this +} + +// NewAddRoleUsers200ResponseInnerWithDefaults instantiates a new AddRoleUsers200ResponseInner 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 NewAddRoleUsers200ResponseInnerWithDefaults() *AddRoleUsers200ResponseInner { + this := AddRoleUsers200ResponseInner{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *AddRoleUsers200ResponseInner) GetId() int32 { + if o == nil || o.Id == nil { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AddRoleUsers200ResponseInner) GetIdOk() (*int32, bool) { + if o == nil || o.Id == nil { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *AddRoleUsers200ResponseInner) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *AddRoleUsers200ResponseInner) SetId(v int32) { + o.Id = &v +} + +func (o AddRoleUsers200ResponseInner) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Id != nil { + toSerialize["id"] = o.Id + } + return json.Marshal(toSerialize) +} + +type NullableAddRoleUsers200ResponseInner struct { + value *AddRoleUsers200ResponseInner + isSet bool +} + +func (v NullableAddRoleUsers200ResponseInner) Get() *AddRoleUsers200ResponseInner { + return v.value +} + +func (v *NullableAddRoleUsers200ResponseInner) Set(val *AddRoleUsers200ResponseInner) { + v.value = val + v.isSet = true +} + +func (v NullableAddRoleUsers200ResponseInner) IsSet() bool { + return v.isSet +} + +func (v *NullableAddRoleUsers200ResponseInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAddRoleUsers200ResponseInner(val *AddRoleUsers200ResponseInner) *NullableAddRoleUsers200ResponseInner { + return &NullableAddRoleUsers200ResponseInner{value: val, isSet: true} +} + +func (v NullableAddRoleUsers200ResponseInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAddRoleUsers200ResponseInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_add_scope_request.go b/model_add_scope_request.go new file mode 100644 index 0000000..4d076e9 --- /dev/null +++ b/model_add_scope_request.go @@ -0,0 +1,151 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// AddScopeRequest struct for AddScopeRequest +type AddScopeRequest struct { + Value *string `json:"value,omitempty"` + Description *string `json:"description,omitempty"` +} + +// NewAddScopeRequest instantiates a new AddScopeRequest 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 NewAddScopeRequest() *AddScopeRequest { + this := AddScopeRequest{} + return &this +} + +// NewAddScopeRequestWithDefaults instantiates a new AddScopeRequest 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 NewAddScopeRequestWithDefaults() *AddScopeRequest { + this := AddScopeRequest{} + return &this +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *AddScopeRequest) GetValue() string { + if o == nil || o.Value == nil { + var ret string + return ret + } + return *o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AddScopeRequest) GetValueOk() (*string, bool) { + if o == nil || o.Value == nil { + return nil, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *AddScopeRequest) HasValue() bool { + if o != nil && o.Value != nil { + return true + } + + return false +} + +// SetValue gets a reference to the given string and assigns it to the Value field. +func (o *AddScopeRequest) SetValue(v string) { + o.Value = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *AddScopeRequest) GetDescription() string { + if o == nil || o.Description == nil { + var ret string + return ret + } + return *o.Description +} + +// 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 *AddScopeRequest) GetDescriptionOk() (*string, bool) { + if o == nil || o.Description == nil { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *AddScopeRequest) HasDescription() bool { + if o != nil && o.Description != nil { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *AddScopeRequest) SetDescription(v string) { + o.Description = &v +} + +func (o AddScopeRequest) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Value != nil { + toSerialize["value"] = o.Value + } + if o.Description != nil { + toSerialize["description"] = o.Description + } + return json.Marshal(toSerialize) +} + +type NullableAddScopeRequest struct { + value *AddScopeRequest + isSet bool +} + +func (v NullableAddScopeRequest) Get() *AddScopeRequest { + return v.value +} + +func (v *NullableAddScopeRequest) Set(val *AddScopeRequest) { + v.value = val + v.isSet = true +} + +func (v NullableAddScopeRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableAddScopeRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAddScopeRequest(val *AddScopeRequest) *NullableAddScopeRequest { + return &NullableAddScopeRequest{value: val, isSet: true} +} + +func (v NullableAddScopeRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAddScopeRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_auth_method.go b/model_auth_method.go new file mode 100644 index 0000000..7121db8 --- /dev/null +++ b/model_auth_method.go @@ -0,0 +1,123 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "fmt" +) + +// AuthMethod An ID indicating the type of app. +type AuthMethod int32 + +// List of auth_method +const ( + _0 AuthMethod = 0 + _1 AuthMethod = 1 + _2 AuthMethod = 2 + _3 AuthMethod = 3 + _4 AuthMethod = 4 + _6 AuthMethod = 6 + _7 AuthMethod = 7 + _8 AuthMethod = 8 +) + +// All allowed values of AuthMethod enum +var AllowedAuthMethodEnumValues = []AuthMethod{ + 0, + 1, + 2, + 3, + 4, + 6, + 7, + 8, +} + +func (v *AuthMethod) UnmarshalJSON(src []byte) error { + var value int32 + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := AuthMethod(value) + for _, existing := range AllowedAuthMethodEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid AuthMethod", value) +} + +// NewAuthMethodFromValue returns a pointer to a valid AuthMethod +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewAuthMethodFromValue(v int32) (*AuthMethod, error) { + ev := AuthMethod(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for AuthMethod: valid values are %v", v, AllowedAuthMethodEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v AuthMethod) IsValid() bool { + for _, existing := range AllowedAuthMethodEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to auth_method value +func (v AuthMethod) Ptr() *AuthMethod { + return &v +} + +type NullableAuthMethod struct { + value *AuthMethod + isSet bool +} + +func (v NullableAuthMethod) Get() *AuthMethod { + return v.value +} + +func (v *NullableAuthMethod) Set(val *AuthMethod) { + v.value = val + v.isSet = true +} + +func (v NullableAuthMethod) IsSet() bool { + return v.isSet +} + +func (v *NullableAuthMethod) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAuthMethod(val *AuthMethod) *NullableAuthMethod { + return &NullableAuthMethod{value: val, isSet: true} +} + +func (v NullableAuthMethod) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAuthMethod) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/model_auth_server_configuration.go b/model_auth_server_configuration.go new file mode 100644 index 0000000..aa515f2 --- /dev/null +++ b/model_auth_server_configuration.go @@ -0,0 +1,223 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// AuthServerConfiguration struct for AuthServerConfiguration +type AuthServerConfiguration struct { + Audiences []string `json:"audiences,omitempty"` + RefreshTokenExpirationMinutes *int32 `json:"refresh_token_expiration_minutes,omitempty"` + ResourceIdentifier *string `json:"resource_identifier,omitempty"` + AccessTokenExpirationMinutes *int32 `json:"access_token_expiration_minutes,omitempty"` +} + +// NewAuthServerConfiguration instantiates a new AuthServerConfiguration 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 NewAuthServerConfiguration() *AuthServerConfiguration { + this := AuthServerConfiguration{} + return &this +} + +// NewAuthServerConfigurationWithDefaults instantiates a new AuthServerConfiguration 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 NewAuthServerConfigurationWithDefaults() *AuthServerConfiguration { + this := AuthServerConfiguration{} + return &this +} + +// GetAudiences returns the Audiences field value if set, zero value otherwise. +func (o *AuthServerConfiguration) GetAudiences() []string { + if o == nil || o.Audiences == nil { + var ret []string + return ret + } + return o.Audiences +} + +// GetAudiencesOk returns a tuple with the Audiences field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AuthServerConfiguration) GetAudiencesOk() ([]string, bool) { + if o == nil || o.Audiences == nil { + return nil, false + } + return o.Audiences, true +} + +// HasAudiences returns a boolean if a field has been set. +func (o *AuthServerConfiguration) HasAudiences() bool { + if o != nil && o.Audiences != nil { + return true + } + + return false +} + +// SetAudiences gets a reference to the given []string and assigns it to the Audiences field. +func (o *AuthServerConfiguration) SetAudiences(v []string) { + o.Audiences = v +} + +// GetRefreshTokenExpirationMinutes returns the RefreshTokenExpirationMinutes field value if set, zero value otherwise. +func (o *AuthServerConfiguration) GetRefreshTokenExpirationMinutes() int32 { + if o == nil || o.RefreshTokenExpirationMinutes == nil { + var ret int32 + return ret + } + return *o.RefreshTokenExpirationMinutes +} + +// GetRefreshTokenExpirationMinutesOk returns a tuple with the RefreshTokenExpirationMinutes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AuthServerConfiguration) GetRefreshTokenExpirationMinutesOk() (*int32, bool) { + if o == nil || o.RefreshTokenExpirationMinutes == nil { + return nil, false + } + return o.RefreshTokenExpirationMinutes, true +} + +// HasRefreshTokenExpirationMinutes returns a boolean if a field has been set. +func (o *AuthServerConfiguration) HasRefreshTokenExpirationMinutes() bool { + if o != nil && o.RefreshTokenExpirationMinutes != nil { + return true + } + + return false +} + +// SetRefreshTokenExpirationMinutes gets a reference to the given int32 and assigns it to the RefreshTokenExpirationMinutes field. +func (o *AuthServerConfiguration) SetRefreshTokenExpirationMinutes(v int32) { + o.RefreshTokenExpirationMinutes = &v +} + +// GetResourceIdentifier returns the ResourceIdentifier field value if set, zero value otherwise. +func (o *AuthServerConfiguration) GetResourceIdentifier() string { + if o == nil || o.ResourceIdentifier == nil { + var ret string + return ret + } + return *o.ResourceIdentifier +} + +// GetResourceIdentifierOk returns a tuple with the ResourceIdentifier field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AuthServerConfiguration) GetResourceIdentifierOk() (*string, bool) { + if o == nil || o.ResourceIdentifier == nil { + return nil, false + } + return o.ResourceIdentifier, true +} + +// HasResourceIdentifier returns a boolean if a field has been set. +func (o *AuthServerConfiguration) HasResourceIdentifier() bool { + if o != nil && o.ResourceIdentifier != nil { + return true + } + + return false +} + +// SetResourceIdentifier gets a reference to the given string and assigns it to the ResourceIdentifier field. +func (o *AuthServerConfiguration) SetResourceIdentifier(v string) { + o.ResourceIdentifier = &v +} + +// GetAccessTokenExpirationMinutes returns the AccessTokenExpirationMinutes field value if set, zero value otherwise. +func (o *AuthServerConfiguration) GetAccessTokenExpirationMinutes() int32 { + if o == nil || o.AccessTokenExpirationMinutes == nil { + var ret int32 + return ret + } + return *o.AccessTokenExpirationMinutes +} + +// GetAccessTokenExpirationMinutesOk returns a tuple with the AccessTokenExpirationMinutes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AuthServerConfiguration) GetAccessTokenExpirationMinutesOk() (*int32, bool) { + if o == nil || o.AccessTokenExpirationMinutes == nil { + return nil, false + } + return o.AccessTokenExpirationMinutes, true +} + +// HasAccessTokenExpirationMinutes returns a boolean if a field has been set. +func (o *AuthServerConfiguration) HasAccessTokenExpirationMinutes() bool { + if o != nil && o.AccessTokenExpirationMinutes != nil { + return true + } + + return false +} + +// SetAccessTokenExpirationMinutes gets a reference to the given int32 and assigns it to the AccessTokenExpirationMinutes field. +func (o *AuthServerConfiguration) SetAccessTokenExpirationMinutes(v int32) { + o.AccessTokenExpirationMinutes = &v +} + +func (o AuthServerConfiguration) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Audiences != nil { + toSerialize["audiences"] = o.Audiences + } + if o.RefreshTokenExpirationMinutes != nil { + toSerialize["refresh_token_expiration_minutes"] = o.RefreshTokenExpirationMinutes + } + if o.ResourceIdentifier != nil { + toSerialize["resource_identifier"] = o.ResourceIdentifier + } + if o.AccessTokenExpirationMinutes != nil { + toSerialize["access_token_expiration_minutes"] = o.AccessTokenExpirationMinutes + } + return json.Marshal(toSerialize) +} + +type NullableAuthServerConfiguration struct { + value *AuthServerConfiguration + isSet bool +} + +func (v NullableAuthServerConfiguration) Get() *AuthServerConfiguration { + return v.value +} + +func (v *NullableAuthServerConfiguration) Set(val *AuthServerConfiguration) { + v.value = val + v.isSet = true +} + +func (v NullableAuthServerConfiguration) IsSet() bool { + return v.isSet +} + +func (v *NullableAuthServerConfiguration) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAuthServerConfiguration(val *AuthServerConfiguration) *NullableAuthServerConfiguration { + return &NullableAuthServerConfiguration{value: val, isSet: true} +} + +func (v NullableAuthServerConfiguration) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAuthServerConfiguration) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_client_app.go b/model_client_app.go new file mode 100644 index 0000000..9869c83 --- /dev/null +++ b/model_client_app.go @@ -0,0 +1,151 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// ClientApp struct for ClientApp +type ClientApp struct { + AppId *int32 `json:"app_id,omitempty"` + ApiAuthId *int32 `json:"api_auth_id,omitempty"` +} + +// NewClientApp instantiates a new ClientApp 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 NewClientApp() *ClientApp { + this := ClientApp{} + return &this +} + +// NewClientAppWithDefaults instantiates a new ClientApp 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 NewClientAppWithDefaults() *ClientApp { + this := ClientApp{} + return &this +} + +// GetAppId returns the AppId field value if set, zero value otherwise. +func (o *ClientApp) GetAppId() int32 { + if o == nil || o.AppId == nil { + var ret int32 + return ret + } + return *o.AppId +} + +// GetAppIdOk returns a tuple with the AppId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ClientApp) GetAppIdOk() (*int32, bool) { + if o == nil || o.AppId == nil { + return nil, false + } + return o.AppId, true +} + +// HasAppId returns a boolean if a field has been set. +func (o *ClientApp) HasAppId() bool { + if o != nil && o.AppId != nil { + return true + } + + return false +} + +// SetAppId gets a reference to the given int32 and assigns it to the AppId field. +func (o *ClientApp) SetAppId(v int32) { + o.AppId = &v +} + +// GetApiAuthId returns the ApiAuthId field value if set, zero value otherwise. +func (o *ClientApp) GetApiAuthId() int32 { + if o == nil || o.ApiAuthId == nil { + var ret int32 + return ret + } + return *o.ApiAuthId +} + +// GetApiAuthIdOk returns a tuple with the ApiAuthId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ClientApp) GetApiAuthIdOk() (*int32, bool) { + if o == nil || o.ApiAuthId == nil { + return nil, false + } + return o.ApiAuthId, true +} + +// HasApiAuthId returns a boolean if a field has been set. +func (o *ClientApp) HasApiAuthId() bool { + if o != nil && o.ApiAuthId != nil { + return true + } + + return false +} + +// SetApiAuthId gets a reference to the given int32 and assigns it to the ApiAuthId field. +func (o *ClientApp) SetApiAuthId(v int32) { + o.ApiAuthId = &v +} + +func (o ClientApp) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.AppId != nil { + toSerialize["app_id"] = o.AppId + } + if o.ApiAuthId != nil { + toSerialize["api_auth_id"] = o.ApiAuthId + } + return json.Marshal(toSerialize) +} + +type NullableClientApp struct { + value *ClientApp + isSet bool +} + +func (v NullableClientApp) Get() *ClientApp { + return v.value +} + +func (v *NullableClientApp) Set(val *ClientApp) { + v.value = val + v.isSet = true +} + +func (v NullableClientApp) IsSet() bool { + return v.isSet +} + +func (v *NullableClientApp) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableClientApp(val *ClientApp) *NullableClientApp { + return &NullableClientApp{value: val, isSet: true} +} + +func (v NullableClientApp) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableClientApp) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_condition.go b/model_condition.go new file mode 100644 index 0000000..a65ae5c --- /dev/null +++ b/model_condition.go @@ -0,0 +1,190 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// Condition struct for Condition +type Condition struct { + // The source field to check. + Source *string `json:"source,omitempty"` + // A valid operator for the selected condition source + Operator *string `json:"operator,omitempty"` + // A plain text string or valid value for the selected condition source. + Value *string `json:"value,omitempty"` +} + +// NewCondition instantiates a new Condition 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 NewCondition() *Condition { + this := Condition{} + return &this +} + +// NewConditionWithDefaults instantiates a new Condition 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 NewConditionWithDefaults() *Condition { + this := Condition{} + return &this +} + +// GetSource returns the Source field value if set, zero value otherwise. +func (o *Condition) GetSource() string { + if o == nil || o.Source == nil { + var ret string + return ret + } + return *o.Source +} + +// GetSourceOk returns a tuple with the Source field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Condition) GetSourceOk() (*string, bool) { + if o == nil || o.Source == nil { + return nil, false + } + return o.Source, true +} + +// HasSource returns a boolean if a field has been set. +func (o *Condition) HasSource() bool { + if o != nil && o.Source != nil { + return true + } + + return false +} + +// SetSource gets a reference to the given string and assigns it to the Source field. +func (o *Condition) SetSource(v string) { + o.Source = &v +} + +// GetOperator returns the Operator field value if set, zero value otherwise. +func (o *Condition) GetOperator() string { + if o == nil || o.Operator == nil { + var ret string + return ret + } + return *o.Operator +} + +// GetOperatorOk returns a tuple with the Operator field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Condition) GetOperatorOk() (*string, bool) { + if o == nil || o.Operator == nil { + return nil, false + } + return o.Operator, true +} + +// HasOperator returns a boolean if a field has been set. +func (o *Condition) HasOperator() bool { + if o != nil && o.Operator != nil { + return true + } + + return false +} + +// SetOperator gets a reference to the given string and assigns it to the Operator field. +func (o *Condition) SetOperator(v string) { + o.Operator = &v +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *Condition) GetValue() string { + if o == nil || o.Value == nil { + var ret string + return ret + } + return *o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Condition) GetValueOk() (*string, bool) { + if o == nil || o.Value == nil { + return nil, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *Condition) HasValue() bool { + if o != nil && o.Value != nil { + return true + } + + return false +} + +// SetValue gets a reference to the given string and assigns it to the Value field. +func (o *Condition) SetValue(v string) { + o.Value = &v +} + +func (o Condition) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Source != nil { + toSerialize["source"] = o.Source + } + if o.Operator != nil { + toSerialize["operator"] = o.Operator + } + if o.Value != nil { + toSerialize["value"] = o.Value + } + return json.Marshal(toSerialize) +} + +type NullableCondition struct { + value *Condition + isSet bool +} + +func (v NullableCondition) Get() *Condition { + return v.value +} + +func (v *NullableCondition) Set(val *Condition) { + v.value = val + v.isSet = true +} + +func (v NullableCondition) IsSet() bool { + return v.isSet +} + +func (v *NullableCondition) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCondition(val *Condition) *NullableCondition { + return &NullableCondition{value: val, isSet: true} +} + +func (v NullableCondition) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCondition) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_connector.go b/model_connector.go new file mode 100644 index 0000000..764ca89 --- /dev/null +++ b/model_connector.go @@ -0,0 +1,263 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// Connector struct for Connector +type Connector struct { + // The connectors unique ID in OneLogin. + Id *int32 `json:"id,omitempty"` + // The name of the connector. + Name *string `json:"name,omitempty"` + AuthMethod *AuthMethod `json:"auth_method,omitempty"` + // Indicates if apps created using this connector will be allowed to create custom parameters. + AllowsNewParameters *bool `json:"allows_new_parameters,omitempty"` + // A link to the apps icon url. + IconUrl *string `json:"icon_url,omitempty"` +} + +// NewConnector instantiates a new Connector 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 NewConnector() *Connector { + this := Connector{} + return &this +} + +// NewConnectorWithDefaults instantiates a new Connector 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 NewConnectorWithDefaults() *Connector { + this := Connector{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *Connector) GetId() int32 { + if o == nil || o.Id == nil { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Connector) GetIdOk() (*int32, bool) { + if o == nil || o.Id == nil { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *Connector) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *Connector) SetId(v int32) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *Connector) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// 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 *Connector) GetNameOk() (*string, bool) { + if o == nil || o.Name == nil { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *Connector) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *Connector) SetName(v string) { + o.Name = &v +} + +// GetAuthMethod returns the AuthMethod field value if set, zero value otherwise. +func (o *Connector) GetAuthMethod() AuthMethod { + if o == nil || o.AuthMethod == nil { + var ret AuthMethod + return ret + } + return *o.AuthMethod +} + +// GetAuthMethodOk returns a tuple with the AuthMethod field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Connector) GetAuthMethodOk() (*AuthMethod, bool) { + if o == nil || o.AuthMethod == nil { + return nil, false + } + return o.AuthMethod, true +} + +// HasAuthMethod returns a boolean if a field has been set. +func (o *Connector) HasAuthMethod() bool { + if o != nil && o.AuthMethod != nil { + return true + } + + return false +} + +// SetAuthMethod gets a reference to the given AuthMethod and assigns it to the AuthMethod field. +func (o *Connector) SetAuthMethod(v AuthMethod) { + o.AuthMethod = &v +} + +// GetAllowsNewParameters returns the AllowsNewParameters field value if set, zero value otherwise. +func (o *Connector) GetAllowsNewParameters() bool { + if o == nil || o.AllowsNewParameters == nil { + var ret bool + return ret + } + return *o.AllowsNewParameters +} + +// GetAllowsNewParametersOk returns a tuple with the AllowsNewParameters field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Connector) GetAllowsNewParametersOk() (*bool, bool) { + if o == nil || o.AllowsNewParameters == nil { + return nil, false + } + return o.AllowsNewParameters, true +} + +// HasAllowsNewParameters returns a boolean if a field has been set. +func (o *Connector) HasAllowsNewParameters() bool { + if o != nil && o.AllowsNewParameters != nil { + return true + } + + return false +} + +// SetAllowsNewParameters gets a reference to the given bool and assigns it to the AllowsNewParameters field. +func (o *Connector) SetAllowsNewParameters(v bool) { + o.AllowsNewParameters = &v +} + +// GetIconUrl returns the IconUrl field value if set, zero value otherwise. +func (o *Connector) GetIconUrl() string { + if o == nil || o.IconUrl == nil { + var ret string + return ret + } + return *o.IconUrl +} + +// 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 *Connector) GetIconUrlOk() (*string, bool) { + if o == nil || o.IconUrl == nil { + return nil, false + } + return o.IconUrl, true +} + +// HasIconUrl returns a boolean if a field has been set. +func (o *Connector) HasIconUrl() bool { + if o != nil && o.IconUrl != nil { + return true + } + + return false +} + +// SetIconUrl gets a reference to the given string and assigns it to the IconUrl field. +func (o *Connector) SetIconUrl(v string) { + o.IconUrl = &v +} + +func (o Connector) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Name != nil { + toSerialize["name"] = o.Name + } + if o.AuthMethod != nil { + toSerialize["auth_method"] = o.AuthMethod + } + if o.AllowsNewParameters != nil { + toSerialize["allows_new_parameters"] = o.AllowsNewParameters + } + if o.IconUrl != nil { + toSerialize["icon_url"] = o.IconUrl + } + return json.Marshal(toSerialize) +} + +type NullableConnector struct { + value *Connector + isSet bool +} + +func (v NullableConnector) Get() *Connector { + return v.value +} + +func (v *NullableConnector) Set(val *Connector) { + v.value = val + v.isSet = true +} + +func (v NullableConnector) IsSet() bool { + return v.isSet +} + +func (v *NullableConnector) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableConnector(val *Connector) *NullableConnector { + return &NullableConnector{value: val, isSet: true} +} + +func (v NullableConnector) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableConnector) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_create_authorization_server_request.go b/model_create_authorization_server_request.go new file mode 100644 index 0000000..e88ac1b --- /dev/null +++ b/model_create_authorization_server_request.go @@ -0,0 +1,187 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// CreateAuthorizationServerRequest struct for CreateAuthorizationServerRequest +type CreateAuthorizationServerRequest struct { + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Configuration *AuthServerConfiguration `json:"configuration,omitempty"` +} + +// NewCreateAuthorizationServerRequest instantiates a new CreateAuthorizationServerRequest 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 NewCreateAuthorizationServerRequest() *CreateAuthorizationServerRequest { + this := CreateAuthorizationServerRequest{} + return &this +} + +// NewCreateAuthorizationServerRequestWithDefaults instantiates a new CreateAuthorizationServerRequest 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 NewCreateAuthorizationServerRequestWithDefaults() *CreateAuthorizationServerRequest { + this := CreateAuthorizationServerRequest{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *CreateAuthorizationServerRequest) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// 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 *CreateAuthorizationServerRequest) GetNameOk() (*string, bool) { + if o == nil || o.Name == nil { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *CreateAuthorizationServerRequest) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *CreateAuthorizationServerRequest) SetName(v string) { + o.Name = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *CreateAuthorizationServerRequest) GetDescription() string { + if o == nil || o.Description == nil { + var ret string + return ret + } + return *o.Description +} + +// 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 *CreateAuthorizationServerRequest) GetDescriptionOk() (*string, bool) { + if o == nil || o.Description == nil { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *CreateAuthorizationServerRequest) HasDescription() bool { + if o != nil && o.Description != nil { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *CreateAuthorizationServerRequest) SetDescription(v string) { + o.Description = &v +} + +// GetConfiguration returns the Configuration field value if set, zero value otherwise. +func (o *CreateAuthorizationServerRequest) GetConfiguration() AuthServerConfiguration { + if o == nil || o.Configuration == nil { + var ret AuthServerConfiguration + return ret + } + return *o.Configuration +} + +// GetConfigurationOk returns a tuple with the Configuration field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateAuthorizationServerRequest) GetConfigurationOk() (*AuthServerConfiguration, bool) { + if o == nil || o.Configuration == nil { + return nil, false + } + return o.Configuration, true +} + +// HasConfiguration returns a boolean if a field has been set. +func (o *CreateAuthorizationServerRequest) HasConfiguration() bool { + if o != nil && o.Configuration != nil { + return true + } + + return false +} + +// SetConfiguration gets a reference to the given AuthServerConfiguration and assigns it to the Configuration field. +func (o *CreateAuthorizationServerRequest) SetConfiguration(v AuthServerConfiguration) { + o.Configuration = &v +} + +func (o CreateAuthorizationServerRequest) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Name != nil { + toSerialize["name"] = o.Name + } + if o.Description != nil { + toSerialize["description"] = o.Description + } + if o.Configuration != nil { + toSerialize["configuration"] = o.Configuration + } + return json.Marshal(toSerialize) +} + +type NullableCreateAuthorizationServerRequest struct { + value *CreateAuthorizationServerRequest + isSet bool +} + +func (v NullableCreateAuthorizationServerRequest) Get() *CreateAuthorizationServerRequest { + return v.value +} + +func (v *NullableCreateAuthorizationServerRequest) Set(val *CreateAuthorizationServerRequest) { + v.value = val + v.isSet = true +} + +func (v NullableCreateAuthorizationServerRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateAuthorizationServerRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateAuthorizationServerRequest(val *CreateAuthorizationServerRequest) *NullableCreateAuthorizationServerRequest { + return &NullableCreateAuthorizationServerRequest{value: val, isSet: true} +} + +func (v NullableCreateAuthorizationServerRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateAuthorizationServerRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_create_environment_variable_request.go b/model_create_environment_variable_request.go new file mode 100644 index 0000000..c4c203b --- /dev/null +++ b/model_create_environment_variable_request.go @@ -0,0 +1,139 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// CreateEnvironmentVariableRequest struct for CreateEnvironmentVariableRequest +type CreateEnvironmentVariableRequest struct { + // The name for the environment variable that will be used to retrieve the value from a hook function. + Name string `json:"name"` + // The secret value that will be encrypted at rest and injected in applicable hook functions at run time. + Value string `json:"value"` +} + +// NewCreateEnvironmentVariableRequest instantiates a new CreateEnvironmentVariableRequest 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 NewCreateEnvironmentVariableRequest(name string, value string) *CreateEnvironmentVariableRequest { + this := CreateEnvironmentVariableRequest{} + this.Name = name + this.Value = value + return &this +} + +// NewCreateEnvironmentVariableRequestWithDefaults instantiates a new CreateEnvironmentVariableRequest 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 NewCreateEnvironmentVariableRequestWithDefaults() *CreateEnvironmentVariableRequest { + this := CreateEnvironmentVariableRequest{} + return &this +} + +// GetName returns the Name field value +func (o *CreateEnvironmentVariableRequest) 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 *CreateEnvironmentVariableRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CreateEnvironmentVariableRequest) SetName(v string) { + o.Name = v +} + +// GetValue returns the Value field value +func (o *CreateEnvironmentVariableRequest) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *CreateEnvironmentVariableRequest) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *CreateEnvironmentVariableRequest) SetValue(v string) { + o.Value = v +} + +func (o CreateEnvironmentVariableRequest) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["name"] = o.Name + } + if true { + toSerialize["value"] = o.Value + } + return json.Marshal(toSerialize) +} + +type NullableCreateEnvironmentVariableRequest struct { + value *CreateEnvironmentVariableRequest + isSet bool +} + +func (v NullableCreateEnvironmentVariableRequest) Get() *CreateEnvironmentVariableRequest { + return v.value +} + +func (v *NullableCreateEnvironmentVariableRequest) Set(val *CreateEnvironmentVariableRequest) { + v.value = val + v.isSet = true +} + +func (v NullableCreateEnvironmentVariableRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateEnvironmentVariableRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateEnvironmentVariableRequest(val *CreateEnvironmentVariableRequest) *NullableCreateEnvironmentVariableRequest { + return &NullableCreateEnvironmentVariableRequest{value: val, isSet: true} +} + +func (v NullableCreateEnvironmentVariableRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateEnvironmentVariableRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_create_roles_201_response_inner.go b/model_create_roles_201_response_inner.go new file mode 100644 index 0000000..694c700 --- /dev/null +++ b/model_create_roles_201_response_inner.go @@ -0,0 +1,115 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// CreateRoles201ResponseInner struct for CreateRoles201ResponseInner +type CreateRoles201ResponseInner struct { + Id *int32 `json:"id,omitempty"` +} + +// NewCreateRoles201ResponseInner instantiates a new CreateRoles201ResponseInner 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 NewCreateRoles201ResponseInner() *CreateRoles201ResponseInner { + this := CreateRoles201ResponseInner{} + return &this +} + +// NewCreateRoles201ResponseInnerWithDefaults instantiates a new CreateRoles201ResponseInner 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 NewCreateRoles201ResponseInnerWithDefaults() *CreateRoles201ResponseInner { + this := CreateRoles201ResponseInner{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *CreateRoles201ResponseInner) GetId() int32 { + if o == nil || o.Id == nil { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateRoles201ResponseInner) GetIdOk() (*int32, bool) { + if o == nil || o.Id == nil { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *CreateRoles201ResponseInner) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *CreateRoles201ResponseInner) SetId(v int32) { + o.Id = &v +} + +func (o CreateRoles201ResponseInner) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Id != nil { + toSerialize["id"] = o.Id + } + return json.Marshal(toSerialize) +} + +type NullableCreateRoles201ResponseInner struct { + value *CreateRoles201ResponseInner + isSet bool +} + +func (v NullableCreateRoles201ResponseInner) Get() *CreateRoles201ResponseInner { + return v.value +} + +func (v *NullableCreateRoles201ResponseInner) Set(val *CreateRoles201ResponseInner) { + v.value = val + v.isSet = true +} + +func (v NullableCreateRoles201ResponseInner) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateRoles201ResponseInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateRoles201ResponseInner(val *CreateRoles201ResponseInner) *NullableCreateRoles201ResponseInner { + return &NullableCreateRoles201ResponseInner{value: val, isSet: true} +} + +func (v NullableCreateRoles201ResponseInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateRoles201ResponseInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_device.go b/model_device.go new file mode 100644 index 0000000..e94e054 --- /dev/null +++ b/model_device.go @@ -0,0 +1,259 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// Device struct for Device +type Device struct { + DeviceId *string `json:"device_id,omitempty"` + UserDisplayName *string `json:"user_display_name,omitempty"` + TypeDisplayName *string `json:"type_display_name,omitempty"` + AuthFactorName *string `json:"auth_factor_name,omitempty"` + Default *bool `json:"default,omitempty"` +} + +// NewDevice instantiates a new Device 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 NewDevice() *Device { + this := Device{} + return &this +} + +// NewDeviceWithDefaults instantiates a new Device 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 NewDeviceWithDefaults() *Device { + this := Device{} + return &this +} + +// GetDeviceId returns the DeviceId field value if set, zero value otherwise. +func (o *Device) GetDeviceId() string { + if o == nil || o.DeviceId == nil { + var ret string + return ret + } + return *o.DeviceId +} + +// GetDeviceIdOk returns a tuple with the DeviceId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Device) GetDeviceIdOk() (*string, bool) { + if o == nil || o.DeviceId == nil { + return nil, false + } + return o.DeviceId, true +} + +// HasDeviceId returns a boolean if a field has been set. +func (o *Device) HasDeviceId() bool { + if o != nil && o.DeviceId != nil { + return true + } + + return false +} + +// SetDeviceId gets a reference to the given string and assigns it to the DeviceId field. +func (o *Device) SetDeviceId(v string) { + o.DeviceId = &v +} + +// GetUserDisplayName returns the UserDisplayName field value if set, zero value otherwise. +func (o *Device) GetUserDisplayName() string { + if o == nil || o.UserDisplayName == nil { + var ret string + return ret + } + return *o.UserDisplayName +} + +// GetUserDisplayNameOk returns a tuple with the UserDisplayName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Device) GetUserDisplayNameOk() (*string, bool) { + if o == nil || o.UserDisplayName == nil { + return nil, false + } + return o.UserDisplayName, true +} + +// HasUserDisplayName returns a boolean if a field has been set. +func (o *Device) HasUserDisplayName() bool { + if o != nil && o.UserDisplayName != nil { + return true + } + + return false +} + +// SetUserDisplayName gets a reference to the given string and assigns it to the UserDisplayName field. +func (o *Device) SetUserDisplayName(v string) { + o.UserDisplayName = &v +} + +// GetTypeDisplayName returns the TypeDisplayName field value if set, zero value otherwise. +func (o *Device) GetTypeDisplayName() string { + if o == nil || o.TypeDisplayName == nil { + var ret string + return ret + } + return *o.TypeDisplayName +} + +// GetTypeDisplayNameOk returns a tuple with the TypeDisplayName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Device) GetTypeDisplayNameOk() (*string, bool) { + if o == nil || o.TypeDisplayName == nil { + return nil, false + } + return o.TypeDisplayName, true +} + +// HasTypeDisplayName returns a boolean if a field has been set. +func (o *Device) HasTypeDisplayName() bool { + if o != nil && o.TypeDisplayName != nil { + return true + } + + return false +} + +// SetTypeDisplayName gets a reference to the given string and assigns it to the TypeDisplayName field. +func (o *Device) SetTypeDisplayName(v string) { + o.TypeDisplayName = &v +} + +// GetAuthFactorName returns the AuthFactorName field value if set, zero value otherwise. +func (o *Device) GetAuthFactorName() string { + if o == nil || o.AuthFactorName == nil { + var ret string + return ret + } + return *o.AuthFactorName +} + +// GetAuthFactorNameOk returns a tuple with the AuthFactorName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Device) GetAuthFactorNameOk() (*string, bool) { + if o == nil || o.AuthFactorName == nil { + return nil, false + } + return o.AuthFactorName, true +} + +// HasAuthFactorName returns a boolean if a field has been set. +func (o *Device) HasAuthFactorName() bool { + if o != nil && o.AuthFactorName != nil { + return true + } + + return false +} + +// SetAuthFactorName gets a reference to the given string and assigns it to the AuthFactorName field. +func (o *Device) SetAuthFactorName(v string) { + o.AuthFactorName = &v +} + +// GetDefault returns the Default field value if set, zero value otherwise. +func (o *Device) GetDefault() bool { + if o == nil || o.Default == nil { + var ret bool + return ret + } + return *o.Default +} + +// 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 *Device) GetDefaultOk() (*bool, bool) { + if o == nil || o.Default == nil { + return nil, false + } + return o.Default, true +} + +// HasDefault returns a boolean if a field has been set. +func (o *Device) HasDefault() bool { + if o != nil && o.Default != nil { + return true + } + + return false +} + +// SetDefault gets a reference to the given bool and assigns it to the Default field. +func (o *Device) SetDefault(v bool) { + o.Default = &v +} + +func (o Device) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.DeviceId != nil { + toSerialize["device_id"] = o.DeviceId + } + if o.UserDisplayName != nil { + toSerialize["user_display_name"] = o.UserDisplayName + } + if o.TypeDisplayName != nil { + toSerialize["type_display_name"] = o.TypeDisplayName + } + if o.AuthFactorName != nil { + toSerialize["auth_factor_name"] = o.AuthFactorName + } + if o.Default != nil { + toSerialize["default"] = o.Default + } + return json.Marshal(toSerialize) +} + +type NullableDevice struct { + value *Device + isSet bool +} + +func (v NullableDevice) Get() *Device { + return v.value +} + +func (v *NullableDevice) Set(val *Device) { + v.value = val + v.isSet = true +} + +func (v NullableDevice) IsSet() bool { + return v.isSet +} + +func (v *NullableDevice) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDevice(val *Device) *NullableDevice { + return &NullableDevice{value: val, isSet: true} +} + +func (v NullableDevice) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDevice) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_enroll_factor_request.go b/model_enroll_factor_request.go new file mode 100644 index 0000000..377db62 --- /dev/null +++ b/model_enroll_factor_request.go @@ -0,0 +1,287 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// EnrollFactorRequest struct for EnrollFactorRequest +type EnrollFactorRequest struct { + // The identifier of the factor to enroll the user with. + FactorId int32 `json:"factor_id"` + // A name for the users device. + DisplayName string `json:"display_name"` + // Defaults to 120. Valid values are: 120-900 seconds. + ExpiresIn *string `json:"expires_in,omitempty"` + // Defaults to false. + Verified *bool `json:"verified,omitempty"` + // Redirects MagicLink success page to specified URL after 2 seconds. + RedirectTo *string `json:"redirect_to,omitempty"` + // A message template that will be sent via SMS. Max length of the message after template items are inserted is 160 characters including the OTP code. + CustomMessage *string `json:"custom_message,omitempty"` +} + +// NewEnrollFactorRequest instantiates a new EnrollFactorRequest 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 NewEnrollFactorRequest(factorId int32, displayName string) *EnrollFactorRequest { + this := EnrollFactorRequest{} + this.FactorId = factorId + this.DisplayName = displayName + return &this +} + +// NewEnrollFactorRequestWithDefaults instantiates a new EnrollFactorRequest 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 NewEnrollFactorRequestWithDefaults() *EnrollFactorRequest { + this := EnrollFactorRequest{} + return &this +} + +// GetFactorId returns the FactorId field value +func (o *EnrollFactorRequest) GetFactorId() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.FactorId +} + +// GetFactorIdOk returns a tuple with the FactorId field value +// and a boolean to check if the value has been set. +func (o *EnrollFactorRequest) GetFactorIdOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.FactorId, true +} + +// SetFactorId sets field value +func (o *EnrollFactorRequest) SetFactorId(v int32) { + o.FactorId = v +} + +// GetDisplayName returns the DisplayName field value +func (o *EnrollFactorRequest) GetDisplayName() string { + if o == nil { + var ret string + return ret + } + + return o.DisplayName +} + +// GetDisplayNameOk returns a tuple with the DisplayName field value +// and a boolean to check if the value has been set. +func (o *EnrollFactorRequest) GetDisplayNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DisplayName, true +} + +// SetDisplayName sets field value +func (o *EnrollFactorRequest) SetDisplayName(v string) { + o.DisplayName = v +} + +// GetExpiresIn returns the ExpiresIn field value if set, zero value otherwise. +func (o *EnrollFactorRequest) GetExpiresIn() string { + if o == nil || o.ExpiresIn == nil { + var ret string + return ret + } + return *o.ExpiresIn +} + +// GetExpiresInOk returns a tuple with the ExpiresIn field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnrollFactorRequest) GetExpiresInOk() (*string, bool) { + if o == nil || o.ExpiresIn == nil { + return nil, false + } + return o.ExpiresIn, true +} + +// HasExpiresIn returns a boolean if a field has been set. +func (o *EnrollFactorRequest) HasExpiresIn() bool { + if o != nil && o.ExpiresIn != nil { + return true + } + + return false +} + +// SetExpiresIn gets a reference to the given string and assigns it to the ExpiresIn field. +func (o *EnrollFactorRequest) SetExpiresIn(v string) { + o.ExpiresIn = &v +} + +// GetVerified returns the Verified field value if set, zero value otherwise. +func (o *EnrollFactorRequest) GetVerified() bool { + if o == nil || o.Verified == nil { + var ret bool + return ret + } + return *o.Verified +} + +// GetVerifiedOk returns a tuple with the Verified field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnrollFactorRequest) GetVerifiedOk() (*bool, bool) { + if o == nil || o.Verified == nil { + return nil, false + } + return o.Verified, true +} + +// HasVerified returns a boolean if a field has been set. +func (o *EnrollFactorRequest) HasVerified() bool { + if o != nil && o.Verified != nil { + return true + } + + return false +} + +// SetVerified gets a reference to the given bool and assigns it to the Verified field. +func (o *EnrollFactorRequest) SetVerified(v bool) { + o.Verified = &v +} + +// GetRedirectTo returns the RedirectTo field value if set, zero value otherwise. +func (o *EnrollFactorRequest) GetRedirectTo() string { + if o == nil || o.RedirectTo == nil { + var ret string + return ret + } + return *o.RedirectTo +} + +// GetRedirectToOk returns a tuple with the RedirectTo field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnrollFactorRequest) GetRedirectToOk() (*string, bool) { + if o == nil || o.RedirectTo == nil { + return nil, false + } + return o.RedirectTo, true +} + +// HasRedirectTo returns a boolean if a field has been set. +func (o *EnrollFactorRequest) HasRedirectTo() bool { + if o != nil && o.RedirectTo != nil { + return true + } + + return false +} + +// SetRedirectTo gets a reference to the given string and assigns it to the RedirectTo field. +func (o *EnrollFactorRequest) SetRedirectTo(v string) { + o.RedirectTo = &v +} + +// GetCustomMessage returns the CustomMessage field value if set, zero value otherwise. +func (o *EnrollFactorRequest) GetCustomMessage() string { + if o == nil || o.CustomMessage == nil { + var ret string + return ret + } + return *o.CustomMessage +} + +// GetCustomMessageOk returns a tuple with the CustomMessage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnrollFactorRequest) GetCustomMessageOk() (*string, bool) { + if o == nil || o.CustomMessage == nil { + return nil, false + } + return o.CustomMessage, true +} + +// HasCustomMessage returns a boolean if a field has been set. +func (o *EnrollFactorRequest) HasCustomMessage() bool { + if o != nil && o.CustomMessage != nil { + return true + } + + return false +} + +// SetCustomMessage gets a reference to the given string and assigns it to the CustomMessage field. +func (o *EnrollFactorRequest) SetCustomMessage(v string) { + o.CustomMessage = &v +} + +func (o EnrollFactorRequest) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["factor_id"] = o.FactorId + } + if true { + toSerialize["display_name"] = o.DisplayName + } + if o.ExpiresIn != nil { + toSerialize["expires_in"] = o.ExpiresIn + } + if o.Verified != nil { + toSerialize["verified"] = o.Verified + } + if o.RedirectTo != nil { + toSerialize["redirect_to"] = o.RedirectTo + } + if o.CustomMessage != nil { + toSerialize["custom_message"] = o.CustomMessage + } + return json.Marshal(toSerialize) +} + +type NullableEnrollFactorRequest struct { + value *EnrollFactorRequest + isSet bool +} + +func (v NullableEnrollFactorRequest) Get() *EnrollFactorRequest { + return v.value +} + +func (v *NullableEnrollFactorRequest) Set(val *EnrollFactorRequest) { + v.value = val + v.isSet = true +} + +func (v NullableEnrollFactorRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableEnrollFactorRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEnrollFactorRequest(val *EnrollFactorRequest) *NullableEnrollFactorRequest { + return &NullableEnrollFactorRequest{value: val, isSet: true} +} + +func (v NullableEnrollFactorRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEnrollFactorRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_envvar.go b/model_envvar.go new file mode 100644 index 0000000..2d27e5b --- /dev/null +++ b/model_envvar.go @@ -0,0 +1,227 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// Envvar struct for Envvar +type Envvar struct { + // A unique identifier for the Hook Environment Variable + Id *string `json:"id,omitempty"` + // The name of the environment variable. + Name *string `json:"name,omitempty"` + // The ISO8601 formatted date that the environment variable was created. + CreatedAt *string `json:"created_at,omitempty"` + // The ISO8601 formatted date that the environment variable was last updated. + UpdatedAt *string `json:"updated_at,omitempty"` +} + +// NewEnvvar instantiates a new Envvar 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 NewEnvvar() *Envvar { + this := Envvar{} + return &this +} + +// NewEnvvarWithDefaults instantiates a new Envvar 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 NewEnvvarWithDefaults() *Envvar { + this := Envvar{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *Envvar) GetId() string { + if o == nil || o.Id == nil { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Envvar) GetIdOk() (*string, bool) { + if o == nil || o.Id == nil { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *Envvar) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *Envvar) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *Envvar) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// 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 *Envvar) GetNameOk() (*string, bool) { + if o == nil || o.Name == nil { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *Envvar) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *Envvar) SetName(v string) { + o.Name = &v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *Envvar) GetCreatedAt() string { + if o == nil || o.CreatedAt == nil { + var ret string + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Envvar) GetCreatedAtOk() (*string, bool) { + if o == nil || o.CreatedAt == nil { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *Envvar) HasCreatedAt() bool { + if o != nil && o.CreatedAt != nil { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given string and assigns it to the CreatedAt field. +func (o *Envvar) SetCreatedAt(v string) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *Envvar) GetUpdatedAt() string { + if o == nil || o.UpdatedAt == nil { + var ret string + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Envvar) GetUpdatedAtOk() (*string, bool) { + if o == nil || o.UpdatedAt == nil { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *Envvar) HasUpdatedAt() bool { + if o != nil && o.UpdatedAt != nil { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given string and assigns it to the UpdatedAt field. +func (o *Envvar) SetUpdatedAt(v string) { + o.UpdatedAt = &v +} + +func (o Envvar) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Name != nil { + toSerialize["name"] = o.Name + } + if o.CreatedAt != nil { + toSerialize["created_at"] = o.CreatedAt + } + if o.UpdatedAt != nil { + toSerialize["updated_at"] = o.UpdatedAt + } + return json.Marshal(toSerialize) +} + +type NullableEnvvar struct { + value *Envvar + isSet bool +} + +func (v NullableEnvvar) Get() *Envvar { + return v.value +} + +func (v *NullableEnvvar) Set(val *Envvar) { + v.value = val + v.isSet = true +} + +func (v NullableEnvvar) IsSet() bool { + return v.isSet +} + +func (v *NullableEnvvar) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEnvvar(val *Envvar) *NullableEnvvar { + return &NullableEnvvar{value: val, isSet: true} +} + +func (v NullableEnvvar) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEnvvar) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_error_status.go b/model_error_status.go new file mode 100644 index 0000000..26491e5 --- /dev/null +++ b/model_error_status.go @@ -0,0 +1,187 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// ErrorStatus struct for ErrorStatus +type ErrorStatus struct { + Code *int32 `json:"code,omitempty"` + Message *string `json:"message,omitempty"` + Errors []ErrorStatusErrorsInner `json:"errors,omitempty"` +} + +// NewErrorStatus instantiates a new ErrorStatus 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 NewErrorStatus() *ErrorStatus { + this := ErrorStatus{} + return &this +} + +// NewErrorStatusWithDefaults instantiates a new ErrorStatus 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 NewErrorStatusWithDefaults() *ErrorStatus { + this := ErrorStatus{} + return &this +} + +// GetCode returns the Code field value if set, zero value otherwise. +func (o *ErrorStatus) GetCode() int32 { + if o == nil || o.Code == nil { + var ret int32 + return ret + } + return *o.Code +} + +// 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 *ErrorStatus) GetCodeOk() (*int32, bool) { + if o == nil || o.Code == nil { + return nil, false + } + return o.Code, true +} + +// HasCode returns a boolean if a field has been set. +func (o *ErrorStatus) HasCode() bool { + if o != nil && o.Code != nil { + return true + } + + return false +} + +// SetCode gets a reference to the given int32 and assigns it to the Code field. +func (o *ErrorStatus) SetCode(v int32) { + o.Code = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *ErrorStatus) GetMessage() string { + if o == nil || o.Message == nil { + var ret string + return ret + } + return *o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ErrorStatus) GetMessageOk() (*string, bool) { + if o == nil || o.Message == nil { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *ErrorStatus) HasMessage() bool { + if o != nil && o.Message != nil { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *ErrorStatus) SetMessage(v string) { + o.Message = &v +} + +// GetErrors returns the Errors field value if set, zero value otherwise. +func (o *ErrorStatus) GetErrors() []ErrorStatusErrorsInner { + if o == nil || o.Errors == nil { + var ret []ErrorStatusErrorsInner + return ret + } + return o.Errors +} + +// GetErrorsOk returns a tuple with the Errors field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ErrorStatus) GetErrorsOk() ([]ErrorStatusErrorsInner, bool) { + if o == nil || o.Errors == nil { + return nil, false + } + return o.Errors, true +} + +// HasErrors returns a boolean if a field has been set. +func (o *ErrorStatus) HasErrors() bool { + if o != nil && o.Errors != nil { + return true + } + + return false +} + +// SetErrors gets a reference to the given []ErrorStatusErrorsInner and assigns it to the Errors field. +func (o *ErrorStatus) SetErrors(v []ErrorStatusErrorsInner) { + o.Errors = v +} + +func (o ErrorStatus) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Code != nil { + toSerialize["code"] = o.Code + } + if o.Message != nil { + toSerialize["message"] = o.Message + } + if o.Errors != nil { + toSerialize["errors"] = o.Errors + } + return json.Marshal(toSerialize) +} + +type NullableErrorStatus struct { + value *ErrorStatus + isSet bool +} + +func (v NullableErrorStatus) Get() *ErrorStatus { + return v.value +} + +func (v *NullableErrorStatus) Set(val *ErrorStatus) { + v.value = val + v.isSet = true +} + +func (v NullableErrorStatus) IsSet() bool { + return v.isSet +} + +func (v *NullableErrorStatus) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableErrorStatus(val *ErrorStatus) *NullableErrorStatus { + return &NullableErrorStatus{value: val, isSet: true} +} + +func (v NullableErrorStatus) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableErrorStatus) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_error_status_errors_inner.go b/model_error_status_errors_inner.go new file mode 100644 index 0000000..bdf0833 --- /dev/null +++ b/model_error_status_errors_inner.go @@ -0,0 +1,151 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// ErrorStatusErrorsInner struct for ErrorStatusErrorsInner +type ErrorStatusErrorsInner struct { + Field *string `json:"field,omitempty"` + Message []string `json:"message,omitempty"` +} + +// NewErrorStatusErrorsInner instantiates a new ErrorStatusErrorsInner 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 NewErrorStatusErrorsInner() *ErrorStatusErrorsInner { + this := ErrorStatusErrorsInner{} + return &this +} + +// NewErrorStatusErrorsInnerWithDefaults instantiates a new ErrorStatusErrorsInner 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 NewErrorStatusErrorsInnerWithDefaults() *ErrorStatusErrorsInner { + this := ErrorStatusErrorsInner{} + return &this +} + +// GetField returns the Field field value if set, zero value otherwise. +func (o *ErrorStatusErrorsInner) GetField() string { + if o == nil || o.Field == nil { + var ret string + return ret + } + return *o.Field +} + +// GetFieldOk returns a tuple with the Field field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ErrorStatusErrorsInner) GetFieldOk() (*string, bool) { + if o == nil || o.Field == nil { + return nil, false + } + return o.Field, true +} + +// HasField returns a boolean if a field has been set. +func (o *ErrorStatusErrorsInner) HasField() bool { + if o != nil && o.Field != nil { + return true + } + + return false +} + +// SetField gets a reference to the given string and assigns it to the Field field. +func (o *ErrorStatusErrorsInner) SetField(v string) { + o.Field = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *ErrorStatusErrorsInner) GetMessage() []string { + if o == nil || o.Message == nil { + var ret []string + return ret + } + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ErrorStatusErrorsInner) GetMessageOk() ([]string, bool) { + if o == nil || o.Message == nil { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *ErrorStatusErrorsInner) HasMessage() bool { + if o != nil && o.Message != nil { + return true + } + + return false +} + +// SetMessage gets a reference to the given []string and assigns it to the Message field. +func (o *ErrorStatusErrorsInner) SetMessage(v []string) { + o.Message = v +} + +func (o ErrorStatusErrorsInner) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Field != nil { + toSerialize["field"] = o.Field + } + if o.Message != nil { + toSerialize["message"] = o.Message + } + return json.Marshal(toSerialize) +} + +type NullableErrorStatusErrorsInner struct { + value *ErrorStatusErrorsInner + isSet bool +} + +func (v NullableErrorStatusErrorsInner) Get() *ErrorStatusErrorsInner { + return v.value +} + +func (v *NullableErrorStatusErrorsInner) Set(val *ErrorStatusErrorsInner) { + v.value = val + v.isSet = true +} + +func (v NullableErrorStatusErrorsInner) IsSet() bool { + return v.isSet +} + +func (v *NullableErrorStatusErrorsInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableErrorStatusErrorsInner(val *ErrorStatusErrorsInner) *NullableErrorStatusErrorsInner { + return &NullableErrorStatusErrorsInner{value: val, isSet: true} +} + +func (v NullableErrorStatusErrorsInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableErrorStatusErrorsInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_factor_inner.go b/model_factor_inner.go new file mode 100644 index 0000000..62c8c52 --- /dev/null +++ b/model_factor_inner.go @@ -0,0 +1,374 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// FactorInner struct for FactorInner +type FactorInner struct { + // MFA device identifier. + Id *string `json:"id,omitempty"` + // accepted : factor has been verified. pending: registered but has not been verified. + Status *string `json:"status,omitempty"` + // True = is user's default MFA device for OneLogin. + Default *bool `json:"default,omitempty"` + // \"Official\" authentication factor name, as it appears to administrators in OneLogin. + AuthFactorName *string `json:"auth_factor_name,omitempty"` + // Authentication factor display name as it appears to users upon initial registration, as defined by admins at Settings > Authentication Factors. + TypeDisplayName *string `json:"type_display_name,omitempty"` + // Authentication factor display name assigned by users when they enroll the device. + UserDisplayName *string `json:"user_display_name,omitempty"` + // A short lived token that is required to Verify the Factor. This token expires based on the expires_in parameter passed in. + ExpiresAt *string `json:"expires_at,omitempty"` + FactorData *FactorInnerFactorData `json:"factor_data,omitempty"` +} + +// NewFactorInner instantiates a new FactorInner 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 NewFactorInner() *FactorInner { + this := FactorInner{} + return &this +} + +// NewFactorInnerWithDefaults instantiates a new FactorInner 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 NewFactorInnerWithDefaults() *FactorInner { + this := FactorInner{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *FactorInner) GetId() string { + if o == nil || o.Id == nil { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FactorInner) GetIdOk() (*string, bool) { + if o == nil || o.Id == nil { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *FactorInner) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *FactorInner) SetId(v string) { + o.Id = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *FactorInner) GetStatus() string { + if o == nil || o.Status == nil { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FactorInner) GetStatusOk() (*string, bool) { + if o == nil || o.Status == nil { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *FactorInner) HasStatus() bool { + if o != nil && o.Status != nil { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *FactorInner) SetStatus(v string) { + o.Status = &v +} + +// GetDefault returns the Default field value if set, zero value otherwise. +func (o *FactorInner) GetDefault() bool { + if o == nil || o.Default == nil { + var ret bool + return ret + } + return *o.Default +} + +// 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 *FactorInner) GetDefaultOk() (*bool, bool) { + if o == nil || o.Default == nil { + return nil, false + } + return o.Default, true +} + +// HasDefault returns a boolean if a field has been set. +func (o *FactorInner) HasDefault() bool { + if o != nil && o.Default != nil { + return true + } + + return false +} + +// SetDefault gets a reference to the given bool and assigns it to the Default field. +func (o *FactorInner) SetDefault(v bool) { + o.Default = &v +} + +// GetAuthFactorName returns the AuthFactorName field value if set, zero value otherwise. +func (o *FactorInner) GetAuthFactorName() string { + if o == nil || o.AuthFactorName == nil { + var ret string + return ret + } + return *o.AuthFactorName +} + +// GetAuthFactorNameOk returns a tuple with the AuthFactorName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FactorInner) GetAuthFactorNameOk() (*string, bool) { + if o == nil || o.AuthFactorName == nil { + return nil, false + } + return o.AuthFactorName, true +} + +// HasAuthFactorName returns a boolean if a field has been set. +func (o *FactorInner) HasAuthFactorName() bool { + if o != nil && o.AuthFactorName != nil { + return true + } + + return false +} + +// SetAuthFactorName gets a reference to the given string and assigns it to the AuthFactorName field. +func (o *FactorInner) SetAuthFactorName(v string) { + o.AuthFactorName = &v +} + +// GetTypeDisplayName returns the TypeDisplayName field value if set, zero value otherwise. +func (o *FactorInner) GetTypeDisplayName() string { + if o == nil || o.TypeDisplayName == nil { + var ret string + return ret + } + return *o.TypeDisplayName +} + +// GetTypeDisplayNameOk returns a tuple with the TypeDisplayName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FactorInner) GetTypeDisplayNameOk() (*string, bool) { + if o == nil || o.TypeDisplayName == nil { + return nil, false + } + return o.TypeDisplayName, true +} + +// HasTypeDisplayName returns a boolean if a field has been set. +func (o *FactorInner) HasTypeDisplayName() bool { + if o != nil && o.TypeDisplayName != nil { + return true + } + + return false +} + +// SetTypeDisplayName gets a reference to the given string and assigns it to the TypeDisplayName field. +func (o *FactorInner) SetTypeDisplayName(v string) { + o.TypeDisplayName = &v +} + +// GetUserDisplayName returns the UserDisplayName field value if set, zero value otherwise. +func (o *FactorInner) GetUserDisplayName() string { + if o == nil || o.UserDisplayName == nil { + var ret string + return ret + } + return *o.UserDisplayName +} + +// GetUserDisplayNameOk returns a tuple with the UserDisplayName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FactorInner) GetUserDisplayNameOk() (*string, bool) { + if o == nil || o.UserDisplayName == nil { + return nil, false + } + return o.UserDisplayName, true +} + +// HasUserDisplayName returns a boolean if a field has been set. +func (o *FactorInner) HasUserDisplayName() bool { + if o != nil && o.UserDisplayName != nil { + return true + } + + return false +} + +// SetUserDisplayName gets a reference to the given string and assigns it to the UserDisplayName field. +func (o *FactorInner) SetUserDisplayName(v string) { + o.UserDisplayName = &v +} + +// GetExpiresAt returns the ExpiresAt field value if set, zero value otherwise. +func (o *FactorInner) GetExpiresAt() string { + if o == nil || o.ExpiresAt == nil { + var ret string + return ret + } + return *o.ExpiresAt +} + +// GetExpiresAtOk returns a tuple with the ExpiresAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FactorInner) GetExpiresAtOk() (*string, bool) { + if o == nil || o.ExpiresAt == nil { + return nil, false + } + return o.ExpiresAt, true +} + +// HasExpiresAt returns a boolean if a field has been set. +func (o *FactorInner) HasExpiresAt() bool { + if o != nil && o.ExpiresAt != nil { + return true + } + + return false +} + +// SetExpiresAt gets a reference to the given string and assigns it to the ExpiresAt field. +func (o *FactorInner) SetExpiresAt(v string) { + o.ExpiresAt = &v +} + +// GetFactorData returns the FactorData field value if set, zero value otherwise. +func (o *FactorInner) GetFactorData() FactorInnerFactorData { + if o == nil || o.FactorData == nil { + var ret FactorInnerFactorData + return ret + } + return *o.FactorData +} + +// GetFactorDataOk returns a tuple with the FactorData field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FactorInner) GetFactorDataOk() (*FactorInnerFactorData, bool) { + if o == nil || o.FactorData == nil { + return nil, false + } + return o.FactorData, true +} + +// HasFactorData returns a boolean if a field has been set. +func (o *FactorInner) HasFactorData() bool { + if o != nil && o.FactorData != nil { + return true + } + + return false +} + +// SetFactorData gets a reference to the given FactorInnerFactorData and assigns it to the FactorData field. +func (o *FactorInner) SetFactorData(v FactorInnerFactorData) { + o.FactorData = &v +} + +func (o FactorInner) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Status != nil { + toSerialize["status"] = o.Status + } + if o.Default != nil { + toSerialize["default"] = o.Default + } + if o.AuthFactorName != nil { + toSerialize["auth_factor_name"] = o.AuthFactorName + } + if o.TypeDisplayName != nil { + toSerialize["type_display_name"] = o.TypeDisplayName + } + if o.UserDisplayName != nil { + toSerialize["user_display_name"] = o.UserDisplayName + } + if o.ExpiresAt != nil { + toSerialize["expires_at"] = o.ExpiresAt + } + if o.FactorData != nil { + toSerialize["factor_data"] = o.FactorData + } + return json.Marshal(toSerialize) +} + +type NullableFactorInner struct { + value *FactorInner + isSet bool +} + +func (v NullableFactorInner) Get() *FactorInner { + return v.value +} + +func (v *NullableFactorInner) Set(val *FactorInner) { + v.value = val + v.isSet = true +} + +func (v NullableFactorInner) IsSet() bool { + return v.isSet +} + +func (v *NullableFactorInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFactorInner(val *FactorInner) *NullableFactorInner { + return &NullableFactorInner{value: val, isSet: true} +} + +func (v NullableFactorInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFactorInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_factor_inner_factor_data.go b/model_factor_inner_factor_data.go new file mode 100644 index 0000000..30f2441 --- /dev/null +++ b/model_factor_inner_factor_data.go @@ -0,0 +1,153 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// FactorInnerFactorData Array of factor specific properties. For example, the token or totp code for OneLogin Protect. +type FactorInnerFactorData struct { + // The token which can be used to verify the factor registration. + VerificationToken *string `json:"verification_token,omitempty"` + // OTP Url that can be leveraged for any authenticator that supports the key uri format. + TotpUrl *string `json:"totp_url,omitempty"` +} + +// NewFactorInnerFactorData instantiates a new FactorInnerFactorData 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 NewFactorInnerFactorData() *FactorInnerFactorData { + this := FactorInnerFactorData{} + return &this +} + +// NewFactorInnerFactorDataWithDefaults instantiates a new FactorInnerFactorData 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 NewFactorInnerFactorDataWithDefaults() *FactorInnerFactorData { + this := FactorInnerFactorData{} + return &this +} + +// GetVerificationToken returns the VerificationToken field value if set, zero value otherwise. +func (o *FactorInnerFactorData) GetVerificationToken() string { + if o == nil || o.VerificationToken == nil { + var ret string + return ret + } + return *o.VerificationToken +} + +// GetVerificationTokenOk returns a tuple with the VerificationToken field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FactorInnerFactorData) GetVerificationTokenOk() (*string, bool) { + if o == nil || o.VerificationToken == nil { + return nil, false + } + return o.VerificationToken, true +} + +// HasVerificationToken returns a boolean if a field has been set. +func (o *FactorInnerFactorData) HasVerificationToken() bool { + if o != nil && o.VerificationToken != nil { + return true + } + + return false +} + +// SetVerificationToken gets a reference to the given string and assigns it to the VerificationToken field. +func (o *FactorInnerFactorData) SetVerificationToken(v string) { + o.VerificationToken = &v +} + +// GetTotpUrl returns the TotpUrl field value if set, zero value otherwise. +func (o *FactorInnerFactorData) GetTotpUrl() string { + if o == nil || o.TotpUrl == nil { + var ret string + return ret + } + return *o.TotpUrl +} + +// GetTotpUrlOk returns a tuple with the TotpUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FactorInnerFactorData) GetTotpUrlOk() (*string, bool) { + if o == nil || o.TotpUrl == nil { + return nil, false + } + return o.TotpUrl, true +} + +// HasTotpUrl returns a boolean if a field has been set. +func (o *FactorInnerFactorData) HasTotpUrl() bool { + if o != nil && o.TotpUrl != nil { + return true + } + + return false +} + +// SetTotpUrl gets a reference to the given string and assigns it to the TotpUrl field. +func (o *FactorInnerFactorData) SetTotpUrl(v string) { + o.TotpUrl = &v +} + +func (o FactorInnerFactorData) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.VerificationToken != nil { + toSerialize["verification_token"] = o.VerificationToken + } + if o.TotpUrl != nil { + toSerialize["totp_url"] = o.TotpUrl + } + return json.Marshal(toSerialize) +} + +type NullableFactorInnerFactorData struct { + value *FactorInnerFactorData + isSet bool +} + +func (v NullableFactorInnerFactorData) Get() *FactorInnerFactorData { + return v.value +} + +func (v *NullableFactorInnerFactorData) Set(val *FactorInnerFactorData) { + v.value = val + v.isSet = true +} + +func (v NullableFactorInnerFactorData) IsSet() bool { + return v.isSet +} + +func (v *NullableFactorInnerFactorData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFactorInnerFactorData(val *FactorInnerFactorData) *NullableFactorInnerFactorData { + return &NullableFactorInnerFactorData{value: val, isSet: true} +} + +func (v NullableFactorInnerFactorData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFactorInnerFactorData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_generate_mfa_token_200_response.go b/model_generate_mfa_token_200_response.go new file mode 100644 index 0000000..fb7be4a --- /dev/null +++ b/model_generate_mfa_token_200_response.go @@ -0,0 +1,227 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// GenerateMfaToken200Response struct for GenerateMfaToken200Response +type GenerateMfaToken200Response struct { + // Token can function as a temporary MFA token. It can be used to authenticate for any app when valid. + MfaToken *string `json:"mfa_token,omitempty"` + // true indcates the token can be used multiple times. false indicates the token is invalid after a single use + Reusable *bool `json:"reusable,omitempty"` + // Defines the expiration time and date for the token. Format is UTC time. + ExpiresAt *string `json:"expires_at,omitempty"` + // Defines the expiration time and date for the token. Format is UTC time. + DeviceId *string `json:"device_id,omitempty"` +} + +// NewGenerateMfaToken200Response instantiates a new GenerateMfaToken200Response 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 NewGenerateMfaToken200Response() *GenerateMfaToken200Response { + this := GenerateMfaToken200Response{} + return &this +} + +// NewGenerateMfaToken200ResponseWithDefaults instantiates a new GenerateMfaToken200Response 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 NewGenerateMfaToken200ResponseWithDefaults() *GenerateMfaToken200Response { + this := GenerateMfaToken200Response{} + return &this +} + +// GetMfaToken returns the MfaToken field value if set, zero value otherwise. +func (o *GenerateMfaToken200Response) GetMfaToken() string { + if o == nil || o.MfaToken == nil { + var ret string + return ret + } + return *o.MfaToken +} + +// GetMfaTokenOk returns a tuple with the MfaToken field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GenerateMfaToken200Response) GetMfaTokenOk() (*string, bool) { + if o == nil || o.MfaToken == nil { + return nil, false + } + return o.MfaToken, true +} + +// HasMfaToken returns a boolean if a field has been set. +func (o *GenerateMfaToken200Response) HasMfaToken() bool { + if o != nil && o.MfaToken != nil { + return true + } + + return false +} + +// SetMfaToken gets a reference to the given string and assigns it to the MfaToken field. +func (o *GenerateMfaToken200Response) SetMfaToken(v string) { + o.MfaToken = &v +} + +// GetReusable returns the Reusable field value if set, zero value otherwise. +func (o *GenerateMfaToken200Response) GetReusable() bool { + if o == nil || o.Reusable == nil { + var ret bool + return ret + } + return *o.Reusable +} + +// GetReusableOk returns a tuple with the Reusable field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GenerateMfaToken200Response) GetReusableOk() (*bool, bool) { + if o == nil || o.Reusable == nil { + return nil, false + } + return o.Reusable, true +} + +// HasReusable returns a boolean if a field has been set. +func (o *GenerateMfaToken200Response) HasReusable() bool { + if o != nil && o.Reusable != nil { + return true + } + + return false +} + +// SetReusable gets a reference to the given bool and assigns it to the Reusable field. +func (o *GenerateMfaToken200Response) SetReusable(v bool) { + o.Reusable = &v +} + +// GetExpiresAt returns the ExpiresAt field value if set, zero value otherwise. +func (o *GenerateMfaToken200Response) GetExpiresAt() string { + if o == nil || o.ExpiresAt == nil { + var ret string + return ret + } + return *o.ExpiresAt +} + +// GetExpiresAtOk returns a tuple with the ExpiresAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GenerateMfaToken200Response) GetExpiresAtOk() (*string, bool) { + if o == nil || o.ExpiresAt == nil { + return nil, false + } + return o.ExpiresAt, true +} + +// HasExpiresAt returns a boolean if a field has been set. +func (o *GenerateMfaToken200Response) HasExpiresAt() bool { + if o != nil && o.ExpiresAt != nil { + return true + } + + return false +} + +// SetExpiresAt gets a reference to the given string and assigns it to the ExpiresAt field. +func (o *GenerateMfaToken200Response) SetExpiresAt(v string) { + o.ExpiresAt = &v +} + +// GetDeviceId returns the DeviceId field value if set, zero value otherwise. +func (o *GenerateMfaToken200Response) GetDeviceId() string { + if o == nil || o.DeviceId == nil { + var ret string + return ret + } + return *o.DeviceId +} + +// GetDeviceIdOk returns a tuple with the DeviceId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GenerateMfaToken200Response) GetDeviceIdOk() (*string, bool) { + if o == nil || o.DeviceId == nil { + return nil, false + } + return o.DeviceId, true +} + +// HasDeviceId returns a boolean if a field has been set. +func (o *GenerateMfaToken200Response) HasDeviceId() bool { + if o != nil && o.DeviceId != nil { + return true + } + + return false +} + +// SetDeviceId gets a reference to the given string and assigns it to the DeviceId field. +func (o *GenerateMfaToken200Response) SetDeviceId(v string) { + o.DeviceId = &v +} + +func (o GenerateMfaToken200Response) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.MfaToken != nil { + toSerialize["mfa_token"] = o.MfaToken + } + if o.Reusable != nil { + toSerialize["reusable"] = o.Reusable + } + if o.ExpiresAt != nil { + toSerialize["expires_at"] = o.ExpiresAt + } + if o.DeviceId != nil { + toSerialize["device_id"] = o.DeviceId + } + return json.Marshal(toSerialize) +} + +type NullableGenerateMfaToken200Response struct { + value *GenerateMfaToken200Response + isSet bool +} + +func (v NullableGenerateMfaToken200Response) Get() *GenerateMfaToken200Response { + return v.value +} + +func (v *NullableGenerateMfaToken200Response) Set(val *GenerateMfaToken200Response) { + v.value = val + v.isSet = true +} + +func (v NullableGenerateMfaToken200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableGenerateMfaToken200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGenerateMfaToken200Response(val *GenerateMfaToken200Response) *NullableGenerateMfaToken200Response { + return &NullableGenerateMfaToken200Response{value: val, isSet: true} +} + +func (v NullableGenerateMfaToken200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGenerateMfaToken200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_generate_mfa_token_422_response.go b/model_generate_mfa_token_422_response.go new file mode 100644 index 0000000..7eb7332 --- /dev/null +++ b/model_generate_mfa_token_422_response.go @@ -0,0 +1,223 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// GenerateMfaToken422Response struct for GenerateMfaToken422Response +type GenerateMfaToken422Response struct { + StatusCode *int32 `json:"statusCode,omitempty"` + Name *string `json:"name,omitempty"` + Message *string `json:"message,omitempty"` + Details *GenerateMfaToken422ResponseDetails `json:"details,omitempty"` +} + +// NewGenerateMfaToken422Response instantiates a new GenerateMfaToken422Response 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 NewGenerateMfaToken422Response() *GenerateMfaToken422Response { + this := GenerateMfaToken422Response{} + return &this +} + +// NewGenerateMfaToken422ResponseWithDefaults instantiates a new GenerateMfaToken422Response 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 NewGenerateMfaToken422ResponseWithDefaults() *GenerateMfaToken422Response { + this := GenerateMfaToken422Response{} + return &this +} + +// GetStatusCode returns the StatusCode field value if set, zero value otherwise. +func (o *GenerateMfaToken422Response) GetStatusCode() int32 { + if o == nil || o.StatusCode == nil { + var ret int32 + return ret + } + return *o.StatusCode +} + +// GetStatusCodeOk returns a tuple with the StatusCode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GenerateMfaToken422Response) GetStatusCodeOk() (*int32, bool) { + if o == nil || o.StatusCode == nil { + return nil, false + } + return o.StatusCode, true +} + +// HasStatusCode returns a boolean if a field has been set. +func (o *GenerateMfaToken422Response) HasStatusCode() bool { + if o != nil && o.StatusCode != nil { + return true + } + + return false +} + +// SetStatusCode gets a reference to the given int32 and assigns it to the StatusCode field. +func (o *GenerateMfaToken422Response) SetStatusCode(v int32) { + o.StatusCode = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *GenerateMfaToken422Response) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// 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 *GenerateMfaToken422Response) GetNameOk() (*string, bool) { + if o == nil || o.Name == nil { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *GenerateMfaToken422Response) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *GenerateMfaToken422Response) SetName(v string) { + o.Name = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *GenerateMfaToken422Response) GetMessage() string { + if o == nil || o.Message == nil { + var ret string + return ret + } + return *o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GenerateMfaToken422Response) GetMessageOk() (*string, bool) { + if o == nil || o.Message == nil { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *GenerateMfaToken422Response) HasMessage() bool { + if o != nil && o.Message != nil { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *GenerateMfaToken422Response) SetMessage(v string) { + o.Message = &v +} + +// GetDetails returns the Details field value if set, zero value otherwise. +func (o *GenerateMfaToken422Response) GetDetails() GenerateMfaToken422ResponseDetails { + if o == nil || o.Details == nil { + var ret GenerateMfaToken422ResponseDetails + return ret + } + return *o.Details +} + +// GetDetailsOk returns a tuple with the Details field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GenerateMfaToken422Response) GetDetailsOk() (*GenerateMfaToken422ResponseDetails, bool) { + if o == nil || o.Details == nil { + return nil, false + } + return o.Details, true +} + +// HasDetails returns a boolean if a field has been set. +func (o *GenerateMfaToken422Response) HasDetails() bool { + if o != nil && o.Details != nil { + return true + } + + return false +} + +// SetDetails gets a reference to the given GenerateMfaToken422ResponseDetails and assigns it to the Details field. +func (o *GenerateMfaToken422Response) SetDetails(v GenerateMfaToken422ResponseDetails) { + o.Details = &v +} + +func (o GenerateMfaToken422Response) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.StatusCode != nil { + toSerialize["statusCode"] = o.StatusCode + } + if o.Name != nil { + toSerialize["name"] = o.Name + } + if o.Message != nil { + toSerialize["message"] = o.Message + } + if o.Details != nil { + toSerialize["details"] = o.Details + } + return json.Marshal(toSerialize) +} + +type NullableGenerateMfaToken422Response struct { + value *GenerateMfaToken422Response + isSet bool +} + +func (v NullableGenerateMfaToken422Response) Get() *GenerateMfaToken422Response { + return v.value +} + +func (v *NullableGenerateMfaToken422Response) Set(val *GenerateMfaToken422Response) { + v.value = val + v.isSet = true +} + +func (v NullableGenerateMfaToken422Response) IsSet() bool { + return v.isSet +} + +func (v *NullableGenerateMfaToken422Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGenerateMfaToken422Response(val *GenerateMfaToken422Response) *NullableGenerateMfaToken422Response { + return &NullableGenerateMfaToken422Response{value: val, isSet: true} +} + +func (v NullableGenerateMfaToken422Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGenerateMfaToken422Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_generate_mfa_token_422_response_details.go b/model_generate_mfa_token_422_response_details.go new file mode 100644 index 0000000..5130e2b --- /dev/null +++ b/model_generate_mfa_token_422_response_details.go @@ -0,0 +1,115 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// GenerateMfaToken422ResponseDetails struct for GenerateMfaToken422ResponseDetails +type GenerateMfaToken422ResponseDetails struct { + Parameters []string `json:"parameters,omitempty"` +} + +// NewGenerateMfaToken422ResponseDetails instantiates a new GenerateMfaToken422ResponseDetails 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 NewGenerateMfaToken422ResponseDetails() *GenerateMfaToken422ResponseDetails { + this := GenerateMfaToken422ResponseDetails{} + return &this +} + +// NewGenerateMfaToken422ResponseDetailsWithDefaults instantiates a new GenerateMfaToken422ResponseDetails 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 NewGenerateMfaToken422ResponseDetailsWithDefaults() *GenerateMfaToken422ResponseDetails { + this := GenerateMfaToken422ResponseDetails{} + return &this +} + +// GetParameters returns the Parameters field value if set, zero value otherwise. +func (o *GenerateMfaToken422ResponseDetails) GetParameters() []string { + if o == nil || o.Parameters == nil { + var ret []string + return ret + } + return o.Parameters +} + +// GetParametersOk returns a tuple with the Parameters field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GenerateMfaToken422ResponseDetails) GetParametersOk() ([]string, bool) { + if o == nil || o.Parameters == nil { + return nil, false + } + return o.Parameters, true +} + +// HasParameters returns a boolean if a field has been set. +func (o *GenerateMfaToken422ResponseDetails) HasParameters() bool { + if o != nil && o.Parameters != nil { + return true + } + + return false +} + +// SetParameters gets a reference to the given []string and assigns it to the Parameters field. +func (o *GenerateMfaToken422ResponseDetails) SetParameters(v []string) { + o.Parameters = v +} + +func (o GenerateMfaToken422ResponseDetails) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Parameters != nil { + toSerialize["parameters"] = o.Parameters + } + return json.Marshal(toSerialize) +} + +type NullableGenerateMfaToken422ResponseDetails struct { + value *GenerateMfaToken422ResponseDetails + isSet bool +} + +func (v NullableGenerateMfaToken422ResponseDetails) Get() *GenerateMfaToken422ResponseDetails { + return v.value +} + +func (v *NullableGenerateMfaToken422ResponseDetails) Set(val *GenerateMfaToken422ResponseDetails) { + v.value = val + v.isSet = true +} + +func (v NullableGenerateMfaToken422ResponseDetails) IsSet() bool { + return v.isSet +} + +func (v *NullableGenerateMfaToken422ResponseDetails) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGenerateMfaToken422ResponseDetails(val *GenerateMfaToken422ResponseDetails) *NullableGenerateMfaToken422ResponseDetails { + return &NullableGenerateMfaToken422ResponseDetails{value: val, isSet: true} +} + +func (v NullableGenerateMfaToken422ResponseDetails) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGenerateMfaToken422ResponseDetails) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_generate_mfa_token_request.go b/model_generate_mfa_token_request.go new file mode 100644 index 0000000..4d3a698 --- /dev/null +++ b/model_generate_mfa_token_request.go @@ -0,0 +1,153 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// GenerateMfaTokenRequest struct for GenerateMfaTokenRequest +type GenerateMfaTokenRequest struct { + // Set the duration of the token in seconds. + ExpiresIn *string `json:"expires_in,omitempty"` + // Defines if the token is reusable multiple times within the expiry window. + Reusable *bool `json:"reusable,omitempty"` +} + +// NewGenerateMfaTokenRequest instantiates a new GenerateMfaTokenRequest 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 NewGenerateMfaTokenRequest() *GenerateMfaTokenRequest { + this := GenerateMfaTokenRequest{} + return &this +} + +// NewGenerateMfaTokenRequestWithDefaults instantiates a new GenerateMfaTokenRequest 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 NewGenerateMfaTokenRequestWithDefaults() *GenerateMfaTokenRequest { + this := GenerateMfaTokenRequest{} + return &this +} + +// GetExpiresIn returns the ExpiresIn field value if set, zero value otherwise. +func (o *GenerateMfaTokenRequest) GetExpiresIn() string { + if o == nil || o.ExpiresIn == nil { + var ret string + return ret + } + return *o.ExpiresIn +} + +// GetExpiresInOk returns a tuple with the ExpiresIn field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GenerateMfaTokenRequest) GetExpiresInOk() (*string, bool) { + if o == nil || o.ExpiresIn == nil { + return nil, false + } + return o.ExpiresIn, true +} + +// HasExpiresIn returns a boolean if a field has been set. +func (o *GenerateMfaTokenRequest) HasExpiresIn() bool { + if o != nil && o.ExpiresIn != nil { + return true + } + + return false +} + +// SetExpiresIn gets a reference to the given string and assigns it to the ExpiresIn field. +func (o *GenerateMfaTokenRequest) SetExpiresIn(v string) { + o.ExpiresIn = &v +} + +// GetReusable returns the Reusable field value if set, zero value otherwise. +func (o *GenerateMfaTokenRequest) GetReusable() bool { + if o == nil || o.Reusable == nil { + var ret bool + return ret + } + return *o.Reusable +} + +// GetReusableOk returns a tuple with the Reusable field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GenerateMfaTokenRequest) GetReusableOk() (*bool, bool) { + if o == nil || o.Reusable == nil { + return nil, false + } + return o.Reusable, true +} + +// HasReusable returns a boolean if a field has been set. +func (o *GenerateMfaTokenRequest) HasReusable() bool { + if o != nil && o.Reusable != nil { + return true + } + + return false +} + +// SetReusable gets a reference to the given bool and assigns it to the Reusable field. +func (o *GenerateMfaTokenRequest) SetReusable(v bool) { + o.Reusable = &v +} + +func (o GenerateMfaTokenRequest) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.ExpiresIn != nil { + toSerialize["expires_in"] = o.ExpiresIn + } + if o.Reusable != nil { + toSerialize["reusable"] = o.Reusable + } + return json.Marshal(toSerialize) +} + +type NullableGenerateMfaTokenRequest struct { + value *GenerateMfaTokenRequest + isSet bool +} + +func (v NullableGenerateMfaTokenRequest) Get() *GenerateMfaTokenRequest { + return v.value +} + +func (v *NullableGenerateMfaTokenRequest) Set(val *GenerateMfaTokenRequest) { + v.value = val + v.isSet = true +} + +func (v NullableGenerateMfaTokenRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableGenerateMfaTokenRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGenerateMfaTokenRequest(val *GenerateMfaTokenRequest) *NullableGenerateMfaTokenRequest { + return &NullableGenerateMfaTokenRequest{value: val, isSet: true} +} + +func (v NullableGenerateMfaTokenRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGenerateMfaTokenRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_generate_saml_assertion_request.go b/model_generate_saml_assertion_request.go new file mode 100644 index 0000000..1658d8f --- /dev/null +++ b/model_generate_saml_assertion_request.go @@ -0,0 +1,236 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// GenerateSamlAssertionRequest struct for GenerateSamlAssertionRequest +type GenerateSamlAssertionRequest struct { + // Set this to the username or email of the OneLogin user accessing the app for which you want to generate a SAML token. + UsernameOrEmail string `json:"username_or_email"` + // Password of the OneLogin user accessing the app for which you want to generate a SAML token. + Password string `json:"password"` + // App ID of the app for which you want to generate a SAML token. This is the app ID in OneLogin. + AppId string `json:"app_id"` + // Set to the subdomain of the OneLogin user accessing the app for which you want to generate a SAML token. + Subdomain string `json:"subdomain"` + // Whitelisted IP address, if MFA is required and you need to honor IP address whitelisting defined in MFA policies. + IpAddress *string `json:"ip_address,omitempty"` +} + +// NewGenerateSamlAssertionRequest instantiates a new GenerateSamlAssertionRequest 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 NewGenerateSamlAssertionRequest(usernameOrEmail string, password string, appId string, subdomain string) *GenerateSamlAssertionRequest { + this := GenerateSamlAssertionRequest{} + this.UsernameOrEmail = usernameOrEmail + this.Password = password + this.AppId = appId + this.Subdomain = subdomain + return &this +} + +// NewGenerateSamlAssertionRequestWithDefaults instantiates a new GenerateSamlAssertionRequest 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 NewGenerateSamlAssertionRequestWithDefaults() *GenerateSamlAssertionRequest { + this := GenerateSamlAssertionRequest{} + return &this +} + +// GetUsernameOrEmail returns the UsernameOrEmail field value +func (o *GenerateSamlAssertionRequest) GetUsernameOrEmail() string { + if o == nil { + var ret string + return ret + } + + return o.UsernameOrEmail +} + +// GetUsernameOrEmailOk returns a tuple with the UsernameOrEmail field value +// and a boolean to check if the value has been set. +func (o *GenerateSamlAssertionRequest) GetUsernameOrEmailOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.UsernameOrEmail, true +} + +// SetUsernameOrEmail sets field value +func (o *GenerateSamlAssertionRequest) SetUsernameOrEmail(v string) { + o.UsernameOrEmail = v +} + +// GetPassword returns the Password field value +func (o *GenerateSamlAssertionRequest) GetPassword() string { + if o == nil { + var ret string + return ret + } + + return o.Password +} + +// GetPasswordOk returns a tuple with the Password field value +// and a boolean to check if the value has been set. +func (o *GenerateSamlAssertionRequest) GetPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Password, true +} + +// SetPassword sets field value +func (o *GenerateSamlAssertionRequest) SetPassword(v string) { + o.Password = v +} + +// GetAppId returns the AppId field value +func (o *GenerateSamlAssertionRequest) GetAppId() string { + if o == nil { + var ret string + return ret + } + + return o.AppId +} + +// GetAppIdOk returns a tuple with the AppId field value +// and a boolean to check if the value has been set. +func (o *GenerateSamlAssertionRequest) GetAppIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.AppId, true +} + +// SetAppId sets field value +func (o *GenerateSamlAssertionRequest) SetAppId(v string) { + o.AppId = v +} + +// GetSubdomain returns the Subdomain field value +func (o *GenerateSamlAssertionRequest) GetSubdomain() string { + if o == nil { + var ret string + return ret + } + + return o.Subdomain +} + +// GetSubdomainOk returns a tuple with the Subdomain field value +// and a boolean to check if the value has been set. +func (o *GenerateSamlAssertionRequest) GetSubdomainOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Subdomain, true +} + +// SetSubdomain sets field value +func (o *GenerateSamlAssertionRequest) SetSubdomain(v string) { + o.Subdomain = v +} + +// GetIpAddress returns the IpAddress field value if set, zero value otherwise. +func (o *GenerateSamlAssertionRequest) GetIpAddress() string { + if o == nil || o.IpAddress == nil { + var ret string + return ret + } + return *o.IpAddress +} + +// GetIpAddressOk returns a tuple with the IpAddress field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GenerateSamlAssertionRequest) GetIpAddressOk() (*string, bool) { + if o == nil || o.IpAddress == nil { + return nil, false + } + return o.IpAddress, true +} + +// HasIpAddress returns a boolean if a field has been set. +func (o *GenerateSamlAssertionRequest) HasIpAddress() bool { + if o != nil && o.IpAddress != nil { + return true + } + + return false +} + +// SetIpAddress gets a reference to the given string and assigns it to the IpAddress field. +func (o *GenerateSamlAssertionRequest) SetIpAddress(v string) { + o.IpAddress = &v +} + +func (o GenerateSamlAssertionRequest) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["username_or_email"] = o.UsernameOrEmail + } + if true { + toSerialize["password"] = o.Password + } + if true { + toSerialize["app_id"] = o.AppId + } + if true { + toSerialize["subdomain"] = o.Subdomain + } + if o.IpAddress != nil { + toSerialize["ip_address"] = o.IpAddress + } + return json.Marshal(toSerialize) +} + +type NullableGenerateSamlAssertionRequest struct { + value *GenerateSamlAssertionRequest + isSet bool +} + +func (v NullableGenerateSamlAssertionRequest) Get() *GenerateSamlAssertionRequest { + return v.value +} + +func (v *NullableGenerateSamlAssertionRequest) Set(val *GenerateSamlAssertionRequest) { + v.value = val + v.isSet = true +} + +func (v NullableGenerateSamlAssertionRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableGenerateSamlAssertionRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGenerateSamlAssertionRequest(val *GenerateSamlAssertionRequest) *NullableGenerateSamlAssertionRequest { + return &NullableGenerateSamlAssertionRequest{value: val, isSet: true} +} + +func (v NullableGenerateSamlAssertionRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGenerateSamlAssertionRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_generate_token_200_response.go b/model_generate_token_200_response.go new file mode 100644 index 0000000..908f827 --- /dev/null +++ b/model_generate_token_200_response.go @@ -0,0 +1,295 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// GenerateToken200Response struct for GenerateToken200Response +type GenerateToken200Response struct { + AccessToken *string `json:"access_token,omitempty"` + CreatedAt *string `json:"created_at,omitempty"` + ExpiresIn *int32 `json:"expires_in,omitempty"` + RefreshToken *string `json:"refresh_token,omitempty"` + TokenType *string `json:"token_type,omitempty"` + AccounttId *int32 `json:"accountt_id,omitempty"` +} + +// NewGenerateToken200Response instantiates a new GenerateToken200Response 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 NewGenerateToken200Response() *GenerateToken200Response { + this := GenerateToken200Response{} + return &this +} + +// NewGenerateToken200ResponseWithDefaults instantiates a new GenerateToken200Response 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 NewGenerateToken200ResponseWithDefaults() *GenerateToken200Response { + this := GenerateToken200Response{} + return &this +} + +// GetAccessToken returns the AccessToken field value if set, zero value otherwise. +func (o *GenerateToken200Response) GetAccessToken() string { + if o == nil || o.AccessToken == nil { + var ret string + return ret + } + return *o.AccessToken +} + +// GetAccessTokenOk returns a tuple with the AccessToken field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GenerateToken200Response) GetAccessTokenOk() (*string, bool) { + if o == nil || o.AccessToken == nil { + return nil, false + } + return o.AccessToken, true +} + +// HasAccessToken returns a boolean if a field has been set. +func (o *GenerateToken200Response) HasAccessToken() bool { + if o != nil && o.AccessToken != nil { + return true + } + + return false +} + +// SetAccessToken gets a reference to the given string and assigns it to the AccessToken field. +func (o *GenerateToken200Response) SetAccessToken(v string) { + o.AccessToken = &v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *GenerateToken200Response) GetCreatedAt() string { + if o == nil || o.CreatedAt == nil { + var ret string + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GenerateToken200Response) GetCreatedAtOk() (*string, bool) { + if o == nil || o.CreatedAt == nil { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *GenerateToken200Response) HasCreatedAt() bool { + if o != nil && o.CreatedAt != nil { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given string and assigns it to the CreatedAt field. +func (o *GenerateToken200Response) SetCreatedAt(v string) { + o.CreatedAt = &v +} + +// GetExpiresIn returns the ExpiresIn field value if set, zero value otherwise. +func (o *GenerateToken200Response) GetExpiresIn() int32 { + if o == nil || o.ExpiresIn == nil { + var ret int32 + return ret + } + return *o.ExpiresIn +} + +// GetExpiresInOk returns a tuple with the ExpiresIn field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GenerateToken200Response) GetExpiresInOk() (*int32, bool) { + if o == nil || o.ExpiresIn == nil { + return nil, false + } + return o.ExpiresIn, true +} + +// HasExpiresIn returns a boolean if a field has been set. +func (o *GenerateToken200Response) HasExpiresIn() bool { + if o != nil && o.ExpiresIn != nil { + return true + } + + return false +} + +// SetExpiresIn gets a reference to the given int32 and assigns it to the ExpiresIn field. +func (o *GenerateToken200Response) SetExpiresIn(v int32) { + o.ExpiresIn = &v +} + +// GetRefreshToken returns the RefreshToken field value if set, zero value otherwise. +func (o *GenerateToken200Response) GetRefreshToken() string { + if o == nil || o.RefreshToken == nil { + var ret string + return ret + } + return *o.RefreshToken +} + +// GetRefreshTokenOk returns a tuple with the RefreshToken field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GenerateToken200Response) GetRefreshTokenOk() (*string, bool) { + if o == nil || o.RefreshToken == nil { + return nil, false + } + return o.RefreshToken, true +} + +// HasRefreshToken returns a boolean if a field has been set. +func (o *GenerateToken200Response) HasRefreshToken() bool { + if o != nil && o.RefreshToken != nil { + return true + } + + return false +} + +// SetRefreshToken gets a reference to the given string and assigns it to the RefreshToken field. +func (o *GenerateToken200Response) SetRefreshToken(v string) { + o.RefreshToken = &v +} + +// GetTokenType returns the TokenType field value if set, zero value otherwise. +func (o *GenerateToken200Response) GetTokenType() string { + if o == nil || o.TokenType == nil { + var ret string + return ret + } + return *o.TokenType +} + +// GetTokenTypeOk returns a tuple with the TokenType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GenerateToken200Response) GetTokenTypeOk() (*string, bool) { + if o == nil || o.TokenType == nil { + return nil, false + } + return o.TokenType, true +} + +// HasTokenType returns a boolean if a field has been set. +func (o *GenerateToken200Response) HasTokenType() bool { + if o != nil && o.TokenType != nil { + return true + } + + return false +} + +// SetTokenType gets a reference to the given string and assigns it to the TokenType field. +func (o *GenerateToken200Response) SetTokenType(v string) { + o.TokenType = &v +} + +// GetAccounttId returns the AccounttId field value if set, zero value otherwise. +func (o *GenerateToken200Response) GetAccounttId() int32 { + if o == nil || o.AccounttId == nil { + var ret int32 + return ret + } + return *o.AccounttId +} + +// GetAccounttIdOk returns a tuple with the AccounttId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GenerateToken200Response) GetAccounttIdOk() (*int32, bool) { + if o == nil || o.AccounttId == nil { + return nil, false + } + return o.AccounttId, true +} + +// HasAccounttId returns a boolean if a field has been set. +func (o *GenerateToken200Response) HasAccounttId() bool { + if o != nil && o.AccounttId != nil { + return true + } + + return false +} + +// SetAccounttId gets a reference to the given int32 and assigns it to the AccounttId field. +func (o *GenerateToken200Response) SetAccounttId(v int32) { + o.AccounttId = &v +} + +func (o GenerateToken200Response) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.AccessToken != nil { + toSerialize["access_token"] = o.AccessToken + } + if o.CreatedAt != nil { + toSerialize["created_at"] = o.CreatedAt + } + if o.ExpiresIn != nil { + toSerialize["expires_in"] = o.ExpiresIn + } + if o.RefreshToken != nil { + toSerialize["refresh_token"] = o.RefreshToken + } + if o.TokenType != nil { + toSerialize["token_type"] = o.TokenType + } + if o.AccounttId != nil { + toSerialize["accountt_id"] = o.AccounttId + } + return json.Marshal(toSerialize) +} + +type NullableGenerateToken200Response struct { + value *GenerateToken200Response + isSet bool +} + +func (v NullableGenerateToken200Response) Get() *GenerateToken200Response { + return v.value +} + +func (v *NullableGenerateToken200Response) Set(val *GenerateToken200Response) { + v.value = val + v.isSet = true +} + +func (v NullableGenerateToken200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableGenerateToken200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGenerateToken200Response(val *GenerateToken200Response) *NullableGenerateToken200Response { + return &NullableGenerateToken200Response{value: val, isSet: true} +} + +func (v NullableGenerateToken200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGenerateToken200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_generate_token_400_response.go b/model_generate_token_400_response.go new file mode 100644 index 0000000..2a22ac2 --- /dev/null +++ b/model_generate_token_400_response.go @@ -0,0 +1,115 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// GenerateToken400Response struct for GenerateToken400Response +type GenerateToken400Response struct { + Status *Status `json:"status,omitempty"` +} + +// NewGenerateToken400Response instantiates a new GenerateToken400Response 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 NewGenerateToken400Response() *GenerateToken400Response { + this := GenerateToken400Response{} + return &this +} + +// NewGenerateToken400ResponseWithDefaults instantiates a new GenerateToken400Response 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 NewGenerateToken400ResponseWithDefaults() *GenerateToken400Response { + this := GenerateToken400Response{} + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *GenerateToken400Response) GetStatus() Status { + if o == nil || o.Status == nil { + var ret Status + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GenerateToken400Response) GetStatusOk() (*Status, bool) { + if o == nil || o.Status == nil { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *GenerateToken400Response) HasStatus() bool { + if o != nil && o.Status != nil { + return true + } + + return false +} + +// SetStatus gets a reference to the given Status and assigns it to the Status field. +func (o *GenerateToken400Response) SetStatus(v Status) { + o.Status = &v +} + +func (o GenerateToken400Response) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Status != nil { + toSerialize["status"] = o.Status + } + return json.Marshal(toSerialize) +} + +type NullableGenerateToken400Response struct { + value *GenerateToken400Response + isSet bool +} + +func (v NullableGenerateToken400Response) Get() *GenerateToken400Response { + return v.value +} + +func (v *NullableGenerateToken400Response) Set(val *GenerateToken400Response) { + v.value = val + v.isSet = true +} + +func (v NullableGenerateToken400Response) IsSet() bool { + return v.isSet +} + +func (v *NullableGenerateToken400Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGenerateToken400Response(val *GenerateToken400Response) *NullableGenerateToken400Response { + return &NullableGenerateToken400Response{value: val, isSet: true} +} + +func (v NullableGenerateToken400Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGenerateToken400Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_generate_token_request.go b/model_generate_token_request.go new file mode 100644 index 0000000..bba34fa --- /dev/null +++ b/model_generate_token_request.go @@ -0,0 +1,115 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// GenerateTokenRequest struct for GenerateTokenRequest +type GenerateTokenRequest struct { + GrantType *string `json:"grant_type,omitempty"` +} + +// NewGenerateTokenRequest instantiates a new GenerateTokenRequest 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 NewGenerateTokenRequest() *GenerateTokenRequest { + this := GenerateTokenRequest{} + return &this +} + +// NewGenerateTokenRequestWithDefaults instantiates a new GenerateTokenRequest 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 NewGenerateTokenRequestWithDefaults() *GenerateTokenRequest { + this := GenerateTokenRequest{} + return &this +} + +// GetGrantType returns the GrantType field value if set, zero value otherwise. +func (o *GenerateTokenRequest) GetGrantType() string { + if o == nil || o.GrantType == nil { + var ret string + return ret + } + return *o.GrantType +} + +// GetGrantTypeOk returns a tuple with the GrantType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GenerateTokenRequest) GetGrantTypeOk() (*string, bool) { + if o == nil || o.GrantType == nil { + return nil, false + } + return o.GrantType, true +} + +// HasGrantType returns a boolean if a field has been set. +func (o *GenerateTokenRequest) HasGrantType() bool { + if o != nil && o.GrantType != nil { + return true + } + + return false +} + +// SetGrantType gets a reference to the given string and assigns it to the GrantType field. +func (o *GenerateTokenRequest) SetGrantType(v string) { + o.GrantType = &v +} + +func (o GenerateTokenRequest) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.GrantType != nil { + toSerialize["grant_type"] = o.GrantType + } + return json.Marshal(toSerialize) +} + +type NullableGenerateTokenRequest struct { + value *GenerateTokenRequest + isSet bool +} + +func (v NullableGenerateTokenRequest) Get() *GenerateTokenRequest { + return v.value +} + +func (v *NullableGenerateTokenRequest) Set(val *GenerateTokenRequest) { + v.value = val + v.isSet = true +} + +func (v NullableGenerateTokenRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableGenerateTokenRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGenerateTokenRequest(val *GenerateTokenRequest) *NullableGenerateTokenRequest { + return &NullableGenerateTokenRequest{value: val, isSet: true} +} + +func (v NullableGenerateTokenRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGenerateTokenRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_get_authorization_server_200_response.go b/model_get_authorization_server_200_response.go new file mode 100644 index 0000000..913da1a --- /dev/null +++ b/model_get_authorization_server_200_response.go @@ -0,0 +1,223 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// GetAuthorizationServer200Response struct for GetAuthorizationServer200Response +type GetAuthorizationServer200Response struct { + Configuration *AuthServerConfiguration `json:"configuration,omitempty"` + Id *int32 `json:"id,omitempty"` + Description *string `json:"description,omitempty"` + Name *string `json:"name,omitempty"` +} + +// NewGetAuthorizationServer200Response instantiates a new GetAuthorizationServer200Response 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 NewGetAuthorizationServer200Response() *GetAuthorizationServer200Response { + this := GetAuthorizationServer200Response{} + return &this +} + +// NewGetAuthorizationServer200ResponseWithDefaults instantiates a new GetAuthorizationServer200Response 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 NewGetAuthorizationServer200ResponseWithDefaults() *GetAuthorizationServer200Response { + this := GetAuthorizationServer200Response{} + return &this +} + +// GetConfiguration returns the Configuration field value if set, zero value otherwise. +func (o *GetAuthorizationServer200Response) GetConfiguration() AuthServerConfiguration { + if o == nil || o.Configuration == nil { + var ret AuthServerConfiguration + return ret + } + return *o.Configuration +} + +// GetConfigurationOk returns a tuple with the Configuration field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetAuthorizationServer200Response) GetConfigurationOk() (*AuthServerConfiguration, bool) { + if o == nil || o.Configuration == nil { + return nil, false + } + return o.Configuration, true +} + +// HasConfiguration returns a boolean if a field has been set. +func (o *GetAuthorizationServer200Response) HasConfiguration() bool { + if o != nil && o.Configuration != nil { + return true + } + + return false +} + +// SetConfiguration gets a reference to the given AuthServerConfiguration and assigns it to the Configuration field. +func (o *GetAuthorizationServer200Response) SetConfiguration(v AuthServerConfiguration) { + o.Configuration = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *GetAuthorizationServer200Response) GetId() int32 { + if o == nil || o.Id == nil { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetAuthorizationServer200Response) GetIdOk() (*int32, bool) { + if o == nil || o.Id == nil { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *GetAuthorizationServer200Response) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *GetAuthorizationServer200Response) SetId(v int32) { + o.Id = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *GetAuthorizationServer200Response) GetDescription() string { + if o == nil || o.Description == nil { + var ret string + return ret + } + return *o.Description +} + +// 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 *GetAuthorizationServer200Response) GetDescriptionOk() (*string, bool) { + if o == nil || o.Description == nil { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *GetAuthorizationServer200Response) HasDescription() bool { + if o != nil && o.Description != nil { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *GetAuthorizationServer200Response) SetDescription(v string) { + o.Description = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *GetAuthorizationServer200Response) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// 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 *GetAuthorizationServer200Response) GetNameOk() (*string, bool) { + if o == nil || o.Name == nil { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *GetAuthorizationServer200Response) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *GetAuthorizationServer200Response) SetName(v string) { + o.Name = &v +} + +func (o GetAuthorizationServer200Response) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Configuration != nil { + toSerialize["configuration"] = o.Configuration + } + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Description != nil { + toSerialize["description"] = o.Description + } + if o.Name != nil { + toSerialize["name"] = o.Name + } + return json.Marshal(toSerialize) +} + +type NullableGetAuthorizationServer200Response struct { + value *GetAuthorizationServer200Response + isSet bool +} + +func (v NullableGetAuthorizationServer200Response) Get() *GetAuthorizationServer200Response { + return v.value +} + +func (v *NullableGetAuthorizationServer200Response) Set(val *GetAuthorizationServer200Response) { + v.value = val + v.isSet = true +} + +func (v NullableGetAuthorizationServer200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableGetAuthorizationServer200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetAuthorizationServer200Response(val *GetAuthorizationServer200Response) *NullableGetAuthorizationServer200Response { + return &NullableGetAuthorizationServer200Response{value: val, isSet: true} +} + +func (v NullableGetAuthorizationServer200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetAuthorizationServer200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_get_available_factors_200_response_inner.go b/model_get_available_factors_200_response_inner.go new file mode 100644 index 0000000..a786d0b --- /dev/null +++ b/model_get_available_factors_200_response_inner.go @@ -0,0 +1,190 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// GetAvailableFactors200ResponseInner struct for GetAvailableFactors200ResponseInner +type GetAvailableFactors200ResponseInner struct { + // Identifier for the factor which will be used for user enrollment + FactorId *int32 `json:"factor_id,omitempty"` + // Authentication factor name, as it appears to administrators in OneLogin. + Name *string `json:"name,omitempty"` + // Internal use only + AuthFactorName *string `json:"auth_factor_name,omitempty"` +} + +// NewGetAvailableFactors200ResponseInner instantiates a new GetAvailableFactors200ResponseInner 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 NewGetAvailableFactors200ResponseInner() *GetAvailableFactors200ResponseInner { + this := GetAvailableFactors200ResponseInner{} + return &this +} + +// NewGetAvailableFactors200ResponseInnerWithDefaults instantiates a new GetAvailableFactors200ResponseInner 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 NewGetAvailableFactors200ResponseInnerWithDefaults() *GetAvailableFactors200ResponseInner { + this := GetAvailableFactors200ResponseInner{} + return &this +} + +// GetFactorId returns the FactorId field value if set, zero value otherwise. +func (o *GetAvailableFactors200ResponseInner) GetFactorId() int32 { + if o == nil || o.FactorId == nil { + var ret int32 + return ret + } + return *o.FactorId +} + +// GetFactorIdOk returns a tuple with the FactorId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetAvailableFactors200ResponseInner) GetFactorIdOk() (*int32, bool) { + if o == nil || o.FactorId == nil { + return nil, false + } + return o.FactorId, true +} + +// HasFactorId returns a boolean if a field has been set. +func (o *GetAvailableFactors200ResponseInner) HasFactorId() bool { + if o != nil && o.FactorId != nil { + return true + } + + return false +} + +// SetFactorId gets a reference to the given int32 and assigns it to the FactorId field. +func (o *GetAvailableFactors200ResponseInner) SetFactorId(v int32) { + o.FactorId = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *GetAvailableFactors200ResponseInner) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// 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 *GetAvailableFactors200ResponseInner) GetNameOk() (*string, bool) { + if o == nil || o.Name == nil { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *GetAvailableFactors200ResponseInner) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *GetAvailableFactors200ResponseInner) SetName(v string) { + o.Name = &v +} + +// GetAuthFactorName returns the AuthFactorName field value if set, zero value otherwise. +func (o *GetAvailableFactors200ResponseInner) GetAuthFactorName() string { + if o == nil || o.AuthFactorName == nil { + var ret string + return ret + } + return *o.AuthFactorName +} + +// GetAuthFactorNameOk returns a tuple with the AuthFactorName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetAvailableFactors200ResponseInner) GetAuthFactorNameOk() (*string, bool) { + if o == nil || o.AuthFactorName == nil { + return nil, false + } + return o.AuthFactorName, true +} + +// HasAuthFactorName returns a boolean if a field has been set. +func (o *GetAvailableFactors200ResponseInner) HasAuthFactorName() bool { + if o != nil && o.AuthFactorName != nil { + return true + } + + return false +} + +// SetAuthFactorName gets a reference to the given string and assigns it to the AuthFactorName field. +func (o *GetAvailableFactors200ResponseInner) SetAuthFactorName(v string) { + o.AuthFactorName = &v +} + +func (o GetAvailableFactors200ResponseInner) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.FactorId != nil { + toSerialize["factor_id"] = o.FactorId + } + if o.Name != nil { + toSerialize["name"] = o.Name + } + if o.AuthFactorName != nil { + toSerialize["auth_factor_name"] = o.AuthFactorName + } + return json.Marshal(toSerialize) +} + +type NullableGetAvailableFactors200ResponseInner struct { + value *GetAvailableFactors200ResponseInner + isSet bool +} + +func (v NullableGetAvailableFactors200ResponseInner) Get() *GetAvailableFactors200ResponseInner { + return v.value +} + +func (v *NullableGetAvailableFactors200ResponseInner) Set(val *GetAvailableFactors200ResponseInner) { + v.value = val + v.isSet = true +} + +func (v NullableGetAvailableFactors200ResponseInner) IsSet() bool { + return v.isSet +} + +func (v *NullableGetAvailableFactors200ResponseInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetAvailableFactors200ResponseInner(val *GetAvailableFactors200ResponseInner) *NullableGetAvailableFactors200ResponseInner { + return &NullableGetAvailableFactors200ResponseInner{value: val, isSet: true} +} + +func (v NullableGetAvailableFactors200ResponseInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetAvailableFactors200ResponseInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_get_client_apps_200_response_inner.go b/model_get_client_apps_200_response_inner.go new file mode 100644 index 0000000..fd594f1 --- /dev/null +++ b/model_get_client_apps_200_response_inner.go @@ -0,0 +1,223 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// GetClientApps200ResponseInner struct for GetClientApps200ResponseInner +type GetClientApps200ResponseInner struct { + Scopes []GetClientApps200ResponseInnerScopesInner `json:"scopes,omitempty"` + AppId *int32 `json:"app_id,omitempty"` + Name *string `json:"name,omitempty"` + ApiAuthId *int32 `json:"api_auth_id,omitempty"` +} + +// NewGetClientApps200ResponseInner instantiates a new GetClientApps200ResponseInner 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 NewGetClientApps200ResponseInner() *GetClientApps200ResponseInner { + this := GetClientApps200ResponseInner{} + return &this +} + +// NewGetClientApps200ResponseInnerWithDefaults instantiates a new GetClientApps200ResponseInner 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 NewGetClientApps200ResponseInnerWithDefaults() *GetClientApps200ResponseInner { + this := GetClientApps200ResponseInner{} + return &this +} + +// GetScopes returns the Scopes field value if set, zero value otherwise. +func (o *GetClientApps200ResponseInner) GetScopes() []GetClientApps200ResponseInnerScopesInner { + if o == nil || o.Scopes == nil { + var ret []GetClientApps200ResponseInnerScopesInner + return ret + } + return o.Scopes +} + +// GetScopesOk returns a tuple with the Scopes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetClientApps200ResponseInner) GetScopesOk() ([]GetClientApps200ResponseInnerScopesInner, bool) { + if o == nil || o.Scopes == nil { + return nil, false + } + return o.Scopes, true +} + +// HasScopes returns a boolean if a field has been set. +func (o *GetClientApps200ResponseInner) HasScopes() bool { + if o != nil && o.Scopes != nil { + return true + } + + return false +} + +// SetScopes gets a reference to the given []GetClientApps200ResponseInnerScopesInner and assigns it to the Scopes field. +func (o *GetClientApps200ResponseInner) SetScopes(v []GetClientApps200ResponseInnerScopesInner) { + o.Scopes = v +} + +// GetAppId returns the AppId field value if set, zero value otherwise. +func (o *GetClientApps200ResponseInner) GetAppId() int32 { + if o == nil || o.AppId == nil { + var ret int32 + return ret + } + return *o.AppId +} + +// GetAppIdOk returns a tuple with the AppId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetClientApps200ResponseInner) GetAppIdOk() (*int32, bool) { + if o == nil || o.AppId == nil { + return nil, false + } + return o.AppId, true +} + +// HasAppId returns a boolean if a field has been set. +func (o *GetClientApps200ResponseInner) HasAppId() bool { + if o != nil && o.AppId != nil { + return true + } + + return false +} + +// SetAppId gets a reference to the given int32 and assigns it to the AppId field. +func (o *GetClientApps200ResponseInner) SetAppId(v int32) { + o.AppId = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *GetClientApps200ResponseInner) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// 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 *GetClientApps200ResponseInner) GetNameOk() (*string, bool) { + if o == nil || o.Name == nil { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *GetClientApps200ResponseInner) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *GetClientApps200ResponseInner) SetName(v string) { + o.Name = &v +} + +// GetApiAuthId returns the ApiAuthId field value if set, zero value otherwise. +func (o *GetClientApps200ResponseInner) GetApiAuthId() int32 { + if o == nil || o.ApiAuthId == nil { + var ret int32 + return ret + } + return *o.ApiAuthId +} + +// GetApiAuthIdOk returns a tuple with the ApiAuthId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetClientApps200ResponseInner) GetApiAuthIdOk() (*int32, bool) { + if o == nil || o.ApiAuthId == nil { + return nil, false + } + return o.ApiAuthId, true +} + +// HasApiAuthId returns a boolean if a field has been set. +func (o *GetClientApps200ResponseInner) HasApiAuthId() bool { + if o != nil && o.ApiAuthId != nil { + return true + } + + return false +} + +// SetApiAuthId gets a reference to the given int32 and assigns it to the ApiAuthId field. +func (o *GetClientApps200ResponseInner) SetApiAuthId(v int32) { + o.ApiAuthId = &v +} + +func (o GetClientApps200ResponseInner) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Scopes != nil { + toSerialize["scopes"] = o.Scopes + } + if o.AppId != nil { + toSerialize["app_id"] = o.AppId + } + if o.Name != nil { + toSerialize["name"] = o.Name + } + if o.ApiAuthId != nil { + toSerialize["api_auth_id"] = o.ApiAuthId + } + return json.Marshal(toSerialize) +} + +type NullableGetClientApps200ResponseInner struct { + value *GetClientApps200ResponseInner + isSet bool +} + +func (v NullableGetClientApps200ResponseInner) Get() *GetClientApps200ResponseInner { + return v.value +} + +func (v *NullableGetClientApps200ResponseInner) Set(val *GetClientApps200ResponseInner) { + v.value = val + v.isSet = true +} + +func (v NullableGetClientApps200ResponseInner) IsSet() bool { + return v.isSet +} + +func (v *NullableGetClientApps200ResponseInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetClientApps200ResponseInner(val *GetClientApps200ResponseInner) *NullableGetClientApps200ResponseInner { + return &NullableGetClientApps200ResponseInner{value: val, isSet: true} +} + +func (v NullableGetClientApps200ResponseInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetClientApps200ResponseInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_get_client_apps_200_response_inner_scopes_inner.go b/model_get_client_apps_200_response_inner_scopes_inner.go new file mode 100644 index 0000000..9038a7e --- /dev/null +++ b/model_get_client_apps_200_response_inner_scopes_inner.go @@ -0,0 +1,187 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// GetClientApps200ResponseInnerScopesInner struct for GetClientApps200ResponseInnerScopesInner +type GetClientApps200ResponseInnerScopesInner struct { + Description *string `json:"description,omitempty"` + Value *string `json:"value,omitempty"` + Id *int32 `json:"id,omitempty"` +} + +// NewGetClientApps200ResponseInnerScopesInner instantiates a new GetClientApps200ResponseInnerScopesInner 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 NewGetClientApps200ResponseInnerScopesInner() *GetClientApps200ResponseInnerScopesInner { + this := GetClientApps200ResponseInnerScopesInner{} + return &this +} + +// NewGetClientApps200ResponseInnerScopesInnerWithDefaults instantiates a new GetClientApps200ResponseInnerScopesInner 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 NewGetClientApps200ResponseInnerScopesInnerWithDefaults() *GetClientApps200ResponseInnerScopesInner { + this := GetClientApps200ResponseInnerScopesInner{} + return &this +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *GetClientApps200ResponseInnerScopesInner) GetDescription() string { + if o == nil || o.Description == nil { + var ret string + return ret + } + return *o.Description +} + +// 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 *GetClientApps200ResponseInnerScopesInner) GetDescriptionOk() (*string, bool) { + if o == nil || o.Description == nil { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *GetClientApps200ResponseInnerScopesInner) HasDescription() bool { + if o != nil && o.Description != nil { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *GetClientApps200ResponseInnerScopesInner) SetDescription(v string) { + o.Description = &v +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *GetClientApps200ResponseInnerScopesInner) GetValue() string { + if o == nil || o.Value == nil { + var ret string + return ret + } + return *o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetClientApps200ResponseInnerScopesInner) GetValueOk() (*string, bool) { + if o == nil || o.Value == nil { + return nil, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *GetClientApps200ResponseInnerScopesInner) HasValue() bool { + if o != nil && o.Value != nil { + return true + } + + return false +} + +// SetValue gets a reference to the given string and assigns it to the Value field. +func (o *GetClientApps200ResponseInnerScopesInner) SetValue(v string) { + o.Value = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *GetClientApps200ResponseInnerScopesInner) GetId() int32 { + if o == nil || o.Id == nil { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetClientApps200ResponseInnerScopesInner) GetIdOk() (*int32, bool) { + if o == nil || o.Id == nil { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *GetClientApps200ResponseInnerScopesInner) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *GetClientApps200ResponseInnerScopesInner) SetId(v int32) { + o.Id = &v +} + +func (o GetClientApps200ResponseInnerScopesInner) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Description != nil { + toSerialize["description"] = o.Description + } + if o.Value != nil { + toSerialize["value"] = o.Value + } + if o.Id != nil { + toSerialize["id"] = o.Id + } + return json.Marshal(toSerialize) +} + +type NullableGetClientApps200ResponseInnerScopesInner struct { + value *GetClientApps200ResponseInnerScopesInner + isSet bool +} + +func (v NullableGetClientApps200ResponseInnerScopesInner) Get() *GetClientApps200ResponseInnerScopesInner { + return v.value +} + +func (v *NullableGetClientApps200ResponseInnerScopesInner) Set(val *GetClientApps200ResponseInnerScopesInner) { + v.value = val + v.isSet = true +} + +func (v NullableGetClientApps200ResponseInnerScopesInner) IsSet() bool { + return v.isSet +} + +func (v *NullableGetClientApps200ResponseInnerScopesInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetClientApps200ResponseInnerScopesInner(val *GetClientApps200ResponseInnerScopesInner) *NullableGetClientApps200ResponseInnerScopesInner { + return &NullableGetClientApps200ResponseInnerScopesInner{value: val, isSet: true} +} + +func (v NullableGetClientApps200ResponseInnerScopesInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetClientApps200ResponseInnerScopesInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_get_rate_limit_200_response.go b/model_get_rate_limit_200_response.go new file mode 100644 index 0000000..2a13518 --- /dev/null +++ b/model_get_rate_limit_200_response.go @@ -0,0 +1,151 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// GetRateLimit200Response struct for GetRateLimit200Response +type GetRateLimit200Response struct { + Status *Status `json:"status,omitempty"` + Data *GetRateLimit200ResponseData `json:"data,omitempty"` +} + +// NewGetRateLimit200Response instantiates a new GetRateLimit200Response 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 NewGetRateLimit200Response() *GetRateLimit200Response { + this := GetRateLimit200Response{} + return &this +} + +// NewGetRateLimit200ResponseWithDefaults instantiates a new GetRateLimit200Response 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 NewGetRateLimit200ResponseWithDefaults() *GetRateLimit200Response { + this := GetRateLimit200Response{} + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *GetRateLimit200Response) GetStatus() Status { + if o == nil || o.Status == nil { + var ret Status + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRateLimit200Response) GetStatusOk() (*Status, bool) { + if o == nil || o.Status == nil { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *GetRateLimit200Response) HasStatus() bool { + if o != nil && o.Status != nil { + return true + } + + return false +} + +// SetStatus gets a reference to the given Status and assigns it to the Status field. +func (o *GetRateLimit200Response) SetStatus(v Status) { + o.Status = &v +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *GetRateLimit200Response) GetData() GetRateLimit200ResponseData { + if o == nil || o.Data == nil { + var ret GetRateLimit200ResponseData + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRateLimit200Response) GetDataOk() (*GetRateLimit200ResponseData, bool) { + if o == nil || o.Data == nil { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *GetRateLimit200Response) HasData() bool { + if o != nil && o.Data != nil { + return true + } + + return false +} + +// SetData gets a reference to the given GetRateLimit200ResponseData and assigns it to the Data field. +func (o *GetRateLimit200Response) SetData(v GetRateLimit200ResponseData) { + o.Data = &v +} + +func (o GetRateLimit200Response) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Status != nil { + toSerialize["status"] = o.Status + } + if o.Data != nil { + toSerialize["data"] = o.Data + } + return json.Marshal(toSerialize) +} + +type NullableGetRateLimit200Response struct { + value *GetRateLimit200Response + isSet bool +} + +func (v NullableGetRateLimit200Response) Get() *GetRateLimit200Response { + return v.value +} + +func (v *NullableGetRateLimit200Response) Set(val *GetRateLimit200Response) { + v.value = val + v.isSet = true +} + +func (v NullableGetRateLimit200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableGetRateLimit200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetRateLimit200Response(val *GetRateLimit200Response) *NullableGetRateLimit200Response { + return &NullableGetRateLimit200Response{value: val, isSet: true} +} + +func (v NullableGetRateLimit200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetRateLimit200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_get_rate_limit_200_response_data.go b/model_get_rate_limit_200_response_data.go new file mode 100644 index 0000000..ffa0310 --- /dev/null +++ b/model_get_rate_limit_200_response_data.go @@ -0,0 +1,187 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// GetRateLimit200ResponseData struct for GetRateLimit200ResponseData +type GetRateLimit200ResponseData struct { + XRateLimitLimit *int32 `json:"X-RateLimit-Limit,omitempty"` + XRateLimitRemaining *int32 `json:"X-RateLimit-Remaining,omitempty"` + XRateLimitReset *int32 `json:"X-RateLimit-Reset,omitempty"` +} + +// NewGetRateLimit200ResponseData instantiates a new GetRateLimit200ResponseData 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 NewGetRateLimit200ResponseData() *GetRateLimit200ResponseData { + this := GetRateLimit200ResponseData{} + return &this +} + +// NewGetRateLimit200ResponseDataWithDefaults instantiates a new GetRateLimit200ResponseData 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 NewGetRateLimit200ResponseDataWithDefaults() *GetRateLimit200ResponseData { + this := GetRateLimit200ResponseData{} + return &this +} + +// GetXRateLimitLimit returns the XRateLimitLimit field value if set, zero value otherwise. +func (o *GetRateLimit200ResponseData) GetXRateLimitLimit() int32 { + if o == nil || o.XRateLimitLimit == nil { + var ret int32 + return ret + } + return *o.XRateLimitLimit +} + +// GetXRateLimitLimitOk returns a tuple with the XRateLimitLimit field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRateLimit200ResponseData) GetXRateLimitLimitOk() (*int32, bool) { + if o == nil || o.XRateLimitLimit == nil { + return nil, false + } + return o.XRateLimitLimit, true +} + +// HasXRateLimitLimit returns a boolean if a field has been set. +func (o *GetRateLimit200ResponseData) HasXRateLimitLimit() bool { + if o != nil && o.XRateLimitLimit != nil { + return true + } + + return false +} + +// SetXRateLimitLimit gets a reference to the given int32 and assigns it to the XRateLimitLimit field. +func (o *GetRateLimit200ResponseData) SetXRateLimitLimit(v int32) { + o.XRateLimitLimit = &v +} + +// GetXRateLimitRemaining returns the XRateLimitRemaining field value if set, zero value otherwise. +func (o *GetRateLimit200ResponseData) GetXRateLimitRemaining() int32 { + if o == nil || o.XRateLimitRemaining == nil { + var ret int32 + return ret + } + return *o.XRateLimitRemaining +} + +// GetXRateLimitRemainingOk returns a tuple with the XRateLimitRemaining field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRateLimit200ResponseData) GetXRateLimitRemainingOk() (*int32, bool) { + if o == nil || o.XRateLimitRemaining == nil { + return nil, false + } + return o.XRateLimitRemaining, true +} + +// HasXRateLimitRemaining returns a boolean if a field has been set. +func (o *GetRateLimit200ResponseData) HasXRateLimitRemaining() bool { + if o != nil && o.XRateLimitRemaining != nil { + return true + } + + return false +} + +// SetXRateLimitRemaining gets a reference to the given int32 and assigns it to the XRateLimitRemaining field. +func (o *GetRateLimit200ResponseData) SetXRateLimitRemaining(v int32) { + o.XRateLimitRemaining = &v +} + +// GetXRateLimitReset returns the XRateLimitReset field value if set, zero value otherwise. +func (o *GetRateLimit200ResponseData) GetXRateLimitReset() int32 { + if o == nil || o.XRateLimitReset == nil { + var ret int32 + return ret + } + return *o.XRateLimitReset +} + +// GetXRateLimitResetOk returns a tuple with the XRateLimitReset field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRateLimit200ResponseData) GetXRateLimitResetOk() (*int32, bool) { + if o == nil || o.XRateLimitReset == nil { + return nil, false + } + return o.XRateLimitReset, true +} + +// HasXRateLimitReset returns a boolean if a field has been set. +func (o *GetRateLimit200ResponseData) HasXRateLimitReset() bool { + if o != nil && o.XRateLimitReset != nil { + return true + } + + return false +} + +// SetXRateLimitReset gets a reference to the given int32 and assigns it to the XRateLimitReset field. +func (o *GetRateLimit200ResponseData) SetXRateLimitReset(v int32) { + o.XRateLimitReset = &v +} + +func (o GetRateLimit200ResponseData) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.XRateLimitLimit != nil { + toSerialize["X-RateLimit-Limit"] = o.XRateLimitLimit + } + if o.XRateLimitRemaining != nil { + toSerialize["X-RateLimit-Remaining"] = o.XRateLimitRemaining + } + if o.XRateLimitReset != nil { + toSerialize["X-RateLimit-Reset"] = o.XRateLimitReset + } + return json.Marshal(toSerialize) +} + +type NullableGetRateLimit200ResponseData struct { + value *GetRateLimit200ResponseData + isSet bool +} + +func (v NullableGetRateLimit200ResponseData) Get() *GetRateLimit200ResponseData { + return v.value +} + +func (v *NullableGetRateLimit200ResponseData) Set(val *GetRateLimit200ResponseData) { + v.value = val + v.isSet = true +} + +func (v NullableGetRateLimit200ResponseData) IsSet() bool { + return v.isSet +} + +func (v *NullableGetRateLimit200ResponseData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetRateLimit200ResponseData(val *GetRateLimit200ResponseData) *NullableGetRateLimit200ResponseData { + return &NullableGetRateLimit200ResponseData{value: val, isSet: true} +} + +func (v NullableGetRateLimit200ResponseData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetRateLimit200ResponseData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_get_risk_score_200_response.go b/model_get_risk_score_200_response.go new file mode 100644 index 0000000..6594068 --- /dev/null +++ b/model_get_risk_score_200_response.go @@ -0,0 +1,153 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// GetRiskScore200Response struct for GetRiskScore200Response +type GetRiskScore200Response struct { + // A risk score 0 is low risk and 100 is the highest risk level possible. + Score *float32 `json:"score,omitempty"` + // Triggers are indicators of some of the key items that influenced the risk score. + Triggers []string `json:"triggers,omitempty"` +} + +// NewGetRiskScore200Response instantiates a new GetRiskScore200Response 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 NewGetRiskScore200Response() *GetRiskScore200Response { + this := GetRiskScore200Response{} + return &this +} + +// NewGetRiskScore200ResponseWithDefaults instantiates a new GetRiskScore200Response 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 NewGetRiskScore200ResponseWithDefaults() *GetRiskScore200Response { + this := GetRiskScore200Response{} + return &this +} + +// GetScore returns the Score field value if set, zero value otherwise. +func (o *GetRiskScore200Response) GetScore() float32 { + if o == nil || o.Score == nil { + var ret float32 + return ret + } + return *o.Score +} + +// 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 *GetRiskScore200Response) GetScoreOk() (*float32, bool) { + if o == nil || o.Score == nil { + return nil, false + } + return o.Score, true +} + +// HasScore returns a boolean if a field has been set. +func (o *GetRiskScore200Response) HasScore() bool { + if o != nil && o.Score != nil { + return true + } + + return false +} + +// SetScore gets a reference to the given float32 and assigns it to the Score field. +func (o *GetRiskScore200Response) SetScore(v float32) { + o.Score = &v +} + +// GetTriggers returns the Triggers field value if set, zero value otherwise. +func (o *GetRiskScore200Response) GetTriggers() []string { + if o == nil || o.Triggers == nil { + var ret []string + return ret + } + return o.Triggers +} + +// GetTriggersOk returns a tuple with the Triggers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRiskScore200Response) GetTriggersOk() ([]string, bool) { + if o == nil || o.Triggers == nil { + return nil, false + } + return o.Triggers, true +} + +// HasTriggers returns a boolean if a field has been set. +func (o *GetRiskScore200Response) HasTriggers() bool { + if o != nil && o.Triggers != nil { + return true + } + + return false +} + +// SetTriggers gets a reference to the given []string and assigns it to the Triggers field. +func (o *GetRiskScore200Response) SetTriggers(v []string) { + o.Triggers = v +} + +func (o GetRiskScore200Response) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Score != nil { + toSerialize["score"] = o.Score + } + if o.Triggers != nil { + toSerialize["triggers"] = o.Triggers + } + return json.Marshal(toSerialize) +} + +type NullableGetRiskScore200Response struct { + value *GetRiskScore200Response + isSet bool +} + +func (v NullableGetRiskScore200Response) Get() *GetRiskScore200Response { + return v.value +} + +func (v *NullableGetRiskScore200Response) Set(val *GetRiskScore200Response) { + v.value = val + v.isSet = true +} + +func (v NullableGetRiskScore200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableGetRiskScore200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetRiskScore200Response(val *GetRiskScore200Response) *NullableGetRiskScore200Response { + return &NullableGetRiskScore200Response{value: val, isSet: true} +} + +func (v NullableGetRiskScore200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetRiskScore200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_get_risk_score_400_response.go b/model_get_risk_score_400_response.go new file mode 100644 index 0000000..b7bc964 --- /dev/null +++ b/model_get_risk_score_400_response.go @@ -0,0 +1,115 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// GetRiskScore400Response struct for GetRiskScore400Response +type GetRiskScore400Response struct { + Messages []string `json:"messages,omitempty"` +} + +// NewGetRiskScore400Response instantiates a new GetRiskScore400Response 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 NewGetRiskScore400Response() *GetRiskScore400Response { + this := GetRiskScore400Response{} + return &this +} + +// NewGetRiskScore400ResponseWithDefaults instantiates a new GetRiskScore400Response 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 NewGetRiskScore400ResponseWithDefaults() *GetRiskScore400Response { + this := GetRiskScore400Response{} + return &this +} + +// GetMessages returns the Messages field value if set, zero value otherwise. +func (o *GetRiskScore400Response) GetMessages() []string { + if o == nil || o.Messages == nil { + var ret []string + return ret + } + return o.Messages +} + +// GetMessagesOk returns a tuple with the Messages field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRiskScore400Response) GetMessagesOk() ([]string, bool) { + if o == nil || o.Messages == nil { + return nil, false + } + return o.Messages, true +} + +// HasMessages returns a boolean if a field has been set. +func (o *GetRiskScore400Response) HasMessages() bool { + if o != nil && o.Messages != nil { + return true + } + + return false +} + +// SetMessages gets a reference to the given []string and assigns it to the Messages field. +func (o *GetRiskScore400Response) SetMessages(v []string) { + o.Messages = v +} + +func (o GetRiskScore400Response) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Messages != nil { + toSerialize["messages"] = o.Messages + } + return json.Marshal(toSerialize) +} + +type NullableGetRiskScore400Response struct { + value *GetRiskScore400Response + isSet bool +} + +func (v NullableGetRiskScore400Response) Get() *GetRiskScore400Response { + return v.value +} + +func (v *NullableGetRiskScore400Response) Set(val *GetRiskScore400Response) { + v.value = val + v.isSet = true +} + +func (v NullableGetRiskScore400Response) IsSet() bool { + return v.isSet +} + +func (v *NullableGetRiskScore400Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetRiskScore400Response(val *GetRiskScore400Response) *NullableGetRiskScore400Response { + return &NullableGetRiskScore400Response{value: val, isSet: true} +} + +func (v NullableGetRiskScore400Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetRiskScore400Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_get_risk_score_request.go b/model_get_risk_score_request.go new file mode 100644 index 0000000..7cc1382 --- /dev/null +++ b/model_get_risk_score_request.go @@ -0,0 +1,313 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// GetRiskScoreRequest struct for GetRiskScoreRequest +type GetRiskScoreRequest struct { + // The IP address of the User's request. + Ip string `json:"ip"` + // The user agent of the User's request. + UserAgent string `json:"user_agent"` + User RiskUser `json:"user"` + Source *Source `json:"source,omitempty"` + Session *Session `json:"session,omitempty"` + Device *RiskDevice `json:"device,omitempty"` + // Set to the value of the __tdli_fp cookie. + Fp *string `json:"fp,omitempty"` +} + +// NewGetRiskScoreRequest instantiates a new GetRiskScoreRequest 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 NewGetRiskScoreRequest(ip string, userAgent string, user RiskUser) *GetRiskScoreRequest { + this := GetRiskScoreRequest{} + this.Ip = ip + this.UserAgent = userAgent + this.User = user + return &this +} + +// NewGetRiskScoreRequestWithDefaults instantiates a new GetRiskScoreRequest 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 NewGetRiskScoreRequestWithDefaults() *GetRiskScoreRequest { + this := GetRiskScoreRequest{} + return &this +} + +// GetIp returns the Ip field value +func (o *GetRiskScoreRequest) GetIp() string { + if o == nil { + var ret string + return ret + } + + return o.Ip +} + +// GetIpOk returns a tuple with the Ip field value +// and a boolean to check if the value has been set. +func (o *GetRiskScoreRequest) GetIpOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Ip, true +} + +// SetIp sets field value +func (o *GetRiskScoreRequest) SetIp(v string) { + o.Ip = v +} + +// GetUserAgent returns the UserAgent field value +func (o *GetRiskScoreRequest) GetUserAgent() string { + if o == nil { + var ret string + return ret + } + + return o.UserAgent +} + +// GetUserAgentOk returns a tuple with the UserAgent field value +// and a boolean to check if the value has been set. +func (o *GetRiskScoreRequest) GetUserAgentOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.UserAgent, true +} + +// SetUserAgent sets field value +func (o *GetRiskScoreRequest) SetUserAgent(v string) { + o.UserAgent = v +} + +// GetUser returns the User field value +func (o *GetRiskScoreRequest) GetUser() RiskUser { + if o == nil { + var ret RiskUser + return ret + } + + return o.User +} + +// GetUserOk returns a tuple with the User field value +// and a boolean to check if the value has been set. +func (o *GetRiskScoreRequest) GetUserOk() (*RiskUser, bool) { + if o == nil { + return nil, false + } + return &o.User, true +} + +// SetUser sets field value +func (o *GetRiskScoreRequest) SetUser(v RiskUser) { + o.User = v +} + +// GetSource returns the Source field value if set, zero value otherwise. +func (o *GetRiskScoreRequest) GetSource() Source { + if o == nil || o.Source == nil { + var ret Source + return ret + } + return *o.Source +} + +// GetSourceOk returns a tuple with the Source field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRiskScoreRequest) GetSourceOk() (*Source, bool) { + if o == nil || o.Source == nil { + return nil, false + } + return o.Source, true +} + +// HasSource returns a boolean if a field has been set. +func (o *GetRiskScoreRequest) HasSource() bool { + if o != nil && o.Source != nil { + return true + } + + return false +} + +// SetSource gets a reference to the given Source and assigns it to the Source field. +func (o *GetRiskScoreRequest) SetSource(v Source) { + o.Source = &v +} + +// GetSession returns the Session field value if set, zero value otherwise. +func (o *GetRiskScoreRequest) GetSession() Session { + if o == nil || o.Session == nil { + var ret Session + return ret + } + return *o.Session +} + +// GetSessionOk returns a tuple with the Session field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRiskScoreRequest) GetSessionOk() (*Session, bool) { + if o == nil || o.Session == nil { + return nil, false + } + return o.Session, true +} + +// HasSession returns a boolean if a field has been set. +func (o *GetRiskScoreRequest) HasSession() bool { + if o != nil && o.Session != nil { + return true + } + + return false +} + +// SetSession gets a reference to the given Session and assigns it to the Session field. +func (o *GetRiskScoreRequest) SetSession(v Session) { + o.Session = &v +} + +// GetDevice returns the Device field value if set, zero value otherwise. +func (o *GetRiskScoreRequest) GetDevice() RiskDevice { + if o == nil || o.Device == nil { + var ret RiskDevice + return ret + } + return *o.Device +} + +// GetDeviceOk returns a tuple with the Device field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRiskScoreRequest) GetDeviceOk() (*RiskDevice, bool) { + if o == nil || o.Device == nil { + return nil, false + } + return o.Device, true +} + +// HasDevice returns a boolean if a field has been set. +func (o *GetRiskScoreRequest) HasDevice() bool { + if o != nil && o.Device != nil { + return true + } + + return false +} + +// SetDevice gets a reference to the given RiskDevice and assigns it to the Device field. +func (o *GetRiskScoreRequest) SetDevice(v RiskDevice) { + o.Device = &v +} + +// GetFp returns the Fp field value if set, zero value otherwise. +func (o *GetRiskScoreRequest) GetFp() string { + if o == nil || o.Fp == nil { + var ret string + return ret + } + return *o.Fp +} + +// GetFpOk returns a tuple with the Fp field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRiskScoreRequest) GetFpOk() (*string, bool) { + if o == nil || o.Fp == nil { + return nil, false + } + return o.Fp, true +} + +// HasFp returns a boolean if a field has been set. +func (o *GetRiskScoreRequest) HasFp() bool { + if o != nil && o.Fp != nil { + return true + } + + return false +} + +// SetFp gets a reference to the given string and assigns it to the Fp field. +func (o *GetRiskScoreRequest) SetFp(v string) { + o.Fp = &v +} + +func (o GetRiskScoreRequest) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["ip"] = o.Ip + } + if true { + toSerialize["user_agent"] = o.UserAgent + } + if true { + toSerialize["user"] = o.User + } + if o.Source != nil { + toSerialize["source"] = o.Source + } + if o.Session != nil { + toSerialize["session"] = o.Session + } + if o.Device != nil { + toSerialize["device"] = o.Device + } + if o.Fp != nil { + toSerialize["fp"] = o.Fp + } + return json.Marshal(toSerialize) +} + +type NullableGetRiskScoreRequest struct { + value *GetRiskScoreRequest + isSet bool +} + +func (v NullableGetRiskScoreRequest) Get() *GetRiskScoreRequest { + return v.value +} + +func (v *NullableGetRiskScoreRequest) Set(val *GetRiskScoreRequest) { + v.value = val + v.isSet = true +} + +func (v NullableGetRiskScoreRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableGetRiskScoreRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetRiskScoreRequest(val *GetRiskScoreRequest) *NullableGetRiskScoreRequest { + return &NullableGetRiskScoreRequest{value: val, isSet: true} +} + +func (v NullableGetRiskScoreRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetRiskScoreRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_get_score_insights_200_response.go b/model_get_score_insights_200_response.go new file mode 100644 index 0000000..3c88cb8 --- /dev/null +++ b/model_get_score_insights_200_response.go @@ -0,0 +1,151 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// GetScoreInsights200Response struct for GetScoreInsights200Response +type GetScoreInsights200Response struct { + Scores *GetScoreInsights200ResponseScores `json:"scores,omitempty"` + Total *int32 `json:"total,omitempty"` +} + +// NewGetScoreInsights200Response instantiates a new GetScoreInsights200Response 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 NewGetScoreInsights200Response() *GetScoreInsights200Response { + this := GetScoreInsights200Response{} + return &this +} + +// NewGetScoreInsights200ResponseWithDefaults instantiates a new GetScoreInsights200Response 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 NewGetScoreInsights200ResponseWithDefaults() *GetScoreInsights200Response { + this := GetScoreInsights200Response{} + return &this +} + +// GetScores returns the Scores field value if set, zero value otherwise. +func (o *GetScoreInsights200Response) GetScores() GetScoreInsights200ResponseScores { + if o == nil || o.Scores == nil { + var ret GetScoreInsights200ResponseScores + return ret + } + return *o.Scores +} + +// GetScoresOk returns a tuple with the Scores field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetScoreInsights200Response) GetScoresOk() (*GetScoreInsights200ResponseScores, bool) { + if o == nil || o.Scores == nil { + return nil, false + } + return o.Scores, true +} + +// HasScores returns a boolean if a field has been set. +func (o *GetScoreInsights200Response) HasScores() bool { + if o != nil && o.Scores != nil { + return true + } + + return false +} + +// SetScores gets a reference to the given GetScoreInsights200ResponseScores and assigns it to the Scores field. +func (o *GetScoreInsights200Response) SetScores(v GetScoreInsights200ResponseScores) { + o.Scores = &v +} + +// GetTotal returns the Total field value if set, zero value otherwise. +func (o *GetScoreInsights200Response) GetTotal() int32 { + if o == nil || o.Total == nil { + var ret int32 + return ret + } + return *o.Total +} + +// GetTotalOk returns a tuple with the Total field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetScoreInsights200Response) GetTotalOk() (*int32, bool) { + if o == nil || o.Total == nil { + return nil, false + } + return o.Total, true +} + +// HasTotal returns a boolean if a field has been set. +func (o *GetScoreInsights200Response) HasTotal() bool { + if o != nil && o.Total != nil { + return true + } + + return false +} + +// SetTotal gets a reference to the given int32 and assigns it to the Total field. +func (o *GetScoreInsights200Response) SetTotal(v int32) { + o.Total = &v +} + +func (o GetScoreInsights200Response) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Scores != nil { + toSerialize["scores"] = o.Scores + } + if o.Total != nil { + toSerialize["total"] = o.Total + } + return json.Marshal(toSerialize) +} + +type NullableGetScoreInsights200Response struct { + value *GetScoreInsights200Response + isSet bool +} + +func (v NullableGetScoreInsights200Response) Get() *GetScoreInsights200Response { + return v.value +} + +func (v *NullableGetScoreInsights200Response) Set(val *GetScoreInsights200Response) { + v.value = val + v.isSet = true +} + +func (v NullableGetScoreInsights200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableGetScoreInsights200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetScoreInsights200Response(val *GetScoreInsights200Response) *NullableGetScoreInsights200Response { + return &NullableGetScoreInsights200Response{value: val, isSet: true} +} + +func (v NullableGetScoreInsights200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetScoreInsights200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_get_score_insights_200_response_scores.go b/model_get_score_insights_200_response_scores.go new file mode 100644 index 0000000..ed8c9cf --- /dev/null +++ b/model_get_score_insights_200_response_scores.go @@ -0,0 +1,259 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// GetScoreInsights200ResponseScores struct for GetScoreInsights200ResponseScores +type GetScoreInsights200ResponseScores struct { + Minimal *int32 `json:"minimal,omitempty"` + Low *int32 `json:"low,omitempty"` + Medium *int32 `json:"medium,omitempty"` + High *int32 `json:"high,omitempty"` + VeryHigh *int32 `json:"very_high,omitempty"` +} + +// NewGetScoreInsights200ResponseScores instantiates a new GetScoreInsights200ResponseScores 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 NewGetScoreInsights200ResponseScores() *GetScoreInsights200ResponseScores { + this := GetScoreInsights200ResponseScores{} + return &this +} + +// NewGetScoreInsights200ResponseScoresWithDefaults instantiates a new GetScoreInsights200ResponseScores 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 NewGetScoreInsights200ResponseScoresWithDefaults() *GetScoreInsights200ResponseScores { + this := GetScoreInsights200ResponseScores{} + return &this +} + +// GetMinimal returns the Minimal field value if set, zero value otherwise. +func (o *GetScoreInsights200ResponseScores) GetMinimal() int32 { + if o == nil || o.Minimal == nil { + var ret int32 + return ret + } + return *o.Minimal +} + +// GetMinimalOk returns a tuple with the Minimal field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetScoreInsights200ResponseScores) GetMinimalOk() (*int32, bool) { + if o == nil || o.Minimal == nil { + return nil, false + } + return o.Minimal, true +} + +// HasMinimal returns a boolean if a field has been set. +func (o *GetScoreInsights200ResponseScores) HasMinimal() bool { + if o != nil && o.Minimal != nil { + return true + } + + return false +} + +// SetMinimal gets a reference to the given int32 and assigns it to the Minimal field. +func (o *GetScoreInsights200ResponseScores) SetMinimal(v int32) { + o.Minimal = &v +} + +// GetLow returns the Low field value if set, zero value otherwise. +func (o *GetScoreInsights200ResponseScores) GetLow() int32 { + if o == nil || o.Low == nil { + var ret int32 + return ret + } + return *o.Low +} + +// GetLowOk returns a tuple with the Low field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetScoreInsights200ResponseScores) GetLowOk() (*int32, bool) { + if o == nil || o.Low == nil { + return nil, false + } + return o.Low, true +} + +// HasLow returns a boolean if a field has been set. +func (o *GetScoreInsights200ResponseScores) HasLow() bool { + if o != nil && o.Low != nil { + return true + } + + return false +} + +// SetLow gets a reference to the given int32 and assigns it to the Low field. +func (o *GetScoreInsights200ResponseScores) SetLow(v int32) { + o.Low = &v +} + +// GetMedium returns the Medium field value if set, zero value otherwise. +func (o *GetScoreInsights200ResponseScores) GetMedium() int32 { + if o == nil || o.Medium == nil { + var ret int32 + return ret + } + return *o.Medium +} + +// GetMediumOk returns a tuple with the Medium field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetScoreInsights200ResponseScores) GetMediumOk() (*int32, bool) { + if o == nil || o.Medium == nil { + return nil, false + } + return o.Medium, true +} + +// HasMedium returns a boolean if a field has been set. +func (o *GetScoreInsights200ResponseScores) HasMedium() bool { + if o != nil && o.Medium != nil { + return true + } + + return false +} + +// SetMedium gets a reference to the given int32 and assigns it to the Medium field. +func (o *GetScoreInsights200ResponseScores) SetMedium(v int32) { + o.Medium = &v +} + +// GetHigh returns the High field value if set, zero value otherwise. +func (o *GetScoreInsights200ResponseScores) GetHigh() int32 { + if o == nil || o.High == nil { + var ret int32 + return ret + } + return *o.High +} + +// GetHighOk returns a tuple with the High field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetScoreInsights200ResponseScores) GetHighOk() (*int32, bool) { + if o == nil || o.High == nil { + return nil, false + } + return o.High, true +} + +// HasHigh returns a boolean if a field has been set. +func (o *GetScoreInsights200ResponseScores) HasHigh() bool { + if o != nil && o.High != nil { + return true + } + + return false +} + +// SetHigh gets a reference to the given int32 and assigns it to the High field. +func (o *GetScoreInsights200ResponseScores) SetHigh(v int32) { + o.High = &v +} + +// GetVeryHigh returns the VeryHigh field value if set, zero value otherwise. +func (o *GetScoreInsights200ResponseScores) GetVeryHigh() int32 { + if o == nil || o.VeryHigh == nil { + var ret int32 + return ret + } + return *o.VeryHigh +} + +// GetVeryHighOk returns a tuple with the VeryHigh field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetScoreInsights200ResponseScores) GetVeryHighOk() (*int32, bool) { + if o == nil || o.VeryHigh == nil { + return nil, false + } + return o.VeryHigh, true +} + +// HasVeryHigh returns a boolean if a field has been set. +func (o *GetScoreInsights200ResponseScores) HasVeryHigh() bool { + if o != nil && o.VeryHigh != nil { + return true + } + + return false +} + +// SetVeryHigh gets a reference to the given int32 and assigns it to the VeryHigh field. +func (o *GetScoreInsights200ResponseScores) SetVeryHigh(v int32) { + o.VeryHigh = &v +} + +func (o GetScoreInsights200ResponseScores) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Minimal != nil { + toSerialize["minimal"] = o.Minimal + } + if o.Low != nil { + toSerialize["low"] = o.Low + } + if o.Medium != nil { + toSerialize["medium"] = o.Medium + } + if o.High != nil { + toSerialize["high"] = o.High + } + if o.VeryHigh != nil { + toSerialize["very_high"] = o.VeryHigh + } + return json.Marshal(toSerialize) +} + +type NullableGetScoreInsights200ResponseScores struct { + value *GetScoreInsights200ResponseScores + isSet bool +} + +func (v NullableGetScoreInsights200ResponseScores) Get() *GetScoreInsights200ResponseScores { + return v.value +} + +func (v *NullableGetScoreInsights200ResponseScores) Set(val *GetScoreInsights200ResponseScores) { + v.value = val + v.isSet = true +} + +func (v NullableGetScoreInsights200ResponseScores) IsSet() bool { + return v.isSet +} + +func (v *NullableGetScoreInsights200ResponseScores) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetScoreInsights200ResponseScores(val *GetScoreInsights200ResponseScores) *NullableGetScoreInsights200ResponseScores { + return &NullableGetScoreInsights200ResponseScores{value: val, isSet: true} +} + +func (v NullableGetScoreInsights200ResponseScores) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetScoreInsights200ResponseScores) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_get_user_apps_200_response_inner.go b/model_get_user_apps_200_response_inner.go new file mode 100644 index 0000000..4416fa0 --- /dev/null +++ b/model_get_user_apps_200_response_inner.go @@ -0,0 +1,374 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// GetUserApps200ResponseInner struct for GetUserApps200ResponseInner +type GetUserApps200ResponseInner struct { + // The App ID + Id *int32 `json:"id,omitempty"` + // A url for the icon that represents the app in the OneLogin portal + IconUrl *string `json:"icon_url,omitempty"` + // Boolean that indicates if the OneLogin browser extension is required to launch this app. + Extension *bool `json:"extension,omitempty"` + // Unqiue identifier for this user and app combination. + LoginId *int32 `json:"login_id,omitempty"` + // The name of the app. + Name *string `json:"name,omitempty"` + ProvisioningStatus *string `json:"provisioning_status,omitempty"` + // If provisioning is enabled this indicates the state of provisioning for the given user. + ProvisioningState *string `json:"provisioning_state,omitempty"` + // Indicates if provisioning is enabled for this app. + ProvisioningEnabled *bool `json:"provisioning_enabled,omitempty"` +} + +// NewGetUserApps200ResponseInner instantiates a new GetUserApps200ResponseInner 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 NewGetUserApps200ResponseInner() *GetUserApps200ResponseInner { + this := GetUserApps200ResponseInner{} + return &this +} + +// NewGetUserApps200ResponseInnerWithDefaults instantiates a new GetUserApps200ResponseInner 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 NewGetUserApps200ResponseInnerWithDefaults() *GetUserApps200ResponseInner { + this := GetUserApps200ResponseInner{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *GetUserApps200ResponseInner) GetId() int32 { + if o == nil || o.Id == nil { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetUserApps200ResponseInner) GetIdOk() (*int32, bool) { + if o == nil || o.Id == nil { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *GetUserApps200ResponseInner) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *GetUserApps200ResponseInner) SetId(v int32) { + o.Id = &v +} + +// GetIconUrl returns the IconUrl field value if set, zero value otherwise. +func (o *GetUserApps200ResponseInner) GetIconUrl() string { + if o == nil || o.IconUrl == nil { + var ret string + return ret + } + return *o.IconUrl +} + +// 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 *GetUserApps200ResponseInner) GetIconUrlOk() (*string, bool) { + if o == nil || o.IconUrl == nil { + return nil, false + } + return o.IconUrl, true +} + +// HasIconUrl returns a boolean if a field has been set. +func (o *GetUserApps200ResponseInner) HasIconUrl() bool { + if o != nil && o.IconUrl != nil { + return true + } + + return false +} + +// SetIconUrl gets a reference to the given string and assigns it to the IconUrl field. +func (o *GetUserApps200ResponseInner) SetIconUrl(v string) { + o.IconUrl = &v +} + +// GetExtension returns the Extension field value if set, zero value otherwise. +func (o *GetUserApps200ResponseInner) GetExtension() bool { + if o == nil || o.Extension == nil { + var ret bool + return ret + } + return *o.Extension +} + +// GetExtensionOk returns a tuple with the Extension field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetUserApps200ResponseInner) GetExtensionOk() (*bool, bool) { + if o == nil || o.Extension == nil { + return nil, false + } + return o.Extension, true +} + +// HasExtension returns a boolean if a field has been set. +func (o *GetUserApps200ResponseInner) HasExtension() bool { + if o != nil && o.Extension != nil { + return true + } + + return false +} + +// SetExtension gets a reference to the given bool and assigns it to the Extension field. +func (o *GetUserApps200ResponseInner) SetExtension(v bool) { + o.Extension = &v +} + +// GetLoginId returns the LoginId field value if set, zero value otherwise. +func (o *GetUserApps200ResponseInner) GetLoginId() int32 { + if o == nil || o.LoginId == nil { + var ret int32 + return ret + } + return *o.LoginId +} + +// GetLoginIdOk returns a tuple with the LoginId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetUserApps200ResponseInner) GetLoginIdOk() (*int32, bool) { + if o == nil || o.LoginId == nil { + return nil, false + } + return o.LoginId, true +} + +// HasLoginId returns a boolean if a field has been set. +func (o *GetUserApps200ResponseInner) HasLoginId() bool { + if o != nil && o.LoginId != nil { + return true + } + + return false +} + +// SetLoginId gets a reference to the given int32 and assigns it to the LoginId field. +func (o *GetUserApps200ResponseInner) SetLoginId(v int32) { + o.LoginId = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *GetUserApps200ResponseInner) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// 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 *GetUserApps200ResponseInner) GetNameOk() (*string, bool) { + if o == nil || o.Name == nil { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *GetUserApps200ResponseInner) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *GetUserApps200ResponseInner) SetName(v string) { + o.Name = &v +} + +// GetProvisioningStatus returns the ProvisioningStatus field value if set, zero value otherwise. +func (o *GetUserApps200ResponseInner) GetProvisioningStatus() string { + if o == nil || o.ProvisioningStatus == nil { + var ret string + return ret + } + return *o.ProvisioningStatus +} + +// GetProvisioningStatusOk returns a tuple with the ProvisioningStatus field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetUserApps200ResponseInner) GetProvisioningStatusOk() (*string, bool) { + if o == nil || o.ProvisioningStatus == nil { + return nil, false + } + return o.ProvisioningStatus, true +} + +// HasProvisioningStatus returns a boolean if a field has been set. +func (o *GetUserApps200ResponseInner) HasProvisioningStatus() bool { + if o != nil && o.ProvisioningStatus != nil { + return true + } + + return false +} + +// SetProvisioningStatus gets a reference to the given string and assigns it to the ProvisioningStatus field. +func (o *GetUserApps200ResponseInner) SetProvisioningStatus(v string) { + o.ProvisioningStatus = &v +} + +// GetProvisioningState returns the ProvisioningState field value if set, zero value otherwise. +func (o *GetUserApps200ResponseInner) GetProvisioningState() string { + if o == nil || o.ProvisioningState == nil { + var ret string + return ret + } + return *o.ProvisioningState +} + +// GetProvisioningStateOk returns a tuple with the ProvisioningState field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetUserApps200ResponseInner) GetProvisioningStateOk() (*string, bool) { + if o == nil || o.ProvisioningState == nil { + return nil, false + } + return o.ProvisioningState, true +} + +// HasProvisioningState returns a boolean if a field has been set. +func (o *GetUserApps200ResponseInner) HasProvisioningState() bool { + if o != nil && o.ProvisioningState != nil { + return true + } + + return false +} + +// SetProvisioningState gets a reference to the given string and assigns it to the ProvisioningState field. +func (o *GetUserApps200ResponseInner) SetProvisioningState(v string) { + o.ProvisioningState = &v +} + +// GetProvisioningEnabled returns the ProvisioningEnabled field value if set, zero value otherwise. +func (o *GetUserApps200ResponseInner) GetProvisioningEnabled() bool { + if o == nil || o.ProvisioningEnabled == nil { + var ret bool + return ret + } + return *o.ProvisioningEnabled +} + +// GetProvisioningEnabledOk returns a tuple with the ProvisioningEnabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetUserApps200ResponseInner) GetProvisioningEnabledOk() (*bool, bool) { + if o == nil || o.ProvisioningEnabled == nil { + return nil, false + } + return o.ProvisioningEnabled, true +} + +// HasProvisioningEnabled returns a boolean if a field has been set. +func (o *GetUserApps200ResponseInner) HasProvisioningEnabled() bool { + if o != nil && o.ProvisioningEnabled != nil { + return true + } + + return false +} + +// SetProvisioningEnabled gets a reference to the given bool and assigns it to the ProvisioningEnabled field. +func (o *GetUserApps200ResponseInner) SetProvisioningEnabled(v bool) { + o.ProvisioningEnabled = &v +} + +func (o GetUserApps200ResponseInner) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.IconUrl != nil { + toSerialize["icon_url"] = o.IconUrl + } + if o.Extension != nil { + toSerialize["extension"] = o.Extension + } + if o.LoginId != nil { + toSerialize["login_id"] = o.LoginId + } + if o.Name != nil { + toSerialize["name"] = o.Name + } + if o.ProvisioningStatus != nil { + toSerialize["provisioning_status"] = o.ProvisioningStatus + } + if o.ProvisioningState != nil { + toSerialize["provisioning_state"] = o.ProvisioningState + } + if o.ProvisioningEnabled != nil { + toSerialize["provisioning_enabled"] = o.ProvisioningEnabled + } + return json.Marshal(toSerialize) +} + +type NullableGetUserApps200ResponseInner struct { + value *GetUserApps200ResponseInner + isSet bool +} + +func (v NullableGetUserApps200ResponseInner) Get() *GetUserApps200ResponseInner { + return v.value +} + +func (v *NullableGetUserApps200ResponseInner) Set(val *GetUserApps200ResponseInner) { + v.value = val + v.isSet = true +} + +func (v NullableGetUserApps200ResponseInner) IsSet() bool { + return v.isSet +} + +func (v *NullableGetUserApps200ResponseInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetUserApps200ResponseInner(val *GetUserApps200ResponseInner) *NullableGetUserApps200ResponseInner { + return &NullableGetUserApps200ResponseInner{value: val, isSet: true} +} + +func (v NullableGetUserApps200ResponseInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetUserApps200ResponseInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_hook.go b/model_hook.go new file mode 100644 index 0000000..da3838b --- /dev/null +++ b/model_hook.go @@ -0,0 +1,583 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// Hook struct for Hook +type Hook struct { + // The Hook unique ID in OneLogin. + Id *string `json:"id,omitempty"` + // A string describing the type of hook. e.g. `pre-authentication` + Type string `json:"type"` + // Boolean to enable or disable the hook. Disabled hooks will not run. + Disabled bool `json:"disabled"` + // The number of seconds to allow the hook function to run before before timing out. Maximum timeout varies based on the type of hook. + Timeout int32 `json:"timeout"` + // Environment Variable objects that will be available via process.env.ENV_VAR_NAME in the hook code. + EnvVars []string `json:"env_vars"` + // The Smart Hooks supported Node.js version to execute this hook with. + Runtime string `json:"runtime"` + // Number of retries if execution fails. + Retries int32 `json:"retries"` + // An object containing NPM packages that are bundled with the hook function. + Packages map[string]interface{} `json:"packages"` + // A base64 encoded string containing the javascript function code. + Function string `json:"function"` + // The semantic version of the content that will be injected into this hook. + ContextVersion *string `json:"context_version,omitempty"` + // String describing the state of the hook function. When a hook is ready and disabled is false it will be executed. + Status *string `json:"status,omitempty"` + Options *HookOptions `json:"options,omitempty"` + // An array of objects that let you limit the execution of a hook to users in specific roles. + Conditions []HookConditionsInner `json:"conditions,omitempty"` + // ISO8601 format date that they hook function was created. + CreatedAt *string `json:"created_at,omitempty"` + // ISO8601 format date that they hook function was last updated. + UpdatedAt *string `json:"updated_at,omitempty"` +} + +// NewHook instantiates a new Hook 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 NewHook(type_ string, disabled bool, timeout int32, envVars []string, runtime string, retries int32, packages map[string]interface{}, function string) *Hook { + this := Hook{} + this.Type = type_ + this.Disabled = disabled + this.Timeout = timeout + this.EnvVars = envVars + this.Runtime = runtime + this.Retries = retries + this.Packages = packages + this.Function = function + return &this +} + +// NewHookWithDefaults instantiates a new Hook 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 NewHookWithDefaults() *Hook { + this := Hook{} + var disabled bool = true + this.Disabled = disabled + var timeout int32 = 1 + this.Timeout = timeout + var retries int32 = 0 + this.Retries = retries + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *Hook) GetId() string { + if o == nil || o.Id == nil { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Hook) GetIdOk() (*string, bool) { + if o == nil || o.Id == nil { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *Hook) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *Hook) SetId(v string) { + o.Id = &v +} + +// GetType returns the Type field value +func (o *Hook) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *Hook) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *Hook) SetType(v string) { + o.Type = v +} + +// GetDisabled returns the Disabled field value +func (o *Hook) GetDisabled() bool { + if o == nil { + var ret bool + return ret + } + + return o.Disabled +} + +// GetDisabledOk returns a tuple with the Disabled field value +// and a boolean to check if the value has been set. +func (o *Hook) GetDisabledOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Disabled, true +} + +// SetDisabled sets field value +func (o *Hook) SetDisabled(v bool) { + o.Disabled = v +} + +// GetTimeout returns the Timeout field value +func (o *Hook) GetTimeout() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Timeout +} + +// GetTimeoutOk returns a tuple with the Timeout field value +// and a boolean to check if the value has been set. +func (o *Hook) GetTimeoutOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Timeout, true +} + +// SetTimeout sets field value +func (o *Hook) SetTimeout(v int32) { + o.Timeout = v +} + +// GetEnvVars returns the EnvVars field value +func (o *Hook) GetEnvVars() []string { + if o == nil { + var ret []string + return ret + } + + return o.EnvVars +} + +// GetEnvVarsOk returns a tuple with the EnvVars field value +// and a boolean to check if the value has been set. +func (o *Hook) GetEnvVarsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.EnvVars, true +} + +// SetEnvVars sets field value +func (o *Hook) SetEnvVars(v []string) { + o.EnvVars = v +} + +// GetRuntime returns the Runtime field value +func (o *Hook) GetRuntime() string { + if o == nil { + var ret string + return ret + } + + return o.Runtime +} + +// GetRuntimeOk returns a tuple with the Runtime field value +// and a boolean to check if the value has been set. +func (o *Hook) GetRuntimeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Runtime, true +} + +// SetRuntime sets field value +func (o *Hook) SetRuntime(v string) { + o.Runtime = v +} + +// GetRetries returns the Retries field value +func (o *Hook) GetRetries() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Retries +} + +// GetRetriesOk returns a tuple with the Retries field value +// and a boolean to check if the value has been set. +func (o *Hook) GetRetriesOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Retries, true +} + +// SetRetries sets field value +func (o *Hook) SetRetries(v int32) { + o.Retries = v +} + +// GetPackages returns the Packages field value +func (o *Hook) GetPackages() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Packages +} + +// GetPackagesOk returns a tuple with the Packages field value +// and a boolean to check if the value has been set. +func (o *Hook) GetPackagesOk() (map[string]interface{}, bool) { + if o == nil { + return nil, false + } + return o.Packages, true +} + +// SetPackages sets field value +func (o *Hook) SetPackages(v map[string]interface{}) { + o.Packages = v +} + +// GetFunction returns the Function field value +func (o *Hook) GetFunction() string { + if o == nil { + var ret string + return ret + } + + return o.Function +} + +// GetFunctionOk returns a tuple with the Function field value +// and a boolean to check if the value has been set. +func (o *Hook) GetFunctionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Function, true +} + +// SetFunction sets field value +func (o *Hook) SetFunction(v string) { + o.Function = v +} + +// GetContextVersion returns the ContextVersion field value if set, zero value otherwise. +func (o *Hook) GetContextVersion() string { + if o == nil || o.ContextVersion == nil { + var ret string + return ret + } + return *o.ContextVersion +} + +// GetContextVersionOk returns a tuple with the ContextVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Hook) GetContextVersionOk() (*string, bool) { + if o == nil || o.ContextVersion == nil { + return nil, false + } + return o.ContextVersion, true +} + +// HasContextVersion returns a boolean if a field has been set. +func (o *Hook) HasContextVersion() bool { + if o != nil && o.ContextVersion != nil { + return true + } + + return false +} + +// SetContextVersion gets a reference to the given string and assigns it to the ContextVersion field. +func (o *Hook) SetContextVersion(v string) { + o.ContextVersion = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *Hook) GetStatus() string { + if o == nil || o.Status == nil { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Hook) GetStatusOk() (*string, bool) { + if o == nil || o.Status == nil { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *Hook) HasStatus() bool { + if o != nil && o.Status != nil { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *Hook) SetStatus(v string) { + o.Status = &v +} + +// GetOptions returns the Options field value if set, zero value otherwise. +func (o *Hook) GetOptions() HookOptions { + if o == nil || o.Options == nil { + var ret HookOptions + return ret + } + return *o.Options +} + +// GetOptionsOk returns a tuple with the Options field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Hook) GetOptionsOk() (*HookOptions, bool) { + if o == nil || o.Options == nil { + return nil, false + } + return o.Options, true +} + +// HasOptions returns a boolean if a field has been set. +func (o *Hook) HasOptions() bool { + if o != nil && o.Options != nil { + return true + } + + return false +} + +// SetOptions gets a reference to the given HookOptions and assigns it to the Options field. +func (o *Hook) SetOptions(v HookOptions) { + o.Options = &v +} + +// GetConditions returns the Conditions field value if set, zero value otherwise. +func (o *Hook) GetConditions() []HookConditionsInner { + if o == nil || o.Conditions == nil { + var ret []HookConditionsInner + return ret + } + return o.Conditions +} + +// GetConditionsOk returns a tuple with the Conditions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Hook) GetConditionsOk() ([]HookConditionsInner, bool) { + if o == nil || o.Conditions == nil { + return nil, false + } + return o.Conditions, true +} + +// HasConditions returns a boolean if a field has been set. +func (o *Hook) HasConditions() bool { + if o != nil && o.Conditions != nil { + return true + } + + return false +} + +// SetConditions gets a reference to the given []HookConditionsInner and assigns it to the Conditions field. +func (o *Hook) SetConditions(v []HookConditionsInner) { + o.Conditions = v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *Hook) GetCreatedAt() string { + if o == nil || o.CreatedAt == nil { + var ret string + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Hook) GetCreatedAtOk() (*string, bool) { + if o == nil || o.CreatedAt == nil { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *Hook) HasCreatedAt() bool { + if o != nil && o.CreatedAt != nil { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given string and assigns it to the CreatedAt field. +func (o *Hook) SetCreatedAt(v string) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *Hook) GetUpdatedAt() string { + if o == nil || o.UpdatedAt == nil { + var ret string + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Hook) GetUpdatedAtOk() (*string, bool) { + if o == nil || o.UpdatedAt == nil { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *Hook) HasUpdatedAt() bool { + if o != nil && o.UpdatedAt != nil { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given string and assigns it to the UpdatedAt field. +func (o *Hook) SetUpdatedAt(v string) { + o.UpdatedAt = &v +} + +func (o Hook) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Id != nil { + toSerialize["id"] = o.Id + } + if true { + toSerialize["type"] = o.Type + } + if true { + toSerialize["disabled"] = o.Disabled + } + if true { + toSerialize["timeout"] = o.Timeout + } + if true { + toSerialize["env_vars"] = o.EnvVars + } + if true { + toSerialize["runtime"] = o.Runtime + } + if true { + toSerialize["retries"] = o.Retries + } + if true { + toSerialize["packages"] = o.Packages + } + if true { + toSerialize["function"] = o.Function + } + if o.ContextVersion != nil { + toSerialize["context_version"] = o.ContextVersion + } + if o.Status != nil { + toSerialize["status"] = o.Status + } + if o.Options != nil { + toSerialize["options"] = o.Options + } + if o.Conditions != nil { + toSerialize["conditions"] = o.Conditions + } + if o.CreatedAt != nil { + toSerialize["created_at"] = o.CreatedAt + } + if o.UpdatedAt != nil { + toSerialize["updated_at"] = o.UpdatedAt + } + return json.Marshal(toSerialize) +} + +type NullableHook struct { + value *Hook + isSet bool +} + +func (v NullableHook) Get() *Hook { + return v.value +} + +func (v *NullableHook) Set(val *Hook) { + v.value = val + v.isSet = true +} + +func (v NullableHook) IsSet() bool { + return v.isSet +} + +func (v *NullableHook) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHook(val *Hook) *NullableHook { + return &NullableHook{value: val, isSet: true} +} + +func (v NullableHook) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHook) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_hook_conditions_inner.go b/model_hook_conditions_inner.go new file mode 100644 index 0000000..05431e6 --- /dev/null +++ b/model_hook_conditions_inner.go @@ -0,0 +1,187 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// HookConditionsInner struct for HookConditionsInner +type HookConditionsInner struct { + Source *string `json:"source,omitempty"` + Operator *string `json:"operator,omitempty"` + Value *string `json:"value,omitempty"` +} + +// NewHookConditionsInner instantiates a new HookConditionsInner 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 NewHookConditionsInner() *HookConditionsInner { + this := HookConditionsInner{} + return &this +} + +// NewHookConditionsInnerWithDefaults instantiates a new HookConditionsInner 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 NewHookConditionsInnerWithDefaults() *HookConditionsInner { + this := HookConditionsInner{} + return &this +} + +// GetSource returns the Source field value if set, zero value otherwise. +func (o *HookConditionsInner) GetSource() string { + if o == nil || o.Source == nil { + var ret string + return ret + } + return *o.Source +} + +// GetSourceOk returns a tuple with the Source field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HookConditionsInner) GetSourceOk() (*string, bool) { + if o == nil || o.Source == nil { + return nil, false + } + return o.Source, true +} + +// HasSource returns a boolean if a field has been set. +func (o *HookConditionsInner) HasSource() bool { + if o != nil && o.Source != nil { + return true + } + + return false +} + +// SetSource gets a reference to the given string and assigns it to the Source field. +func (o *HookConditionsInner) SetSource(v string) { + o.Source = &v +} + +// GetOperator returns the Operator field value if set, zero value otherwise. +func (o *HookConditionsInner) GetOperator() string { + if o == nil || o.Operator == nil { + var ret string + return ret + } + return *o.Operator +} + +// GetOperatorOk returns a tuple with the Operator field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HookConditionsInner) GetOperatorOk() (*string, bool) { + if o == nil || o.Operator == nil { + return nil, false + } + return o.Operator, true +} + +// HasOperator returns a boolean if a field has been set. +func (o *HookConditionsInner) HasOperator() bool { + if o != nil && o.Operator != nil { + return true + } + + return false +} + +// SetOperator gets a reference to the given string and assigns it to the Operator field. +func (o *HookConditionsInner) SetOperator(v string) { + o.Operator = &v +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *HookConditionsInner) GetValue() string { + if o == nil || o.Value == nil { + var ret string + return ret + } + return *o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HookConditionsInner) GetValueOk() (*string, bool) { + if o == nil || o.Value == nil { + return nil, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *HookConditionsInner) HasValue() bool { + if o != nil && o.Value != nil { + return true + } + + return false +} + +// SetValue gets a reference to the given string and assigns it to the Value field. +func (o *HookConditionsInner) SetValue(v string) { + o.Value = &v +} + +func (o HookConditionsInner) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Source != nil { + toSerialize["source"] = o.Source + } + if o.Operator != nil { + toSerialize["operator"] = o.Operator + } + if o.Value != nil { + toSerialize["value"] = o.Value + } + return json.Marshal(toSerialize) +} + +type NullableHookConditionsInner struct { + value *HookConditionsInner + isSet bool +} + +func (v NullableHookConditionsInner) Get() *HookConditionsInner { + return v.value +} + +func (v *NullableHookConditionsInner) Set(val *HookConditionsInner) { + v.value = val + v.isSet = true +} + +func (v NullableHookConditionsInner) IsSet() bool { + return v.isSet +} + +func (v *NullableHookConditionsInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHookConditionsInner(val *HookConditionsInner) *NullableHookConditionsInner { + return &NullableHookConditionsInner{value: val, isSet: true} +} + +func (v NullableHookConditionsInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHookConditionsInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_hook_options.go b/model_hook_options.go new file mode 100644 index 0000000..c57501c --- /dev/null +++ b/model_hook_options.go @@ -0,0 +1,187 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// HookOptions A set of attributes allow control over the information that is included in the hook context. +type HookOptions struct { + RiskEnabled *bool `json:"risk_enabled,omitempty"` + LocationEnabled *bool `json:"location_enabled,omitempty"` + MfaDeviceInfoEnabled *bool `json:"mfa_device_info_enabled,omitempty"` +} + +// NewHookOptions instantiates a new HookOptions 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 NewHookOptions() *HookOptions { + this := HookOptions{} + return &this +} + +// NewHookOptionsWithDefaults instantiates a new HookOptions 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 NewHookOptionsWithDefaults() *HookOptions { + this := HookOptions{} + return &this +} + +// GetRiskEnabled returns the RiskEnabled field value if set, zero value otherwise. +func (o *HookOptions) GetRiskEnabled() bool { + if o == nil || o.RiskEnabled == nil { + var ret bool + return ret + } + return *o.RiskEnabled +} + +// GetRiskEnabledOk returns a tuple with the RiskEnabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HookOptions) GetRiskEnabledOk() (*bool, bool) { + if o == nil || o.RiskEnabled == nil { + return nil, false + } + return o.RiskEnabled, true +} + +// HasRiskEnabled returns a boolean if a field has been set. +func (o *HookOptions) HasRiskEnabled() bool { + if o != nil && o.RiskEnabled != nil { + return true + } + + return false +} + +// SetRiskEnabled gets a reference to the given bool and assigns it to the RiskEnabled field. +func (o *HookOptions) SetRiskEnabled(v bool) { + o.RiskEnabled = &v +} + +// GetLocationEnabled returns the LocationEnabled field value if set, zero value otherwise. +func (o *HookOptions) GetLocationEnabled() bool { + if o == nil || o.LocationEnabled == nil { + var ret bool + return ret + } + return *o.LocationEnabled +} + +// GetLocationEnabledOk returns a tuple with the LocationEnabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HookOptions) GetLocationEnabledOk() (*bool, bool) { + if o == nil || o.LocationEnabled == nil { + return nil, false + } + return o.LocationEnabled, true +} + +// HasLocationEnabled returns a boolean if a field has been set. +func (o *HookOptions) HasLocationEnabled() bool { + if o != nil && o.LocationEnabled != nil { + return true + } + + return false +} + +// SetLocationEnabled gets a reference to the given bool and assigns it to the LocationEnabled field. +func (o *HookOptions) SetLocationEnabled(v bool) { + o.LocationEnabled = &v +} + +// GetMfaDeviceInfoEnabled returns the MfaDeviceInfoEnabled field value if set, zero value otherwise. +func (o *HookOptions) GetMfaDeviceInfoEnabled() bool { + if o == nil || o.MfaDeviceInfoEnabled == nil { + var ret bool + return ret + } + return *o.MfaDeviceInfoEnabled +} + +// GetMfaDeviceInfoEnabledOk returns a tuple with the MfaDeviceInfoEnabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HookOptions) GetMfaDeviceInfoEnabledOk() (*bool, bool) { + if o == nil || o.MfaDeviceInfoEnabled == nil { + return nil, false + } + return o.MfaDeviceInfoEnabled, true +} + +// HasMfaDeviceInfoEnabled returns a boolean if a field has been set. +func (o *HookOptions) HasMfaDeviceInfoEnabled() bool { + if o != nil && o.MfaDeviceInfoEnabled != nil { + return true + } + + return false +} + +// SetMfaDeviceInfoEnabled gets a reference to the given bool and assigns it to the MfaDeviceInfoEnabled field. +func (o *HookOptions) SetMfaDeviceInfoEnabled(v bool) { + o.MfaDeviceInfoEnabled = &v +} + +func (o HookOptions) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.RiskEnabled != nil { + toSerialize["risk_enabled"] = o.RiskEnabled + } + if o.LocationEnabled != nil { + toSerialize["location_enabled"] = o.LocationEnabled + } + if o.MfaDeviceInfoEnabled != nil { + toSerialize["mfa_device_info_enabled"] = o.MfaDeviceInfoEnabled + } + return json.Marshal(toSerialize) +} + +type NullableHookOptions struct { + value *HookOptions + isSet bool +} + +func (v NullableHookOptions) Get() *HookOptions { + return v.value +} + +func (v *NullableHookOptions) Set(val *HookOptions) { + v.value = val + v.isSet = true +} + +func (v NullableHookOptions) IsSet() bool { + return v.isSet +} + +func (v *NullableHookOptions) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHookOptions(val *HookOptions) *NullableHookOptions { + return &NullableHookOptions{value: val, isSet: true} +} + +func (v NullableHookOptions) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHookOptions) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_hook_status.go b/model_hook_status.go new file mode 100644 index 0000000..64fc457 --- /dev/null +++ b/model_hook_status.go @@ -0,0 +1,151 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// HookStatus struct for HookStatus +type HookStatus struct { + Name *string `json:"name,omitempty"` + Message *string `json:"message,omitempty"` +} + +// NewHookStatus instantiates a new HookStatus 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 NewHookStatus() *HookStatus { + this := HookStatus{} + return &this +} + +// NewHookStatusWithDefaults instantiates a new HookStatus 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 NewHookStatusWithDefaults() *HookStatus { + this := HookStatus{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *HookStatus) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// 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 *HookStatus) GetNameOk() (*string, bool) { + if o == nil || o.Name == nil { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *HookStatus) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *HookStatus) SetName(v string) { + o.Name = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *HookStatus) GetMessage() string { + if o == nil || o.Message == nil { + var ret string + return ret + } + return *o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HookStatus) GetMessageOk() (*string, bool) { + if o == nil || o.Message == nil { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *HookStatus) HasMessage() bool { + if o != nil && o.Message != nil { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *HookStatus) SetMessage(v string) { + o.Message = &v +} + +func (o HookStatus) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Name != nil { + toSerialize["name"] = o.Name + } + if o.Message != nil { + toSerialize["message"] = o.Message + } + return json.Marshal(toSerialize) +} + +type NullableHookStatus struct { + value *HookStatus + isSet bool +} + +func (v NullableHookStatus) Get() *HookStatus { + return v.value +} + +func (v *NullableHookStatus) Set(val *HookStatus) { + v.value = val + v.isSet = true +} + +func (v NullableHookStatus) IsSet() bool { + return v.isSet +} + +func (v *NullableHookStatus) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHookStatus(val *HookStatus) *NullableHookStatus { + return &NullableHookStatus{value: val, isSet: true} +} + +func (v NullableHookStatus) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHookStatus) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_id.go b/model_id.go new file mode 100644 index 0000000..bb869e5 --- /dev/null +++ b/model_id.go @@ -0,0 +1,115 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// Id struct for Id +type Id struct { + Id *string `json:"id,omitempty"` +} + +// NewId instantiates a new Id 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 NewId() *Id { + this := Id{} + return &this +} + +// NewIdWithDefaults instantiates a new Id 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 NewIdWithDefaults() *Id { + this := Id{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *Id) GetId() string { + if o == nil || o.Id == nil { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Id) GetIdOk() (*string, bool) { + if o == nil || o.Id == nil { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *Id) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *Id) SetId(v string) { + o.Id = &v +} + +func (o Id) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Id != nil { + toSerialize["id"] = o.Id + } + return json.Marshal(toSerialize) +} + +type NullableId struct { + value *Id + isSet bool +} + +func (v NullableId) Get() *Id { + return v.value +} + +func (v *NullableId) Set(val *Id) { + v.value = val + v.isSet = true +} + +func (v NullableId) IsSet() bool { + return v.isSet +} + +func (v *NullableId) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableId(val *Id) *NullableId { + return &NullableId{value: val, isSet: true} +} + +func (v NullableId) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableId) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_list_access_token_claims_200_response_inner.go b/model_list_access_token_claims_200_response_inner.go new file mode 100644 index 0000000..413e3db --- /dev/null +++ b/model_list_access_token_claims_200_response_inner.go @@ -0,0 +1,403 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// ListAccessTokenClaims200ResponseInner struct for ListAccessTokenClaims200ResponseInner +type ListAccessTokenClaims200ResponseInner struct { + Id *int32 `json:"id,omitempty"` + Label *string `json:"label,omitempty"` + UserAttributeMappings *string `json:"user_attribute_mappings,omitempty"` + UserAttributeMacros *string `json:"user_attribute_macros,omitempty"` + AttributesTransformations *string `json:"attributes_transformations,omitempty"` + SkipIfBlank *bool `json:"skip_if_blank,omitempty"` + Values []string `json:"values,omitempty"` + DefaultValues *string `json:"default_values,omitempty"` + ProvisionedEntitlements *bool `json:"provisioned_entitlements,omitempty"` +} + +// NewListAccessTokenClaims200ResponseInner instantiates a new ListAccessTokenClaims200ResponseInner 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 NewListAccessTokenClaims200ResponseInner() *ListAccessTokenClaims200ResponseInner { + this := ListAccessTokenClaims200ResponseInner{} + return &this +} + +// NewListAccessTokenClaims200ResponseInnerWithDefaults instantiates a new ListAccessTokenClaims200ResponseInner 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 NewListAccessTokenClaims200ResponseInnerWithDefaults() *ListAccessTokenClaims200ResponseInner { + this := ListAccessTokenClaims200ResponseInner{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *ListAccessTokenClaims200ResponseInner) GetId() int32 { + if o == nil || o.Id == nil { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListAccessTokenClaims200ResponseInner) GetIdOk() (*int32, bool) { + if o == nil || o.Id == nil { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *ListAccessTokenClaims200ResponseInner) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *ListAccessTokenClaims200ResponseInner) SetId(v int32) { + o.Id = &v +} + +// GetLabel returns the Label field value if set, zero value otherwise. +func (o *ListAccessTokenClaims200ResponseInner) GetLabel() string { + if o == nil || o.Label == nil { + var ret string + return ret + } + return *o.Label +} + +// 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 *ListAccessTokenClaims200ResponseInner) GetLabelOk() (*string, bool) { + if o == nil || o.Label == nil { + return nil, false + } + return o.Label, true +} + +// HasLabel returns a boolean if a field has been set. +func (o *ListAccessTokenClaims200ResponseInner) HasLabel() bool { + if o != nil && o.Label != nil { + return true + } + + return false +} + +// SetLabel gets a reference to the given string and assigns it to the Label field. +func (o *ListAccessTokenClaims200ResponseInner) SetLabel(v string) { + o.Label = &v +} + +// GetUserAttributeMappings returns the UserAttributeMappings field value if set, zero value otherwise. +func (o *ListAccessTokenClaims200ResponseInner) GetUserAttributeMappings() string { + if o == nil || o.UserAttributeMappings == nil { + var ret string + return ret + } + return *o.UserAttributeMappings +} + +// GetUserAttributeMappingsOk returns a tuple with the UserAttributeMappings field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListAccessTokenClaims200ResponseInner) GetUserAttributeMappingsOk() (*string, bool) { + if o == nil || o.UserAttributeMappings == nil { + return nil, false + } + return o.UserAttributeMappings, true +} + +// HasUserAttributeMappings returns a boolean if a field has been set. +func (o *ListAccessTokenClaims200ResponseInner) HasUserAttributeMappings() bool { + if o != nil && o.UserAttributeMappings != nil { + return true + } + + return false +} + +// SetUserAttributeMappings gets a reference to the given string and assigns it to the UserAttributeMappings field. +func (o *ListAccessTokenClaims200ResponseInner) SetUserAttributeMappings(v string) { + o.UserAttributeMappings = &v +} + +// GetUserAttributeMacros returns the UserAttributeMacros field value if set, zero value otherwise. +func (o *ListAccessTokenClaims200ResponseInner) GetUserAttributeMacros() string { + if o == nil || o.UserAttributeMacros == nil { + var ret string + return ret + } + return *o.UserAttributeMacros +} + +// GetUserAttributeMacrosOk returns a tuple with the UserAttributeMacros field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListAccessTokenClaims200ResponseInner) GetUserAttributeMacrosOk() (*string, bool) { + if o == nil || o.UserAttributeMacros == nil { + return nil, false + } + return o.UserAttributeMacros, true +} + +// HasUserAttributeMacros returns a boolean if a field has been set. +func (o *ListAccessTokenClaims200ResponseInner) HasUserAttributeMacros() bool { + if o != nil && o.UserAttributeMacros != nil { + return true + } + + return false +} + +// SetUserAttributeMacros gets a reference to the given string and assigns it to the UserAttributeMacros field. +func (o *ListAccessTokenClaims200ResponseInner) SetUserAttributeMacros(v string) { + o.UserAttributeMacros = &v +} + +// GetAttributesTransformations returns the AttributesTransformations field value if set, zero value otherwise. +func (o *ListAccessTokenClaims200ResponseInner) GetAttributesTransformations() string { + if o == nil || o.AttributesTransformations == nil { + var ret string + return ret + } + return *o.AttributesTransformations +} + +// GetAttributesTransformationsOk returns a tuple with the AttributesTransformations field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListAccessTokenClaims200ResponseInner) GetAttributesTransformationsOk() (*string, bool) { + if o == nil || o.AttributesTransformations == nil { + return nil, false + } + return o.AttributesTransformations, true +} + +// HasAttributesTransformations returns a boolean if a field has been set. +func (o *ListAccessTokenClaims200ResponseInner) HasAttributesTransformations() bool { + if o != nil && o.AttributesTransformations != nil { + return true + } + + return false +} + +// SetAttributesTransformations gets a reference to the given string and assigns it to the AttributesTransformations field. +func (o *ListAccessTokenClaims200ResponseInner) SetAttributesTransformations(v string) { + o.AttributesTransformations = &v +} + +// GetSkipIfBlank returns the SkipIfBlank field value if set, zero value otherwise. +func (o *ListAccessTokenClaims200ResponseInner) GetSkipIfBlank() bool { + if o == nil || o.SkipIfBlank == nil { + var ret bool + return ret + } + return *o.SkipIfBlank +} + +// GetSkipIfBlankOk returns a tuple with the SkipIfBlank field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListAccessTokenClaims200ResponseInner) GetSkipIfBlankOk() (*bool, bool) { + if o == nil || o.SkipIfBlank == nil { + return nil, false + } + return o.SkipIfBlank, true +} + +// HasSkipIfBlank returns a boolean if a field has been set. +func (o *ListAccessTokenClaims200ResponseInner) HasSkipIfBlank() bool { + if o != nil && o.SkipIfBlank != nil { + return true + } + + return false +} + +// SetSkipIfBlank gets a reference to the given bool and assigns it to the SkipIfBlank field. +func (o *ListAccessTokenClaims200ResponseInner) SetSkipIfBlank(v bool) { + o.SkipIfBlank = &v +} + +// GetValues returns the Values field value if set, zero value otherwise. +func (o *ListAccessTokenClaims200ResponseInner) GetValues() []string { + if o == nil || o.Values == nil { + var ret []string + return ret + } + return o.Values +} + +// GetValuesOk returns a tuple with the Values field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListAccessTokenClaims200ResponseInner) GetValuesOk() ([]string, bool) { + if o == nil || o.Values == nil { + return nil, false + } + return o.Values, true +} + +// HasValues returns a boolean if a field has been set. +func (o *ListAccessTokenClaims200ResponseInner) HasValues() bool { + if o != nil && o.Values != nil { + return true + } + + return false +} + +// SetValues gets a reference to the given []string and assigns it to the Values field. +func (o *ListAccessTokenClaims200ResponseInner) SetValues(v []string) { + o.Values = v +} + +// GetDefaultValues returns the DefaultValues field value if set, zero value otherwise. +func (o *ListAccessTokenClaims200ResponseInner) GetDefaultValues() string { + if o == nil || o.DefaultValues == nil { + var ret string + return ret + } + return *o.DefaultValues +} + +// GetDefaultValuesOk returns a tuple with the DefaultValues field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListAccessTokenClaims200ResponseInner) GetDefaultValuesOk() (*string, bool) { + if o == nil || o.DefaultValues == nil { + return nil, false + } + return o.DefaultValues, true +} + +// HasDefaultValues returns a boolean if a field has been set. +func (o *ListAccessTokenClaims200ResponseInner) HasDefaultValues() bool { + if o != nil && o.DefaultValues != nil { + return true + } + + return false +} + +// SetDefaultValues gets a reference to the given string and assigns it to the DefaultValues field. +func (o *ListAccessTokenClaims200ResponseInner) SetDefaultValues(v string) { + o.DefaultValues = &v +} + +// GetProvisionedEntitlements returns the ProvisionedEntitlements field value if set, zero value otherwise. +func (o *ListAccessTokenClaims200ResponseInner) GetProvisionedEntitlements() bool { + if o == nil || o.ProvisionedEntitlements == nil { + var ret bool + return ret + } + return *o.ProvisionedEntitlements +} + +// GetProvisionedEntitlementsOk returns a tuple with the ProvisionedEntitlements field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListAccessTokenClaims200ResponseInner) GetProvisionedEntitlementsOk() (*bool, bool) { + if o == nil || o.ProvisionedEntitlements == nil { + return nil, false + } + return o.ProvisionedEntitlements, true +} + +// HasProvisionedEntitlements returns a boolean if a field has been set. +func (o *ListAccessTokenClaims200ResponseInner) HasProvisionedEntitlements() bool { + if o != nil && o.ProvisionedEntitlements != nil { + return true + } + + return false +} + +// SetProvisionedEntitlements gets a reference to the given bool and assigns it to the ProvisionedEntitlements field. +func (o *ListAccessTokenClaims200ResponseInner) SetProvisionedEntitlements(v bool) { + o.ProvisionedEntitlements = &v +} + +func (o ListAccessTokenClaims200ResponseInner) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Label != nil { + toSerialize["label"] = o.Label + } + if o.UserAttributeMappings != nil { + toSerialize["user_attribute_mappings"] = o.UserAttributeMappings + } + if o.UserAttributeMacros != nil { + toSerialize["user_attribute_macros"] = o.UserAttributeMacros + } + if o.AttributesTransformations != nil { + toSerialize["attributes_transformations"] = o.AttributesTransformations + } + if o.SkipIfBlank != nil { + toSerialize["skip_if_blank"] = o.SkipIfBlank + } + if o.Values != nil { + toSerialize["values"] = o.Values + } + if o.DefaultValues != nil { + toSerialize["default_values"] = o.DefaultValues + } + if o.ProvisionedEntitlements != nil { + toSerialize["provisioned_entitlements"] = o.ProvisionedEntitlements + } + return json.Marshal(toSerialize) +} + +type NullableListAccessTokenClaims200ResponseInner struct { + value *ListAccessTokenClaims200ResponseInner + isSet bool +} + +func (v NullableListAccessTokenClaims200ResponseInner) Get() *ListAccessTokenClaims200ResponseInner { + return v.value +} + +func (v *NullableListAccessTokenClaims200ResponseInner) Set(val *ListAccessTokenClaims200ResponseInner) { + v.value = val + v.isSet = true +} + +func (v NullableListAccessTokenClaims200ResponseInner) IsSet() bool { + return v.isSet +} + +func (v *NullableListAccessTokenClaims200ResponseInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListAccessTokenClaims200ResponseInner(val *ListAccessTokenClaims200ResponseInner) *NullableListAccessTokenClaims200ResponseInner { + return &NullableListAccessTokenClaims200ResponseInner{value: val, isSet: true} +} + +func (v NullableListAccessTokenClaims200ResponseInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListAccessTokenClaims200ResponseInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_list_actions_200_response_inner.go b/model_list_actions_200_response_inner.go new file mode 100644 index 0000000..947c467 --- /dev/null +++ b/model_list_actions_200_response_inner.go @@ -0,0 +1,153 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// ListActions200ResponseInner struct for ListActions200ResponseInner +type ListActions200ResponseInner struct { + // The name of the Action. + Name *string `json:"name,omitempty"` + // The unique identifier of the action. This should be used when defining actions for a User Mapping. + Value *string `json:"value,omitempty"` +} + +// NewListActions200ResponseInner instantiates a new ListActions200ResponseInner 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 NewListActions200ResponseInner() *ListActions200ResponseInner { + this := ListActions200ResponseInner{} + return &this +} + +// NewListActions200ResponseInnerWithDefaults instantiates a new ListActions200ResponseInner 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 NewListActions200ResponseInnerWithDefaults() *ListActions200ResponseInner { + this := ListActions200ResponseInner{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *ListActions200ResponseInner) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// 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 *ListActions200ResponseInner) GetNameOk() (*string, bool) { + if o == nil || o.Name == nil { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *ListActions200ResponseInner) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *ListActions200ResponseInner) SetName(v string) { + o.Name = &v +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *ListActions200ResponseInner) GetValue() string { + if o == nil || o.Value == nil { + var ret string + return ret + } + return *o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListActions200ResponseInner) GetValueOk() (*string, bool) { + if o == nil || o.Value == nil { + return nil, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *ListActions200ResponseInner) HasValue() bool { + if o != nil && o.Value != nil { + return true + } + + return false +} + +// SetValue gets a reference to the given string and assigns it to the Value field. +func (o *ListActions200ResponseInner) SetValue(v string) { + o.Value = &v +} + +func (o ListActions200ResponseInner) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Name != nil { + toSerialize["name"] = o.Name + } + if o.Value != nil { + toSerialize["value"] = o.Value + } + return json.Marshal(toSerialize) +} + +type NullableListActions200ResponseInner struct { + value *ListActions200ResponseInner + isSet bool +} + +func (v NullableListActions200ResponseInner) Get() *ListActions200ResponseInner { + return v.value +} + +func (v *NullableListActions200ResponseInner) Set(val *ListActions200ResponseInner) { + v.value = val + v.isSet = true +} + +func (v NullableListActions200ResponseInner) IsSet() bool { + return v.isSet +} + +func (v *NullableListActions200ResponseInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListActions200ResponseInner(val *ListActions200ResponseInner) *NullableListActions200ResponseInner { + return &NullableListActions200ResponseInner{value: val, isSet: true} +} + +func (v NullableListActions200ResponseInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListActions200ResponseInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_list_app_users_200_response_inner.go b/model_list_app_users_200_response_inner.go new file mode 100644 index 0000000..77dea54 --- /dev/null +++ b/model_list_app_users_200_response_inner.go @@ -0,0 +1,259 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// ListAppUsers200ResponseInner struct for ListAppUsers200ResponseInner +type ListAppUsers200ResponseInner struct { + Firstname *string `json:"firstname,omitempty"` + Id *int32 `json:"id,omitempty"` + Email *string `json:"email,omitempty"` + Lastname *string `json:"lastname,omitempty"` + Username *string `json:"username,omitempty"` +} + +// NewListAppUsers200ResponseInner instantiates a new ListAppUsers200ResponseInner 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 NewListAppUsers200ResponseInner() *ListAppUsers200ResponseInner { + this := ListAppUsers200ResponseInner{} + return &this +} + +// NewListAppUsers200ResponseInnerWithDefaults instantiates a new ListAppUsers200ResponseInner 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 NewListAppUsers200ResponseInnerWithDefaults() *ListAppUsers200ResponseInner { + this := ListAppUsers200ResponseInner{} + return &this +} + +// GetFirstname returns the Firstname field value if set, zero value otherwise. +func (o *ListAppUsers200ResponseInner) GetFirstname() string { + if o == nil || o.Firstname == nil { + var ret string + return ret + } + return *o.Firstname +} + +// GetFirstnameOk returns a tuple with the Firstname field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListAppUsers200ResponseInner) GetFirstnameOk() (*string, bool) { + if o == nil || o.Firstname == nil { + return nil, false + } + return o.Firstname, true +} + +// HasFirstname returns a boolean if a field has been set. +func (o *ListAppUsers200ResponseInner) HasFirstname() bool { + if o != nil && o.Firstname != nil { + return true + } + + return false +} + +// SetFirstname gets a reference to the given string and assigns it to the Firstname field. +func (o *ListAppUsers200ResponseInner) SetFirstname(v string) { + o.Firstname = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *ListAppUsers200ResponseInner) GetId() int32 { + if o == nil || o.Id == nil { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListAppUsers200ResponseInner) GetIdOk() (*int32, bool) { + if o == nil || o.Id == nil { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *ListAppUsers200ResponseInner) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *ListAppUsers200ResponseInner) SetId(v int32) { + o.Id = &v +} + +// GetEmail returns the Email field value if set, zero value otherwise. +func (o *ListAppUsers200ResponseInner) 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 *ListAppUsers200ResponseInner) 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 *ListAppUsers200ResponseInner) 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 *ListAppUsers200ResponseInner) SetEmail(v string) { + o.Email = &v +} + +// GetLastname returns the Lastname field value if set, zero value otherwise. +func (o *ListAppUsers200ResponseInner) GetLastname() string { + if o == nil || o.Lastname == nil { + var ret string + return ret + } + return *o.Lastname +} + +// GetLastnameOk returns a tuple with the Lastname field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListAppUsers200ResponseInner) GetLastnameOk() (*string, bool) { + if o == nil || o.Lastname == nil { + return nil, false + } + return o.Lastname, true +} + +// HasLastname returns a boolean if a field has been set. +func (o *ListAppUsers200ResponseInner) HasLastname() bool { + if o != nil && o.Lastname != nil { + return true + } + + return false +} + +// SetLastname gets a reference to the given string and assigns it to the Lastname field. +func (o *ListAppUsers200ResponseInner) SetLastname(v string) { + o.Lastname = &v +} + +// GetUsername returns the Username field value if set, zero value otherwise. +func (o *ListAppUsers200ResponseInner) GetUsername() string { + if o == nil || o.Username == nil { + var ret string + return ret + } + return *o.Username +} + +// 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 *ListAppUsers200ResponseInner) GetUsernameOk() (*string, bool) { + if o == nil || o.Username == nil { + return nil, false + } + return o.Username, true +} + +// HasUsername returns a boolean if a field has been set. +func (o *ListAppUsers200ResponseInner) HasUsername() bool { + if o != nil && o.Username != nil { + return true + } + + return false +} + +// SetUsername gets a reference to the given string and assigns it to the Username field. +func (o *ListAppUsers200ResponseInner) SetUsername(v string) { + o.Username = &v +} + +func (o ListAppUsers200ResponseInner) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Firstname != nil { + toSerialize["firstname"] = o.Firstname + } + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Email != nil { + toSerialize["email"] = o.Email + } + if o.Lastname != nil { + toSerialize["lastname"] = o.Lastname + } + if o.Username != nil { + toSerialize["username"] = o.Username + } + return json.Marshal(toSerialize) +} + +type NullableListAppUsers200ResponseInner struct { + value *ListAppUsers200ResponseInner + isSet bool +} + +func (v NullableListAppUsers200ResponseInner) Get() *ListAppUsers200ResponseInner { + return v.value +} + +func (v *NullableListAppUsers200ResponseInner) Set(val *ListAppUsers200ResponseInner) { + v.value = val + v.isSet = true +} + +func (v NullableListAppUsers200ResponseInner) IsSet() bool { + return v.isSet +} + +func (v *NullableListAppUsers200ResponseInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListAppUsers200ResponseInner(val *ListAppUsers200ResponseInner) *NullableListAppUsers200ResponseInner { + return &NullableListAppUsers200ResponseInner{value: val, isSet: true} +} + +func (v NullableListAppUsers200ResponseInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListAppUsers200ResponseInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_list_authorization_servers_200_response_inner.go b/model_list_authorization_servers_200_response_inner.go new file mode 100644 index 0000000..dcc4189 --- /dev/null +++ b/model_list_authorization_servers_200_response_inner.go @@ -0,0 +1,223 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// ListAuthorizationServers200ResponseInner struct for ListAuthorizationServers200ResponseInner +type ListAuthorizationServers200ResponseInner struct { + Id *int32 `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Configuration *ListAuthorizationServers200ResponseInnerConfiguration `json:"configuration,omitempty"` + Description *string `json:"description,omitempty"` +} + +// NewListAuthorizationServers200ResponseInner instantiates a new ListAuthorizationServers200ResponseInner 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 NewListAuthorizationServers200ResponseInner() *ListAuthorizationServers200ResponseInner { + this := ListAuthorizationServers200ResponseInner{} + return &this +} + +// NewListAuthorizationServers200ResponseInnerWithDefaults instantiates a new ListAuthorizationServers200ResponseInner 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 NewListAuthorizationServers200ResponseInnerWithDefaults() *ListAuthorizationServers200ResponseInner { + this := ListAuthorizationServers200ResponseInner{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *ListAuthorizationServers200ResponseInner) GetId() int32 { + if o == nil || o.Id == nil { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListAuthorizationServers200ResponseInner) GetIdOk() (*int32, bool) { + if o == nil || o.Id == nil { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *ListAuthorizationServers200ResponseInner) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *ListAuthorizationServers200ResponseInner) SetId(v int32) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *ListAuthorizationServers200ResponseInner) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// 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 *ListAuthorizationServers200ResponseInner) GetNameOk() (*string, bool) { + if o == nil || o.Name == nil { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *ListAuthorizationServers200ResponseInner) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *ListAuthorizationServers200ResponseInner) SetName(v string) { + o.Name = &v +} + +// GetConfiguration returns the Configuration field value if set, zero value otherwise. +func (o *ListAuthorizationServers200ResponseInner) GetConfiguration() ListAuthorizationServers200ResponseInnerConfiguration { + if o == nil || o.Configuration == nil { + var ret ListAuthorizationServers200ResponseInnerConfiguration + return ret + } + return *o.Configuration +} + +// GetConfigurationOk returns a tuple with the Configuration field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListAuthorizationServers200ResponseInner) GetConfigurationOk() (*ListAuthorizationServers200ResponseInnerConfiguration, bool) { + if o == nil || o.Configuration == nil { + return nil, false + } + return o.Configuration, true +} + +// HasConfiguration returns a boolean if a field has been set. +func (o *ListAuthorizationServers200ResponseInner) HasConfiguration() bool { + if o != nil && o.Configuration != nil { + return true + } + + return false +} + +// SetConfiguration gets a reference to the given ListAuthorizationServers200ResponseInnerConfiguration and assigns it to the Configuration field. +func (o *ListAuthorizationServers200ResponseInner) SetConfiguration(v ListAuthorizationServers200ResponseInnerConfiguration) { + o.Configuration = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *ListAuthorizationServers200ResponseInner) GetDescription() string { + if o == nil || o.Description == nil { + var ret string + return ret + } + return *o.Description +} + +// 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 *ListAuthorizationServers200ResponseInner) GetDescriptionOk() (*string, bool) { + if o == nil || o.Description == nil { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *ListAuthorizationServers200ResponseInner) HasDescription() bool { + if o != nil && o.Description != nil { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *ListAuthorizationServers200ResponseInner) SetDescription(v string) { + o.Description = &v +} + +func (o ListAuthorizationServers200ResponseInner) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Name != nil { + toSerialize["name"] = o.Name + } + if o.Configuration != nil { + toSerialize["configuration"] = o.Configuration + } + if o.Description != nil { + toSerialize["description"] = o.Description + } + return json.Marshal(toSerialize) +} + +type NullableListAuthorizationServers200ResponseInner struct { + value *ListAuthorizationServers200ResponseInner + isSet bool +} + +func (v NullableListAuthorizationServers200ResponseInner) Get() *ListAuthorizationServers200ResponseInner { + return v.value +} + +func (v *NullableListAuthorizationServers200ResponseInner) Set(val *ListAuthorizationServers200ResponseInner) { + v.value = val + v.isSet = true +} + +func (v NullableListAuthorizationServers200ResponseInner) IsSet() bool { + return v.isSet +} + +func (v *NullableListAuthorizationServers200ResponseInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListAuthorizationServers200ResponseInner(val *ListAuthorizationServers200ResponseInner) *NullableListAuthorizationServers200ResponseInner { + return &NullableListAuthorizationServers200ResponseInner{value: val, isSet: true} +} + +func (v NullableListAuthorizationServers200ResponseInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListAuthorizationServers200ResponseInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_list_authorization_servers_200_response_inner_configuration.go b/model_list_authorization_servers_200_response_inner_configuration.go new file mode 100644 index 0000000..ce0e5ef --- /dev/null +++ b/model_list_authorization_servers_200_response_inner_configuration.go @@ -0,0 +1,151 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// ListAuthorizationServers200ResponseInnerConfiguration struct for ListAuthorizationServers200ResponseInnerConfiguration +type ListAuthorizationServers200ResponseInnerConfiguration struct { + ResourceIdentifier *string `json:"resource_identifier,omitempty"` + Audiences []string `json:"audiences,omitempty"` +} + +// NewListAuthorizationServers200ResponseInnerConfiguration instantiates a new ListAuthorizationServers200ResponseInnerConfiguration 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 NewListAuthorizationServers200ResponseInnerConfiguration() *ListAuthorizationServers200ResponseInnerConfiguration { + this := ListAuthorizationServers200ResponseInnerConfiguration{} + return &this +} + +// NewListAuthorizationServers200ResponseInnerConfigurationWithDefaults instantiates a new ListAuthorizationServers200ResponseInnerConfiguration 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 NewListAuthorizationServers200ResponseInnerConfigurationWithDefaults() *ListAuthorizationServers200ResponseInnerConfiguration { + this := ListAuthorizationServers200ResponseInnerConfiguration{} + return &this +} + +// GetResourceIdentifier returns the ResourceIdentifier field value if set, zero value otherwise. +func (o *ListAuthorizationServers200ResponseInnerConfiguration) GetResourceIdentifier() string { + if o == nil || o.ResourceIdentifier == nil { + var ret string + return ret + } + return *o.ResourceIdentifier +} + +// GetResourceIdentifierOk returns a tuple with the ResourceIdentifier field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListAuthorizationServers200ResponseInnerConfiguration) GetResourceIdentifierOk() (*string, bool) { + if o == nil || o.ResourceIdentifier == nil { + return nil, false + } + return o.ResourceIdentifier, true +} + +// HasResourceIdentifier returns a boolean if a field has been set. +func (o *ListAuthorizationServers200ResponseInnerConfiguration) HasResourceIdentifier() bool { + if o != nil && o.ResourceIdentifier != nil { + return true + } + + return false +} + +// SetResourceIdentifier gets a reference to the given string and assigns it to the ResourceIdentifier field. +func (o *ListAuthorizationServers200ResponseInnerConfiguration) SetResourceIdentifier(v string) { + o.ResourceIdentifier = &v +} + +// GetAudiences returns the Audiences field value if set, zero value otherwise. +func (o *ListAuthorizationServers200ResponseInnerConfiguration) GetAudiences() []string { + if o == nil || o.Audiences == nil { + var ret []string + return ret + } + return o.Audiences +} + +// GetAudiencesOk returns a tuple with the Audiences field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListAuthorizationServers200ResponseInnerConfiguration) GetAudiencesOk() ([]string, bool) { + if o == nil || o.Audiences == nil { + return nil, false + } + return o.Audiences, true +} + +// HasAudiences returns a boolean if a field has been set. +func (o *ListAuthorizationServers200ResponseInnerConfiguration) HasAudiences() bool { + if o != nil && o.Audiences != nil { + return true + } + + return false +} + +// SetAudiences gets a reference to the given []string and assigns it to the Audiences field. +func (o *ListAuthorizationServers200ResponseInnerConfiguration) SetAudiences(v []string) { + o.Audiences = v +} + +func (o ListAuthorizationServers200ResponseInnerConfiguration) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.ResourceIdentifier != nil { + toSerialize["resource_identifier"] = o.ResourceIdentifier + } + if o.Audiences != nil { + toSerialize["audiences"] = o.Audiences + } + return json.Marshal(toSerialize) +} + +type NullableListAuthorizationServers200ResponseInnerConfiguration struct { + value *ListAuthorizationServers200ResponseInnerConfiguration + isSet bool +} + +func (v NullableListAuthorizationServers200ResponseInnerConfiguration) Get() *ListAuthorizationServers200ResponseInnerConfiguration { + return v.value +} + +func (v *NullableListAuthorizationServers200ResponseInnerConfiguration) Set(val *ListAuthorizationServers200ResponseInnerConfiguration) { + v.value = val + v.isSet = true +} + +func (v NullableListAuthorizationServers200ResponseInnerConfiguration) IsSet() bool { + return v.isSet +} + +func (v *NullableListAuthorizationServers200ResponseInnerConfiguration) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListAuthorizationServers200ResponseInnerConfiguration(val *ListAuthorizationServers200ResponseInnerConfiguration) *NullableListAuthorizationServers200ResponseInnerConfiguration { + return &NullableListAuthorizationServers200ResponseInnerConfiguration{value: val, isSet: true} +} + +func (v NullableListAuthorizationServers200ResponseInnerConfiguration) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListAuthorizationServers200ResponseInnerConfiguration) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_list_condition_operators_200_response_inner.go b/model_list_condition_operators_200_response_inner.go new file mode 100644 index 0000000..6bd8b9b --- /dev/null +++ b/model_list_condition_operators_200_response_inner.go @@ -0,0 +1,153 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// ListConditionOperators200ResponseInner struct for ListConditionOperators200ResponseInner +type ListConditionOperators200ResponseInner struct { + // The name or description of the operator. + Name *string `json:"name,omitempty"` + // The condition operator value to use when creating or updating App Rules. + Value *string `json:"value,omitempty"` +} + +// NewListConditionOperators200ResponseInner instantiates a new ListConditionOperators200ResponseInner 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 NewListConditionOperators200ResponseInner() *ListConditionOperators200ResponseInner { + this := ListConditionOperators200ResponseInner{} + return &this +} + +// NewListConditionOperators200ResponseInnerWithDefaults instantiates a new ListConditionOperators200ResponseInner 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 NewListConditionOperators200ResponseInnerWithDefaults() *ListConditionOperators200ResponseInner { + this := ListConditionOperators200ResponseInner{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *ListConditionOperators200ResponseInner) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// 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 *ListConditionOperators200ResponseInner) GetNameOk() (*string, bool) { + if o == nil || o.Name == nil { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *ListConditionOperators200ResponseInner) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *ListConditionOperators200ResponseInner) SetName(v string) { + o.Name = &v +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *ListConditionOperators200ResponseInner) GetValue() string { + if o == nil || o.Value == nil { + var ret string + return ret + } + return *o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListConditionOperators200ResponseInner) GetValueOk() (*string, bool) { + if o == nil || o.Value == nil { + return nil, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *ListConditionOperators200ResponseInner) HasValue() bool { + if o != nil && o.Value != nil { + return true + } + + return false +} + +// SetValue gets a reference to the given string and assigns it to the Value field. +func (o *ListConditionOperators200ResponseInner) SetValue(v string) { + o.Value = &v +} + +func (o ListConditionOperators200ResponseInner) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Name != nil { + toSerialize["name"] = o.Name + } + if o.Value != nil { + toSerialize["value"] = o.Value + } + return json.Marshal(toSerialize) +} + +type NullableListConditionOperators200ResponseInner struct { + value *ListConditionOperators200ResponseInner + isSet bool +} + +func (v NullableListConditionOperators200ResponseInner) Get() *ListConditionOperators200ResponseInner { + return v.value +} + +func (v *NullableListConditionOperators200ResponseInner) Set(val *ListConditionOperators200ResponseInner) { + v.value = val + v.isSet = true +} + +func (v NullableListConditionOperators200ResponseInner) IsSet() bool { + return v.isSet +} + +func (v *NullableListConditionOperators200ResponseInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListConditionOperators200ResponseInner(val *ListConditionOperators200ResponseInner) *NullableListConditionOperators200ResponseInner { + return &NullableListConditionOperators200ResponseInner{value: val, isSet: true} +} + +func (v NullableListConditionOperators200ResponseInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListConditionOperators200ResponseInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_list_condition_values_200_response_inner.go b/model_list_condition_values_200_response_inner.go new file mode 100644 index 0000000..64281f0 --- /dev/null +++ b/model_list_condition_values_200_response_inner.go @@ -0,0 +1,151 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// ListConditionValues200ResponseInner struct for ListConditionValues200ResponseInner +type ListConditionValues200ResponseInner struct { + Name *string `json:"name,omitempty"` + Value *string `json:"value,omitempty"` +} + +// NewListConditionValues200ResponseInner instantiates a new ListConditionValues200ResponseInner 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 NewListConditionValues200ResponseInner() *ListConditionValues200ResponseInner { + this := ListConditionValues200ResponseInner{} + return &this +} + +// NewListConditionValues200ResponseInnerWithDefaults instantiates a new ListConditionValues200ResponseInner 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 NewListConditionValues200ResponseInnerWithDefaults() *ListConditionValues200ResponseInner { + this := ListConditionValues200ResponseInner{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *ListConditionValues200ResponseInner) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// 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 *ListConditionValues200ResponseInner) GetNameOk() (*string, bool) { + if o == nil || o.Name == nil { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *ListConditionValues200ResponseInner) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *ListConditionValues200ResponseInner) SetName(v string) { + o.Name = &v +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *ListConditionValues200ResponseInner) GetValue() string { + if o == nil || o.Value == nil { + var ret string + return ret + } + return *o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListConditionValues200ResponseInner) GetValueOk() (*string, bool) { + if o == nil || o.Value == nil { + return nil, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *ListConditionValues200ResponseInner) HasValue() bool { + if o != nil && o.Value != nil { + return true + } + + return false +} + +// SetValue gets a reference to the given string and assigns it to the Value field. +func (o *ListConditionValues200ResponseInner) SetValue(v string) { + o.Value = &v +} + +func (o ListConditionValues200ResponseInner) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Name != nil { + toSerialize["name"] = o.Name + } + if o.Value != nil { + toSerialize["value"] = o.Value + } + return json.Marshal(toSerialize) +} + +type NullableListConditionValues200ResponseInner struct { + value *ListConditionValues200ResponseInner + isSet bool +} + +func (v NullableListConditionValues200ResponseInner) Get() *ListConditionValues200ResponseInner { + return v.value +} + +func (v *NullableListConditionValues200ResponseInner) Set(val *ListConditionValues200ResponseInner) { + v.value = val + v.isSet = true +} + +func (v NullableListConditionValues200ResponseInner) IsSet() bool { + return v.isSet +} + +func (v *NullableListConditionValues200ResponseInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListConditionValues200ResponseInner(val *ListConditionValues200ResponseInner) *NullableListConditionValues200ResponseInner { + return &NullableListConditionValues200ResponseInner{value: val, isSet: true} +} + +func (v NullableListConditionValues200ResponseInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListConditionValues200ResponseInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_list_conditions_200_response_inner.go b/model_list_conditions_200_response_inner.go new file mode 100644 index 0000000..3d16c80 --- /dev/null +++ b/model_list_conditions_200_response_inner.go @@ -0,0 +1,153 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// ListConditions200ResponseInner struct for ListConditions200ResponseInner +type ListConditions200ResponseInner struct { + // The name of the Condition. + Name *string `json:"name,omitempty"` + // The unique identifier of the condition. This should be used when defining conditions for a rule. + Value *string `json:"value,omitempty"` +} + +// NewListConditions200ResponseInner instantiates a new ListConditions200ResponseInner 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 NewListConditions200ResponseInner() *ListConditions200ResponseInner { + this := ListConditions200ResponseInner{} + return &this +} + +// NewListConditions200ResponseInnerWithDefaults instantiates a new ListConditions200ResponseInner 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 NewListConditions200ResponseInnerWithDefaults() *ListConditions200ResponseInner { + this := ListConditions200ResponseInner{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *ListConditions200ResponseInner) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// 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 *ListConditions200ResponseInner) GetNameOk() (*string, bool) { + if o == nil || o.Name == nil { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *ListConditions200ResponseInner) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *ListConditions200ResponseInner) SetName(v string) { + o.Name = &v +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *ListConditions200ResponseInner) GetValue() string { + if o == nil || o.Value == nil { + var ret string + return ret + } + return *o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListConditions200ResponseInner) GetValueOk() (*string, bool) { + if o == nil || o.Value == nil { + return nil, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *ListConditions200ResponseInner) HasValue() bool { + if o != nil && o.Value != nil { + return true + } + + return false +} + +// SetValue gets a reference to the given string and assigns it to the Value field. +func (o *ListConditions200ResponseInner) SetValue(v string) { + o.Value = &v +} + +func (o ListConditions200ResponseInner) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Name != nil { + toSerialize["name"] = o.Name + } + if o.Value != nil { + toSerialize["value"] = o.Value + } + return json.Marshal(toSerialize) +} + +type NullableListConditions200ResponseInner struct { + value *ListConditions200ResponseInner + isSet bool +} + +func (v NullableListConditions200ResponseInner) Get() *ListConditions200ResponseInner { + return v.value +} + +func (v *NullableListConditions200ResponseInner) Set(val *ListConditions200ResponseInner) { + v.value = val + v.isSet = true +} + +func (v NullableListConditions200ResponseInner) IsSet() bool { + return v.isSet +} + +func (v *NullableListConditions200ResponseInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListConditions200ResponseInner(val *ListConditions200ResponseInner) *NullableListConditions200ResponseInner { + return &NullableListConditions200ResponseInner{value: val, isSet: true} +} + +func (v NullableListConditions200ResponseInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListConditions200ResponseInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_list_mapping_condition_operators_200_response_inner.go b/model_list_mapping_condition_operators_200_response_inner.go new file mode 100644 index 0000000..1dbcbe5 --- /dev/null +++ b/model_list_mapping_condition_operators_200_response_inner.go @@ -0,0 +1,153 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// ListMappingConditionOperators200ResponseInner struct for ListMappingConditionOperators200ResponseInner +type ListMappingConditionOperators200ResponseInner struct { + // The name or description of the operator. + Name *string `json:"name,omitempty"` + // The condition operator value to use when creating or updating User Mappings. + Value *string `json:"value,omitempty"` +} + +// NewListMappingConditionOperators200ResponseInner instantiates a new ListMappingConditionOperators200ResponseInner 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 NewListMappingConditionOperators200ResponseInner() *ListMappingConditionOperators200ResponseInner { + this := ListMappingConditionOperators200ResponseInner{} + return &this +} + +// NewListMappingConditionOperators200ResponseInnerWithDefaults instantiates a new ListMappingConditionOperators200ResponseInner 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 NewListMappingConditionOperators200ResponseInnerWithDefaults() *ListMappingConditionOperators200ResponseInner { + this := ListMappingConditionOperators200ResponseInner{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *ListMappingConditionOperators200ResponseInner) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// 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 *ListMappingConditionOperators200ResponseInner) GetNameOk() (*string, bool) { + if o == nil || o.Name == nil { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *ListMappingConditionOperators200ResponseInner) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *ListMappingConditionOperators200ResponseInner) SetName(v string) { + o.Name = &v +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *ListMappingConditionOperators200ResponseInner) GetValue() string { + if o == nil || o.Value == nil { + var ret string + return ret + } + return *o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListMappingConditionOperators200ResponseInner) GetValueOk() (*string, bool) { + if o == nil || o.Value == nil { + return nil, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *ListMappingConditionOperators200ResponseInner) HasValue() bool { + if o != nil && o.Value != nil { + return true + } + + return false +} + +// SetValue gets a reference to the given string and assigns it to the Value field. +func (o *ListMappingConditionOperators200ResponseInner) SetValue(v string) { + o.Value = &v +} + +func (o ListMappingConditionOperators200ResponseInner) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Name != nil { + toSerialize["name"] = o.Name + } + if o.Value != nil { + toSerialize["value"] = o.Value + } + return json.Marshal(toSerialize) +} + +type NullableListMappingConditionOperators200ResponseInner struct { + value *ListMappingConditionOperators200ResponseInner + isSet bool +} + +func (v NullableListMappingConditionOperators200ResponseInner) Get() *ListMappingConditionOperators200ResponseInner { + return v.value +} + +func (v *NullableListMappingConditionOperators200ResponseInner) Set(val *ListMappingConditionOperators200ResponseInner) { + v.value = val + v.isSet = true +} + +func (v NullableListMappingConditionOperators200ResponseInner) IsSet() bool { + return v.isSet +} + +func (v *NullableListMappingConditionOperators200ResponseInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListMappingConditionOperators200ResponseInner(val *ListMappingConditionOperators200ResponseInner) *NullableListMappingConditionOperators200ResponseInner { + return &NullableListMappingConditionOperators200ResponseInner{value: val, isSet: true} +} + +func (v NullableListMappingConditionOperators200ResponseInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListMappingConditionOperators200ResponseInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_list_mapping_conditions_200_response_inner.go b/model_list_mapping_conditions_200_response_inner.go new file mode 100644 index 0000000..09a1326 --- /dev/null +++ b/model_list_mapping_conditions_200_response_inner.go @@ -0,0 +1,153 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// ListMappingConditions200ResponseInner struct for ListMappingConditions200ResponseInner +type ListMappingConditions200ResponseInner struct { + // The name of the Condition. + Name *string `json:"name,omitempty"` + // The unique identifier of the condition. This should be used when defining conditions for a User Mapping. + Value *string `json:"value,omitempty"` +} + +// NewListMappingConditions200ResponseInner instantiates a new ListMappingConditions200ResponseInner 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 NewListMappingConditions200ResponseInner() *ListMappingConditions200ResponseInner { + this := ListMappingConditions200ResponseInner{} + return &this +} + +// NewListMappingConditions200ResponseInnerWithDefaults instantiates a new ListMappingConditions200ResponseInner 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 NewListMappingConditions200ResponseInnerWithDefaults() *ListMappingConditions200ResponseInner { + this := ListMappingConditions200ResponseInner{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *ListMappingConditions200ResponseInner) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// 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 *ListMappingConditions200ResponseInner) GetNameOk() (*string, bool) { + if o == nil || o.Name == nil { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *ListMappingConditions200ResponseInner) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *ListMappingConditions200ResponseInner) SetName(v string) { + o.Name = &v +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *ListMappingConditions200ResponseInner) GetValue() string { + if o == nil || o.Value == nil { + var ret string + return ret + } + return *o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListMappingConditions200ResponseInner) GetValueOk() (*string, bool) { + if o == nil || o.Value == nil { + return nil, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *ListMappingConditions200ResponseInner) HasValue() bool { + if o != nil && o.Value != nil { + return true + } + + return false +} + +// SetValue gets a reference to the given string and assigns it to the Value field. +func (o *ListMappingConditions200ResponseInner) SetValue(v string) { + o.Value = &v +} + +func (o ListMappingConditions200ResponseInner) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Name != nil { + toSerialize["name"] = o.Name + } + if o.Value != nil { + toSerialize["value"] = o.Value + } + return json.Marshal(toSerialize) +} + +type NullableListMappingConditions200ResponseInner struct { + value *ListMappingConditions200ResponseInner + isSet bool +} + +func (v NullableListMappingConditions200ResponseInner) Get() *ListMappingConditions200ResponseInner { + return v.value +} + +func (v *NullableListMappingConditions200ResponseInner) Set(val *ListMappingConditions200ResponseInner) { + v.value = val + v.isSet = true +} + +func (v NullableListMappingConditions200ResponseInner) IsSet() bool { + return v.isSet +} + +func (v *NullableListMappingConditions200ResponseInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListMappingConditions200ResponseInner(val *ListMappingConditions200ResponseInner) *NullableListMappingConditions200ResponseInner { + return &NullableListMappingConditions200ResponseInner{value: val, isSet: true} +} + +func (v NullableListMappingConditions200ResponseInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListMappingConditions200ResponseInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_list_scopes_200_response_inner.go b/model_list_scopes_200_response_inner.go new file mode 100644 index 0000000..b4e6e26 --- /dev/null +++ b/model_list_scopes_200_response_inner.go @@ -0,0 +1,187 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// ListScopes200ResponseInner struct for ListScopes200ResponseInner +type ListScopes200ResponseInner struct { + Id *int32 `json:"id,omitempty"` + Value *string `json:"value,omitempty"` + Description *string `json:"description,omitempty"` +} + +// NewListScopes200ResponseInner instantiates a new ListScopes200ResponseInner 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 NewListScopes200ResponseInner() *ListScopes200ResponseInner { + this := ListScopes200ResponseInner{} + return &this +} + +// NewListScopes200ResponseInnerWithDefaults instantiates a new ListScopes200ResponseInner 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 NewListScopes200ResponseInnerWithDefaults() *ListScopes200ResponseInner { + this := ListScopes200ResponseInner{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *ListScopes200ResponseInner) GetId() int32 { + if o == nil || o.Id == nil { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListScopes200ResponseInner) GetIdOk() (*int32, bool) { + if o == nil || o.Id == nil { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *ListScopes200ResponseInner) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *ListScopes200ResponseInner) SetId(v int32) { + o.Id = &v +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *ListScopes200ResponseInner) GetValue() string { + if o == nil || o.Value == nil { + var ret string + return ret + } + return *o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListScopes200ResponseInner) GetValueOk() (*string, bool) { + if o == nil || o.Value == nil { + return nil, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *ListScopes200ResponseInner) HasValue() bool { + if o != nil && o.Value != nil { + return true + } + + return false +} + +// SetValue gets a reference to the given string and assigns it to the Value field. +func (o *ListScopes200ResponseInner) SetValue(v string) { + o.Value = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *ListScopes200ResponseInner) GetDescription() string { + if o == nil || o.Description == nil { + var ret string + return ret + } + return *o.Description +} + +// 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 *ListScopes200ResponseInner) GetDescriptionOk() (*string, bool) { + if o == nil || o.Description == nil { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *ListScopes200ResponseInner) HasDescription() bool { + if o != nil && o.Description != nil { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *ListScopes200ResponseInner) SetDescription(v string) { + o.Description = &v +} + +func (o ListScopes200ResponseInner) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Value != nil { + toSerialize["value"] = o.Value + } + if o.Description != nil { + toSerialize["description"] = o.Description + } + return json.Marshal(toSerialize) +} + +type NullableListScopes200ResponseInner struct { + value *ListScopes200ResponseInner + isSet bool +} + +func (v NullableListScopes200ResponseInner) Get() *ListScopes200ResponseInner { + return v.value +} + +func (v *NullableListScopes200ResponseInner) Set(val *ListScopes200ResponseInner) { + v.value = val + v.isSet = true +} + +func (v NullableListScopes200ResponseInner) IsSet() bool { + return v.isSet +} + +func (v *NullableListScopes200ResponseInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListScopes200ResponseInner(val *ListScopes200ResponseInner) *NullableListScopes200ResponseInner { + return &NullableListScopes200ResponseInner{value: val, isSet: true} +} + +func (v NullableListScopes200ResponseInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListScopes200ResponseInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_log.go b/model_log.go new file mode 100644 index 0000000..2f63481 --- /dev/null +++ b/model_log.go @@ -0,0 +1,223 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// Log struct for Log +type Log struct { + RequestId *string `json:"request_id,omitempty"` + CorrelationId *string `json:"correlation_id,omitempty"` + CreatedAt *string `json:"created_at,omitempty"` + Events []string `json:"events,omitempty"` +} + +// NewLog instantiates a new Log 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 NewLog() *Log { + this := Log{} + return &this +} + +// NewLogWithDefaults instantiates a new Log 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 NewLogWithDefaults() *Log { + this := Log{} + return &this +} + +// GetRequestId returns the RequestId field value if set, zero value otherwise. +func (o *Log) GetRequestId() string { + if o == nil || o.RequestId == nil { + var ret string + return ret + } + return *o.RequestId +} + +// GetRequestIdOk returns a tuple with the RequestId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Log) GetRequestIdOk() (*string, bool) { + if o == nil || o.RequestId == nil { + return nil, false + } + return o.RequestId, true +} + +// HasRequestId returns a boolean if a field has been set. +func (o *Log) HasRequestId() bool { + if o != nil && o.RequestId != nil { + return true + } + + return false +} + +// SetRequestId gets a reference to the given string and assigns it to the RequestId field. +func (o *Log) SetRequestId(v string) { + o.RequestId = &v +} + +// GetCorrelationId returns the CorrelationId field value if set, zero value otherwise. +func (o *Log) GetCorrelationId() string { + if o == nil || o.CorrelationId == nil { + var ret string + return ret + } + return *o.CorrelationId +} + +// GetCorrelationIdOk returns a tuple with the CorrelationId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Log) GetCorrelationIdOk() (*string, bool) { + if o == nil || o.CorrelationId == nil { + return nil, false + } + return o.CorrelationId, true +} + +// HasCorrelationId returns a boolean if a field has been set. +func (o *Log) HasCorrelationId() bool { + if o != nil && o.CorrelationId != nil { + return true + } + + return false +} + +// SetCorrelationId gets a reference to the given string and assigns it to the CorrelationId field. +func (o *Log) SetCorrelationId(v string) { + o.CorrelationId = &v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *Log) GetCreatedAt() string { + if o == nil || o.CreatedAt == nil { + var ret string + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Log) GetCreatedAtOk() (*string, bool) { + if o == nil || o.CreatedAt == nil { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *Log) HasCreatedAt() bool { + if o != nil && o.CreatedAt != nil { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given string and assigns it to the CreatedAt field. +func (o *Log) SetCreatedAt(v string) { + o.CreatedAt = &v +} + +// GetEvents returns the Events field value if set, zero value otherwise. +func (o *Log) GetEvents() []string { + if o == nil || o.Events == nil { + var ret []string + return ret + } + return o.Events +} + +// GetEventsOk returns a tuple with the Events field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Log) GetEventsOk() ([]string, bool) { + if o == nil || o.Events == nil { + return nil, false + } + return o.Events, true +} + +// HasEvents returns a boolean if a field has been set. +func (o *Log) HasEvents() bool { + if o != nil && o.Events != nil { + return true + } + + return false +} + +// SetEvents gets a reference to the given []string and assigns it to the Events field. +func (o *Log) SetEvents(v []string) { + o.Events = v +} + +func (o Log) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.RequestId != nil { + toSerialize["request_id"] = o.RequestId + } + if o.CorrelationId != nil { + toSerialize["correlation_id"] = o.CorrelationId + } + if o.CreatedAt != nil { + toSerialize["created_at"] = o.CreatedAt + } + if o.Events != nil { + toSerialize["events"] = o.Events + } + return json.Marshal(toSerialize) +} + +type NullableLog struct { + value *Log + isSet bool +} + +func (v NullableLog) Get() *Log { + return v.value +} + +func (v *NullableLog) Set(val *Log) { + v.value = val + v.isSet = true +} + +func (v NullableLog) IsSet() bool { + return v.isSet +} + +func (v *NullableLog) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLog(val *Log) *NullableLog { + return &NullableLog{value: val, isSet: true} +} + +func (v NullableLog) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLog) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_mapping.go b/model_mapping.go new file mode 100644 index 0000000..cdb39f4 --- /dev/null +++ b/model_mapping.go @@ -0,0 +1,302 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// Mapping struct for Mapping +type Mapping struct { + Id *int32 `json:"id,omitempty"` + // The name of the mapping. + Name string `json:"name"` + // Indicates if the mapping is enabled or not. + Enabled bool `json:"enabled"` + // Indicates how conditions should be matched. + Match string `json:"match"` + // Indicates the order of the mapping. When `null` this will default to last position. + Position int32 `json:"position"` + // An array of conditions that the user must meet in order for the mapping to be applied. + Conditions []Condition `json:"conditions,omitempty"` + // An array of actions that will be applied to the users that are matched by the conditions. + Actions []Action `json:"actions"` +} + +// NewMapping instantiates a new Mapping 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 NewMapping(name string, enabled bool, match string, position int32, actions []Action) *Mapping { + this := Mapping{} + this.Name = name + this.Enabled = enabled + this.Match = match + this.Position = position + this.Actions = actions + return &this +} + +// NewMappingWithDefaults instantiates a new Mapping 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 NewMappingWithDefaults() *Mapping { + this := Mapping{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *Mapping) GetId() int32 { + if o == nil || o.Id == nil { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Mapping) GetIdOk() (*int32, bool) { + if o == nil || o.Id == nil { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *Mapping) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *Mapping) SetId(v int32) { + o.Id = &v +} + +// GetName returns the Name field value +func (o *Mapping) 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 *Mapping) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *Mapping) SetName(v string) { + o.Name = v +} + +// GetEnabled returns the Enabled field value +func (o *Mapping) GetEnabled() bool { + if o == nil { + var ret bool + return ret + } + + return o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value +// and a boolean to check if the value has been set. +func (o *Mapping) GetEnabledOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Enabled, true +} + +// SetEnabled sets field value +func (o *Mapping) SetEnabled(v bool) { + o.Enabled = v +} + +// GetMatch returns the Match field value +func (o *Mapping) GetMatch() string { + if o == nil { + var ret string + return ret + } + + return o.Match +} + +// GetMatchOk returns a tuple with the Match field value +// and a boolean to check if the value has been set. +func (o *Mapping) GetMatchOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Match, true +} + +// SetMatch sets field value +func (o *Mapping) SetMatch(v string) { + o.Match = v +} + +// GetPosition returns the Position field value +func (o *Mapping) GetPosition() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Position +} + +// GetPositionOk returns a tuple with the Position field value +// and a boolean to check if the value has been set. +func (o *Mapping) GetPositionOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Position, true +} + +// SetPosition sets field value +func (o *Mapping) SetPosition(v int32) { + o.Position = v +} + +// GetConditions returns the Conditions field value if set, zero value otherwise. +func (o *Mapping) GetConditions() []Condition { + if o == nil || o.Conditions == nil { + var ret []Condition + return ret + } + return o.Conditions +} + +// GetConditionsOk returns a tuple with the Conditions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Mapping) GetConditionsOk() ([]Condition, bool) { + if o == nil || o.Conditions == nil { + return nil, false + } + return o.Conditions, true +} + +// HasConditions returns a boolean if a field has been set. +func (o *Mapping) HasConditions() bool { + if o != nil && o.Conditions != nil { + return true + } + + return false +} + +// SetConditions gets a reference to the given []Condition and assigns it to the Conditions field. +func (o *Mapping) SetConditions(v []Condition) { + o.Conditions = v +} + +// GetActions returns the Actions field value +func (o *Mapping) GetActions() []Action { + if o == nil { + var ret []Action + return ret + } + + return o.Actions +} + +// GetActionsOk returns a tuple with the Actions field value +// and a boolean to check if the value has been set. +func (o *Mapping) GetActionsOk() ([]Action, bool) { + if o == nil { + return nil, false + } + return o.Actions, true +} + +// SetActions sets field value +func (o *Mapping) SetActions(v []Action) { + o.Actions = v +} + +func (o Mapping) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Id != nil { + toSerialize["id"] = o.Id + } + if true { + toSerialize["name"] = o.Name + } + if true { + toSerialize["enabled"] = o.Enabled + } + if true { + toSerialize["match"] = o.Match + } + if true { + toSerialize["position"] = o.Position + } + if o.Conditions != nil { + toSerialize["conditions"] = o.Conditions + } + if true { + toSerialize["actions"] = o.Actions + } + return json.Marshal(toSerialize) +} + +type NullableMapping struct { + value *Mapping + isSet bool +} + +func (v NullableMapping) Get() *Mapping { + return v.value +} + +func (v *NullableMapping) Set(val *Mapping) { + v.value = val + v.isSet = true +} + +func (v NullableMapping) IsSet() bool { + return v.isSet +} + +func (v *NullableMapping) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMapping(val *Mapping) *NullableMapping { + return &NullableMapping{value: val, isSet: true} +} + +func (v NullableMapping) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMapping) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_registration.go b/model_registration.go new file mode 100644 index 0000000..7cfabda --- /dev/null +++ b/model_registration.go @@ -0,0 +1,190 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// Registration struct for Registration +type Registration struct { + // Registration identifier. + Id *string `json:"id,omitempty"` + // pending registration has not been completed successfully. accepted registration has successfully completed. + Status *string `json:"status,omitempty"` + // Device id to be used with Verify the Factor. + DeviceId *string `json:"device_id,omitempty"` +} + +// NewRegistration instantiates a new Registration 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 NewRegistration() *Registration { + this := Registration{} + return &this +} + +// NewRegistrationWithDefaults instantiates a new Registration 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 NewRegistrationWithDefaults() *Registration { + this := Registration{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *Registration) GetId() string { + if o == nil || o.Id == nil { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Registration) GetIdOk() (*string, bool) { + if o == nil || o.Id == nil { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *Registration) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *Registration) SetId(v string) { + o.Id = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *Registration) GetStatus() string { + if o == nil || o.Status == nil { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Registration) GetStatusOk() (*string, bool) { + if o == nil || o.Status == nil { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *Registration) HasStatus() bool { + if o != nil && o.Status != nil { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *Registration) SetStatus(v string) { + o.Status = &v +} + +// GetDeviceId returns the DeviceId field value if set, zero value otherwise. +func (o *Registration) GetDeviceId() string { + if o == nil || o.DeviceId == nil { + var ret string + return ret + } + return *o.DeviceId +} + +// GetDeviceIdOk returns a tuple with the DeviceId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Registration) GetDeviceIdOk() (*string, bool) { + if o == nil || o.DeviceId == nil { + return nil, false + } + return o.DeviceId, true +} + +// HasDeviceId returns a boolean if a field has been set. +func (o *Registration) HasDeviceId() bool { + if o != nil && o.DeviceId != nil { + return true + } + + return false +} + +// SetDeviceId gets a reference to the given string and assigns it to the DeviceId field. +func (o *Registration) SetDeviceId(v string) { + o.DeviceId = &v +} + +func (o Registration) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Status != nil { + toSerialize["status"] = o.Status + } + if o.DeviceId != nil { + toSerialize["device_id"] = o.DeviceId + } + return json.Marshal(toSerialize) +} + +type NullableRegistration struct { + value *Registration + isSet bool +} + +func (v NullableRegistration) Get() *Registration { + return v.value +} + +func (v *NullableRegistration) Set(val *Registration) { + v.value = val + v.isSet = true +} + +func (v NullableRegistration) IsSet() bool { + return v.isSet +} + +func (v *NullableRegistration) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRegistration(val *Registration) *NullableRegistration { + return &NullableRegistration{value: val, isSet: true} +} + +func (v NullableRegistration) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRegistration) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_remove_role_users_request.go b/model_remove_role_users_request.go new file mode 100644 index 0000000..b26b106 --- /dev/null +++ b/model_remove_role_users_request.go @@ -0,0 +1,115 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// RemoveRoleUsersRequest struct for RemoveRoleUsersRequest +type RemoveRoleUsersRequest struct { + UserId []int32 `json:"user_id,omitempty"` +} + +// NewRemoveRoleUsersRequest instantiates a new RemoveRoleUsersRequest 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 NewRemoveRoleUsersRequest() *RemoveRoleUsersRequest { + this := RemoveRoleUsersRequest{} + return &this +} + +// NewRemoveRoleUsersRequestWithDefaults instantiates a new RemoveRoleUsersRequest 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 NewRemoveRoleUsersRequestWithDefaults() *RemoveRoleUsersRequest { + this := RemoveRoleUsersRequest{} + return &this +} + +// GetUserId returns the UserId field value if set, zero value otherwise. +func (o *RemoveRoleUsersRequest) GetUserId() []int32 { + if o == nil || o.UserId == nil { + var ret []int32 + return ret + } + return o.UserId +} + +// GetUserIdOk returns a tuple with the UserId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RemoveRoleUsersRequest) GetUserIdOk() ([]int32, bool) { + if o == nil || o.UserId == nil { + return nil, false + } + return o.UserId, true +} + +// HasUserId returns a boolean if a field has been set. +func (o *RemoveRoleUsersRequest) HasUserId() bool { + if o != nil && o.UserId != nil { + return true + } + + return false +} + +// SetUserId gets a reference to the given []int32 and assigns it to the UserId field. +func (o *RemoveRoleUsersRequest) SetUserId(v []int32) { + o.UserId = v +} + +func (o RemoveRoleUsersRequest) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UserId != nil { + toSerialize["user_id"] = o.UserId + } + return json.Marshal(toSerialize) +} + +type NullableRemoveRoleUsersRequest struct { + value *RemoveRoleUsersRequest + isSet bool +} + +func (v NullableRemoveRoleUsersRequest) Get() *RemoveRoleUsersRequest { + return v.value +} + +func (v *NullableRemoveRoleUsersRequest) Set(val *RemoveRoleUsersRequest) { + v.value = val + v.isSet = true +} + +func (v NullableRemoveRoleUsersRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableRemoveRoleUsersRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRemoveRoleUsersRequest(val *RemoveRoleUsersRequest) *NullableRemoveRoleUsersRequest { + return &NullableRemoveRoleUsersRequest{value: val, isSet: true} +} + +func (v NullableRemoveRoleUsersRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRemoveRoleUsersRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_revoke_token_request.go b/model_revoke_token_request.go new file mode 100644 index 0000000..30a27cb --- /dev/null +++ b/model_revoke_token_request.go @@ -0,0 +1,115 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// RevokeTokenRequest struct for RevokeTokenRequest +type RevokeTokenRequest struct { + AccessToken *string `json:"access_token,omitempty"` +} + +// NewRevokeTokenRequest instantiates a new RevokeTokenRequest 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 NewRevokeTokenRequest() *RevokeTokenRequest { + this := RevokeTokenRequest{} + return &this +} + +// NewRevokeTokenRequestWithDefaults instantiates a new RevokeTokenRequest 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 NewRevokeTokenRequestWithDefaults() *RevokeTokenRequest { + this := RevokeTokenRequest{} + return &this +} + +// GetAccessToken returns the AccessToken field value if set, zero value otherwise. +func (o *RevokeTokenRequest) GetAccessToken() string { + if o == nil || o.AccessToken == nil { + var ret string + return ret + } + return *o.AccessToken +} + +// GetAccessTokenOk returns a tuple with the AccessToken field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RevokeTokenRequest) GetAccessTokenOk() (*string, bool) { + if o == nil || o.AccessToken == nil { + return nil, false + } + return o.AccessToken, true +} + +// HasAccessToken returns a boolean if a field has been set. +func (o *RevokeTokenRequest) HasAccessToken() bool { + if o != nil && o.AccessToken != nil { + return true + } + + return false +} + +// SetAccessToken gets a reference to the given string and assigns it to the AccessToken field. +func (o *RevokeTokenRequest) SetAccessToken(v string) { + o.AccessToken = &v +} + +func (o RevokeTokenRequest) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.AccessToken != nil { + toSerialize["access_token"] = o.AccessToken + } + return json.Marshal(toSerialize) +} + +type NullableRevokeTokenRequest struct { + value *RevokeTokenRequest + isSet bool +} + +func (v NullableRevokeTokenRequest) Get() *RevokeTokenRequest { + return v.value +} + +func (v *NullableRevokeTokenRequest) Set(val *RevokeTokenRequest) { + v.value = val + v.isSet = true +} + +func (v NullableRevokeTokenRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableRevokeTokenRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRevokeTokenRequest(val *RevokeTokenRequest) *NullableRevokeTokenRequest { + return &NullableRevokeTokenRequest{value: val, isSet: true} +} + +func (v NullableRevokeTokenRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRevokeTokenRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_risk_device.go b/model_risk_device.go new file mode 100644 index 0000000..7eecc70 --- /dev/null +++ b/model_risk_device.go @@ -0,0 +1,116 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// RiskDevice Information about the device being used. +type RiskDevice struct { + // This device's unique identifier + Id *string `json:"id,omitempty"` +} + +// NewRiskDevice instantiates a new RiskDevice 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 NewRiskDevice() *RiskDevice { + this := RiskDevice{} + return &this +} + +// NewRiskDeviceWithDefaults instantiates a new RiskDevice 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 NewRiskDeviceWithDefaults() *RiskDevice { + this := RiskDevice{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *RiskDevice) GetId() string { + if o == nil || o.Id == nil { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RiskDevice) GetIdOk() (*string, bool) { + if o == nil || o.Id == nil { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *RiskDevice) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *RiskDevice) SetId(v string) { + o.Id = &v +} + +func (o RiskDevice) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Id != nil { + toSerialize["id"] = o.Id + } + return json.Marshal(toSerialize) +} + +type NullableRiskDevice struct { + value *RiskDevice + isSet bool +} + +func (v NullableRiskDevice) Get() *RiskDevice { + return v.value +} + +func (v *NullableRiskDevice) Set(val *RiskDevice) { + v.value = val + v.isSet = true +} + +func (v NullableRiskDevice) IsSet() bool { + return v.isSet +} + +func (v *NullableRiskDevice) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRiskDevice(val *RiskDevice) *NullableRiskDevice { + return &NullableRiskDevice{value: val, isSet: true} +} + +func (v NullableRiskDevice) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRiskDevice) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_risk_rule.go b/model_risk_rule.go new file mode 100644 index 0000000..84b6e1f --- /dev/null +++ b/model_risk_rule.go @@ -0,0 +1,335 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// RiskRule struct for RiskRule +type RiskRule struct { + Id *string `json:"id,omitempty"` + // The name of this rule + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + // The type parameter specifies the type of rule that will be created. + Type *string `json:"type,omitempty"` + // The target parameter that will be used when evaluating the rule against an incoming event. + Target *string `json:"target,omitempty"` + // A list of IP addresses or country codes or names to evaluate against each event. + Filters []string `json:"filters,omitempty"` + Source *Source `json:"source,omitempty"` +} + +// NewRiskRule instantiates a new RiskRule 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 NewRiskRule() *RiskRule { + this := RiskRule{} + return &this +} + +// NewRiskRuleWithDefaults instantiates a new RiskRule 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 NewRiskRuleWithDefaults() *RiskRule { + this := RiskRule{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *RiskRule) GetId() string { + if o == nil || o.Id == nil { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RiskRule) GetIdOk() (*string, bool) { + if o == nil || o.Id == nil { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *RiskRule) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *RiskRule) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *RiskRule) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// 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 *RiskRule) GetNameOk() (*string, bool) { + if o == nil || o.Name == nil { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *RiskRule) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *RiskRule) SetName(v string) { + o.Name = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *RiskRule) GetDescription() string { + if o == nil || o.Description == nil { + var ret string + return ret + } + return *o.Description +} + +// 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 *RiskRule) GetDescriptionOk() (*string, bool) { + if o == nil || o.Description == nil { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *RiskRule) HasDescription() bool { + if o != nil && o.Description != nil { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *RiskRule) SetDescription(v string) { + o.Description = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *RiskRule) GetType() string { + if o == nil || o.Type == nil { + var ret string + return ret + } + return *o.Type +} + +// 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 *RiskRule) GetTypeOk() (*string, bool) { + if o == nil || o.Type == nil { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *RiskRule) HasType() bool { + if o != nil && o.Type != nil { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *RiskRule) SetType(v string) { + o.Type = &v +} + +// GetTarget returns the Target field value if set, zero value otherwise. +func (o *RiskRule) GetTarget() string { + if o == nil || o.Target == nil { + var ret string + return ret + } + return *o.Target +} + +// 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 *RiskRule) GetTargetOk() (*string, bool) { + if o == nil || o.Target == nil { + return nil, false + } + return o.Target, true +} + +// HasTarget returns a boolean if a field has been set. +func (o *RiskRule) HasTarget() bool { + if o != nil && o.Target != nil { + return true + } + + return false +} + +// SetTarget gets a reference to the given string and assigns it to the Target field. +func (o *RiskRule) SetTarget(v string) { + o.Target = &v +} + +// GetFilters returns the Filters field value if set, zero value otherwise. +func (o *RiskRule) GetFilters() []string { + if o == nil || o.Filters == nil { + var ret []string + return ret + } + return o.Filters +} + +// GetFiltersOk returns a tuple with the Filters field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RiskRule) GetFiltersOk() ([]string, bool) { + if o == nil || o.Filters == nil { + return nil, false + } + return o.Filters, true +} + +// HasFilters returns a boolean if a field has been set. +func (o *RiskRule) HasFilters() bool { + if o != nil && o.Filters != nil { + return true + } + + return false +} + +// SetFilters gets a reference to the given []string and assigns it to the Filters field. +func (o *RiskRule) SetFilters(v []string) { + o.Filters = v +} + +// GetSource returns the Source field value if set, zero value otherwise. +func (o *RiskRule) GetSource() Source { + if o == nil || o.Source == nil { + var ret Source + return ret + } + return *o.Source +} + +// GetSourceOk returns a tuple with the Source field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RiskRule) GetSourceOk() (*Source, bool) { + if o == nil || o.Source == nil { + return nil, false + } + return o.Source, true +} + +// HasSource returns a boolean if a field has been set. +func (o *RiskRule) HasSource() bool { + if o != nil && o.Source != nil { + return true + } + + return false +} + +// SetSource gets a reference to the given Source and assigns it to the Source field. +func (o *RiskRule) SetSource(v Source) { + o.Source = &v +} + +func (o RiskRule) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Name != nil { + toSerialize["name"] = o.Name + } + if o.Description != nil { + toSerialize["description"] = o.Description + } + if o.Type != nil { + toSerialize["type"] = o.Type + } + if o.Target != nil { + toSerialize["target"] = o.Target + } + if o.Filters != nil { + toSerialize["filters"] = o.Filters + } + if o.Source != nil { + toSerialize["source"] = o.Source + } + return json.Marshal(toSerialize) +} + +type NullableRiskRule struct { + value *RiskRule + isSet bool +} + +func (v NullableRiskRule) Get() *RiskRule { + return v.value +} + +func (v *NullableRiskRule) Set(val *RiskRule) { + v.value = val + v.isSet = true +} + +func (v NullableRiskRule) IsSet() bool { + return v.isSet +} + +func (v *NullableRiskRule) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRiskRule(val *RiskRule) *NullableRiskRule { + return &NullableRiskRule{value: val, isSet: true} +} + +func (v NullableRiskRule) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRiskRule) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_risk_user.go b/model_risk_user.go new file mode 100644 index 0000000..9fb824f --- /dev/null +++ b/model_risk_user.go @@ -0,0 +1,187 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// RiskUser An Object containing User details. +type RiskUser struct { + // A unique identifier for the user. + Id string `json:"id"` + // A name for the user. + Name *string `json:"name,omitempty"` + // Indicates if the metadata supplied in this event should be considered as trusted for the user. + Authenticated *bool `json:"authenticated,omitempty"` +} + +// NewRiskUser instantiates a new RiskUser 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 NewRiskUser(id string) *RiskUser { + this := RiskUser{} + this.Id = id + var authenticated bool = false + this.Authenticated = &authenticated + return &this +} + +// NewRiskUserWithDefaults instantiates a new RiskUser 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 NewRiskUserWithDefaults() *RiskUser { + this := RiskUser{} + var authenticated bool = false + this.Authenticated = &authenticated + return &this +} + +// GetId returns the Id field value +func (o *RiskUser) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *RiskUser) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *RiskUser) SetId(v string) { + o.Id = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *RiskUser) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// 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 *RiskUser) GetNameOk() (*string, bool) { + if o == nil || o.Name == nil { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *RiskUser) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *RiskUser) SetName(v string) { + o.Name = &v +} + +// GetAuthenticated returns the Authenticated field value if set, zero value otherwise. +func (o *RiskUser) GetAuthenticated() bool { + if o == nil || o.Authenticated == nil { + var ret bool + return ret + } + return *o.Authenticated +} + +// GetAuthenticatedOk returns a tuple with the Authenticated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RiskUser) GetAuthenticatedOk() (*bool, bool) { + if o == nil || o.Authenticated == nil { + return nil, false + } + return o.Authenticated, true +} + +// HasAuthenticated returns a boolean if a field has been set. +func (o *RiskUser) HasAuthenticated() bool { + if o != nil && o.Authenticated != nil { + return true + } + + return false +} + +// SetAuthenticated gets a reference to the given bool and assigns it to the Authenticated field. +func (o *RiskUser) SetAuthenticated(v bool) { + o.Authenticated = &v +} + +func (o RiskUser) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["id"] = o.Id + } + if o.Name != nil { + toSerialize["name"] = o.Name + } + if o.Authenticated != nil { + toSerialize["authenticated"] = o.Authenticated + } + return json.Marshal(toSerialize) +} + +type NullableRiskUser struct { + value *RiskUser + isSet bool +} + +func (v NullableRiskUser) Get() *RiskUser { + return v.value +} + +func (v *NullableRiskUser) Set(val *RiskUser) { + v.value = val + v.isSet = true +} + +func (v NullableRiskUser) IsSet() bool { + return v.isSet +} + +func (v *NullableRiskUser) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRiskUser(val *RiskUser) *NullableRiskUser { + return &NullableRiskUser{value: val, isSet: true} +} + +func (v NullableRiskUser) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRiskUser) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_role.go b/model_role.go new file mode 100644 index 0000000..0d0fc1f --- /dev/null +++ b/model_role.go @@ -0,0 +1,252 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// Role struct for Role +type Role struct { + Id *int32 `json:"id,omitempty"` + Name string `json:"name"` + Apps []int32 `json:"apps,omitempty"` + Users []int32 `json:"users,omitempty"` + Admins []int32 `json:"admins,omitempty"` +} + +// NewRole instantiates a new Role 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 NewRole(name string) *Role { + this := Role{} + this.Name = name + return &this +} + +// NewRoleWithDefaults instantiates a new Role 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 NewRoleWithDefaults() *Role { + this := Role{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *Role) GetId() int32 { + if o == nil || o.Id == nil { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Role) GetIdOk() (*int32, bool) { + if o == nil || o.Id == nil { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *Role) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *Role) SetId(v int32) { + o.Id = &v +} + +// GetName returns the Name field value +func (o *Role) 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 *Role) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *Role) SetName(v string) { + o.Name = v +} + +// GetApps returns the Apps field value if set, zero value otherwise. +func (o *Role) GetApps() []int32 { + if o == nil || o.Apps == nil { + var ret []int32 + return ret + } + return o.Apps +} + +// GetAppsOk returns a tuple with the Apps field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Role) GetAppsOk() ([]int32, bool) { + if o == nil || o.Apps == nil { + return nil, false + } + return o.Apps, true +} + +// HasApps returns a boolean if a field has been set. +func (o *Role) HasApps() bool { + if o != nil && o.Apps != nil { + return true + } + + return false +} + +// SetApps gets a reference to the given []int32 and assigns it to the Apps field. +func (o *Role) SetApps(v []int32) { + o.Apps = v +} + +// GetUsers returns the Users field value if set, zero value otherwise. +func (o *Role) 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 *Role) 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 *Role) 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 *Role) SetUsers(v []int32) { + o.Users = v +} + +// GetAdmins returns the Admins field value if set, zero value otherwise. +func (o *Role) GetAdmins() []int32 { + if o == nil || o.Admins == nil { + var ret []int32 + return ret + } + return o.Admins +} + +// GetAdminsOk returns a tuple with the Admins field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Role) GetAdminsOk() ([]int32, bool) { + if o == nil || o.Admins == nil { + return nil, false + } + return o.Admins, true +} + +// HasAdmins returns a boolean if a field has been set. +func (o *Role) HasAdmins() bool { + if o != nil && o.Admins != nil { + return true + } + + return false +} + +// SetAdmins gets a reference to the given []int32 and assigns it to the Admins field. +func (o *Role) SetAdmins(v []int32) { + o.Admins = v +} + +func (o Role) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Id != nil { + toSerialize["id"] = o.Id + } + if true { + toSerialize["name"] = o.Name + } + if o.Apps != nil { + toSerialize["apps"] = o.Apps + } + if o.Users != nil { + toSerialize["users"] = o.Users + } + if o.Admins != nil { + toSerialize["admins"] = o.Admins + } + return json.Marshal(toSerialize) +} + +type NullableRole struct { + value *Role + isSet bool +} + +func (v NullableRole) Get() *Role { + return v.value +} + +func (v *NullableRole) Set(val *Role) { + v.value = val + v.isSet = true +} + +func (v NullableRole) IsSet() bool { + return v.isSet +} + +func (v *NullableRole) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRole(val *Role) *NullableRole { + return &NullableRole{value: val, isSet: true} +} + +func (v NullableRole) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRole) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_rule.go b/model_rule.go new file mode 100644 index 0000000..0ea5039 --- /dev/null +++ b/model_rule.go @@ -0,0 +1,337 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// Rule struct for Rule +type Rule struct { + Id *int32 `json:"id,omitempty"` + // The name of the rule. + Name *string `json:"name,omitempty"` + // Indicates how conditions should be matched. + Match *string `json:"match,omitempty"` + // Indicates if the rule is enabled or not. + Enabled *bool `json:"enabled,omitempty"` + // Indicates the order of the rule. When `null` this will default to last position. + Position *int32 `json:"position,omitempty"` + // An array of conditions that the user must meet in order for the rule to be applied. + Conditions []Condition `json:"conditions,omitempty"` + // An array of actions that will be applied to the users that are matched by the conditions. + Actions []Action `json:"actions,omitempty"` +} + +// NewRule instantiates a new Rule 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 NewRule() *Rule { + this := Rule{} + return &this +} + +// NewRuleWithDefaults instantiates a new Rule 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 NewRuleWithDefaults() *Rule { + this := Rule{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *Rule) GetId() int32 { + if o == nil || o.Id == nil { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Rule) GetIdOk() (*int32, bool) { + if o == nil || o.Id == nil { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *Rule) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *Rule) SetId(v int32) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *Rule) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// 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 *Rule) GetNameOk() (*string, bool) { + if o == nil || o.Name == nil { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *Rule) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *Rule) SetName(v string) { + o.Name = &v +} + +// GetMatch returns the Match field value if set, zero value otherwise. +func (o *Rule) GetMatch() string { + if o == nil || o.Match == nil { + var ret string + return ret + } + return *o.Match +} + +// GetMatchOk returns a tuple with the Match field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Rule) GetMatchOk() (*string, bool) { + if o == nil || o.Match == nil { + return nil, false + } + return o.Match, true +} + +// HasMatch returns a boolean if a field has been set. +func (o *Rule) HasMatch() bool { + if o != nil && o.Match != nil { + return true + } + + return false +} + +// SetMatch gets a reference to the given string and assigns it to the Match field. +func (o *Rule) SetMatch(v string) { + o.Match = &v +} + +// GetEnabled returns the Enabled field value if set, zero value otherwise. +func (o *Rule) 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 *Rule) 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 *Rule) 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 *Rule) SetEnabled(v bool) { + o.Enabled = &v +} + +// GetPosition returns the Position field value if set, zero value otherwise. +func (o *Rule) GetPosition() int32 { + if o == nil || o.Position == nil { + var ret int32 + return ret + } + return *o.Position +} + +// GetPositionOk returns a tuple with the Position field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Rule) GetPositionOk() (*int32, bool) { + if o == nil || o.Position == nil { + return nil, false + } + return o.Position, true +} + +// HasPosition returns a boolean if a field has been set. +func (o *Rule) HasPosition() bool { + if o != nil && o.Position != nil { + return true + } + + return false +} + +// SetPosition gets a reference to the given int32 and assigns it to the Position field. +func (o *Rule) SetPosition(v int32) { + o.Position = &v +} + +// GetConditions returns the Conditions field value if set, zero value otherwise. +func (o *Rule) GetConditions() []Condition { + if o == nil || o.Conditions == nil { + var ret []Condition + return ret + } + return o.Conditions +} + +// GetConditionsOk returns a tuple with the Conditions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Rule) GetConditionsOk() ([]Condition, bool) { + if o == nil || o.Conditions == nil { + return nil, false + } + return o.Conditions, true +} + +// HasConditions returns a boolean if a field has been set. +func (o *Rule) HasConditions() bool { + if o != nil && o.Conditions != nil { + return true + } + + return false +} + +// SetConditions gets a reference to the given []Condition and assigns it to the Conditions field. +func (o *Rule) SetConditions(v []Condition) { + o.Conditions = v +} + +// GetActions returns the Actions field value if set, zero value otherwise. +func (o *Rule) GetActions() []Action { + if o == nil || o.Actions == nil { + var ret []Action + return ret + } + return o.Actions +} + +// GetActionsOk returns a tuple with the Actions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Rule) GetActionsOk() ([]Action, bool) { + if o == nil || o.Actions == nil { + return nil, false + } + return o.Actions, true +} + +// HasActions returns a boolean if a field has been set. +func (o *Rule) HasActions() bool { + if o != nil && o.Actions != nil { + return true + } + + return false +} + +// SetActions gets a reference to the given []Action and assigns it to the Actions field. +func (o *Rule) SetActions(v []Action) { + o.Actions = v +} + +func (o Rule) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Name != nil { + toSerialize["name"] = o.Name + } + if o.Match != nil { + toSerialize["match"] = o.Match + } + if o.Enabled != nil { + toSerialize["enabled"] = o.Enabled + } + if o.Position != nil { + toSerialize["position"] = o.Position + } + if o.Conditions != nil { + toSerialize["conditions"] = o.Conditions + } + if o.Actions != nil { + toSerialize["actions"] = o.Actions + } + return json.Marshal(toSerialize) +} + +type NullableRule struct { + value *Rule + isSet bool +} + +func (v NullableRule) Get() *Rule { + return v.value +} + +func (v *NullableRule) Set(val *Rule) { + v.value = val + v.isSet = true +} + +func (v NullableRule) IsSet() bool { + return v.isSet +} + +func (v *NullableRule) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRule(val *Rule) *NullableRule { + return &NullableRule{value: val, isSet: true} +} + +func (v NullableRule) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRule) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_rule_id.go b/model_rule_id.go new file mode 100644 index 0000000..9a0474a --- /dev/null +++ b/model_rule_id.go @@ -0,0 +1,115 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// RuleId struct for RuleId +type RuleId struct { + Id *int32 `json:"id,omitempty"` +} + +// NewRuleId instantiates a new RuleId 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 NewRuleId() *RuleId { + this := RuleId{} + return &this +} + +// NewRuleIdWithDefaults instantiates a new RuleId 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 NewRuleIdWithDefaults() *RuleId { + this := RuleId{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *RuleId) GetId() int32 { + if o == nil || o.Id == nil { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RuleId) GetIdOk() (*int32, bool) { + if o == nil || o.Id == nil { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *RuleId) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *RuleId) SetId(v int32) { + o.Id = &v +} + +func (o RuleId) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Id != nil { + toSerialize["id"] = o.Id + } + return json.Marshal(toSerialize) +} + +type NullableRuleId struct { + value *RuleId + isSet bool +} + +func (v NullableRuleId) Get() *RuleId { + return v.value +} + +func (v *NullableRuleId) Set(val *RuleId) { + v.value = val + v.isSet = true +} + +func (v NullableRuleId) IsSet() bool { + return v.isSet +} + +func (v *NullableRuleId) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRuleId(val *RuleId) *NullableRuleId { + return &NullableRuleId{value: val, isSet: true} +} + +func (v NullableRuleId) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRuleId) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_schema.go b/model_schema.go new file mode 100644 index 0000000..9ce1d1a --- /dev/null +++ b/model_schema.go @@ -0,0 +1,814 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// Schema struct for Schema +type Schema struct { + // Apps unique ID in OneLogin. + Id *int32 `json:"id,omitempty"` + // ID of the apps underlying connector. + ConnectorId *int32 `json:"connector_id,omitempty"` + // App name. + Name *string `json:"name,omitempty"` + // Freeform description of the app. + Description *string `json:"description,omitempty"` + // Freeform notes about the app. + Notes *string `json:"notes,omitempty"` + // The security policy assigned to the app. + PolicyId *int32 `json:"policy_id,omitempty"` + // The custom login page branding to use for this app. Applies to app initiated logins via OIDC or SAML. + BrandId *int32 `json:"brand_id,omitempty"` + // A link to the apps icon url. + IconUrl *string `json:"icon_url,omitempty"` + // Indicates if the app is visible in the OneLogin portal. + Visible *bool `json:"visible,omitempty"` + // An ID indicating the type of app. + AuthMethod *int32 `json:"auth_method,omitempty"` + // ID of the OneLogin portal tab that the app is assigned to. + TabId *int32 `json:"tab_id,omitempty"` + // The date the app was created. + CreatedAt *string `json:"created_at,omitempty"` + // The date the app was last updated. + UpdatedAt *string `json:"updated_at,omitempty"` + // List of Role IDs that are assigned to the app. On App Create or Update the entire array is replaced with the values provided. + RoleIds []int32 `json:"role_ids,omitempty"` + // Indicates whether or not administrators can access the app as a user that they have assumed control over. + AllowAssumedSignin *bool `json:"allow_assumed_signin,omitempty"` + Provisioning *SchemaProvisioning `json:"provisioning,omitempty"` + Sso map[string]interface{} `json:"sso,omitempty"` + Configuration map[string]interface{} `json:"configuration,omitempty"` + Parameters map[string]interface{} `json:"parameters,omitempty"` + EnforcementPoint map[string]interface{} `json:"enforcement_point,omitempty"` +} + +// NewSchema instantiates a new Schema 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 NewSchema() *Schema { + this := Schema{} + return &this +} + +// NewSchemaWithDefaults instantiates a new Schema 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 NewSchemaWithDefaults() *Schema { + this := Schema{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *Schema) GetId() int32 { + if o == nil || o.Id == nil { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Schema) GetIdOk() (*int32, bool) { + if o == nil || o.Id == nil { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *Schema) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *Schema) SetId(v int32) { + o.Id = &v +} + +// GetConnectorId returns the ConnectorId field value if set, zero value otherwise. +func (o *Schema) GetConnectorId() int32 { + if o == nil || o.ConnectorId == nil { + var ret int32 + return ret + } + return *o.ConnectorId +} + +// GetConnectorIdOk returns a tuple with the ConnectorId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Schema) GetConnectorIdOk() (*int32, bool) { + if o == nil || o.ConnectorId == nil { + return nil, false + } + return o.ConnectorId, true +} + +// HasConnectorId returns a boolean if a field has been set. +func (o *Schema) HasConnectorId() bool { + if o != nil && o.ConnectorId != nil { + return true + } + + return false +} + +// SetConnectorId gets a reference to the given int32 and assigns it to the ConnectorId field. +func (o *Schema) SetConnectorId(v int32) { + o.ConnectorId = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *Schema) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// 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 *Schema) GetNameOk() (*string, bool) { + if o == nil || o.Name == nil { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *Schema) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *Schema) SetName(v string) { + o.Name = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *Schema) GetDescription() string { + if o == nil || o.Description == nil { + var ret string + return ret + } + return *o.Description +} + +// 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 *Schema) GetDescriptionOk() (*string, bool) { + if o == nil || o.Description == nil { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *Schema) HasDescription() bool { + if o != nil && o.Description != nil { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *Schema) SetDescription(v string) { + o.Description = &v +} + +// GetNotes returns the Notes field value if set, zero value otherwise. +func (o *Schema) GetNotes() string { + if o == nil || o.Notes == nil { + var ret string + return ret + } + return *o.Notes +} + +// GetNotesOk returns a tuple with the Notes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Schema) GetNotesOk() (*string, bool) { + if o == nil || o.Notes == nil { + return nil, false + } + return o.Notes, true +} + +// HasNotes returns a boolean if a field has been set. +func (o *Schema) HasNotes() bool { + if o != nil && o.Notes != nil { + return true + } + + return false +} + +// SetNotes gets a reference to the given string and assigns it to the Notes field. +func (o *Schema) SetNotes(v string) { + o.Notes = &v +} + +// GetPolicyId returns the PolicyId field value if set, zero value otherwise. +func (o *Schema) GetPolicyId() int32 { + if o == nil || o.PolicyId == nil { + var ret int32 + return ret + } + return *o.PolicyId +} + +// GetPolicyIdOk returns a tuple with the PolicyId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Schema) GetPolicyIdOk() (*int32, bool) { + if o == nil || o.PolicyId == nil { + return nil, false + } + return o.PolicyId, true +} + +// HasPolicyId returns a boolean if a field has been set. +func (o *Schema) HasPolicyId() bool { + if o != nil && o.PolicyId != nil { + return true + } + + return false +} + +// SetPolicyId gets a reference to the given int32 and assigns it to the PolicyId field. +func (o *Schema) SetPolicyId(v int32) { + o.PolicyId = &v +} + +// GetBrandId returns the BrandId field value if set, zero value otherwise. +func (o *Schema) GetBrandId() int32 { + if o == nil || o.BrandId == nil { + var ret int32 + return ret + } + return *o.BrandId +} + +// GetBrandIdOk returns a tuple with the BrandId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Schema) GetBrandIdOk() (*int32, bool) { + if o == nil || o.BrandId == nil { + return nil, false + } + return o.BrandId, true +} + +// HasBrandId returns a boolean if a field has been set. +func (o *Schema) HasBrandId() bool { + if o != nil && o.BrandId != nil { + return true + } + + return false +} + +// SetBrandId gets a reference to the given int32 and assigns it to the BrandId field. +func (o *Schema) SetBrandId(v int32) { + o.BrandId = &v +} + +// GetIconUrl returns the IconUrl field value if set, zero value otherwise. +func (o *Schema) GetIconUrl() string { + if o == nil || o.IconUrl == nil { + var ret string + return ret + } + return *o.IconUrl +} + +// 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 *Schema) GetIconUrlOk() (*string, bool) { + if o == nil || o.IconUrl == nil { + return nil, false + } + return o.IconUrl, true +} + +// HasIconUrl returns a boolean if a field has been set. +func (o *Schema) HasIconUrl() bool { + if o != nil && o.IconUrl != nil { + return true + } + + return false +} + +// SetIconUrl gets a reference to the given string and assigns it to the IconUrl field. +func (o *Schema) SetIconUrl(v string) { + o.IconUrl = &v +} + +// GetVisible returns the Visible field value if set, zero value otherwise. +func (o *Schema) GetVisible() bool { + if o == nil || o.Visible == nil { + var ret bool + return ret + } + return *o.Visible +} + +// GetVisibleOk returns a tuple with the Visible field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Schema) GetVisibleOk() (*bool, bool) { + if o == nil || o.Visible == nil { + return nil, false + } + return o.Visible, true +} + +// HasVisible returns a boolean if a field has been set. +func (o *Schema) HasVisible() bool { + if o != nil && o.Visible != nil { + return true + } + + return false +} + +// SetVisible gets a reference to the given bool and assigns it to the Visible field. +func (o *Schema) SetVisible(v bool) { + o.Visible = &v +} + +// GetAuthMethod returns the AuthMethod field value if set, zero value otherwise. +func (o *Schema) GetAuthMethod() int32 { + if o == nil || o.AuthMethod == nil { + var ret int32 + return ret + } + return *o.AuthMethod +} + +// GetAuthMethodOk returns a tuple with the AuthMethod field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Schema) GetAuthMethodOk() (*int32, bool) { + if o == nil || o.AuthMethod == nil { + return nil, false + } + return o.AuthMethod, true +} + +// HasAuthMethod returns a boolean if a field has been set. +func (o *Schema) HasAuthMethod() bool { + if o != nil && o.AuthMethod != nil { + return true + } + + return false +} + +// SetAuthMethod gets a reference to the given int32 and assigns it to the AuthMethod field. +func (o *Schema) SetAuthMethod(v int32) { + o.AuthMethod = &v +} + +// GetTabId returns the TabId field value if set, zero value otherwise. +func (o *Schema) GetTabId() int32 { + if o == nil || o.TabId == nil { + var ret int32 + return ret + } + return *o.TabId +} + +// GetTabIdOk returns a tuple with the TabId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Schema) GetTabIdOk() (*int32, bool) { + if o == nil || o.TabId == nil { + return nil, false + } + return o.TabId, true +} + +// HasTabId returns a boolean if a field has been set. +func (o *Schema) HasTabId() bool { + if o != nil && o.TabId != nil { + return true + } + + return false +} + +// SetTabId gets a reference to the given int32 and assigns it to the TabId field. +func (o *Schema) SetTabId(v int32) { + o.TabId = &v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *Schema) GetCreatedAt() string { + if o == nil || o.CreatedAt == nil { + var ret string + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Schema) GetCreatedAtOk() (*string, bool) { + if o == nil || o.CreatedAt == nil { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *Schema) HasCreatedAt() bool { + if o != nil && o.CreatedAt != nil { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given string and assigns it to the CreatedAt field. +func (o *Schema) SetCreatedAt(v string) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *Schema) GetUpdatedAt() string { + if o == nil || o.UpdatedAt == nil { + var ret string + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Schema) GetUpdatedAtOk() (*string, bool) { + if o == nil || o.UpdatedAt == nil { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *Schema) HasUpdatedAt() bool { + if o != nil && o.UpdatedAt != nil { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given string and assigns it to the UpdatedAt field. +func (o *Schema) SetUpdatedAt(v string) { + o.UpdatedAt = &v +} + +// GetRoleIds returns the RoleIds field value if set, zero value otherwise. +func (o *Schema) GetRoleIds() []int32 { + if o == nil || o.RoleIds == nil { + var ret []int32 + return ret + } + return o.RoleIds +} + +// GetRoleIdsOk returns a tuple with the RoleIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Schema) GetRoleIdsOk() ([]int32, bool) { + if o == nil || o.RoleIds == nil { + return nil, false + } + return o.RoleIds, true +} + +// HasRoleIds returns a boolean if a field has been set. +func (o *Schema) HasRoleIds() bool { + if o != nil && o.RoleIds != nil { + return true + } + + return false +} + +// SetRoleIds gets a reference to the given []int32 and assigns it to the RoleIds field. +func (o *Schema) SetRoleIds(v []int32) { + o.RoleIds = v +} + +// GetAllowAssumedSignin returns the AllowAssumedSignin field value if set, zero value otherwise. +func (o *Schema) GetAllowAssumedSignin() bool { + if o == nil || o.AllowAssumedSignin == nil { + var ret bool + return ret + } + return *o.AllowAssumedSignin +} + +// GetAllowAssumedSigninOk returns a tuple with the AllowAssumedSignin field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Schema) GetAllowAssumedSigninOk() (*bool, bool) { + if o == nil || o.AllowAssumedSignin == nil { + return nil, false + } + return o.AllowAssumedSignin, true +} + +// HasAllowAssumedSignin returns a boolean if a field has been set. +func (o *Schema) HasAllowAssumedSignin() bool { + if o != nil && o.AllowAssumedSignin != nil { + return true + } + + return false +} + +// SetAllowAssumedSignin gets a reference to the given bool and assigns it to the AllowAssumedSignin field. +func (o *Schema) SetAllowAssumedSignin(v bool) { + o.AllowAssumedSignin = &v +} + +// GetProvisioning returns the Provisioning field value if set, zero value otherwise. +func (o *Schema) GetProvisioning() SchemaProvisioning { + if o == nil || o.Provisioning == nil { + var ret SchemaProvisioning + return ret + } + return *o.Provisioning +} + +// GetProvisioningOk returns a tuple with the Provisioning field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Schema) GetProvisioningOk() (*SchemaProvisioning, bool) { + if o == nil || o.Provisioning == nil { + return nil, false + } + return o.Provisioning, true +} + +// HasProvisioning returns a boolean if a field has been set. +func (o *Schema) HasProvisioning() bool { + if o != nil && o.Provisioning != nil { + return true + } + + return false +} + +// SetProvisioning gets a reference to the given SchemaProvisioning and assigns it to the Provisioning field. +func (o *Schema) SetProvisioning(v SchemaProvisioning) { + o.Provisioning = &v +} + +// GetSso returns the Sso field value if set, zero value otherwise. +func (o *Schema) GetSso() map[string]interface{} { + if o == nil || o.Sso == nil { + var ret map[string]interface{} + return ret + } + return o.Sso +} + +// GetSsoOk returns a tuple with the Sso field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Schema) GetSsoOk() (map[string]interface{}, bool) { + if o == nil || o.Sso == nil { + return nil, false + } + return o.Sso, true +} + +// HasSso returns a boolean if a field has been set. +func (o *Schema) HasSso() bool { + if o != nil && o.Sso != nil { + return true + } + + return false +} + +// SetSso gets a reference to the given map[string]interface{} and assigns it to the Sso field. +func (o *Schema) SetSso(v map[string]interface{}) { + o.Sso = v +} + +// GetConfiguration returns the Configuration field value if set, zero value otherwise. +func (o *Schema) GetConfiguration() map[string]interface{} { + if o == nil || o.Configuration == nil { + var ret map[string]interface{} + return ret + } + return o.Configuration +} + +// GetConfigurationOk returns a tuple with the Configuration field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Schema) GetConfigurationOk() (map[string]interface{}, bool) { + if o == nil || o.Configuration == nil { + return nil, false + } + return o.Configuration, true +} + +// HasConfiguration returns a boolean if a field has been set. +func (o *Schema) HasConfiguration() bool { + if o != nil && o.Configuration != nil { + return true + } + + return false +} + +// SetConfiguration gets a reference to the given map[string]interface{} and assigns it to the Configuration field. +func (o *Schema) SetConfiguration(v map[string]interface{}) { + o.Configuration = v +} + +// GetParameters returns the Parameters field value if set, zero value otherwise. +func (o *Schema) GetParameters() map[string]interface{} { + if o == nil || o.Parameters == nil { + var ret map[string]interface{} + return ret + } + return o.Parameters +} + +// GetParametersOk returns a tuple with the Parameters field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Schema) GetParametersOk() (map[string]interface{}, bool) { + if o == nil || o.Parameters == nil { + return nil, false + } + return o.Parameters, true +} + +// HasParameters returns a boolean if a field has been set. +func (o *Schema) HasParameters() bool { + if o != nil && o.Parameters != nil { + return true + } + + return false +} + +// SetParameters gets a reference to the given map[string]interface{} and assigns it to the Parameters field. +func (o *Schema) SetParameters(v map[string]interface{}) { + o.Parameters = v +} + +// GetEnforcementPoint returns the EnforcementPoint field value if set, zero value otherwise. +func (o *Schema) GetEnforcementPoint() map[string]interface{} { + if o == nil || o.EnforcementPoint == nil { + var ret map[string]interface{} + return ret + } + return o.EnforcementPoint +} + +// GetEnforcementPointOk returns a tuple with the EnforcementPoint field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Schema) GetEnforcementPointOk() (map[string]interface{}, bool) { + if o == nil || o.EnforcementPoint == nil { + return nil, false + } + return o.EnforcementPoint, true +} + +// HasEnforcementPoint returns a boolean if a field has been set. +func (o *Schema) HasEnforcementPoint() bool { + if o != nil && o.EnforcementPoint != nil { + return true + } + + return false +} + +// SetEnforcementPoint gets a reference to the given map[string]interface{} and assigns it to the EnforcementPoint field. +func (o *Schema) SetEnforcementPoint(v map[string]interface{}) { + o.EnforcementPoint = v +} + +func (o Schema) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.ConnectorId != nil { + toSerialize["connector_id"] = o.ConnectorId + } + if o.Name != nil { + toSerialize["name"] = o.Name + } + if o.Description != nil { + toSerialize["description"] = o.Description + } + if o.Notes != nil { + toSerialize["notes"] = o.Notes + } + if o.PolicyId != nil { + toSerialize["policy_id"] = o.PolicyId + } + if o.BrandId != nil { + toSerialize["brand_id"] = o.BrandId + } + if o.IconUrl != nil { + toSerialize["icon_url"] = o.IconUrl + } + if o.Visible != nil { + toSerialize["visible"] = o.Visible + } + if o.AuthMethod != nil { + toSerialize["auth_method"] = o.AuthMethod + } + if o.TabId != nil { + toSerialize["tab_id"] = o.TabId + } + if o.CreatedAt != nil { + toSerialize["created_at"] = o.CreatedAt + } + if o.UpdatedAt != nil { + toSerialize["updated_at"] = o.UpdatedAt + } + if o.RoleIds != nil { + toSerialize["role_ids"] = o.RoleIds + } + if o.AllowAssumedSignin != nil { + toSerialize["allow_assumed_signin"] = o.AllowAssumedSignin + } + if o.Provisioning != nil { + toSerialize["provisioning"] = o.Provisioning + } + if o.Sso != nil { + toSerialize["sso"] = o.Sso + } + if o.Configuration != nil { + toSerialize["configuration"] = o.Configuration + } + if o.Parameters != nil { + toSerialize["parameters"] = o.Parameters + } + if o.EnforcementPoint != nil { + toSerialize["enforcement_point"] = o.EnforcementPoint + } + return json.Marshal(toSerialize) +} + +type NullableSchema struct { + value *Schema + isSet bool +} + +func (v NullableSchema) Get() *Schema { + return v.value +} + +func (v *NullableSchema) Set(val *Schema) { + v.value = val + v.isSet = true +} + +func (v NullableSchema) IsSet() bool { + return v.isSet +} + +func (v *NullableSchema) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSchema(val *Schema) *NullableSchema { + return &NullableSchema{value: val, isSet: true} +} + +func (v NullableSchema) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSchema) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_schema_1.go b/model_schema_1.go new file mode 100644 index 0000000..fcf3c57 --- /dev/null +++ b/model_schema_1.go @@ -0,0 +1,296 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// Schema1 struct for Schema1 +type Schema1 struct { + Id *int32 `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Username *string `json:"username,omitempty"` + AddedBy *Schema1AddedBy `json:"added_by,omitempty"` + AddedAt *string `json:"added_at,omitempty"` + // Indicates if assigned to role or not. Defaults to true. + Assigned *bool `json:"assigned,omitempty"` +} + +// NewSchema1 instantiates a new Schema1 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 NewSchema1() *Schema1 { + this := Schema1{} + return &this +} + +// NewSchema1WithDefaults instantiates a new Schema1 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 NewSchema1WithDefaults() *Schema1 { + this := Schema1{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *Schema1) GetId() int32 { + if o == nil || o.Id == nil { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Schema1) GetIdOk() (*int32, bool) { + if o == nil || o.Id == nil { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *Schema1) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *Schema1) SetId(v int32) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *Schema1) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// 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 *Schema1) GetNameOk() (*string, bool) { + if o == nil || o.Name == nil { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *Schema1) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *Schema1) SetName(v string) { + o.Name = &v +} + +// GetUsername returns the Username field value if set, zero value otherwise. +func (o *Schema1) GetUsername() string { + if o == nil || o.Username == nil { + var ret string + return ret + } + return *o.Username +} + +// 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 *Schema1) GetUsernameOk() (*string, bool) { + if o == nil || o.Username == nil { + return nil, false + } + return o.Username, true +} + +// HasUsername returns a boolean if a field has been set. +func (o *Schema1) HasUsername() bool { + if o != nil && o.Username != nil { + return true + } + + return false +} + +// SetUsername gets a reference to the given string and assigns it to the Username field. +func (o *Schema1) SetUsername(v string) { + o.Username = &v +} + +// GetAddedBy returns the AddedBy field value if set, zero value otherwise. +func (o *Schema1) GetAddedBy() Schema1AddedBy { + if o == nil || o.AddedBy == nil { + var ret Schema1AddedBy + return ret + } + return *o.AddedBy +} + +// GetAddedByOk returns a tuple with the AddedBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Schema1) GetAddedByOk() (*Schema1AddedBy, bool) { + if o == nil || o.AddedBy == nil { + return nil, false + } + return o.AddedBy, true +} + +// HasAddedBy returns a boolean if a field has been set. +func (o *Schema1) HasAddedBy() bool { + if o != nil && o.AddedBy != nil { + return true + } + + return false +} + +// SetAddedBy gets a reference to the given Schema1AddedBy and assigns it to the AddedBy field. +func (o *Schema1) SetAddedBy(v Schema1AddedBy) { + o.AddedBy = &v +} + +// GetAddedAt returns the AddedAt field value if set, zero value otherwise. +func (o *Schema1) GetAddedAt() string { + if o == nil || o.AddedAt == nil { + var ret string + return ret + } + return *o.AddedAt +} + +// GetAddedAtOk returns a tuple with the AddedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Schema1) GetAddedAtOk() (*string, bool) { + if o == nil || o.AddedAt == nil { + return nil, false + } + return o.AddedAt, true +} + +// HasAddedAt returns a boolean if a field has been set. +func (o *Schema1) HasAddedAt() bool { + if o != nil && o.AddedAt != nil { + return true + } + + return false +} + +// SetAddedAt gets a reference to the given string and assigns it to the AddedAt field. +func (o *Schema1) SetAddedAt(v string) { + o.AddedAt = &v +} + +// GetAssigned returns the Assigned field value if set, zero value otherwise. +func (o *Schema1) GetAssigned() bool { + if o == nil || o.Assigned == nil { + var ret bool + return ret + } + return *o.Assigned +} + +// GetAssignedOk returns a tuple with the Assigned field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Schema1) GetAssignedOk() (*bool, bool) { + if o == nil || o.Assigned == nil { + return nil, false + } + return o.Assigned, true +} + +// HasAssigned returns a boolean if a field has been set. +func (o *Schema1) HasAssigned() bool { + if o != nil && o.Assigned != nil { + return true + } + + return false +} + +// SetAssigned gets a reference to the given bool and assigns it to the Assigned field. +func (o *Schema1) SetAssigned(v bool) { + o.Assigned = &v +} + +func (o Schema1) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Name != nil { + toSerialize["name"] = o.Name + } + if o.Username != nil { + toSerialize["username"] = o.Username + } + if o.AddedBy != nil { + toSerialize["added_by"] = o.AddedBy + } + if o.AddedAt != nil { + toSerialize["added_at"] = o.AddedAt + } + if o.Assigned != nil { + toSerialize["assigned"] = o.Assigned + } + return json.Marshal(toSerialize) +} + +type NullableSchema1 struct { + value *Schema1 + isSet bool +} + +func (v NullableSchema1) Get() *Schema1 { + return v.value +} + +func (v *NullableSchema1) Set(val *Schema1) { + v.value = val + v.isSet = true +} + +func (v NullableSchema1) IsSet() bool { + return v.isSet +} + +func (v *NullableSchema1) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSchema1(val *Schema1) *NullableSchema1 { + return &NullableSchema1{value: val, isSet: true} +} + +func (v NullableSchema1) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSchema1) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_schema_1_added_by.go b/model_schema_1_added_by.go new file mode 100644 index 0000000..d667697 --- /dev/null +++ b/model_schema_1_added_by.go @@ -0,0 +1,151 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// Schema1AddedBy struct for Schema1AddedBy +type Schema1AddedBy struct { + Id *int32 `json:"id,omitempty"` + Name *string `json:"name,omitempty"` +} + +// NewSchema1AddedBy instantiates a new Schema1AddedBy 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 NewSchema1AddedBy() *Schema1AddedBy { + this := Schema1AddedBy{} + return &this +} + +// NewSchema1AddedByWithDefaults instantiates a new Schema1AddedBy 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 NewSchema1AddedByWithDefaults() *Schema1AddedBy { + this := Schema1AddedBy{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *Schema1AddedBy) GetId() int32 { + if o == nil || o.Id == nil { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Schema1AddedBy) GetIdOk() (*int32, bool) { + if o == nil || o.Id == nil { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *Schema1AddedBy) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *Schema1AddedBy) SetId(v int32) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *Schema1AddedBy) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// 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 *Schema1AddedBy) GetNameOk() (*string, bool) { + if o == nil || o.Name == nil { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *Schema1AddedBy) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *Schema1AddedBy) SetName(v string) { + o.Name = &v +} + +func (o Schema1AddedBy) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Name != nil { + toSerialize["name"] = o.Name + } + return json.Marshal(toSerialize) +} + +type NullableSchema1AddedBy struct { + value *Schema1AddedBy + isSet bool +} + +func (v NullableSchema1AddedBy) Get() *Schema1AddedBy { + return v.value +} + +func (v *NullableSchema1AddedBy) Set(val *Schema1AddedBy) { + v.value = val + v.isSet = true +} + +func (v NullableSchema1AddedBy) IsSet() bool { + return v.isSet +} + +func (v *NullableSchema1AddedBy) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSchema1AddedBy(val *Schema1AddedBy) *NullableSchema1AddedBy { + return &NullableSchema1AddedBy{value: val, isSet: true} +} + +func (v NullableSchema1AddedBy) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSchema1AddedBy) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_schema_provisioning.go b/model_schema_provisioning.go new file mode 100644 index 0000000..8878afd --- /dev/null +++ b/model_schema_provisioning.go @@ -0,0 +1,116 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// SchemaProvisioning struct for SchemaProvisioning +type SchemaProvisioning struct { + // Indicates if provisioning is enabled for this app. + Enabled *bool `json:"enabled,omitempty"` +} + +// NewSchemaProvisioning instantiates a new SchemaProvisioning 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 NewSchemaProvisioning() *SchemaProvisioning { + this := SchemaProvisioning{} + return &this +} + +// NewSchemaProvisioningWithDefaults instantiates a new SchemaProvisioning 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 NewSchemaProvisioningWithDefaults() *SchemaProvisioning { + this := SchemaProvisioning{} + return &this +} + +// GetEnabled returns the Enabled field value if set, zero value otherwise. +func (o *SchemaProvisioning) 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 *SchemaProvisioning) 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 *SchemaProvisioning) 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 *SchemaProvisioning) SetEnabled(v bool) { + o.Enabled = &v +} + +func (o SchemaProvisioning) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Enabled != nil { + toSerialize["enabled"] = o.Enabled + } + return json.Marshal(toSerialize) +} + +type NullableSchemaProvisioning struct { + value *SchemaProvisioning + isSet bool +} + +func (v NullableSchemaProvisioning) Get() *SchemaProvisioning { + return v.value +} + +func (v *NullableSchemaProvisioning) Set(val *SchemaProvisioning) { + v.value = val + v.isSet = true +} + +func (v NullableSchemaProvisioning) IsSet() bool { + return v.isSet +} + +func (v *NullableSchemaProvisioning) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSchemaProvisioning(val *SchemaProvisioning) *NullableSchemaProvisioning { + return &NullableSchemaProvisioning{value: val, isSet: true} +} + +func (v NullableSchemaProvisioning) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSchemaProvisioning) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_session.go b/model_session.go new file mode 100644 index 0000000..432c7da --- /dev/null +++ b/model_session.go @@ -0,0 +1,116 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// Session A dictionary of extra information that provides useful context about the session, for example the session ID, or some cookie information. +type Session struct { + // If you use a database to track sessions, you can send us the session ID. + Id *string `json:"id,omitempty"` +} + +// NewSession instantiates a new Session 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 NewSession() *Session { + this := Session{} + return &this +} + +// NewSessionWithDefaults instantiates a new Session 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 NewSessionWithDefaults() *Session { + this := Session{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *Session) GetId() string { + if o == nil || o.Id == nil { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Session) GetIdOk() (*string, bool) { + if o == nil || o.Id == nil { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *Session) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *Session) SetId(v string) { + o.Id = &v +} + +func (o Session) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Id != nil { + toSerialize["id"] = o.Id + } + return json.Marshal(toSerialize) +} + +type NullableSession struct { + value *Session + isSet bool +} + +func (v NullableSession) Get() *Session { + return v.value +} + +func (v *NullableSession) Set(val *Session) { + v.value = val + v.isSet = true +} + +func (v NullableSession) IsSet() bool { + return v.isSet +} + +func (v *NullableSession) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSession(val *Session) *NullableSession { + return &NullableSession{value: val, isSet: true} +} + +func (v NullableSession) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSession) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_set_role_apps_200_response_inner.go b/model_set_role_apps_200_response_inner.go new file mode 100644 index 0000000..6bc8dbd --- /dev/null +++ b/model_set_role_apps_200_response_inner.go @@ -0,0 +1,116 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// SetRoleApps200ResponseInner struct for SetRoleApps200ResponseInner +type SetRoleApps200ResponseInner struct { + // Apps unique ID in OneLogin. + Id *int32 `json:"id,omitempty"` +} + +// NewSetRoleApps200ResponseInner instantiates a new SetRoleApps200ResponseInner 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 NewSetRoleApps200ResponseInner() *SetRoleApps200ResponseInner { + this := SetRoleApps200ResponseInner{} + return &this +} + +// NewSetRoleApps200ResponseInnerWithDefaults instantiates a new SetRoleApps200ResponseInner 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 NewSetRoleApps200ResponseInnerWithDefaults() *SetRoleApps200ResponseInner { + this := SetRoleApps200ResponseInner{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *SetRoleApps200ResponseInner) GetId() int32 { + if o == nil || o.Id == nil { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SetRoleApps200ResponseInner) GetIdOk() (*int32, bool) { + if o == nil || o.Id == nil { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *SetRoleApps200ResponseInner) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *SetRoleApps200ResponseInner) SetId(v int32) { + o.Id = &v +} + +func (o SetRoleApps200ResponseInner) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Id != nil { + toSerialize["id"] = o.Id + } + return json.Marshal(toSerialize) +} + +type NullableSetRoleApps200ResponseInner struct { + value *SetRoleApps200ResponseInner + isSet bool +} + +func (v NullableSetRoleApps200ResponseInner) Get() *SetRoleApps200ResponseInner { + return v.value +} + +func (v *NullableSetRoleApps200ResponseInner) Set(val *SetRoleApps200ResponseInner) { + v.value = val + v.isSet = true +} + +func (v NullableSetRoleApps200ResponseInner) IsSet() bool { + return v.isSet +} + +func (v *NullableSetRoleApps200ResponseInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSetRoleApps200ResponseInner(val *SetRoleApps200ResponseInner) *NullableSetRoleApps200ResponseInner { + return &NullableSetRoleApps200ResponseInner{value: val, isSet: true} +} + +func (v NullableSetRoleApps200ResponseInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSetRoleApps200ResponseInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_source.go b/model_source.go new file mode 100644 index 0000000..ad2d82d --- /dev/null +++ b/model_source.go @@ -0,0 +1,152 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// Source Used for targeting custom rules based on a group of people, customers, accounts, or even a single user. +type Source struct { + Id *string `json:"id,omitempty"` + // The name of the source + Name *string `json:"name,omitempty"` +} + +// NewSource instantiates a new Source 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 NewSource() *Source { + this := Source{} + return &this +} + +// NewSourceWithDefaults instantiates a new Source 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 NewSourceWithDefaults() *Source { + this := Source{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *Source) GetId() string { + if o == nil || o.Id == nil { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Source) GetIdOk() (*string, bool) { + if o == nil || o.Id == nil { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *Source) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *Source) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *Source) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// 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 *Source) GetNameOk() (*string, bool) { + if o == nil || o.Name == nil { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *Source) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *Source) SetName(v string) { + o.Name = &v +} + +func (o Source) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Name != nil { + toSerialize["name"] = o.Name + } + return json.Marshal(toSerialize) +} + +type NullableSource struct { + value *Source + isSet bool +} + +func (v NullableSource) Get() *Source { + return v.value +} + +func (v *NullableSource) Set(val *Source) { + v.value = val + v.isSet = true +} + +func (v NullableSource) IsSet() bool { + return v.isSet +} + +func (v *NullableSource) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSource(val *Source) *NullableSource { + return &NullableSource{value: val, isSet: true} +} + +func (v NullableSource) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSource) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_status.go b/model_status.go new file mode 100644 index 0000000..dfc9e38 --- /dev/null +++ b/model_status.go @@ -0,0 +1,223 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// Status struct for Status +type Status struct { + Error *bool `json:"error,omitempty"` + Code *int32 `json:"code,omitempty"` + Type *string `json:"type,omitempty"` + Message *string `json:"message,omitempty"` +} + +// NewStatus instantiates a new Status 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 NewStatus() *Status { + this := Status{} + return &this +} + +// NewStatusWithDefaults instantiates a new Status 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 NewStatusWithDefaults() *Status { + this := Status{} + return &this +} + +// GetError returns the Error field value if set, zero value otherwise. +func (o *Status) GetError() bool { + if o == nil || o.Error == nil { + var ret bool + return ret + } + return *o.Error +} + +// 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 *Status) GetErrorOk() (*bool, bool) { + if o == nil || o.Error == nil { + return nil, false + } + return o.Error, true +} + +// HasError returns a boolean if a field has been set. +func (o *Status) HasError() bool { + if o != nil && o.Error != nil { + return true + } + + return false +} + +// SetError gets a reference to the given bool and assigns it to the Error field. +func (o *Status) SetError(v bool) { + o.Error = &v +} + +// GetCode returns the Code field value if set, zero value otherwise. +func (o *Status) GetCode() int32 { + if o == nil || o.Code == nil { + var ret int32 + return ret + } + return *o.Code +} + +// 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 *Status) GetCodeOk() (*int32, bool) { + if o == nil || o.Code == nil { + return nil, false + } + return o.Code, true +} + +// HasCode returns a boolean if a field has been set. +func (o *Status) HasCode() bool { + if o != nil && o.Code != nil { + return true + } + + return false +} + +// SetCode gets a reference to the given int32 and assigns it to the Code field. +func (o *Status) SetCode(v int32) { + o.Code = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *Status) GetType() string { + if o == nil || o.Type == nil { + var ret string + return ret + } + return *o.Type +} + +// 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 *Status) GetTypeOk() (*string, bool) { + if o == nil || o.Type == nil { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *Status) HasType() bool { + if o != nil && o.Type != nil { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *Status) SetType(v string) { + o.Type = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *Status) GetMessage() string { + if o == nil || o.Message == nil { + var ret string + return ret + } + return *o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Status) GetMessageOk() (*string, bool) { + if o == nil || o.Message == nil { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *Status) HasMessage() bool { + if o != nil && o.Message != nil { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *Status) SetMessage(v string) { + o.Message = &v +} + +func (o Status) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Error != nil { + toSerialize["error"] = o.Error + } + if o.Code != nil { + toSerialize["code"] = o.Code + } + if o.Type != nil { + toSerialize["type"] = o.Type + } + if o.Message != nil { + toSerialize["message"] = o.Message + } + return json.Marshal(toSerialize) +} + +type NullableStatus struct { + value *Status + isSet bool +} + +func (v NullableStatus) Get() *Status { + return v.value +} + +func (v *NullableStatus) Set(val *Status) { + v.value = val + v.isSet = true +} + +func (v NullableStatus) IsSet() bool { + return v.isSet +} + +func (v *NullableStatus) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableStatus(val *Status) *NullableStatus { + return &NullableStatus{value: val, isSet: true} +} + +func (v NullableStatus) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableStatus) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_status_1.go b/model_status_1.go new file mode 100644 index 0000000..fbb34f0 --- /dev/null +++ b/model_status_1.go @@ -0,0 +1,187 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// Status1 struct for Status1 +type Status1 struct { + Message *string `json:"message,omitempty"` + StatusCode *int32 `json:"statusCode,omitempty"` + Name *string `json:"name,omitempty"` +} + +// NewStatus1 instantiates a new Status1 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 NewStatus1() *Status1 { + this := Status1{} + return &this +} + +// NewStatus1WithDefaults instantiates a new Status1 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 NewStatus1WithDefaults() *Status1 { + this := Status1{} + return &this +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *Status1) GetMessage() string { + if o == nil || o.Message == nil { + var ret string + return ret + } + return *o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Status1) GetMessageOk() (*string, bool) { + if o == nil || o.Message == nil { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *Status1) HasMessage() bool { + if o != nil && o.Message != nil { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *Status1) SetMessage(v string) { + o.Message = &v +} + +// GetStatusCode returns the StatusCode field value if set, zero value otherwise. +func (o *Status1) GetStatusCode() int32 { + if o == nil || o.StatusCode == nil { + var ret int32 + return ret + } + return *o.StatusCode +} + +// GetStatusCodeOk returns a tuple with the StatusCode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Status1) GetStatusCodeOk() (*int32, bool) { + if o == nil || o.StatusCode == nil { + return nil, false + } + return o.StatusCode, true +} + +// HasStatusCode returns a boolean if a field has been set. +func (o *Status1) HasStatusCode() bool { + if o != nil && o.StatusCode != nil { + return true + } + + return false +} + +// SetStatusCode gets a reference to the given int32 and assigns it to the StatusCode field. +func (o *Status1) SetStatusCode(v int32) { + o.StatusCode = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *Status1) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// 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 *Status1) GetNameOk() (*string, bool) { + if o == nil || o.Name == nil { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *Status1) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *Status1) SetName(v string) { + o.Name = &v +} + +func (o Status1) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Message != nil { + toSerialize["message"] = o.Message + } + if o.StatusCode != nil { + toSerialize["statusCode"] = o.StatusCode + } + if o.Name != nil { + toSerialize["name"] = o.Name + } + return json.Marshal(toSerialize) +} + +type NullableStatus1 struct { + value *Status1 + isSet bool +} + +func (v NullableStatus1) Get() *Status1 { + return v.value +} + +func (v *NullableStatus1) Set(val *Status1) { + v.value = val + v.isSet = true +} + +func (v NullableStatus1) IsSet() bool { + return v.isSet +} + +func (v *NullableStatus1) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableStatus1(val *Status1) *NullableStatus1 { + return &NullableStatus1{value: val, isSet: true} +} + +func (v NullableStatus1) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableStatus1) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_status_2.go b/model_status_2.go new file mode 100644 index 0000000..1116313 --- /dev/null +++ b/model_status_2.go @@ -0,0 +1,115 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// Status2 struct for Status2 +type Status2 struct { + Status *Status2Status `json:"status,omitempty"` +} + +// NewStatus2 instantiates a new Status2 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 NewStatus2() *Status2 { + this := Status2{} + return &this +} + +// NewStatus2WithDefaults instantiates a new Status2 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 NewStatus2WithDefaults() *Status2 { + this := Status2{} + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *Status2) GetStatus() Status2Status { + if o == nil || o.Status == nil { + var ret Status2Status + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Status2) GetStatusOk() (*Status2Status, bool) { + if o == nil || o.Status == nil { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *Status2) HasStatus() bool { + if o != nil && o.Status != nil { + return true + } + + return false +} + +// SetStatus gets a reference to the given Status2Status and assigns it to the Status field. +func (o *Status2) SetStatus(v Status2Status) { + o.Status = &v +} + +func (o Status2) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Status != nil { + toSerialize["status"] = o.Status + } + return json.Marshal(toSerialize) +} + +type NullableStatus2 struct { + value *Status2 + isSet bool +} + +func (v NullableStatus2) Get() *Status2 { + return v.value +} + +func (v *NullableStatus2) Set(val *Status2) { + v.value = val + v.isSet = true +} + +func (v NullableStatus2) IsSet() bool { + return v.isSet +} + +func (v *NullableStatus2) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableStatus2(val *Status2) *NullableStatus2 { + return &NullableStatus2{value: val, isSet: true} +} + +func (v NullableStatus2) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableStatus2) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_status_2_status.go b/model_status_2_status.go new file mode 100644 index 0000000..6f0ffaf --- /dev/null +++ b/model_status_2_status.go @@ -0,0 +1,223 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// Status2Status struct for Status2Status +type Status2Status struct { + Type *string `json:"type,omitempty"` + Code *int32 `json:"code,omitempty"` + Message *string `json:"message,omitempty"` + Error *bool `json:"error,omitempty"` +} + +// NewStatus2Status instantiates a new Status2Status 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 NewStatus2Status() *Status2Status { + this := Status2Status{} + return &this +} + +// NewStatus2StatusWithDefaults instantiates a new Status2Status 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 NewStatus2StatusWithDefaults() *Status2Status { + this := Status2Status{} + return &this +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *Status2Status) GetType() string { + if o == nil || o.Type == nil { + var ret string + return ret + } + return *o.Type +} + +// 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 *Status2Status) GetTypeOk() (*string, bool) { + if o == nil || o.Type == nil { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *Status2Status) HasType() bool { + if o != nil && o.Type != nil { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *Status2Status) SetType(v string) { + o.Type = &v +} + +// GetCode returns the Code field value if set, zero value otherwise. +func (o *Status2Status) GetCode() int32 { + if o == nil || o.Code == nil { + var ret int32 + return ret + } + return *o.Code +} + +// 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 *Status2Status) GetCodeOk() (*int32, bool) { + if o == nil || o.Code == nil { + return nil, false + } + return o.Code, true +} + +// HasCode returns a boolean if a field has been set. +func (o *Status2Status) HasCode() bool { + if o != nil && o.Code != nil { + return true + } + + return false +} + +// SetCode gets a reference to the given int32 and assigns it to the Code field. +func (o *Status2Status) SetCode(v int32) { + o.Code = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *Status2Status) GetMessage() string { + if o == nil || o.Message == nil { + var ret string + return ret + } + return *o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Status2Status) GetMessageOk() (*string, bool) { + if o == nil || o.Message == nil { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *Status2Status) HasMessage() bool { + if o != nil && o.Message != nil { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *Status2Status) SetMessage(v string) { + o.Message = &v +} + +// GetError returns the Error field value if set, zero value otherwise. +func (o *Status2Status) GetError() bool { + if o == nil || o.Error == nil { + var ret bool + return ret + } + return *o.Error +} + +// 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 *Status2Status) GetErrorOk() (*bool, bool) { + if o == nil || o.Error == nil { + return nil, false + } + return o.Error, true +} + +// HasError returns a boolean if a field has been set. +func (o *Status2Status) HasError() bool { + if o != nil && o.Error != nil { + return true + } + + return false +} + +// SetError gets a reference to the given bool and assigns it to the Error field. +func (o *Status2Status) SetError(v bool) { + o.Error = &v +} + +func (o Status2Status) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Type != nil { + toSerialize["type"] = o.Type + } + if o.Code != nil { + toSerialize["code"] = o.Code + } + if o.Message != nil { + toSerialize["message"] = o.Message + } + if o.Error != nil { + toSerialize["error"] = o.Error + } + return json.Marshal(toSerialize) +} + +type NullableStatus2Status struct { + value *Status2Status + isSet bool +} + +func (v NullableStatus2Status) Get() *Status2Status { + return v.value +} + +func (v *NullableStatus2Status) Set(val *Status2Status) { + v.value = val + v.isSet = true +} + +func (v NullableStatus2Status) IsSet() bool { + return v.isSet +} + +func (v *NullableStatus2Status) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableStatus2Status(val *Status2Status) *NullableStatus2Status { + return &NullableStatus2Status{value: val, isSet: true} +} + +func (v NullableStatus2Status) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableStatus2Status) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_track_event_request.go b/model_track_event_request.go new file mode 100644 index 0000000..c55e877 --- /dev/null +++ b/model_track_event_request.go @@ -0,0 +1,380 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// TrackEventRequest struct for TrackEventRequest +type TrackEventRequest struct { + // Verbs are used to distinguish between different types of events. + Verb string `json:"verb"` + // The IP address of the User's request. + Ip string `json:"ip"` + // The user agent of the User's request. + UserAgent string `json:"user_agent"` + User RiskUser `json:"user"` + Source *Source `json:"source,omitempty"` + Session *Session `json:"session,omitempty"` + Device *RiskDevice `json:"device,omitempty"` + // Set to the value of the __tdli_fp cookie. + Fp *string `json:"fp,omitempty"` + // Date and time of the event in IS08601 format. Useful for preloading old events. Defaults to date time this API request is received. + Published *string `json:"published,omitempty"` +} + +// NewTrackEventRequest instantiates a new TrackEventRequest 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 NewTrackEventRequest(verb string, ip string, userAgent string, user RiskUser) *TrackEventRequest { + this := TrackEventRequest{} + this.Verb = verb + this.Ip = ip + this.UserAgent = userAgent + this.User = user + return &this +} + +// NewTrackEventRequestWithDefaults instantiates a new TrackEventRequest 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 NewTrackEventRequestWithDefaults() *TrackEventRequest { + this := TrackEventRequest{} + return &this +} + +// GetVerb returns the Verb field value +func (o *TrackEventRequest) GetVerb() string { + if o == nil { + var ret string + return ret + } + + return o.Verb +} + +// GetVerbOk returns a tuple with the Verb field value +// and a boolean to check if the value has been set. +func (o *TrackEventRequest) GetVerbOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Verb, true +} + +// SetVerb sets field value +func (o *TrackEventRequest) SetVerb(v string) { + o.Verb = v +} + +// GetIp returns the Ip field value +func (o *TrackEventRequest) GetIp() string { + if o == nil { + var ret string + return ret + } + + return o.Ip +} + +// GetIpOk returns a tuple with the Ip field value +// and a boolean to check if the value has been set. +func (o *TrackEventRequest) GetIpOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Ip, true +} + +// SetIp sets field value +func (o *TrackEventRequest) SetIp(v string) { + o.Ip = v +} + +// GetUserAgent returns the UserAgent field value +func (o *TrackEventRequest) GetUserAgent() string { + if o == nil { + var ret string + return ret + } + + return o.UserAgent +} + +// GetUserAgentOk returns a tuple with the UserAgent field value +// and a boolean to check if the value has been set. +func (o *TrackEventRequest) GetUserAgentOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.UserAgent, true +} + +// SetUserAgent sets field value +func (o *TrackEventRequest) SetUserAgent(v string) { + o.UserAgent = v +} + +// GetUser returns the User field value +func (o *TrackEventRequest) GetUser() RiskUser { + if o == nil { + var ret RiskUser + return ret + } + + return o.User +} + +// GetUserOk returns a tuple with the User field value +// and a boolean to check if the value has been set. +func (o *TrackEventRequest) GetUserOk() (*RiskUser, bool) { + if o == nil { + return nil, false + } + return &o.User, true +} + +// SetUser sets field value +func (o *TrackEventRequest) SetUser(v RiskUser) { + o.User = v +} + +// GetSource returns the Source field value if set, zero value otherwise. +func (o *TrackEventRequest) GetSource() Source { + if o == nil || o.Source == nil { + var ret Source + return ret + } + return *o.Source +} + +// GetSourceOk returns a tuple with the Source field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TrackEventRequest) GetSourceOk() (*Source, bool) { + if o == nil || o.Source == nil { + return nil, false + } + return o.Source, true +} + +// HasSource returns a boolean if a field has been set. +func (o *TrackEventRequest) HasSource() bool { + if o != nil && o.Source != nil { + return true + } + + return false +} + +// SetSource gets a reference to the given Source and assigns it to the Source field. +func (o *TrackEventRequest) SetSource(v Source) { + o.Source = &v +} + +// GetSession returns the Session field value if set, zero value otherwise. +func (o *TrackEventRequest) GetSession() Session { + if o == nil || o.Session == nil { + var ret Session + return ret + } + return *o.Session +} + +// GetSessionOk returns a tuple with the Session field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TrackEventRequest) GetSessionOk() (*Session, bool) { + if o == nil || o.Session == nil { + return nil, false + } + return o.Session, true +} + +// HasSession returns a boolean if a field has been set. +func (o *TrackEventRequest) HasSession() bool { + if o != nil && o.Session != nil { + return true + } + + return false +} + +// SetSession gets a reference to the given Session and assigns it to the Session field. +func (o *TrackEventRequest) SetSession(v Session) { + o.Session = &v +} + +// GetDevice returns the Device field value if set, zero value otherwise. +func (o *TrackEventRequest) GetDevice() RiskDevice { + if o == nil || o.Device == nil { + var ret RiskDevice + return ret + } + return *o.Device +} + +// GetDeviceOk returns a tuple with the Device field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TrackEventRequest) GetDeviceOk() (*RiskDevice, bool) { + if o == nil || o.Device == nil { + return nil, false + } + return o.Device, true +} + +// HasDevice returns a boolean if a field has been set. +func (o *TrackEventRequest) HasDevice() bool { + if o != nil && o.Device != nil { + return true + } + + return false +} + +// SetDevice gets a reference to the given RiskDevice and assigns it to the Device field. +func (o *TrackEventRequest) SetDevice(v RiskDevice) { + o.Device = &v +} + +// GetFp returns the Fp field value if set, zero value otherwise. +func (o *TrackEventRequest) GetFp() string { + if o == nil || o.Fp == nil { + var ret string + return ret + } + return *o.Fp +} + +// GetFpOk returns a tuple with the Fp field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TrackEventRequest) GetFpOk() (*string, bool) { + if o == nil || o.Fp == nil { + return nil, false + } + return o.Fp, true +} + +// HasFp returns a boolean if a field has been set. +func (o *TrackEventRequest) HasFp() bool { + if o != nil && o.Fp != nil { + return true + } + + return false +} + +// SetFp gets a reference to the given string and assigns it to the Fp field. +func (o *TrackEventRequest) SetFp(v string) { + o.Fp = &v +} + +// GetPublished returns the Published field value if set, zero value otherwise. +func (o *TrackEventRequest) GetPublished() string { + if o == nil || o.Published == nil { + var ret string + return ret + } + return *o.Published +} + +// GetPublishedOk returns a tuple with the Published field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TrackEventRequest) GetPublishedOk() (*string, bool) { + if o == nil || o.Published == nil { + return nil, false + } + return o.Published, true +} + +// HasPublished returns a boolean if a field has been set. +func (o *TrackEventRequest) HasPublished() bool { + if o != nil && o.Published != nil { + return true + } + + return false +} + +// SetPublished gets a reference to the given string and assigns it to the Published field. +func (o *TrackEventRequest) SetPublished(v string) { + o.Published = &v +} + +func (o TrackEventRequest) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["verb"] = o.Verb + } + if true { + toSerialize["ip"] = o.Ip + } + if true { + toSerialize["user_agent"] = o.UserAgent + } + if true { + toSerialize["user"] = o.User + } + if o.Source != nil { + toSerialize["source"] = o.Source + } + if o.Session != nil { + toSerialize["session"] = o.Session + } + if o.Device != nil { + toSerialize["device"] = o.Device + } + if o.Fp != nil { + toSerialize["fp"] = o.Fp + } + if o.Published != nil { + toSerialize["published"] = o.Published + } + return json.Marshal(toSerialize) +} + +type NullableTrackEventRequest struct { + value *TrackEventRequest + isSet bool +} + +func (v NullableTrackEventRequest) Get() *TrackEventRequest { + return v.value +} + +func (v *NullableTrackEventRequest) Set(val *TrackEventRequest) { + v.value = val + v.isSet = true +} + +func (v NullableTrackEventRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableTrackEventRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTrackEventRequest(val *TrackEventRequest) *NullableTrackEventRequest { + return &NullableTrackEventRequest{value: val, isSet: true} +} + +func (v NullableTrackEventRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTrackEventRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_update_authorization_server_400_response.go b/model_update_authorization_server_400_response.go new file mode 100644 index 0000000..397bb4b --- /dev/null +++ b/model_update_authorization_server_400_response.go @@ -0,0 +1,223 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// UpdateAuthorizationServer400Response struct for UpdateAuthorizationServer400Response +type UpdateAuthorizationServer400Response struct { + Field *string `json:"field,omitempty"` + Message *string `json:"message,omitempty"` + StatusCode *int32 `json:"statusCode,omitempty"` + Name *string `json:"name,omitempty"` +} + +// NewUpdateAuthorizationServer400Response instantiates a new UpdateAuthorizationServer400Response 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 NewUpdateAuthorizationServer400Response() *UpdateAuthorizationServer400Response { + this := UpdateAuthorizationServer400Response{} + return &this +} + +// NewUpdateAuthorizationServer400ResponseWithDefaults instantiates a new UpdateAuthorizationServer400Response 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 NewUpdateAuthorizationServer400ResponseWithDefaults() *UpdateAuthorizationServer400Response { + this := UpdateAuthorizationServer400Response{} + return &this +} + +// GetField returns the Field field value if set, zero value otherwise. +func (o *UpdateAuthorizationServer400Response) GetField() string { + if o == nil || o.Field == nil { + var ret string + return ret + } + return *o.Field +} + +// GetFieldOk returns a tuple with the Field field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateAuthorizationServer400Response) GetFieldOk() (*string, bool) { + if o == nil || o.Field == nil { + return nil, false + } + return o.Field, true +} + +// HasField returns a boolean if a field has been set. +func (o *UpdateAuthorizationServer400Response) HasField() bool { + if o != nil && o.Field != nil { + return true + } + + return false +} + +// SetField gets a reference to the given string and assigns it to the Field field. +func (o *UpdateAuthorizationServer400Response) SetField(v string) { + o.Field = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *UpdateAuthorizationServer400Response) GetMessage() string { + if o == nil || o.Message == nil { + var ret string + return ret + } + return *o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateAuthorizationServer400Response) GetMessageOk() (*string, bool) { + if o == nil || o.Message == nil { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *UpdateAuthorizationServer400Response) HasMessage() bool { + if o != nil && o.Message != nil { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *UpdateAuthorizationServer400Response) SetMessage(v string) { + o.Message = &v +} + +// GetStatusCode returns the StatusCode field value if set, zero value otherwise. +func (o *UpdateAuthorizationServer400Response) GetStatusCode() int32 { + if o == nil || o.StatusCode == nil { + var ret int32 + return ret + } + return *o.StatusCode +} + +// GetStatusCodeOk returns a tuple with the StatusCode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateAuthorizationServer400Response) GetStatusCodeOk() (*int32, bool) { + if o == nil || o.StatusCode == nil { + return nil, false + } + return o.StatusCode, true +} + +// HasStatusCode returns a boolean if a field has been set. +func (o *UpdateAuthorizationServer400Response) HasStatusCode() bool { + if o != nil && o.StatusCode != nil { + return true + } + + return false +} + +// SetStatusCode gets a reference to the given int32 and assigns it to the StatusCode field. +func (o *UpdateAuthorizationServer400Response) SetStatusCode(v int32) { + o.StatusCode = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *UpdateAuthorizationServer400Response) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// 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 *UpdateAuthorizationServer400Response) GetNameOk() (*string, bool) { + if o == nil || o.Name == nil { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *UpdateAuthorizationServer400Response) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *UpdateAuthorizationServer400Response) SetName(v string) { + o.Name = &v +} + +func (o UpdateAuthorizationServer400Response) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Field != nil { + toSerialize["field"] = o.Field + } + if o.Message != nil { + toSerialize["message"] = o.Message + } + if o.StatusCode != nil { + toSerialize["statusCode"] = o.StatusCode + } + if o.Name != nil { + toSerialize["name"] = o.Name + } + return json.Marshal(toSerialize) +} + +type NullableUpdateAuthorizationServer400Response struct { + value *UpdateAuthorizationServer400Response + isSet bool +} + +func (v NullableUpdateAuthorizationServer400Response) Get() *UpdateAuthorizationServer400Response { + return v.value +} + +func (v *NullableUpdateAuthorizationServer400Response) Set(val *UpdateAuthorizationServer400Response) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateAuthorizationServer400Response) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateAuthorizationServer400Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateAuthorizationServer400Response(val *UpdateAuthorizationServer400Response) *NullableUpdateAuthorizationServer400Response { + return &NullableUpdateAuthorizationServer400Response{value: val, isSet: true} +} + +func (v NullableUpdateAuthorizationServer400Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateAuthorizationServer400Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_update_client_app_request.go b/model_update_client_app_request.go new file mode 100644 index 0000000..2550360 --- /dev/null +++ b/model_update_client_app_request.go @@ -0,0 +1,115 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// UpdateClientAppRequest struct for UpdateClientAppRequest +type UpdateClientAppRequest struct { + Scopes []int32 `json:"scopes,omitempty"` +} + +// NewUpdateClientAppRequest instantiates a new UpdateClientAppRequest 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 NewUpdateClientAppRequest() *UpdateClientAppRequest { + this := UpdateClientAppRequest{} + return &this +} + +// NewUpdateClientAppRequestWithDefaults instantiates a new UpdateClientAppRequest 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 NewUpdateClientAppRequestWithDefaults() *UpdateClientAppRequest { + this := UpdateClientAppRequest{} + return &this +} + +// GetScopes returns the Scopes field value if set, zero value otherwise. +func (o *UpdateClientAppRequest) GetScopes() []int32 { + if o == nil || o.Scopes == nil { + var ret []int32 + return ret + } + return o.Scopes +} + +// GetScopesOk returns a tuple with the Scopes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateClientAppRequest) GetScopesOk() ([]int32, bool) { + if o == nil || o.Scopes == nil { + return nil, false + } + return o.Scopes, true +} + +// HasScopes returns a boolean if a field has been set. +func (o *UpdateClientAppRequest) HasScopes() bool { + if o != nil && o.Scopes != nil { + return true + } + + return false +} + +// SetScopes gets a reference to the given []int32 and assigns it to the Scopes field. +func (o *UpdateClientAppRequest) SetScopes(v []int32) { + o.Scopes = v +} + +func (o UpdateClientAppRequest) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Scopes != nil { + toSerialize["scopes"] = o.Scopes + } + return json.Marshal(toSerialize) +} + +type NullableUpdateClientAppRequest struct { + value *UpdateClientAppRequest + isSet bool +} + +func (v NullableUpdateClientAppRequest) Get() *UpdateClientAppRequest { + return v.value +} + +func (v *NullableUpdateClientAppRequest) Set(val *UpdateClientAppRequest) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateClientAppRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateClientAppRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateClientAppRequest(val *UpdateClientAppRequest) *NullableUpdateClientAppRequest { + return &NullableUpdateClientAppRequest{value: val, isSet: true} +} + +func (v NullableUpdateClientAppRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateClientAppRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_update_environment_variable_request.go b/model_update_environment_variable_request.go new file mode 100644 index 0000000..e71e042 --- /dev/null +++ b/model_update_environment_variable_request.go @@ -0,0 +1,109 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// UpdateEnvironmentVariableRequest struct for UpdateEnvironmentVariableRequest +type UpdateEnvironmentVariableRequest struct { + // The secret value that will be encrypted at rest and injected in applicable hook functions at run time. + Value string `json:"value"` +} + +// NewUpdateEnvironmentVariableRequest instantiates a new UpdateEnvironmentVariableRequest 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 NewUpdateEnvironmentVariableRequest(value string) *UpdateEnvironmentVariableRequest { + this := UpdateEnvironmentVariableRequest{} + this.Value = value + return &this +} + +// NewUpdateEnvironmentVariableRequestWithDefaults instantiates a new UpdateEnvironmentVariableRequest 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 NewUpdateEnvironmentVariableRequestWithDefaults() *UpdateEnvironmentVariableRequest { + this := UpdateEnvironmentVariableRequest{} + return &this +} + +// GetValue returns the Value field value +func (o *UpdateEnvironmentVariableRequest) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *UpdateEnvironmentVariableRequest) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *UpdateEnvironmentVariableRequest) SetValue(v string) { + o.Value = v +} + +func (o UpdateEnvironmentVariableRequest) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["value"] = o.Value + } + return json.Marshal(toSerialize) +} + +type NullableUpdateEnvironmentVariableRequest struct { + value *UpdateEnvironmentVariableRequest + isSet bool +} + +func (v NullableUpdateEnvironmentVariableRequest) Get() *UpdateEnvironmentVariableRequest { + return v.value +} + +func (v *NullableUpdateEnvironmentVariableRequest) Set(val *UpdateEnvironmentVariableRequest) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateEnvironmentVariableRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateEnvironmentVariableRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateEnvironmentVariableRequest(val *UpdateEnvironmentVariableRequest) *NullableUpdateEnvironmentVariableRequest { + return &NullableUpdateEnvironmentVariableRequest{value: val, isSet: true} +} + +func (v NullableUpdateEnvironmentVariableRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateEnvironmentVariableRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_update_role_200_response.go b/model_update_role_200_response.go new file mode 100644 index 0000000..006f6bf --- /dev/null +++ b/model_update_role_200_response.go @@ -0,0 +1,115 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// UpdateRole200Response struct for UpdateRole200Response +type UpdateRole200Response struct { + Id *int32 `json:"id,omitempty"` +} + +// NewUpdateRole200Response instantiates a new UpdateRole200Response 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 NewUpdateRole200Response() *UpdateRole200Response { + this := UpdateRole200Response{} + return &this +} + +// NewUpdateRole200ResponseWithDefaults instantiates a new UpdateRole200Response 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 NewUpdateRole200ResponseWithDefaults() *UpdateRole200Response { + this := UpdateRole200Response{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *UpdateRole200Response) GetId() int32 { + if o == nil || o.Id == nil { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateRole200Response) GetIdOk() (*int32, bool) { + if o == nil || o.Id == nil { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *UpdateRole200Response) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *UpdateRole200Response) SetId(v int32) { + o.Id = &v +} + +func (o UpdateRole200Response) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Id != nil { + toSerialize["id"] = o.Id + } + return json.Marshal(toSerialize) +} + +type NullableUpdateRole200Response struct { + value *UpdateRole200Response + isSet bool +} + +func (v NullableUpdateRole200Response) Get() *UpdateRole200Response { + return v.value +} + +func (v *NullableUpdateRole200Response) Set(val *UpdateRole200Response) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateRole200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateRole200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateRole200Response(val *UpdateRole200Response) *NullableUpdateRole200Response { + return &NullableUpdateRole200Response{value: val, isSet: true} +} + +func (v NullableUpdateRole200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateRole200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_user.go b/model_user.go new file mode 100644 index 0000000..f0943b0 --- /dev/null +++ b/model_user.go @@ -0,0 +1,1435 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// User struct for User +type User struct { + Id *int32 `json:"id,omitempty"` + // A username for the user. + Username *string `json:"username,omitempty"` + // A valid email for the user. + Email *string `json:"email,omitempty"` + // The user's first name. + Firstname *string `json:"firstname,omitempty"` + // The user's last name. + Lastname *string `json:"lastname,omitempty"` + // The user's job title. + Title *string `json:"title,omitempty"` + // The user's department. + Department *string `json:"department,omitempty"` + // The user's company. + Company *string `json:"company,omitempty"` + // Free text related to the user. + Comment *string `json:"comment,omitempty"` + // The ID of the Group in OneLogin that the user is assigned to. + GroupId *int32 `json:"group_id,omitempty"` + // A list of OneLogin Role IDs of the user + RoleIds []int32 `json:"role_ids,omitempty"` + // The E.164 format phone number for a user. + Phone *string `json:"phone,omitempty"` + State *int32 `json:"state,omitempty"` + Status *int32 `json:"status,omitempty"` + // The ID of the OneLogin Directory of the user. + DirectoryId *int32 `json:"directory_id,omitempty"` + // The ID of the OneLogin Trusted IDP of the user. + TrustedIdpId *int32 `json:"trusted_idp_id,omitempty"` + // The ID of the user's manager in Active Directory. + ManagerAdId *string `json:"manager_ad_id,omitempty"` + // The OneLogin User ID for the user's manager. + ManagerUserId *string `json:"manager_user_id,omitempty"` + // The user's Active Directory username. + SamaccountName *string `json:"samaccount_name,omitempty"` + // The user's directory membership. + MemberOf *string `json:"member_of,omitempty"` + // The principle name of the user. + Userprincipalname *string `json:"userprincipalname,omitempty"` + // The distinguished name of the user. + DistinguishedName *string `json:"distinguished_name,omitempty"` + // The ID of the user in an external directory. + ExternalId *string `json:"external_id,omitempty"` + ActivatedAt *string `json:"activated_at,omitempty"` + LastLogin *string `json:"last_login,omitempty"` + InvitationSentAt *string `json:"invitation_sent_at,omitempty"` + UpdatedAt *string `json:"updated_at,omitempty"` + PreferredLocaleCode *string `json:"preferred_locale_code,omitempty"` + CreatedAt *string `json:"created_at,omitempty"` + CustomAttributes map[string]interface{} `json:"custom_attributes,omitempty"` + InvalidLoginAttempts *int32 `json:"invalid_login_attempts,omitempty"` + LockedUntil *string `json:"locked_until,omitempty"` + PasswordChangedAt *string `json:"password_changed_at,omitempty"` + // The password to set for a user. + Password *string `json:"password,omitempty"` + // Required if the password is being set. + PasswordConfirmation *string `json:"password_confirmation,omitempty"` + // Use this when importing a password that's already hashed. Prepend the salt value to the cleartext password value before SHA-256-encoding it + PasswordAlgorithm *string `json:"password_algorithm,omitempty"` + // The salt value used with the password_algorithm. + Salt *string `json:"salt,omitempty"` +} + +// NewUser instantiates a new User 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 NewUser() *User { + this := User{} + return &this +} + +// NewUserWithDefaults instantiates a new User 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 NewUserWithDefaults() *User { + this := User{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *User) GetId() int32 { + if o == nil || o.Id == nil { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetIdOk() (*int32, bool) { + if o == nil || o.Id == nil { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *User) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *User) SetId(v int32) { + o.Id = &v +} + +// GetUsername returns the Username field value if set, zero value otherwise. +func (o *User) GetUsername() string { + if o == nil || o.Username == nil { + var ret string + return ret + } + return *o.Username +} + +// 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 *User) GetUsernameOk() (*string, bool) { + if o == nil || o.Username == nil { + return nil, false + } + return o.Username, true +} + +// HasUsername returns a boolean if a field has been set. +func (o *User) HasUsername() bool { + if o != nil && o.Username != nil { + return true + } + + return false +} + +// SetUsername gets a reference to the given string and assigns it to the Username field. +func (o *User) SetUsername(v string) { + o.Username = &v +} + +// GetEmail returns the Email field value if set, zero value otherwise. +func (o *User) 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 *User) 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 *User) 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 *User) SetEmail(v string) { + o.Email = &v +} + +// GetFirstname returns the Firstname field value if set, zero value otherwise. +func (o *User) GetFirstname() string { + if o == nil || o.Firstname == nil { + var ret string + return ret + } + return *o.Firstname +} + +// GetFirstnameOk returns a tuple with the Firstname field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetFirstnameOk() (*string, bool) { + if o == nil || o.Firstname == nil { + return nil, false + } + return o.Firstname, true +} + +// HasFirstname returns a boolean if a field has been set. +func (o *User) HasFirstname() bool { + if o != nil && o.Firstname != nil { + return true + } + + return false +} + +// SetFirstname gets a reference to the given string and assigns it to the Firstname field. +func (o *User) SetFirstname(v string) { + o.Firstname = &v +} + +// GetLastname returns the Lastname field value if set, zero value otherwise. +func (o *User) GetLastname() string { + if o == nil || o.Lastname == nil { + var ret string + return ret + } + return *o.Lastname +} + +// GetLastnameOk returns a tuple with the Lastname field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetLastnameOk() (*string, bool) { + if o == nil || o.Lastname == nil { + return nil, false + } + return o.Lastname, true +} + +// HasLastname returns a boolean if a field has been set. +func (o *User) HasLastname() bool { + if o != nil && o.Lastname != nil { + return true + } + + return false +} + +// SetLastname gets a reference to the given string and assigns it to the Lastname field. +func (o *User) SetLastname(v string) { + o.Lastname = &v +} + +// GetTitle returns the Title field value if set, zero value otherwise. +func (o *User) GetTitle() string { + if o == nil || o.Title == nil { + var ret string + return ret + } + return *o.Title +} + +// 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 *User) GetTitleOk() (*string, bool) { + if o == nil || o.Title == nil { + return nil, false + } + return o.Title, true +} + +// HasTitle returns a boolean if a field has been set. +func (o *User) HasTitle() bool { + if o != nil && o.Title != nil { + return true + } + + return false +} + +// SetTitle gets a reference to the given string and assigns it to the Title field. +func (o *User) SetTitle(v string) { + o.Title = &v +} + +// GetDepartment returns the Department field value if set, zero value otherwise. +func (o *User) GetDepartment() string { + if o == nil || o.Department == nil { + var ret string + return ret + } + return *o.Department +} + +// GetDepartmentOk returns a tuple with the Department field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetDepartmentOk() (*string, bool) { + if o == nil || o.Department == nil { + return nil, false + } + return o.Department, true +} + +// HasDepartment returns a boolean if a field has been set. +func (o *User) HasDepartment() bool { + if o != nil && o.Department != nil { + return true + } + + return false +} + +// SetDepartment gets a reference to the given string and assigns it to the Department field. +func (o *User) SetDepartment(v string) { + o.Department = &v +} + +// GetCompany returns the Company field value if set, zero value otherwise. +func (o *User) GetCompany() string { + if o == nil || o.Company == nil { + var ret string + return ret + } + return *o.Company +} + +// GetCompanyOk returns a tuple with the Company field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetCompanyOk() (*string, bool) { + if o == nil || o.Company == nil { + return nil, false + } + return o.Company, true +} + +// HasCompany returns a boolean if a field has been set. +func (o *User) HasCompany() bool { + if o != nil && o.Company != nil { + return true + } + + return false +} + +// SetCompany gets a reference to the given string and assigns it to the Company field. +func (o *User) SetCompany(v string) { + o.Company = &v +} + +// GetComment returns the Comment field value if set, zero value otherwise. +func (o *User) GetComment() string { + if o == nil || o.Comment == nil { + var ret string + return ret + } + return *o.Comment +} + +// GetCommentOk returns a tuple with the Comment field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetCommentOk() (*string, bool) { + if o == nil || o.Comment == nil { + return nil, false + } + return o.Comment, true +} + +// HasComment returns a boolean if a field has been set. +func (o *User) HasComment() bool { + if o != nil && o.Comment != nil { + return true + } + + return false +} + +// SetComment gets a reference to the given string and assigns it to the Comment field. +func (o *User) SetComment(v string) { + o.Comment = &v +} + +// GetGroupId returns the GroupId field value if set, zero value otherwise. +func (o *User) GetGroupId() int32 { + if o == nil || o.GroupId == nil { + var ret int32 + return ret + } + return *o.GroupId +} + +// GetGroupIdOk returns a tuple with the GroupId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetGroupIdOk() (*int32, bool) { + if o == nil || o.GroupId == nil { + return nil, false + } + return o.GroupId, true +} + +// HasGroupId returns a boolean if a field has been set. +func (o *User) HasGroupId() bool { + if o != nil && o.GroupId != nil { + return true + } + + return false +} + +// SetGroupId gets a reference to the given int32 and assigns it to the GroupId field. +func (o *User) SetGroupId(v int32) { + o.GroupId = &v +} + +// GetRoleIds returns the RoleIds field value if set, zero value otherwise. +func (o *User) GetRoleIds() []int32 { + if o == nil || o.RoleIds == nil { + var ret []int32 + return ret + } + return o.RoleIds +} + +// GetRoleIdsOk returns a tuple with the RoleIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetRoleIdsOk() ([]int32, bool) { + if o == nil || o.RoleIds == nil { + return nil, false + } + return o.RoleIds, true +} + +// HasRoleIds returns a boolean if a field has been set. +func (o *User) HasRoleIds() bool { + if o != nil && o.RoleIds != nil { + return true + } + + return false +} + +// SetRoleIds gets a reference to the given []int32 and assigns it to the RoleIds field. +func (o *User) SetRoleIds(v []int32) { + o.RoleIds = v +} + +// GetPhone returns the Phone field value if set, zero value otherwise. +func (o *User) GetPhone() string { + if o == nil || o.Phone == nil { + var ret string + return ret + } + return *o.Phone +} + +// GetPhoneOk returns a tuple with the Phone field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetPhoneOk() (*string, bool) { + if o == nil || o.Phone == nil { + return nil, false + } + return o.Phone, true +} + +// HasPhone returns a boolean if a field has been set. +func (o *User) HasPhone() bool { + if o != nil && o.Phone != nil { + return true + } + + return false +} + +// SetPhone gets a reference to the given string and assigns it to the Phone field. +func (o *User) SetPhone(v string) { + o.Phone = &v +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *User) GetState() int32 { + if o == nil || o.State == nil { + var ret int32 + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetStateOk() (*int32, bool) { + if o == nil || o.State == nil { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *User) HasState() bool { + if o != nil && o.State != nil { + return true + } + + return false +} + +// SetState gets a reference to the given int32 and assigns it to the State field. +func (o *User) SetState(v int32) { + o.State = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *User) GetStatus() int32 { + if o == nil || o.Status == nil { + var ret int32 + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetStatusOk() (*int32, bool) { + if o == nil || o.Status == nil { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *User) HasStatus() bool { + if o != nil && o.Status != nil { + return true + } + + return false +} + +// SetStatus gets a reference to the given int32 and assigns it to the Status field. +func (o *User) SetStatus(v int32) { + o.Status = &v +} + +// GetDirectoryId returns the DirectoryId field value if set, zero value otherwise. +func (o *User) GetDirectoryId() int32 { + if o == nil || o.DirectoryId == nil { + var ret int32 + return ret + } + return *o.DirectoryId +} + +// GetDirectoryIdOk returns a tuple with the DirectoryId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetDirectoryIdOk() (*int32, bool) { + if o == nil || o.DirectoryId == nil { + return nil, false + } + return o.DirectoryId, true +} + +// HasDirectoryId returns a boolean if a field has been set. +func (o *User) HasDirectoryId() bool { + if o != nil && o.DirectoryId != nil { + return true + } + + return false +} + +// SetDirectoryId gets a reference to the given int32 and assigns it to the DirectoryId field. +func (o *User) SetDirectoryId(v int32) { + o.DirectoryId = &v +} + +// GetTrustedIdpId returns the TrustedIdpId field value if set, zero value otherwise. +func (o *User) GetTrustedIdpId() int32 { + if o == nil || o.TrustedIdpId == nil { + var ret int32 + return ret + } + return *o.TrustedIdpId +} + +// GetTrustedIdpIdOk returns a tuple with the TrustedIdpId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetTrustedIdpIdOk() (*int32, bool) { + if o == nil || o.TrustedIdpId == nil { + return nil, false + } + return o.TrustedIdpId, true +} + +// HasTrustedIdpId returns a boolean if a field has been set. +func (o *User) HasTrustedIdpId() bool { + if o != nil && o.TrustedIdpId != nil { + return true + } + + return false +} + +// SetTrustedIdpId gets a reference to the given int32 and assigns it to the TrustedIdpId field. +func (o *User) SetTrustedIdpId(v int32) { + o.TrustedIdpId = &v +} + +// GetManagerAdId returns the ManagerAdId field value if set, zero value otherwise. +func (o *User) GetManagerAdId() string { + if o == nil || o.ManagerAdId == nil { + var ret string + return ret + } + return *o.ManagerAdId +} + +// GetManagerAdIdOk returns a tuple with the ManagerAdId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetManagerAdIdOk() (*string, bool) { + if o == nil || o.ManagerAdId == nil { + return nil, false + } + return o.ManagerAdId, true +} + +// HasManagerAdId returns a boolean if a field has been set. +func (o *User) HasManagerAdId() bool { + if o != nil && o.ManagerAdId != nil { + return true + } + + return false +} + +// SetManagerAdId gets a reference to the given string and assigns it to the ManagerAdId field. +func (o *User) SetManagerAdId(v string) { + o.ManagerAdId = &v +} + +// GetManagerUserId returns the ManagerUserId field value if set, zero value otherwise. +func (o *User) GetManagerUserId() string { + if o == nil || o.ManagerUserId == nil { + var ret string + return ret + } + return *o.ManagerUserId +} + +// GetManagerUserIdOk returns a tuple with the ManagerUserId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetManagerUserIdOk() (*string, bool) { + if o == nil || o.ManagerUserId == nil { + return nil, false + } + return o.ManagerUserId, true +} + +// HasManagerUserId returns a boolean if a field has been set. +func (o *User) HasManagerUserId() bool { + if o != nil && o.ManagerUserId != nil { + return true + } + + return false +} + +// SetManagerUserId gets a reference to the given string and assigns it to the ManagerUserId field. +func (o *User) SetManagerUserId(v string) { + o.ManagerUserId = &v +} + +// GetSamaccountName returns the SamaccountName field value if set, zero value otherwise. +func (o *User) GetSamaccountName() string { + if o == nil || o.SamaccountName == nil { + var ret string + return ret + } + return *o.SamaccountName +} + +// GetSamaccountNameOk returns a tuple with the SamaccountName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetSamaccountNameOk() (*string, bool) { + if o == nil || o.SamaccountName == nil { + return nil, false + } + return o.SamaccountName, true +} + +// HasSamaccountName returns a boolean if a field has been set. +func (o *User) HasSamaccountName() bool { + if o != nil && o.SamaccountName != nil { + return true + } + + return false +} + +// SetSamaccountName gets a reference to the given string and assigns it to the SamaccountName field. +func (o *User) SetSamaccountName(v string) { + o.SamaccountName = &v +} + +// GetMemberOf returns the MemberOf field value if set, zero value otherwise. +func (o *User) GetMemberOf() string { + if o == nil || o.MemberOf == nil { + var ret string + return ret + } + return *o.MemberOf +} + +// GetMemberOfOk returns a tuple with the MemberOf field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetMemberOfOk() (*string, bool) { + if o == nil || o.MemberOf == nil { + return nil, false + } + return o.MemberOf, true +} + +// HasMemberOf returns a boolean if a field has been set. +func (o *User) HasMemberOf() bool { + if o != nil && o.MemberOf != nil { + return true + } + + return false +} + +// SetMemberOf gets a reference to the given string and assigns it to the MemberOf field. +func (o *User) SetMemberOf(v string) { + o.MemberOf = &v +} + +// GetUserprincipalname returns the Userprincipalname field value if set, zero value otherwise. +func (o *User) GetUserprincipalname() string { + if o == nil || o.Userprincipalname == nil { + var ret string + return ret + } + return *o.Userprincipalname +} + +// GetUserprincipalnameOk returns a tuple with the Userprincipalname field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetUserprincipalnameOk() (*string, bool) { + if o == nil || o.Userprincipalname == nil { + return nil, false + } + return o.Userprincipalname, true +} + +// HasUserprincipalname returns a boolean if a field has been set. +func (o *User) HasUserprincipalname() bool { + if o != nil && o.Userprincipalname != nil { + return true + } + + return false +} + +// SetUserprincipalname gets a reference to the given string and assigns it to the Userprincipalname field. +func (o *User) SetUserprincipalname(v string) { + o.Userprincipalname = &v +} + +// GetDistinguishedName returns the DistinguishedName field value if set, zero value otherwise. +func (o *User) GetDistinguishedName() string { + if o == nil || o.DistinguishedName == nil { + var ret string + return ret + } + return *o.DistinguishedName +} + +// GetDistinguishedNameOk returns a tuple with the DistinguishedName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetDistinguishedNameOk() (*string, bool) { + if o == nil || o.DistinguishedName == nil { + return nil, false + } + return o.DistinguishedName, true +} + +// HasDistinguishedName returns a boolean if a field has been set. +func (o *User) HasDistinguishedName() bool { + if o != nil && o.DistinguishedName != nil { + return true + } + + return false +} + +// SetDistinguishedName gets a reference to the given string and assigns it to the DistinguishedName field. +func (o *User) SetDistinguishedName(v string) { + o.DistinguishedName = &v +} + +// GetExternalId returns the ExternalId field value if set, zero value otherwise. +func (o *User) GetExternalId() string { + if o == nil || o.ExternalId == nil { + var ret string + return ret + } + return *o.ExternalId +} + +// GetExternalIdOk returns a tuple with the ExternalId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetExternalIdOk() (*string, bool) { + if o == nil || o.ExternalId == nil { + return nil, false + } + return o.ExternalId, true +} + +// HasExternalId returns a boolean if a field has been set. +func (o *User) HasExternalId() bool { + if o != nil && o.ExternalId != nil { + return true + } + + return false +} + +// SetExternalId gets a reference to the given string and assigns it to the ExternalId field. +func (o *User) SetExternalId(v string) { + o.ExternalId = &v +} + +// GetActivatedAt returns the ActivatedAt field value if set, zero value otherwise. +func (o *User) GetActivatedAt() string { + if o == nil || o.ActivatedAt == nil { + var ret string + return ret + } + return *o.ActivatedAt +} + +// GetActivatedAtOk returns a tuple with the ActivatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetActivatedAtOk() (*string, bool) { + if o == nil || o.ActivatedAt == nil { + return nil, false + } + return o.ActivatedAt, true +} + +// HasActivatedAt returns a boolean if a field has been set. +func (o *User) HasActivatedAt() bool { + if o != nil && o.ActivatedAt != nil { + return true + } + + return false +} + +// SetActivatedAt gets a reference to the given string and assigns it to the ActivatedAt field. +func (o *User) SetActivatedAt(v string) { + o.ActivatedAt = &v +} + +// GetLastLogin returns the LastLogin field value if set, zero value otherwise. +func (o *User) GetLastLogin() string { + if o == nil || o.LastLogin == nil { + var ret string + return ret + } + return *o.LastLogin +} + +// GetLastLoginOk returns a tuple with the LastLogin field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetLastLoginOk() (*string, bool) { + if o == nil || o.LastLogin == nil { + return nil, false + } + return o.LastLogin, true +} + +// HasLastLogin returns a boolean if a field has been set. +func (o *User) HasLastLogin() bool { + if o != nil && o.LastLogin != nil { + return true + } + + return false +} + +// SetLastLogin gets a reference to the given string and assigns it to the LastLogin field. +func (o *User) SetLastLogin(v string) { + o.LastLogin = &v +} + +// GetInvitationSentAt returns the InvitationSentAt field value if set, zero value otherwise. +func (o *User) GetInvitationSentAt() string { + if o == nil || o.InvitationSentAt == nil { + var ret string + return ret + } + return *o.InvitationSentAt +} + +// GetInvitationSentAtOk returns a tuple with the InvitationSentAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetInvitationSentAtOk() (*string, bool) { + if o == nil || o.InvitationSentAt == nil { + return nil, false + } + return o.InvitationSentAt, true +} + +// HasInvitationSentAt returns a boolean if a field has been set. +func (o *User) HasInvitationSentAt() bool { + if o != nil && o.InvitationSentAt != nil { + return true + } + + return false +} + +// SetInvitationSentAt gets a reference to the given string and assigns it to the InvitationSentAt field. +func (o *User) SetInvitationSentAt(v string) { + o.InvitationSentAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *User) GetUpdatedAt() string { + if o == nil || o.UpdatedAt == nil { + var ret string + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetUpdatedAtOk() (*string, bool) { + if o == nil || o.UpdatedAt == nil { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *User) HasUpdatedAt() bool { + if o != nil && o.UpdatedAt != nil { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given string and assigns it to the UpdatedAt field. +func (o *User) SetUpdatedAt(v string) { + o.UpdatedAt = &v +} + +// GetPreferredLocaleCode returns the PreferredLocaleCode field value if set, zero value otherwise. +func (o *User) GetPreferredLocaleCode() string { + if o == nil || o.PreferredLocaleCode == nil { + var ret string + return ret + } + return *o.PreferredLocaleCode +} + +// GetPreferredLocaleCodeOk returns a tuple with the PreferredLocaleCode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetPreferredLocaleCodeOk() (*string, bool) { + if o == nil || o.PreferredLocaleCode == nil { + return nil, false + } + return o.PreferredLocaleCode, true +} + +// HasPreferredLocaleCode returns a boolean if a field has been set. +func (o *User) HasPreferredLocaleCode() bool { + if o != nil && o.PreferredLocaleCode != nil { + return true + } + + return false +} + +// SetPreferredLocaleCode gets a reference to the given string and assigns it to the PreferredLocaleCode field. +func (o *User) SetPreferredLocaleCode(v string) { + o.PreferredLocaleCode = &v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *User) GetCreatedAt() string { + if o == nil || o.CreatedAt == nil { + var ret string + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetCreatedAtOk() (*string, bool) { + if o == nil || o.CreatedAt == nil { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *User) HasCreatedAt() bool { + if o != nil && o.CreatedAt != nil { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given string and assigns it to the CreatedAt field. +func (o *User) SetCreatedAt(v string) { + o.CreatedAt = &v +} + +// GetCustomAttributes returns the CustomAttributes field value if set, zero value otherwise. +func (o *User) GetCustomAttributes() map[string]interface{} { + if o == nil || o.CustomAttributes == nil { + var ret map[string]interface{} + return ret + } + return o.CustomAttributes +} + +// GetCustomAttributesOk returns a tuple with the CustomAttributes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetCustomAttributesOk() (map[string]interface{}, bool) { + if o == nil || o.CustomAttributes == nil { + return nil, false + } + return o.CustomAttributes, true +} + +// HasCustomAttributes returns a boolean if a field has been set. +func (o *User) HasCustomAttributes() bool { + if o != nil && o.CustomAttributes != nil { + return true + } + + return false +} + +// SetCustomAttributes gets a reference to the given map[string]interface{} and assigns it to the CustomAttributes field. +func (o *User) SetCustomAttributes(v map[string]interface{}) { + o.CustomAttributes = v +} + +// GetInvalidLoginAttempts returns the InvalidLoginAttempts field value if set, zero value otherwise. +func (o *User) GetInvalidLoginAttempts() int32 { + if o == nil || o.InvalidLoginAttempts == nil { + var ret int32 + return ret + } + return *o.InvalidLoginAttempts +} + +// GetInvalidLoginAttemptsOk returns a tuple with the InvalidLoginAttempts field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetInvalidLoginAttemptsOk() (*int32, bool) { + if o == nil || o.InvalidLoginAttempts == nil { + return nil, false + } + return o.InvalidLoginAttempts, true +} + +// HasInvalidLoginAttempts returns a boolean if a field has been set. +func (o *User) HasInvalidLoginAttempts() bool { + if o != nil && o.InvalidLoginAttempts != nil { + return true + } + + return false +} + +// SetInvalidLoginAttempts gets a reference to the given int32 and assigns it to the InvalidLoginAttempts field. +func (o *User) SetInvalidLoginAttempts(v int32) { + o.InvalidLoginAttempts = &v +} + +// GetLockedUntil returns the LockedUntil field value if set, zero value otherwise. +func (o *User) GetLockedUntil() string { + if o == nil || o.LockedUntil == nil { + var ret string + return ret + } + return *o.LockedUntil +} + +// GetLockedUntilOk returns a tuple with the LockedUntil field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetLockedUntilOk() (*string, bool) { + if o == nil || o.LockedUntil == nil { + return nil, false + } + return o.LockedUntil, true +} + +// HasLockedUntil returns a boolean if a field has been set. +func (o *User) HasLockedUntil() bool { + if o != nil && o.LockedUntil != nil { + return true + } + + return false +} + +// SetLockedUntil gets a reference to the given string and assigns it to the LockedUntil field. +func (o *User) SetLockedUntil(v string) { + o.LockedUntil = &v +} + +// GetPasswordChangedAt returns the PasswordChangedAt field value if set, zero value otherwise. +func (o *User) GetPasswordChangedAt() string { + if o == nil || o.PasswordChangedAt == nil { + var ret string + return ret + } + return *o.PasswordChangedAt +} + +// GetPasswordChangedAtOk returns a tuple with the PasswordChangedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetPasswordChangedAtOk() (*string, bool) { + if o == nil || o.PasswordChangedAt == nil { + return nil, false + } + return o.PasswordChangedAt, true +} + +// HasPasswordChangedAt returns a boolean if a field has been set. +func (o *User) HasPasswordChangedAt() bool { + if o != nil && o.PasswordChangedAt != nil { + return true + } + + return false +} + +// SetPasswordChangedAt gets a reference to the given string and assigns it to the PasswordChangedAt field. +func (o *User) SetPasswordChangedAt(v string) { + o.PasswordChangedAt = &v +} + +// GetPassword returns the Password field value if set, zero value otherwise. +func (o *User) GetPassword() string { + if o == nil || o.Password == nil { + var ret string + return ret + } + return *o.Password +} + +// 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 *User) GetPasswordOk() (*string, bool) { + if o == nil || o.Password == nil { + return nil, false + } + return o.Password, true +} + +// HasPassword returns a boolean if a field has been set. +func (o *User) HasPassword() bool { + if o != nil && o.Password != nil { + return true + } + + return false +} + +// SetPassword gets a reference to the given string and assigns it to the Password field. +func (o *User) SetPassword(v string) { + o.Password = &v +} + +// GetPasswordConfirmation returns the PasswordConfirmation field value if set, zero value otherwise. +func (o *User) GetPasswordConfirmation() string { + if o == nil || o.PasswordConfirmation == nil { + var ret string + return ret + } + return *o.PasswordConfirmation +} + +// GetPasswordConfirmationOk returns a tuple with the PasswordConfirmation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetPasswordConfirmationOk() (*string, bool) { + if o == nil || o.PasswordConfirmation == nil { + return nil, false + } + return o.PasswordConfirmation, true +} + +// HasPasswordConfirmation returns a boolean if a field has been set. +func (o *User) HasPasswordConfirmation() bool { + if o != nil && o.PasswordConfirmation != nil { + return true + } + + return false +} + +// SetPasswordConfirmation gets a reference to the given string and assigns it to the PasswordConfirmation field. +func (o *User) SetPasswordConfirmation(v string) { + o.PasswordConfirmation = &v +} + +// GetPasswordAlgorithm returns the PasswordAlgorithm field value if set, zero value otherwise. +func (o *User) GetPasswordAlgorithm() string { + if o == nil || o.PasswordAlgorithm == nil { + var ret string + return ret + } + return *o.PasswordAlgorithm +} + +// GetPasswordAlgorithmOk returns a tuple with the PasswordAlgorithm field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetPasswordAlgorithmOk() (*string, bool) { + if o == nil || o.PasswordAlgorithm == nil { + return nil, false + } + return o.PasswordAlgorithm, true +} + +// HasPasswordAlgorithm returns a boolean if a field has been set. +func (o *User) HasPasswordAlgorithm() bool { + if o != nil && o.PasswordAlgorithm != nil { + return true + } + + return false +} + +// SetPasswordAlgorithm gets a reference to the given string and assigns it to the PasswordAlgorithm field. +func (o *User) SetPasswordAlgorithm(v string) { + o.PasswordAlgorithm = &v +} + +// GetSalt returns the Salt field value if set, zero value otherwise. +func (o *User) GetSalt() string { + if o == nil || o.Salt == nil { + var ret string + return ret + } + return *o.Salt +} + +// GetSaltOk returns a tuple with the Salt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetSaltOk() (*string, bool) { + if o == nil || o.Salt == nil { + return nil, false + } + return o.Salt, true +} + +// HasSalt returns a boolean if a field has been set. +func (o *User) HasSalt() bool { + if o != nil && o.Salt != nil { + return true + } + + return false +} + +// SetSalt gets a reference to the given string and assigns it to the Salt field. +func (o *User) SetSalt(v string) { + o.Salt = &v +} + +func (o User) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Username != nil { + toSerialize["username"] = o.Username + } + if o.Email != nil { + toSerialize["email"] = o.Email + } + if o.Firstname != nil { + toSerialize["firstname"] = o.Firstname + } + if o.Lastname != nil { + toSerialize["lastname"] = o.Lastname + } + if o.Title != nil { + toSerialize["title"] = o.Title + } + if o.Department != nil { + toSerialize["department"] = o.Department + } + if o.Company != nil { + toSerialize["company"] = o.Company + } + if o.Comment != nil { + toSerialize["comment"] = o.Comment + } + if o.GroupId != nil { + toSerialize["group_id"] = o.GroupId + } + if o.RoleIds != nil { + toSerialize["role_ids"] = o.RoleIds + } + if o.Phone != nil { + toSerialize["phone"] = o.Phone + } + if o.State != nil { + toSerialize["state"] = o.State + } + if o.Status != nil { + toSerialize["status"] = o.Status + } + if o.DirectoryId != nil { + toSerialize["directory_id"] = o.DirectoryId + } + if o.TrustedIdpId != nil { + toSerialize["trusted_idp_id"] = o.TrustedIdpId + } + if o.ManagerAdId != nil { + toSerialize["manager_ad_id"] = o.ManagerAdId + } + if o.ManagerUserId != nil { + toSerialize["manager_user_id"] = o.ManagerUserId + } + if o.SamaccountName != nil { + toSerialize["samaccount_name"] = o.SamaccountName + } + if o.MemberOf != nil { + toSerialize["member_of"] = o.MemberOf + } + if o.Userprincipalname != nil { + toSerialize["userprincipalname"] = o.Userprincipalname + } + if o.DistinguishedName != nil { + toSerialize["distinguished_name"] = o.DistinguishedName + } + if o.ExternalId != nil { + toSerialize["external_id"] = o.ExternalId + } + if o.ActivatedAt != nil { + toSerialize["activated_at"] = o.ActivatedAt + } + if o.LastLogin != nil { + toSerialize["last_login"] = o.LastLogin + } + if o.InvitationSentAt != nil { + toSerialize["invitation_sent_at"] = o.InvitationSentAt + } + if o.UpdatedAt != nil { + toSerialize["updated_at"] = o.UpdatedAt + } + if o.PreferredLocaleCode != nil { + toSerialize["preferred_locale_code"] = o.PreferredLocaleCode + } + if o.CreatedAt != nil { + toSerialize["created_at"] = o.CreatedAt + } + if o.CustomAttributes != nil { + toSerialize["custom_attributes"] = o.CustomAttributes + } + if o.InvalidLoginAttempts != nil { + toSerialize["invalid_login_attempts"] = o.InvalidLoginAttempts + } + if o.LockedUntil != nil { + toSerialize["locked_until"] = o.LockedUntil + } + if o.PasswordChangedAt != nil { + toSerialize["password_changed_at"] = o.PasswordChangedAt + } + if o.Password != nil { + toSerialize["password"] = o.Password + } + if o.PasswordConfirmation != nil { + toSerialize["password_confirmation"] = o.PasswordConfirmation + } + if o.PasswordAlgorithm != nil { + toSerialize["password_algorithm"] = o.PasswordAlgorithm + } + if o.Salt != nil { + toSerialize["salt"] = o.Salt + } + return json.Marshal(toSerialize) +} + +type NullableUser struct { + value *User + isSet bool +} + +func (v NullableUser) Get() *User { + return v.value +} + +func (v *NullableUser) Set(val *User) { + v.value = val + v.isSet = true +} + +func (v NullableUser) IsSet() bool { + return v.isSet +} + +func (v *NullableUser) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUser(val *User) *NullableUser { + return &NullableUser{value: val, isSet: true} +} + +func (v NullableUser) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUser) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_verify_enrollment_request.go b/model_verify_enrollment_request.go new file mode 100644 index 0000000..c14eafc --- /dev/null +++ b/model_verify_enrollment_request.go @@ -0,0 +1,115 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// VerifyEnrollmentRequest struct for VerifyEnrollmentRequest +type VerifyEnrollmentRequest struct { + Otp *int32 `json:"otp,omitempty"` +} + +// NewVerifyEnrollmentRequest instantiates a new VerifyEnrollmentRequest 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 NewVerifyEnrollmentRequest() *VerifyEnrollmentRequest { + this := VerifyEnrollmentRequest{} + return &this +} + +// NewVerifyEnrollmentRequestWithDefaults instantiates a new VerifyEnrollmentRequest 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 NewVerifyEnrollmentRequestWithDefaults() *VerifyEnrollmentRequest { + this := VerifyEnrollmentRequest{} + return &this +} + +// GetOtp returns the Otp field value if set, zero value otherwise. +func (o *VerifyEnrollmentRequest) GetOtp() int32 { + if o == nil || o.Otp == nil { + var ret int32 + return ret + } + return *o.Otp +} + +// GetOtpOk returns a tuple with the Otp field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VerifyEnrollmentRequest) GetOtpOk() (*int32, bool) { + if o == nil || o.Otp == nil { + return nil, false + } + return o.Otp, true +} + +// HasOtp returns a boolean if a field has been set. +func (o *VerifyEnrollmentRequest) HasOtp() bool { + if o != nil && o.Otp != nil { + return true + } + + return false +} + +// SetOtp gets a reference to the given int32 and assigns it to the Otp field. +func (o *VerifyEnrollmentRequest) SetOtp(v int32) { + o.Otp = &v +} + +func (o VerifyEnrollmentRequest) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Otp != nil { + toSerialize["otp"] = o.Otp + } + return json.Marshal(toSerialize) +} + +type NullableVerifyEnrollmentRequest struct { + value *VerifyEnrollmentRequest + isSet bool +} + +func (v NullableVerifyEnrollmentRequest) Get() *VerifyEnrollmentRequest { + return v.value +} + +func (v *NullableVerifyEnrollmentRequest) Set(val *VerifyEnrollmentRequest) { + v.value = val + v.isSet = true +} + +func (v NullableVerifyEnrollmentRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableVerifyEnrollmentRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableVerifyEnrollmentRequest(val *VerifyEnrollmentRequest) *NullableVerifyEnrollmentRequest { + return &NullableVerifyEnrollmentRequest{value: val, isSet: true} +} + +func (v NullableVerifyEnrollmentRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableVerifyEnrollmentRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_verify_factor_request.go b/model_verify_factor_request.go new file mode 100644 index 0000000..25d9c58 --- /dev/null +++ b/model_verify_factor_request.go @@ -0,0 +1,153 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// VerifyFactorRequest struct for VerifyFactorRequest +type VerifyFactorRequest struct { + // OTP code provided by the device or SMS message sent to user. + Otp *string `json:"otp,omitempty"` + // ID of the specified device which has been registerd for the given user. + DeviceId *int32 `json:"device_id,omitempty"` +} + +// NewVerifyFactorRequest instantiates a new VerifyFactorRequest 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 NewVerifyFactorRequest() *VerifyFactorRequest { + this := VerifyFactorRequest{} + return &this +} + +// NewVerifyFactorRequestWithDefaults instantiates a new VerifyFactorRequest 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 NewVerifyFactorRequestWithDefaults() *VerifyFactorRequest { + this := VerifyFactorRequest{} + return &this +} + +// GetOtp returns the Otp field value if set, zero value otherwise. +func (o *VerifyFactorRequest) GetOtp() string { + if o == nil || o.Otp == nil { + var ret string + return ret + } + return *o.Otp +} + +// GetOtpOk returns a tuple with the Otp field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VerifyFactorRequest) GetOtpOk() (*string, bool) { + if o == nil || o.Otp == nil { + return nil, false + } + return o.Otp, true +} + +// HasOtp returns a boolean if a field has been set. +func (o *VerifyFactorRequest) HasOtp() bool { + if o != nil && o.Otp != nil { + return true + } + + return false +} + +// SetOtp gets a reference to the given string and assigns it to the Otp field. +func (o *VerifyFactorRequest) SetOtp(v string) { + o.Otp = &v +} + +// GetDeviceId returns the DeviceId field value if set, zero value otherwise. +func (o *VerifyFactorRequest) GetDeviceId() int32 { + if o == nil || o.DeviceId == nil { + var ret int32 + return ret + } + return *o.DeviceId +} + +// GetDeviceIdOk returns a tuple with the DeviceId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VerifyFactorRequest) GetDeviceIdOk() (*int32, bool) { + if o == nil || o.DeviceId == nil { + return nil, false + } + return o.DeviceId, true +} + +// HasDeviceId returns a boolean if a field has been set. +func (o *VerifyFactorRequest) HasDeviceId() bool { + if o != nil && o.DeviceId != nil { + return true + } + + return false +} + +// SetDeviceId gets a reference to the given int32 and assigns it to the DeviceId field. +func (o *VerifyFactorRequest) SetDeviceId(v int32) { + o.DeviceId = &v +} + +func (o VerifyFactorRequest) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Otp != nil { + toSerialize["otp"] = o.Otp + } + if o.DeviceId != nil { + toSerialize["device_id"] = o.DeviceId + } + return json.Marshal(toSerialize) +} + +type NullableVerifyFactorRequest struct { + value *VerifyFactorRequest + isSet bool +} + +func (v NullableVerifyFactorRequest) Get() *VerifyFactorRequest { + return v.value +} + +func (v *NullableVerifyFactorRequest) Set(val *VerifyFactorRequest) { + v.value = val + v.isSet = true +} + +func (v NullableVerifyFactorRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableVerifyFactorRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableVerifyFactorRequest(val *VerifyFactorRequest) *NullableVerifyFactorRequest { + return &NullableVerifyFactorRequest{value: val, isSet: true} +} + +func (v NullableVerifyFactorRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableVerifyFactorRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_verify_factor_saml_200_response.go b/model_verify_factor_saml_200_response.go new file mode 100644 index 0000000..d2b331d --- /dev/null +++ b/model_verify_factor_saml_200_response.go @@ -0,0 +1,153 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// VerifyFactorSaml200Response struct for VerifyFactorSaml200Response +type VerifyFactorSaml200Response struct { + // Provides the SAML assertion. + Data *string `json:"data,omitempty"` + // Plain text description describing the outcome of the response. + Message *string `json:"message,omitempty"` +} + +// NewVerifyFactorSaml200Response instantiates a new VerifyFactorSaml200Response 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 NewVerifyFactorSaml200Response() *VerifyFactorSaml200Response { + this := VerifyFactorSaml200Response{} + return &this +} + +// NewVerifyFactorSaml200ResponseWithDefaults instantiates a new VerifyFactorSaml200Response 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 NewVerifyFactorSaml200ResponseWithDefaults() *VerifyFactorSaml200Response { + this := VerifyFactorSaml200Response{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *VerifyFactorSaml200Response) GetData() string { + if o == nil || o.Data == nil { + var ret string + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VerifyFactorSaml200Response) GetDataOk() (*string, bool) { + if o == nil || o.Data == nil { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *VerifyFactorSaml200Response) HasData() bool { + if o != nil && o.Data != nil { + return true + } + + return false +} + +// SetData gets a reference to the given string and assigns it to the Data field. +func (o *VerifyFactorSaml200Response) SetData(v string) { + o.Data = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *VerifyFactorSaml200Response) GetMessage() string { + if o == nil || o.Message == nil { + var ret string + return ret + } + return *o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VerifyFactorSaml200Response) GetMessageOk() (*string, bool) { + if o == nil || o.Message == nil { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *VerifyFactorSaml200Response) HasMessage() bool { + if o != nil && o.Message != nil { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *VerifyFactorSaml200Response) SetMessage(v string) { + o.Message = &v +} + +func (o VerifyFactorSaml200Response) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Data != nil { + toSerialize["data"] = o.Data + } + if o.Message != nil { + toSerialize["message"] = o.Message + } + return json.Marshal(toSerialize) +} + +type NullableVerifyFactorSaml200Response struct { + value *VerifyFactorSaml200Response + isSet bool +} + +func (v NullableVerifyFactorSaml200Response) Get() *VerifyFactorSaml200Response { + return v.value +} + +func (v *NullableVerifyFactorSaml200Response) Set(val *VerifyFactorSaml200Response) { + v.value = val + v.isSet = true +} + +func (v NullableVerifyFactorSaml200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableVerifyFactorSaml200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableVerifyFactorSaml200Response(val *VerifyFactorSaml200Response) *NullableVerifyFactorSaml200Response { + return &NullableVerifyFactorSaml200Response{value: val, isSet: true} +} + +func (v NullableVerifyFactorSaml200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableVerifyFactorSaml200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_verify_factor_saml_request.go b/model_verify_factor_saml_request.go new file mode 100644 index 0000000..5b2ca4f --- /dev/null +++ b/model_verify_factor_saml_request.go @@ -0,0 +1,243 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// VerifyFactorSamlRequest struct for VerifyFactorSamlRequest +type VerifyFactorSamlRequest struct { + // App ID of the app for which you want to generate a SAML token. This is the app ID in OneLogin. + AppId string `json:"app_id"` + // Provide the MFA device_id you are submitting for verification. The device_id is supplied by the Generate SAML Assertion API. + DeviceId string `json:"device_id"` + // state_token associated with the MFA device_id you are submitting. The state_token is supplied by the Generate SAML Assertion API. + StateToken string `json:"state_token"` + // Provide the OTP value for the MFA factor you are submitting for verification. + OtpToken *string `json:"otp_token,omitempty"` + // When verifying MFA via Protect Push, set this to true to stop additional push notifications being sent to the OneLogin Protect device. + DoNotNotify *bool `json:"do_not_notify,omitempty"` +} + +// NewVerifyFactorSamlRequest instantiates a new VerifyFactorSamlRequest 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 NewVerifyFactorSamlRequest(appId string, deviceId string, stateToken string) *VerifyFactorSamlRequest { + this := VerifyFactorSamlRequest{} + this.AppId = appId + this.DeviceId = deviceId + this.StateToken = stateToken + return &this +} + +// NewVerifyFactorSamlRequestWithDefaults instantiates a new VerifyFactorSamlRequest 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 NewVerifyFactorSamlRequestWithDefaults() *VerifyFactorSamlRequest { + this := VerifyFactorSamlRequest{} + return &this +} + +// GetAppId returns the AppId field value +func (o *VerifyFactorSamlRequest) GetAppId() string { + if o == nil { + var ret string + return ret + } + + return o.AppId +} + +// GetAppIdOk returns a tuple with the AppId field value +// and a boolean to check if the value has been set. +func (o *VerifyFactorSamlRequest) GetAppIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.AppId, true +} + +// SetAppId sets field value +func (o *VerifyFactorSamlRequest) SetAppId(v string) { + o.AppId = v +} + +// GetDeviceId returns the DeviceId field value +func (o *VerifyFactorSamlRequest) GetDeviceId() string { + if o == nil { + var ret string + return ret + } + + return o.DeviceId +} + +// GetDeviceIdOk returns a tuple with the DeviceId field value +// and a boolean to check if the value has been set. +func (o *VerifyFactorSamlRequest) GetDeviceIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DeviceId, true +} + +// SetDeviceId sets field value +func (o *VerifyFactorSamlRequest) SetDeviceId(v string) { + o.DeviceId = v +} + +// GetStateToken returns the StateToken field value +func (o *VerifyFactorSamlRequest) GetStateToken() string { + if o == nil { + var ret string + return ret + } + + return o.StateToken +} + +// GetStateTokenOk returns a tuple with the StateToken field value +// and a boolean to check if the value has been set. +func (o *VerifyFactorSamlRequest) GetStateTokenOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.StateToken, true +} + +// SetStateToken sets field value +func (o *VerifyFactorSamlRequest) SetStateToken(v string) { + o.StateToken = v +} + +// GetOtpToken returns the OtpToken field value if set, zero value otherwise. +func (o *VerifyFactorSamlRequest) GetOtpToken() string { + if o == nil || o.OtpToken == nil { + var ret string + return ret + } + return *o.OtpToken +} + +// GetOtpTokenOk returns a tuple with the OtpToken field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VerifyFactorSamlRequest) GetOtpTokenOk() (*string, bool) { + if o == nil || o.OtpToken == nil { + return nil, false + } + return o.OtpToken, true +} + +// HasOtpToken returns a boolean if a field has been set. +func (o *VerifyFactorSamlRequest) HasOtpToken() bool { + if o != nil && o.OtpToken != nil { + return true + } + + return false +} + +// SetOtpToken gets a reference to the given string and assigns it to the OtpToken field. +func (o *VerifyFactorSamlRequest) SetOtpToken(v string) { + o.OtpToken = &v +} + +// GetDoNotNotify returns the DoNotNotify field value if set, zero value otherwise. +func (o *VerifyFactorSamlRequest) GetDoNotNotify() bool { + if o == nil || o.DoNotNotify == nil { + var ret bool + return ret + } + return *o.DoNotNotify +} + +// GetDoNotNotifyOk returns a tuple with the DoNotNotify field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VerifyFactorSamlRequest) GetDoNotNotifyOk() (*bool, bool) { + if o == nil || o.DoNotNotify == nil { + return nil, false + } + return o.DoNotNotify, true +} + +// HasDoNotNotify returns a boolean if a field has been set. +func (o *VerifyFactorSamlRequest) HasDoNotNotify() bool { + if o != nil && o.DoNotNotify != nil { + return true + } + + return false +} + +// SetDoNotNotify gets a reference to the given bool and assigns it to the DoNotNotify field. +func (o *VerifyFactorSamlRequest) SetDoNotNotify(v bool) { + o.DoNotNotify = &v +} + +func (o VerifyFactorSamlRequest) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["app_id"] = o.AppId + } + if true { + toSerialize["device_id"] = o.DeviceId + } + if true { + toSerialize["state_token"] = o.StateToken + } + if o.OtpToken != nil { + toSerialize["otp_token"] = o.OtpToken + } + if o.DoNotNotify != nil { + toSerialize["do_not_notify"] = o.DoNotNotify + } + return json.Marshal(toSerialize) +} + +type NullableVerifyFactorSamlRequest struct { + value *VerifyFactorSamlRequest + isSet bool +} + +func (v NullableVerifyFactorSamlRequest) Get() *VerifyFactorSamlRequest { + return v.value +} + +func (v *NullableVerifyFactorSamlRequest) Set(val *VerifyFactorSamlRequest) { + v.value = val + v.isSet = true +} + +func (v NullableVerifyFactorSamlRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableVerifyFactorSamlRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableVerifyFactorSamlRequest(val *VerifyFactorSamlRequest) *NullableVerifyFactorSamlRequest { + return &NullableVerifyFactorSamlRequest{value: val, isSet: true} +} + +func (v NullableVerifyFactorSamlRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableVerifyFactorSamlRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_verify_factor_voice_200_response_inner.go b/model_verify_factor_voice_200_response_inner.go new file mode 100644 index 0000000..f77bda6 --- /dev/null +++ b/model_verify_factor_voice_200_response_inner.go @@ -0,0 +1,187 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// VerifyFactorVoice200ResponseInner struct for VerifyFactorVoice200ResponseInner +type VerifyFactorVoice200ResponseInner struct { + Id *string `json:"id,omitempty"` + Status *string `json:"status,omitempty"` + DeviceId *string `json:"device_id,omitempty"` +} + +// NewVerifyFactorVoice200ResponseInner instantiates a new VerifyFactorVoice200ResponseInner 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 NewVerifyFactorVoice200ResponseInner() *VerifyFactorVoice200ResponseInner { + this := VerifyFactorVoice200ResponseInner{} + return &this +} + +// NewVerifyFactorVoice200ResponseInnerWithDefaults instantiates a new VerifyFactorVoice200ResponseInner 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 NewVerifyFactorVoice200ResponseInnerWithDefaults() *VerifyFactorVoice200ResponseInner { + this := VerifyFactorVoice200ResponseInner{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *VerifyFactorVoice200ResponseInner) GetId() string { + if o == nil || o.Id == nil { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VerifyFactorVoice200ResponseInner) GetIdOk() (*string, bool) { + if o == nil || o.Id == nil { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *VerifyFactorVoice200ResponseInner) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *VerifyFactorVoice200ResponseInner) SetId(v string) { + o.Id = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *VerifyFactorVoice200ResponseInner) GetStatus() string { + if o == nil || o.Status == nil { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VerifyFactorVoice200ResponseInner) GetStatusOk() (*string, bool) { + if o == nil || o.Status == nil { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *VerifyFactorVoice200ResponseInner) HasStatus() bool { + if o != nil && o.Status != nil { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *VerifyFactorVoice200ResponseInner) SetStatus(v string) { + o.Status = &v +} + +// GetDeviceId returns the DeviceId field value if set, zero value otherwise. +func (o *VerifyFactorVoice200ResponseInner) GetDeviceId() string { + if o == nil || o.DeviceId == nil { + var ret string + return ret + } + return *o.DeviceId +} + +// GetDeviceIdOk returns a tuple with the DeviceId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VerifyFactorVoice200ResponseInner) GetDeviceIdOk() (*string, bool) { + if o == nil || o.DeviceId == nil { + return nil, false + } + return o.DeviceId, true +} + +// HasDeviceId returns a boolean if a field has been set. +func (o *VerifyFactorVoice200ResponseInner) HasDeviceId() bool { + if o != nil && o.DeviceId != nil { + return true + } + + return false +} + +// SetDeviceId gets a reference to the given string and assigns it to the DeviceId field. +func (o *VerifyFactorVoice200ResponseInner) SetDeviceId(v string) { + o.DeviceId = &v +} + +func (o VerifyFactorVoice200ResponseInner) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Status != nil { + toSerialize["status"] = o.Status + } + if o.DeviceId != nil { + toSerialize["device_id"] = o.DeviceId + } + return json.Marshal(toSerialize) +} + +type NullableVerifyFactorVoice200ResponseInner struct { + value *VerifyFactorVoice200ResponseInner + isSet bool +} + +func (v NullableVerifyFactorVoice200ResponseInner) Get() *VerifyFactorVoice200ResponseInner { + return v.value +} + +func (v *NullableVerifyFactorVoice200ResponseInner) Set(val *VerifyFactorVoice200ResponseInner) { + v.value = val + v.isSet = true +} + +func (v NullableVerifyFactorVoice200ResponseInner) IsSet() bool { + return v.isSet +} + +func (v *NullableVerifyFactorVoice200ResponseInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableVerifyFactorVoice200ResponseInner(val *VerifyFactorVoice200ResponseInner) *NullableVerifyFactorVoice200ResponseInner { + return &NullableVerifyFactorVoice200ResponseInner{value: val, isSet: true} +} + +func (v NullableVerifyFactorVoice200ResponseInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableVerifyFactorVoice200ResponseInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/client/client.go b/pkg/client/client.go deleted file mode 100644 index 00109c0..0000000 --- a/pkg/client/client.go +++ /dev/null @@ -1,95 +0,0 @@ -// Package client provides intergation with api calls. -package client - -import ( - "net/http" - "time" - - "github.com/onelogin/onelogin-go-sdk/pkg/services" - "github.com/onelogin/onelogin-go-sdk/pkg/services/apps" - apprules "github.com/onelogin/onelogin-go-sdk/pkg/services/apps/app_rules" - authservers "github.com/onelogin/onelogin-go-sdk/pkg/services/auth_servers" - accesstokenclaims "github.com/onelogin/onelogin-go-sdk/pkg/services/auth_servers/access_token_claims" - "github.com/onelogin/onelogin-go-sdk/pkg/services/auth_servers/scopes" - legalvalues "github.com/onelogin/onelogin-go-sdk/pkg/services/legal_values" - "github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp" - "github.com/onelogin/onelogin-go-sdk/pkg/services/privileges" - "github.com/onelogin/onelogin-go-sdk/pkg/services/roles" - sessionlogintokens "github.com/onelogin/onelogin-go-sdk/pkg/services/session_login_tokens" - "github.com/onelogin/onelogin-go-sdk/pkg/services/smarthooks" - smarthookenvs "github.com/onelogin/onelogin-go-sdk/pkg/services/smarthooks/envs" - usermappings "github.com/onelogin/onelogin-go-sdk/pkg/services/user_mappings" - "github.com/onelogin/onelogin-go-sdk/pkg/services/users" -) - -// APIClient is used to communicate with the available api services. -type APIClient struct { - clientID string - clientSecret string - region string - baseURL string - client *http.Client - Services *Services -} - -// Services contains all the available api services. -type Services struct { - HTTPService *olhttp.OLHTTPService - AppsV2 *apps.V2Service - AppRulesV2 *apprules.V2Service - UsersV2 *users.V2Service - UserMappingsV2 *usermappings.V2Service - SessionLoginTokensV1 *sessionlogintokens.V1Service - AuthServersV2 *authservers.V2Service - AccessTokenClaimsV2 *accesstokenclaims.V2Service - ScopesV2 *scopes.V2Service - SmartHooksV1 *smarthooks.V1Service - SmartHooksEnvVarsV1 *smarthookenvs.V1Service - RolesV1 *roles.V1Service - PrivilegesV1 *privileges.V1Service -} - -// NewClient uses the config to generate the api client with services attached, and returns -// the new api client. -func NewClient(cfg *APIClientConfig) (*APIClient, error) { - cfg, err := cfg.Initialize() - if err != nil { - return &APIClient{}, err - } - - httpClient := &http.Client{ - Timeout: time.Second * time.Duration(cfg.Timeout), - } - - resourceRepository := olhttp.New(services.HTTPServiceConfig{ - ClientID: cfg.ClientID, - ClientSecret: cfg.ClientSecret, - BaseURL: cfg.Url, - Client: httpClient, - }) - - legalValuesService := legalvalues.New(resourceRepository, cfg.Url) - - return &APIClient{ - clientID: cfg.ClientID, - clientSecret: cfg.ClientSecret, - region: cfg.Region, - baseURL: cfg.Url, - client: httpClient, - Services: &Services{ - HTTPService: resourceRepository, - AppsV2: apps.New(resourceRepository, cfg.Url), - AppRulesV2: apprules.New(resourceRepository, legalValuesService, cfg.Url), - UserMappingsV2: usermappings.New(resourceRepository, legalValuesService, cfg.Url), - UsersV2: users.New(resourceRepository, cfg.Url), - SessionLoginTokensV1: sessionlogintokens.New(resourceRepository, cfg.Url), - AuthServersV2: authservers.New(resourceRepository, cfg.Url), - AccessTokenClaimsV2: accesstokenclaims.New(resourceRepository, cfg.Url), - ScopesV2: scopes.New(resourceRepository, cfg.Url), - SmartHooksV1: smarthooks.New(resourceRepository, cfg.Url), - SmartHooksEnvVarsV1: smarthookenvs.New(resourceRepository, cfg.Url), - RolesV1: roles.New(resourceRepository, cfg.Url), - PrivilegesV1: privileges.New(resourceRepository, cfg.Url), - }, - }, nil -} diff --git a/pkg/client/client_config.go b/pkg/client/client_config.go deleted file mode 100644 index 0e84018..0000000 --- a/pkg/client/client_config.go +++ /dev/null @@ -1,61 +0,0 @@ -// Package client provides intergation with api calls. -package client - -import ( - "errors" - "fmt" -) - -// constants for the client config. -const ( - USRegion = "us" - EURegion = "eu" - BaseURLTemplate = "https://api.%s.onelogin.com" - DefaultTimeout = 5 -) - -var ( - errRegion = errors.New("region is missing or unsupported") - errClientIDEmpty = errors.New("client_id is missing") - errClientSecretEmpty = errors.New("client_secret is missing") -) - -// APIClientConfig is the configuration for the APIClient. -type APIClientConfig struct { - Timeout int - ClientID string - ClientSecret string - Region string - Url string -} - -func (cfg *APIClientConfig) Initialize() (*APIClientConfig, error) { - - // Initialize clientID - if len(cfg.ClientID) == 0 { - return cfg, errClientIDEmpty - } - - // Initialize clientSecret - if len(cfg.ClientSecret) == 0 { - return cfg, errClientSecretEmpty - } - if len(cfg.Url) == 0 { - // Initialize the region if no url given - if !isSupportedRegion(cfg.Region) { - return cfg, errRegion - } - cfg.Url = fmt.Sprintf(BaseURLTemplate, cfg.Region) - } - - // Initialize the timeout - if cfg.Timeout == 0 { - cfg.Timeout = DefaultTimeout - } - - return cfg, nil -} - -func isSupportedRegion(region string) bool { - return region == EURegion || region == USRegion -} diff --git a/pkg/client/client_config_test.go b/pkg/client/client_config_test.go deleted file mode 100644 index 1a105b4..0000000 --- a/pkg/client/client_config_test.go +++ /dev/null @@ -1,196 +0,0 @@ -package client - -import ( - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestClientIDValidation(t *testing.T) { - invalidClientID := "" - validClientID := "test" - clientSecret := "test" - - t.Run("invalidClientID", func(t *testing.T) { - config := &APIClientConfig{ - ClientID: invalidClientID, - ClientSecret: clientSecret, - Region: USRegion, - Timeout: DefaultTimeout, - } - config, err := config.Initialize() - assert.NotNil(t, err) - }) - - t.Run("validClientID", func(t *testing.T) { - config := &APIClientConfig{ - ClientID: validClientID, - ClientSecret: clientSecret, - Region: USRegion, - Timeout: DefaultTimeout, - } - config, err := config.Initialize() - assert.Nil(t, err) - assert.Equal(t, config.ClientID, validClientID) - }) -} - -func TestClientSecretValidation(t *testing.T) { - invalidClientSecret := "" - validClientSecret := "test" - clientID := "test" - - t.Run("invalidClientSecret", func(t *testing.T) { - config := &APIClientConfig{ - ClientID: clientID, - ClientSecret: invalidClientSecret, - Region: USRegion, - Timeout: DefaultTimeout, - } - config, err := config.Initialize() - assert.NotNil(t, err) - }) - - t.Run("validClientSecret", func(t *testing.T) { - config := &APIClientConfig{ - ClientID: clientID, - ClientSecret: validClientSecret, - Region: USRegion, - Timeout: DefaultTimeout, - } - config, err := config.Initialize() - assert.Nil(t, err) - assert.Equal(t, config.ClientSecret, validClientSecret) - }) - -} - -func TestTimeoutBehavior(t *testing.T) { - clientID := "test" - clientSecret := "test" - testTimeout := 2 - timeoutDefaultTrigger := 0 - - tests := map[string]struct { - timeout int - expectedTimeout int - }{ - "has the provided timeout": { - timeout: testTimeout, - expectedTimeout: testTimeout, - }, - "uses the expected default timeout": { - timeout: timeoutDefaultTrigger, - expectedTimeout: DefaultTimeout, - }, - } - - for name, test := range tests { - t.Run(name, func(t *testing.T) { - config := &APIClientConfig{ - ClientID: clientID, - ClientSecret: clientSecret, - Region: USRegion, - Timeout: test.timeout, - } - config, err := config.Initialize() - assert.Nil(t, err) - assert.Equal(t, test.expectedTimeout, config.Timeout) - }) - } -} - -func TestRegionValidation(t *testing.T) { - notSupporttedRegion := "Test" - tests := map[string]struct { - region string - expectedValidation bool - }{ - "us region": { - region: USRegion, - expectedValidation: true, - }, - "eu region": { - region: EURegion, - expectedValidation: true, - }, - "not supported": { - region: notSupporttedRegion, - expectedValidation: false, - }, - } - - for name, test := range tests { - t.Run(name, func(t *testing.T) { - isValid := isSupportedRegion(test.region) - assert.Equal(t, test.expectedValidation, isValid) - }) - } -} - -func TestUrlConstruction(t *testing.T) { - clientID := "test" - clientSecret := "test" - usexpectedUrl := "https://api.us.onelogin.com" - euexpectedUrl := "https://api.eu.onelogin.com" - shadow := "https://oapi.onelogin-shadow01.com" - - tests := map[string]struct { - region string - expectedUrl string - url string - }{ - "region given, no url honors region": { - region: USRegion, - expectedUrl: usexpectedUrl, - }, - "url given, no region honors url": { - url: shadow, - expectedUrl: shadow, - }, - "url and region given honors url given": { - region: USRegion, - url: euexpectedUrl, - expectedUrl: euexpectedUrl, - }, - } - - for name, test := range tests { - t.Run(name, func(t *testing.T) { - config := &APIClientConfig{ - ClientID: clientID, - ClientSecret: clientSecret, - Region: test.region, - Url: test.url, - } - config, err := config.Initialize() - assert.Nil(t, err) - assert.Equal(t, test.expectedUrl, config.Url) - }) - } -} - -func TestUrlRegionValidation(t *testing.T) { - clientID := "test" - clientSecret := "test" - - tests := map[string]struct { - expectedUrl string - }{ - "no region given, no url returns error": { - expectedUrl: "", - }, - } - - for name, test := range tests { - t.Run(name, func(t *testing.T) { - config := &APIClientConfig{ - ClientID: clientID, - ClientSecret: clientSecret, - } - config, err := config.Initialize() - assert.NotNil(t, err) - assert.Equal(t, test.expectedUrl, "") - }) - } -} diff --git a/pkg/client/client_test.go b/pkg/client/client_test.go deleted file mode 100644 index 037e797..0000000 --- a/pkg/client/client_test.go +++ /dev/null @@ -1,107 +0,0 @@ -package client - -import ( - "testing" - "time" - - "github.com/stretchr/testify/assert" -) - -func TestNewClient(t *testing.T) { - clientID := "test" - clientSecret := "test" - usExpectedBaseURL := "https://api.us.onelogin.com" - euExpectedBaseURL := "https://api.eu.onelogin.com" - - tests := map[string]struct { - region string - timeout int - clientID string - clientSecret string - expectedRegion string - expectedBaseURL string - expectedTimeout time.Duration - expectedClientID string - expectedClientSecret string - }{ - "has the configured timeout": { - timeout: 2, - region: USRegion, - clientID: clientID, - clientSecret: clientSecret, - expectedTimeout: time.Second * time.Duration(2), - expectedRegion: USRegion, - expectedBaseURL: usExpectedBaseURL, - expectedClientID: clientID, - expectedClientSecret: clientSecret, - }, - "has the region provided baseUrl": { - timeout: 2, - region: EURegion, - clientID: clientID, - clientSecret: clientSecret, - expectedTimeout: time.Second * time.Duration(2), - expectedRegion: EURegion, - expectedBaseURL: euExpectedBaseURL, - expectedClientID: clientID, - expectedClientSecret: clientSecret, - }, - } - - for name, test := range tests { - t.Run(name, func(t *testing.T) { - config := &APIClientConfig{ - ClientID: test.clientID, - ClientSecret: test.clientSecret, - Region: test.region, - Timeout: test.timeout, - } - - cl, err := NewClient(config) - assert.Nil(t, err) - assert.Equal(t, test.expectedRegion, cl.region) - assert.Equal(t, test.expectedBaseURL, cl.baseURL) - assert.Equal(t, test.expectedClientID, cl.clientID) - assert.Equal(t, test.expectedClientSecret, cl.clientSecret) - assert.NotNil(t, cl.client) - assert.Equal(t, test.expectedTimeout, cl.client.Timeout) - assert.NotNil(t, cl.Services) - assert.NotNil(t, cl.Services.AppsV2) - }) - } -} - -func TestInvalidNewClient(t *testing.T) { - invalidClientID := "" - clientSecret := "test" - tests := map[string]struct { - region string - timeout int - clientID string - clientSecret string - expectedRegion string - expectedBaseURL string - expectedTimeout time.Duration - expectedClientID string - expectedClientSecret string - }{ - "invalid config due to missing client id": { - region: USRegion, - clientID: invalidClientID, - clientSecret: clientSecret, - }, - } - - for name, test := range tests { - t.Run(name, func(t *testing.T) { - config := &APIClientConfig{ - ClientID: test.clientID, - ClientSecret: test.clientSecret, - Region: test.region, - } - cl, err := NewClient(config) - assert.NotNil(t, err) - assert.Equal(t, &APIClient{}, cl) - }) - } -} diff --git a/pkg/oltypes/bool.go b/pkg/oltypes/bool.go deleted file mode 100644 index 8d20932..0000000 --- a/pkg/oltypes/bool.go +++ /dev/null @@ -1,17 +0,0 @@ -package oltypes - -// Bool takes in a boolean and returns -// the pointer to it. -func Bool(val bool) *bool { - return &val -} - -// GetBoolVal takes in a pointer, and if not nil, -// it returns the pointers underlying value. -func GetBoolVal(val *bool) (bool, bool) { - if val != nil { - return *val, true - } - - return false, false -} diff --git a/pkg/oltypes/bool_test.go b/pkg/oltypes/bool_test.go deleted file mode 100644 index b8dc63f..0000000 --- a/pkg/oltypes/bool_test.go +++ /dev/null @@ -1,40 +0,0 @@ -package oltypes - -import ( - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestGetBoolVal(t *testing.T) { - tests := map[string]struct { - input *bool - expectedValidationOutput bool - expectedOutput bool - }{ - "should return true validation and output when value passed in": { - input: Bool(true), - expectedValidationOutput: true, - expectedOutput: true, - }, - "should return false validation and output when nil passed in as value": { - input: nil, - expectedValidationOutput: false, - expectedOutput: false, - }, - "should return true validation and false output when false passed in as value": { - input: Bool(false), - expectedValidationOutput: true, - expectedOutput: false, - }, - } - - for testName, test := range tests { - t.Run(testName, func(t *testing.T) { - resultVal, isValid := GetBoolVal(test.input) - assert.Equal(t, test.expectedValidationOutput, isValid) - assert.Equal(t, test.expectedOutput, resultVal) - }) - } - -} diff --git a/pkg/oltypes/number.go b/pkg/oltypes/number.go deleted file mode 100644 index c1a054c..0000000 --- a/pkg/oltypes/number.go +++ /dev/null @@ -1,33 +0,0 @@ -package oltypes - -// Int64 takes in a int64 and returns -// the pointer to it. -func Int64(val int64) *int64 { - return &val -} - -// GetInt64Val takes in a pointer, and if not nil, -// it returns the pointers underlying value. -func GetInt64Val(val *int64) (int64, bool) { - if val != nil { - return *val, true - } - - return 0, false -} - -// Int32 takes in a int32 and returns -// the pointer to it. -func Int32(val int32) *int32 { - return &val -} - -// GetInt32Val takes in a pointer, and if not nil, -// it returns the pointers underlying value. -func GetInt32Val(val *int32) (int32, bool) { - if val != nil { - return *val, true - } - - return 0, false -} diff --git a/pkg/oltypes/number_test.go b/pkg/oltypes/number_test.go deleted file mode 100644 index 40ccb98..0000000 --- a/pkg/oltypes/number_test.go +++ /dev/null @@ -1,90 +0,0 @@ -package oltypes - -import ( - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestGetInt32Val(t *testing.T) { - positiveInt32Value := int32(1) - zeroInt32Value := int32(0) - negativeInt32Value := int32(-1) - - tests := map[string]struct { - input *int32 - expectedValidationOutput bool - expectedOutput int32 - }{ - "should return value and true validation when positive passed in": { - input: Int32(positiveInt32Value), - expectedValidationOutput: true, - expectedOutput: positiveInt32Value, - }, - "should return value and true validation when negative passed in": { - input: Int32(negativeInt32Value), - expectedValidationOutput: true, - expectedOutput: negativeInt32Value, - }, - "should return value and true validation when zero passed in": { - input: Int32(zeroInt32Value), - expectedValidationOutput: true, - expectedOutput: zeroInt32Value, - }, - "should return zero and false validation when nil passed in as value": { - input: nil, - expectedValidationOutput: false, - expectedOutput: 0, - }, - } - - for testName, test := range tests { - t.Run(testName, func(t *testing.T) { - resultVal, isValid := GetInt32Val(test.input) - assert.Equal(t, test.expectedValidationOutput, isValid) - assert.Equal(t, test.expectedOutput, resultVal) - }) - } - -} -func TestGetInt64Val(t *testing.T) { - positiveInt64Value := int64(1) - zeroInt64Value := int64(0) - negativeInt64Value := int64(-1) - - tests := map[string]struct { - input *int64 - expectedValidationOutput bool - expectedOutput int64 - }{ - "should return value and true validation when positive value passed in": { - input: Int64(positiveInt64Value), - expectedValidationOutput: true, - expectedOutput: positiveInt64Value, - }, - "should return value and true validation when zero passed in": { - input: Int64(zeroInt64Value), - expectedValidationOutput: true, - expectedOutput: zeroInt64Value, - }, - "should return value and true validation when negative value passed in": { - input: Int64(negativeInt64Value), - expectedValidationOutput: true, - expectedOutput: negativeInt64Value, - }, - "should return zero and false validation when nil passed in as value": { - input: nil, - expectedValidationOutput: false, - expectedOutput: 0, - }, - } - - for testName, test := range tests { - t.Run(testName, func(t *testing.T) { - resultVal, isValid := GetInt64Val(test.input) - assert.Equal(t, test.expectedValidationOutput, isValid) - assert.Equal(t, test.expectedOutput, resultVal) - }) - } - -} diff --git a/pkg/oltypes/strings.go b/pkg/oltypes/strings.go deleted file mode 100644 index 63d5cc7..0000000 --- a/pkg/oltypes/strings.go +++ /dev/null @@ -1,22 +0,0 @@ -package oltypes - -// EmptyString is the default value of a string value. -const ( - EmptyString = "" -) - -// String takes in a string and returns -// the pointer to it. -func String(val string) *string { - return &val -} - -// GetStringVal takes in a pointer, and if not nil, -// it returns the pointers underlying value. -func GetStringVal(val *string) (string, bool) { - if val != nil { - return *val, true - } - - return EmptyString, false -} diff --git a/pkg/oltypes/strings_test.go b/pkg/oltypes/strings_test.go deleted file mode 100644 index b48890e..0000000 --- a/pkg/oltypes/strings_test.go +++ /dev/null @@ -1,37 +0,0 @@ -package oltypes - -import ( - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestGetStringVal(t *testing.T) { - validStrValue := "test" - - tests := map[string]struct { - input *string - expectedValidationOutput bool - expectedOutput string - }{ - "should return value when value passed in": { - input: String(validStrValue), - expectedValidationOutput: true, - expectedOutput: validStrValue, - }, - "should return false when nil passed in as value": { - input: nil, - expectedValidationOutput: false, - expectedOutput: EmptyString, - }, - } - - for testName, test := range tests { - t.Run(testName, func(t *testing.T) { - resultVal, isValid := GetStringVal(test.input) - assert.Equal(t, test.expectedValidationOutput, isValid) - assert.Equal(t, test.expectedOutput, resultVal) - }) - } - -} diff --git a/pkg/services/apps/app_rules/app_rules_test.go b/pkg/services/apps/app_rules/app_rules_test.go deleted file mode 100644 index 444ba0e..0000000 --- a/pkg/services/apps/app_rules/app_rules_test.go +++ /dev/null @@ -1,411 +0,0 @@ -package apprules - -import ( - "encoding/json" - "errors" - "github.com/onelogin/onelogin-go-sdk/internal/test" - "github.com/onelogin/onelogin-go-sdk/pkg/oltypes" - "github.com/stretchr/testify/assert" - "testing" -) - -type MockLegalValuesService struct { - DoFunc func(addr string, o interface{}) error -} - -func (svc MockLegalValuesService) Query(addr string, o interface{}) error { - if svc.DoFunc != nil { - return svc.DoFunc(addr, o) - } - return errors.New("legal val error") -} - -func TestQuery(t *testing.T) { - tests := map[string]struct { - queryPayload *AppRuleQuery - mockLegalValues *MockLegalValuesService - expectedResponse []AppRule - expectedError error - repository *test.MockRepository - }{ - "It gets the rules for an app": { - queryPayload: &AppRuleQuery{AppID: "1"}, - mockLegalValues: &MockLegalValuesService{}, - expectedResponse: []AppRule{AppRule{ - ID: oltypes.Int32(1), - Name: oltypes.String("name"), - Conditions: []AppRuleConditions{{Source: oltypes.String("test"), Operator: oltypes.String(">"), Value: oltypes.String("90")}}, - Actions: []AppRuleActions{{Action: oltypes.String("test"), Value: []string{"test"}, Expression: oltypes.String(".*")}}}, - }, - repository: &test.MockRepository{ - ReadFunc: func(r interface{}) ([][]byte, error) { - b, err := json.Marshal([]AppRule{AppRule{ - ID: oltypes.Int32(1), - Name: oltypes.String("name"), - Conditions: []AppRuleConditions{{Source: oltypes.String("test"), Operator: oltypes.String(">"), Value: oltypes.String("90")}}, - Actions: []AppRuleActions{{Action: oltypes.String("test"), Value: []string{"test"}, Expression: oltypes.String(".*")}}}, - }) - return [][]byte{b}, err - }, - }, - }, - "It returns an error if app does not exist": { - queryPayload: &AppRuleQuery{AppID: "-1"}, - mockLegalValues: &MockLegalValuesService{}, - expectedError: errors.New("error"), - repository: &test.MockRepository{ - ReadFunc: func(r interface{}) ([][]byte, error) { - return nil, errors.New("error") - }, - }, - }, - "It returns an empty array if no rules exist": { - queryPayload: &AppRuleQuery{AppID: "1"}, - mockLegalValues: &MockLegalValuesService{}, - expectedResponse: []AppRule{AppRule{}}, - repository: &test.MockRepository{ - ReadFunc: func(r interface{}) ([][]byte, error) { - b, err := json.Marshal([]AppRule{AppRule{}}) - return [][]byte{b}, err - }, - }, - }, - } - for name, test := range tests { - t.Run(name, func(t *testing.T) { - svc := New(test.repository, test.mockLegalValues, "test.com") - actual, err := svc.Query(test.queryPayload) - assert.Equal(t, test.expectedResponse, actual) - if test.expectedError != nil { - assert.Equal(t, test.expectedError, err) - } - }) - } -} - -func TestGetOne(t *testing.T) { - tests := map[string]struct { - appID, appRuleID int32 - expectedResponse *AppRule - mockLegalValues *MockLegalValuesService - expectedError error - repository *test.MockRepository - }{ - "it gets one app rule": { - appID: 1, - appRuleID: 1, - mockLegalValues: &MockLegalValuesService{}, - expectedResponse: &AppRule{ - ID: oltypes.Int32(1), - Name: oltypes.String("name"), - Conditions: []AppRuleConditions{{Source: oltypes.String("test"), Operator: oltypes.String(">"), Value: oltypes.String("90")}}, - Actions: []AppRuleActions{{Action: oltypes.String("test"), Value: []string{"test"}, Expression: oltypes.String(".*")}}, - }, - repository: &test.MockRepository{ - ReadFunc: func(r interface{}) ([][]byte, error) { - b, err := json.Marshal(AppRule{ - ID: oltypes.Int32(1), - Name: oltypes.String("name"), - Conditions: []AppRuleConditions{{Source: oltypes.String("test"), Operator: oltypes.String(">"), Value: oltypes.String("90")}}, - Actions: []AppRuleActions{{Action: oltypes.String("test"), Value: []string{"test"}, Expression: oltypes.String(".*")}}, - }) - return [][]byte{b}, err - }, - }, - }, - "it returns an error if the app does not exist": { - appID: -1, - appRuleID: 1, - mockLegalValues: &MockLegalValuesService{}, - expectedError: errors.New("error"), - repository: &test.MockRepository{ - ReadFunc: func(r interface{}) ([][]byte, error) { - return nil, errors.New("error") - }, - }, - }, - "it returns an empty response if app rule does not exist": { - appID: 1, - appRuleID: -1, - mockLegalValues: &MockLegalValuesService{}, - expectedResponse: &AppRule{}, - repository: &test.MockRepository{ - ReadFunc: func(r interface{}) ([][]byte, error) { - b, err := json.Marshal([]AppRule{AppRule{}}) - return [][]byte{b}, err - }, - }, - }, - } - for name, test := range tests { - t.Run(name, func(t *testing.T) { - svc := New(test.repository, test.mockLegalValues, "test.com") - actual, err := svc.GetOne(test.appID, test.appRuleID) - assert.Equal(t, test.expectedResponse, actual) - if test.expectedError != nil { - assert.Equal(t, test.expectedError, err) - } - }) - } -} - -func TestUpdate(t *testing.T) { - tests := map[string]struct { - mockLegalValues *MockLegalValuesService - updatePayload *AppRule - expectedResponse *AppRule - expectedError error - repository *test.MockRepository - }{ - "it updates the app rule": { - updatePayload: &AppRule{ - ID: oltypes.Int32(1), - AppID: oltypes.Int32(1), - Name: oltypes.String("update me"), - Conditions: []AppRuleConditions{{Source: oltypes.String("ri"), Operator: oltypes.String("set_status"), Value: oltypes.String("12345")}}, - Actions: []AppRuleActions{{Action: oltypes.String("set_status"), Value: []string{"12345"}, Expression: oltypes.String(".*")}}, - }, - expectedResponse: &AppRule{ - ID: oltypes.Int32(1), - AppID: oltypes.Int32(1), - Name: oltypes.String("update me"), - Conditions: []AppRuleConditions{{Source: oltypes.String("ri"), Operator: oltypes.String("set_status"), Value: oltypes.String("12345")}}, - Actions: []AppRuleActions{{Action: oltypes.String("ri"), Value: []string{"12345"}, Expression: oltypes.String(".*")}}, - }, - mockLegalValues: &MockLegalValuesService{ - DoFunc: func(addr string, o interface{}) error { - json.Unmarshal([]byte(`[{"value":"ri"}, {"value":"has_role"}, {"value": "12345"}, {"value": "set_status"}]`), o) - return nil - }, - }, - repository: &test.MockRepository{ - UpdateFunc: func(r interface{}) ([]byte, error) { - return json.Marshal(AppRule{ - ID: oltypes.Int32(1), - AppID: oltypes.Int32(1), - Name: oltypes.String("update me"), - Conditions: []AppRuleConditions{{Source: oltypes.String("ri"), Operator: oltypes.String("set_status"), Value: oltypes.String("12345")}}, - Actions: []AppRuleActions{{Action: oltypes.String("ri"), Value: []string{"12345"}, Expression: oltypes.String(".*")}}, - }) - }, - }, - }, - "it updates one app rule allowing freeform inputs when no valid values returned": { - updatePayload: &AppRule{ - ID: oltypes.Int32(1), - AppID: oltypes.Int32(1), - Name: oltypes.String("update me"), - Conditions: []AppRuleConditions{{Source: oltypes.String("test"), Operator: oltypes.String(">"), Value: oltypes.String("90")}}, - Actions: []AppRuleActions{{Action: oltypes.String("test"), Value: []string{"test"}, Expression: oltypes.String(".*")}}, - }, - expectedResponse: &AppRule{ - ID: oltypes.Int32(1), - AppID: oltypes.Int32(1), - Name: oltypes.String("update me"), - Conditions: []AppRuleConditions{{Source: oltypes.String("test"), Operator: oltypes.String(">"), Value: oltypes.String("90")}}, - Actions: []AppRuleActions{{Action: oltypes.String("test"), Value: []string{"test"}, Expression: oltypes.String(".*")}}, - }, - mockLegalValues: &MockLegalValuesService{ - DoFunc: func(addr string, o interface{}) error { - json.Unmarshal([]byte(`[]`), o) - return nil - }, - }, - repository: &test.MockRepository{ - UpdateFunc: func(r interface{}) ([]byte, error) { - return json.Marshal(AppRule{ - ID: oltypes.Int32(1), - AppID: oltypes.Int32(1), - Name: oltypes.String("update me"), - Conditions: []AppRuleConditions{{Source: oltypes.String("test"), Operator: oltypes.String(">"), Value: oltypes.String("90")}}, - Actions: []AppRuleActions{{Action: oltypes.String("test"), Value: []string{"test"}, Expression: oltypes.String(".*")}}, - }) - }, - }, - }, - "it returns an error if an invalid condition or action value given": { - updatePayload: &AppRule{ - ID: oltypes.Int32(1), - AppID: oltypes.Int32(1), - Name: oltypes.String("update me"), - Conditions: []AppRuleConditions{{Source: oltypes.String("test"), Operator: oltypes.String(">"), Value: oltypes.String("90")}}, - Actions: []AppRuleActions{{Action: oltypes.String("test"), Value: []string{"test"}, Expression: oltypes.String(".*")}}, - }, - expectedError: errors.New("update me.conditions.source must be one of [ri has_role 12345], got: test, update me.conditions.value must be one of [ri has_role 12345], got: 90, update me.conditions.operator must be one of [ri has_role 12345], got: >, update me.actions.action must be one of [ri has_role 12345], got: test, update me.actions.values must be one of [ri has_role 12345], got: test"), - mockLegalValues: &MockLegalValuesService{ - DoFunc: func(addr string, o interface{}) error { - json.Unmarshal([]byte(`[{"value":"ri"}, {"value":"has_role"}, {"value": "12345"}]`), o) - return nil - }, - }, - repository: &test.MockRepository{}, - }, - "it returns an error if the app does not exist": { - updatePayload: &AppRule{ - ID: oltypes.Int32(1), - AppID: oltypes.Int32(1), - Name: oltypes.String("update me"), - Conditions: []AppRuleConditions{{Source: oltypes.String("test"), Operator: oltypes.String(">"), Value: oltypes.String("90")}}, - Actions: []AppRuleActions{{Action: oltypes.String("test"), Value: []string{"test"}, Expression: oltypes.String(".*")}}, - }, - mockLegalValues: &MockLegalValuesService{}, - expectedError: errors.New("error"), - expectedResponse: &AppRule{}, - repository: &test.MockRepository{ - UpdateFunc: func(r interface{}) ([]byte, error) { - return nil, errors.New("error") - }, - }, - }, - "it returns an error if the appID not given": { - updatePayload: &AppRule{ - ID: oltypes.Int32(1), - Name: oltypes.String("update me"), - Conditions: []AppRuleConditions{{Source: oltypes.String("test"), Operator: oltypes.String(">"), Value: oltypes.String("90")}}, - Actions: []AppRuleActions{{Action: oltypes.String("test"), Value: []string{"test"}, Expression: oltypes.String(".*")}}, - }, - mockLegalValues: &MockLegalValuesService{}, - expectedError: errors.New("Both ID and AppID are required on the payload"), - expectedResponse: &AppRule{}, - repository: &test.MockRepository{ - UpdateFunc: func(r interface{}) ([]byte, error) { - return nil, errors.New("error") - }, - }, - }, - } - for name, test := range tests { - t.Run(name, func(t *testing.T) { - svc := New(test.repository, test.mockLegalValues, "test.com") - err := svc.Update(test.updatePayload) - if test.expectedError != nil { - assert.Equal(t, test.expectedError, err) - } else { - assert.Equal(t, test.expectedResponse, test.updatePayload) - } - }) - } -} - -func TestCreate(t *testing.T) { - tests := map[string]struct { - appID int32 - mockLegalValues *MockLegalValuesService - createPayload *AppRule - expectedResponse *AppRule - expectedError error - repository *test.MockRepository - }{ - "it creates the app rule": { - createPayload: &AppRule{ - AppID: oltypes.Int32(1), - Name: oltypes.String("new app rule"), - Conditions: []AppRuleConditions{{Source: oltypes.String("test"), Operator: oltypes.String(">"), Value: oltypes.String("90")}}, - Actions: []AppRuleActions{{Action: oltypes.String("test"), Value: []string{"test"}, Expression: oltypes.String(".*")}}, - }, - expectedResponse: &AppRule{ - ID: oltypes.Int32(1), - AppID: oltypes.Int32(1), - Name: oltypes.String("new app rule"), - Conditions: []AppRuleConditions{{Source: oltypes.String("test"), Operator: oltypes.String(">"), Value: oltypes.String("90")}}, - Actions: []AppRuleActions{{Action: oltypes.String("test"), Value: []string{"test"}, Expression: oltypes.String(".*")}}, - }, - repository: &test.MockRepository{ - CreateFunc: func(r interface{}) ([]byte, error) { - return json.Marshal(AppRule{ - ID: oltypes.Int32(1), - AppID: oltypes.Int32(1), - Name: oltypes.String("new app rule"), - Conditions: []AppRuleConditions{{Source: oltypes.String("test"), Operator: oltypes.String(">"), Value: oltypes.String("90")}}, - Actions: []AppRuleActions{{Action: oltypes.String("test"), Value: []string{"test"}, Expression: oltypes.String(".*")}}, - }) - }, - }, - }, - "it returns an error if the appID not given": { - createPayload: &AppRule{ - ID: oltypes.Int32(1), - Name: oltypes.String("update me"), - Conditions: []AppRuleConditions{{Source: oltypes.String("test"), Operator: oltypes.String(">"), Value: oltypes.String("90")}}, - Actions: []AppRuleActions{{Action: oltypes.String("test"), Value: []string{"test"}, Expression: oltypes.String(".*")}}, - }, - mockLegalValues: &MockLegalValuesService{}, - expectedError: errors.New("AppID required on the payload"), - expectedResponse: &AppRule{}, - repository: &test.MockRepository{ - UpdateFunc: func(r interface{}) ([]byte, error) { - return nil, errors.New("error") - }, - }, - }, - "it returns an error if the app does not exist": { - createPayload: &AppRule{ - ID: oltypes.Int32(1), - AppID: oltypes.Int32(-1), - Name: oltypes.String("new app rule"), - Conditions: []AppRuleConditions{{Source: oltypes.String("test"), Operator: oltypes.String(">"), Value: oltypes.String("90")}}, - Actions: []AppRuleActions{{Action: oltypes.String("test"), Value: []string{"test"}, Expression: oltypes.String(".*")}}, - }, - expectedError: errors.New("error"), - expectedResponse: &AppRule{}, - repository: &test.MockRepository{ - CreateFunc: func(r interface{}) ([]byte, error) { - return nil, errors.New("error") - }, - }, - }, - } - for name, test := range tests { - t.Run(name, func(t *testing.T) { - svc := New(test.repository, test.mockLegalValues, "test.com") - err := svc.Create(test.createPayload) - if test.expectedError != nil { - assert.Equal(t, test.expectedError, err) - } else { - assert.Equal(t, test.expectedResponse, test.createPayload) - } - }) - } -} - -func TestDestroy(t *testing.T) { - tests := map[string]struct { - appID, appRuleID int32 - mockLegalValues *MockLegalValuesService - updatePayload AppRule - expectedResponse AppRule - expectedError error - repository *test.MockRepository - }{ - "it destroys the app rule": { - appID: 1, - appRuleID: 1, - mockLegalValues: &MockLegalValuesService{}, - repository: &test.MockRepository{ - DestroyFunc: func(r interface{}) ([]byte, error) { - return nil, nil - }, - }, - }, - "it returns an error if the app does not exist": { - appID: -1, - appRuleID: 1, - mockLegalValues: &MockLegalValuesService{}, - expectedError: errors.New("error"), - repository: &test.MockRepository{ - DestroyFunc: func(r interface{}) ([]byte, error) { - return nil, errors.New("error") - }, - }, - }, - } - for name, test := range tests { - t.Run(name, func(t *testing.T) { - svc := New(test.repository, test.mockLegalValues, "test.com") - err := svc.Destroy(test.appID, test.appRuleID) - if test.expectedError != nil { - assert.Equal(t, test.expectedError, err) - } - }) - } -} diff --git a/pkg/services/apps/app_rules/model.go b/pkg/services/apps/app_rules/model.go deleted file mode 100644 index f6ae330..0000000 --- a/pkg/services/apps/app_rules/model.go +++ /dev/null @@ -1,29 +0,0 @@ -package apprules - -type AppRuleQuery struct { - AppID string -} - -// AppRule is the contract for App Rules. -type AppRule struct { - ID *int32 `json:"id,omitempty"` - AppID *int32 `json:"app_id,omitempty"` - Name *string `json:"name,omitempty"` - Match *string `json:"match,omitempty"` - Enabled *bool `json:"enabled,omitempty"` - Position *int32 `json:"position,omitempty"` - Conditions []AppRuleConditions `json:"conditions"` - Actions []AppRuleActions `json:"actions"` -} - -type AppRuleConditions struct { - Source *string `json:"source,omitempty"` - Operator *string `json:"operator,omitempty"` - Value *string `json:"value,omitempty"` -} - -type AppRuleActions struct { - Action *string `json:"action,omitempty"` - Value []string `json:"value,omitempty"` - Expression *string `json:"expression,omitempty"` -} diff --git a/pkg/services/apps/app_rules/v2.go b/pkg/services/apps/app_rules/v2.go deleted file mode 100644 index 21afb16..0000000 --- a/pkg/services/apps/app_rules/v2.go +++ /dev/null @@ -1,218 +0,0 @@ -package apprules - -import ( - "encoding/json" - "errors" - "fmt" - "log" - "sync" - - "github.com/onelogin/onelogin-go-sdk/internal/customerrors" - "github.com/onelogin/onelogin-go-sdk/pkg/services" - "github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp" - "github.com/onelogin/onelogin-go-sdk/pkg/utils" -) - -const errAppsV2Context = "app rules v2 service" - -// V2Service holds the information needed to interface with a repository -type V2Service struct { - Endpoint, ErrorContext string - Repository services.Repository - LegalValuesService services.SimpleQuery -} - -// New creates the new svc service v2. -func New(repo services.Repository, legalValues services.SimpleQuery, host string) *V2Service { - return &V2Service{ - Endpoint: fmt.Sprintf("%s/api/2/apps", host), - Repository: repo, - ErrorContext: errAppsV2Context, - LegalValuesService: legalValues, - } -} - -// Query retrieves all the app rules from the repository that meet the query criteria passed in the -// request payload. If an empty payload is given, it will retrieve all app rules. -func (svc *V2Service) Query(query *AppRuleQuery) ([]AppRule, error) { - resp, err := svc.Repository.Read(olhttp.OLHTTPRequest{ - URL: fmt.Sprintf("%s/%s/rules", svc.Endpoint, query.AppID), - Headers: map[string]string{"Content-Type": "application/json"}, - AuthMethod: "bearer", - }) - if err != nil { - return nil, err - } - - var appRules []AppRule - - for _, bytes := range resp { - var unmarshalled []AppRule - json.Unmarshal(bytes, &unmarshalled) - appRules = append(appRules, unmarshalled...) - } - - return appRules, nil -} - -// GetOne retrieves the app rule by app id and id, and if successful, it returns -// a pointer to the app rule. -func (svc *V2Service) GetOne(appId int32, id int32) (*AppRule, error) { - resp, err := svc.Repository.Read(olhttp.OLHTTPRequest{ - URL: fmt.Sprintf("%s/%d/rules/%d", svc.Endpoint, appId, id), - Headers: map[string]string{"Content-Type": "application/json"}, - AuthMethod: "bearer", - }) - if err != nil { - return nil, err - } - - var appRule AppRule - if len(resp) < 1 { - return nil, errors.New("invalid length of response returned") - } - json.Unmarshal(resp[0], &appRule) - return &appRule, nil -} - -// Create creates a new app rule in place and returns an error if something went wrong -func (svc *V2Service) Create(appRule *AppRule) error { - if appRule.AppID == nil { - return errors.New("AppID required on the payload") - } - resp, err := svc.Repository.Create(olhttp.OLHTTPRequest{ - URL: fmt.Sprintf("%s/%d/rules", svc.Endpoint, *appRule.AppID), - Headers: map[string]string{"Content-Type": "application/json"}, - AuthMethod: "bearer", - Payload: appRule, - }) - if err != nil { - return err - } - json.Unmarshal(resp, appRule) - return nil -} - -// Update updates an existing app rule in place or returns an error if something went wrong -func (svc *V2Service) Update(appRule *AppRule) error { - if appRule.ID == nil || appRule.AppID == nil { - return errors.New("Both ID and AppID are required on the payload") - } - validationErr := validateRuleValues(appRule, svc.LegalValuesService) - if validationErr != nil { - fmt.Println(validationErr) - return validationErr - } - resp, err := svc.UpdateRaw(*appRule.AppID, *appRule.ID, appRule) - if err != nil { - return err - } - json.Unmarshal(resp, appRule) - return nil -} - -// UpdateRaw updates an existing app rule and returns the -// raw response or an error if something went wrong -func (svc *V2Service) UpdateRaw(appId int32, ruleId int32, appRule interface{}) ([]byte, error) { - return svc.Repository.Update(olhttp.OLHTTPRequest{ - URL: fmt.Sprintf("%s/%d/rules/%d", svc.Endpoint, appId, ruleId), - Headers: map[string]string{"Content-Type": "application/json"}, - AuthMethod: "bearer", - Payload: appRule, - }) -} - -// Destroy takes the app id and app rule id and removes the app rule from the API. -// Returns an error if something went wrong. -func (svc *V2Service) Destroy(appId int32, id int32) error { - if _, err := svc.Repository.Destroy(olhttp.OLHTTPRequest{ - URL: fmt.Sprintf("%s/%d/rules/%d", svc.Endpoint, appId, id), - Headers: map[string]string{"Content-Type": "application/json"}, - AuthMethod: "bearer", - }); err != nil { - return err - } - return nil -} - -func validateRuleValues(rule *AppRule, svc services.SimpleQuery) error { - legalValRequests := map[string][]string{} - legalValRequests["rules/conditions"] = []string{} - legalValRequests["rules/actions"] = []string{} - for _, condition := range rule.Conditions { - legalValRequests[fmt.Sprintf("rules/conditions/%s/values", *condition.Source)] = []string{} - legalValRequests[fmt.Sprintf("rules/conditions/%s/operators", *condition.Source)] = []string{} - } - for _, action := range rule.Actions { - legalValRequests[fmt.Sprintf("rules/actions/%s/values", *action.Action)] = []string{} - } - - var ( - wg sync.WaitGroup - mutex = &sync.Mutex{} - ) - for reqURL := range legalValRequests { - wg.Add(1) - go func(reqURL string, legalValRequest map[string][]string) { - defer wg.Done() - legalValResp := []map[string]string{} - err := svc.Query(reqURL, &legalValResp) - if err != nil { - log.Println("Problem validating rule", reqURL, err) - } - legalVals := make([]string, len(legalValResp)) - for i, legalVal := range legalValResp { - legalVals[i] = legalVal["value"] - } - mutex.Lock() - legalValRequests[reqURL] = legalVals - mutex.Unlock() - }(reqURL, legalValRequests) - } - wg.Wait() - - errorMsgs := make([]error, 0) - for _, condition := range rule.Conditions { - if len(legalValRequests["rules/conditions"]) > 0 { - err := utils.OneOf(fmt.Sprintf("%s.conditions.source", *rule.Name), *condition.Source, legalValRequests["rules/conditions"]) - if err != nil { - log.Println("Illegal value given for condition source") - errorMsgs = append(errorMsgs, err) - } - } - if len(legalValRequests[fmt.Sprintf("rules/conditions/%s/values", *condition.Source)]) > 0 { - err := utils.OneOf(fmt.Sprintf("%s.conditions.value", *rule.Name), *condition.Value, legalValRequests[fmt.Sprintf("rules/conditions/%s/values", *condition.Source)]) - if err != nil { - log.Println("Illegal value given for condition value") - errorMsgs = append(errorMsgs, err) - } - } - if len(legalValRequests[fmt.Sprintf("rules/conditions/%s/operators", *condition.Source)]) > 0 { - err := utils.OneOf(fmt.Sprintf("%s.conditions.operator", *rule.Name), *condition.Operator, legalValRequests[fmt.Sprintf("rules/conditions/%s/operators", *condition.Source)]) - if err != nil { - log.Println("Illegal value given for condition operator") - errorMsgs = append(errorMsgs, err) - } - } - } - - for _, action := range rule.Actions { - if len(legalValRequests["rules/actions"]) > 0 { - err := utils.OneOf(fmt.Sprintf("%s.actions.action", *rule.Name), *action.Action, legalValRequests["rules/actions"]) - if err != nil { - log.Println("Illegal value given for action") - errorMsgs = append(errorMsgs, err) - } - } - for _, val := range action.Value { - if len(legalValRequests[fmt.Sprintf("rules/actions/%s/values", *action.Action)]) > 0 { - err := utils.OneOf(fmt.Sprintf("%s.actions.values", *rule.Name), val, legalValRequests[fmt.Sprintf("rules/actions/%s/values", *action.Action)]) - if err != nil { - log.Println("Illegal value given for action value") - errorMsgs = append(errorMsgs, err) - } - } - } - } - return customerrors.StackErrors(errorMsgs) -} diff --git a/pkg/services/apps/apps_test.go b/pkg/services/apps/apps_test.go deleted file mode 100644 index afa83b7..0000000 --- a/pkg/services/apps/apps_test.go +++ /dev/null @@ -1,342 +0,0 @@ -package apps - -import ( - "encoding/json" - "errors" - "testing" - - "github.com/onelogin/onelogin-go-sdk/internal/test" - "github.com/onelogin/onelogin-go-sdk/pkg/oltypes" - "github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp" - "github.com/stretchr/testify/assert" -) - -func TestQuery(t *testing.T) { - tests := map[string]struct { - queryPayload *AppsQuery - expectedResponse []App - expectedError error - repository *test.MockRepository - }{ - "it gets one app": { - queryPayload: &AppsQuery{Limit: "1"}, - expectedResponse: []App{ - App{ID: oltypes.Int32(1), Name: oltypes.String("name")}, - }, - repository: &test.MockRepository{ - ReadFunc: func(r interface{}) ([][]byte, error) { - b, err := json.Marshal([]App{App{ID: oltypes.Int32(1), Name: oltypes.String("name")}}) - return [][]byte{b}, err - }, - }, - }, - "it returns the remote default limit of apps if no query given": { - queryPayload: &AppsQuery{}, - expectedResponse: []App{ - App{ID: oltypes.Int32(1), Name: oltypes.String("name")}, - App{ID: oltypes.Int32(1), Name: oltypes.String("name2")}, - }, - repository: &test.MockRepository{ - ReadFunc: func(r interface{}) ([][]byte, error) { - availableApps := []App{ - App{ID: oltypes.Int32(1), Name: oltypes.String("name")}, - App{ID: oltypes.Int32(1), Name: oltypes.String("name2")}, - } - b, err := json.Marshal(availableApps) - return [][]byte{b}, err - }, - }, - }, - "it returns the nothing and error if call to /apps fails": { - queryPayload: &AppsQuery{}, - expectedError: errors.New("error"), - expectedResponse: nil, - repository: &test.MockRepository{}, - }, - "it returns an empty response if no apps meet the criteria": { - queryPayload: &AppsQuery{Name: "???"}, - expectedResponse: []App{}, - repository: &test.MockRepository{ - ReadFunc: func(r interface{}) ([][]byte, error) { - b, err := json.Marshal([]App{}) - return [][]byte{b}, err - }, - }, - }, - } - for name, test := range tests { - t.Run(name, func(t *testing.T) { - svc := New(test.repository, "test.com") - actual, err := svc.Query(test.queryPayload) - assert.Equal(t, test.expectedResponse, actual) - if test.expectedError != nil { - assert.Equal(t, test.expectedError, err) - } - }) - } -} - -func TestGetOne(t *testing.T) { - tests := map[string]struct { - id int32 - expectedResponse *App - expectedError error - repository *test.MockRepository - }{ - "it gets one app": { - id: int32(1), - expectedResponse: &App{ID: oltypes.Int32(1), Name: oltypes.String("name")}, - repository: &test.MockRepository{ - ReadFunc: func(r interface{}) ([][]byte, error) { - b, err := json.Marshal(App{ID: oltypes.Int32(1), Name: oltypes.String("name")}) - return [][]byte{b}, err - }, - }, - }, - "it returns an error if there is a problem finding the app": { - id: int32(2), - expectedResponse: nil, - expectedError: errors.New("error"), - repository: &test.MockRepository{}, - }, - } - for name, test := range tests { - t.Run(name, func(t *testing.T) { - svc := New(test.repository, "test.com") - actual, err := svc.GetOne(test.id) - assert.Equal(t, test.expectedResponse, actual) - if test.expectedError != nil { - assert.Equal(t, test.expectedError, err) - } - }) - } -} - -func TestGetUsers(t *testing.T) { - tests := map[string]struct { - id int32 - expectedResponse []AppUser - expectedError error - repository *test.MockRepository - }{ - "it gets users for an app": { - id: 1, - expectedResponse: []AppUser{{ - ID: oltypes.Int32(1), - Firstname: oltypes.String("First"), - Lastname: oltypes.String("Last"), - Username: oltypes.String("User Name"), - Email: oltypes.String("E-Mail"), - }}, - expectedError: nil, - repository: &test.MockRepository{ - ReadFunc: func(r interface{}) ([][]byte, error) { - b, err := json.Marshal([]AppUser{{ - ID: oltypes.Int32(1), - Firstname: oltypes.String("First"), - Lastname: oltypes.String("Last"), - Username: oltypes.String("User Name"), - Email: oltypes.String("E-Mail"), - }}) - return [][]byte{b}, err - }, - }, - }, - "it returns an error if there is a problem finding the users": { - id: int32(2), - expectedResponse: nil, - expectedError: errors.New("error"), - repository: &test.MockRepository{}, - }, - } - - for name, test := range tests { - t.Run(name, func(t *testing.T) { - svc := New(test.repository, "test.com") - actual, err := svc.GetUsers(test.id) - assert.Equal(t, test.expectedResponse, actual) - assert.Equal(t, test.expectedError, err) - }) - } -} - -func TestUpdate(t *testing.T) { - tests := map[string]struct { - updatePayload *App - expectedResponse *App - expectedError error - repository *test.MockRepository - }{ - "it updates one app": { - updatePayload: &App{ - ID: oltypes.Int32(1), - Name: oltypes.String("original"), - }, - expectedResponse: &App{ - ID: oltypes.Int32(1), - Name: oltypes.String("updated"), - }, - repository: &test.MockRepository{ - UpdateFunc: func(r interface{}) ([]byte, error) { - return json.Marshal(App{ID: oltypes.Int32(1), Name: oltypes.String("updated")}) - }, - ReadFunc: func(r interface{}) ([][]byte, error) { - b, err := json.Marshal(App{ID: oltypes.Int32(1), Name: oltypes.String("updated")}) - return [][]byte{b}, err - }, - }, - }, - "it returns an error if there is a problem finding the app": { - updatePayload: &App{ - ID: oltypes.Int32(-1), - Name: oltypes.String("original"), - Parameters: map[string]AppParameters{}, - }, - expectedResponse: &App{}, - expectedError: errors.New("error"), - repository: &test.MockRepository{}, - }, - "it removes parameters when requested": { - updatePayload: &App{ - ID: oltypes.Int32(1), - Name: oltypes.String("original"), - Parameters: map[string]AppParameters{}, - }, - expectedResponse: &App{ID: oltypes.Int32(1), Name: oltypes.String("name")}, - repository: &test.MockRepository{ - UpdateFunc: func(r interface{}) ([]byte, error) { - return json.Marshal(App{ID: oltypes.Int32(1), Name: oltypes.String("name"), Parameters: map[string]AppParameters{"test": AppParameters{ID: oltypes.Int32(1)}}}) - }, - ReadFunc: func(r interface{}) ([][]byte, error) { - b, err := json.Marshal(App{ID: oltypes.Int32(1), Name: oltypes.String("name")}) - return [][]byte{b}, err - }, - ReReadFunc: []func(r interface{}) ([][]byte, error){func(r interface{}) ([][]byte, error) { - b, err := json.Marshal(App{ID: oltypes.Int32(1), Name: oltypes.String("name")}) - return [][]byte{b}, err - }}, - DestroyFunc: func(r interface{}) ([]byte, error) { - return nil, nil - }, - }, - }, - "it recovers if delete parameters fails": { - updatePayload: &App{ - ID: oltypes.Int32(1), - Name: oltypes.String("original"), - Parameters: map[string]AppParameters{}, - }, - expectedResponse: &App{ - ID: oltypes.Int32(1), - Name: oltypes.String("name"), - Parameters: map[string]AppParameters{"test": AppParameters{ID: oltypes.Int32(1)}}, - }, - repository: &test.MockRepository{ - UpdateFunc: func(r interface{}) ([]byte, error) { - return json.Marshal(App{ID: oltypes.Int32(1), Name: oltypes.String("name"), Parameters: map[string]AppParameters{"test": AppParameters{ID: oltypes.Int32(1)}}}) - }, - ReadFunc: func(r interface{}) ([][]byte, error) { - b, err := json.Marshal(App{ID: oltypes.Int32(1), Name: oltypes.String("name"), Parameters: map[string]AppParameters{"test": AppParameters{ID: oltypes.Int32(1)}}}) - return [][]byte{b}, err - }, - ReReadFunc: []func(r interface{}) ([][]byte, error){func(r interface{}) ([][]byte, error) { - b, err := json.Marshal(App{ID: oltypes.Int32(1), Name: oltypes.String("name"), Parameters: map[string]AppParameters{"test": AppParameters{ID: oltypes.Int32(1)}}}) - return [][]byte{b}, err - }}, - DestroyFunc: func(r interface{}) ([]byte, error) { - return nil, errors.New("error") - }, - }, - }, - } - for name, test := range tests { - t.Run(name, func(t *testing.T) { - svc := New(test.repository, "test.com") - actual, err := svc.Update(test.updatePayload) - assert.Equal(t, test.expectedResponse, actual) - if test.expectedError != nil { - assert.Equal(t, test.expectedError, err) - } - }) - } -} - -func TestDestroy(t *testing.T) { - tests := map[string]struct { - id int32 - repository *test.MockRepository - expectedResponse *App - expectedError error - }{ - "it destroys one app": { - id: int32(1), - repository: &test.MockRepository{ - DestroyFunc: func(r interface{}) ([]byte, error) { - return nil, nil - }, - }, - expectedResponse: &App{}, - }, - "it returns an error if there is a problem finding the app": { - id: int32(2), - repository: &test.MockRepository{}, - expectedResponse: nil, - expectedError: errors.New("error"), - }, - } - for name, test := range tests { - t.Run(name, func(t *testing.T) { - svc := New(test.repository, "test.com") - err := svc.Destroy(test.id) - if test.expectedError != nil { - assert.Equal(t, test.expectedError, err) - } else { - assert.Nil(t, err) - } - }) - } -} - -func TestCreate(t *testing.T) { - tests := map[string]struct { - createPayload *App - expectedResponse *App - expectedError error - repository *test.MockRepository - }{ - "it creates one app": { - createPayload: &App{Name: oltypes.String("name")}, - expectedResponse: &App{ID: oltypes.Int32(1), Name: oltypes.String("name")}, - repository: &test.MockRepository{ - CreateFunc: func(r interface{}) ([]byte, error) { - req := r.(olhttp.OLHTTPRequest) - app := req.Payload.(*App) - app.ID = oltypes.Int32(int32(1)) - resp := App{Name: app.Name, ID: app.ID} - return json.Marshal(resp) - }, - ReadFunc: func(r interface{}) ([][]byte, error) { - b, err := json.Marshal(App{ID: oltypes.Int32(1), Name: oltypes.String("name")}) - return [][]byte{b}, err - }, - }, - }, - "it returns an error if there is a bad request": { - createPayload: &App{ID: oltypes.Int32(1), Name: oltypes.String("not allowed value")}, - expectedResponse: &App{}, - expectedError: errors.New("error"), - repository: &test.MockRepository{}, - }, - } - for name, test := range tests { - t.Run(name, func(t *testing.T) { - svc := New(test.repository, "test.com") - err := svc.Create(test.createPayload) - if test.expectedError != nil { - assert.Equal(t, test.expectedError, err) - } else { - assert.Equal(t, test.expectedResponse, test.createPayload) - } - }) - } -} diff --git a/pkg/services/apps/model.go b/pkg/services/apps/model.go deleted file mode 100644 index 369bf8d..0000000 --- a/pkg/services/apps/model.go +++ /dev/null @@ -1,128 +0,0 @@ -package apps - -import "time" - -const ( - AuthMethodPassword int32 = iota - AuthMethodOpenID - AuthMethodSAML - AuthMethodAPI - AuthMethodGoogle - authMethodUnused5 // There is not auth method with the number 5 - AuthMethodForemsBasedApp - AuthMethodWSFED - AuthMethodOpenIDConnect -) - -type AppsQuery struct { - Limit string - Page string - Name string - ConnectorID string - AuthMethod string - Cursor string -} - -// App is the contract for apps api v2. -type App struct { - ID *int32 `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Visible *bool `json:"visible,omitempty"` - Description *string `json:"description,omitempty"` - Notes *string `json:"notes,omitempty"` - IconURL *string `json:"icon_url,omitempty"` - AuthMethod *int32 `json:"auth_method,omitempty"` - PolicyID *int32 `json:"policy_id,omitempty"` - AllowAssumedSignin *bool `json:"allow_assumed_signin,omitempty"` - TabID *int32 `json:"tab_id,omitempty"` - BrandID *int32 `json:"brand_id,omitempty"` - ConnectorID *int32 `json:"connector_id,omitempty"` - CreatedAt *time.Time `json:"created_at,omitempty"` - UpdatedAt *time.Time `json:"updated_at,omitempty"` - Provisioning *AppProvisioning `json:"provisioning"` - Sso *AppSso `json:"sso"` - Configuration *AppConfiguration `json:"configuration"` - Parameters map[string]AppParameters `json:"parameters"` - RoleIDs []int `json:"role_ids"` -} - -// AppProvisioning is the contract for provisioning. -type AppProvisioning struct { - Enabled *bool `json:"enabled,omitempty"` -} - -// AppSso is the contract for apps sso. -type AppSso struct { - ClientID *string `json:"client_id,omitempty"` - ClientSecret *string `json:"client_secret,omitempty"` - MetadataURL *string `json:"metadata_url,omitempty"` - AcsURL *string `json:"acs_url,omitempty"` - SlsURL *string `json:"sls_url,omitempty"` - Issuer *string `json:"issuer,omitempty"` - Certificate *AppSsoCertificate `json:"certificate"` -} - -// AppSsoCertificate is the contract for sso certificate. -type AppSsoCertificate struct { - ID *int32 `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Value *string `json:"value,omitempty"` -} - -// AppConfiguration is the contract for configuration. -type AppConfiguration struct { - RedirectURI *string `json:"redirect_uri,omitempty"` - RefreshTokenExpirationMinutes *int32 `json:"refresh_token_expiration_minutes,omitempty"` - LoginURL *string `json:"login_url,omitempty"` - OidcApplicationType *int32 `json:"oidc_application_type,omitempty"` - TokenEndpointAuthMethod *int32 `json:"token_endpoint_auth_method,omitempty"` - AccessTokenExpirationMinutes *int32 `json:"access_token_expiration_minutes,omitempty"` - ProviderArn *string `json:"provider_arn,omitempty"` - IdpList *string `json:"idp_list,omitempty"` - SignatureAlgorithm *string `json:"signature_algorithm,omitempty"` - - LogoutURL *string `json:"logout_url,omitempty"` - PostLogoutRedirectURI *string `json:"post_logout_redirect_uri,omitempty"` - Audience *string `json:"audience,omitempty"` - ConsumerURL *string `json:"consumer_url,omitempty"` - Login *string `json:"login,omitempty"` - Recipient *string `json:"recipient,omitempty"` - Validator *string `json:"validator,omitempty"` - RelayState *string `json:"relaystate,omitempty"` - Relay *string `json:"relay,omitempty"` - SAMLNotValidOnOrAafter *string `json:"saml_notonorafter,omitempty"` - GenerateAttributeValueTags *string `json:"generate_attribute_value_tags,omitempty"` - SAMLInitiaterID *string `json:"saml_initiater_id,omitempty"` - SAMLNotValidBefore *string `json:"saml_notbefore,omitempty"` - SAMLIssuerType *string `json:"saml_issuer_type,omitempty"` - SAMLSignElement *string `json:"saml_sign_element,omitempty"` - EncryptAssertion *string `json:"encrypt_assertion,omitempty"` - SAMLSessionNotValidOnOrAfter *string `json:"saml_sessionnotonorafter,omitempty"` - SAMLEncryptionMethodID *string `json:"saml_encryption_method_id,omitempty"` - SAMLNameIDFormatID *string `json:"saml_nameid_format_id,omitempty"` -} - -// AppParameters is the contract for parameters. -type AppParameters struct { - ID *int32 `json:"id,omitempty"` - Label *string `json:"label,omitempty"` - UserAttributeMappings *string `json:"user_attribute_mappings,omitempty"` - UserAttributeMacros *string `json:"user_attribute_macros,omitempty"` - AttributesTransformations *string `json:"attributes_transformations,omitempty"` - SkipIfBlank *bool `json:"skip_if_blank,omitempty"` - Values *string `json:"values,omitempty,omitempty"` - DefaultValues *string `json:"default_values,omitempty"` - ParamKeyName *string `json:"param_key_name,omitempty"` - ProvisionedEntitlements *bool `json:"provisioned_entitlements,omitempty"` - SafeEntitlementsEnabled *bool `json:"safe_entitlements_enabled,omitempty"` - IncludeInSamlAssertion *bool `json:"include_in_saml_assertion,omitempty"` -} - -// AppUser is the contract for users of an app. -type AppUser struct { - ID *int32 `json:"id,omitempty"` - Firstname *string `json:"firstname,omitempty"` - Lastname *string `json:"lastname,omitempty"` - Username *string `json:"username,omitempty"` - Email *string `json:"email,omitempty"` -} diff --git a/pkg/services/apps/v2.go b/pkg/services/apps/v2.go deleted file mode 100644 index aa50b11..0000000 --- a/pkg/services/apps/v2.go +++ /dev/null @@ -1,190 +0,0 @@ -package apps - -import ( - "encoding/json" - "errors" - "fmt" - - "github.com/onelogin/onelogin-go-sdk/internal/customerrors" - "github.com/onelogin/onelogin-go-sdk/pkg/services" - "github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp" -) - -const errAppsV2Context = "apps v2 service" - -// V2Service holds the information needed to interface with a repository -type V2Service struct { - Endpoint, ErrorContext string - Repository services.Repository -} - -// New creates the new svc service v2. -func New(repo services.Repository, host string) *V2Service { - return &V2Service{ - Endpoint: fmt.Sprintf("%s/api/2/apps", host), - Repository: repo, - ErrorContext: errAppsV2Context, - } -} - -// Query retrieves all the apps from the repository that meet the query criteria passed in the -// request payload. If an empty payload is given, it will retrieve all apps. -func (svc *V2Service) Query(query *AppsQuery) ([]App, error) { - resp, err := svc.Repository.Read(olhttp.OLHTTPRequest{ - URL: svc.Endpoint, - Headers: map[string]string{"Content-Type": "application/json"}, - AuthMethod: "bearer", - Payload: query, - }) - if err != nil { - return nil, err - } - - var apps []App - for _, bytes := range resp { - var unmarshalled []App - json.Unmarshal(bytes, &unmarshalled) - if len(apps) == 0 { - apps = unmarshalled - } else { - apps = append(apps, unmarshalled...) - } - } - - return apps, nil -} - -// GetOne retrieves the app by id, and if successful, it returns -// a pointer to the app. -func (svc *V2Service) GetOne(id int32) (*App, error) { - resp, err := svc.Repository.Read(olhttp.OLHTTPRequest{ - URL: fmt.Sprintf("%s/%d", svc.Endpoint, id), - Headers: map[string]string{"Content-Type": "application/json"}, - AuthMethod: "bearer", - }) - if err != nil { - return nil, err - } - - var app App - if len(resp) < 1 { - return nil, errors.New("invalid length of response returned") - } - json.Unmarshal(resp[0], &app) - - return &app, nil -} - -// GetUsers retrieves the list of users for a given app by id, it returns -// an array of users for the app. -func (svc *V2Service) GetUsers(id int32) ([]AppUser, error) { - resp, err := svc.Repository.Read(olhttp.OLHTTPRequest{ - URL: fmt.Sprintf("%s/%d/users", svc.Endpoint, id), - Headers: map[string]string{"Content-Type": "application/json"}, - AuthMethod: "bearer", - }) - if err != nil { - return nil, err - } - - var users []AppUser - if len(resp) < 1 { - return nil, errors.New("invalid length of response returned") - } - err = json.Unmarshal(resp[0], &users) - - return users, err -} - -// Create creates a new app, and if successful, it returns a pointer to the app. -func (svc *V2Service) Create(app *App) error { - resp, err := svc.Repository.Create(olhttp.OLHTTPRequest{ - URL: svc.Endpoint, - Headers: map[string]string{"Content-Type": "application/json"}, - AuthMethod: "bearer", - Payload: app, - }) - if err != nil { - return err - } - json.Unmarshal(resp, app) - return nil -} - -// Update updates an existing app in place or returns an error if something went wrong - -// Update is unique in that the API does not fully support Parameters as first-class -// resources and are managed by nesting them in the App. This means that a partial -// update state could exist if, for example, a parameter failed to delete or be updated -// while other parameter changes succeeded. In order to ensure the client is given an -// accurate representation of what has been persisted to the API, we call out to the GetOne -// to simply return what is currently in the API, rather than updating in place. This is a -// temporary holdover until parameters is dealt with in a consistent fashion to other nested resources like app rules -func (svc *V2Service) Update(app *App) (*App, error) { - if app.ID == nil { - return nil, errors.New("No ID Given") - } - requestedParametersState := make(map[string]AppParameters, len(app.Parameters)) - for k, p := range app.Parameters { - requestedParametersState[k] = p - } - resp, err := svc.Repository.Update(olhttp.OLHTTPRequest{ - URL: fmt.Sprintf("%s/%d", svc.Endpoint, *app.ID), - Headers: map[string]string{"Content-Type": "application/json"}, - AuthMethod: "bearer", - Payload: app, - }) - if err != nil { - return &App{}, err - } - json.Unmarshal(resp, app) - - pruneParamErr := svc.pruneParameters(requestedParametersState, app) - - if pruneParamErr != nil { - var recoverErr error - app, recoverErr = svc.GetOne(*app.ID) - if recoverErr != nil { - return nil, err - } - return app, pruneParamErr - } - // re-read the app so we return one with all the parameters changes made via each individual parameters call - return svc.GetOne(*app.ID) -} - -// Destroy deletes the app for the id, and if successful, it returns nil -func (svc *V2Service) Destroy(id int32) error { - if _, err := svc.Repository.Destroy(olhttp.OLHTTPRequest{ - URL: fmt.Sprintf("%s/%d", svc.Endpoint, id), - Headers: map[string]string{"Content-Type": "application/json"}, - AuthMethod: "bearer", - }); err != nil { - return err - } - return nil -} - -// Given a list of requested parameters, go to the API, and pluck (delete) all the parameters that are not on the -// request list. At this point the app holds all existing parameters in the API. -// Rules not on the request list are assumed to be removed by the caller. -func (svc *V2Service) pruneParameters(requestedParams map[string]AppParameters, app *App) error { - var delErrors []error - keepMap := make(map[int32]bool, len(requestedParams)) - for _, param := range requestedParams { - keepMap[*param.ID] = true - } - // no need to call down app parameters. parameters returned as part of app update - for _, delCandidate := range app.Parameters { - if !keepMap[*delCandidate.ID] { - if _, err := svc.Repository.Destroy(olhttp.OLHTTPRequest{ - URL: fmt.Sprintf("%s/%d/parameters/%d", svc.Endpoint, *app.ID, *delCandidate.ID), - Headers: map[string]string{"Content-Type": "application/json"}, - AuthMethod: "bearer", - }); err != nil { - delErrors = append(delErrors, err) - } - } - } - return customerrors.StackErrors(delErrors) -} diff --git a/pkg/services/auth_servers/access_token_claims/access_token_claims_test.go b/pkg/services/auth_servers/access_token_claims/access_token_claims_test.go deleted file mode 100644 index fe90f4a..0000000 --- a/pkg/services/auth_servers/access_token_claims/access_token_claims_test.go +++ /dev/null @@ -1,301 +0,0 @@ -package accesstokenclaims - -import ( - "encoding/json" - "errors" - "github.com/onelogin/onelogin-go-sdk/internal/test" - "github.com/onelogin/onelogin-go-sdk/pkg/oltypes" - "github.com/stretchr/testify/assert" - "testing" -) - -func TestQuery(t *testing.T) { - tests := map[string]struct { - queryPayload *AccessTokenClaimsQuery - expectedResponse []AccessTokenClaim - expectedError error - repository *test.MockRepository - }{ - "It queries all claims assigend to an auth server": { - queryPayload: &AccessTokenClaimsQuery{AuthServerID: "1"}, - expectedResponse: []AccessTokenClaim{ - AccessTokenClaim{ - ID: oltypes.Int32(int32(1)), - Label: oltypes.String("label"), - UserAttributeMappings: oltypes.String("mapping"), - UserAttributeMacros: oltypes.String("macro"), - AttributeTransformations: oltypes.String("a"), - SkipIfBlank: oltypes.Bool(true), - Values: []string{"values"}, - DefaultValues: oltypes.String("default values"), - ProvisionedEntitlements: oltypes.Bool(true), - }, - AccessTokenClaim{ - ID: oltypes.Int32(int32(2)), - Label: oltypes.String("label"), - UserAttributeMappings: oltypes.String("mapping"), - UserAttributeMacros: oltypes.String("macro"), - AttributeTransformations: oltypes.String("a"), - SkipIfBlank: oltypes.Bool(true), - Values: []string{"values"}, - DefaultValues: oltypes.String("default values"), - ProvisionedEntitlements: oltypes.Bool(true), - }, - }, - repository: &test.MockRepository{ - ReadFunc: func(r interface{}) ([][]byte, error) { - b, err := json.Marshal([]AccessTokenClaim{ - AccessTokenClaim{ - ID: oltypes.Int32(int32(1)), - Label: oltypes.String("label"), - UserAttributeMappings: oltypes.String("mapping"), - UserAttributeMacros: oltypes.String("macro"), - AttributeTransformations: oltypes.String("a"), - SkipIfBlank: oltypes.Bool(true), - Values: []string{"values"}, - DefaultValues: oltypes.String("default values"), - ProvisionedEntitlements: oltypes.Bool(true), - }, - AccessTokenClaim{ - ID: oltypes.Int32(int32(2)), - Label: oltypes.String("label"), - UserAttributeMappings: oltypes.String("mapping"), - UserAttributeMacros: oltypes.String("macro"), - AttributeTransformations: oltypes.String("a"), - SkipIfBlank: oltypes.Bool(true), - Values: []string{"values"}, - DefaultValues: oltypes.String("default values"), - ProvisionedEntitlements: oltypes.Bool(true), - }, - }) - return [][]byte{b}, err - }, - }, - }, - "it reports an error": { - queryPayload: &AccessTokenClaimsQuery{AuthServerID: "1"}, - expectedError: errors.New("error"), - repository: &test.MockRepository{ - ReadFunc: func(r interface{}) ([][]byte, error) { - return nil, errors.New("error") - }, - }, - }, - } - for name, test := range tests { - t.Run(name, func(t *testing.T) { - svc := New(test.repository, "test.com") - claims, err := svc.Query(test.queryPayload) - if test.expectedError != nil { - assert.Equal(t, test.expectedError, err) - } else { - assert.Equal(t, test.expectedResponse, claims) - } - }) - } -} - -func TestCreate(t *testing.T) { - tests := map[string]struct { - payload *AccessTokenClaim - expectedError error - expectedResponse *AccessTokenClaim - repository *test.MockRepository - }{ - "it creates a claim and associates it with an auth server": { - payload: &AccessTokenClaim{ - AuthServerID: oltypes.Int32(int32(1)), - Label: oltypes.String("label"), - UserAttributeMappings: oltypes.String("mapping"), - UserAttributeMacros: oltypes.String("macro"), - AttributeTransformations: oltypes.String("a"), - SkipIfBlank: oltypes.Bool(true), - Values: []string{"values"}, - DefaultValues: oltypes.String("default values"), - ProvisionedEntitlements: oltypes.Bool(true), - }, - expectedResponse: &AccessTokenClaim{ - ID: oltypes.Int32(int32(1)), - AuthServerID: oltypes.Int32(int32(1)), - Label: oltypes.String("label"), - UserAttributeMappings: oltypes.String("mapping"), - UserAttributeMacros: oltypes.String("macro"), - AttributeTransformations: oltypes.String("a"), - SkipIfBlank: oltypes.Bool(true), - Values: []string{"values"}, - DefaultValues: oltypes.String("default values"), - ProvisionedEntitlements: oltypes.Bool(true), - }, - repository: &test.MockRepository{ - CreateFunc: func(r interface{}) ([]byte, error) { - return json.Marshal(map[string]int32{"id": int32(1)}) - }, - }, - }, - "it errs out if parent ID not given on payload": { - payload: &AccessTokenClaim{ - Label: oltypes.String("label"), - UserAttributeMappings: oltypes.String("mapping"), - UserAttributeMacros: oltypes.String("macro"), - AttributeTransformations: oltypes.String("a"), - SkipIfBlank: oltypes.Bool(true), - Values: []string{"values"}, - DefaultValues: oltypes.String("default values"), - ProvisionedEntitlements: oltypes.Bool(true), - }, - expectedError: errors.New("AuthServerID required on the payload"), - }, - "it returns an error": { - payload: &AccessTokenClaim{ - AuthServerID: oltypes.Int32(int32(1)), - Label: oltypes.String("label"), - UserAttributeMappings: oltypes.String("mapping"), - UserAttributeMacros: oltypes.String("macro"), - AttributeTransformations: oltypes.String("a"), - SkipIfBlank: oltypes.Bool(true), - Values: []string{"values"}, - DefaultValues: oltypes.String("default values"), - ProvisionedEntitlements: oltypes.Bool(true), - }, - expectedError: errors.New("error"), - repository: &test.MockRepository{ - CreateFunc: func(r interface{}) ([]byte, error) { - return nil, errors.New("error") - }, - }, - }, - } - for name, test := range tests { - t.Run(name, func(t *testing.T) { - svc := New(test.repository, "test.com") - err := svc.Create(test.payload) - if test.expectedError != nil { - assert.Equal(t, test.expectedError, err) - } else { - assert.Equal(t, test.expectedResponse, test.payload) - } - }) - } -} - -func TestUpdate(t *testing.T) { - tests := map[string]struct { - authServerID int32 - payload *AccessTokenClaim - expectedError error - expectedResponse *AccessTokenClaim - repository *test.MockRepository - }{ - "it updates a claim": { - payload: &AccessTokenClaim{ - ID: oltypes.Int32(int32(1)), - AuthServerID: oltypes.Int32(int32(1)), - Label: oltypes.String("label"), - UserAttributeMappings: oltypes.String("mapping"), - UserAttributeMacros: oltypes.String("macro"), - AttributeTransformations: oltypes.String("a"), - SkipIfBlank: oltypes.Bool(true), - Values: []string{"values"}, - DefaultValues: oltypes.String("default values"), - ProvisionedEntitlements: oltypes.Bool(true), - }, - expectedResponse: &AccessTokenClaim{ - ID: oltypes.Int32(int32(1)), - AuthServerID: oltypes.Int32(int32(1)), - Label: oltypes.String("label"), - UserAttributeMappings: oltypes.String("mapping"), - UserAttributeMacros: oltypes.String("macro"), - AttributeTransformations: oltypes.String("a"), - SkipIfBlank: oltypes.Bool(true), - Values: []string{"values"}, - DefaultValues: oltypes.String("default values"), - ProvisionedEntitlements: oltypes.Bool(true), - }, - repository: &test.MockRepository{ - UpdateFunc: func(r interface{}) ([]byte, error) { - return json.Marshal(map[string]int32{"id": int32(1)}) - }, - }, - }, - "it reports an error": { - payload: &AccessTokenClaim{ - ID: oltypes.Int32(int32(1)), - AuthServerID: oltypes.Int32(int32(1)), - Label: oltypes.String("label"), - UserAttributeMappings: oltypes.String("mapping"), - UserAttributeMacros: oltypes.String("macro"), - AttributeTransformations: oltypes.String("a"), - SkipIfBlank: oltypes.Bool(true), - Values: []string{"values"}, - DefaultValues: oltypes.String("default values"), - ProvisionedEntitlements: oltypes.Bool(true), - }, - expectedError: errors.New("error"), - repository: &test.MockRepository{ - UpdateFunc: func(r interface{}) ([]byte, error) { - return nil, errors.New("error") - }, - }, - }, - "it reports an error if no parent resource id given": { - payload: &AccessTokenClaim{ - ID: oltypes.Int32(int32(1)), - Label: oltypes.String("label"), - UserAttributeMappings: oltypes.String("mapping"), - UserAttributeMacros: oltypes.String("macro"), - AttributeTransformations: oltypes.String("a"), - SkipIfBlank: oltypes.Bool(true), - Values: []string{"values"}, - DefaultValues: oltypes.String("default values"), - ProvisionedEntitlements: oltypes.Bool(true), - }, - expectedError: errors.New("Both ID and AuthServerID are required on the payload"), - }, - } - for name, test := range tests { - t.Run(name, func(t *testing.T) { - svc := New(test.repository, "test.com") - err := svc.Update(test.payload) - if test.expectedError != nil { - assert.Equal(t, test.expectedError, err) - } else { - assert.Equal(t, test.expectedResponse, test.payload) - } - }) - } -} - -func TestDestroy(t *testing.T) { - tests := map[string]struct { - authServerID, accessTokenClaimID int32 - expectedError error - repository *test.MockRepository - }{ - "it deletes a claim": { - authServerID: int32(1), - accessTokenClaimID: int32(1), - repository: &test.MockRepository{ - DestroyFunc: func(r interface{}) ([]byte, error) { - return nil, nil - }, - }, - }, - "it reports an error": { - accessTokenClaimID: int32(1), - repository: &test.MockRepository{ - DestroyFunc: func(r interface{}) ([]byte, error) { - return nil, errors.New("error") - }, - }, - }, - } - for name, test := range tests { - t.Run(name, func(t *testing.T) { - svc := New(test.repository, "test.com") - err := svc.Destroy(test.authServerID, test.accessTokenClaimID) - if test.expectedError != nil { - assert.Equal(t, test.expectedError, err) - } - }) - } -} diff --git a/pkg/services/auth_servers/access_token_claims/model.go b/pkg/services/auth_servers/access_token_claims/model.go deleted file mode 100644 index 01d17ff..0000000 --- a/pkg/services/auth_servers/access_token_claims/model.go +++ /dev/null @@ -1,18 +0,0 @@ -package accesstokenclaims - -type AccessTokenClaimsQuery struct { - AuthServerID string -} - -type AccessTokenClaim struct { - ID *int32 `json:"id,omitempty"` - AuthServerID *int32 `json:"auth_server_id,omitempty"` - Label *string `json:"label,omitempty"` - UserAttributeMappings *string `json:"user_attribute_mappings,omitempty"` - UserAttributeMacros *string `json:"user_attribute_macros,omitempty"` - AttributeTransformations *string `json:"attribute_transformations,omitempty"` - SkipIfBlank *bool `json:"skip_if_blank,omitempty"` - Values []string `json:"values,omitempty"` - DefaultValues *string `json:"default_values,omitempty"` - ProvisionedEntitlements *bool `json:"provisioned_entitlements,omitempty"` -} diff --git a/pkg/services/auth_servers/access_token_claims/v2.go b/pkg/services/auth_servers/access_token_claims/v2.go deleted file mode 100644 index ca26552..0000000 --- a/pkg/services/auth_servers/access_token_claims/v2.go +++ /dev/null @@ -1,104 +0,0 @@ -package accesstokenclaims - -import ( - "encoding/json" - "errors" - "fmt" - - "github.com/onelogin/onelogin-go-sdk/pkg/oltypes" - "github.com/onelogin/onelogin-go-sdk/pkg/services" - "github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp" -) - -const errAppsV2Context = "access token claims v2 service" - -// V2Service holds the information needed to interface with a repository -type V2Service struct { - Endpoint, ErrorContext string - Repository services.Repository -} - -// New creates the new svc service v2. -func New(repo services.Repository, host string) *V2Service { - return &V2Service{ - Endpoint: fmt.Sprintf("%s/api/2/api_authorizations", host), - Repository: repo, - ErrorContext: errAppsV2Context, - } -} - -// Query retrieves all the access token claims from the repository that meet the query criteria passed in the -// request payload. If an empty payload is given, it will retrieve all access token claims. -func (svc *V2Service) Query(query *AccessTokenClaimsQuery) ([]AccessTokenClaim, error) { - resp, err := svc.Repository.Read(olhttp.OLHTTPRequest{ - URL: fmt.Sprintf("%s/%s/claims", svc.Endpoint, query.AuthServerID), - Headers: map[string]string{"Content-Type": "application/json"}, - AuthMethod: "bearer", - }) - if err != nil { - return nil, err - } - - var accessTokenClaims []AccessTokenClaim - for _, bytes := range resp { - var unmarshalled []AccessTokenClaim - json.Unmarshal(bytes, &unmarshalled) - accessTokenClaims = append(accessTokenClaims, unmarshalled...) - } - return accessTokenClaims, nil -} - -// Create creates a new access token claim in place and returns an error if something went wrong -func (svc *V2Service) Create(accessTokenClaim *AccessTokenClaim) error { - if accessTokenClaim.AuthServerID == nil { - return errors.New("AuthServerID required on the payload") - } - resp, err := svc.Repository.Create(olhttp.OLHTTPRequest{ - URL: fmt.Sprintf("%s/%d/claims", svc.Endpoint, *accessTokenClaim.AuthServerID), - Headers: map[string]string{"Content-Type": "application/json"}, - AuthMethod: "bearer", - Payload: accessTokenClaim, - }) - if err != nil { - return err - } - respObj := map[string]int32{} - json.Unmarshal(resp, &respObj) - accessTokenClaim.ID = oltypes.Int32(respObj["id"]) - return nil -} - -// Update updates an existing access token claim in place or returns an error if something went wrong -func (svc *V2Service) Update(accessTokenClaim *AccessTokenClaim) error { - if accessTokenClaim.ID == nil || accessTokenClaim.AuthServerID == nil { - return errors.New("Both ID and AuthServerID are required on the payload") - } - _, err := svc.UpdateRaw(*accessTokenClaim.AuthServerID, *accessTokenClaim.ID, accessTokenClaim) - if err != nil { - return err - } - return nil -} - -// UpdateRaw updates an existing access token claim and returns the raw response or an error if something went wrong -func (svc *V2Service) UpdateRaw(authServerId int32, claimId, accessTokenClaim interface{}) ([]byte, error) { - return svc.Repository.Update(olhttp.OLHTTPRequest{ - URL: fmt.Sprintf("%s/%d/claims/%d", svc.Endpoint, authServerId, claimId), - Headers: map[string]string{"Content-Type": "application/json"}, - AuthMethod: "bearer", - Payload: accessTokenClaim, - }) -} - -// Destroy takes the access token claim id and access token claim id and removes the access token claim from the API. -// Returns an error if something went wrong. -func (svc *V2Service) Destroy(accessTokenClaimId int32, id int32) error { - if _, err := svc.Repository.Destroy(olhttp.OLHTTPRequest{ - URL: fmt.Sprintf("%s/%d/claims/%d", svc.Endpoint, accessTokenClaimId, id), - Headers: map[string]string{"Content-Type": "application/json"}, - AuthMethod: "bearer", - }); err != nil { - return err - } - return nil -} diff --git a/pkg/services/auth_servers/auth_servers_test.go b/pkg/services/auth_servers/auth_servers_test.go deleted file mode 100644 index 276b9f0..0000000 --- a/pkg/services/auth_servers/auth_servers_test.go +++ /dev/null @@ -1,292 +0,0 @@ -package authservers - -import ( - "encoding/json" - "errors" - "github.com/onelogin/onelogin-go-sdk/internal/test" - "github.com/onelogin/onelogin-go-sdk/pkg/oltypes" - "github.com/stretchr/testify/assert" - "testing" -) - -func TestQuery(t *testing.T) { - tests := map[string]struct { - queryPayload *AuthServerQuery - expectedResponse []AuthServer - expectedError error - repository *test.MockRepository - }{ - "it gets one auth server": { - queryPayload: &AuthServerQuery{Limit: "1"}, - expectedResponse: []AuthServer{ - AuthServer{ - ID: oltypes.Int32(1), - Name: oltypes.String("name"), - Configuration: &AuthServerConfiguration{ - ResourceIdentifier: oltypes.String("example.com/contacts"), - Audiences: []string{"example.com/contacts", "example.com/people"}, - }, - }, - }, - repository: &test.MockRepository{ - ReadFunc: func(r interface{}) ([][]byte, error) { - b, err := json.Marshal([]AuthServer{ - AuthServer{ - ID: oltypes.Int32(1), - Name: oltypes.String("name"), - Configuration: &AuthServerConfiguration{ - ResourceIdentifier: oltypes.String("example.com/contacts"), - Audiences: []string{"example.com/contacts", "example.com/people"}, - }, - }, - }) - return [][]byte{b}, err - }, - }, - }, - "it returns the remote default limit of auth servers if no query given": { - queryPayload: &AuthServerQuery{}, - expectedResponse: []AuthServer{ - AuthServer{ - ID: oltypes.Int32(1), - Name: oltypes.String("name"), - Configuration: &AuthServerConfiguration{ - ResourceIdentifier: oltypes.String("example.com/contacts"), - Audiences: []string{"example.com/contacts", "example.com/people"}, - }, - }, - AuthServer{ - ID: oltypes.Int32(1), - Name: oltypes.String("name2"), - Configuration: &AuthServerConfiguration{ - ResourceIdentifier: oltypes.String("sample.com/contacts"), - Audiences: []string{"sample.com/contacts", "sample.com/people"}, - }, - }, - }, - repository: &test.MockRepository{ - ReadFunc: func(r interface{}) ([][]byte, error) { - b, err := json.Marshal([]AuthServer{ - AuthServer{ - ID: oltypes.Int32(1), - Name: oltypes.String("name"), - Configuration: &AuthServerConfiguration{ - ResourceIdentifier: oltypes.String("example.com/contacts"), - Audiences: []string{"example.com/contacts", "example.com/people"}, - }, - }, - AuthServer{ - ID: oltypes.Int32(1), - Name: oltypes.String("name2"), - Configuration: &AuthServerConfiguration{ - ResourceIdentifier: oltypes.String("sample.com/contacts"), - Audiences: []string{"sample.com/contacts", "sample.com/people"}, - }, - }, - }) - return [][]byte{b}, err - }, - }, - }, - "it returns an error if the call to /api_authorizations fails": { - queryPayload: &AuthServerQuery{}, - expectedError: errors.New("error"), - expectedResponse: nil, - repository: &test.MockRepository{}, - }, - } - for name, test := range tests { - t.Run(name, func(t *testing.T) { - svc := New(test.repository, "test.com") - actual, err := svc.Query(test.queryPayload) - assert.Equal(t, test.expectedResponse, actual) - if test.expectedError != nil { - assert.Equal(t, test.expectedError, err) - } - }) - } -} - -func TestGetOne(t *testing.T) { - tests := map[string]struct { - id int32 - expectedResponse *AuthServer - expectedError error - repository *test.MockRepository - }{ - "it gets one auth server by id": { - id: int32(1), - expectedResponse: &AuthServer{ - ID: oltypes.Int32(1), - Name: oltypes.String("name"), - Configuration: &AuthServerConfiguration{ - ResourceIdentifier: oltypes.String("example.com/contacts"), - Audiences: []string{"example.com/contacts", "example.com/people"}, - }, - }, - repository: &test.MockRepository{ - ReadFunc: func(r interface{}) ([][]byte, error) { - b, err := json.Marshal(AuthServer{ - ID: oltypes.Int32(1), - Name: oltypes.String("name"), - Configuration: &AuthServerConfiguration{ - ResourceIdentifier: oltypes.String("example.com/contacts"), - Audiences: []string{"example.com/contacts", "example.com/people"}, - }, - }) - return [][]byte{b}, err - }, - }, - }, - "it returns an error if the call to /api_authorizations fails": { - expectedError: errors.New("error"), - expectedResponse: nil, - repository: &test.MockRepository{}, - }, - } - for name, test := range tests { - t.Run(name, func(t *testing.T) { - svc := New(test.repository, "test.com") - actual, err := svc.GetOne(test.id) - assert.Equal(t, test.expectedResponse, actual) - if test.expectedError != nil { - assert.Equal(t, test.expectedError, err) - } - }) - } -} - -func TestUpdate(t *testing.T) { - tests := map[string]struct { - updatePayload *AuthServer - expectedResult *AuthServer - expectedError error - repository *test.MockRepository - }{ - "it updates a auth server": { - updatePayload: &AuthServer{ - ID: oltypes.Int32(1), - Name: oltypes.String("update"), - Configuration: &AuthServerConfiguration{ - ResourceIdentifier: oltypes.String("example.com/contacts"), - Audiences: []string{"example.com/contacts", "example.com/people"}, - }, - }, - expectedResult: &AuthServer{ - ID: oltypes.Int32(1), - Name: oltypes.String("update"), - Configuration: &AuthServerConfiguration{ - ResourceIdentifier: oltypes.String("example.com/contacts"), - Audiences: []string{"example.com/contacts", "example.com/people"}, - }, - }, - repository: &test.MockRepository{ - UpdateFunc: func(r interface{}) ([]byte, error) { - return json.Marshal(map[string]int32{"id": int32(1)}) - }, - }, - }, - "it returns an error if something went wrong": { - updatePayload: &AuthServer{ID: oltypes.Int32(1), Name: oltypes.String("update")}, - expectedResult: &AuthServer{}, - expectedError: errors.New("error"), - repository: &test.MockRepository{}, - }, - } - for name, test := range tests { - t.Run(name, func(t *testing.T) { - svc := New(test.repository, "test.com") - err := svc.Update(test.updatePayload) - if test.expectedError != nil { - assert.Equal(t, test.expectedError, err) - } else { - assert.Equal(t, test.expectedResult, test.updatePayload) - } - }) - } -} - -func TestCreate(t *testing.T) { - tests := map[string]struct { - createPayload *AuthServer - expectedResult *AuthServer - expectedError error - repository *test.MockRepository - }{ - "it creates a auth server": { - createPayload: &AuthServer{ - Name: oltypes.String("name"), - Configuration: &AuthServerConfiguration{ - ResourceIdentifier: oltypes.String("example.com/contacts"), - Audiences: []string{"example.com/contacts", "example.com/people"}, - }, - }, - expectedResult: &AuthServer{ - ID: oltypes.Int32(1), - Name: oltypes.String("name"), - Configuration: &AuthServerConfiguration{ - ResourceIdentifier: oltypes.String("example.com/contacts"), - Audiences: []string{"example.com/contacts", "example.com/people"}, - }, - }, - repository: &test.MockRepository{ - CreateFunc: func(r interface{}) ([]byte, error) { - return json.Marshal(map[string]int32{"id": int32(1)}) - }, - }, - }, - "it returns an error if something went wrong": { - createPayload: &AuthServer{Name: oltypes.String("name")}, - expectedResult: &AuthServer{}, - expectedError: errors.New("error"), - repository: &test.MockRepository{}, - }, - } - for name, test := range tests { - t.Run(name, func(t *testing.T) { - svc := New(test.repository, "test.com") - err := svc.Create(test.createPayload) - if test.expectedError != nil { - assert.Equal(t, test.expectedError, err) - } else { - assert.Equal(t, test.expectedResult, test.createPayload) - } - }) - } -} - -func TestDestroy(t *testing.T) { - tests := map[string]struct { - id int32 - repository *test.MockRepository - expectedResponse *AuthServer - expectedError error - }{ - "it destroys one auth server": { - id: int32(1), - repository: &test.MockRepository{ - DestroyFunc: func(r interface{}) ([]byte, error) { - return nil, nil - }, - }, - expectedResponse: &AuthServer{}, - }, - "it returns an error if there is a problem finding the app": { - id: int32(2), - repository: &test.MockRepository{}, - expectedResponse: nil, - expectedError: errors.New("error"), - }, - } - for name, test := range tests { - t.Run(name, func(t *testing.T) { - svc := New(test.repository, "test.com") - err := svc.Destroy(test.id) - if test.expectedError != nil { - assert.Equal(t, test.expectedError, err) - } else { - assert.Nil(t, err) - } - }) - } -} diff --git a/pkg/services/auth_servers/client_apps/client_apps_test.go b/pkg/services/auth_servers/client_apps/client_apps_test.go deleted file mode 100644 index 4de368c..0000000 --- a/pkg/services/auth_servers/client_apps/client_apps_test.go +++ /dev/null @@ -1,294 +0,0 @@ -package clientapps - -import ( - "encoding/json" - "errors" - "github.com/onelogin/onelogin-go-sdk/internal/test" - "github.com/onelogin/onelogin-go-sdk/pkg/oltypes" - "github.com/onelogin/onelogin-go-sdk/pkg/services/auth_servers/scopes" - - "github.com/stretchr/testify/assert" - "testing" -) - -func TestQuery(t *testing.T) { - tests := map[string]struct { - queryPayload *ClientAppsQuery - expectedResponse []ClientApp - expectedError error - repository *test.MockRepository - }{ - "It queries all clients assigend to an auth server": { - queryPayload: &ClientAppsQuery{AuthServerID: "1"}, - expectedResponse: []ClientApp{ - ClientApp{ - ID: oltypes.Int32(int32(1)), - AuthServerID: oltypes.Int32(int32(1)), - APIAuthID: oltypes.Int32(int32(1)), - Name: oltypes.String("name"), - Scopes: []scopes.Scope{ - scopes.Scope{ - ID: oltypes.Int32(int32(1)), - AuthServerID: oltypes.Int32(int32(1)), - Value: oltypes.String("value"), - Description: oltypes.String("description"), - }, - scopes.Scope{ - ID: oltypes.Int32(int32(2)), - AuthServerID: oltypes.Int32(int32(1)), - Value: oltypes.String("value"), - Description: oltypes.String("description"), - }, - }, - }, - ClientApp{ - ID: oltypes.Int32(int32(2)), - AuthServerID: oltypes.Int32(int32(1)), - APIAuthID: oltypes.Int32(int32(1)), - Name: oltypes.String("name"), - Scopes: []scopes.Scope{ - scopes.Scope{ - ID: oltypes.Int32(int32(3)), - AuthServerID: oltypes.Int32(int32(1)), - Value: oltypes.String("value"), - Description: oltypes.String("description"), - }, - scopes.Scope{ - ID: oltypes.Int32(int32(4)), - AuthServerID: oltypes.Int32(int32(1)), - Value: oltypes.String("value"), - Description: oltypes.String("description"), - }, - }, - }, - }, - repository: &test.MockRepository{ - ReadFunc: func(r interface{}) ([][]byte, error) { - b, err := json.Marshal([]ClientApp{ - ClientApp{ - ID: oltypes.Int32(int32(1)), - AuthServerID: oltypes.Int32(int32(1)), - APIAuthID: oltypes.Int32(int32(1)), - Name: oltypes.String("name"), - Scopes: []scopes.Scope{ - scopes.Scope{ - ID: oltypes.Int32(int32(1)), - AuthServerID: oltypes.Int32(int32(1)), - Value: oltypes.String("value"), - Description: oltypes.String("description"), - }, - scopes.Scope{ - ID: oltypes.Int32(int32(2)), - AuthServerID: oltypes.Int32(int32(1)), - Value: oltypes.String("value"), - Description: oltypes.String("description"), - }, - }, - }, - ClientApp{ - ID: oltypes.Int32(int32(2)), - AuthServerID: oltypes.Int32(int32(1)), - APIAuthID: oltypes.Int32(int32(1)), - Name: oltypes.String("name"), - Scopes: []scopes.Scope{ - scopes.Scope{ - ID: oltypes.Int32(int32(3)), - AuthServerID: oltypes.Int32(int32(1)), - Value: oltypes.String("value"), - Description: oltypes.String("description"), - }, - scopes.Scope{ - ID: oltypes.Int32(int32(4)), - AuthServerID: oltypes.Int32(int32(1)), - Value: oltypes.String("value"), - Description: oltypes.String("description"), - }, - }, - }, - }) - return [][]byte{b}, err - }, - }, - }, - "it reports an error": { - queryPayload: &ClientAppsQuery{AuthServerID: "1"}, - expectedError: errors.New("error"), - repository: &test.MockRepository{ - ReadFunc: func(r interface{}) ([][]byte, error) { - return nil, errors.New("error") - }, - }, - }, - } - for name, test := range tests { - t.Run(name, func(t *testing.T) { - svc := New(test.repository, "test.com") - clients, err := svc.Query(test.queryPayload) - if test.expectedError != nil { - assert.Equal(t, test.expectedError, err) - } else { - assert.Equal(t, test.expectedResponse, clients) - } - }) - } -} - -func TestCreate(t *testing.T) { - tests := map[string]struct { - payload *ClientApp - expectedError error - expectedResponse *ClientApp - repository *test.MockRepository - }{ - "it creates a client and associates it with an auth server": { - payload: &ClientApp{ - AuthServerID: oltypes.Int32(int32(1)), - Name: oltypes.String("name"), - ScopeIDs: []int32{int32(1), int32(2)}, - }, - expectedResponse: &ClientApp{ - ID: oltypes.Int32(int32(1)), - AuthServerID: oltypes.Int32(int32(1)), - APIAuthID: oltypes.Int32(int32(1)), - Name: oltypes.String("name"), - ScopeIDs: []int32{int32(1), int32(2)}, - }, - repository: &test.MockRepository{ - CreateFunc: func(r interface{}) ([]byte, error) { - return json.Marshal(map[string]int32{"app_id": int32(1), "api_auth_id": int32(1)}) - }, - }, - }, - "it errs out if parent ID not given on payload": { - payload: &ClientApp{ - Name: oltypes.String("name"), - ScopeIDs: []int32{int32(1), int32(2)}, - }, - expectedError: errors.New("AuthServerID required on the payload"), - }, - "it returns an error": { - payload: &ClientApp{ - AuthServerID: oltypes.Int32(int32(1)), - APIAuthID: oltypes.Int32(int32(1)), - Name: oltypes.String("name"), - ScopeIDs: []int32{int32(3), int32(4)}, - }, - expectedError: errors.New("error"), - repository: &test.MockRepository{ - CreateFunc: func(r interface{}) ([]byte, error) { - return nil, errors.New("error") - }, - }, - }, - } - for name, test := range tests { - t.Run(name, func(t *testing.T) { - svc := New(test.repository, "test.com") - err := svc.Create(test.payload) - if test.expectedError != nil { - assert.Equal(t, test.expectedError, err) - } else { - assert.Equal(t, test.expectedResponse, test.payload) - } - }) - } -} - -func TestUpdate(t *testing.T) { - tests := map[string]struct { - authServerID int32 - payload *ClientApp - expectedError error - expectedResponse *ClientApp - repository *test.MockRepository - }{ - "it updates a client": { - payload: &ClientApp{ - ID: oltypes.Int32(int32(1)), - AuthServerID: oltypes.Int32(int32(1)), - Name: oltypes.String("name"), - ScopeIDs: []int32{int32(3), int32(4)}, - }, - expectedResponse: &ClientApp{ - ID: oltypes.Int32(int32(1)), - AuthServerID: oltypes.Int32(int32(1)), - APIAuthID: oltypes.Int32(int32(1)), - Name: oltypes.String("name"), - ScopeIDs: []int32{int32(3), int32(4)}, - }, - repository: &test.MockRepository{ - UpdateFunc: func(r interface{}) ([]byte, error) { - return json.Marshal(map[string]int32{"app_id": int32(1), "api_auth_id": int32(1)}) - }, - }, - }, - "it reports an error": { - payload: &ClientApp{ - ID: oltypes.Int32(int32(1)), - AuthServerID: oltypes.Int32(int32(1)), - Name: oltypes.String("name"), - ScopeIDs: []int32{int32(3), int32(4)}, - }, - expectedError: errors.New("error"), - repository: &test.MockRepository{ - UpdateFunc: func(r interface{}) ([]byte, error) { - return nil, errors.New("error") - }, - }, - }, - "it reports an error if no parent resource id given": { - payload: &ClientApp{ - ID: oltypes.Int32(int32(1)), - Name: oltypes.String("name"), - ScopeIDs: []int32{int32(3), int32(4)}, - }, - expectedError: errors.New("Both ID and AuthServerID are required on the payload"), - }, - } - for name, test := range tests { - t.Run(name, func(t *testing.T) { - svc := New(test.repository, "test.com") - err := svc.Update(test.payload) - if test.expectedError != nil { - assert.Equal(t, test.expectedError, err) - } else { - assert.Equal(t, test.expectedResponse, test.payload) - } - }) - } -} - -func TestDestroy(t *testing.T) { - tests := map[string]struct { - authServerID, clientID int32 - expectedError error - repository *test.MockRepository - }{ - "it deletes a client": { - authServerID: int32(1), - clientID: int32(1), - repository: &test.MockRepository{ - DestroyFunc: func(r interface{}) ([]byte, error) { - return nil, nil - }, - }, - }, - "it reports an error": { - clientID: int32(1), - repository: &test.MockRepository{ - DestroyFunc: func(r interface{}) ([]byte, error) { - return nil, errors.New("error") - }, - }, - }, - } - for name, test := range tests { - t.Run(name, func(t *testing.T) { - svc := New(test.repository, "test.com") - err := svc.Destroy(test.authServerID, test.clientID) - if test.expectedError != nil { - assert.Equal(t, test.expectedError, err) - } - }) - } -} diff --git a/pkg/services/auth_servers/client_apps/model.go b/pkg/services/auth_servers/client_apps/model.go deleted file mode 100644 index f103909..0000000 --- a/pkg/services/auth_servers/client_apps/model.go +++ /dev/null @@ -1,16 +0,0 @@ -package clientapps - -import "github.com/onelogin/onelogin-go-sdk/pkg/services/auth_servers/scopes" - -type ClientAppsQuery struct { - AuthServerID string -} - -type ClientApp struct { - ID *int32 `json:"app_id,omitempty"` - AuthServerID *int32 `json:"auth_server_id,omitempty"` - APIAuthID *int32 `json:"api_auth_id,omitempty"` - Name *string `json:"name,omitempty"` - Scopes []scopes.Scope `json:"scopes,omitempty"` - ScopeIDs []int32 `json:"scope_ids,omitempty"` -} diff --git a/pkg/services/auth_servers/client_apps/v2.go b/pkg/services/auth_servers/client_apps/v2.go deleted file mode 100644 index e7e1e88..0000000 --- a/pkg/services/auth_servers/client_apps/v2.go +++ /dev/null @@ -1,113 +0,0 @@ -package clientapps - -import ( - "encoding/json" - "errors" - "fmt" - - "github.com/onelogin/onelogin-go-sdk/pkg/oltypes" - "github.com/onelogin/onelogin-go-sdk/pkg/services" - "github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp" -) - -const errAppsV2Context = "access token claims v2 service" - -// V2Service holds the information needed to interface with a repository -type V2Service struct { - Endpoint, ErrorContext string - Repository services.Repository -} - -// New creates the new svc service v2. -func New(repo services.Repository, host string) *V2Service { - return &V2Service{ - Endpoint: fmt.Sprintf("%s/api/2/api_authorizations", host), - Repository: repo, - ErrorContext: errAppsV2Context, - } -} - -// Query retrieves all the access token claims from the repository that meet the query criteria passed in the -// request payload. If an empty payload is given, it will retrieve all access token claims. -func (svc *V2Service) Query(query *ClientAppsQuery) ([]ClientApp, error) { - resp, err := svc.Repository.Read(olhttp.OLHTTPRequest{ - URL: fmt.Sprintf("%s/%s/clients", svc.Endpoint, query.AuthServerID), - Headers: map[string]string{"Content-Type": "application/json"}, - AuthMethod: "bearer", - }) - if err != nil { - return nil, err - } - - var clients []ClientApp - for _, bytes := range resp { - var unmarshalled []ClientApp - json.Unmarshal(bytes, &unmarshalled) - clients = append(clients, unmarshalled...) - } - return clients, nil -} - -// Create creates a new access token claim in place and returns an error if something went wrong -func (svc *V2Service) Create(clientApp *ClientApp) error { - if clientApp.AuthServerID == nil { - return errors.New("AuthServerID required on the payload") - } - resp, err := svc.Repository.Create(olhttp.OLHTTPRequest{ - URL: fmt.Sprintf("%s/%d/clients", svc.Endpoint, *clientApp.AuthServerID), - Headers: map[string]string{"Content-Type": "application/json"}, - AuthMethod: "bearer", - Payload: clientApp, - }) - if err != nil { - return err - } - - respObj := map[string]int32{} - json.Unmarshal(resp, &respObj) - clientApp.ID = oltypes.Int32(respObj["app_id"]) - clientApp.APIAuthID = oltypes.Int32(respObj["api_auth_id"]) - - return nil -} - -// Update updates an existing access token claim in place or returns an error if something went wrong -func (svc *V2Service) Update(clientApp *ClientApp) error { - if clientApp.ID == nil || clientApp.AuthServerID == nil { - return errors.New("Both ID and AuthServerID are required on the payload") - } - resp, err := svc.UpdateRaw(*clientApp.AuthServerID, *clientApp.ID, clientApp) - if err != nil { - return err - } - - respObj := map[string]int32{} - json.Unmarshal(resp, &respObj) - clientApp.ID = oltypes.Int32(respObj["app_id"]) - clientApp.APIAuthID = oltypes.Int32(respObj["api_auth_id"]) - - return nil -} - -// UpdateRaw updates an existing access token claim and returns the raw response or an error if something went wrong -func (svc *V2Service) UpdateRaw(authServerId int32, appId int32, clientApp interface{}) ([]byte, error) { - return svc.Repository.Update(olhttp.OLHTTPRequest{ - URL: fmt.Sprintf("%s/%d/clients/%d", svc.Endpoint, authServerId, appId), - Headers: map[string]string{"Content-Type": "application/json"}, - AuthMethod: "bearer", - Payload: clientApp, - }) -} - -// Destroy takes the access token claim id and access token claim id and removes the access token claim from the API. -// Returns an error if something went wrong. -func (svc *V2Service) Destroy(clientId int32, id int32) error { - if _, err := svc.Repository.Destroy(olhttp.OLHTTPRequest{ - URL: fmt.Sprintf("%s/%d/clients/%d", svc.Endpoint, clientId, id), - Headers: map[string]string{"Content-Type": "application/json"}, - AuthMethod: "bearer", - }); err != nil { - return err - } - return nil -} diff --git a/pkg/services/auth_servers/model.go b/pkg/services/auth_servers/model.go deleted file mode 100644 index fa64a9e..0000000 --- a/pkg/services/auth_servers/model.go +++ /dev/null @@ -1,22 +0,0 @@ -package authservers - -type AuthServerQuery struct { - Name string `json:"name,omitempty"` - Limit string - Page string - Cursor string -} - -type AuthServer struct { - ID *int32 `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Description *string `json:"description,omitempty"` - Configuration *AuthServerConfiguration `json:"configuration,omitempty"` -} - -type AuthServerConfiguration struct { - ResourceIdentifier *string `json:"resource_identifier,omitempty"` - Audiences []string `json:"audiences,omitempty"` - AccessTokenExpirationMinutes *int32 `json:"access_token_expiration_minutes,omitempty"` - RefreshTokenExpirationMinutes *int32 `json:"refresh_token_expiration_minutes,omitempty"` -} diff --git a/pkg/services/auth_servers/scopes/model.go b/pkg/services/auth_servers/scopes/model.go deleted file mode 100644 index f396b9f..0000000 --- a/pkg/services/auth_servers/scopes/model.go +++ /dev/null @@ -1,12 +0,0 @@ -package scopes - -type ScopesQuery struct { - AuthServerID string -} - -type Scope struct { - ID *int32 `json:"id,omitempty"` - AuthServerID *int32 `json:"auth_server_id,omitempty"` - Value *string `json:"value,omitempty"` - Description *string `json:"description,omitempty"` -} diff --git a/pkg/services/auth_servers/scopes/scopes_test.go b/pkg/services/auth_servers/scopes/scopes_test.go deleted file mode 100644 index 5880360..0000000 --- a/pkg/services/auth_servers/scopes/scopes_test.go +++ /dev/null @@ -1,244 +0,0 @@ -package scopes - -import ( - "encoding/json" - "errors" - "github.com/onelogin/onelogin-go-sdk/internal/test" - "github.com/onelogin/onelogin-go-sdk/pkg/oltypes" - "github.com/stretchr/testify/assert" - "testing" -) - -func TestQuery(t *testing.T) { - tests := map[string]struct { - queryPayload *ScopesQuery - expectedResponse []Scope - expectedError error - repository *test.MockRepository - }{ - "It queries all scopes assigend to an auth server": { - queryPayload: &ScopesQuery{AuthServerID: "1"}, - expectedResponse: []Scope{ - Scope{ - ID: oltypes.Int32(int32(1)), - AuthServerID: oltypes.Int32(int32(1)), - Value: oltypes.String("value"), - Description: oltypes.String("description"), - }, - Scope{ - ID: oltypes.Int32(int32(1)), - AuthServerID: oltypes.Int32(int32(1)), - Value: oltypes.String("value"), - Description: oltypes.String("description"), - }, - }, - repository: &test.MockRepository{ - ReadFunc: func(r interface{}) ([][]byte, error) { - b, err := json.Marshal([]Scope{ - Scope{ - ID: oltypes.Int32(int32(1)), - AuthServerID: oltypes.Int32(int32(1)), - Value: oltypes.String("value"), - Description: oltypes.String("description"), - }, - Scope{ - ID: oltypes.Int32(int32(1)), - AuthServerID: oltypes.Int32(int32(1)), - Value: oltypes.String("value"), - Description: oltypes.String("description"), - }, - }) - return [][]byte{b}, err - }, - }, - }, - "it reports an error": { - queryPayload: &ScopesQuery{AuthServerID: "1"}, - expectedError: errors.New("error"), - repository: &test.MockRepository{ - ReadFunc: func(r interface{}) ([][]byte, error) { - return nil, errors.New("error") - }, - }, - }, - } - for name, test := range tests { - t.Run(name, func(t *testing.T) { - svc := New(test.repository, "test.com") - scopes, err := svc.Query(test.queryPayload) - if test.expectedError != nil { - assert.Equal(t, test.expectedError, err) - } else { - assert.Equal(t, test.expectedResponse, scopes) - } - }) - } -} - -func TestCreate(t *testing.T) { - tests := map[string]struct { - payload *Scope - expectedError error - expectedResponse *Scope - repository *test.MockRepository - }{ - "it creates a scope and associates it with an auth server": { - payload: &Scope{ - AuthServerID: oltypes.Int32(int32(1)), - Value: oltypes.String("value"), - Description: oltypes.String("description"), - }, - expectedResponse: &Scope{ - ID: oltypes.Int32(int32(1)), - AuthServerID: oltypes.Int32(int32(1)), - Value: oltypes.String("value"), - Description: oltypes.String("description"), - }, - repository: &test.MockRepository{ - CreateFunc: func(r interface{}) ([]byte, error) { - return json.Marshal(map[string]int32{"id": int32(1)}) - }, - }, - }, - "it errs out if parent ID not given on payload": { - payload: &Scope{ - Value: oltypes.String("value"), - Description: oltypes.String("description"), - }, - expectedError: errors.New("AuthServerID required on the payload"), - repository: &test.MockRepository{ - CreateFunc: func(r interface{}) ([]byte, error) { - return json.Marshal(map[string]int32{"id": int32(1)}) - }, - }, - }, - "it returns an error": { - payload: &Scope{ - ID: oltypes.Int32(int32(1)), - AuthServerID: oltypes.Int32(int32(1)), - Value: oltypes.String("value"), - Description: oltypes.String("description"), - }, - expectedError: errors.New("error"), - repository: &test.MockRepository{ - CreateFunc: func(r interface{}) ([]byte, error) { - return nil, errors.New("error") - }, - }, - }, - } - for name, test := range tests { - t.Run(name, func(t *testing.T) { - svc := New(test.repository, "test.com") - err := svc.Create(test.payload) - if test.expectedError != nil { - assert.Equal(t, test.expectedError, err) - } else { - assert.Equal(t, test.expectedResponse, test.payload) - } - }) - } -} - -func TestUpdate(t *testing.T) { - tests := map[string]struct { - authServerID int32 - payload *Scope - expectedError error - expectedResponse *Scope - repository *test.MockRepository - }{ - "it updates a scope": { - payload: &Scope{ - ID: oltypes.Int32(int32(1)), - AuthServerID: oltypes.Int32(int32(1)), - Value: oltypes.String("value"), - Description: oltypes.String("description"), - }, - expectedResponse: &Scope{ - ID: oltypes.Int32(int32(1)), - AuthServerID: oltypes.Int32(int32(1)), - Value: oltypes.String("value"), - Description: oltypes.String("description"), - }, - repository: &test.MockRepository{ - UpdateFunc: func(r interface{}) ([]byte, error) { - return json.Marshal(map[string]int32{"id": int32(1)}) - }, - }, - }, - "it reports an error": { - payload: &Scope{ - ID: oltypes.Int32(int32(1)), - AuthServerID: oltypes.Int32(int32(1)), - Value: oltypes.String("value"), - Description: oltypes.String("description"), - }, - expectedError: errors.New("error"), - repository: &test.MockRepository{ - UpdateFunc: func(r interface{}) ([]byte, error) { - return nil, errors.New("error") - }, - }, - }, - "it reports an error if no parent resource id given": { - payload: &Scope{ - ID: oltypes.Int32(int32(1)), - Value: oltypes.String("value"), - Description: oltypes.String("description"), - }, - expectedError: errors.New("Both ID and AuthServerID are required on the payload"), - repository: &test.MockRepository{ - UpdateFunc: func(r interface{}) ([]byte, error) { - return nil, errors.New("error") - }, - }, - }, - } - for name, test := range tests { - t.Run(name, func(t *testing.T) { - svc := New(test.repository, "test.com") - err := svc.Update(test.payload) - if test.expectedError != nil { - assert.Equal(t, test.expectedError, err) - } else { - assert.Equal(t, test.expectedResponse, test.payload) - } - }) - } -} - -func TestDestroy(t *testing.T) { - tests := map[string]struct { - authServerID, scopeID int32 - expectedError error - repository *test.MockRepository - }{ - "it deletes a scope": { - authServerID: int32(1), - scopeID: int32(1), - repository: &test.MockRepository{ - DestroyFunc: func(r interface{}) ([]byte, error) { - return nil, nil - }, - }, - }, - "it reports an error": { - scopeID: int32(1), - repository: &test.MockRepository{ - DestroyFunc: func(r interface{}) ([]byte, error) { - return nil, errors.New("error") - }, - }, - }, - } - for name, test := range tests { - t.Run(name, func(t *testing.T) { - svc := New(test.repository, "test.com") - err := svc.Destroy(test.authServerID, test.scopeID) - if test.expectedError != nil { - assert.Equal(t, test.expectedError, err) - } - }) - } -} diff --git a/pkg/services/auth_servers/scopes/v2.go b/pkg/services/auth_servers/scopes/v2.go deleted file mode 100644 index a67499b..0000000 --- a/pkg/services/auth_servers/scopes/v2.go +++ /dev/null @@ -1,104 +0,0 @@ -package scopes - -import ( - "encoding/json" - "errors" - "fmt" - - "github.com/onelogin/onelogin-go-sdk/pkg/oltypes" - "github.com/onelogin/onelogin-go-sdk/pkg/services" - "github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp" -) - -const errAppsV2Context = "access token claims v2 service" - -// V2Service holds the information needed to interface with a repository -type V2Service struct { - Endpoint, ErrorContext string - Repository services.Repository -} - -// New creates the new svc service v2. -func New(repo services.Repository, host string) *V2Service { - return &V2Service{ - Endpoint: fmt.Sprintf("%s/api/2/api_authorizations", host), - Repository: repo, - ErrorContext: errAppsV2Context, - } -} - -// Query retrieves all the access token claims from the repository that meet the query criteria passed in the -// request payload. If an empty payload is given, it will retrieve all access token claims. -func (svc *V2Service) Query(query *ScopesQuery) ([]Scope, error) { - resp, err := svc.Repository.Read(olhttp.OLHTTPRequest{ - URL: fmt.Sprintf("%s/%s/scopes", svc.Endpoint, query.AuthServerID), - Headers: map[string]string{"Content-Type": "application/json"}, - AuthMethod: "bearer", - }) - if err != nil { - return nil, err - } - - var scopes []Scope - for _, bytes := range resp { - var unmarshalled []Scope - json.Unmarshal(bytes, &unmarshalled) - scopes = append(scopes, unmarshalled...) - } - return scopes, nil -} - -// Create creates a new access token claim in place and returns an error if something went wrong -func (svc *V2Service) Create(scope *Scope) error { - if scope.AuthServerID == nil { - return errors.New("AuthServerID required on the payload") - } - resp, err := svc.Repository.Create(olhttp.OLHTTPRequest{ - URL: fmt.Sprintf("%s/%d/scopes", svc.Endpoint, *scope.AuthServerID), - Headers: map[string]string{"Content-Type": "application/json"}, - AuthMethod: "bearer", - Payload: scope, - }) - if err != nil { - return err - } - respObj := map[string]int32{} - json.Unmarshal(resp, &respObj) - scope.ID = oltypes.Int32(respObj["id"]) - return nil -} - -// Update updates an existing access token claim in place or returns an error if something went wrong -func (svc *V2Service) Update(scope *Scope) error { - if scope.ID == nil || scope.AuthServerID == nil { - return errors.New("Both ID and AuthServerID are required on the payload") - } - _, err := svc.UpdateRaw(*scope.AuthServerID, *scope.ID, scope) - if err != nil { - return err - } - return nil -} - -// UpdateRaw updates an existing access token claim and returns the raw response or an error if something went wrong -func (svc *V2Service) UpdateRaw(authServerId int32, scopeId int32, scope interface{}) ([]byte, error) { - return svc.Repository.Update(olhttp.OLHTTPRequest{ - URL: fmt.Sprintf("%s/%d/scopes/%d", svc.Endpoint, authServerId, scopeId), - Headers: map[string]string{"Content-Type": "application/json"}, - AuthMethod: "bearer", - Payload: scope, - }) -} - -// Destroy takes the access token claim id and access token claim id and removes the access token claim from the API. -// Returns an error if something went wrong. -func (svc *V2Service) Destroy(scopeId int32, id int32) error { - if _, err := svc.Repository.Destroy(olhttp.OLHTTPRequest{ - URL: fmt.Sprintf("%s/%d/scopes/%d", svc.Endpoint, scopeId, id), - Headers: map[string]string{"Content-Type": "application/json"}, - AuthMethod: "bearer", - }); err != nil { - return err - } - return nil -} diff --git a/pkg/services/auth_servers/v2.go b/pkg/services/auth_servers/v2.go deleted file mode 100644 index 7d8d3db..0000000 --- a/pkg/services/auth_servers/v2.go +++ /dev/null @@ -1,123 +0,0 @@ -package authservers - -import ( - "encoding/json" - "errors" - "fmt" - - "github.com/onelogin/onelogin-go-sdk/pkg/oltypes" - "github.com/onelogin/onelogin-go-sdk/pkg/services" - "github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp" -) - -const errAuthServersV2Context = "auth_servers v2 service" - -// V2Service holds the information needed to interface with a repository -type V2Service struct { - Endpoint, ErrorContext string - Repository services.Repository -} - -// New creates the new svc service v2. -func New(repo services.Repository, host string) *V2Service { - return &V2Service{ - Endpoint: fmt.Sprintf("%s/api/2/api_authorizations", host), - Repository: repo, - ErrorContext: errAuthServersV2Context, - } -} - -// Query retrieves all the auth_servers from the repository that meet the query criteria passed in the -// request payload. If an empty payload is given, it will retrieve all auth_servers -func (svc *V2Service) Query(query *AuthServerQuery) ([]AuthServer, error) { - resp, err := svc.Repository.Read(olhttp.OLHTTPRequest{ - URL: svc.Endpoint, - Headers: map[string]string{"Content-Type": "application/json"}, - AuthMethod: "bearer", - Payload: query, - }) - if err != nil { - return nil, err - } - - var auth_servers []AuthServer - for _, bytes := range resp { - var unmarshalled []AuthServer - json.Unmarshal(bytes, &unmarshalled) - auth_servers = append(auth_servers, unmarshalled...) - } - - return auth_servers, nil -} - -// GetOne retrieves the authServer by id and returns it -func (svc *V2Service) GetOne(id int32) (*AuthServer, error) { - resp, err := svc.Repository.Read(olhttp.OLHTTPRequest{ - URL: fmt.Sprintf("%s/%d", svc.Endpoint, id), - Headers: map[string]string{"Content-Type": "application/json"}, - AuthMethod: "bearer", - }) - if err != nil { - return nil, err - } - var authServer AuthServer - if len(resp) < 1 { - return nil, errors.New("invalid length of response returned") - } - json.Unmarshal(resp[0], &authServer) - return &authServer, nil -} - -// Create takes a authServer without an id and attempts to use the parameters to create it -// in the API. Modifies the authServer in place, or returns an error if one occurs -func (svc *V2Service) Create(authServer *AuthServer) error { - resp, err := svc.Repository.Create(olhttp.OLHTTPRequest{ - URL: svc.Endpoint, - Headers: map[string]string{"Content-Type": "application/json"}, - AuthMethod: "bearer", - Payload: authServer, - }) - if err != nil { - return err - } - respObj := map[string]int32{} - json.Unmarshal(resp, &respObj) - authServer.ID = oltypes.Int32(respObj["id"]) - return nil -} - -// Update takes a authServer and an id and attempts to use the parameters to update it -// in the API. Modifies the authServer in place, or returns an error if one occurs -func (svc *V2Service) Update(authServer *AuthServer) error { - if authServer.ID == nil { - return errors.New("No ID Given") - } - _, err := svc.UpdateRaw(*authServer.ID, authServer) - if err != nil { - return err - } - return nil -} - -// UpdateRaw takes a authServer and an id and attempts to use the parameters to update it -// in the API. Returns the raw response, or an error if one occurs -func (svc *V2Service) UpdateRaw(id int32, authServer interface{}) ([]byte, error) { - return svc.Repository.Update(olhttp.OLHTTPRequest{ - URL: fmt.Sprintf("%s/%d", svc.Endpoint, id), - Headers: map[string]string{"Content-Type": "application/json"}, - AuthMethod: "bearer", - Payload: authServer, - }) -} - -// Destroy deletes the authServer with the given id, and if successful, it returns nil -func (svc *V2Service) Destroy(id int32) error { - if _, err := svc.Repository.Destroy(olhttp.OLHTTPRequest{ - URL: fmt.Sprintf("%s/%d", svc.Endpoint, id), - Headers: map[string]string{"Content-Type": "application/json"}, - AuthMethod: "bearer", - }); err != nil { - return err - } - return nil -} diff --git a/pkg/services/interfaces.go b/pkg/services/interfaces.go deleted file mode 100644 index d97f014..0000000 --- a/pkg/services/interfaces.go +++ /dev/null @@ -1,33 +0,0 @@ -package services - -import "net/http" - -// Repository is a thing that stores and retireves data using these methods. This -// could represent a HTTP backend service or a local database or file where business -// entities live such as apps or users -type Repository interface { - Create(r interface{}) ([]byte, error) - Read(r interface{}) ([][]byte, error) - Update(r interface{}) ([]byte, error) - Destroy(r interface{}) ([]byte, error) -} - -type SimpleQuery interface { - Query(address string, o interface{}) error -} - -type ResponseData struct { - Data interface{} -} - -// HTTPClient is a thing that implements the Do method. This enables mocking a -// HTTPService's Client for testing -type HTTPClient interface { - Do(req *http.Request) (*http.Response, error) -} - -// HTTPServiceConfig Represents configuration information needed to work with an authenticated HTTP remote service -type HTTPServiceConfig struct { - ClientID, ClientSecret, BaseURL string - Client HTTPClient -} diff --git a/pkg/services/legal_values/legal_values.go b/pkg/services/legal_values/legal_values.go deleted file mode 100644 index 5157c70..0000000 --- a/pkg/services/legal_values/legal_values.go +++ /dev/null @@ -1,45 +0,0 @@ -package legalvalues - -import ( - "encoding/json" - "errors" - "fmt" - "github.com/onelogin/onelogin-go-sdk/pkg/services" - "github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp" -) - -const errLegalValuesContext = "legal values service" - -// V2Service holds the information needed to interface with a repository -type LegalValuesService struct { - BaseURL, ErrorContext string - Repository services.Repository -} - -// New creates the new svc service v2. -func New(repo services.Repository, host string) *LegalValuesService { - return &LegalValuesService{ - BaseURL: fmt.Sprintf("%s/api/2", host), - Repository: repo, - ErrorContext: errLegalValuesContext, - } -} - -func (svc *LegalValuesService) Query(address string, outShape interface{}) error { - respBytes, err := svc.Repository.Read(olhttp.OLHTTPRequest{ - AuthMethod: "bearer", - URL: fmt.Sprintf("%s/%s", svc.BaseURL, address), - Headers: map[string]string{"Content-Type": "application/json"}, - }) - if err != nil { - return err - } - - for _, respByte := range respBytes { - if err := json.Unmarshal(respByte, outShape); err != nil { - return errors.New("Unable to unpack response") - } - } - - return nil -} diff --git a/pkg/services/legal_values/legal_values_test.go b/pkg/services/legal_values/legal_values_test.go deleted file mode 100644 index b82efa0..0000000 --- a/pkg/services/legal_values/legal_values_test.go +++ /dev/null @@ -1,56 +0,0 @@ -package legalvalues - -import ( - "encoding/json" - "errors" - "github.com/onelogin/onelogin-go-sdk/internal/test" - "github.com/stretchr/testify/assert" - "testing" -) - -func TestGetLegalValues(t *testing.T) { - tests := map[string]struct { - TestClient *test.MockRepository - ExpectedOut []map[string]string - ExpectedError error - }{ - "retrieves list of legal values": { - TestClient: &test.MockRepository{ - ReadFunc: func(r interface{}) ([][]byte, error) { - b, err := json.Marshal([]map[string]string{{"key": "key", "value": "value"}, {"key": "key2", "value": "value2"}}) - return [][]byte{b}, err - }, - }, - ExpectedOut: []map[string]string{{"key": "key", "value": "value"}, {"key": "key2", "value": "value2"}}, - }, - "returns an empty array and error when api call fails": { - TestClient: &test.MockRepository{ - ReadFunc: func(r interface{}) ([][]byte, error) { - return nil, errors.New("error") - }, - }, - ExpectedOut: []map[string]string{}, - ExpectedError: errors.New("error"), - }, - "returns an empty array and error when api response is not expected shape": { - TestClient: &test.MockRepository{ - ReadFunc: func(r interface{}) ([][]byte, error) { - b, err := json.Marshal(map[string]string{"key": "key"}) - return [][]byte{b}, err - }, - }, - ExpectedOut: []map[string]string{}, - }, - } - for name, test := range tests { - t.Run(name, func(t *testing.T) { - svc := New(test.TestClient, "test.com") - actual := make([]map[string]string, 0) - err := svc.Query("stuff", &actual) - assert.Equal(t, test.ExpectedOut, actual) - if test.ExpectedError != nil { - assert.Equal(t, test.ExpectedError, err) - } - }) - } -} diff --git a/pkg/services/olhttp/model.go b/pkg/services/olhttp/model.go deleted file mode 100644 index 3dddfe0..0000000 --- a/pkg/services/olhttp/model.go +++ /dev/null @@ -1,23 +0,0 @@ -package olhttp - -type OLHTTPRequest struct { - URL string - AuthMethod string - Headers map[string]string - Payload interface{} -} - -// AuthBody is the request payload for authorization. -type AuthBody struct { - GrantType string `json:"grant_type"` -} - -// ClientCredential is the authorization response payload. -type ClientCredential struct { - AccessToken *string `json:"access_token,omitempty"` - CreatedAt *string `json:"created_at,omitempty"` - ExpiresIn *int32 `json:"expires_in,omitempty"` - RefreshToken *string `json:"refresh_token,omitempty"` - TokenType *string `json:"token_type,omitempty"` - AccountID *int32 `json:"account_id,omitempty"` -} diff --git a/pkg/services/olhttp/olrequest.go b/pkg/services/olhttp/olrequest.go deleted file mode 100644 index 5f18de9..0000000 --- a/pkg/services/olhttp/olrequest.go +++ /dev/null @@ -1,279 +0,0 @@ -package olhttp - -import ( - "bytes" - "encoding/json" - "errors" - "fmt" - "io/ioutil" - "log" - "net/http" - "os" - "strings" - - "github.com/onelogin/onelogin-go-sdk/internal/customerrors" - "github.com/onelogin/onelogin-go-sdk/pkg/services" - "github.com/onelogin/onelogin-go-sdk/pkg/utils" -) - -const resourceRequestuestContext = "ol http service" - -var errInvalidRequestInput = errors.New("Invalid input for request creation") - -type OLHTTPService struct { - ErrorContext string - Config services.HTTPServiceConfig - ClientCredential ClientCredential -} - -// New uses the cfg to generate the new auth service, and returns -// the created auth service for version 2. -func New(cfg services.HTTPServiceConfig) *OLHTTPService { - return &OLHTTPService{ - Config: cfg, - ErrorContext: resourceRequestuestContext, - ClientCredential: ClientCredential{}, - } -} - -// Read exectues the HTTP GET method with the given url and query parameters passed in the payload. -// It will retrieve all available resources from the remote, up to the specified "limit" if given, that meet the query criteria. -// This also implies that if a url is for one resource i.e. /resources/:id then only that resource will be returned - -// This assumes pagination is implemented using a After-Cursor response header and the Read method -// will use this until the remote stops responding with the After-Cursor header, indicating we have -// run out of pages. This is not to be confused with the Cursor header which can be set by the -// caller in the request to Read which will offset the remote query starting at that page. -func (svc OLHTTPService) Read(r interface{}) ([][]byte, error) { - resourceRequest := r.(OLHTTPRequest) - req, reqErr := http.NewRequest(http.MethodGet, resourceRequest.URL, nil) - if reqErr != nil { - return nil, customerrors.OneloginErrorWrapper(resourceRequestuestContext, reqErr) - } - - if resourceRequest.Payload != nil { - if err := attachQueryParameters(req, resourceRequest.Payload); err != nil { - return nil, err - } - } - - var ( - allData [][]byte - next string - ) - - if os.Getenv("OL_LOG_LEVEL") == "debug" { - log.Printf("[ONELOGIN HTTP DEBUG] Making Read Request to %s with parameters: %s \n", resourceRequest.URL, resourceRequest.Payload) - } - resp, data, err := svc.executeHTTP(req, resourceRequest) - if err != nil { - return [][]byte{}, err - } - for { - allData = append(allData, data) - next = resp.Header.Get("After-Cursor") - if next == "" { - break - } - params := req.URL.Query() - params.Set("cursor", next) - req.URL.RawQuery = params.Encode() - resp, data, err = svc.executeHTTP(req, resourceRequest) - - if err != nil { - return [][]byte{}, err - } - } - return allData, err -} - -// Create creates a new resource in the remote location over HTTP -func (svc OLHTTPService) Create(r interface{}) ([]byte, error) { - resourceRequest := r.(OLHTTPRequest) - var ( - req *http.Request - reqErr error - ) - if resourceRequest.Payload != nil { - bodyToSend, marshErr := json.Marshal(resourceRequest.Payload) - if marshErr != nil { - return nil, customerrors.OneloginErrorWrapper(resourceRequestuestContext, marshErr) - } - if os.Getenv("OL_LOG_LEVEL") == "debug" { - log.Printf("[ONELOGIN HTTP DEBUG] Making Create Request to %s with payload: %s \n", resourceRequest.URL, bodyToSend) - } - req, reqErr = http.NewRequest(http.MethodPost, resourceRequest.URL, bytes.NewBuffer(bodyToSend)) - } else { - if os.Getenv("OL_LOG_LEVEL") == "debug" { - log.Printf("[ONELOGIN HTTP DEBUG] Making Create Request to %s with no payload \n", resourceRequest.URL) - } - req, reqErr = http.NewRequest(http.MethodPost, resourceRequest.URL, bytes.NewBuffer([]byte(""))) - } - if reqErr != nil { - return nil, customerrors.OneloginErrorWrapper(resourceRequestuestContext, reqErr) - } - _, data, err := svc.executeHTTP(req, resourceRequest) - if err != nil { - return []byte{}, err - } - return data, err -} - -// Update updates a resource in its remote location over HTTP -func (svc OLHTTPService) Update(r interface{}) ([]byte, error) { - resourceRequest := r.(OLHTTPRequest) - var ( - req *http.Request - reqErr error - ) - if resourceRequest.Payload != nil { - bodyToSend, marshErr := json.Marshal(resourceRequest.Payload) - if marshErr != nil { - return nil, customerrors.OneloginErrorWrapper(resourceRequestuestContext, marshErr) - } - if os.Getenv("OL_LOG_LEVEL") == "debug" { - log.Printf("[ONELOGIN HTTP DEBUG] Making Update Request to %s with payload: %s \n", resourceRequest.URL, bodyToSend) - } - req, reqErr = http.NewRequest(http.MethodPut, resourceRequest.URL, bytes.NewBuffer(bodyToSend)) - } else { - if os.Getenv("OL_LOG_LEVEL") == "debug" { - log.Printf("[ONELOGIN HTTP DEBUG] Making Create Request to %s with no payload: \n", resourceRequest.URL) - } - req, reqErr = http.NewRequest(http.MethodPut, resourceRequest.URL, bytes.NewBuffer([]byte(""))) - } - if reqErr != nil { - return nil, customerrors.OneloginErrorWrapper(resourceRequestuestContext, reqErr) - } - _, data, err := svc.executeHTTP(req, resourceRequest) - if err != nil { - return []byte{}, err - } - return data, err -} - -// Destroy executes a HTTP destroy and removes the resource from its location in a remote -func (svc OLHTTPService) Destroy(r interface{}) ([]byte, error) { - resourceRequest := r.(OLHTTPRequest) - req, reqErr := http.NewRequest(http.MethodDelete, resourceRequest.URL, nil) - if reqErr != nil { - return nil, customerrors.OneloginErrorWrapper(resourceRequestuestContext, reqErr) - } - if os.Getenv("OL_LOG_LEVEL") == "debug" { - log.Printf("[ONELOGIN HTTP DEBUG] Making Delete Request to %s \n", resourceRequest.URL) - } - _, data, err := svc.executeHTTP(req, resourceRequest) - if err != nil { - return []byte{}, err - } - return data, err -} - -// creates a http query string from the request payload -func attachQueryParameters(req *http.Request, payload interface{}) error { - params := req.URL.Query() - b, err := json.Marshal(payload) - if err != nil { - return err - } - var m map[string]string - if err = json.Unmarshal(b, &m); err != nil { - return err - } - for k, v := range m { - if v != "" { - params.Add(utils.ToSnakeCase(k), v) - } - } - req.URL.RawQuery = params.Encode() - return nil -} - -// attaches http request headers supplied by caller and auth headers depending -// on the request's auth type (e.g. bearer or basic) -func (svc *OLHTTPService) attachHeaders(req *http.Request, resourceRequest OLHTTPRequest) error { - // set headers - for key, val := range resourceRequest.Headers { - req.Header.Set(key, val) - } - switch strings.ToLower(resourceRequest.AuthMethod) { - case "bearer": - if (svc.ClientCredential == ClientCredential{}) { - if err := setBearerToken(svc); err != nil { - return err - } - } - if svc.ClientCredential.AccessToken != nil { - req.Header.Set("Authorization", fmt.Sprintf("Bearer %s", *svc.ClientCredential.AccessToken)) - } - case "basic": - req.SetBasicAuth(svc.Config.ClientID, svc.Config.ClientSecret) - default: - // no auth headers - } - return nil -} - -// executes the http request, initiates retry on expired bearer tokens and returns the -// response's byte array resource representation -func (svc *OLHTTPService) executeHTTP(req *http.Request, resourceRequest OLHTTPRequest) (*http.Response, []byte, error) { - if err := svc.attachHeaders(req, resourceRequest); err != nil { - return nil, nil, err - } - resp, err := svc.Config.Client.Do(req) - if err != nil { - log.Println("Executing Request To", req.URL, "With", resourceRequest.Payload) - log.Println("HTTP Transport Error", err) - return nil, nil, customerrors.ReqErrorWrapper(resp, svc.ErrorContext, err) - } - responseData, err := ioutil.ReadAll(resp.Body) - if err != nil { - return nil, nil, customerrors.ReqErrorWrapper(resp, svc.ErrorContext, err) - } - defer resp.Body.Close() - - switch { - case resp.StatusCode == http.StatusUnauthorized, resp.StatusCode == http.StatusForbidden: - if resourceRequest.AuthMethod == "bearer" { - if err := setBearerToken(svc); err != nil { - return nil, nil, err - } - return svc.executeHTTP(req, resourceRequest) - } - return nil, nil, customerrors.OneloginErrorWrapper(svc.ErrorContext, errors.New("unauthorized")) - case resp.StatusCode >= 400 && resp.StatusCode <= 499: - return nil, nil, customerrors.OneloginErrorWrapper(svc.ErrorContext, errors.New(string(responseData))) - case resp.StatusCode >= 500 && resp.StatusCode <= 599: - return nil, nil, customerrors.OneloginErrorWrapper(svc.ErrorContext, errors.New("unable to connect")) - default: - return resp, responseData, nil - } -} - -// requests a fresh access token -func (svc *OLHTTPService) mintBearerToken() (ClientCredential, error) { - resp, err := svc.Create(OLHTTPRequest{ - URL: fmt.Sprintf("%s/auth/oauth2/v2/token", svc.Config.BaseURL), - Headers: map[string]string{"Content-Type": "application/json"}, - Payload: AuthBody{GrantType: "client_credentials"}, - AuthMethod: "basic", - }) - if err != nil { - return ClientCredential{}, err - } - - var output ClientCredential - if err = json.Unmarshal(resp, &output); err != nil { - return ClientCredential{}, err - } - return output, nil -} - -// force overwrite the service's memoized access token -func setBearerToken(svc *OLHTTPService) error { - cred, err := svc.mintBearerToken() - svc.ClientCredential = cred - if err != nil { - return err - } - return nil -} diff --git a/pkg/services/olhttp/olrequest_test.go b/pkg/services/olhttp/olrequest_test.go deleted file mode 100644 index 46749c0..0000000 --- a/pkg/services/olhttp/olrequest_test.go +++ /dev/null @@ -1,599 +0,0 @@ -package olhttp - -import ( - "bytes" - "encoding/json" - "errors" - "fmt" - "io/ioutil" - "math/rand" - "net/http" - "strconv" - "strings" - "testing" - - "github.com/onelogin/onelogin-go-sdk/internal/customerrors" - "github.com/onelogin/onelogin-go-sdk/pkg/oltypes" - "github.com/onelogin/onelogin-go-sdk/pkg/services" - "github.com/stretchr/testify/assert" -) - -type MockClient struct { - DoFunc func(req *http.Request) (*http.Response, error) -} - -func (c MockClient) Do(req *http.Request) (*http.Response, error) { - return c.DoFunc(req) -} - -type TestResource struct { - Name string `json:"name"` - ID string `json:"id"` -} - -type TestResourceQuery struct { - Name string `json:"name"` - Limit string `json:"limit"` -} - -var available = []TestResource{ - {ID: "0", Name: "name0"}, - {ID: "1", Name: "name1"}, - {ID: "2", Name: "name2"}, - {ID: "3", Name: "name3"}, -} - -func authPassThrough() (*http.Response, error) { - json := fmt.Sprintf("{\"access_token\":\"%d\"}", rand.Intn(100)) - r := ioutil.NopCloser(bytes.NewReader([]byte(json))) - return &http.Response{StatusCode: 200, Body: r}, nil -} -func authFailThrough() (*http.Response, error) { - json := `{"type":"Unauthorized"}` - r := ioutil.NopCloser(bytes.NewReader([]byte(json))) - return &http.Response{StatusCode: 401, Body: r}, nil -} - -// just query for the first one -func getOneByID(id int) (*http.Response, error) { - resource := available[id] - out, _ := json.Marshal(resource) - r := ioutil.NopCloser(bytes.NewReader([]byte(out))) - return &http.Response{StatusCode: 200, Body: r}, nil -} - -// get n items starting at offset o -func queryNResources(n int, o int) []TestResource { - var out []TestResource - for i := o; i < n+o; i++ { - out = append(out, available[i]) - } - return out -} - -func TestCreate(t *testing.T) { - tests := map[string]struct { - resourceRequest OLHTTPRequest - expectedOut TestResource - }{ - "Create with payload": { - resourceRequest: OLHTTPRequest{ - AuthMethod: "bearer", - URL: "test.com/test_resources", - Headers: map[string]string{"Content-Type": "application/json"}, - Payload: TestResource{Name: "test"}, - }, - expectedOut: TestResource{Name: "test", ID: "1"}, - }, - "Create without payload": { - resourceRequest: OLHTTPRequest{ - AuthMethod: "bearer", - Headers: map[string]string{"Content-Type": "application/json"}, - }, - expectedOut: TestResource{}, - }, - } - for name, test := range tests { - t.Run(name, func(t *testing.T) { - svc := New(services.HTTPServiceConfig{ - Client: MockClient{ - DoFunc: func(req *http.Request) (*http.Response, error) { - if req.URL.Path == "/auth/oauth2/v2/token" { - return authPassThrough() - } - if test.resourceRequest.Payload != nil { - tpl := test.resourceRequest.Payload.(TestResource) - tpl.ID = "1" - j, _ := json.Marshal(tpl) - r := ioutil.NopCloser(bytes.NewReader([]byte(j))) - return &http.Response{StatusCode: 200, Body: r}, nil - } - r := ioutil.NopCloser(bytes.NewReader([]byte{})) - return &http.Response{StatusCode: 200, Body: r}, nil - }, - }, - }) - actual, err := svc.Create(test.resourceRequest) - var actualOut TestResource - json.Unmarshal(actual, &actualOut) - assert.Equal(t, test.expectedOut, actualOut) - assert.Nil(t, err) - }) - } -} - -func TestRead(t *testing.T) { - tests := map[string]struct { - resourceRequest OLHTTPRequest - expectedReadOut TestResource - expectedQueryOut []TestResource - }{ - "Get n resources according to limit": { - resourceRequest: OLHTTPRequest{ - Payload: TestResourceQuery{Limit: "2"}, - AuthMethod: "bearer", - URL: "test.com/test_resources", - Headers: map[string]string{"Content-Type": "application/json"}, - }, - expectedQueryOut: []TestResource{ - {Name: "name0", ID: "0"}, - {Name: "name1", ID: "1"}, - }, - }, - "Read one by giving resource id in URL": { - resourceRequest: OLHTTPRequest{ - Payload: TestResourceQuery{}, - AuthMethod: "bearer", - URL: "test.com/test_resources/0", - Headers: map[string]string{"Content-Type": "application/json"}, - }, - expectedReadOut: TestResource{Name: "name0", ID: "0"}, - }, - "Read all if no limit, id or query given": { - resourceRequest: OLHTTPRequest{ - Payload: TestResourceQuery{}, - AuthMethod: "bearer", - URL: "test.com/test_resources", - Headers: map[string]string{"Content-Type": "application/json"}, - }, - expectedQueryOut: []TestResource{ - {Name: "name0", ID: "0"}, - {Name: "name1", ID: "1"}, - {Name: "name2", ID: "2"}, - {Name: "name3", ID: "3"}, - }, - }, - } - for name, test := range tests { - t.Run(name, func(t *testing.T) { - svc := New(services.HTTPServiceConfig{ - Client: MockClient{ - DoFunc: func(req *http.Request) (*http.Response, error) { - if req.URL.Path == "/auth/oauth2/v2/token" { - return authPassThrough() - } - parts := strings.Split(req.URL.Path, "/") - idstr := parts[len(parts)-1] - id, err := strconv.Atoi(idstr) - if err == nil { - return getOneByID(id) - } - tpl := test.resourceRequest.Payload.(TestResourceQuery) - if tpl.Limit != "" { - n, _ := strconv.Atoi(tpl.Limit) - resources := queryNResources(n, 0) - out, _ := json.Marshal(resources) - r := ioutil.NopCloser(bytes.NewReader([]byte(out))) - return &http.Response{StatusCode: 200, Body: r}, nil - } - - var resources []TestResource - - if req.URL.Query().Get("cursor") != "" { - resources = queryNResources(2, 2) - out, _ := json.Marshal(resources) - r := ioutil.NopCloser(bytes.NewReader([]byte(out))) - return &http.Response{StatusCode: 200, Body: r}, nil - } else { - resources = queryNResources(2, 0) - } - out, _ := json.Marshal(resources) - r := ioutil.NopCloser(bytes.NewReader([]byte(out))) - return &http.Response{StatusCode: 200, Body: r, Header: http.Header{"After-Cursor": []string{"asdf"}}}, nil - }, - }, - }) - - if test.expectedQueryOut != nil { - actuals, err := svc.Read(test.resourceRequest) - - var actualOut []TestResource - for _, actual := range actuals { - var thisOut []TestResource - err = json.Unmarshal(actual, &thisOut) - actualOut = append(actualOut, thisOut...) - } - - if err != nil { - fmt.Println("ASDF", name, err) - } - - assert.Equal(t, test.expectedQueryOut, actualOut) - assert.Nil(t, err) - } else { - actual, err := svc.Read(test.resourceRequest) - var actualOut TestResource - json.Unmarshal(actual[0], &actualOut) - assert.Equal(t, test.expectedReadOut, actualOut) - assert.Nil(t, err) - } - - }) - } -} - -func TestReadWithCursorError(t *testing.T) { - tests := map[string]struct { - resourceRequest OLHTTPRequest - expectedReadOut [][]byte - }{ - "Get n resources according to limit": { - resourceRequest: OLHTTPRequest{ - Payload: TestResourceQuery{Limit: "2"}, - AuthMethod: "bearer", - URL: "test.com/test_resources", - Headers: map[string]string{"Content-Type": "application/json"}, - }, - expectedReadOut: [][]byte{}, - }, - } - for name, test := range tests { - t.Run(name, func(t *testing.T) { - svc := New(services.HTTPServiceConfig{ - Client: MockClient{ - DoFunc: func(req *http.Request) (*http.Response, error) { - if req.URL.Path == "/auth/oauth2/v2/token" { - return authPassThrough() - } - - var resources []TestResource - - if req.URL.Query().Get("cursor") != "" { - resources = queryNResources(2, 2) - out, _ := json.Marshal(map[string]string{ - "message": "This is an error message", - }) - r := ioutil.NopCloser(bytes.NewReader([]byte(out))) - return &http.Response{StatusCode: 500, Body: r}, nil - } else { - resources = queryNResources(2, 0) - } - out, _ := json.Marshal(resources) - r := ioutil.NopCloser(bytes.NewReader([]byte(out))) - return &http.Response{StatusCode: 200, Body: r, Header: http.Header{"After-Cursor": []string{"asdf"}}}, nil - }, - }, - }) - - actual, err := svc.Read(test.resourceRequest) - assert.Equal(t, test.expectedReadOut, actual) - assert.NotNil(t, err) - - }) - } -} - -func TestUpdate(t *testing.T) { - tests := map[string]struct { - resourceRequest OLHTTPRequest - originalResource TestResource - expectedOut TestResource - }{ - "Update with payload": { - originalResource: TestResource{Name: "unchanged", ID: "1"}, - resourceRequest: OLHTTPRequest{ - AuthMethod: "bearer", - URL: "test.com/test_resources/1", - Headers: map[string]string{"Content-Type": "application/json"}, - Payload: TestResource{Name: "changed", ID: "1"}, - }, - expectedOut: TestResource{Name: "changed", ID: "1"}, - }, - "Update without payload": { - originalResource: TestResource{Name: "unchanged", ID: "1"}, - resourceRequest: OLHTTPRequest{ - AuthMethod: "bearer", - URL: "test.com/test_resources/1", - Headers: map[string]string{"Content-Type": "application/json"}, - }, - expectedOut: TestResource{Name: "unchanged", ID: "1"}, - }, - } - for name, test := range tests { - t.Run(name, func(t *testing.T) { - svc := New(services.HTTPServiceConfig{ - Client: MockClient{ - DoFunc: func(req *http.Request) (*http.Response, error) { - if req.URL.Path == "/auth/oauth2/v2/token" { - return authPassThrough() - } - if test.resourceRequest.Payload != nil { - tpl := test.resourceRequest.Payload.(TestResource) - tpl.Name = "changed" - j, _ := json.Marshal(tpl) - r := ioutil.NopCloser(bytes.NewReader([]byte(j))) - return &http.Response{StatusCode: 200, Body: r}, nil - } - tpl := test.originalResource - j, _ := json.Marshal(tpl) - r := ioutil.NopCloser(bytes.NewReader([]byte(j))) - return &http.Response{StatusCode: 200, Body: r}, nil - }, - }, - }) - actual, err := svc.Update(test.resourceRequest) - var actualOut TestResource - json.Unmarshal(actual, &actualOut) - assert.Equal(t, test.expectedOut, actualOut) - assert.Nil(t, err) - }) - } -} - -func TestDestroy(t *testing.T) { - tests := map[string]struct { - resourceRequest OLHTTPRequest - expectedOut TestResource - }{ - "Destroy": { - resourceRequest: OLHTTPRequest{AuthMethod: "bearer", URL: "test.com/test_resources/1"}, - expectedOut: TestResource{}, - }, - } - for name, test := range tests { - t.Run(name, func(t *testing.T) { - svc := New(services.HTTPServiceConfig{ - Client: MockClient{ - DoFunc: func(req *http.Request) (*http.Response, error) { - if req.URL.Path == "/auth/oauth2/v2/token" { - return authPassThrough() - } - r := ioutil.NopCloser(bytes.NewReader([]byte(``))) - return &http.Response{StatusCode: 200, Body: r}, nil - }, - }, - }) - actual, err := svc.Destroy(test.resourceRequest) - var actualOut TestResource - json.Unmarshal(actual, &actualOut) - assert.Equal(t, test.expectedOut, actualOut) - assert.Nil(t, err) - }) - } -} - -func TestExecuteHTTP(t *testing.T) { - tests := map[string]struct { - resourceRequest OLHTTPRequest - expectedError error - expectedOut TestResource - badRequest bool - serviceDown bool - staleToken bool - refreshTokenFail bool - badCredential bool - }{ - "attempts the request": { - resourceRequest: OLHTTPRequest{AuthMethod: "bearer", URL: "test.com/test_resources/1"}, - staleToken: false, - expectedOut: TestResource{Name: "name", ID: "1"}, - }, - "attempts bearer token refresh and retries the http request if auth fails and auth method is bearer token": { - resourceRequest: OLHTTPRequest{AuthMethod: "bearer", URL: "test.com/test_resources/1"}, - staleToken: true, - refreshTokenFail: false, - expectedOut: TestResource{Name: "name", ID: "1"}, - }, - "failed bearer token refresh gives unauthorized error": { - resourceRequest: OLHTTPRequest{AuthMethod: "bearer", URL: "test.com/test_resources/1"}, - staleToken: true, - refreshTokenFail: true, - expectedError: customerrors.OneloginErrorWrapper("ol http service", errors.New("unauthorized")), - }, - "unauthorized api request returns an error": { - resourceRequest: OLHTTPRequest{AuthMethod: "basic", URL: "test.com/test_resources/1"}, - badCredential: true, - expectedError: customerrors.OneloginErrorWrapper("ol http service", errors.New("unauthorized")), - }, - "bad api request returns an error": { - resourceRequest: OLHTTPRequest{AuthMethod: "basic", URL: "test.com/test_resources/1"}, - badRequest: true, - expectedError: customerrors.OneloginErrorWrapper("ol http service", errors.New("bad request")), - }, - "service down returns an error": { - resourceRequest: OLHTTPRequest{AuthMethod: "basic", URL: "test.com/test_resources/1"}, - serviceDown: true, - expectedError: customerrors.OneloginErrorWrapper("ol http service", errors.New("unable to connect")), - }, - } - for name, test := range tests { - t.Run(name, func(t *testing.T) { - svc := New(services.HTTPServiceConfig{ - Client: MockClient{ - DoFunc: func(req *http.Request) (*http.Response, error) { - if req.URL.Path == "/auth/oauth2/v2/token" { - if test.refreshTokenFail { - return authFailThrough() - } - return authPassThrough() - } - if test.staleToken { - test.staleToken = test.refreshTokenFail - return authFailThrough() - } - if test.badCredential { - return authFailThrough() - } - if test.badRequest { - r := ioutil.NopCloser(bytes.NewReader([]byte(`bad request`))) - return &http.Response{StatusCode: 400, Body: r}, nil - } - if test.serviceDown { - r := ioutil.NopCloser(bytes.NewReader([]byte(`unable to connect`))) - return &http.Response{StatusCode: 500, Body: r}, nil - } - j, _ := json.Marshal(test.expectedOut) - r := ioutil.NopCloser(bytes.NewReader([]byte(j))) - return &http.Response{StatusCode: 200, Body: r}, nil - }, - }, - }) - req, _ := http.NewRequest(http.MethodGet, test.resourceRequest.URL, nil) - _, data, err := svc.executeHTTP(req, test.resourceRequest) - if test.expectedError == nil { - assert.Nil(t, err) - var tr = TestResource{} - json.Unmarshal(data, &tr) - assert.Equal(t, test.expectedOut, tr) - } else { - assert.Equal(t, test.expectedError, err) - } - }) - } -} - -func TestAttachHeaders(t *testing.T) { - tests := map[string]struct { - req *http.Request - olReq OLHTTPRequest - service OLHTTPService - expectedHeaders http.Header - }{ - "it attaches basic auth headers": { - req: &http.Request{ - Header: http.Header{}, - }, - olReq: OLHTTPRequest{ - AuthMethod: "basic", - Headers: map[string]string{ - "Content-type": "application/json", - }, - }, - service: OLHTTPService{ - Config: services.HTTPServiceConfig{ - ClientID: "test", - ClientSecret: "sec", - }, - ClientCredential: ClientCredential{ - AccessToken: oltypes.String("token"), - }, - }, - expectedHeaders: http.Header{ - "Content-Type": {"application/json"}, - "Authorization": {"Basic dGVzdDpzZWM="}, - }, - }, - "it attaches bearer auth headers": { - req: &http.Request{ - Header: http.Header{}, - }, - olReq: OLHTTPRequest{ - AuthMethod: "bearer", - Headers: map[string]string{ - "Content-type": "application/json", - }, - }, - service: OLHTTPService{ - Config: services.HTTPServiceConfig{ - ClientID: "test", - ClientSecret: "sec", - }, - ClientCredential: ClientCredential{ - AccessToken: oltypes.String("token"), - }, - }, - expectedHeaders: http.Header{ - "Content-Type": {"application/json"}, - "Authorization": {"Bearer token"}, - }, - }, - "it attaches headers without auth": { - req: &http.Request{ - Header: http.Header{}, - }, - olReq: OLHTTPRequest{ - Headers: map[string]string{ - "Content-type": "application/json", - }, - }, - service: OLHTTPService{ - Config: services.HTTPServiceConfig{ - ClientID: "test", - ClientSecret: "sec", - }, - ClientCredential: ClientCredential{ - AccessToken: oltypes.String("token"), - }, - }, - expectedHeaders: http.Header{ - "Content-Type": {"application/json"}, - }, - }, - } - for name, test := range tests { - t.Run(name, func(t *testing.T) { - test.service.attachHeaders(test.req, test.olReq) - assert.Equal(t, test.expectedHeaders, test.req.Header) - }) - } -} - -func TestAuthHeaderMemoization(t *testing.T) { - tests := map[string]struct { - req *http.Request - olReq OLHTTPRequest - service OLHTTPService - tokenRequests int - }{ - "": { - req: &http.Request{ - Header: http.Header{}, - }, - olReq: OLHTTPRequest{ - URL: "test.com/test_resources/1", - AuthMethod: "bearer", - Headers: map[string]string{ - "Content-type": "application/json", - }, - }, - service: OLHTTPService{ - Config: services.HTTPServiceConfig{ - ClientID: "test", - ClientSecret: "sec", - }, - ClientCredential: ClientCredential{}, - }, - }, - } - for name, test := range tests { - t.Run(name, func(t *testing.T) { - svc := New(services.HTTPServiceConfig{ - Client: MockClient{ - DoFunc: func(req *http.Request) (*http.Response, error) { - if req.URL.Path == "/auth/oauth2/v2/token" { - test.tokenRequests++ - return authPassThrough() - } - r := ioutil.NopCloser(bytes.NewReader([]byte("{'stuff': 'thing'}"))) - return &http.Response{StatusCode: 200, Body: r}, nil - }, - }, - }) - req, _ := http.NewRequest(http.MethodGet, test.olReq.URL, nil) - svc.executeHTTP(req, test.olReq) - svc.executeHTTP(req, test.olReq) - svc.Read(test.olReq) - assert.Equal(t, 1, test.tokenRequests) - }) - } -} diff --git a/pkg/services/privileges/model.go b/pkg/services/privileges/model.go deleted file mode 100644 index 3b2b1fe..0000000 --- a/pkg/services/privileges/model.go +++ /dev/null @@ -1,31 +0,0 @@ -package privileges - -// PrivilegeQuery represents available query parameters -type PrivilegeQuery struct { - Limit string - Page string - Cursor string -} - -// Privilege represents the Role resource in OneLogin -type Privilege struct { - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Description *string `json:"description,omitempty"` - Privilege *PrivilegeData `json:"privilege,omitempty"` - UserIDs []int `json:"user_ids,omitempty"` - RoleIDs []int `json:"role_ids,omitempty"` -} - -// PrivilegeData represents the group of statements and statement versions pertinent to a privilege -type PrivilegeData struct { - Version *string `json:"version,omitempty"` - Statement []StatementData `json:"Statement"` -} - -// StatementData represents the actions and scope of a given privilege -type StatementData struct { - Effect *string `json:"Effect,omitempty"` - Action []string `json:"Action"` - Scope []string `json:"Scope"` -} diff --git a/pkg/services/privileges/privileges_test.go b/pkg/services/privileges/privileges_test.go deleted file mode 100644 index 80436e4..0000000 --- a/pkg/services/privileges/privileges_test.go +++ /dev/null @@ -1,502 +0,0 @@ -package privileges - -import ( - "encoding/json" - "errors" - "testing" - - "github.com/onelogin/onelogin-go-sdk/internal/test" - "github.com/onelogin/onelogin-go-sdk/pkg/oltypes" - "github.com/stretchr/testify/assert" -) - -func TestQuery(t *testing.T) { - tests := map[string]struct { - queryPayload *PrivilegeQuery - expectedResponse []Privilege - expectedError error - repository *test.MockRepository - }{ - "it gets one privilege with assigned resources": { - queryPayload: &PrivilegeQuery{Limit: "1"}, - expectedResponse: []Privilege{Privilege{ID: oltypes.String("asdf"), Name: oltypes.String("privilege")}}, - repository: &test.MockRepository{ - ReadFunc: func(r interface{}) ([][]byte, error) { - b, err := json.Marshal([]Privilege{Privilege{ID: oltypes.String("asdf"), Name: oltypes.String("privilege")}}) - return [][]byte{b}, err - }, - }, - }, - "it returns the remote default limit of privileges and assigned resources if no query given": { - queryPayload: &PrivilegeQuery{}, - expectedResponse: []Privilege{ - Privilege{ID: oltypes.String("asdf"), Name: oltypes.String("privilege")}, - Privilege{ID: oltypes.String("asdf"), Name: oltypes.String("name2")}, - }, - repository: &test.MockRepository{ - ReadFunc: func(r interface{}) ([][]byte, error) { - b, err := json.Marshal([]Privilege{ - Privilege{ID: oltypes.String("asdf"), Name: oltypes.String("privilege")}, - Privilege{ID: oltypes.String("asdf"), Name: oltypes.String("name2")}, - }) - return [][]byte{b}, err - }, - }, - }, - "it returns an error if the call to /privileges fails": { - queryPayload: &PrivilegeQuery{}, - expectedError: errors.New("error"), - expectedResponse: nil, - repository: &test.MockRepository{}, - }, - } - for name, test := range tests { - t.Run(name, func(t *testing.T) { - svc := New(test.repository, "test.com") - actual, err := svc.Query(test.queryPayload) - assert.Equal(t, test.expectedResponse, actual) - if test.expectedError != nil { - assert.Equal(t, test.expectedError, err) - } - }) - } -} - -func TestQueryWithAssignments(t *testing.T) { - tests := map[string]struct { - queryPayload *PrivilegeQuery - expectedResponse []Privilege - expectedError []error - repository *test.MockRepository - }{ - "it gets one privilege with assigned resources": { - queryPayload: &PrivilegeQuery{Limit: "1"}, - expectedResponse: []Privilege{Privilege{ID: oltypes.String("asdf"), Name: oltypes.String("privilege"), RoleIDs: []int{1, 2, 3}, UserIDs: []int{5, 6, 7}}}, - repository: &test.MockRepository{ - ReadFunc: func(r interface{}) ([][]byte, error) { - b, err := json.Marshal([]Privilege{Privilege{ID: oltypes.String("asdf"), Name: oltypes.String("privilege")}}) - return [][]byte{b}, err - }, - ReReadFunc: []func(r interface{}) ([][]byte, error){ - func(r interface{}) ([][]byte, error) { - b, err := json.Marshal(map[string]interface{}{"total": 4, "roles": []int{1, 2, 3}}) - return [][]byte{b}, err - }, - func(r interface{}) ([][]byte, error) { - b, err := json.Marshal(map[string]interface{}{"total": 4, "users": []int{5, 6, 7}}) - return [][]byte{b}, err - }, - }, - }, - }, - "it returns the remote default limit of privileges and assigned resources if no query given": { - queryPayload: &PrivilegeQuery{}, - expectedResponse: []Privilege{ - Privilege{ID: oltypes.String("asdf"), Name: oltypes.String("privilege"), UserIDs: []int{5, 6, 7}, RoleIDs: []int{1, 2, 3}}, - Privilege{ID: oltypes.String("asdf"), Name: oltypes.String("name2"), UserIDs: []int{5, 6, 7}, RoleIDs: []int{1, 2, 3}}, - }, - repository: &test.MockRepository{ - ReadFunc: func(r interface{}) ([][]byte, error) { - b, err := json.Marshal([]Privilege{ - Privilege{ID: oltypes.String("asdf"), Name: oltypes.String("privilege")}, - Privilege{ID: oltypes.String("asdf"), Name: oltypes.String("name2")}, - }) - return [][]byte{b}, err - }, - ReReadFunc: []func(r interface{}) ([][]byte, error){ - func(r interface{}) ([][]byte, error) { - b, err := json.Marshal(map[string]interface{}{"total": 4, "roles": []int{1, 2, 3}}) - return [][]byte{b}, err - }, - func(r interface{}) ([][]byte, error) { - b, err := json.Marshal(map[string]interface{}{"total": 4, "users": []int{5, 6, 7}}) - return [][]byte{b}, err - }, - func(r interface{}) ([][]byte, error) { - b, err := json.Marshal(map[string]interface{}{"total": 4, "roles": []int{1, 2, 3}}) - return [][]byte{b}, err - }, - func(r interface{}) ([][]byte, error) { - b, err := json.Marshal(map[string]interface{}{"total": 4, "users": []int{5, 6, 7}}) - return [][]byte{b}, err - }, - }, - }, - }, - "it returns many privileges and assigned resources, where no assigned resources included if subsequent assigned resource call fails intermettently if no query given": { - queryPayload: &PrivilegeQuery{}, - expectedResponse: []Privilege{ - Privilege{ID: oltypes.String("asdf"), Name: oltypes.String("privilege"), RoleIDs: []int{1, 2, 3}}, - Privilege{ID: oltypes.String("asdf"), Name: oltypes.String("name2"), UserIDs: []int{5, 6, 7}, RoleIDs: []int{1, 2, 3}}, - }, - expectedError: []error{errors.New("unable to read [users]"), nil}, - repository: &test.MockRepository{ - ReadFunc: func(r interface{}) ([][]byte, error) { - b, err := json.Marshal([]Privilege{ - Privilege{ID: oltypes.String("asdf"), Name: oltypes.String("privilege")}, - Privilege{ID: oltypes.String("asdf"), Name: oltypes.String("name2")}, - }) - return [][]byte{b}, err - }, - ReReadFunc: []func(r interface{}) ([][]byte, error){ - func(r interface{}) ([][]byte, error) { - b, err := json.Marshal(map[string]interface{}{"total": 4, "roles": []int{1, 2, 3}}) - return [][]byte{b}, err - }, - func(r interface{}) ([][]byte, error) { - return [][]byte{}, errors.New("fail") - }, - func(r interface{}) ([][]byte, error) { - b, err := json.Marshal(map[string]interface{}{"total": 4, "roles": []int{1, 2, 3}}) - return [][]byte{b}, err - }, - func(r interface{}) ([][]byte, error) { - b, err := json.Marshal(map[string]interface{}{"total": 4, "users": []int{5, 6, 7}}) - return [][]byte{b}, err - }, - }, - }, - }, - "it returns an error if the call to /privileges fails": { - queryPayload: &PrivilegeQuery{}, - expectedError: []error{errors.New("error")}, - expectedResponse: nil, - repository: &test.MockRepository{}, - }, - } - for name, test := range tests { - t.Run(name, func(t *testing.T) { - svc := New(test.repository, "test.com") - actual, err := svc.QueryWithAssignments(test.queryPayload) - assert.Equal(t, test.expectedResponse, actual) - if len(test.expectedError) > 0 { - assert.Equal(t, test.expectedError, err) - } - }) - } -} - -func TestGetOne(t *testing.T) { - tests := map[string]struct { - id string - expectedResponse *Privilege - expectedError error - repository *test.MockRepository - }{ - "it gets one privilege by id": { - id: "asdf", - expectedResponse: &Privilege{ID: oltypes.String("asdf"), Name: oltypes.String("first"), RoleIDs: []int{1, 2, 3}, UserIDs: []int{5, 6, 7}}, - repository: &test.MockRepository{ - ReadFunc: func(r interface{}) ([][]byte, error) { - b, err := json.Marshal(Privilege{ID: oltypes.String("asdf"), Name: oltypes.String("first")}) - return [][]byte{b}, err - }, - ReReadFunc: []func(r interface{}) ([][]byte, error){ - func(r interface{}) ([][]byte, error) { - b, err := json.Marshal(map[string]interface{}{"total": 4, "roles": []int{1, 2, 3}}) - return [][]byte{b}, err - }, - func(r interface{}) ([][]byte, error) { - b, err := json.Marshal(map[string]interface{}{"total": 4, "users": []int{5, 6, 7}}) - return [][]byte{b}, err - }, - }, - }, - }, - "it returns a privilege by without attached resources if attached resource request fails": { - id: "asdf", - expectedResponse: &Privilege{ID: oltypes.String("asdf"), Name: oltypes.String("first")}, - repository: &test.MockRepository{ - ReadFunc: func(r interface{}) ([][]byte, error) { - b, err := json.Marshal(Privilege{ID: oltypes.String("asdf"), Name: oltypes.String("first")}) - return [][]byte{b}, err - }, - ReReadFunc: []func(r interface{}) ([][]byte, error){ - func(r interface{}) ([][]byte, error) { - b, err := json.Marshal(map[string]interface{}{"total": 4, "garbage": 123}) - return [][]byte{b}, err - }, - func(r interface{}) ([][]byte, error) { - return [][]byte{}, errors.New("fail") - }, - }, - }, - }, - "it returns an error if the call to /privileges fails": { - expectedError: errors.New("error"), - expectedResponse: nil, - repository: &test.MockRepository{}, - }, - } - for name, test := range tests { - t.Run(name, func(t *testing.T) { - svc := New(test.repository, "test.com") - actual, err := svc.GetOne(test.id) - assert.Equal(t, test.expectedResponse, actual) - if test.expectedError != nil { - assert.Equal(t, test.expectedError, err) - } - }) - } -} - -func TestUpdate(t *testing.T) { - tests := map[string]struct { - updatePayload *Privilege - expectedResult *Privilege - expectedError error - repository *test.MockRepository - }{ - "it updates a privilege": { - updatePayload: &Privilege{Name: oltypes.String("update"), ID: oltypes.String("asdf")}, - expectedResult: &Privilege{ID: oltypes.String("asdf"), Name: oltypes.String("update")}, - repository: &test.MockRepository{ - UpdateFunc: func(r interface{}) ([]byte, error) { - return json.Marshal(Privilege{ID: oltypes.String("asdf"), Name: oltypes.String("update")}) - }, - ReadFunc: func(r interface{}) ([][]byte, error) { - b, err := json.Marshal(Privilege{ID: oltypes.String("asdf"), Name: oltypes.String("update")}) - return [][]byte{b}, err - }, - ReReadFunc: []func(r interface{}) ([][]byte, error){ - func(r interface{}) ([][]byte, error) { - b, err := json.Marshal(map[string]interface{}{"total": 0, "roles": []int{}}) - return [][]byte{b}, err - }, - func(r interface{}) ([][]byte, error) { - b, err := json.Marshal(map[string]interface{}{"total": 0, "users": []int{}}) - return [][]byte{b}, err - }, - }, - }, - }, - "it updates a privilege adding assigned user": { - updatePayload: &Privilege{Name: oltypes.String("update"), ID: oltypes.String("asdf"), UserIDs: []int{1, 2}}, - expectedResult: &Privilege{ID: oltypes.String("asdf"), Name: oltypes.String("update"), UserIDs: []int{1, 2}}, - repository: &test.MockRepository{ - UpdateFunc: func(r interface{}) ([]byte, error) { - return json.Marshal(Privilege{ID: oltypes.String("asdf"), Name: oltypes.String("update")}) - }, - ReadFunc: func(r interface{}) ([][]byte, error) { - b, err := json.Marshal(Privilege{ID: oltypes.String("asdf"), Name: oltypes.String("update")}) - return [][]byte{b}, err - }, - ReReadFunc: []func(r interface{}) ([][]byte, error){ - func(r interface{}) ([][]byte, error) { - b, err := json.Marshal(map[string]interface{}{"total": 0, "roles": []int{}}) - return [][]byte{b}, err - }, - func(r interface{}) ([][]byte, error) { - b, err := json.Marshal(map[string]interface{}{"total": 0, "users": []int{}}) - return [][]byte{b}, err - }, - }, - CreateFunc: func(r interface{}) ([]byte, error) { - return json.Marshal(map[string]bool{"success": true}) - }, - SubCreateFunc: []func(r interface{}) ([]byte, error){ - func(r interface{}) ([]byte, error) { - return json.Marshal(map[string]bool{"success": true}) - }, - }, - }, - }, - "it updates a privilege changing assigned user": { - updatePayload: &Privilege{Name: oltypes.String("update"), ID: oltypes.String("asdf"), UserIDs: []int{2}}, - expectedResult: &Privilege{ID: oltypes.String("asdf"), Name: oltypes.String("update"), UserIDs: []int{2}}, - repository: &test.MockRepository{ - UpdateFunc: func(r interface{}) ([]byte, error) { - return json.Marshal(Privilege{ID: oltypes.String("asdf"), Name: oltypes.String("update")}) - }, - ReadFunc: func(r interface{}) ([][]byte, error) { - b, err := json.Marshal(Privilege{ID: oltypes.String("asdf"), Name: oltypes.String("update")}) - return [][]byte{b}, err - }, - ReReadFunc: []func(r interface{}) ([][]byte, error){ - func(r interface{}) ([][]byte, error) { - b, err := json.Marshal(map[string]interface{}{"total": 0, "roles": []int{}}) - return [][]byte{b}, err - }, - func(r interface{}) ([][]byte, error) { - b, err := json.Marshal(map[string]interface{}{"total": 1, "users": []int{1}}) - return [][]byte{b}, err - }, - }, - CreateFunc: func(r interface{}) ([]byte, error) { - return json.Marshal(map[string]bool{"success": true}) - }, - SubCreateFunc: []func(r interface{}) ([]byte, error){ - func(r interface{}) ([]byte, error) { - return json.Marshal(map[string]bool{"success": true}) - }, - }, - DestroyFunc: func(r interface{}) ([]byte, error) { - return nil, nil - }, - }, - }, - "it updates a privilege removing an assigned user": { - updatePayload: &Privilege{Name: oltypes.String("update"), ID: oltypes.String("asdf"), UserIDs: []int{}}, - expectedResult: &Privilege{ID: oltypes.String("asdf"), Name: oltypes.String("update"), UserIDs: []int{}}, - repository: &test.MockRepository{ - UpdateFunc: func(r interface{}) ([]byte, error) { - return json.Marshal(Privilege{ID: oltypes.String("asdf"), Name: oltypes.String("update")}) - }, - ReadFunc: func(r interface{}) ([][]byte, error) { - b, err := json.Marshal(Privilege{ID: oltypes.String("asdf"), Name: oltypes.String("update")}) - return [][]byte{b}, err - }, - ReReadFunc: []func(r interface{}) ([][]byte, error){ - func(r interface{}) ([][]byte, error) { - b, err := json.Marshal(map[string]interface{}{"total": 0, "roles": []int{}}) - return [][]byte{b}, err - }, - func(r interface{}) ([][]byte, error) { - b, err := json.Marshal(map[string]interface{}{"total": 1, "users": []int{1}}) - return [][]byte{b}, err - }, - }, - DestroyFunc: func(r interface{}) ([]byte, error) { - return nil, nil - }, - }, - }, - "it returns an error if no id on resource": { - updatePayload: &Privilege{Name: oltypes.String("update")}, - expectedResult: &Privilege{}, - expectedError: errors.New("No ID Given"), - repository: &test.MockRepository{}, - }, - "it returns an error if something went wrong": { - updatePayload: &Privilege{ID: oltypes.String("asdf"), Name: oltypes.String("update")}, - expectedResult: &Privilege{}, - expectedError: errors.New("error"), - repository: &test.MockRepository{}, - }, - } - for name, test := range tests { - t.Run(name, func(t *testing.T) { - svc := New(test.repository, "test.com") - err := svc.Update(test.updatePayload) - if test.expectedError != nil { - assert.Equal(t, test.expectedError, err) - } else { - assert.Equal(t, test.expectedResult, test.updatePayload) - } - }) - } -} - -func TestCreate(t *testing.T) { - tests := map[string]struct { - createPayload *Privilege - expectedResult *Privilege - expectedError error - repository *test.MockRepository - }{ - "it creates a privilege": { - createPayload: &Privilege{Name: oltypes.String("create")}, - expectedResult: &Privilege{ID: oltypes.String("asdf"), Name: oltypes.String("create")}, - repository: &test.MockRepository{ - CreateFunc: func(r interface{}) ([]byte, error) { - return json.Marshal(Privilege{ID: oltypes.String("asdf"), Name: oltypes.String("create")}) - }, - SubCreateFunc: []func(r interface{}) ([]byte, error){ - func(r interface{}) ([]byte, error) { - return json.Marshal(map[string]bool{"success": true}) - }, - }, - }, - }, - "it creates a privilege and adds users and roles": { - createPayload: &Privilege{Name: oltypes.String("create"), RoleIDs: []int{1, 2, 3}, UserIDs: []int{5, 6, 7}}, - expectedResult: &Privilege{ID: oltypes.String("asdf"), Name: oltypes.String("create"), RoleIDs: []int{1, 2, 3}, UserIDs: []int{5, 6, 7}}, - repository: &test.MockRepository{ - CreateFunc: func(r interface{}) ([]byte, error) { - return json.Marshal(Privilege{ID: oltypes.String("asdf"), Name: oltypes.String("create")}) - }, - SubCreateFunc: []func(r interface{}) ([]byte, error){ - func(r interface{}) ([]byte, error) { - return json.Marshal(map[string]bool{"success": true}) - }, - func(r interface{}) ([]byte, error) { - return json.Marshal(map[string]bool{"success": true}) - }, - }, - }, - }, - "it returns an error if attaching resources fails": { - createPayload: &Privilege{Name: oltypes.String("create"), RoleIDs: []int{1, 2, 3}, UserIDs: []int{5, 6, 7}}, - expectedError: errors.New("unable to assign [roles users]"), - repository: &test.MockRepository{ - CreateFunc: func(r interface{}) ([]byte, error) { - return json.Marshal(Privilege{ID: oltypes.String("asdf"), Name: oltypes.String("create")}) - }, - SubCreateFunc: []func(r interface{}) ([]byte, error){ - func(r interface{}) ([]byte, error) { - return json.Marshal(map[string]bool{"garbage": true}) - }, - func(r interface{}) ([]byte, error) { - return json.Marshal(map[string]bool{"success": false}) - }, - }, - DestroyFunc: func(r interface{}) ([]byte, error) { - return nil, nil - }, - }, - }, - "it returns an error if something went wrong": { - createPayload: &Privilege{Name: oltypes.String("create")}, - expectedResult: &Privilege{}, - expectedError: errors.New("error"), - repository: &test.MockRepository{}, - }, - } - for name, test := range tests { - t.Run(name, func(t *testing.T) { - svc := New(test.repository, "test.com") - err := svc.Create(test.createPayload) - if test.expectedError != nil { - assert.Equal(t, test.expectedError, err) - } else { - assert.Equal(t, test.expectedResult, test.createPayload) - } - }) - } -} - -func TestDestroy(t *testing.T) { - tests := map[string]struct { - id string - repository *test.MockRepository - expectedResponse *Privilege - expectedError error - }{ - "it destroys one privilege": { - id: "test", - repository: &test.MockRepository{ - DestroyFunc: func(r interface{}) ([]byte, error) { - return nil, nil - }, - }, - expectedResponse: &Privilege{}, - }, - "it returns an error if there is a problem finding the app": { - id: "test", - repository: &test.MockRepository{}, - expectedResponse: nil, - expectedError: errors.New("error"), - }, - } - for name, test := range tests { - t.Run(name, func(t *testing.T) { - svc := New(test.repository, "test.com") - err := svc.Destroy(test.id) - if test.expectedError != nil { - assert.Equal(t, test.expectedError, err) - } else { - assert.Nil(t, err) - } - }) - } -} diff --git a/pkg/services/privileges/v1.go b/pkg/services/privileges/v1.go deleted file mode 100644 index 00cd408..0000000 --- a/pkg/services/privileges/v1.go +++ /dev/null @@ -1,357 +0,0 @@ -package privileges - -import ( - "encoding/json" - "errors" - "fmt" - "sync" - - "github.com/onelogin/onelogin-go-sdk/pkg/services" - "github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp" -) - -const errPrivilegesV2Context = "privileges v2 service" - -// V1Service holds the information needed to interface with a repository -type V1Service struct { - Endpoint, ErrorContext string - Repository services.Repository -} - -// New creates the new svc service v2. -func New(repo services.Repository, host string) *V1Service { - return &V1Service{ - Endpoint: fmt.Sprintf("%s/api/1/privileges", host), - Repository: repo, - ErrorContext: errPrivilegesV2Context, - } -} - -// Query retrieves all the privileges from the repository that meet the query criteria passed in the -// request payload. If an empty payload is given, it will retrieve all privileges. -func (svc *V1Service) Query(query *PrivilegeQuery) ([]Privilege, error) { - resp, err := svc.Repository.Read(olhttp.OLHTTPRequest{ - URL: svc.Endpoint, - Headers: map[string]string{"Content-Type": "application/json"}, - AuthMethod: "bearer", - Payload: query, - }) - if err != nil { - return nil, err - } - - var privileges []Privilege - for _, bytes := range resp { - var unmarshalled []Privilege - json.Unmarshal(bytes, &unmarshalled) - privileges = append(privileges, unmarshalled...) - } - - return privileges, err -} - -// QueryWithAssignment retrieves all the privileges from the repository that meet the query criteria passed in the -// request payload. If an empty payload is given, it will retrieve all privileges. -// Returns an array of errors if retrieving associated resources fails. Errors array is -// index-mapped to privileges array so you can retry the associated resources requests for -// privileges whos associated resource requests have run afoul. -func (svc *V1Service) QueryWithAssignments(query *PrivilegeQuery) ([]Privilege, []error) { - resp, err := svc.Repository.Read(olhttp.OLHTTPRequest{ - URL: svc.Endpoint, - Headers: map[string]string{"Content-Type": "application/json"}, - AuthMethod: "bearer", - Payload: query, - }) - if err != nil { - return nil, []error{err} - } - - var privileges []Privilege - for _, bytes := range resp { - var unmarshalled []Privilege - json.Unmarshal(bytes, &unmarshalled) - privileges = append(privileges, unmarshalled...) - } - errs := make([]error, len(privileges)) - for i := range privileges { - e := svc.GetPrivilegeResources(&privileges[i]) - if e != nil { - errs[i] = e - } - } - - return privileges, errs -} - -// GetOne retrieves the privilege and assigned roles/users by id, and if successful, it returns -// a pointer to the privilege. If retrieval of roles or users fails, an error is returned also. -func (svc *V1Service) GetOne(id string) (*Privilege, error) { - resp, err := svc.Repository.Read(olhttp.OLHTTPRequest{ - URL: fmt.Sprintf("%s/%s", svc.Endpoint, id), - Headers: map[string]string{"Content-Type": "application/json"}, - AuthMethod: "bearer", - }) - if err != nil { - return nil, err - } - - var privilege Privilege - - if len(resp) < 1 { - return nil, errors.New("invalid length of response returned") - } - - json.Unmarshal(resp[0], &privilege) - - err = svc.GetPrivilegeResources(&privilege) - return &privilege, err -} - -// Create creates a new privilege and attaches resources to it. -// Returns an error and reverts API create on privilege if something went wrong. -func (svc *V1Service) Create(privilege *Privilege) error { - newUsers := privilege.UserIDs - newRoles := privilege.RoleIDs - privilege.UserIDs = nil - privilege.RoleIDs = nil - resp, err := svc.Repository.Create(olhttp.OLHTTPRequest{ - URL: svc.Endpoint, - Headers: map[string]string{"Content-Type": "application/json"}, - AuthMethod: "bearer", - Payload: privilege, - }) - if err != nil { - return err - } - - if err = json.Unmarshal(resp, privilege); err != nil { - return err - } - - privilege.UserIDs = newUsers - privilege.RoleIDs = newRoles - - if err = svc.AttachPrivilegeResources(privilege); err != nil { - svc.Destroy(*privilege.ID) - return err - } - - return nil -} - -// Update takes a privilege and an id and attempts to use the parameters to update it -// in the API. Modifies the privilege in place, or returns an error if one occurs -func (svc *V1Service) Update(privilege *Privilege) error { - if privilege.ID == nil { - return errors.New("No ID Given") - } - - // save these off since theyre not part of the privilege API call. need to re-attach after. - keepUsers := privilege.UserIDs - keepRoles := privilege.RoleIDs - - resp, err := svc.Repository.Update(olhttp.OLHTTPRequest{ - URL: fmt.Sprintf("%s/%s", svc.Endpoint, *privilege.ID), - Headers: map[string]string{"Content-Type": "application/json"}, - AuthMethod: "bearer", - Payload: privilege, - }) - if err != nil { - return err - } - - json.Unmarshal(resp, privilege) - privilege.UserIDs = keepUsers - privilege.RoleIDs = keepRoles - - // attach will append new resource ids to privilege and do nothing if id is removed or unchanged. - if err = svc.AttachPrivilegeResources(privilege); err != nil { - fmt.Println("unable to update assigned resources, reverting privilege to last known state in remote", err) - _, err = svc.GetOne(*privilege.ID) - return err - } - - privilege, err = svc.GetOne(*privilege.ID) - if err != nil { - return err - } - - usersToRemove := reconcileForDiscard(privilege.UserIDs, keepUsers) - rolesToRemove := reconcileForDiscard(privilege.RoleIDs, keepRoles) - - if err = svc.DiscardAssignment(*privilege.ID, "users", usersToRemove); err != nil { - fmt.Println("unable to remove users, reverting privilege to last known state in remote") - _, err = svc.GetOne(*privilege.ID) - return err - } - - if err = svc.DiscardAssignment(*privilege.ID, "roles", rolesToRemove); err != nil { - fmt.Println("unable to remove roles, reverting privilege to last known state in remote") - _, err = svc.GetOne(*privilege.ID) - return err - } - - return nil -} - -// Destroy deletes the privilege with the given id, and if successful, it returns nil -func (svc *V1Service) Destroy(id string) error { - if _, err := svc.Repository.Destroy(olhttp.OLHTTPRequest{ - URL: fmt.Sprintf("%s/%s", svc.Endpoint, id), - Headers: map[string]string{"Content-Type": "application/json"}, - AuthMethod: "bearer", - }); err != nil { - return err - } - return nil -} - -func (svc *V1Service) DiscardAssignment(pID, resourceType string, assignments []int) error { - var discardError error - if len(assignments) > 0 { - c := make(chan bool, len(assignments)) - var wg sync.WaitGroup - for _, n := range assignments { - wg.Add(1) - go func(id int, c chan bool, wg *sync.WaitGroup) { - defer wg.Done() - _, err := svc.Repository.Destroy(olhttp.OLHTTPRequest{ - URL: fmt.Sprintf("%s/%s/%s/%d", svc.Endpoint, pID, resourceType, id), - Headers: map[string]string{"Content-Type": "application/json"}, - AuthMethod: "bearer", - }) - c <- err != nil - }(n, c, &wg) - wg.Wait() - close(c) - } - for r := range c { - if r { - discardError = errors.New("unable to remove resources") - } - } - } - return discardError -} - -type AttachedResponse struct { - errResource string - out []int -} - -// GetPrivilegeResources takes a privilege and requests the RoleIDs and UserIDs associated -// with the privilege and attaches an array of Role and User Ids to the privilege object. -// Returns an error if any request fails. Will only add Ids from successful calls -// It is possible to be in a 'half-finished' state and caller is responsible for retry or deciding next steps -func (svc *V1Service) GetPrivilegeResources(p *Privilege) error { - u := make(chan AttachedResponse) - r := make(chan AttachedResponse) - - go svc.getResourcesByType("users", *p.ID, u) - go svc.getResourcesByType("roles", *p.ID, r) - - uResp := <-u - rResp := <-r - - if uResp.errResource == "" { - p.UserIDs = uResp.out - } - if rResp.errResource == "" { - p.RoleIDs = rResp.out - } - return collectErrors(uResp.errResource, rResp.errResource, "read") -} - -func (svc *V1Service) getResourcesByType(resourceType, privilegeID string, c chan AttachedResponse) { - resp, err := svc.Repository.Read(olhttp.OLHTTPRequest{ - URL: fmt.Sprintf("%s/%s/%s", svc.Endpoint, privilegeID, resourceType), - Headers: map[string]string{"Content-Type": "application/json"}, - AuthMethod: "bearer", - }) - if err != nil { - c <- AttachedResponse{errResource: resourceType} - } - ar := map[string][]int{} - if len(resp) > 0 { - json.Unmarshal(resp[0], &ar) - } - - c <- AttachedResponse{out: ar[resourceType]} - close(c) -} - -type AttachResponse struct { - errResource string - out bool -} - -// AttachPrivilegeResources takes a privilege with RoleIDs and UserIDs specified and attempts to create -// the association between the privilege and the requested resources. -// Returns an error if the save fails. -func (svc *V1Service) AttachPrivilegeResources(p *Privilege) error { - u := make(chan AttachResponse) - r := make(chan AttachResponse) - - go svc.attachResourcesByType("roles", *p.ID, p.RoleIDs, u) - go svc.attachResourcesByType("users", *p.ID, p.UserIDs, r) - - uResp := <-u - rResp := <-r - - return collectErrors(uResp.errResource, rResp.errResource, "assign") -} - -func (svc *V1Service) attachResourcesByType(resourceType, privilegeID string, resourceIDs []int, c chan AttachResponse) { - // assign the resources if there are resources to be assigned - if len(resourceIDs) > 0 { - resp, err := svc.Repository.Create(olhttp.OLHTTPRequest{ - URL: fmt.Sprintf("%s/%s/%s", svc.Endpoint, privilegeID, resourceType), - Headers: map[string]string{"Content-Type": "application/json"}, - AuthMethod: "bearer", - Payload: map[string][]int{resourceType: resourceIDs}, - }) - if err != nil { - c <- AttachResponse{errResource: resourceType} - } - - ar := map[string]bool{} - json.Unmarshal(resp, &ar) - - if ar["success"] { - c <- AttachResponse{out: ar["success"]} - } else { - c <- AttachResponse{errResource: resourceType} - } - } else { - c <- AttachResponse{out: true} // skip assignment flow - nothing to do here - } - close(c) -} - -func collectErrors(usersError, rolesError, action string) error { - erroredResources := []string{} - if usersError != "" { - erroredResources = append(erroredResources, usersError) - } - if rolesError != "" { - erroredResources = append(erroredResources, rolesError) - } - if len(erroredResources) == 0 { - return nil - } - return fmt.Errorf("unable to %s %v", action, erroredResources) -} - -func reconcileForDiscard(all, keep []int) []int { - k := map[int]bool{} - discard := []int{} - for _, n := range keep { - k[n] = true - } - for _, m := range all { - if !k[m] { - discard = append(discard, m) - } - } - return discard -} diff --git a/pkg/services/roles/model.go b/pkg/services/roles/model.go deleted file mode 100644 index 7b0c12e..0000000 --- a/pkg/services/roles/model.go +++ /dev/null @@ -1,17 +0,0 @@ -package roles - -// RoleQuery represents available query parameters -type RoleQuery struct { - Limit string - Page string - Cursor string -} - -// Role represents the Role resource in OneLogin -type Role struct { - ID *int32 `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Admins []int32 `json:"admins,omitempty"` - Apps []int32 `json:"apps,omitempty"` - Users []int32 `json:"users,omitempty"` -} diff --git a/pkg/services/roles/roles_test.go b/pkg/services/roles/roles_test.go deleted file mode 100644 index 872f09f..0000000 --- a/pkg/services/roles/roles_test.go +++ /dev/null @@ -1,221 +0,0 @@ -package roles - -import ( - "encoding/json" - "errors" - "github.com/onelogin/onelogin-go-sdk/internal/test" - "github.com/onelogin/onelogin-go-sdk/pkg/oltypes" - "github.com/stretchr/testify/assert" - "testing" -) - -func TestQuery(t *testing.T) { - tests := map[string]struct { - queryPayload *RoleQuery - expectedResponse []Role - expectedError error - repository *test.MockRepository - }{ - "it gets one role": { - queryPayload: &RoleQuery{Limit: "1"}, - expectedResponse: []Role{Role{ID: oltypes.Int32(123), Name: oltypes.String("my_role")}}, - repository: &test.MockRepository{ - ReadFunc: func(r interface{}) ([][]byte, error) { - b, err := json.Marshal([]Role{Role{ID: oltypes.Int32(123), Name: oltypes.String("my_role")}}) - return [][]byte{b}, err - }, - }, - }, - "it returns the remote default limit of roles if no query given": { - queryPayload: &RoleQuery{}, - expectedResponse: []Role{ - Role{ID: oltypes.Int32(123), Name: oltypes.String("my_role")}, - Role{ID: oltypes.Int32(123), Name: oltypes.String("my_role")}, - }, - repository: &test.MockRepository{ - ReadFunc: func(r interface{}) ([][]byte, error) { - b, err := json.Marshal([]Role{ - Role{ID: oltypes.Int32(123), Name: oltypes.String("my_role")}, - Role{ID: oltypes.Int32(123), Name: oltypes.String("my_role")}, - }) - return [][]byte{b}, err - }, - }, - }, - "it returns an error if the call to /roles fails": { - queryPayload: &RoleQuery{}, - expectedError: errors.New("error"), - expectedResponse: nil, - repository: &test.MockRepository{}, - }, - } - for name, test := range tests { - t.Run(name, func(t *testing.T) { - svc := New(test.repository, "test.com") - actual, err := svc.Query(test.queryPayload) - assert.Equal(t, test.expectedResponse, actual) - if test.expectedError != nil { - assert.Equal(t, test.expectedError, err) - } - }) - } -} - -func TestGetOne(t *testing.T) { - tests := map[string]struct { - id int32 - expectedResponse *Role - expectedError error - repository *test.MockRepository - }{ - "it gets one role by id": { - id: 123, - expectedResponse: &Role{ID: oltypes.Int32(123), Name: oltypes.String("my_role")}, - repository: &test.MockRepository{ - ReadFunc: func(r interface{}) ([][]byte, error) { - b, err := json.Marshal(Role{ID: oltypes.Int32(123), Name: oltypes.String("my_role")}) - return [][]byte{b}, err - }, - }, - }, - "it returns an error if the call to /roles fails": { - expectedError: errors.New("error"), - expectedResponse: nil, - repository: &test.MockRepository{}, - }, - } - for name, test := range tests { - t.Run(name, func(t *testing.T) { - svc := New(test.repository, "test.com") - actual, err := svc.GetOne(test.id) - assert.Equal(t, test.expectedResponse, actual) - if test.expectedError != nil { - assert.Equal(t, test.expectedError, err) - } - }) - } -} - -func TestUpdate(t *testing.T) { - tests := map[string]struct { - updatePayload *Role - expectedResult *Role - expectedError error - repository *test.MockRepository - }{ - "it updates a role": { - updatePayload: &Role{Name: oltypes.String("my_role"), ID: oltypes.Int32(123), Apps: []int32{123, 456}}, - expectedResult: &Role{ID: oltypes.Int32(123), Name: oltypes.String("my_role"), Apps: []int32{123, 456}}, - repository: &test.MockRepository{ - UpdateFunc: func(r interface{}) ([]byte, error) { - return json.Marshal(Role{ID: oltypes.Int32(123), Name: oltypes.String("my_role"), Apps: []int32{123, 456}}) - }, - }, - }, - "it returns an error if no id on resource": { - updatePayload: &Role{Name: oltypes.String("my_role")}, - expectedResult: &Role{}, - expectedError: errors.New("No ID Given"), - repository: &test.MockRepository{}, - }, - "it returns an error if something went wrong": { - updatePayload: &Role{ID: oltypes.Int32(123), Name: oltypes.String("my_role"), Apps: []int32{123, 456}}, - expectedResult: &Role{}, - expectedError: errors.New(`{"description":"Invalid id(s): 123"}`), - repository: &test.MockRepository{ - UpdateFunc: func(r interface{}) ([]byte, error) { - msg, _ := json.Marshal(map[string]string{"description": "Invalid id(s): 123"}) - return []byte{}, errors.New(string(msg)) - }, - }, - }, - } - for name, test := range tests { - t.Run(name, func(t *testing.T) { - svc := New(test.repository, "test.com") - err := svc.Update(test.updatePayload) - if test.expectedError != nil { - assert.Equal(t, test.expectedError, err) - } else { - assert.Equal(t, test.expectedResult, test.updatePayload) - } - }) - } -} - -func TestCreate(t *testing.T) { - tests := map[string]struct { - createPayload *Role - expectedResult *Role - expectedError error - repository *test.MockRepository - }{ - "it creates a role": { - createPayload: &Role{Name: oltypes.String("my_role")}, - expectedResult: &Role{ID: oltypes.Int32(123), Name: oltypes.String("my_role")}, - repository: &test.MockRepository{ - CreateFunc: func(r interface{}) ([]byte, error) { - return json.Marshal(Role{ID: oltypes.Int32(123), Name: oltypes.String("my_role")}) - }, - }, - }, - "it returns an error if something went wrong": { - createPayload: &Role{ID: oltypes.Int32(123), Name: oltypes.String("my_role"), Apps: []int32{123, 456}}, - expectedResult: &Role{}, - expectedError: errors.New(`{"description":"Invalid id(s): 123"}`), - repository: &test.MockRepository{ - CreateFunc: func(r interface{}) ([]byte, error) { - msg, _ := json.Marshal(map[string]string{"description": "Invalid id(s): 123"}) - return []byte{}, errors.New(string(msg)) - }, - }, - }, - } - for name, test := range tests { - t.Run(name, func(t *testing.T) { - svc := New(test.repository, "test.com") - err := svc.Create(test.createPayload) - if test.expectedError != nil { - assert.Equal(t, test.expectedError, err) - } else { - assert.Equal(t, test.expectedResult, test.createPayload) - } - }) - } -} - -func TestDestroy(t *testing.T) { - tests := map[string]struct { - id int32 - repository *test.MockRepository - expectedResponse *Role - expectedError error - }{ - "it destroys one role": { - id: 123, - repository: &test.MockRepository{ - DestroyFunc: func(r interface{}) ([]byte, error) { - return nil, nil - }, - }, - expectedResponse: &Role{}, - }, - "it returns an error if there is a problem finding the role": { - id: 123, - repository: &test.MockRepository{}, - expectedResponse: nil, - expectedError: errors.New("error"), - }, - } - for name, test := range tests { - t.Run(name, func(t *testing.T) { - svc := New(test.repository, "test.com") - err := svc.Destroy(test.id) - if test.expectedError != nil { - assert.Equal(t, test.expectedError, err) - } else { - assert.Nil(t, err) - } - }) - } -} diff --git a/pkg/services/roles/v1.go b/pkg/services/roles/v1.go deleted file mode 100644 index 5fd7e69..0000000 --- a/pkg/services/roles/v1.go +++ /dev/null @@ -1,127 +0,0 @@ -package roles - -import ( - "encoding/json" - "errors" - "fmt" - - "github.com/onelogin/onelogin-go-sdk/pkg/services" - "github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp" -) - -const errRolesV1Context = "roles v1 service" - -// V1Service holds the information needed to interface with a repository -type V1Service struct { - Endpoint, ErrorContext string - Repository services.Repository -} - -// New creates the new svc service v1. -func New(repo services.Repository, host string) *V1Service { - return &V1Service{ - Endpoint: fmt.Sprintf("%s/api/2/roles", host), - Repository: repo, - ErrorContext: errRolesV1Context, - } -} - -// Query retrieves all the roles from the repository that meet the query criteria passed in the -// request payload. If an empty payload is given, it will retrieve all roles -func (svc *V1Service) Query(query *RoleQuery) ([]Role, error) { - resp, err := svc.Repository.Read(olhttp.OLHTTPRequest{ - URL: svc.Endpoint, - Headers: map[string]string{"Content-Type": "application/json"}, - AuthMethod: "bearer", - Payload: query, - }) - if err != nil { - return nil, err - } - - var roles []Role - for _, bytes := range resp { - var unmarshalled []Role - json.Unmarshal(bytes, &unmarshalled) - roles = append(roles, unmarshalled...) - } - return roles, nil -} - -// GetOne retrieves the role by id and returns it -func (svc *V1Service) GetOne(id int32) (*Role, error) { - resp, err := svc.Repository.Read(olhttp.OLHTTPRequest{ - URL: fmt.Sprintf("%s/%d", svc.Endpoint, id), - Headers: map[string]string{"Content-Type": "application/json"}, - AuthMethod: "bearer", - }) - if err != nil { - return nil, err - } - var role Role - - if len(resp) < 1 { - return nil, errors.New("invalid length of response returned") - } - - json.Unmarshal(resp[0], &role) - return &role, nil -} - -// Create takes a role without an id and attempts to use the parameters to create it -// in the API. Modifies the role in place, or returns an error if one occurs -func (svc *V1Service) Create(role *Role) error { - resp, err := svc.Repository.Create(olhttp.OLHTTPRequest{ - URL: svc.Endpoint, - Headers: map[string]string{"Content-Type": "application/json"}, - AuthMethod: "bearer", - Payload: role, - }) - if err != nil { - return err - } - json.Unmarshal(resp, role) - return nil -} - -// Update takes a role and an id and attempts to use the parameters to update it -// in the API. Modifies the role in place, or returns an error if one occurs -func (svc *V1Service) Update(role *Role) error { - if role.ID == nil { - return errors.New("No ID Given") - } - - id := *role.ID - role.ID = nil - resp, err := svc.UpdateRaw(id, role) - - if err != nil { - return err - } - - json.Unmarshal(resp, role) - return nil -} - -// UpdateRaw takes a role and an id and attempts to use the parameters to update it -// in the API. Returned the raw response bytes, or returns an error if one occurs -func (svc *V1Service) UpdateRaw(id int32, role interface{}) ([]byte, error) { - return svc.Repository.Update(olhttp.OLHTTPRequest{ - URL: fmt.Sprintf("%s/%d", svc.Endpoint, id), - Headers: map[string]string{"Content-Type": "application/json"}, - AuthMethod: "bearer", - Payload: role, - }) -} - -// Destroy deletes the role with the given id, and if successful, it returns nil -func (svc *V1Service) Destroy(id int32) error { - if _, err := svc.Repository.Destroy(olhttp.OLHTTPRequest{ - URL: fmt.Sprintf("%s/%d", svc.Endpoint, id), - Headers: map[string]string{"Content-Type": "application/json"}, - AuthMethod: "bearer", - }); err != nil { - return err - } - return nil -} diff --git a/pkg/services/session_login_tokens/model.go b/pkg/services/session_login_tokens/model.go deleted file mode 100644 index 8a2b559..0000000 --- a/pkg/services/session_login_tokens/model.go +++ /dev/null @@ -1,18 +0,0 @@ -package sessionlogintokens - -import "time" - -// SessionLoginToken is the contract for users api v1. -type SessionLoginToken struct { - ExpiresAt time.Time `json:"expires_at,omitempty"` - ReturnToURL *string `json:"return_to_url,omitempty"` - SessionToken *string `json:"session_token,omitempty"` - StateToken *string `json:"state_token,omitempty"` -} - -// SessionLoginTokenRequest is the contract for users api v1. -type SessionLoginTokenRequest struct { - UsernameOrEmail *string `json:"username_or_email,omitempty"` - Password *string `json:"password,omitempty"` - Subdomain *string `json:"subdomain,omitempty"` -} diff --git a/pkg/services/session_login_tokens/session_login_tokens_test.go b/pkg/services/session_login_tokens/session_login_tokens_test.go deleted file mode 100644 index ea12e6e..0000000 --- a/pkg/services/session_login_tokens/session_login_tokens_test.go +++ /dev/null @@ -1,53 +0,0 @@ -package sessionlogintokens - -import ( - "encoding/json" - "errors" - "testing" - - "github.com/onelogin/onelogin-go-sdk/internal/test" - "github.com/onelogin/onelogin-go-sdk/pkg/oltypes" - - "github.com/stretchr/testify/assert" -) - -func TestCreate(t *testing.T) { - tests := map[string]struct { - createPayload *SessionLoginTokenRequest - expectedResponse *SessionLoginToken - repository *test.MockRepository - expectedError error - }{ - "it creates one sessionLoginToken": { - createPayload: &SessionLoginTokenRequest{UsernameOrEmail: oltypes.String("name")}, - expectedResponse: &SessionLoginToken{SessionToken: oltypes.String("name")}, - repository: &test.MockRepository{ - CreateFunc: func(r interface{}) ([]byte, error) { - out, _ := json.Marshal(SessionLoginToken{StateToken: oltypes.String("state")}) - return out, nil - }, - }, - }, - "it returns an error if there is a bad request": { - createPayload: &SessionLoginTokenRequest{UsernameOrEmail: oltypes.String("???")}, - repository: &test.MockRepository{ - CreateFunc: func(r interface{}) ([]byte, error) { - return nil, errors.New("bad request") - }, - }, - expectedResponse: nil, - expectedError: errors.New("bad request"), - }, - } - for name, test := range tests { - t.Run(name, func(t *testing.T) { - svc := New(test.repository, "test.com") - actual, err := svc.Create(test.createPayload) - if test.expectedError != nil { - assert.Equal(t, test.expectedError, err) - } else { - assert.NotNil(t, actual) - } - }) - } -} diff --git a/pkg/services/session_login_tokens/v1.go b/pkg/services/session_login_tokens/v1.go deleted file mode 100644 index 49cbd92..0000000 --- a/pkg/services/session_login_tokens/v1.go +++ /dev/null @@ -1,42 +0,0 @@ -package sessionlogintokens - -import ( - "encoding/json" - "fmt" - - "github.com/onelogin/onelogin-go-sdk/pkg/services" - "github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp" -) - -const errSessionLoginTokenV1Context = "Session Login Tokens v2 service" - -type V1Service struct { - Endpoint, ErrorContext string - Repository services.Repository -} - -// New creates the new apps service v2. -func New(repo services.Repository, host string) *V1Service { - return &V1Service{ - Endpoint: fmt.Sprintf("%s/api/1/login/auth", host), - Repository: repo, - ErrorContext: errSessionLoginTokenV1Context, - } -} - -// Create takes a SessionLoginToken request that represents an end-user's credentials -// and returns a Session Token that represents an authenticated session -func (svc *V1Service) Create(request *SessionLoginTokenRequest) (*SessionLoginToken, error) { - resp, err := svc.Repository.Create(olhttp.OLHTTPRequest{ - URL: svc.Endpoint, - Headers: map[string]string{"Content-Type": "application/json"}, - AuthMethod: "bearer", - Payload: request, - }) - if err != nil { - return nil, err - } - var newSessionToken SessionLoginToken - json.Unmarshal(resp, &newSessionToken) - return &newSessionToken, nil -} diff --git a/pkg/services/smarthooks/envs/envs_test.go b/pkg/services/smarthooks/envs/envs_test.go deleted file mode 100644 index 466cb86..0000000 --- a/pkg/services/smarthooks/envs/envs_test.go +++ /dev/null @@ -1,257 +0,0 @@ -package smarthookenvs - -import ( - "encoding/json" - "errors" - "fmt" - "testing" - - "github.com/onelogin/onelogin-go-sdk/internal/test" - "github.com/onelogin/onelogin-go-sdk/pkg/oltypes" - "github.com/stretchr/testify/assert" -) - -func TestQuery(t *testing.T) { - tests := map[string]struct { - queryPayload *SmartHookEnvVarQuery - expectedResponse []EnvVar - expectedError error - repository *test.MockRepository - }{ - "it gets one environment variable": { - queryPayload: &SmartHookEnvVarQuery{Limit: "abc"}, - expectedResponse: []EnvVar{EnvVar{ID: oltypes.String("abc"), Name: oltypes.String("API_KEY"), Value: oltypes.String("Its a secret to everybody")}}, - repository: &test.MockRepository{ - ReadFunc: func(r interface{}) ([][]byte, error) { - b, err := json.Marshal([]EnvVar{EnvVar{ID: oltypes.String("abc"), Name: oltypes.String("API_KEY"), Value: oltypes.String("Its a secret to everybody")}}) - return [][]byte{b}, err - }, - }, - }, - "it returns the remote default limit of smarthooks if no query given": { - queryPayload: &SmartHookEnvVarQuery{}, - expectedResponse: []EnvVar{ - EnvVar{ID: oltypes.String("abc"), Name: oltypes.String("API_KEY"), Value: oltypes.String("Its a secret to everybody")}, - EnvVar{ID: oltypes.String("abc"), Name: oltypes.String("API_KEY"), Value: oltypes.String("Its a secret to everybody")}, - }, - repository: &test.MockRepository{ - ReadFunc: func(r interface{}) ([][]byte, error) { - b, err := json.Marshal([]EnvVar{ - EnvVar{ID: oltypes.String("abc"), Name: oltypes.String("API_KEY"), Value: oltypes.String("Its a secret to everybody")}, - EnvVar{ID: oltypes.String("abc"), Name: oltypes.String("API_KEY"), Value: oltypes.String("Its a secret to everybody")}, - }) - return [][]byte{b}, err - }, - }, - }, - "it returns an error if the call to /smarthooks fails": { - queryPayload: &SmartHookEnvVarQuery{}, - expectedError: errors.New("error"), - expectedResponse: nil, - repository: &test.MockRepository{}, - }, - } - for name, test := range tests { - t.Run(name, func(t *testing.T) { - svc := New(test.repository, "test.com") - actual, err := svc.Query(test.queryPayload) - assert.Equal(t, test.expectedResponse, actual) - if test.expectedError != nil { - assert.Equal(t, test.expectedError, err) - } - }) - } -} - -func TestGetOne(t *testing.T) { - tests := map[string]struct { - id string - expectedResponse *EnvVar - expectedError error - repository *test.MockRepository - }{ - "it gets one smarthook by id": { - id: "abc", - expectedResponse: &EnvVar{ID: oltypes.String("abc"), Name: oltypes.String("API_KEY"), Value: oltypes.String("Its a secret to everybody")}, - repository: &test.MockRepository{ - ReadFunc: func(r interface{}) ([][]byte, error) { - b, err := json.Marshal(EnvVar{ID: oltypes.String("abc"), Name: oltypes.String("API_KEY"), Value: oltypes.String("Its a secret to everybody")}) - return [][]byte{b}, err - }, - }, - }, - "it returns an error if the call to /smarthooks fails": { - expectedError: errors.New("error"), - expectedResponse: &EnvVar{}, - repository: &test.MockRepository{}, - }, - } - for name, test := range tests { - t.Run(name, func(t *testing.T) { - svc := New(test.repository, "test.com") - actual, err := svc.GetOne(test.id) - assert.Equal(t, test.expectedResponse, actual) - if test.expectedError != nil { - assert.Equal(t, test.expectedError, err) - } - }) - } -} - -func TestUpdate(t *testing.T) { - tests := map[string]struct { - updatePayload *EnvVar - expectedResult *EnvVar - expectedError error - repository *test.MockRepository - }{ - "it updates a smarthook": { - updatePayload: &EnvVar{ID: oltypes.String("abc"), Value: oltypes.String("SHHHHH!")}, - expectedResult: &EnvVar{ID: oltypes.String("abc"), Name: oltypes.String("API_KEY")}, - repository: &test.MockRepository{ - UpdateFunc: func(r interface{}) ([]byte, error) { - return json.Marshal(EnvVar{ID: oltypes.String("abc"), Name: oltypes.String("API_KEY")}) - }, - }, - }, - "it attempts a search if name is given": { - updatePayload: &EnvVar{Name: oltypes.String("API_KEY"), Value: oltypes.String("secret_to_everybody")}, - expectedResult: &EnvVar{ID: oltypes.String("def"), Name: oltypes.String("API_KEY")}, - repository: &test.MockRepository{ - UpdateFunc: func(r interface{}) ([]byte, error) { - fmt.Println("UP") - return json.Marshal(EnvVar{ID: oltypes.String("def"), Name: oltypes.String("API_KEY")}) - }, - ReadFunc: func(r interface{}) ([][]byte, error) { - b, err := json.Marshal([]EnvVar{ - EnvVar{ID: oltypes.String("abc"), Name: oltypes.String("SECRET")}, - EnvVar{ID: oltypes.String("def"), Name: oltypes.String("API_KEY")}, - }) - return [][]byte{b}, err - }, - }, - }, - "it returns error if name search fails": { - updatePayload: &EnvVar{Name: oltypes.String("API_KEY"), Value: oltypes.String("secret_to_everybody")}, - expectedResult: nil, - expectedError: errors.New("no ID or Name given"), - repository: &test.MockRepository{ - UpdateFunc: func(r interface{}) ([]byte, error) { - fmt.Println("UP") - return json.Marshal(EnvVar{ID: oltypes.String("def"), Name: oltypes.String("API_KEY")}) - }, - ReadFunc: func(r interface{}) ([][]byte, error) { - b, err := json.Marshal([]EnvVar{}) - return [][]byte{b}, err - }, - }, - }, - "it returns an error if no value given": { - updatePayload: &EnvVar{ID: oltypes.String("abc")}, - expectedResult: nil, - expectedError: errors.New("value is required"), - repository: &test.MockRepository{}, - }, - "it returns an error if no id on resource": { - updatePayload: &EnvVar{Value: oltypes.String("SHHHHH!")}, - expectedResult: nil, - expectedError: errors.New("no ID or Name given"), - repository: &test.MockRepository{}, - }, - "it returns an error if something went wrong": { - updatePayload: &EnvVar{ID: oltypes.String("abc"), Value: oltypes.String("SHHHHH!")}, - expectedResult: nil, - expectedError: errors.New("error"), - repository: &test.MockRepository{}, - }, - } - for name, test := range tests { - t.Run(name, func(t *testing.T) { - svc := New(test.repository, "test.com") - out, err := svc.Update(test.updatePayload) - if test.expectedError != nil { - assert.Equal(t, test.expectedError, err) - } else { - assert.Equal(t, test.expectedResult, out) - } - }) - } -} - -func TestCreate(t *testing.T) { - tests := map[string]struct { - createPayload *EnvVar - expectedResult *EnvVar - expectedError error - repository *test.MockRepository - }{ - "it creates an environment variable": { - createPayload: &EnvVar{ID: oltypes.String("abc"), Name: oltypes.String("API_KEY"), Value: oltypes.String("Its a secret to everybody")}, - expectedResult: &EnvVar{ID: oltypes.String("abc"), Name: oltypes.String("API_KEY"), Value: oltypes.String("Its a secret to everybody")}, - repository: &test.MockRepository{ - CreateFunc: func(r interface{}) ([]byte, error) { - return json.Marshal(EnvVar{ID: oltypes.String("abc"), Name: oltypes.String("API_KEY"), Value: oltypes.String("Its a secret to everybody")}) - }, - }, - }, - "it returns an error if no name or value given": { - createPayload: &EnvVar{}, - expectedResult: nil, - expectedError: errors.New("Name and Value are both required"), - repository: &test.MockRepository{}, - }, - "it returns an error if something went wrong": { - createPayload: &EnvVar{ID: oltypes.String("abc"), Name: oltypes.String("API_KEY"), Value: oltypes.String("Its a secret to everybody")}, - expectedResult: nil, - expectedError: errors.New("error"), - repository: &test.MockRepository{}, - }, - } - for name, test := range tests { - t.Run(name, func(t *testing.T) { - svc := New(test.repository, "test.com") - out, err := svc.Create(test.createPayload) - if test.expectedError != nil { - assert.Equal(t, test.expectedError, err) - } else { - assert.Equal(t, test.expectedResult, out) - } - }) - } -} - -func TestDestroy(t *testing.T) { - tests := map[string]struct { - id string - repository *test.MockRepository - expectedResponse *EnvVar - expectedError error - }{ - "it destroys one smarthook": { - id: "abc", - repository: &test.MockRepository{ - DestroyFunc: func(r interface{}) ([]byte, error) { - return nil, nil - }, - }, - expectedResponse: &EnvVar{}, - }, - "it returns an error if there is a problem finding the smarthook": { - id: "abc", - repository: &test.MockRepository{}, - expectedResponse: nil, - expectedError: errors.New("error"), - }, - } - for name, test := range tests { - t.Run(name, func(t *testing.T) { - svc := New(test.repository, "test.com") - err := svc.Destroy(test.id) - if test.expectedError != nil { - assert.Equal(t, test.expectedError, err) - } else { - assert.Nil(t, err) - } - }) - } -} diff --git a/pkg/services/smarthooks/envs/model.go b/pkg/services/smarthooks/envs/model.go deleted file mode 100644 index 4f3d484..0000000 --- a/pkg/services/smarthooks/envs/model.go +++ /dev/null @@ -1,22 +0,0 @@ -package smarthookenvs - -import ( - "time" -) - -// SmartHookEnvVarQuery represents available query parameters -type SmartHookEnvVarQuery struct { - Limit string - Page string - Cursor string - Type string -} - -// EnvVar represents an Environment Variable to be associated with a SmartHook -type EnvVar struct { - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Value *string `json:"value,omitempty"` - CreatedAt *time.Time `json:"created_at,omitempty"` - UpdatedAt *time.Time `json:"updated_at,omitempty"` -} diff --git a/pkg/services/smarthooks/envs/v1.go b/pkg/services/smarthooks/envs/v1.go deleted file mode 100644 index 790aba0..0000000 --- a/pkg/services/smarthooks/envs/v1.go +++ /dev/null @@ -1,152 +0,0 @@ -package smarthookenvs - -import ( - "encoding/json" - "errors" - "fmt" - - "github.com/onelogin/onelogin-go-sdk/pkg/services" - "github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp" -) - -const errEnvVarsV2Context = "envVar environment variables v1 service" - -// V1Service holds the information needed to interface with a repository -type V1Service struct { - Endpoint, ErrorContext string - Repository services.Repository -} - -// New creates the new svc service v2. -func New(repo services.Repository, host string) *V1Service { - return &V1Service{ - Endpoint: fmt.Sprintf("%s/api/2/hooks/envs", host), - Repository: repo, - ErrorContext: errEnvVarsV2Context, - } -} - -// Query retrieves all the envVars from the repository that meet the query criteria passed in the -// request payload. If an empty payload is given, it will retrieve all envVars -func (svc *V1Service) Query(query *SmartHookEnvVarQuery) ([]EnvVar, error) { - resp, err := svc.Repository.Read(olhttp.OLHTTPRequest{ - URL: svc.Endpoint, - Headers: map[string]string{"Content-Type": "application/json"}, - AuthMethod: "bearer", - Payload: query, - }) - if err != nil { - return nil, err - } - - var envVars []EnvVar - for _, bytes := range resp { - var unmarshalled []EnvVar - json.Unmarshal(bytes, &unmarshalled) - envVars = append(envVars, unmarshalled...) - } - return envVars, nil -} - -// GetOne retrieves the envVar by id and returns it -func (svc *V1Service) GetOne(id string) (*EnvVar, error) { - out := EnvVar{} - resp, err := svc.Repository.Read(olhttp.OLHTTPRequest{ - URL: fmt.Sprintf("%s/%s", svc.Endpoint, id), - Headers: map[string]string{"Content-Type": "application/json"}, - AuthMethod: "bearer", - }) - if err != nil { - return &out, err - } - - if len(resp) < 1 { - return nil, errors.New("invalid length of response returned") - } - - json.Unmarshal(resp[0], &out) - return &out, nil -} - -// Create takes a envVar without an id and attempts to use the parameters to create it -// in the API. Modifies the envVar in place, or returns an error if one occurs -func (svc *V1Service) Create(envVar *EnvVar) (*EnvVar, error) { - out := EnvVar{} - if envVar.Name == nil || envVar.Value == nil { - return &out, errors.New("Name and Value are both required") - } - - resp, err := svc.Repository.Create(olhttp.OLHTTPRequest{ - URL: svc.Endpoint, - Headers: map[string]string{"Content-Type": "application/json"}, - AuthMethod: "bearer", - Payload: envVar, - }) - if err != nil { - return &out, err - } - - json.Unmarshal(resp, &out) - return &out, nil -} - -// Update takes a envVar and an id and attempts to use the parameters to update it -// in the API. Returns a new EnvVar object, or returns an error if one occurs -func (svc *V1Service) Update(envVar *EnvVar) (*EnvVar, error) { - out := EnvVar{} - if envVar.Name != nil && envVar.ID == nil { // give a name but no id, we'll try and find it for you - possible, err := svc.Query(nil) - if err != nil { - return &out, errors.New("unable to find by ID or Name") - } - for _, p := range possible { - if *p.Name == *envVar.Name { - envVar.ID = p.ID - break - } - } - } - if envVar.ID == nil { - return &out, errors.New("no ID or Name given") - } - if envVar.Value == nil { - return &out, errors.New("value is required") - } - - id := *envVar.ID - envVar.ID = nil - envVar.Name = nil - envVar.CreatedAt = nil - envVar.UpdatedAt = nil - - resp, err := svc.UpdateRaw(id, envVar) - if err != nil { - return &out, err - } - - json.Unmarshal(resp, &out) - return &out, nil -} - -// UpdateRaw takes a envVar and an id and attempts to use the parameters to update it -// in the API. Modifies the envVar in place, or returns an error if one occurs -func (svc *V1Service) UpdateRaw(id string, envVar interface{}) ([]byte, error) { - return svc.Repository.Update(olhttp.OLHTTPRequest{ - URL: fmt.Sprintf("%s/%s", svc.Endpoint, id), - Headers: map[string]string{"Content-Type": "application/json"}, - AuthMethod: "bearer", - Payload: envVar, - }) -} - -// Destroy deletes the envVar with the given id, and if successful, it returns nil -func (svc *V1Service) Destroy(id string) error { - if _, err := svc.Repository.Destroy(olhttp.OLHTTPRequest{ - URL: fmt.Sprintf("%s/%s", svc.Endpoint, id), - Headers: map[string]string{"Content-Type": "application/json"}, - AuthMethod: "bearer", - }); err != nil { - return err - } - return nil -} diff --git a/pkg/services/smarthooks/model.go b/pkg/services/smarthooks/model.go deleted file mode 100644 index dc768fa..0000000 --- a/pkg/services/smarthooks/model.go +++ /dev/null @@ -1,92 +0,0 @@ -package smarthooks - -import ( - "errors" - "time" - - smarthookenvs "github.com/onelogin/onelogin-go-sdk/pkg/services/smarthooks/envs" - "github.com/onelogin/onelogin-go-sdk/pkg/utils" -) - -const ( - TypePreAuthentication string = "pre-authentication" - TypeUserMigration string = "user-migration" -) - -const ( - ContextPreAuthentication1_0_0 string = "1.0.0" - ContextPreAuthentication1_1_0 string = "1.1.0" - - ContextUserMigration1_0_0 string = "1.0.0" -) - -const ( - StatusReady string = "ready" - StatusCreateQueued string = "create-queued" - StatusCreateRunning string = "create-running" - StatusCreateFailed string = "create-failed" - StatusUpdateQueued string = "update-queued" - StatusUpdateRunning string = "update-running" - StatusUpdateFailed string = "update-failed" -) - -// SmartHookQuery represents available query parameters -type SmartHookQuery struct { - Limit string - Page string - Cursor string - Type string -} - -// SmartHook represents a OneLogin SmartHook with associated resource data -type SmartHook struct { - ID *string `json:"id,omitempty"` - Type *string `json:"type,omitempty"` - Disabled *bool `json:"disabled,omitempty"` - Timeout *int32 `json:"timeout,omitempty"` - EnvVars []smarthookenvs.EnvVar `json:"env_vars"` - Runtime *string `json:"runtime,omitempty"` - ContextVersion *string `json:"context_version,omitempty"` - Retries *int32 `json:"retries,omitempty"` - Options *Options `json:"options,omitempty"` - Packages map[string]string `json:"packages"` - Function *string `json:"function,omitempty"` - Status *string `json:"status,omitempty"` - CreatedAt *time.Time `json:"created_at,omitempty"` - UpdatedAt *time.Time `json:"updated_at,omitempty"` - Conditions []Condition `json:"conditions,omitempty"` -} - -// SmartHookOptions represents the options to be associated with a SmartHook -type Options struct { - RiskEnabled *bool `json:"risk_enabled,omitempty"` - MFADeviceInfoEnabled *bool `json:"mfa_device_info_enabled,omitempty"` - LocationEnabled *bool `json:"location_enabled,omitempty"` -} - -type Condition struct { - Source *string `json:"source,omitempty"` - Operator *string `json:"operator,omitempty"` - Value *string `json:"value,omitempty"` -} - -// EncodeFunction mutates the reciever to base64 encode whatever value is on the Function field -func (hook *SmartHook) EncodeFunction() error { - if hook.Function == nil { - return errors.New("No Function Definition Given") - } - - str := utils.EncodeString(*hook.Function) - hook.Function = &str - return nil -} - -// DecodeFunction mutates the reciever to base64 decode whatever value is on the Function field -func (hook *SmartHook) DecodeFunction() error { - if hook.Function == nil { - return errors.New("No Function Definition Given") - } - str := utils.DecodeString(*hook.Function) - hook.Function = &str - return nil -} diff --git a/pkg/services/smarthooks/smarthooks_test.go b/pkg/services/smarthooks/smarthooks_test.go deleted file mode 100644 index 8c3a096..0000000 --- a/pkg/services/smarthooks/smarthooks_test.go +++ /dev/null @@ -1,264 +0,0 @@ -package smarthooks - -import ( - "encoding/json" - "errors" - "github.com/onelogin/onelogin-go-sdk/internal/test" - "github.com/onelogin/onelogin-go-sdk/pkg/oltypes" - "github.com/stretchr/testify/assert" - "testing" -) - -func TestQuery(t *testing.T) { - tests := map[string]struct { - queryPayload *SmartHookQuery - expectedResponse []SmartHook - expectedError error - repository *test.MockRepository - }{ - "it gets one smarthook": { - queryPayload: &SmartHookQuery{Limit: "1"}, - expectedResponse: []SmartHook{SmartHook{ID: oltypes.String("abc"), Function: oltypes.String("ZnVuY3Rpb24gbXlGdW5jKCkgey4uLn0=")}}, - repository: &test.MockRepository{ - ReadFunc: func(r interface{}) ([][]byte, error) { - b, err := json.Marshal([]SmartHook{SmartHook{ID: oltypes.String("abc"), Function: oltypes.String("ZnVuY3Rpb24gbXlGdW5jKCkgey4uLn0=")}}) - return [][]byte{b}, err - }, - }, - }, - "it returns the remote default limit of smarthooks if no query given": { - queryPayload: &SmartHookQuery{}, - expectedResponse: []SmartHook{ - SmartHook{ID: oltypes.String("abc"), Function: oltypes.String("ZnVuY3Rpb24gbXlGdW5jKCkgey4uLn0=")}, - SmartHook{ID: oltypes.String("abc"), Function: oltypes.String("ZnVuY3Rpb24gbXlPdGhlckZ1bmMoKSB7Li4ufQ==")}, - }, - repository: &test.MockRepository{ - ReadFunc: func(r interface{}) ([][]byte, error) { - b, err := json.Marshal([]SmartHook{ - SmartHook{ID: oltypes.String("abc"), Function: oltypes.String("ZnVuY3Rpb24gbXlGdW5jKCkgey4uLn0=")}, - SmartHook{ID: oltypes.String("abc"), Function: oltypes.String("ZnVuY3Rpb24gbXlPdGhlckZ1bmMoKSB7Li4ufQ==")}, - }) - return [][]byte{b}, err - }, - }, - }, - "it returns an error if the call to /smarthooks fails": { - queryPayload: &SmartHookQuery{}, - expectedError: errors.New("error"), - expectedResponse: nil, - repository: &test.MockRepository{}, - }, - } - for name, test := range tests { - t.Run(name, func(t *testing.T) { - svc := New(test.repository, "test.com") - actual, err := svc.Query(test.queryPayload) - assert.Equal(t, test.expectedResponse, actual) - if test.expectedError != nil { - assert.Equal(t, test.expectedError, err) - } - }) - } -} - -func TestGetOne(t *testing.T) { - tests := map[string]struct { - id string - expectedResponse *SmartHook - expectedError error - repository *test.MockRepository - }{ - "it gets one smarthook by id": { - id: "1", - expectedResponse: &SmartHook{ID: oltypes.String("abc"), Function: oltypes.String("ZnVuY3Rpb24gbXlGdW5jKCkgey4uLn0=")}, - repository: &test.MockRepository{ - ReadFunc: func(r interface{}) ([][]byte, error) { - b, err := json.Marshal(SmartHook{ID: oltypes.String("abc"), Function: oltypes.String("ZnVuY3Rpb24gbXlGdW5jKCkgey4uLn0=")}) - return [][]byte{b}, err - }, - }, - }, - "it returns an error if the call to /smarthooks fails": { - expectedError: errors.New("error"), - expectedResponse: &SmartHook{}, - repository: &test.MockRepository{}, - }, - } - for name, test := range tests { - t.Run(name, func(t *testing.T) { - svc := New(test.repository, "test.com") - actual, err := svc.GetOne(test.id) - assert.Equal(t, test.expectedResponse, actual) - if test.expectedError != nil { - assert.Equal(t, test.expectedError, err) - } - }) - } -} - -func TestUpdate(t *testing.T) { - tests := map[string]struct { - updatePayload *SmartHook - expectedResult *SmartHook - expectedError error - repository *test.MockRepository - }{ - "it updates a smarthook": { - updatePayload: &SmartHook{Function: oltypes.String("function myFunc() {...}"), ID: oltypes.String("abc")}, - expectedResult: &SmartHook{ID: oltypes.String("abc"), Function: oltypes.String("ZnVuY3Rpb24gbXlGdW5jKCkgey4uLn0=")}, - repository: &test.MockRepository{ - UpdateFunc: func(r interface{}) ([]byte, error) { - return json.Marshal(SmartHook{ID: oltypes.String("abc"), Function: oltypes.String("ZnVuY3Rpb24gbXlGdW5jKCkgey4uLn0=")}) - }, - }, - }, - "it is forgiving of encoded Function": { - updatePayload: &SmartHook{ID: oltypes.String("abc"), Function: oltypes.String("ZnVuY3Rpb24gbXlGdW5jKCkgey4uLn0=")}, - expectedResult: &SmartHook{ID: oltypes.String("abc"), Function: oltypes.String("ZnVuY3Rpb24gbXlGdW5jKCkgey4uLn0=")}, - repository: &test.MockRepository{ - UpdateFunc: func(r interface{}) ([]byte, error) { - return json.Marshal(SmartHook{ID: oltypes.String("abc"), Function: oltypes.String("ZnVuY3Rpb24gbXlGdW5jKCkgey4uLn0=")}) - }, - }, - }, - "it returns an error if no function given": { - updatePayload: &SmartHook{ID: oltypes.String("abc")}, - expectedResult: nil, - expectedError: errors.New("No Function Definition Given"), - repository: &test.MockRepository{}, - }, - "it returns an error if no id on resource": { - updatePayload: &SmartHook{Function: oltypes.String("function myFunc() {...}")}, - expectedResult: nil, - expectedError: errors.New("No ID Given"), - repository: &test.MockRepository{}, - }, - "it returns an error if something went wrong": { - updatePayload: &SmartHook{ID: oltypes.String("abc"), Function: oltypes.String("function myFunc() {...}")}, - expectedResult: nil, - expectedError: errors.New("error"), - repository: &test.MockRepository{}, - }, - } - for name, test := range tests { - t.Run(name, func(t *testing.T) { - svc := New(test.repository, "test.com") - test.updatePayload.EncodeFunction() - out, err := svc.Update(test.updatePayload) - if test.expectedError != nil { - assert.Equal(t, test.expectedError, err) - } else { - assert.Equal(t, test.expectedResult, out) - } - }) - } -} - -func TestCreate(t *testing.T) { - tests := map[string]struct { - createPayload *SmartHook - expectedResult *SmartHook - expectedError error - repository *test.MockRepository - }{ - "it creates a smarthook by encoding a decoded function": { - createPayload: &SmartHook{Function: oltypes.String("function myFunc() {...}")}, - expectedResult: &SmartHook{ID: oltypes.String("abc"), Function: oltypes.String("ZnVuY3Rpb24gbXlGdW5jKCkgey4uLn0=")}, - repository: &test.MockRepository{ - CreateFunc: func(r interface{}) ([]byte, error) { - return json.Marshal(SmartHook{ID: oltypes.String("abc"), Function: oltypes.String("ZnVuY3Rpb24gbXlGdW5jKCkgey4uLn0=")}) - }, - }, - }, - "it is forgiving of encoded Function": { - createPayload: &SmartHook{Function: oltypes.String("ZnVuY3Rpb24gbXlGdW5jKCkgey4uLn0=")}, - expectedResult: &SmartHook{ID: oltypes.String("abc"), Function: oltypes.String("ZnVuY3Rpb24gbXlGdW5jKCkgey4uLn0=")}, - repository: &test.MockRepository{ - CreateFunc: func(r interface{}) ([]byte, error) { - return json.Marshal(SmartHook{ID: oltypes.String("abc"), Function: oltypes.String("ZnVuY3Rpb24gbXlGdW5jKCkgey4uLn0=")}) - }, - }, - }, - "it returns an error if no encoded or decoded function given": { - createPayload: &SmartHook{}, - expectedResult: nil, - expectedError: errors.New("No Function Definition Given"), - repository: &test.MockRepository{}, - }, - "it returns an error if something went wrong": { - createPayload: &SmartHook{Function: oltypes.String("function myFunc() {...}")}, - expectedResult: nil, - expectedError: errors.New("error"), - repository: &test.MockRepository{}, - }, - } - for name, test := range tests { - t.Run(name, func(t *testing.T) { - svc := New(test.repository, "test.com") - out, err := svc.Create(test.createPayload) - if test.expectedError != nil { - assert.Equal(t, test.expectedError, err) - } else { - assert.Equal(t, test.expectedResult, out) - } - }) - } -} - -func TestDestroy(t *testing.T) { - tests := map[string]struct { - id string - repository *test.MockRepository - expectedResponse *SmartHook - expectedError error - }{ - "it destroys one smarthook": { - id: "1", - repository: &test.MockRepository{ - DestroyFunc: func(r interface{}) ([]byte, error) { - return nil, nil - }, - }, - expectedResponse: &SmartHook{}, - }, - "it returns an error if there is a problem finding the smarthook": { - id: "1", - repository: &test.MockRepository{}, - expectedResponse: nil, - expectedError: errors.New("error"), - }, - } - for name, test := range tests { - t.Run(name, func(t *testing.T) { - svc := New(test.repository, "test.com") - err := svc.Destroy(test.id) - if test.expectedError != nil { - assert.Equal(t, test.expectedError, err) - } else { - assert.Nil(t, err) - } - }) - } -} - -func TestEncodeDecode(t *testing.T) { - tests := map[string]struct { - Subject *SmartHook - Decoded *SmartHook - Encoded *SmartHook - }{ - "It Encodes and Decodes the hook function": { - Subject: &SmartHook{ID: oltypes.String("abc"), Function: oltypes.String("function myFunc() {...}")}, - Decoded: &SmartHook{ID: oltypes.String("abc"), Function: oltypes.String("function myFunc() {...}")}, - Encoded: &SmartHook{ID: oltypes.String("abc"), Function: oltypes.String("ZnVuY3Rpb24gbXlGdW5jKCkgey4uLn0=")}, - }, - } - for name, test := range tests { - t.Run(name, func(t *testing.T) { - test.Subject.EncodeFunction() - assert.Equal(t, test.Encoded, test.Subject) - test.Subject.DecodeFunction() - assert.Equal(t, test.Decoded, test.Decoded) - }) - } -} diff --git a/pkg/services/smarthooks/v1.go b/pkg/services/smarthooks/v1.go deleted file mode 100644 index f69159f..0000000 --- a/pkg/services/smarthooks/v1.go +++ /dev/null @@ -1,159 +0,0 @@ -package smarthooks - -import ( - "encoding/json" - "errors" - "fmt" - - "github.com/onelogin/onelogin-go-sdk/pkg/services" - "github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp" -) - -const errSmartHooksV2Context = "smarthooks v1 service" - -// V1Service holds the information needed to interface with a repository -type V1Service struct { - Endpoint, ErrorContext string - Repository services.Repository -} - -// New creates the new svc service v2. -func New(repo services.Repository, host string) *V1Service { - return &V1Service{ - Endpoint: fmt.Sprintf("%s/api/2/hooks", host), - Repository: repo, - ErrorContext: errSmartHooksV2Context, - } -} - -type SmartHookWriteRequest struct { - *SmartHook - EnvVars []string `json:"env_vars"` -} - -// Query retrieves all the smarthooks from the repository that meet the query criteria passed in the -// request payload. If an empty payload is given, it will retrieve all smarthooks -func (svc *V1Service) Query(query *SmartHookQuery) ([]SmartHook, error) { - resp, err := svc.Repository.Read(olhttp.OLHTTPRequest{ - URL: svc.Endpoint, - Headers: map[string]string{"Content-Type": "application/json"}, - AuthMethod: "bearer", - Payload: query, - }) - if err != nil { - return nil, err - } - - var smarthooks []SmartHook - for _, bytes := range resp { - var unmarshalled []SmartHook - json.Unmarshal(bytes, &unmarshalled) - smarthooks = append(smarthooks, unmarshalled...) - } - return smarthooks, nil -} - -// GetOne retrieves the smarthook by id and returns it -func (svc *V1Service) GetOne(id string) (*SmartHook, error) { - out := SmartHook{} - resp, err := svc.Repository.Read(olhttp.OLHTTPRequest{ - URL: fmt.Sprintf("%s/%s", svc.Endpoint, id), - Headers: map[string]string{"Content-Type": "application/json"}, - AuthMethod: "bearer", - }) - if err != nil { - return &out, err - } - - if len(resp) < 1 { - return nil, errors.New("invalid length of response returned") - } - - json.Unmarshal(resp[0], &out) - return &out, nil -} - -// Create takes a smarthook without an id and attempts to use the parameters to create it -// in the API. Modifies the smarthook in place, or returns an error if one occurs -func (svc *V1Service) Create(smarthook *SmartHook) (*SmartHook, error) { - out := SmartHook{} - if smarthook.Function == nil { - return &out, errors.New("No Function Definition Given") - } - - envVars := make([]string, len(smarthook.EnvVars)) - for i, v := range smarthook.EnvVars { - envVars[i] = *v.Name - } - writeRequest := SmartHookWriteRequest{ - SmartHook: smarthook, - EnvVars: envVars, - } - - resp, err := svc.Repository.Create(olhttp.OLHTTPRequest{ - URL: svc.Endpoint, - Headers: map[string]string{"Content-Type": "application/json"}, - AuthMethod: "bearer", - Payload: writeRequest, - }) - if err != nil { - return &out, err - } - - json.Unmarshal(resp, &out) - return &out, nil -} - -// Update takes a smarthook and an id and attempts to use the parameters to update it -// in the API. Returns a new SmartHook object, or returns an error if one occurs -func (svc *V1Service) Update(smarthook *SmartHook) (*SmartHook, error) { - out := SmartHook{} - if smarthook.ID == nil { - return &out, errors.New("No ID Given") - } - if smarthook.Function == nil { - return &out, errors.New("No Function Definition Given") - } - - envVars := make([]string, len(smarthook.EnvVars)) - for i, v := range smarthook.EnvVars { - envVars[i] = *v.Name - } - writeRequest := SmartHookWriteRequest{ - SmartHook: smarthook, - EnvVars: envVars, - } - - id := *smarthook.ID - smarthook.ID = nil - resp, err := svc.UpdateRaw(id, writeRequest) - if err != nil { - return &out, err - } - - json.Unmarshal(resp, &out) - return &out, nil -} - -// UpdateRaw takes a smarthook and an id and attempts to use the parameters to update it -// in the API. Returns the raw response bytes, or returns an error if one occurs -func (svc *V1Service) UpdateRaw(id string, smarthook interface{}) ([]byte, error) { - return svc.Repository.Update(olhttp.OLHTTPRequest{ - URL: fmt.Sprintf("%s/%s", svc.Endpoint, id), - Headers: map[string]string{"Content-Type": "application/json"}, - AuthMethod: "bearer", - Payload: smarthook, - }) -} - -// Destroy deletes the smarthook with the given id, and if successful, it returns nil -func (svc *V1Service) Destroy(id string) error { - if _, err := svc.Repository.Destroy(olhttp.OLHTTPRequest{ - URL: fmt.Sprintf("%s/%s", svc.Endpoint, id), - Headers: map[string]string{"Content-Type": "application/json"}, - AuthMethod: "bearer", - }); err != nil { - return err - } - return nil -} diff --git a/pkg/services/user_mappings/model.go b/pkg/services/user_mappings/model.go deleted file mode 100644 index d1838eb..0000000 --- a/pkg/services/user_mappings/model.go +++ /dev/null @@ -1,37 +0,0 @@ -package usermappings - -// UserMappingsQuery represents available query parameters for mappings -type UserMappingsQuery struct { - Limit string - Page string - Cursor string - HasCondition string - HasConditionType string - HasAction string - HasActionType string - Enabled string -} - -// UserMapping is the contract for User Mappings. -type UserMapping struct { - ID *int32 `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Match *string `json:"match,omitempty"` - Enabled *bool `json:"enabled,omitempty"` - Position *int32 `json:"position,omitempty"` - Conditions []UserMappingConditions `json:"conditions"` - Actions []UserMappingActions `json:"actions"` -} - -// UserMappingConditions is the contract for User Mapping Conditions. -type UserMappingConditions struct { - Source *string `json:"source,omitempty"` - Operator *string `json:"operator,omitempty"` - Value *string `json:"value,omitempty"` -} - -// UserMappingActions is the contract for User Mapping Actions. -type UserMappingActions struct { - Action *string `json:"action,omitempty"` - Value []string `json:"value,omitempty"` -} diff --git a/pkg/services/user_mappings/user_mappings_test.go b/pkg/services/user_mappings/user_mappings_test.go deleted file mode 100644 index 60d02eb..0000000 --- a/pkg/services/user_mappings/user_mappings_test.go +++ /dev/null @@ -1,457 +0,0 @@ -package usermappings - -import ( - "encoding/json" - "errors" - "github.com/onelogin/onelogin-go-sdk/internal/test" - "github.com/onelogin/onelogin-go-sdk/pkg/oltypes" - "github.com/stretchr/testify/assert" - "testing" -) - -type MockLegalValuesService struct { - DoFunc func(addr string, o interface{}) error -} - -func (svc MockLegalValuesService) Query(addr string, o interface{}) error { - if svc.DoFunc != nil { - return svc.DoFunc(addr, o) - } - return errors.New("legal val error") -} - -func TestQuery(t *testing.T) { - tests := map[string]struct { - queryPayload *UserMappingsQuery - mockLegalValues *MockLegalValuesService - expectedResponse []UserMapping - expectedError error - repository *test.MockRepository - }{ - "it gets one mapping": { - queryPayload: &UserMappingsQuery{Limit: "1"}, - mockLegalValues: &MockLegalValuesService{}, - expectedResponse: []UserMapping{ - UserMapping{ID: oltypes.Int32(1), Name: oltypes.String("mapping")}, - }, - repository: &test.MockRepository{ - ReadFunc: func(r interface{}) ([][]byte, error) { - b, err := json.Marshal([]UserMapping{UserMapping{ID: oltypes.Int32(1), Name: oltypes.String("mapping")}}) - return [][]byte{b}, err - }, - }, - }, - "it returns the remote default limit of mappings if no query given": { - queryPayload: &UserMappingsQuery{}, - expectedResponse: []UserMapping{ - UserMapping{ID: oltypes.Int32(1), Name: oltypes.String("name")}, - UserMapping{ID: oltypes.Int32(1), Name: oltypes.String("name2")}, - }, - repository: &test.MockRepository{ - ReadFunc: func(r interface{}) ([][]byte, error) { - b, err := json.Marshal([]UserMapping{ - UserMapping{ID: oltypes.Int32(1), Name: oltypes.String("name")}, - UserMapping{ID: oltypes.Int32(1), Name: oltypes.String("name2")}, - }) - return [][]byte{b}, err - }, - }, - }, - "it returns the nothing and error if call to /mappings fails": { - queryPayload: &UserMappingsQuery{}, - expectedError: errors.New("error"), - expectedResponse: nil, - repository: &test.MockRepository{}, - }, - "it returns an empty response if no mappings meet the criteria": { - queryPayload: &UserMappingsQuery{HasAction: "???"}, - expectedResponse: []UserMapping{}, - repository: &test.MockRepository{ - ReadFunc: func(r interface{}) ([][]byte, error) { - b, err := json.Marshal([]UserMapping{}) - return [][]byte{b}, err - }, - }, - }, - } - for name, test := range tests { - t.Run(name, func(t *testing.T) { - svc := New(test.repository, test.mockLegalValues, "test.com") - actual, err := svc.Query(test.queryPayload) - assert.Equal(t, test.expectedResponse, actual) - if test.expectedError != nil { - assert.Equal(t, test.expectedError, err) - } - }) - } -} - -func TestGetOne(t *testing.T) { - tests := map[string]struct { - id int32 - expectedResponse *UserMapping - expectedError error - repository *test.MockRepository - }{ - "it gets one mapping": { - id: int32(1), - expectedResponse: &UserMapping{ID: oltypes.Int32(1), Name: oltypes.String("name")}, - repository: &test.MockRepository{ - ReadFunc: func(r interface{}) ([][]byte, error) { - b, err := json.Marshal(UserMapping{ID: oltypes.Int32(1), Name: oltypes.String("name")}) - return [][]byte{b}, err - }, - }, - }, - "it returns an error if there is a problem finding the mapping": { - id: int32(2), - expectedResponse: nil, - expectedError: errors.New("error"), - repository: &test.MockRepository{}, - }, - } - for name, test := range tests { - t.Run(name, func(t *testing.T) { - svc := New(test.repository, MockLegalValuesService{}, "test.com") - actual, err := svc.GetOne(test.id) - assert.Equal(t, test.expectedResponse, actual) - if test.expectedError != nil { - assert.Equal(t, test.expectedError, err) - } - }) - } -} - -func TestUpdate(t *testing.T) { - tests := map[string]struct { - updatePayload *UserMapping - expectedResponse *UserMapping - mockLegalValues *MockLegalValuesService - expectedError error - repository *test.MockRepository - }{ - "it updates one user mapping": { - updatePayload: &UserMapping{ - ID: oltypes.Int32(1), - Name: oltypes.String("updated"), - Conditions: []UserMappingConditions{{Operator: oltypes.String("ri"), Source: oltypes.String("has_role"), Value: oltypes.String("12345")}}, - Actions: []UserMappingActions{{Value: []string{"12345"}, Action: oltypes.String("set_status")}}, - }, - expectedResponse: &UserMapping{ - ID: oltypes.Int32(1), - Name: oltypes.String("updated"), - Conditions: []UserMappingConditions{{Operator: oltypes.String("ri"), Source: oltypes.String("has_role"), Value: oltypes.String("12345")}}, - Actions: []UserMappingActions{{Value: []string{"12345"}, Action: oltypes.String("set_status")}}, - }, - mockLegalValues: &MockLegalValuesService{ - DoFunc: func(addr string, o interface{}) error { - json.Unmarshal([]byte(`[{"value":"ri"}, {"value":"has_role"}, {"value": "12345"}, {"value": "set_status"}]`), o) - return nil - }, - }, - repository: &test.MockRepository{ - UpdateFunc: func(r interface{}) ([]byte, error) { - return json.Marshal(map[string]int32{"id": 1}) - }, - }, - }, - "it updates one user mapping allowing freeform inputs when no valid values returned": { - updatePayload: &UserMapping{ - ID: oltypes.Int32(1), - Name: oltypes.String("updated"), - Conditions: []UserMappingConditions{{ - Operator: oltypes.String("ri"), - Source: oltypes.String("has_role"), - Value: oltypes.String("12345"), - }}, - Actions: []UserMappingActions{{ - Value: []string{"1"}, - Action: oltypes.String("set_status"), - }}, - }, - expectedResponse: &UserMapping{ - ID: oltypes.Int32(1), - Name: oltypes.String("updated"), - Conditions: []UserMappingConditions{{ - Operator: oltypes.String("ri"), - Source: oltypes.String("has_role"), - Value: oltypes.String("12345"), - }}, - Actions: []UserMappingActions{{ - Value: []string{"1"}, - Action: oltypes.String("set_status"), - }}, - }, - mockLegalValues: &MockLegalValuesService{ - DoFunc: func(addr string, o interface{}) error { - json.Unmarshal([]byte(`[]`), o) - return nil - }, - }, - repository: &test.MockRepository{ - UpdateFunc: func(r interface{}) ([]byte, error) { - return json.Marshal(map[string]int32{"id": 1}) - }, - }, - }, - "it returns an error if an invalid condition or action value given": { - updatePayload: &UserMapping{ - ID: oltypes.Int32(1), - Name: oltypes.String("updated"), - Conditions: []UserMappingConditions{{ - Operator: oltypes.String("asdf"), - Source: oltypes.String("asdf"), - Value: oltypes.String("asdf"), - }}, - Actions: []UserMappingActions{{ - Value: []string{"2"}, - Action: oltypes.String("asdf"), - }}, - }, - expectedError: errors.New("updated.conditions.source must be one of [ri has_role 12345], got: asdf, updated.conditions.value must be one of [ri has_role 12345], got: asdf, updated.conditions.operator must be one of [ri has_role 12345], got: asdf, updated.actions.action must be one of [ri has_role 12345], got: asdf, updated.actions.values must be one of [ri has_role 12345], got: 2"), - mockLegalValues: &MockLegalValuesService{ - DoFunc: func(addr string, o interface{}) error { - json.Unmarshal([]byte(`[{"value":"ri"}, {"value":"has_role"}, {"value": "12345"}]`), o) - return nil - }, - }, - repository: &test.MockRepository{}, - }, - "it returns an error if there is a problem finding the mapping": { - updatePayload: &UserMapping{ - ID: oltypes.Int32(1), - Name: oltypes.String("updated"), - Conditions: []UserMappingConditions{{ - Operator: oltypes.String("ri"), - Source: oltypes.String("has_role"), - Value: oltypes.String("12345"), - }}, - Actions: []UserMappingActions{{ - Value: []string{"1"}, - Action: oltypes.String("set_status"), - }}, - }, - expectedError: errors.New("error"), - mockLegalValues: &MockLegalValuesService{ - DoFunc: func(addr string, o interface{}) error { - json.Unmarshal([]byte(`[{"value":"ri"}, "value":"has_role", "value": "12345"]`), o) - return nil - }, - }, - repository: &test.MockRepository{}, - }, - } - for name, test := range tests { - t.Run(name, func(t *testing.T) { - svc := New(test.repository, test.mockLegalValues, "test.com") - err := svc.Update(test.updatePayload) - if test.expectedError != nil { - assert.Equal(t, test.expectedError, err) - } else { - assert.Equal(t, test.expectedResponse, test.updatePayload) - } - }) - } -} - -func TestCreate(t *testing.T) { - tests := map[string]struct { - createPayload *UserMapping - expectedResponse *UserMapping - mockLegalValues *MockLegalValuesService - expectedError error - repository *test.MockRepository - }{ - "it creates one mapping": { - createPayload: &UserMapping{ - Name: oltypes.String("rule"), - Conditions: []UserMappingConditions{{ - Operator: oltypes.String("ri"), - Source: oltypes.String("has_role"), - Value: oltypes.String("12345"), - }}, - Actions: []UserMappingActions{{ - Value: []string{"1"}, - Action: oltypes.String("set_status"), - }}, - }, - expectedResponse: &UserMapping{ - ID: oltypes.Int32(1), - Name: oltypes.String("rule"), - Conditions: []UserMappingConditions{{ - Operator: oltypes.String("ri"), - Source: oltypes.String("has_role"), - Value: oltypes.String("12345"), - }}, - Actions: []UserMappingActions{{ - Value: []string{"1"}, - Action: oltypes.String("set_status"), - }}, - }, - mockLegalValues: &MockLegalValuesService{ - DoFunc: func(addr string, o interface{}) error { - json.Unmarshal([]byte(`[{"value":"ri"}, "value":"has_role", "value": "12345"]`), o) - return nil - }, - }, - repository: &test.MockRepository{ - CreateFunc: func(r interface{}) ([]byte, error) { - return json.Marshal(map[string]int32{"id": 1}) - }, - }, - }, - "it returns an error if an invalid condition or action value given": { - createPayload: &UserMapping{ - Name: oltypes.String("updated"), - Conditions: []UserMappingConditions{{ - Operator: oltypes.String("asdf"), - Source: oltypes.String("asdf"), - Value: oltypes.String("asdf"), - }}, - Actions: []UserMappingActions{{ - Value: []string{"2"}, - Action: oltypes.String("asdf"), - }}, - }, - expectedError: errors.New("updated.conditions.source must be one of [ri has_role 12345], got: asdf, updated.conditions.value must be one of [ri has_role 12345], got: asdf, updated.conditions.operator must be one of [ri has_role 12345], got: asdf, updated.actions.action must be one of [ri has_role 12345], got: asdf, updated.actions.values must be one of [ri has_role 12345], got: 2"), - mockLegalValues: &MockLegalValuesService{ - DoFunc: func(addr string, o interface{}) error { - json.Unmarshal([]byte(`[{"value":"ri"}, {"value":"has_role"}, {"value": "12345"}]`), o) - return nil - }, - }, - repository: &test.MockRepository{}, - }, - "it returns an error if there is a bad request": { - createPayload: &UserMapping{ID: oltypes.Int32(1), Name: oltypes.String("not allowed value")}, - expectedError: errors.New("error"), - repository: &test.MockRepository{}, - mockLegalValues: &MockLegalValuesService{ - DoFunc: func(addr string, o interface{}) error { - json.Unmarshal([]byte(`[{"value":"ri"}, "value":"has_role", "value": "12345"]`), o) - return nil - }, - }, - }, - } - for name, test := range tests { - t.Run(name, func(t *testing.T) { - svc := New(test.repository, test.mockLegalValues, "test.com") - err := svc.Create(test.createPayload) - if test.expectedError != nil { - assert.Equal(t, test.expectedError, err) - } else { - assert.Equal(t, test.expectedResponse, test.createPayload) - } - }) - } -} - -func TestDestroy(t *testing.T) { - tests := map[string]struct { - id int32 - repository *test.MockRepository - mockLegalValues *MockLegalValuesService - expectedResponse *UserMapping - expectedError error - }{ - "it destroys one user mapping": { - id: int32(1), - repository: &test.MockRepository{ - DestroyFunc: func(r interface{}) ([]byte, error) { - return nil, nil - }, - }, - expectedResponse: &UserMapping{}, - }, - "it returns an error if there is a problem finding the user mapping": { - id: int32(2), - repository: &test.MockRepository{}, - expectedResponse: nil, - expectedError: errors.New("error"), - }, - } - for name, test := range tests { - t.Run(name, func(t *testing.T) { - svc := New(test.repository, MockLegalValuesService{}, "test.com") - err := svc.Destroy(test.id) - if test.expectedError != nil { - assert.Equal(t, test.expectedError, err) - } else { - assert.Nil(t, err) - } - }) - } -} - -func TestValidateMappingValues(t *testing.T) { - tests := map[string]struct { - inputMapping *UserMapping - mockLegalValues *MockLegalValuesService - expectedError error - }{ - "it returns nil for valid mapping values": { - inputMapping: &UserMapping{ - ID: oltypes.Int32(1), - Name: oltypes.String("updated"), - Conditions: []UserMappingConditions{{Operator: oltypes.String("ri"), Source: oltypes.String("has_role"), Value: oltypes.String("12345")}}, - Actions: []UserMappingActions{{Value: []string{"12345"}, Action: oltypes.String("set_status")}}, - }, - mockLegalValues: &MockLegalValuesService{ - DoFunc: func(addr string, o interface{}) error { - json.Unmarshal([]byte(`[{"value":"ri"}, {"value":"has_role"}, {"value": "12345"}, {"value": "set_status"}]`), o) - return nil - }, - }, - }, - "it updates one user mapping allowing freeform inputs when no valid values returned": { - inputMapping: &UserMapping{ - ID: oltypes.Int32(1), - Name: oltypes.String("updated"), - Conditions: []UserMappingConditions{{ - Operator: oltypes.String("ri"), - Source: oltypes.String("has_role"), - Value: oltypes.String("12345"), - }}, - Actions: []UserMappingActions{{ - Value: []string{"1"}, - Action: oltypes.String("set_status"), - }}, - }, - mockLegalValues: &MockLegalValuesService{ - DoFunc: func(addr string, o interface{}) error { - json.Unmarshal([]byte(`[]`), o) - return nil - }, - }, - }, - "it returns an error if an invalid condition or action value given": { - inputMapping: &UserMapping{ - ID: oltypes.Int32(1), - Name: oltypes.String("updated"), - Conditions: []UserMappingConditions{{ - Operator: oltypes.String("asdf"), - Source: oltypes.String("asdf"), - Value: oltypes.String("asdf"), - }}, - Actions: []UserMappingActions{{ - Value: []string{"2"}, - Action: oltypes.String("asdf"), - }}, - }, - expectedError: errors.New("updated.conditions.source must be one of [ri has_role 12345], got: asdf, updated.conditions.value must be one of [ri has_role 12345], got: asdf, updated.conditions.operator must be one of [ri has_role 12345], got: asdf, updated.actions.action must be one of [ri has_role 12345], got: asdf, updated.actions.values must be one of [ri has_role 12345], got: 2"), - mockLegalValues: &MockLegalValuesService{ - DoFunc: func(addr string, o interface{}) error { - json.Unmarshal([]byte(`[{"value":"ri"}, {"value":"has_role"}, {"value": "12345"}]`), o) - return nil - }, - }, - }, - } - for name, test := range tests { - t.Run(name, func(t *testing.T) { - actualErr := validateMappingValues(test.inputMapping, test.mockLegalValues) - assert.Equal(t, test.expectedError, actualErr) - }) - } -} diff --git a/pkg/services/user_mappings/v2.go b/pkg/services/user_mappings/v2.go deleted file mode 100644 index 954d646..0000000 --- a/pkg/services/user_mappings/v2.go +++ /dev/null @@ -1,239 +0,0 @@ -package usermappings - -import ( - "encoding/json" - "errors" - "fmt" - "log" - - "github.com/onelogin/onelogin-go-sdk/internal/customerrors" - "github.com/onelogin/onelogin-go-sdk/pkg/oltypes" - "github.com/onelogin/onelogin-go-sdk/pkg/services" - "github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp" - "github.com/onelogin/onelogin-go-sdk/pkg/utils" - - "sync" -) - -const errUserMappingsV2Context = "user mappings v2 service" - -// V2Service holds the information needed to interface with a repository -type V2Service struct { - Endpoint, ErrorContext string - Repository services.Repository - LegalValuesService services.SimpleQuery -} - -// New creates the new svc service v2. -func New(repo services.Repository, legalValues services.SimpleQuery, host string) *V2Service { - return &V2Service{ - Endpoint: fmt.Sprintf("%s/api/2/mappings", host), - Repository: repo, - ErrorContext: errUserMappingsV2Context, - LegalValuesService: legalValues, - } -} - -// Query retrieves all the userMappings from the repository that meet the query criteria passed in the -// request payload. If an empty payload is given, it will retrieve all userMappings -func (svc *V2Service) Query(query *UserMappingsQuery) ([]UserMapping, error) { - resp, err := svc.Repository.Read(olhttp.OLHTTPRequest{ - URL: svc.Endpoint, - Headers: map[string]string{"Content-Type": "userMappinglication/json"}, - AuthMethod: "bearer", - Payload: query, - }) - if err != nil { - return nil, err - } - - var userMappings []UserMapping - for _, bytes := range resp { - var unmarshalled []UserMapping - json.Unmarshal(bytes, &unmarshalled) - if len(userMappings) == 0 { - userMappings = unmarshalled - } else { - userMappings = append(userMappings, unmarshalled...) - } - } - - return userMappings, nil -} - -// GetOne retrieves the user mapping by id, and if successful, it returns -// the http response and the pointer to the user mapping. -func (svc *V2Service) GetOne(id int32) (*UserMapping, error) { - resp, err := svc.Repository.Read(olhttp.OLHTTPRequest{ - URL: fmt.Sprintf("%s/%d", svc.Endpoint, id), - Headers: map[string]string{"Content-Type": "application/json"}, - AuthMethod: "bearer", - }) - if err != nil { - return nil, err - } - - var mapping UserMapping - - if len(resp) < 1 { - return nil, errors.New("invalid length of response returned") - } - json.Unmarshal(resp[0], &mapping) - - return &mapping, nil -} - -// Update takes a user mapping and an id and attempts to use the parameters to update it -// in the API. Modifies the user mapping in place, or returns an error if one occurs -func (svc *V2Service) Update(mapping *UserMapping) error { - if mapping.ID == nil { - return errors.New("No ID Given") - } - validationErr := validateMappingValues(mapping, svc.LegalValuesService) - if validationErr != nil { - return validationErr - } - id := *mapping.ID - mapping.ID = nil - resp, err := svc.UpdateRaw(id, mapping) - if err != nil { - return err - } - - var mappingID map[string]int - json.Unmarshal(resp, &mappingID) - - mapping.ID = oltypes.Int32(int32(mappingID["id"])) - - return nil -} - -// UpdateRaw takes a user mapping and an id and attempts to use the parameters to update it -// in the API. Returns the raw response bytes or an error. -func (svc *V2Service) UpdateRaw(id int32, mapping interface{}) ([]byte, error) { - return svc.Repository.Update(olhttp.OLHTTPRequest{ - URL: fmt.Sprintf("%s/%d", svc.Endpoint, id), - Headers: map[string]string{"Content-Type": "application/json"}, - AuthMethod: "bearer", - Payload: mapping, - }) -} - -// Create creates a new user mapping, and if successful, it returns -// the http response and the pointer to the user mapping. -func (svc *V2Service) Create(mapping *UserMapping) error { - validationErr := validateMappingValues(mapping, svc.LegalValuesService) - if validationErr != nil { - return validationErr - } - resp, err := svc.Repository.Create(olhttp.OLHTTPRequest{ - URL: svc.Endpoint, - Headers: map[string]string{"Content-Type": "application/json"}, - AuthMethod: "bearer", - Payload: mapping, - }) - - if err != nil { - return err - } - var mappingID map[string]int - json.Unmarshal(resp, &mappingID) - - mapping.ID = oltypes.Int32(int32(mappingID["id"])) - - return nil -} - -// Destroy deletes the user mapping for the id, and if successful, it returns nil -func (svc *V2Service) Destroy(id int32) error { - if _, err := svc.Repository.Destroy(olhttp.OLHTTPRequest{ - URL: fmt.Sprintf("%s/%d", svc.Endpoint, id), - Headers: map[string]string{"Content-Type": "application/json"}, - AuthMethod: "bearer", - }); err != nil { - return err - } - return nil -} - -func validateMappingValues(mapping *UserMapping, svc services.SimpleQuery) error { - legalValRequests := map[string][]string{} - legalValRequests["mappings/conditions"] = []string{} - legalValRequests["mappings/actions"] = []string{} - for _, condition := range mapping.Conditions { - legalValRequests[fmt.Sprintf("mappings/conditions/%s/values", *condition.Source)] = []string{} - legalValRequests[fmt.Sprintf("mappings/conditions/%s/operators", *condition.Source)] = []string{} - } - for _, action := range mapping.Actions { - legalValRequests[fmt.Sprintf("mappings/actions/%s/values", *action.Action)] = []string{} - } - - var ( - wg sync.WaitGroup - mutex = &sync.Mutex{} - ) - for reqURL := range legalValRequests { - wg.Add(1) - go func(reqURL string, legalValRequest map[string][]string) { - defer wg.Done() - legalValResp := []map[string]string{} - err := svc.Query(reqURL, &legalValResp) - if err != nil { - log.Println("Problem validating mapping", reqURL, err) - } - legalVals := make([]string, len(legalValResp)) - for i, legalVal := range legalValResp { - legalVals[i] = legalVal["value"] - } - mutex.Lock() - legalValRequests[reqURL] = legalVals - mutex.Unlock() - }(reqURL, legalValRequests) - } - wg.Wait() - - errorMsgs := make([]error, 0) - for _, condition := range mapping.Conditions { - if len(legalValRequests["mappings/conditions"]) > 0 { - err := utils.OneOf(fmt.Sprintf("%s.conditions.source", *mapping.Name), *condition.Source, legalValRequests["mappings/conditions"]) - if err != nil { - log.Println("Illegal value given for condition source") - errorMsgs = append(errorMsgs, err) - } - } - if len(legalValRequests[fmt.Sprintf("mappings/conditions/%s/values", *condition.Source)]) > 0 { - err := utils.OneOf(fmt.Sprintf("%s.conditions.value", *mapping.Name), *condition.Value, legalValRequests[fmt.Sprintf("mappings/conditions/%s/values", *condition.Source)]) - if err != nil { - log.Println("Illegal value given for condition value") - errorMsgs = append(errorMsgs, err) - } - } - if len(legalValRequests[fmt.Sprintf("mappings/conditions/%s/operators", *condition.Source)]) > 0 { - err := utils.OneOf(fmt.Sprintf("%s.conditions.operator", *mapping.Name), *condition.Operator, legalValRequests[fmt.Sprintf("mappings/conditions/%s/operators", *condition.Source)]) - if err != nil { - log.Println("Illegal value given for condition operator") - errorMsgs = append(errorMsgs, err) - } - } - } - - for _, action := range mapping.Actions { - if len(legalValRequests["mappings/actions"]) > 0 { - err := utils.OneOf(fmt.Sprintf("%s.actions.action", *mapping.Name), *action.Action, legalValRequests["mappings/actions"]) - if err != nil { - log.Println("Illegal value given for action") - errorMsgs = append(errorMsgs, err) - } - } - for _, val := range action.Value { - if len(legalValRequests[fmt.Sprintf("mappings/actions/%s/values", *action.Action)]) > 0 { - err := utils.OneOf(fmt.Sprintf("%s.actions.values", *mapping.Name), val, legalValRequests[fmt.Sprintf("mappings/actions/%s/values", *action.Action)]) - if err != nil { - log.Println("Illegal value given for action value") - errorMsgs = append(errorMsgs, err) - } - } - } - } - return customerrors.StackErrors(errorMsgs) -} diff --git a/pkg/services/users/model.go b/pkg/services/users/model.go deleted file mode 100644 index 3778d14..0000000 --- a/pkg/services/users/model.go +++ /dev/null @@ -1,94 +0,0 @@ -package users - -import "time" - -const ( - StateUnapproved int32 = iota - StateApproved - StateRejected - StateUnlicensed -) - -const ( - StatusUnActivated int32 = iota - StatusActive // Only users assigned this status can log in to OneLogin. - StatusSuspended - StatusLocked - StatusPasswordExpired - StatusAwaitingPasswordReset // The user is required to reset their password. - statusUnused6 // There is not user status with a value of 6. - StatusPasswordPending // The user has not yet set their password. - StatusSecurityQuestionsRequired // The user has not yet set their security questions. -) - -// UserQuery represents available query parameters -type UserQuery struct { - Limit string - Page string - Cursor string - CreatedSince *time.Time `json:"created_since,omitempty"` - CreatedUntil *time.Time `json:"created_until,omitempty"` - UpdatedSince *time.Time `json:"updated_since,omitempty"` - UpdatedUntil *time.Time `json:"updated_until,omitempty"` - LastLoginSince *time.Time `json:"last_login_since,omitempty"` - LastLoginUntil *time.Time `json:"last_login_until,omitempty"` - Firstname *string `json:"firstname,omitempty"` - Lastname *string `json:"lastname,omitempty"` - Email *string `json:"email,omitempty"` - Username *string `json:"username,omitempty"` - Samaccountname *string `json:"samaccountname,omitempty"` - DirectoryID *string `json:"directory_id,omitempty"` - ExternalID *string `json:"external_id,omitempty"` - AppID *string `json:"app_id,omitempty"` - UserIDs *string `json:"user_ids,omitempty"` - Fields *string `json:"fields,omitempty"` -} - -// User represents a OneLogin User -type User struct { - Firstname *string `json:"firstname,omitempty"` - Lastname *string `json:"lastname,omitempty"` - Username *string `json:"username,omitempty"` - Email *string `json:"email,omitempty"` - DistinguishedName *string `json:"distinguished_name,omitempty"` - Samaccountname *string `json:"samaccountname,omitempty"` - UserPrincipalName *string `json:"userprincipalname,omitempty"` - MemberOf *string `json:"member_of,omitempty"` - Phone *string `json:"phone,omitempty"` - Password *string `json:"password,omitempty"` - PasswordConfirmation *string `json:"password_confirmation,omitempty"` - PasswordAlgorithm *string `json:"password_algorithm,omitempty"` - Salt *string `json:"salt,omitempty"` - Title *string `json:"title,omitempty"` - Company *string `json:"company,omitempty"` - Department *string `json:"department,omitempty"` - Comment *string `json:"comment,omitempty"` - CreatedAt *time.Time `json:"created_at,omitempty"` - UpdatedAt *time.Time `json:"updated_at,omitempty"` - ActivatedAt *time.Time `json:"activated_at,omitempty"` - LastLogin *time.Time `json:"last_login,omitempty"` - PasswordChangedAt *time.Time `json:"password_changed_at,omitempty"` - LockedUntil *time.Time `json:"locked_until,omitempty"` - InvitationSentAt *time.Time `json:"invitation_sent_at,omitempty"` - State *int32 `json:"state,omitempty"` - Status *int32 `json:"status,omitempty"` - InvalidLoginAttempts *int32 `json:"invalid_login_attempts,omitempty"` - GroupID *int32 `json:"group_id,omitempty"` - DirectoryID *int32 `json:"directory_id,omitempty"` - TrustedIDPID *int32 `json:"trusted_idp_id,omitempty"` - ManagerADID *int32 `json:"manager_ad_id,omitempty"` - ManagerUserID *int32 `json:"manager_user_id,omitempty"` - ExternalID *int32 `json:"external_id,omitempty"` - ID *int32 `json:"id,omitempty"` - CustomAttributes map[string]interface{} `json:"custom_attributes,omitempty"` -} - -// UserApp is the contract for a users app. -type UserApp struct { - ID *int32 `json:"id,omitempty"` - IconURL *string `json:"icon_url,omitempty"` - LoginID *int32 `json:"login_id,omitempty"` - ProvisioningStatus *string `json:"provisioning_status,omitempty"` - ProvisioningState *string `json:"provisioning_state,omitempty"` - ProvisioningEnabled *bool `json:"provisioning_enabled,omitempty"` -} diff --git a/pkg/services/users/users_test.go b/pkg/services/users/users_test.go deleted file mode 100644 index c14b6c2..0000000 --- a/pkg/services/users/users_test.go +++ /dev/null @@ -1,262 +0,0 @@ -package users - -import ( - "encoding/json" - "errors" - "testing" - - "github.com/onelogin/onelogin-go-sdk/internal/test" - "github.com/onelogin/onelogin-go-sdk/pkg/oltypes" - "github.com/stretchr/testify/assert" -) - -func TestQuery(t *testing.T) { - tests := map[string]struct { - queryPayload *UserQuery - expectedResponse []User - expectedError error - repository *test.MockRepository - }{ - "it gets one user": { - queryPayload: &UserQuery{Limit: "1"}, - expectedResponse: []User{User{ID: oltypes.Int32(1), Firstname: oltypes.String("name")}}, - repository: &test.MockRepository{ - ReadFunc: func(r interface{}) ([][]byte, error) { - b, err := json.Marshal([]User{User{ID: oltypes.Int32(1), Firstname: oltypes.String("name")}}) - return [][]byte{b}, err - }, - }, - }, - "it returns the remote default limit of users if no query given": { - queryPayload: &UserQuery{}, - expectedResponse: []User{ - User{ID: oltypes.Int32(1), Firstname: oltypes.String("name")}, - User{ID: oltypes.Int32(1), Firstname: oltypes.String("name2")}, - }, - repository: &test.MockRepository{ - ReadFunc: func(r interface{}) ([][]byte, error) { - b, err := json.Marshal([]User{ - User{ID: oltypes.Int32(1), Firstname: oltypes.String("name")}, - User{ID: oltypes.Int32(1), Firstname: oltypes.String("name2")}, - }) - return [][]byte{b}, err - }, - }, - }, - "it returns an error if the call to /users fails": { - queryPayload: &UserQuery{}, - expectedError: errors.New("error"), - expectedResponse: nil, - repository: &test.MockRepository{}, - }, - } - for name, test := range tests { - t.Run(name, func(t *testing.T) { - svc := New(test.repository, "test.com") - actual, err := svc.Query(test.queryPayload) - assert.Equal(t, test.expectedResponse, actual) - if test.expectedError != nil { - assert.Equal(t, test.expectedError, err) - } - }) - } -} - -func TestGetOne(t *testing.T) { - tests := map[string]struct { - id int32 - expectedResponse *User - expectedError error - repository *test.MockRepository - }{ - "it gets one user by id": { - id: int32(1), - expectedResponse: &User{ID: oltypes.Int32(1), Firstname: oltypes.String("first")}, - repository: &test.MockRepository{ - ReadFunc: func(r interface{}) ([][]byte, error) { - b, err := json.Marshal(User{ID: oltypes.Int32(1), Firstname: oltypes.String("first")}) - return [][]byte{b}, err - }, - }, - }, - "it returns an error if the call to /users fails": { - expectedError: errors.New("error"), - expectedResponse: nil, - repository: &test.MockRepository{}, - }, - } - for name, test := range tests { - t.Run(name, func(t *testing.T) { - svc := New(test.repository, "test.com") - actual, err := svc.GetOne(test.id) - assert.Equal(t, test.expectedResponse, actual) - if test.expectedError != nil { - assert.Equal(t, test.expectedError, err) - } - }) - } -} - -func TestGetApps(t *testing.T) { - tests := map[string]struct { - id int32 - expectedResponse []UserApp - expectedError error - repository *test.MockRepository - }{ - "it gets apps for a user": { - id: 1, - expectedResponse: []UserApp{{ - ID: oltypes.Int32(1), - IconURL: oltypes.String("https://example.com/32x32.png"), - LoginID: oltypes.Int32(2), - ProvisioningStatus: oltypes.String("enabled"), - ProvisioningState: oltypes.String("modifying"), - ProvisioningEnabled: oltypes.Bool(true), - }}, - expectedError: nil, - repository: &test.MockRepository{ - ReadFunc: func(r interface{}) ([][]byte, error) { - b, err := json.Marshal([]UserApp{{ - ID: oltypes.Int32(1), - IconURL: oltypes.String("https://example.com/32x32.png"), - LoginID: oltypes.Int32(2), - ProvisioningStatus: oltypes.String("enabled"), - ProvisioningState: oltypes.String("modifying"), - ProvisioningEnabled: oltypes.Bool(true), - }}) - return [][]byte{b}, err - }, - }, - }, - "it returns an error if there is a problem finding the apps": { - id: int32(2), - expectedResponse: nil, - expectedError: errors.New("error"), - repository: &test.MockRepository{}, - }, - } - - for name, test := range tests { - t.Run(name, func(t *testing.T) { - svc := New(test.repository, "test.com") - actual, err := svc.GetApps(test.id) - assert.Equal(t, test.expectedResponse, actual) - assert.Equal(t, test.expectedError, err) - }) - } -} - -func TestUpdate(t *testing.T) { - tests := map[string]struct { - updatePayload *User - expectedResult *User - expectedError error - repository *test.MockRepository - }{ - "it updates a user": { - updatePayload: &User{Firstname: oltypes.String("update"), ID: oltypes.Int32(int32(1))}, - expectedResult: &User{ID: oltypes.Int32(1), Firstname: oltypes.String("update")}, - repository: &test.MockRepository{ - UpdateFunc: func(r interface{}) ([]byte, error) { - return json.Marshal(User{ID: oltypes.Int32(1), Firstname: oltypes.String("update")}) - }, - }, - }, - "it returns an error if no id on resource": { - updatePayload: &User{Firstname: oltypes.String("update")}, - expectedResult: &User{}, - expectedError: errors.New("No ID Given"), - repository: &test.MockRepository{}, - }, - "it returns an error if something went wrong": { - updatePayload: &User{ID: oltypes.Int32(1), Firstname: oltypes.String("update")}, - expectedResult: &User{}, - expectedError: errors.New("error"), - repository: &test.MockRepository{}, - }, - } - for name, test := range tests { - t.Run(name, func(t *testing.T) { - svc := New(test.repository, "test.com") - err := svc.Update(test.updatePayload) - if test.expectedError != nil { - assert.Equal(t, test.expectedError, err) - } else { - assert.Equal(t, test.expectedResult, test.updatePayload) - } - }) - } -} - -func TestCreate(t *testing.T) { - tests := map[string]struct { - createPayload *User - expectedResult *User - expectedError error - repository *test.MockRepository - }{ - "it creates a user": { - createPayload: &User{Firstname: oltypes.String("create")}, - expectedResult: &User{ID: oltypes.Int32(1), Firstname: oltypes.String("create")}, - repository: &test.MockRepository{ - CreateFunc: func(r interface{}) ([]byte, error) { - return json.Marshal(User{ID: oltypes.Int32(1), Firstname: oltypes.String("create")}) - }, - }, - }, - "it returns an error if something went wrong": { - createPayload: &User{Firstname: oltypes.String("create")}, - expectedResult: &User{}, - expectedError: errors.New("error"), - repository: &test.MockRepository{}, - }, - } - for name, test := range tests { - t.Run(name, func(t *testing.T) { - svc := New(test.repository, "test.com") - err := svc.Create(test.createPayload) - if test.expectedError != nil { - assert.Equal(t, test.expectedError, err) - } else { - assert.Equal(t, test.expectedResult, test.createPayload) - } - }) - } -} - -func TestDestroy(t *testing.T) { - tests := map[string]struct { - id int32 - repository *test.MockRepository - expectedResponse *User - expectedError error - }{ - "it destroys one user": { - id: int32(1), - repository: &test.MockRepository{ - DestroyFunc: func(r interface{}) ([]byte, error) { - return nil, nil - }, - }, - expectedResponse: &User{}, - }, - "it returns an error if there is a problem finding the app": { - id: int32(2), - repository: &test.MockRepository{}, - expectedResponse: nil, - expectedError: errors.New("error"), - }, - } - for name, test := range tests { - t.Run(name, func(t *testing.T) { - svc := New(test.repository, "test.com") - err := svc.Destroy(test.id) - if test.expectedError != nil { - assert.Equal(t, test.expectedError, err) - } else { - assert.Nil(t, err) - } - }) - } -} diff --git a/pkg/services/users/v2.go b/pkg/services/users/v2.go deleted file mode 100644 index 08f95c3..0000000 --- a/pkg/services/users/v2.go +++ /dev/null @@ -1,146 +0,0 @@ -package users - -import ( - "encoding/json" - "errors" - "fmt" - "log" - - "github.com/onelogin/onelogin-go-sdk/pkg/services" - "github.com/onelogin/onelogin-go-sdk/pkg/services/olhttp" -) - -const errUsersV2Context = "users v2 service" - -// V2Service holds the information needed to interface with a repository -type V2Service struct { - Endpoint, ErrorContext string - Repository services.Repository -} - -// New creates the new svc service v2. -func New(repo services.Repository, host string) *V2Service { - return &V2Service{ - Endpoint: fmt.Sprintf("%s/api/2/users", host), - Repository: repo, - ErrorContext: errUsersV2Context, - } -} - -// Query retrieves all the users from the repository that meet the query criteria passed in the -// request payload. If an empty payload is given, it will retrieve all users -func (svc *V2Service) Query(query *UserQuery) ([]User, error) { - resp, err := svc.Repository.Read(olhttp.OLHTTPRequest{ - URL: svc.Endpoint, - Headers: map[string]string{"Content-Type": "application/json"}, - AuthMethod: "bearer", - Payload: query, - }) - if err != nil { - return nil, err - } - var users []User - for _, bytes := range resp { - var unmarshalled []User - json.Unmarshal(bytes, &unmarshalled) - if len(users) == 0 { - users = unmarshalled - } else { - users = append(users, unmarshalled...) - } - } - return users, nil -} - -// GetOne retrieves the user by id and returns it -func (svc *V2Service) GetOne(id int32) (*User, error) { - resp, err := svc.Repository.Read(olhttp.OLHTTPRequest{ - URL: fmt.Sprintf("%s/%d", svc.Endpoint, id), - Headers: map[string]string{"Content-Type": "application/json"}, - AuthMethod: "bearer", - }) - if err != nil { - return nil, err - } - var user User - - if len(resp) < 1 { - return nil, errors.New("invalid length of response returned") - } - json.Unmarshal(resp[0], &user) - return &user, nil -} - -// GetApps retrieves the list of apps for a given user by id, it returns -// an array of apps for the user. -func (svc *V2Service) GetApps(id int32) ([]UserApp, error) { - resp, err := svc.Repository.Read(olhttp.OLHTTPRequest{ - URL: fmt.Sprintf("%s/%d/apps", svc.Endpoint, id), - Headers: map[string]string{"Content-Type": "application/json"}, - AuthMethod: "bearer", - }) - if err != nil { - return nil, err - } - var apps []UserApp - - if len(resp) < 1 { - return nil, errors.New("invalid length of response returned") - } - log.Println(string(resp[0])) - err = json.Unmarshal(resp[0], &apps) - return apps, err -} - -// Create takes a user without an id and attempts to use the parameters to create it -// in the API. Modifies the user in place, or returns an error if one occurs -func (svc *V2Service) Create(user *User) error { - resp, err := svc.Repository.Create(olhttp.OLHTTPRequest{ - URL: svc.Endpoint, - Headers: map[string]string{"Content-Type": "application/json"}, - AuthMethod: "bearer", - Payload: user, - }) - if err != nil { - return err - } - json.Unmarshal(resp, user) - return nil -} - -// Update takes a user and an id and attempts to use the parameters to update it -// in the API. Modifies the user in place, or returns an error if one occurs -func (svc *V2Service) Update(user *User) error { - if user.ID == nil { - return errors.New("No ID Given") - } - resp, err := svc.UpdateRaw(*user.ID, user) - if err != nil { - return err - } - json.Unmarshal(resp, user) - return nil -} - -// UpdateRaw takes a user and an id and attempts to use the parameters to update it -// in the API. Returns the raw response bytes or an error. -func (svc *V2Service) UpdateRaw(id int32, user interface{}) ([]byte, error) { - return svc.Repository.Update(olhttp.OLHTTPRequest{ - URL: fmt.Sprintf("%s/%d", svc.Endpoint, id), - Headers: map[string]string{"Content-Type": "application/json"}, - AuthMethod: "bearer", - Payload: user, - }) -} - -// Destroy deletes the user with the given id, and if successful, it returns nil -func (svc *V2Service) Destroy(id int32) error { - if _, err := svc.Repository.Destroy(olhttp.OLHTTPRequest{ - URL: fmt.Sprintf("%s/%d", svc.Endpoint, id), - Headers: map[string]string{"Content-Type": "application/json"}, - AuthMethod: "bearer", - }); err != nil { - return err - } - return nil -} diff --git a/pkg/utils/utils.go b/pkg/utils/utils.go deleted file mode 100644 index 887ad47..0000000 --- a/pkg/utils/utils.go +++ /dev/null @@ -1,84 +0,0 @@ -package utils - -import ( - "encoding/base64" - "fmt" - "log" - "regexp" - "strings" -) - -// ReplaceSpecialChar replaces any non-alphanumeric character in a string with a character of choice -func ReplaceSpecialChar(str string, rep string) string { - reg := regexp.MustCompile("[^a-zA-Z0-9]+") - return reg.ReplaceAllString(str, rep) -} - -// ToSnakeCase turns camel/pascal case strings into snake_case strings -func ToSnakeCase(str string) string { - matchFirstCap := regexp.MustCompile("(.)([A-Z][a-z]+)") - matchAllCap := regexp.MustCompile("([a-z0-9])([A-Z])") - matchAllSpaces := regexp.MustCompile("(\\s)") - cleanUpHack := regexp.MustCompile("i_ds") - - snake := matchFirstCap.ReplaceAllString(str, "${1}_${2}") - snake = matchAllCap.ReplaceAllString(snake, "${1}_${2}") - snake = matchAllSpaces.ReplaceAllString(snake, "_") - snake = strings.ToLower(snake) - snake = cleanUpHack.ReplaceAllString(snake, "ids") - - return snake -} - -// OneOf takes the name of a field to analyze, the field's value, and a list of allowed values. -// Returns an error if a field's value is not in the list of legal values. -func OneOf(key string, v string, opts []string) error { - isValid := false - for _, o := range opts { - isValid = v == o - if isValid { - break - } - } - if !isValid { - return fmt.Errorf("%s must be one of %v, got: %s", key, opts, v) - } - return nil -} - -/* - - String Encoding Convenience Methods - -*/ - -// IsEncoded takes a string and returns whether or not the string is base64 encoded -func IsEncoded(s string) bool { - B64EncodedRegex := *regexp.MustCompile(`^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$`) - return B64EncodedRegex.MatchString(s) -} - -// EncodeString takes a multi-line string representation of a function body and -// encodes it to a base64 encoded string for use with OneLogin API. -// Returns the original encoded string if it happens to be base64 encoded -func EncodeString(s string) string { - if IsEncoded(s) { - return s - } - encoded := base64.StdEncoding.EncodeToString([]byte(s)) - return encoded -} - -// DecodeString takes a base64 encoded string and returns the decoeded result. -// returns the original string if it is not base64 encoded -func DecodeString(s string) string { - if !IsEncoded(s) { - return s - } - decodedBytes, e := base64.StdEncoding.DecodeString(s) - if e != nil { - log.Println("Unexpected decoding error:", e) - return s - } - return string(decodedBytes) -} diff --git a/pkg/utils/utils_test.go b/pkg/utils/utils_test.go deleted file mode 100644 index d8ee95c..0000000 --- a/pkg/utils/utils_test.go +++ /dev/null @@ -1,143 +0,0 @@ -package utils - -import ( - "fmt" - "github.com/stretchr/testify/assert" - "testing" -) - -func TestReplaceSpecialChar(t *testing.T) { - tests := map[string]struct { - InputStr string - InputRep string - ExpectedOut string - }{ - "It replaces the non alpha-numeric with the specified character": { - InputStr: "stuff+test", - InputRep: "&", - ExpectedOut: "stuff&test", - }, - } - for name, test := range tests { - t.Run(name, func(t *testing.T) { - actual := ReplaceSpecialChar(test.InputStr, test.InputRep) - assert.Equal(t, test.ExpectedOut, actual) - }) - } -} - -func TestToSnakeCase(t *testing.T) { - tests := map[string]struct { - InputStr string - ExpectedOut string - }{ - "It converts the PascalCase to snake_case": { - InputStr: "PascalCase", - ExpectedOut: "pascal_case", - }, - "It converts the cascalCase to snake_case": { - InputStr: "camelCase", - ExpectedOut: "camel_case", - }, - } - for name, test := range tests { - t.Run(name, func(t *testing.T) { - actual := ToSnakeCase(test.InputStr) - assert.Equal(t, test.ExpectedOut, actual) - }) - } -} - -func TestOneOf(t *testing.T) { - validOpts := []string{"SHA-1", "SHA-256", "SHA-348", "SHA-512"} - tests := map[string]struct { - InputKey string - InputValue string - ExpectedOutput error - }{ - "no errors on valid input": { - InputKey: "signature_algorithm", - InputValue: "SHA-1", - ExpectedOutput: nil, - }, - "errors on invalid input": { - InputKey: "signature_algorithm", - InputValue: "asdf", - ExpectedOutput: fmt.Errorf("signature_algorithm must be one of %v, got: %s", validOpts, "asdf"), - }, - } - for name, test := range tests { - t.Run(name, func(t *testing.T) { - errs := OneOf(test.InputKey, test.InputValue, validOpts) - assert.Equal(t, test.ExpectedOutput, errs) - }) - } -} - -func TestEncodeString(t *testing.T) { - tests := map[string]struct { - InputStr string - ExpectedOutput string - }{ - "It encodes the string without side effects, idempotently": { - InputStr: "function myFunc() {...}", - ExpectedOutput: "ZnVuY3Rpb24gbXlGdW5jKCkgey4uLn0=", - }, - } - for name, test := range tests { - t.Run(name, func(t *testing.T) { - inStr := test.InputStr - out := EncodeString(inStr) - out = EncodeString(out) - assert.Equal(t, test.ExpectedOutput, out) - assert.Equal(t, test.InputStr, inStr) - }) - } -} - -func TestDecodeString(t *testing.T) { - tests := map[string]struct { - InputStr string - ExpectedOutput string - }{ - "It decodes the string without side effects, idempotently": { - InputStr: "ZnVuY3Rpb24gbXlGdW5jKCkgey4uLn0=", - ExpectedOutput: "function myFunc() {...}", - }, - "It returns the original string and logs an error if the input is corrupt": { - InputStr: "Zn{}Y3Rpb24gbXlGdW5jKCkgey4uLn0=", - ExpectedOutput: "Zn{}Y3Rpb24gbXlGdW5jKCkgey4uLn0=", - }, - } - for name, test := range tests { - t.Run(name, func(t *testing.T) { - inStr := test.InputStr - out := DecodeString(inStr) - out = DecodeString(out) - assert.Equal(t, test.ExpectedOutput, out) - assert.Equal(t, test.InputStr, inStr) - }) - } -} - -func TestIsEncodedString(t *testing.T) { - tests := map[string]struct { - InputStr string - ExpectedOutput bool - }{ - "It returns true for base64 encoed strings": { - InputStr: "ZnVuY3Rpb24gbXlGdW5jKCkgey4uLn0=", - ExpectedOutput: true, - }, - "It returns false for not base64 encoded strings": { - InputStr: "function myFunc() {...}", - ExpectedOutput: false, - }, - } - for name, test := range tests { - t.Run(name, func(t *testing.T) { - out := IsEncoded(test.InputStr) - assert.Equal(t, test.ExpectedOutput, out) - }) - } -} diff --git a/readme.md b/readme.md index d46422f..7d46695 100644 --- a/readme.md +++ b/readme.md @@ -1,80 +1,302 @@ -# Onelogin-Go-SDK +# Go API client for openapi -[![Go Report Card](https://goreportcard.com/badge/github.com/onelogin/onelogin-go-sdk)](https://goreportcard.com/report/github.com/onelogin/onelogin-go-sdk) -![gopherbadger-tag-do-not-edit](https://img.shields.io/badge/Go%20Coverage-95%25-brightgreen.svg?longCache=true&style=flat) +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - This is the Onelogin Go SDK client, supporting the following apis: +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - - [Apps](https://developers.onelogin.com/api-docs/2/apps/overview) (v2) - - [App Rules](https://developers.onelogin.com/api-docs/2/app-rules/overview) - - [Auth Servers](https://developers.onelogin.com/api-docs/2/api-authorization/overview) (v2) - - [Roles](https://developers.onelogin.com/api-docs/2/roles/list-roles) (v2) - - [Privileges](https://developers.onelogin.com/api-docs/1/privileges/list-privileges) (v1) - - [Session Login Tokens](https://developers.onelogin.com/api-docs/1/login-page/create-session-login-token) (v1) - - [Smart Hooks](https://developers.onelogin.com/api-docs/2/smart-hooks/overview) (v2) - - [User Mappings](https://developers.onelogin.com/api-docs/2/user-mappings/overview) (v2) - - [Users](https://developers.onelogin.com/api-docs/2/users/list-users) (v2) +- API version: 3.0.0-alpha.1 +- Package version: 1.0.0 +- Build package: org.openapitools.codegen.languages.GoClientCodegen ## Installation - **Make sure you have [Go](https://golang.org/doc/install) installed.** - - 1. Install the package: - ``` - go get -u "github.com/onelogin/onelogin-go-sdk/pkg/client" - ``` - 2. Import: - ``` - import ( - "github.com/onelogin/onelogin-go-sdk/pkg/client" - ) - ``` -## Examples - - - Starting up the client: - ```go - import ( - "github.com/onelogin/onelogin-go-sdk/pkg/client" - ) - - sdkClient, err := client.NewClient(&client.APIClientConfig{ - Timeout: 5, - ClientID: "your_onelogin_developer_client_id", - ClientSecret: "your_onelogin_developer_client_secret", - Url: "https://.onelogin.com", - }) - if err != nil { - // handle error - } - - app, err := sdkClient.Services.AppsV2.GetOne(12345) - if err != nil { - // handle error - } - ``` - - - Requesting Apps: - ```go - awsApps, err := sdkClient.AppsV2.Query(apps.AppsQuery{ConnectorID: 9, Limit: 10}) // get 10 aws apps - ``` - - - Creating Apps: - ```go - newApp := apps.App{Name: "new app", ConnectorID: 9} - err := sdkClient.AppsV2.Create(newApp) // Saves the app to OneLogin. Updates app in place with new state as represented in OneLogin - if err != nil { - return err - } - fmt.Println("my app", *newApp.ID) - ``` - - - Updating an App: - ```go - someApp, err := sdkClient.AppsV2.GetOne(123) - someApp.Name = "updated name" - sdkClient.AppsV2.Update(someApp) // saves the new app state to OneLogin - ``` - - - Destroying an App: - ```go - err := sdkClient.AppsV2.Destroy(*someApp.ID) - ``` + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/oauth2 +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import openapi "github.com/GIT_USER_ID/GIT_REPO_ID" +``` + +To use a proxy, set the environment variable `HTTP_PROXY`: + +```golang +os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port") +``` + +## Configuration of Server URL + +Default configuration comes with `Servers` field that contains server objects as defined in the OpenAPI specification. + +### Select Server Configuration + +For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`. + +```golang +ctx := context.WithValue(context.Background(), openapi.ContextServerIndex, 1) +``` + +### Templated Server URL + +Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`. + +```golang +ctx := context.WithValue(context.Background(), openapi.ContextServerVariables, map[string]string{ + "basePath": "v2", +}) +``` + +Note, enum values are always validated and all unused variables are silently ignored. + +### URLs Configuration per Operation + +Each operation can use different server URL defined using `OperationServers` map in the `Configuration`. +An operation is uniquely identified by `"{classname}Service.{nickname}"` string. +Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps. + +``` +ctx := context.WithValue(context.Background(), openapi.ContextOperationServerIndices, map[string]int{ + "{classname}Service.{nickname}": 2, +}) +ctx = context.WithValue(context.Background(), openapi.ContextOperationServerVariables, map[string]map[string]string{ + "{classname}Service.{nickname}": { + "port": "8443", + }, +}) +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://onelogininc.onelogin.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*DefaultApi* | [**ActivateFactor**](docs/DefaultApi.md#activatefactor) | **Post** /api/2/mfa/users/{user_id}/verifications | +*DefaultApi* | [**AddAccessTokenClaim**](docs/DefaultApi.md#addaccesstokenclaim) | **Post** /api/2/api_authorizations/{id}/claims | +*DefaultApi* | [**AddClientApp**](docs/DefaultApi.md#addclientapp) | **Post** /api/2/api_authorizations/{id}/clients | +*DefaultApi* | [**AddRoleAdmins**](docs/DefaultApi.md#addroleadmins) | **Post** /api/2/roles/{role_id}/admins | +*DefaultApi* | [**AddRoleUsers**](docs/DefaultApi.md#addroleusers) | **Post** /api/2/roles/{role_id}/users | +*DefaultApi* | [**AddScope**](docs/DefaultApi.md#addscope) | **Post** /api/2/api_authorizations/{id}/scopes | +*DefaultApi* | [**BulkMappingSort**](docs/DefaultApi.md#bulkmappingsort) | **Put** /api/2/apps/mappings/sort | +*DefaultApi* | [**BulkSort**](docs/DefaultApi.md#bulksort) | **Put** /api/2/apps/{app_id}/rules/sort | +*DefaultApi* | [**CreateApp**](docs/DefaultApi.md#createapp) | **Post** /api/2/apps | +*DefaultApi* | [**CreateAuthorizationServer**](docs/DefaultApi.md#createauthorizationserver) | **Post** /api/2/api_authorizations | +*DefaultApi* | [**CreateEnvironmentVariable**](docs/DefaultApi.md#createenvironmentvariable) | **Post** /api/2/hooks/envs | +*DefaultApi* | [**CreateHook**](docs/DefaultApi.md#createhook) | **Post** /api/2/hooks | +*DefaultApi* | [**CreateMapping**](docs/DefaultApi.md#createmapping) | **Post** /api/2/mappings | +*DefaultApi* | [**CreateRiskRule**](docs/DefaultApi.md#createriskrule) | **Post** /api/2/risk/rules | +*DefaultApi* | [**CreateRoles**](docs/DefaultApi.md#createroles) | **Post** /api/2/roles | +*DefaultApi* | [**CreateRule**](docs/DefaultApi.md#createrule) | **Post** /api/2/apps/{app_id}/rules | +*DefaultApi* | [**CreateUser**](docs/DefaultApi.md#createuser) | **Post** /api/2/users | +*DefaultApi* | [**DeleteAccessTokenClaim**](docs/DefaultApi.md#deleteaccesstokenclaim) | **Delete** /api/2/api_authorizations/{id}/claims/{claim_id} | +*DefaultApi* | [**DeleteApp**](docs/DefaultApi.md#deleteapp) | **Delete** /api/2/apps/{app_id} | +*DefaultApi* | [**DeleteAppParameter**](docs/DefaultApi.md#deleteappparameter) | **Delete** /api/2/apps/{app_id}/parameters/{parameter_id} | +*DefaultApi* | [**DeleteAuthorizationServer**](docs/DefaultApi.md#deleteauthorizationserver) | **Delete** /api/2/api_authorizations/{id} | +*DefaultApi* | [**DeleteEnvironmentVariable**](docs/DefaultApi.md#deleteenvironmentvariable) | **Delete** /api/2/hooks/envs/{envvar_id} | +*DefaultApi* | [**DeleteFactor**](docs/DefaultApi.md#deletefactor) | **Delete** /api/2/mfa/users/{user_id}/devices/{device_id} | +*DefaultApi* | [**DeleteHook**](docs/DefaultApi.md#deletehook) | **Delete** /api/2/hooks/{hook_id} | +*DefaultApi* | [**DeleteMapping**](docs/DefaultApi.md#deletemapping) | **Delete** /api/2/mappings/{mapping_id} | +*DefaultApi* | [**DeleteRiskRule**](docs/DefaultApi.md#deleteriskrule) | **Delete** /api/2/risk/rules/{risk_rule_id} | +*DefaultApi* | [**DeleteRole**](docs/DefaultApi.md#deleterole) | **Delete** /api/2/roles/{role_id} | +*DefaultApi* | [**DeleteRule**](docs/DefaultApi.md#deleterule) | **Delete** /api/2/apps/{app_id}/rules/{rule_id} | +*DefaultApi* | [**DeleteScope**](docs/DefaultApi.md#deletescope) | **Delete** /api/2/api_authorizations/{id}/scopes/{scope_id} | +*DefaultApi* | [**DeleteUser**](docs/DefaultApi.md#deleteuser) | **Delete** /api/2/users/{user_id} | +*DefaultApi* | [**DryRunMapping**](docs/DefaultApi.md#dryrunmapping) | **Post** /api/2/mappings/{mapping_id}/dryrun | +*DefaultApi* | [**EnrollFactor**](docs/DefaultApi.md#enrollfactor) | **Post** /api/2/mfa/users/{user_id}/registrations | +*DefaultApi* | [**GenerateMfaToken**](docs/DefaultApi.md#generatemfatoken) | **Post** /api/2/mfs/users/{user_id}/mfa_token | +*DefaultApi* | [**GenerateSamlAssertion**](docs/DefaultApi.md#generatesamlassertion) | **Post** /api/2/saml_assertion | +*DefaultApi* | [**GenerateToken**](docs/DefaultApi.md#generatetoken) | **Post** /auth/oauth2/v2/token | +*DefaultApi* | [**GetApp**](docs/DefaultApi.md#getapp) | **Get** /api/2/apps/{app_id} | +*DefaultApi* | [**GetAuthorizationServer**](docs/DefaultApi.md#getauthorizationserver) | **Get** /api/2/api_authorizations/{id} | +*DefaultApi* | [**GetAvailableFactors**](docs/DefaultApi.md#getavailablefactors) | **Get** /api/2/mfa/users/{user_id}/factors | +*DefaultApi* | [**GetClientApps**](docs/DefaultApi.md#getclientapps) | **Get** /api/2/api_authorizations/{id}/clients | +*DefaultApi* | [**GetEnrolledFactors**](docs/DefaultApi.md#getenrolledfactors) | **Get** /api/2/mfa/users/{user_id}/devices | +*DefaultApi* | [**GetEnvironmentVariable**](docs/DefaultApi.md#getenvironmentvariable) | **Get** /api/2/hooks/envs/{envvar_id} | +*DefaultApi* | [**GetHook**](docs/DefaultApi.md#gethook) | **Get** /api/2/hooks/{hook_id} | +*DefaultApi* | [**GetLogs**](docs/DefaultApi.md#getlogs) | **Get** /api/2/hooks/{hook_id}/logs | +*DefaultApi* | [**GetMapping**](docs/DefaultApi.md#getmapping) | **Get** /api/2/mappings/{mapping_id} | +*DefaultApi* | [**GetRateLimit**](docs/DefaultApi.md#getratelimit) | **Get** /auth/rate_limit | +*DefaultApi* | [**GetRiskRule**](docs/DefaultApi.md#getriskrule) | **Get** /api/2/risk/rules/{risk_rule_id} | +*DefaultApi* | [**GetRiskScore**](docs/DefaultApi.md#getriskscore) | **Post** /api/2/risk/verify | +*DefaultApi* | [**GetRole**](docs/DefaultApi.md#getrole) | **Get** /api/2/roles/{role_id} | +*DefaultApi* | [**GetRoleAdmins**](docs/DefaultApi.md#getroleadmins) | **Get** /api/2/roles/{role_id}/admins | +*DefaultApi* | [**GetRoleApps**](docs/DefaultApi.md#getroleapps) | **Get** /api/2/roles/{role_id}/apps | +*DefaultApi* | [**GetRoleUsers**](docs/DefaultApi.md#getroleusers) | **Get** /api/2/roles/{role_id}/users | +*DefaultApi* | [**GetRule**](docs/DefaultApi.md#getrule) | **Get** /api/2/apps/{app_id}/rules/{rule_id} | +*DefaultApi* | [**GetScoreInsights**](docs/DefaultApi.md#getscoreinsights) | **Get** /api/2/risk/scores | +*DefaultApi* | [**GetUser**](docs/DefaultApi.md#getuser) | **Get** /api/2/users/{user_id} | +*DefaultApi* | [**GetUserApps**](docs/DefaultApi.md#getuserapps) | **Get** /api/2/users/{user_id}/apps | +*DefaultApi* | [**ListAccessTokenClaims**](docs/DefaultApi.md#listaccesstokenclaims) | **Get** /api/2/api_authorizations/{id}/claims | +*DefaultApi* | [**ListActionValues**](docs/DefaultApi.md#listactionvalues) | **Get** /api/2/apps/{app_id}/rules/actions/{actuion_value}/values | +*DefaultApi* | [**ListActions**](docs/DefaultApi.md#listactions) | **Get** /api/2/apps/{app_id}/rules/actions | +*DefaultApi* | [**ListAppUsers**](docs/DefaultApi.md#listappusers) | **Get** /api/2/apps/{app_id}/users | +*DefaultApi* | [**ListApps**](docs/DefaultApi.md#listapps) | **Get** /api/2/apps | +*DefaultApi* | [**ListAuthorizationServers**](docs/DefaultApi.md#listauthorizationservers) | **Get** /api/2/api_authorizations | +*DefaultApi* | [**ListConditionOperators**](docs/DefaultApi.md#listconditionoperators) | **Get** /api/2/apps/{app_id}/rules/conditions/{condition_value}/operators | +*DefaultApi* | [**ListConditionValues**](docs/DefaultApi.md#listconditionvalues) | **Get** /api/2/apps/{app_id}/rules/conditions/{condition_value}/values | +*DefaultApi* | [**ListConditions**](docs/DefaultApi.md#listconditions) | **Get** /api/2/apps/{app_id}/rules/conditions | +*DefaultApi* | [**ListConnectors**](docs/DefaultApi.md#listconnectors) | **Get** /api/2/connectors | +*DefaultApi* | [**ListEnvironmentVariables**](docs/DefaultApi.md#listenvironmentvariables) | **Get** /api/2/hooks/envs | +*DefaultApi* | [**ListHooks**](docs/DefaultApi.md#listhooks) | **Get** /api/2/hooks | +*DefaultApi* | [**ListMappingActionValues**](docs/DefaultApi.md#listmappingactionvalues) | **Get** /api/2/apps/mappings/actions/{actuion_value}/values | +*DefaultApi* | [**ListMappingActions**](docs/DefaultApi.md#listmappingactions) | **Get** /api/2/apps/mappings/actions | +*DefaultApi* | [**ListMappingConditionOperators**](docs/DefaultApi.md#listmappingconditionoperators) | **Get** /api/2/apps/mappings/conditions/{condition_value}/operators | +*DefaultApi* | [**ListMappingConditionValues**](docs/DefaultApi.md#listmappingconditionvalues) | **Get** /api/2/apps/mappings/conditions/{condition_value}/values | +*DefaultApi* | [**ListMappingConditions**](docs/DefaultApi.md#listmappingconditions) | **Get** /api/2/apps/mappings/conditions | +*DefaultApi* | [**ListMappings**](docs/DefaultApi.md#listmappings) | **Get** /api/2/mappings | +*DefaultApi* | [**ListRiskRules**](docs/DefaultApi.md#listriskrules) | **Get** /api/2/risk/rules | +*DefaultApi* | [**ListRoles**](docs/DefaultApi.md#listroles) | **Get** /api/2/roles | +*DefaultApi* | [**ListRules**](docs/DefaultApi.md#listrules) | **Get** /api/2/apps/{app_id}/rules | +*DefaultApi* | [**ListScopes**](docs/DefaultApi.md#listscopes) | **Get** /api/2/api_authorizations/{id}/scopes | +*DefaultApi* | [**ListUsers**](docs/DefaultApi.md#listusers) | **Get** /api/2/users | +*DefaultApi* | [**RemoveClientApp**](docs/DefaultApi.md#removeclientapp) | **Delete** /api/2/api_authorizations/{id}/clients/{client_app_id} | +*DefaultApi* | [**RemoveRoleAdmins**](docs/DefaultApi.md#removeroleadmins) | **Delete** /api/2/roles/{role_id}/admins | +*DefaultApi* | [**RemoveRoleUsers**](docs/DefaultApi.md#removeroleusers) | **Delete** /api/2/roles/{role_id}/users | +*DefaultApi* | [**RevokeToken**](docs/DefaultApi.md#revoketoken) | **Post** /auth/oauth2/revoke | +*DefaultApi* | [**SetRoleApps**](docs/DefaultApi.md#setroleapps) | **Put** /api/2/roles/{role_id}/apps | +*DefaultApi* | [**TrackEvent**](docs/DefaultApi.md#trackevent) | **Post** /api/2/risk/events | +*DefaultApi* | [**UpdateAccessTokenClaim**](docs/DefaultApi.md#updateaccesstokenclaim) | **Put** /api/2/api_authorizations/{id}/claims/{claim_id} | +*DefaultApi* | [**UpdateApp**](docs/DefaultApi.md#updateapp) | **Put** /api/2/apps/{app_id} | +*DefaultApi* | [**UpdateAuthorizationServer**](docs/DefaultApi.md#updateauthorizationserver) | **Put** /api/2/api_authorizations/{id} | +*DefaultApi* | [**UpdateClientApp**](docs/DefaultApi.md#updateclientapp) | **Put** /api/2/api_authorizations/{id}/clients/{client_app_id} | +*DefaultApi* | [**UpdateEnvironmentVariable**](docs/DefaultApi.md#updateenvironmentvariable) | **Put** /api/2/hooks/envs/{envvar_id} | +*DefaultApi* | [**UpdateHook**](docs/DefaultApi.md#updatehook) | **Put** /api/2/hooks/{hook_id} | +*DefaultApi* | [**UpdateMapping**](docs/DefaultApi.md#updatemapping) | **Put** /api/2/mappings/{mapping_id} | +*DefaultApi* | [**UpdateRiskRule**](docs/DefaultApi.md#updateriskrule) | **Put** /api/2/risk/rules/{risk_rule_id} | +*DefaultApi* | [**UpdateRole**](docs/DefaultApi.md#updaterole) | **Put** /api/2/roles/{role_id} | +*DefaultApi* | [**UpdateRule**](docs/DefaultApi.md#updaterule) | **Put** /api/2/apps/{app_id}/rules/{rule_id} | +*DefaultApi* | [**UpdateScope**](docs/DefaultApi.md#updatescope) | **Put** /api/2/api_authorizations/{id}/scopes/{scope_id} | +*DefaultApi* | [**UpdateUser**](docs/DefaultApi.md#updateuser) | **Put** /api/2/users/{user_id} | +*DefaultApi* | [**VerifyEnrollment**](docs/DefaultApi.md#verifyenrollment) | **Put** /api/2/mfa/users/{user_id}/registrations/{registration_id} | +*DefaultApi* | [**VerifyEnrollmentVoiceProtect**](docs/DefaultApi.md#verifyenrollmentvoiceprotect) | **Get** /api/2/mfa/users/{user_id}/registrations/{registration_id} | +*DefaultApi* | [**VerifyFactor**](docs/DefaultApi.md#verifyfactor) | **Put** /api/2/mfa/users/{user_id}/verifications/{verification_id} | +*DefaultApi* | [**VerifyFactorSaml**](docs/DefaultApi.md#verifyfactorsaml) | **Post** /api/2/saml_assertion/verify_factor | +*DefaultApi* | [**VerifyFactorVoice**](docs/DefaultApi.md#verifyfactorvoice) | **Get** /api/2/mfa/users/{user_id}/verifications/{verification_id} | + + +## Documentation For Models + + - [Action](docs/Action.md) + - [ActivateFactorRequest](docs/ActivateFactorRequest.md) + - [AddAccessTokenClaimRequest](docs/AddAccessTokenClaimRequest.md) + - [AddClientAppRequest](docs/AddClientAppRequest.md) + - [AddRoleUsers200ResponseInner](docs/AddRoleUsers200ResponseInner.md) + - [AddScopeRequest](docs/AddScopeRequest.md) + - [AuthMethod](docs/AuthMethod.md) + - [AuthServerConfiguration](docs/AuthServerConfiguration.md) + - [ClientApp](docs/ClientApp.md) + - [Condition](docs/Condition.md) + - [Connector](docs/Connector.md) + - [CreateAuthorizationServerRequest](docs/CreateAuthorizationServerRequest.md) + - [CreateEnvironmentVariableRequest](docs/CreateEnvironmentVariableRequest.md) + - [CreateRoles201ResponseInner](docs/CreateRoles201ResponseInner.md) + - [Device](docs/Device.md) + - [EnrollFactorRequest](docs/EnrollFactorRequest.md) + - [Envvar](docs/Envvar.md) + - [ErrorStatus](docs/ErrorStatus.md) + - [ErrorStatusErrorsInner](docs/ErrorStatusErrorsInner.md) + - [FactorInner](docs/FactorInner.md) + - [FactorInnerFactorData](docs/FactorInnerFactorData.md) + - [GenerateMfaToken200Response](docs/GenerateMfaToken200Response.md) + - [GenerateMfaToken422Response](docs/GenerateMfaToken422Response.md) + - [GenerateMfaToken422ResponseDetails](docs/GenerateMfaToken422ResponseDetails.md) + - [GenerateMfaTokenRequest](docs/GenerateMfaTokenRequest.md) + - [GenerateSamlAssertionRequest](docs/GenerateSamlAssertionRequest.md) + - [GenerateToken200Response](docs/GenerateToken200Response.md) + - [GenerateToken400Response](docs/GenerateToken400Response.md) + - [GenerateTokenRequest](docs/GenerateTokenRequest.md) + - [GetAuthorizationServer200Response](docs/GetAuthorizationServer200Response.md) + - [GetAvailableFactors200ResponseInner](docs/GetAvailableFactors200ResponseInner.md) + - [GetClientApps200ResponseInner](docs/GetClientApps200ResponseInner.md) + - [GetClientApps200ResponseInnerScopesInner](docs/GetClientApps200ResponseInnerScopesInner.md) + - [GetRateLimit200Response](docs/GetRateLimit200Response.md) + - [GetRateLimit200ResponseData](docs/GetRateLimit200ResponseData.md) + - [GetRiskScore200Response](docs/GetRiskScore200Response.md) + - [GetRiskScore400Response](docs/GetRiskScore400Response.md) + - [GetRiskScoreRequest](docs/GetRiskScoreRequest.md) + - [GetScoreInsights200Response](docs/GetScoreInsights200Response.md) + - [GetScoreInsights200ResponseScores](docs/GetScoreInsights200ResponseScores.md) + - [GetUserApps200ResponseInner](docs/GetUserApps200ResponseInner.md) + - [Hook](docs/Hook.md) + - [HookConditionsInner](docs/HookConditionsInner.md) + - [HookOptions](docs/HookOptions.md) + - [HookStatus](docs/HookStatus.md) + - [Id](docs/Id.md) + - [ListAccessTokenClaims200ResponseInner](docs/ListAccessTokenClaims200ResponseInner.md) + - [ListActions200ResponseInner](docs/ListActions200ResponseInner.md) + - [ListAppUsers200ResponseInner](docs/ListAppUsers200ResponseInner.md) + - [ListAuthorizationServers200ResponseInner](docs/ListAuthorizationServers200ResponseInner.md) + - [ListAuthorizationServers200ResponseInnerConfiguration](docs/ListAuthorizationServers200ResponseInnerConfiguration.md) + - [ListConditionOperators200ResponseInner](docs/ListConditionOperators200ResponseInner.md) + - [ListConditionValues200ResponseInner](docs/ListConditionValues200ResponseInner.md) + - [ListConditions200ResponseInner](docs/ListConditions200ResponseInner.md) + - [ListMappingConditionOperators200ResponseInner](docs/ListMappingConditionOperators200ResponseInner.md) + - [ListMappingConditions200ResponseInner](docs/ListMappingConditions200ResponseInner.md) + - [ListScopes200ResponseInner](docs/ListScopes200ResponseInner.md) + - [Log](docs/Log.md) + - [Mapping](docs/Mapping.md) + - [Registration](docs/Registration.md) + - [RemoveRoleUsersRequest](docs/RemoveRoleUsersRequest.md) + - [RevokeTokenRequest](docs/RevokeTokenRequest.md) + - [RiskDevice](docs/RiskDevice.md) + - [RiskRule](docs/RiskRule.md) + - [RiskUser](docs/RiskUser.md) + - [Role](docs/Role.md) + - [Rule](docs/Rule.md) + - [RuleId](docs/RuleId.md) + - [Schema](docs/Schema.md) + - [Schema1](docs/Schema1.md) + - [Schema1AddedBy](docs/Schema1AddedBy.md) + - [SchemaProvisioning](docs/SchemaProvisioning.md) + - [Session](docs/Session.md) + - [SetRoleApps200ResponseInner](docs/SetRoleApps200ResponseInner.md) + - [Source](docs/Source.md) + - [Status](docs/Status.md) + - [Status1](docs/Status1.md) + - [Status2](docs/Status2.md) + - [Status2Status](docs/Status2Status.md) + - [TrackEventRequest](docs/TrackEventRequest.md) + - [UpdateAuthorizationServer400Response](docs/UpdateAuthorizationServer400Response.md) + - [UpdateClientAppRequest](docs/UpdateClientAppRequest.md) + - [UpdateEnvironmentVariableRequest](docs/UpdateEnvironmentVariableRequest.md) + - [UpdateRole200Response](docs/UpdateRole200Response.md) + - [User](docs/User.md) + - [VerifyEnrollmentRequest](docs/VerifyEnrollmentRequest.md) + - [VerifyFactorRequest](docs/VerifyFactorRequest.md) + - [VerifyFactorSaml200Response](docs/VerifyFactorSaml200Response.md) + - [VerifyFactorSamlRequest](docs/VerifyFactorSamlRequest.md) + - [VerifyFactorVoice200ResponseInner](docs/VerifyFactorVoice200ResponseInner.md) + + +## Documentation For Authorization + + Endpoints do not require authorization. + + +## Documentation for Utility Methods + +Due to the fact that model structure members are all pointers, this package contains +a number of utility functions to easily obtain pointers to values of basic types. +Each of these functions takes a value of the given basic type and returns a pointer to it: + +* `PtrBool` +* `PtrInt` +* `PtrInt32` +* `PtrInt64` +* `PtrFloat` +* `PtrFloat32` +* `PtrFloat64` +* `PtrString` +* `PtrTime` + +## Author + + + diff --git a/response.go b/response.go new file mode 100644 index 0000000..fca0f5c --- /dev/null +++ b/response.go @@ -0,0 +1,47 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "net/http" +) + +// APIResponse stores the API response returned by the server. +type APIResponse struct { + *http.Response `json:"-"` + Message string `json:"message,omitempty"` + // Operation is the name of the OpenAPI operation. + Operation string `json:"operation,omitempty"` + // RequestURL is the request URL. This value is always available, even if the + // embedded *http.Response is nil. + RequestURL string `json:"url,omitempty"` + // Method is the HTTP method used for the request. This value is always + // available, even if the embedded *http.Response is nil. + Method string `json:"method,omitempty"` + // Payload holds the contents of the response body (which may be nil or empty). + // This is provided here as the raw response.Body() reader will have already + // been drained. + Payload []byte `json:"-"` +} + +// NewAPIResponse returns a new APIResponse object. +func NewAPIResponse(r *http.Response) *APIResponse { + + response := &APIResponse{Response: r} + return response +} + +// NewAPIResponseWithError returns a new APIResponse object with the provided error message. +func NewAPIResponseWithError(errorMessage string) *APIResponse { + + response := &APIResponse{Message: errorMessage} + return response +} diff --git a/utils.go b/utils.go new file mode 100644 index 0000000..4dea906 --- /dev/null +++ b/utils.go @@ -0,0 +1,328 @@ +/* +OneLogin API + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + +API version: 3.0.0-alpha.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "time" +) + +// PtrBool is a helper routine that returns a pointer to given boolean value. +func PtrBool(v bool) *bool { return &v } + +// PtrInt is a helper routine that returns a pointer to given integer value. +func PtrInt(v int) *int { return &v } + +// PtrInt32 is a helper routine that returns a pointer to given integer value. +func PtrInt32(v int32) *int32 { return &v } + +// PtrInt64 is a helper routine that returns a pointer to given integer value. +func PtrInt64(v int64) *int64 { return &v } + +// PtrFloat32 is a helper routine that returns a pointer to given float value. +func PtrFloat32(v float32) *float32 { return &v } + +// PtrFloat64 is a helper routine that returns a pointer to given float value. +func PtrFloat64(v float64) *float64 { return &v } + +// PtrString is a helper routine that returns a pointer to given string value. +func PtrString(v string) *string { return &v } + +// PtrTime is helper routine that returns a pointer to given Time value. +func PtrTime(v time.Time) *time.Time { return &v } + +type NullableBool struct { + value *bool + isSet bool +} + +func (v NullableBool) Get() *bool { + return v.value +} + +func (v *NullableBool) Set(val *bool) { + v.value = val + v.isSet = true +} + +func (v NullableBool) IsSet() bool { + return v.isSet +} + +func (v *NullableBool) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBool(val *bool) *NullableBool { + return &NullableBool{value: val, isSet: true} +} + +func (v NullableBool) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBool) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt struct { + value *int + isSet bool +} + +func (v NullableInt) Get() *int { + return v.value +} + +func (v *NullableInt) Set(val *int) { + v.value = val + v.isSet = true +} + +func (v NullableInt) IsSet() bool { + return v.isSet +} + +func (v *NullableInt) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt(val *int) *NullableInt { + return &NullableInt{value: val, isSet: true} +} + +func (v NullableInt) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt32 struct { + value *int32 + isSet bool +} + +func (v NullableInt32) Get() *int32 { + return v.value +} + +func (v *NullableInt32) Set(val *int32) { + v.value = val + v.isSet = true +} + +func (v NullableInt32) IsSet() bool { + return v.isSet +} + +func (v *NullableInt32) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt32(val *int32) *NullableInt32 { + return &NullableInt32{value: val, isSet: true} +} + +func (v NullableInt32) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt32) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt64 struct { + value *int64 + isSet bool +} + +func (v NullableInt64) Get() *int64 { + return v.value +} + +func (v *NullableInt64) Set(val *int64) { + v.value = val + v.isSet = true +} + +func (v NullableInt64) IsSet() bool { + return v.isSet +} + +func (v *NullableInt64) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt64(val *int64) *NullableInt64 { + return &NullableInt64{value: val, isSet: true} +} + +func (v NullableInt64) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt64) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableFloat32 struct { + value *float32 + isSet bool +} + +func (v NullableFloat32) Get() *float32 { + return v.value +} + +func (v *NullableFloat32) Set(val *float32) { + v.value = val + v.isSet = true +} + +func (v NullableFloat32) IsSet() bool { + return v.isSet +} + +func (v *NullableFloat32) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFloat32(val *float32) *NullableFloat32 { + return &NullableFloat32{value: val, isSet: true} +} + +func (v NullableFloat32) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFloat32) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableFloat64 struct { + value *float64 + isSet bool +} + +func (v NullableFloat64) Get() *float64 { + return v.value +} + +func (v *NullableFloat64) Set(val *float64) { + v.value = val + v.isSet = true +} + +func (v NullableFloat64) IsSet() bool { + return v.isSet +} + +func (v *NullableFloat64) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFloat64(val *float64) *NullableFloat64 { + return &NullableFloat64{value: val, isSet: true} +} + +func (v NullableFloat64) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFloat64) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableString struct { + value *string + isSet bool +} + +func (v NullableString) Get() *string { + return v.value +} + +func (v *NullableString) Set(val *string) { + v.value = val + v.isSet = true +} + +func (v NullableString) IsSet() bool { + return v.isSet +} + +func (v *NullableString) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableString(val *string) *NullableString { + return &NullableString{value: val, isSet: true} +} + +func (v NullableString) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableString) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableTime struct { + value *time.Time + isSet bool +} + +func (v NullableTime) Get() *time.Time { + return v.value +} + +func (v *NullableTime) Set(val *time.Time) { + v.value = val + v.isSet = true +} + +func (v NullableTime) IsSet() bool { + return v.isSet +} + +func (v *NullableTime) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTime(val *time.Time) *NullableTime { + return &NullableTime{value: val, isSet: true} +} + +func (v NullableTime) MarshalJSON() ([]byte, error) { + return v.value.MarshalJSON() +} + +func (v *NullableTime) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} From 762843f4bfbc003588013de28f6cf315a73342e4 Mon Sep 17 00:00:00 2001 From: George Khaburzaniya Date: Thu, 11 Aug 2022 12:21:50 -0700 Subject: [PATCH 03/24] Fix GIT_REPO_ID and GIT_USER_ID --- .openapi-generator/FILES | 1 - git_push.sh | 4 ++-- go.mod | 2 +- readme.md | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 0a3a7ae..d60ec10 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -1,5 +1,4 @@ .gitignore -.openapi-generator-ignore .travis.yml README.md api/openapi.yaml diff --git a/git_push.sh b/git_push.sh index f53a75d..a8f83bb 100644 --- a/git_push.sh +++ b/git_push.sh @@ -14,12 +14,12 @@ if [ "$git_host" = "" ]; then fi if [ "$git_user_id" = "" ]; then - git_user_id="GIT_USER_ID" + git_user_id="onelogin" echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi if [ "$git_repo_id" = "" ]; then - git_repo_id="GIT_REPO_ID" + git_repo_id="onelogin-go-sdk" echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi diff --git a/go.mod b/go.mod index ead3260..e0e1397 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/GIT_USER_ID/GIT_REPO_ID +module github.com/onelogin/onelogin-go-sdk go 1.13 diff --git a/readme.md b/readme.md index 7d46695..07b03e9 100644 --- a/readme.md +++ b/readme.md @@ -22,7 +22,7 @@ go get golang.org/x/net/context Put the package under your project folder and add the following in import: ```golang -import openapi "github.com/GIT_USER_ID/GIT_REPO_ID" +import openapi "github.com/onelogin/onelogin-go-sdk" ``` To use a proxy, set the environment variable `HTTP_PROXY`: From 53a30db5534dbd050ee1545f5e3b26b7f166bc0e Mon Sep 17 00:00:00 2001 From: Bryan Vestey Date: Thu, 11 Aug 2022 13:35:31 -0700 Subject: [PATCH 04/24] Update go mod/sum --- go.mod | 4 +- go.sum | 359 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 355 insertions(+), 8 deletions(-) diff --git a/go.mod b/go.mod index e0e1397..5d20e67 100644 --- a/go.mod +++ b/go.mod @@ -2,6 +2,4 @@ module github.com/onelogin/onelogin-go-sdk go 1.13 -require ( - golang.org/x/oauth2 v0.0.0-20210323180902-22b0adad7558 -) +require golang.org/x/oauth2 v0.0.0-20210323180902-22b0adad7558 diff --git a/go.sum b/go.sum index 734252e..aca013a 100644 --- a/go.sum +++ b/go.sum @@ -1,13 +1,362 @@ +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= -github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= +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/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/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/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= +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/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/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg= +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/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0= +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/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/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= +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-20210323180902-22b0adad7558 h1:D7nTwh4J0i+5mW4Zjzn5omvlr6YBcWywE6KOcatyNxY= +golang.org/x/oauth2 v0.0.0-20210323180902-22b0adad7558/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +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/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/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= -google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= +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/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/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/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= +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= From 10034fce382e335a41d5482a9694b8a57dec14a1 Mon Sep 17 00:00:00 2001 From: Bryan Vestey Date: Thu, 11 Aug 2022 13:40:24 -0700 Subject: [PATCH 05/24] Add makefile back --- Makefile | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..e89c913 --- /dev/null +++ b/Makefile @@ -0,0 +1,17 @@ +run: + go run './cmd/main.go' + +build: + go build './...' + +test: + go install github.com/jpoles1/gopherbadger@v2.4.0 + gopherbadger -md="readme.md" -png=false + +secure: + # or install it into ./bin/ + curl -sfL https://raw.githubusercontent.com/securego/gosec/master/install.sh | sh -s + ./bin/gosec -exclude=G104 ./... + +link: + ln -s ${GOPATH}/src/github.com/onelogin/onelogin-go-sdk . \ No newline at end of file From 76cf9e1b12a002c28066aa3e2ca299dcdbaf7647 Mon Sep 17 00:00:00 2001 From: Jmfwolf <77870544+Jmfwolf@users.noreply.github.com> Date: Mon, 20 Mar 2023 14:08:38 -0700 Subject: [PATCH 06/24] v3.1.0 (#66) * V3.1.0 * Makefile that got left behind --- .openapi-generator/FILES | 460 +- .openapi-generator/VERSION | 2 +- CHANGELOG.md | 0 LICENSE | 22 - api/openapi.yaml | 16670 ++++++++++++---- api_api_auth_claims.go | 591 + api_api_auth_client_apps.go | 613 + api_api_auth_scopes.go | 580 + api_api_authorization_server.go | 666 + api_app_rules.go | 1409 ++ api_apps.go | 1020 + api_branding_service.go | 744 + api_branding_service_smtp.go | 369 + api_branding_service_templates.go | 1050 + api_default.go | 13860 ------------- api_events.go | 478 + api_groups.go | 279 + api_invite_links.go | 279 + api_multi_factor_authentication.go | 1271 ++ api_multi_factor_authentication_v1.go | 915 + api_o_auth2.go | 454 + api_privileges.go | 1376 ++ api_roles.go | 2129 ++ api_saml_assertions.go | 593 + api_smart_hooks.go | 1493 ++ api_user_mappings.go | 1383 ++ api_users_v1.go | 2392 +++ api_users_v2.go | 1048 + api_vigilance_ai.go | 988 + client.go | 243 +- configuration.go | 33 +- docs/APIAuthClaimsApi.md | 308 + docs/APIAuthClientAppsApi.md | 310 + docs/APIAuthScopesApi.md | 308 + docs/APIAuthorizationServerApi.md | 358 + docs/Action.md | 160 - docs/ActionObj.md | 82 + docs/ActivateFactorRequest.md | 134 - docs/ActivateMfaFactorsRequest.md | 108 + ...lientApp.md => AddClientApp201Response.md} | 30 +- docs/AddClientAppRequest.md | 4 +- docs/AddPrivilegeToRole201Response.md | 56 + docs/AddPrivilegeToRoleRequest.md | 56 + docs/AddRolesToUserRequest.md | 51 + docs/{Status1.md => AltErr.md} | 86 +- docs/AppParameters.md | 134 + docs/{Rule.md => AppRule.md} | 76 +- docs/AppRulesApi.md | 821 + docs/AppsApi.md | 562 + docs/AssignUsersToPrivilegeRequest.md | 56 + ...ccessTokenClaimRequest.md => AuthClaim.md} | 47 +- docs/{Id.md => AuthId.md} | 24 +- docs/AuthMethod.md | 2 + ...Scopes200ResponseInner.md => AuthScope.md} | 44 +- docs/AuthServer.md | 119 + docs/AuthServerConfiguration.md | 20 +- docs/Brand.md | 345 + docs/BrandApp.md | 219 + docs/BrandBackground.md | 114 + docs/BrandBackgroundUrls.md | 93 + docs/BrandLogo.md | 114 + docs/BrandLogoUrls.md | 93 + docs/BrandReq.md | 108 + docs/BrandingServiceApi.md | 421 + docs/BrandingServiceSMTPApi.md | 199 + docs/BrandingServiceTemplatesApi.md | 601 + ...ps200ResponseInner.md => ClientAppFull.md} | 52 +- docs/ClockCounter.md | 82 + docs/Condition.md | 4 +- docs/ConfigurationOidc.md | 156 + docs/ConfigurationSaml.md | 72 + docs/Connector.md | 56 +- docs/CreateApp200Response.md | 489 + docs/CreateAppRequest.md | 489 + docs/CreateAuthorizationServerRequest.md | 108 - docs/CreateDeviceVerification201Response.md | 238 + docs/CreateDeviceVerificationRequest.md | 155 + docs/CreateEnvironmentVariableRequest.md | 72 - docs/CreateFactorRegistration201Response.md | 186 + docs/CreateFactorRegistrationRequest.md | 176 + ...Inner.md => CreatePrivilege200Response.md} | 24 +- ...uleId.md => CreateRole201ResponseInner.md} | 22 +- docs/DefaultApi.md | 7263 ------- docs/Device.md | 112 +- docs/EmailConfig.md | 197 + docs/EnforcementPoint.md | 398 + docs/EnforcementPointResourcesInner.md | 170 + docs/EnrollFactorRequest.md | 176 - docs/EnrollMfaFactor200Response.md | 82 + docs/{Status.md => Error.md} | 56 +- docs/ErrorStatus.md | 108 - docs/ErrorStatusErrorsInner.md | 82 - docs/Event.md | 1200 ++ docs/EventsApi.md | 229 + docs/FactorInner.md | 238 - docs/FactorInnerFactorData.md | 82 - docs/GenerateMfaToken200Response.md | 82 +- docs/GenerateMfaToken422Response.md | 134 - docs/GenerateMfaToken422ResponseDetails.md | 56 - docs/GenerateMfaTokenRequest.md | 34 +- docs/GenerateOTP201Response.md | 134 + docs/GenerateOTPRequest.md | 82 + docs/GenerateSamlAssert200Response.md | 82 + docs/GenerateTokenRequest.md | 9 +- docs/GenericApp.md | 472 + ...visioning.md => GenericAppProvisioning.md} | 24 +- docs/GetAssignedUser200Response.md | 226 + ...eInner.md => GetAuthFactors200Response.md} | 38 +- ...etAuthenticationDevices200ResponseInner.md | 160 + docs/GetAuthorizationServer200Response.md | 134 - ...etClientApps200ResponseInnerScopesInner.md | 108 - docs/GetCustomAttributes200Response.md | 82 + docs/GetEmailSettings200Response.md | 223 + docs/GetEmailSettings200ResponseOneOf.md | 56 + docs/GetEnrolledFactors200Response.md | 82 + docs/GetEnrolledFactors200ResponseData.md | 56 + ...edFactors200ResponseDataOtpDevicesInner.md | 264 + docs/GetEventById200Response.md | 82 + docs/GetEventTypes200Response.md | 82 + docs/GetEventTypes200ResponseDataInner.md | 108 + docs/GetEvents200Response.md | 108 + docs/GetEvents200ResponsePagination.md | 134 + docs/GetGroups200Response.md | 82 + docs/GetInviteLink200Response.md | 82 + docs/GetInviteLinkRequest.md | 56 + docs/GetMFAFactors200Response.md | 82 + docs/GetMFAFactors200ResponseData.md | 56 + ...AFactors200ResponseDataAuthFactorsInner.md | 82 + docs/GetRateLimit200Response.md | 16 +- docs/GetRiskScore400Response.md | 56 - ...esponse.md => GetRiskScores200Response.md} | 32 +- ...s.md => GetRiskScores200ResponseScores.md} | 54 +- docs/GetRoleApps200ResponseInner.md | 108 + docs/GetRoleById200Response.md | 82 + ....md => GetRoleById200ResponseDataInner.md} | 34 +- docs/GetRoleByName200Response.md | 108 + docs/GetRoleByName200ResponseDataInner.md | 82 + docs/GetRoleByName200ResponsePagination.md | 134 + docs/GetUserRoles200Response.md | 82 + ...r.md => GetUserVerification200Response.md} | 44 +- docs/Group.md | 108 + docs/GroupsApi.md | 141 + docs/Hook.md | 18 +- docs/HookConditionsInner.md | 108 - docs/{Envvar.md => HookEnvvar.md} | 74 +- docs/{Log.md => HookLog.md} | 46 +- docs/HookStatus.md | 4 +- docs/InviteLinksApi.md | 142 + docs/ListAccessTokenClaims200ResponseInner.md | 264 - docs/ListAppUsers200ResponseInner.md | 160 - ...istAuthorizationServers200ResponseInner.md | 134 - ...ionServers200ResponseInnerConfiguration.md | 82 - docs/ListConditions200ResponseInner.md | 2 +- ...istMappingActionValues200ResponseInner.md} | 34 +- ...md => ListMappingConditions200Response.md} | 34 +- ...ingConditionsOperators200ResponseInner.md} | 32 +- ...istMappingContionValues200ResponseInner.md | 82 + docs/ListMappingsActions200ResponseInner.md | 82 + docs/ListMessageTemplates200ResponseInner.md | 108 + docs/ListPrivelegeRoles200Response.md | 226 + docs/Locale.md | 82 + docs/LockAccountUserRequest.md | 51 + docs/Mapping.md | 17 +- docs/MessageTemplate.md | 223 + docs/MessageTemplateTemplate.md | 114 + docs/MessageTemplateTemplateOneOf.md | 93 + docs/MessageTemplateTemplateOneOf1.md | 51 + docs/MultiFactorAuthenticationApi.md | 751 + docs/MultiFactorAuthenticationV1Api.md | 520 + docs/OAuth2Api.md | 208 + ...erateToken200Response.md => OauthToken.md} | 90 +- docs/{Schema.md => OidcApp.md} | 414 +- docs/OidcAppAllOf.md | 77 + docs/OtpDevice.md | 119 + docs/Privilege.md | 124 + docs/PrivilegePrivilege.md | 82 + docs/PrivilegePrivilegeStatementInner.md | 93 + docs/PrivilegesApi.md | 782 + ...teLimit200ResponseData.md => RateLimit.md} | 44 +- docs/RemoveUserRoleRequest.md | 51 + docs/RemoveUserRoleRequestRoleIdArrayInner.md | 56 + docs/RequestBrand.md | 415 + ...TokenRequest.md => RevokeTokensRequest.md} | 27 +- docs/Role.md | 10 +- docs/RolesApi.md | 1107 + ...tions200ResponseInner.md => RuleAction.md} | 32 +- ...es200ResponseInner.md => RuleCondition.md} | 34 +- docs/SAMLAssertionsApi.md | 284 + docs/SamlApp.md | 489 + docs/SamlAppAllOf.md | 98 + docs/SamlAppAllOfParameters.md | 51 + docs/SamlAppAllOfParametersSamlUsername.md | 51 + ...eSamlAssertionRequest.md => SamlAssert.md} | 48 +- ...rifyFactorSamlRequest.md => SamlFactor.md} | 52 +- docs/Schema1.md | 186 - docs/{AddScopeRequest.md => Scope.md} | 60 +- ...sponse.md => SendInviteLink200Response.md} | 24 +- docs/SendInviteLinkRequest.md | 82 + docs/SetRoleApps200ResponseInner.md | 56 - docs/SetUserStateRequest.md | 51 + docs/SmartHooksApi.md | 791 + docs/Source.md | 2 +- docs/SsoOidc.md | 56 + docs/SsoSaml.md | 160 + docs/SsoSamlCertificate.md | 108 + docs/Status2.md | 56 - docs/Status2Status.md | 134 - docs/TokenClaim.md | 264 + ...entRequest.md => TrackRiskEventRequest.md} | 78 +- docs/UpdateAuthorizationServer400Response.md | 134 - docs/UpdateClientAppRequest.md | 2 +- docs/UpdatePasswordInsecureRequest.md | 98 + docs/UpdatePasswordSecureRequest.md | 119 + ...Inner.md => UpdatePrivilege200Response.md} | 24 +- docs/UpdateRiskRuleRequest.md | 56 + docs/User.md | 52 +- docs/UserMappingsApi.md | 771 + docs/UsersV1Api.md | 1116 ++ docs/UsersV2Api.md | 472 + ...esponse.md => VerFactorSaml200Response.md} | 30 +- docs/Verb.md | 21 + docs/VerifyMfaFactorRequest.md | 82 + ...d => VerifyUserRegistration200Response.md} | 38 +- ...st.md => VerifyUserRegistrationRequest.md} | 24 +- ...st.md => VerifyUserVerificationRequest.md} | 32 +- docs/VigilanceAIApi.md | 548 + git_push.sh | 4 +- go.mod | 5 +- go.sum | 7 + model_action.go | 264 - model_action_obj.go | 164 + model_activate_factor_request.go | 227 - model_activate_mfa_factors_request.go | 201 + model_add_access_token_claim_request.go | 187 - model_add_client_app_201_response.go | 162 + model_add_client_app_request.go | 37 +- model_add_privilege_to_role_201_response.go | 126 + model_add_privilege_to_role_request.go | 126 + model_add_role_users_200_response_inner.go | 115 - model_add_roles_to_user_request.go | 118 + model_add_scope_request.go | 151 - model_status_1.go => model_alt_err.go | 160 +- model_app_parameters.go | 266 + model_rule.go => model_app_rule.go | 179 +- model_assign_users_to_privilege_request.go | 126 + model_auth_claim.go | 192 + model_rule_id.go => model_auth_id.go | 74 +- model_auth_method.go | 10 +- model_auth_scope.go | 199 + model_auth_server.go | 208 + model_auth_server_configuration.go | 103 +- model_brand.go | 509 + model_brand_app.go | 333 + model_brand_background.go | 198 + model_brand_background_urls.go | 171 + model_brand_logo.go | 198 + model_brand_logo_urls.go | 171 + model_brand_req.go | 201 + model_client_app.go | 151 - model_client_app_full.go | 237 + model_clock_counter.go | 162 + model_condition.go | 49 +- model_configuration_oidc.go | 258 + model_configuration_saml.go | 146 + model_connector.go | 125 +- model_create_app_200_response.go | 178 + model_create_app_request.go | 178 + model_create_authorization_server_request.go | 187 - ...create_device_verification_201_response.go | 386 + model_create_device_verification_request.go | 266 + model_create_environment_variable_request.go | 139 - ...create_factor_registration_201_response.go | 312 + model_create_factor_registration_request.go | 294 + model_create_privilege_200_response.go | 127 + model_create_role_201_response_inner.go | 126 + model_create_roles_201_response_inner.go | 115 - model_device.go | 179 +- model_email_config.go | 330 + model_enforcement_point.go | 597 + model_enforcement_point_resources_inner.go | 281 + model_enroll_factor_request.go | 287 - model_enroll_mfa_factor_200_response.go | 162 + model_envvar.go | 227 - model_error.go | 216 + model_error_status.go | 187 - model_error_status_errors_inner.go | 151 - model_event.go | 1738 ++ model_factor_inner.go | 374 - model_factor_inner_factor_data.go | 153 - model_generate_mf_atoken_200_response.go | 201 + model_generate_mf_atoken_request.go | 168 + model_generate_mfa_token_422_response.go | 223 - ...generate_mfa_token_422_response_details.go | 115 - model_generate_mfa_token_request.go | 153 - ...e.go => model_generate_otp_201_response.go | 129 +- model_generate_otp_request.go | 168 + model_generate_saml_assert_200_response.go | 162 + model_generate_token_200_response.go | 295 - model_generate_token_400_response.go | 115 - model_generate_token_request.go | 55 +- model_schema.go => model_generic_app.go | 670 +- model_generic_app_provisioning.go | 126 + model_get_assigned_user_200_response.go | 346 + model_get_auth_factors_200_response.go | 201 + ...thentication_devices_200_response_inner.go | 279 + ...l_get_authorization_server_200_response.go | 223 - ...et_available_factors_200_response_inner.go | 190 - model_get_client_apps_200_response_inner.go | 223 - ...nt_apps_200_response_inner_scopes_inner.go | 187 - model_get_custom_attributes_200_response.go | 163 + model_get_email_settings_200_response.go | 148 + ..._get_email_settings_200_response_one_of.go | 126 + model_get_enrolled_factors_200_response.go | 162 + ..._get_enrolled_factors_200_response_data.go | 126 + ...ors_200_response_data_otp_devices_inner.go | 423 + model_get_event_by_id_200_response.go | 162 + model_get_event_types_200_response.go | 162 + ...get_event_types_200_response_data_inner.go | 198 + model_get_events_200_response.go | 198 + model_get_events_200_response_pagination.go | 234 + model_get_groups_200_response.go | 162 + model_get_invite_link_200_response.go | 163 + model_get_invite_link_request.go | 127 + model_get_mfa_factors_200_response.go | 162 + model_get_mfa_factors_200_response_data.go | 126 + ...rs_200_response_data_auth_factors_inner.go | 164 + model_get_rate_limit_200_response.go | 59 +- model_get_risk_score_200_response.go | 35 +- model_get_risk_score_400_response.go | 115 - model_get_risk_score_request.go | 63 +- model_get_risk_scores_200_response.go | 162 + ...del_get_risk_scores_200_response_scores.go | 137 +- model_get_role_apps_200_response_inner.go | 201 + model_get_role_by_id_200_response.go | 162 + ..._get_role_by_id_200_response_data_inner.go | 164 + model_get_role_by_name_200_response.go | 198 + ...et_role_by_name_200_response_data_inner.go | 164 + ...et_role_by_name_200_response_pagination.go | 234 + model_get_score_insights_200_response.go | 151 - model_get_user_apps_200_response_inner.go | 83 +- model_get_user_roles_200_response.go | 163 + model_get_user_verification_200_response.go | 201 + model_group.go | 201 + model_hook.go | 133 +- model_hook_conditions_inner.go | 187 - model_hook_envvar.go | 255 + model_log.go => model_hook_log.go | 121 +- model_hook_options.go | 43 +- model_hook_status.go | 37 +- model_id.go | 115 - ..._access_token_claims_200_response_inner.go | 403 - model_list_actions_200_response_inner.go | 153 - model_list_app_users_200_response_inner.go | 259 - ...uthorization_servers_200_response_inner.go | 223 - ...ervers_200_response_inner_configuration.go | 151 - ..._condition_operators_200_response_inner.go | 153 - ...ist_condition_values_200_response_inner.go | 151 - model_list_conditions_200_response_inner.go | 37 +- ...apping_action_values_200_response_inner.go | 164 + ..._condition_operators_200_response_inner.go | 153 - model_list_mapping_conditions_200_response.go | 164 + ...t_mapping_conditions_200_response_inner.go | 153 - ...conditions_operators_200_response_inner.go | 164 + ...pping_contion_values_200_response_inner.go | 164 + ...ist_mappings_actions_200_response_inner.go | 164 + ...st_message_templates_200_response_inner.go | 201 + model_list_privelege_roles_200_response.go | 346 + model_locale.go | 164 + model_lock_account_user_request.go | 118 + model_mapping.go | 86 +- model_message_template.go | 345 + model_message_template_template.go | 148 + model_message_template_template_one_of.go | 174 + model_message_template_template_one_of_1.go | 118 + model_oauth_token.go | 312 + model_oidc_app.go | 731 + model_oidc_app_all_of.go | 153 + model_otp_device.go | 211 + model_privilege.go | 216 + model_privilege_privilege.go | 162 + model_privilege_privilege_statement_inner.go | 174 + ...00_response_data.go => model_rate_limit.go | 108 +- model_registration.go | 190 - model_remove_role_users_request.go | 27 +- model_remove_user_role_request.go | 117 + ...e_user_role_request_role_id_array_inner.go | 126 + model_request_brand.go | 640 + model_revoke_token_request.go | 115 - model_revoke_tokens_request.go | 118 + model_risk_device.go | 27 +- model_risk_rule.go | 75 +- model_risk_user.go | 39 +- model_role.go | 62 +- model_rule_action.go | 164 + model_rule_condition.go | 164 + model_saml_app.go | 722 + model_saml_app_all_of.go | 180 + model_saml_app_all_of_parameters.go | 117 + ...aml_app_all_of_parameters_saml_username.go | 117 + ...sertion_request.go => model_saml_assert.go | 115 +- ...or_saml_request.go => model_saml_factor.go | 123 +- model_schema_1.go | 296 - model_schema_1_added_by.go | 151 - model_schema_provisioning.go | 116 - ...es_200_response_inner.go => model_scope.go | 108 +- model_send_invite_link_200_response.go | 126 + model_send_invite_link_request.go | 164 + model_session.go | 27 +- model_set_role_apps_200_response_inner.go | 116 - model_set_user_state_request.go | 118 + model_source.go | 36 +- model_sso_oidc.go | 127 + model_sso_saml.go | 270 + model_sso_saml_certificate.go | 201 + model_status.go | 223 - model_status_2.go | 115 - model_status_2_status.go | 223 - model_token_claim.go | 423 + ...st.go => model_track_risk_event_request.go | 177 +- ...pdate_authorization_server_400_response.go | 223 - model_update_client_app_request.go | 28 +- model_update_environment_variable_request.go | 21 +- model_update_password_insecure_request.go | 187 + model_update_password_secure_request.go | 211 + model_update_privilege_200_response.go | 127 + model_update_risk_rule_request.go | 127 + model_update_role_200_response.go | 27 +- model_user.go | 369 +- model_ver_factor_saml_200_response.go | 164 + model_verb.go | 119 + model_verify_enrollment_request.go | 115 - model_verify_factor_request.go | 153 - model_verify_factor_saml_200_response.go | 153 - ..._verify_factor_voice_200_response_inner.go | 187 - model_verify_mfa_factor_request.go | 164 + ...l_verify_user_registration_200_response.go | 201 + model_verify_user_registration_request.go | 127 + model_verify_user_verification_request.go | 164 + readme.md | 535 +- response.go | 6 +- test/api_api_auth_claims_test.go | 83 + test/api_api_auth_client_apps_test.go | 84 + test/api_api_auth_scopes_test.go | 83 + test/api_api_authorization_server_test.go | 91 + test/api_app_rules_test.go | 185 + test/api_apps_test.go | 131 + test/api_branding_service_smtp_test.go | 62 + test/api_branding_service_templates_test.go | 144 + test/api_branding_service_test.go | 105 + test/api_events_test.go | 64 + test/api_groups_test.go | 52 + test/api_invite_links_test.go | 50 + test/api_multi_factor_authentication_test.go | 170 + ...api_multi_factor_authentication_v1_test.go | 126 + test/api_o_auth2_test.go | 62 + test/api_privileges_test.go | 175 + test/api_roles_test.go | 227 + test/api_saml_assertions_test.go | 74 + test/api_smart_hooks_test.go | 170 + test/api_user_mappings_test.go | 169 + test/api_users_v1_test.go | 229 + test/api_users_v2_test.go | 105 + test/api_vigilance_ai_test.go | 126 + utils.go | 25 +- 464 files changed, 93235 insertions(+), 40891 deletions(-) delete mode 100644 CHANGELOG.md delete mode 100644 LICENSE create mode 100644 api_api_auth_claims.go create mode 100644 api_api_auth_client_apps.go create mode 100644 api_api_auth_scopes.go create mode 100644 api_api_authorization_server.go create mode 100644 api_app_rules.go create mode 100644 api_apps.go create mode 100644 api_branding_service.go create mode 100644 api_branding_service_smtp.go create mode 100644 api_branding_service_templates.go delete mode 100644 api_default.go create mode 100644 api_events.go create mode 100644 api_groups.go create mode 100644 api_invite_links.go create mode 100644 api_multi_factor_authentication.go create mode 100644 api_multi_factor_authentication_v1.go create mode 100644 api_o_auth2.go create mode 100644 api_privileges.go create mode 100644 api_roles.go create mode 100644 api_saml_assertions.go create mode 100644 api_smart_hooks.go create mode 100644 api_user_mappings.go create mode 100644 api_users_v1.go create mode 100644 api_users_v2.go create mode 100644 api_vigilance_ai.go create mode 100644 docs/APIAuthClaimsApi.md create mode 100644 docs/APIAuthClientAppsApi.md create mode 100644 docs/APIAuthScopesApi.md create mode 100644 docs/APIAuthorizationServerApi.md delete mode 100644 docs/Action.md create mode 100644 docs/ActionObj.md delete mode 100644 docs/ActivateFactorRequest.md create mode 100644 docs/ActivateMfaFactorsRequest.md rename docs/{ClientApp.md => AddClientApp201Response.md} (64%) create mode 100644 docs/AddPrivilegeToRole201Response.md create mode 100644 docs/AddPrivilegeToRoleRequest.md create mode 100644 docs/AddRolesToUserRequest.md rename docs/{Status1.md => AltErr.md} (65%) create mode 100644 docs/AppParameters.md rename docs/{Rule.md => AppRule.md} (70%) create mode 100644 docs/AppRulesApi.md create mode 100644 docs/AppsApi.md create mode 100644 docs/AssignUsersToPrivilegeRequest.md rename docs/{AddAccessTokenClaimRequest.md => AuthClaim.md} (57%) rename docs/{Id.md => AuthId.md} (69%) rename docs/{ListScopes200ResponseInner.md => AuthScope.md} (57%) create mode 100644 docs/AuthServer.md create mode 100644 docs/Brand.md create mode 100644 docs/BrandApp.md create mode 100644 docs/BrandBackground.md create mode 100644 docs/BrandBackgroundUrls.md create mode 100644 docs/BrandLogo.md create mode 100644 docs/BrandLogoUrls.md create mode 100644 docs/BrandReq.md create mode 100644 docs/BrandingServiceApi.md create mode 100644 docs/BrandingServiceSMTPApi.md create mode 100644 docs/BrandingServiceTemplatesApi.md rename docs/{GetClientApps200ResponseInner.md => ClientAppFull.md} (54%) create mode 100644 docs/ClockCounter.md create mode 100644 docs/ConfigurationOidc.md create mode 100644 docs/ConfigurationSaml.md create mode 100644 docs/CreateApp200Response.md create mode 100644 docs/CreateAppRequest.md delete mode 100644 docs/CreateAuthorizationServerRequest.md create mode 100644 docs/CreateDeviceVerification201Response.md create mode 100644 docs/CreateDeviceVerificationRequest.md delete mode 100644 docs/CreateEnvironmentVariableRequest.md create mode 100644 docs/CreateFactorRegistration201Response.md create mode 100644 docs/CreateFactorRegistrationRequest.md rename docs/{CreateRoles201ResponseInner.md => CreatePrivilege200Response.md} (57%) rename docs/{RuleId.md => CreateRole201ResponseInner.md} (61%) delete mode 100644 docs/DefaultApi.md create mode 100644 docs/EmailConfig.md create mode 100644 docs/EnforcementPoint.md create mode 100644 docs/EnforcementPointResourcesInner.md delete mode 100644 docs/EnrollFactorRequest.md create mode 100644 docs/EnrollMfaFactor200Response.md rename docs/{Status.md => Error.md} (65%) delete mode 100644 docs/ErrorStatus.md delete mode 100644 docs/ErrorStatusErrorsInner.md create mode 100644 docs/Event.md create mode 100644 docs/EventsApi.md delete mode 100644 docs/FactorInner.md delete mode 100644 docs/FactorInnerFactorData.md delete mode 100644 docs/GenerateMfaToken422Response.md delete mode 100644 docs/GenerateMfaToken422ResponseDetails.md create mode 100644 docs/GenerateOTP201Response.md create mode 100644 docs/GenerateOTPRequest.md create mode 100644 docs/GenerateSamlAssert200Response.md create mode 100644 docs/GenericApp.md rename docs/{SchemaProvisioning.md => GenericAppProvisioning.md} (61%) create mode 100644 docs/GetAssignedUser200Response.md rename docs/{GetAvailableFactors200ResponseInner.md => GetAuthFactors200Response.md} (61%) create mode 100644 docs/GetAuthenticationDevices200ResponseInner.md delete mode 100644 docs/GetAuthorizationServer200Response.md delete mode 100644 docs/GetClientApps200ResponseInnerScopesInner.md create mode 100644 docs/GetCustomAttributes200Response.md create mode 100644 docs/GetEmailSettings200Response.md create mode 100644 docs/GetEmailSettings200ResponseOneOf.md create mode 100644 docs/GetEnrolledFactors200Response.md create mode 100644 docs/GetEnrolledFactors200ResponseData.md create mode 100644 docs/GetEnrolledFactors200ResponseDataOtpDevicesInner.md create mode 100644 docs/GetEventById200Response.md create mode 100644 docs/GetEventTypes200Response.md create mode 100644 docs/GetEventTypes200ResponseDataInner.md create mode 100644 docs/GetEvents200Response.md create mode 100644 docs/GetEvents200ResponsePagination.md create mode 100644 docs/GetGroups200Response.md create mode 100644 docs/GetInviteLink200Response.md create mode 100644 docs/GetInviteLinkRequest.md create mode 100644 docs/GetMFAFactors200Response.md create mode 100644 docs/GetMFAFactors200ResponseData.md create mode 100644 docs/GetMFAFactors200ResponseDataAuthFactorsInner.md delete mode 100644 docs/GetRiskScore400Response.md rename docs/{GetScoreInsights200Response.md => GetRiskScores200Response.md} (56%) rename docs/{GetScoreInsights200ResponseScores.md => GetRiskScores200ResponseScores.md} (60%) create mode 100644 docs/GetRoleApps200ResponseInner.md create mode 100644 docs/GetRoleById200Response.md rename docs/{Schema1AddedBy.md => GetRoleById200ResponseDataInner.md} (55%) create mode 100644 docs/GetRoleByName200Response.md create mode 100644 docs/GetRoleByName200ResponseDataInner.md create mode 100644 docs/GetRoleByName200ResponsePagination.md create mode 100644 docs/GetUserRoles200Response.md rename docs/{VerifyFactorVoice200ResponseInner.md => GetUserVerification200Response.md} (51%) create mode 100644 docs/Group.md create mode 100644 docs/GroupsApi.md delete mode 100644 docs/HookConditionsInner.md rename docs/{Envvar.md => HookEnvvar.md} (59%) rename docs/{Log.md => HookLog.md} (72%) create mode 100644 docs/InviteLinksApi.md delete mode 100644 docs/ListAccessTokenClaims200ResponseInner.md delete mode 100644 docs/ListAppUsers200ResponseInner.md delete mode 100644 docs/ListAuthorizationServers200ResponseInner.md delete mode 100644 docs/ListAuthorizationServers200ResponseInnerConfiguration.md rename docs/{ListConditionOperators200ResponseInner.md => ListMappingActionValues200ResponseInner.md} (51%) rename docs/{ListMappingConditions200ResponseInner.md => ListMappingConditions200Response.md} (55%) rename docs/{ListMappingConditionOperators200ResponseInner.md => ListMappingConditionsOperators200ResponseInner.md} (54%) create mode 100644 docs/ListMappingContionValues200ResponseInner.md create mode 100644 docs/ListMappingsActions200ResponseInner.md create mode 100644 docs/ListMessageTemplates200ResponseInner.md create mode 100644 docs/ListPrivelegeRoles200Response.md create mode 100644 docs/Locale.md create mode 100644 docs/LockAccountUserRequest.md create mode 100644 docs/MessageTemplate.md create mode 100644 docs/MessageTemplateTemplate.md create mode 100644 docs/MessageTemplateTemplateOneOf.md create mode 100644 docs/MessageTemplateTemplateOneOf1.md create mode 100644 docs/MultiFactorAuthenticationApi.md create mode 100644 docs/MultiFactorAuthenticationV1Api.md create mode 100644 docs/OAuth2Api.md rename docs/{GenerateToken200Response.md => OauthToken.md} (51%) rename docs/{Schema.md => OidcApp.md} (58%) create mode 100644 docs/OidcAppAllOf.md create mode 100644 docs/OtpDevice.md create mode 100644 docs/Privilege.md create mode 100644 docs/PrivilegePrivilege.md create mode 100644 docs/PrivilegePrivilegeStatementInner.md create mode 100644 docs/PrivilegesApi.md rename docs/{GetRateLimit200ResponseData.md => RateLimit.md} (58%) create mode 100644 docs/RemoveUserRoleRequest.md create mode 100644 docs/RemoveUserRoleRequestRoleIdArrayInner.md create mode 100644 docs/RequestBrand.md rename docs/{RevokeTokenRequest.md => RevokeTokensRequest.md} (57%) create mode 100644 docs/RolesApi.md rename docs/{ListActions200ResponseInner.md => RuleAction.md} (60%) rename docs/{ListConditionValues200ResponseInner.md => RuleCondition.md} (53%) create mode 100644 docs/SAMLAssertionsApi.md create mode 100644 docs/SamlApp.md create mode 100644 docs/SamlAppAllOf.md create mode 100644 docs/SamlAppAllOfParameters.md create mode 100644 docs/SamlAppAllOfParametersSamlUsername.md rename docs/{GenerateSamlAssertionRequest.md => SamlAssert.md} (62%) rename docs/{VerifyFactorSamlRequest.md => SamlFactor.md} (63%) delete mode 100644 docs/Schema1.md rename docs/{AddScopeRequest.md => Scope.md} (54%) rename docs/{GenerateToken400Response.md => SendInviteLink200Response.md} (59%) create mode 100644 docs/SendInviteLinkRequest.md delete mode 100644 docs/SetRoleApps200ResponseInner.md create mode 100644 docs/SetUserStateRequest.md create mode 100644 docs/SmartHooksApi.md create mode 100644 docs/SsoOidc.md create mode 100644 docs/SsoSaml.md create mode 100644 docs/SsoSamlCertificate.md delete mode 100644 docs/Status2.md delete mode 100644 docs/Status2Status.md create mode 100644 docs/TokenClaim.md rename docs/{TrackEventRequest.md => TrackRiskEventRequest.md} (66%) delete mode 100644 docs/UpdateAuthorizationServer400Response.md create mode 100644 docs/UpdatePasswordInsecureRequest.md create mode 100644 docs/UpdatePasswordSecureRequest.md rename docs/{AddRoleUsers200ResponseInner.md => UpdatePrivilege200Response.md} (57%) create mode 100644 docs/UpdateRiskRuleRequest.md create mode 100644 docs/UserMappingsApi.md create mode 100644 docs/UsersV1Api.md create mode 100644 docs/UsersV2Api.md rename docs/{VerifyFactorSaml200Response.md => VerFactorSaml200Response.md} (63%) create mode 100644 docs/Verb.md create mode 100644 docs/VerifyMfaFactorRequest.md rename docs/{Registration.md => VerifyUserRegistration200Response.md} (61%) rename docs/{VerifyEnrollmentRequest.md => VerifyUserRegistrationRequest.md} (53%) rename docs/{VerifyFactorRequest.md => VerifyUserVerificationRequest.md} (59%) create mode 100644 docs/VigilanceAIApi.md delete mode 100644 model_action.go create mode 100644 model_action_obj.go delete mode 100644 model_activate_factor_request.go create mode 100644 model_activate_mfa_factors_request.go delete mode 100644 model_add_access_token_claim_request.go create mode 100644 model_add_client_app_201_response.go create mode 100644 model_add_privilege_to_role_201_response.go create mode 100644 model_add_privilege_to_role_request.go delete mode 100644 model_add_role_users_200_response_inner.go create mode 100644 model_add_roles_to_user_request.go delete mode 100644 model_add_scope_request.go rename model_status_1.go => model_alt_err.go (56%) create mode 100644 model_app_parameters.go rename model_rule.go => model_app_rule.go (60%) create mode 100644 model_assign_users_to_privilege_request.go create mode 100644 model_auth_claim.go rename model_rule_id.go => model_auth_id.go (50%) create mode 100644 model_auth_scope.go create mode 100644 model_auth_server.go create mode 100644 model_brand.go create mode 100644 model_brand_app.go create mode 100644 model_brand_background.go create mode 100644 model_brand_background_urls.go create mode 100644 model_brand_logo.go create mode 100644 model_brand_logo_urls.go create mode 100644 model_brand_req.go delete mode 100644 model_client_app.go create mode 100644 model_client_app_full.go create mode 100644 model_clock_counter.go create mode 100644 model_configuration_oidc.go create mode 100644 model_configuration_saml.go create mode 100644 model_create_app_200_response.go create mode 100644 model_create_app_request.go delete mode 100644 model_create_authorization_server_request.go create mode 100644 model_create_device_verification_201_response.go create mode 100644 model_create_device_verification_request.go delete mode 100644 model_create_environment_variable_request.go create mode 100644 model_create_factor_registration_201_response.go create mode 100644 model_create_factor_registration_request.go create mode 100644 model_create_privilege_200_response.go create mode 100644 model_create_role_201_response_inner.go delete mode 100644 model_create_roles_201_response_inner.go create mode 100644 model_email_config.go create mode 100644 model_enforcement_point.go create mode 100644 model_enforcement_point_resources_inner.go delete mode 100644 model_enroll_factor_request.go create mode 100644 model_enroll_mfa_factor_200_response.go delete mode 100644 model_envvar.go create mode 100644 model_error.go delete mode 100644 model_error_status.go delete mode 100644 model_error_status_errors_inner.go create mode 100644 model_event.go delete mode 100644 model_factor_inner.go delete mode 100644 model_factor_inner_factor_data.go create mode 100644 model_generate_mf_atoken_200_response.go create mode 100644 model_generate_mf_atoken_request.go delete mode 100644 model_generate_mfa_token_422_response.go delete mode 100644 model_generate_mfa_token_422_response_details.go delete mode 100644 model_generate_mfa_token_request.go rename model_generate_mfa_token_200_response.go => model_generate_otp_201_response.go (50%) create mode 100644 model_generate_otp_request.go create mode 100644 model_generate_saml_assert_200_response.go delete mode 100644 model_generate_token_200_response.go delete mode 100644 model_generate_token_400_response.go rename model_schema.go => model_generic_app.go (52%) create mode 100644 model_generic_app_provisioning.go create mode 100644 model_get_assigned_user_200_response.go create mode 100644 model_get_auth_factors_200_response.go create mode 100644 model_get_authentication_devices_200_response_inner.go delete mode 100644 model_get_authorization_server_200_response.go delete mode 100644 model_get_available_factors_200_response_inner.go delete mode 100644 model_get_client_apps_200_response_inner.go delete mode 100644 model_get_client_apps_200_response_inner_scopes_inner.go create mode 100644 model_get_custom_attributes_200_response.go create mode 100644 model_get_email_settings_200_response.go create mode 100644 model_get_email_settings_200_response_one_of.go create mode 100644 model_get_enrolled_factors_200_response.go create mode 100644 model_get_enrolled_factors_200_response_data.go create mode 100644 model_get_enrolled_factors_200_response_data_otp_devices_inner.go create mode 100644 model_get_event_by_id_200_response.go create mode 100644 model_get_event_types_200_response.go create mode 100644 model_get_event_types_200_response_data_inner.go create mode 100644 model_get_events_200_response.go create mode 100644 model_get_events_200_response_pagination.go create mode 100644 model_get_groups_200_response.go create mode 100644 model_get_invite_link_200_response.go create mode 100644 model_get_invite_link_request.go create mode 100644 model_get_mfa_factors_200_response.go create mode 100644 model_get_mfa_factors_200_response_data.go create mode 100644 model_get_mfa_factors_200_response_data_auth_factors_inner.go delete mode 100644 model_get_risk_score_400_response.go create mode 100644 model_get_risk_scores_200_response.go rename model_get_score_insights_200_response_scores.go => model_get_risk_scores_200_response_scores.go (50%) create mode 100644 model_get_role_apps_200_response_inner.go create mode 100644 model_get_role_by_id_200_response.go create mode 100644 model_get_role_by_id_200_response_data_inner.go create mode 100644 model_get_role_by_name_200_response.go create mode 100644 model_get_role_by_name_200_response_data_inner.go create mode 100644 model_get_role_by_name_200_response_pagination.go delete mode 100644 model_get_score_insights_200_response.go create mode 100644 model_get_user_roles_200_response.go create mode 100644 model_get_user_verification_200_response.go create mode 100644 model_group.go delete mode 100644 model_hook_conditions_inner.go create mode 100644 model_hook_envvar.go rename model_log.go => model_hook_log.go (58%) delete mode 100644 model_id.go delete mode 100644 model_list_access_token_claims_200_response_inner.go delete mode 100644 model_list_actions_200_response_inner.go delete mode 100644 model_list_app_users_200_response_inner.go delete mode 100644 model_list_authorization_servers_200_response_inner.go delete mode 100644 model_list_authorization_servers_200_response_inner_configuration.go delete mode 100644 model_list_condition_operators_200_response_inner.go delete mode 100644 model_list_condition_values_200_response_inner.go create mode 100644 model_list_mapping_action_values_200_response_inner.go delete mode 100644 model_list_mapping_condition_operators_200_response_inner.go create mode 100644 model_list_mapping_conditions_200_response.go delete mode 100644 model_list_mapping_conditions_200_response_inner.go create mode 100644 model_list_mapping_conditions_operators_200_response_inner.go create mode 100644 model_list_mapping_contion_values_200_response_inner.go create mode 100644 model_list_mappings_actions_200_response_inner.go create mode 100644 model_list_message_templates_200_response_inner.go create mode 100644 model_list_privelege_roles_200_response.go create mode 100644 model_locale.go create mode 100644 model_lock_account_user_request.go create mode 100644 model_message_template.go create mode 100644 model_message_template_template.go create mode 100644 model_message_template_template_one_of.go create mode 100644 model_message_template_template_one_of_1.go create mode 100644 model_oauth_token.go create mode 100644 model_oidc_app.go create mode 100644 model_oidc_app_all_of.go create mode 100644 model_otp_device.go create mode 100644 model_privilege.go create mode 100644 model_privilege_privilege.go create mode 100644 model_privilege_privilege_statement_inner.go rename model_get_rate_limit_200_response_data.go => model_rate_limit.go (52%) delete mode 100644 model_registration.go create mode 100644 model_remove_user_role_request.go create mode 100644 model_remove_user_role_request_role_id_array_inner.go create mode 100644 model_request_brand.go delete mode 100644 model_revoke_token_request.go create mode 100644 model_revoke_tokens_request.go create mode 100644 model_rule_action.go create mode 100644 model_rule_condition.go create mode 100644 model_saml_app.go create mode 100644 model_saml_app_all_of.go create mode 100644 model_saml_app_all_of_parameters.go create mode 100644 model_saml_app_all_of_parameters_saml_username.go rename model_generate_saml_assertion_request.go => model_saml_assert.go (53%) rename model_verify_factor_saml_request.go => model_saml_factor.go (55%) delete mode 100644 model_schema_1.go delete mode 100644 model_schema_1_added_by.go delete mode 100644 model_schema_provisioning.go rename model_list_scopes_200_response_inner.go => model_scope.go (50%) create mode 100644 model_send_invite_link_200_response.go create mode 100644 model_send_invite_link_request.go delete mode 100644 model_set_role_apps_200_response_inner.go create mode 100644 model_set_user_state_request.go create mode 100644 model_sso_oidc.go create mode 100644 model_sso_saml.go create mode 100644 model_sso_saml_certificate.go delete mode 100644 model_status.go delete mode 100644 model_status_2.go delete mode 100644 model_status_2_status.go create mode 100644 model_token_claim.go rename model_track_event_request.go => model_track_risk_event_request.go (57%) delete mode 100644 model_update_authorization_server_400_response.go create mode 100644 model_update_password_insecure_request.go create mode 100644 model_update_password_secure_request.go create mode 100644 model_update_privilege_200_response.go create mode 100644 model_update_risk_rule_request.go create mode 100644 model_ver_factor_saml_200_response.go create mode 100644 model_verb.go delete mode 100644 model_verify_enrollment_request.go delete mode 100644 model_verify_factor_request.go delete mode 100644 model_verify_factor_saml_200_response.go delete mode 100644 model_verify_factor_voice_200_response_inner.go create mode 100644 model_verify_mfa_factor_request.go create mode 100644 model_verify_user_registration_200_response.go create mode 100644 model_verify_user_registration_request.go create mode 100644 model_verify_user_verification_request.go create mode 100644 test/api_api_auth_claims_test.go create mode 100644 test/api_api_auth_client_apps_test.go create mode 100644 test/api_api_auth_scopes_test.go create mode 100644 test/api_api_authorization_server_test.go create mode 100644 test/api_app_rules_test.go create mode 100644 test/api_apps_test.go create mode 100644 test/api_branding_service_smtp_test.go create mode 100644 test/api_branding_service_templates_test.go create mode 100644 test/api_branding_service_test.go create mode 100644 test/api_events_test.go create mode 100644 test/api_groups_test.go create mode 100644 test/api_invite_links_test.go create mode 100644 test/api_multi_factor_authentication_test.go create mode 100644 test/api_multi_factor_authentication_v1_test.go create mode 100644 test/api_o_auth2_test.go create mode 100644 test/api_privileges_test.go create mode 100644 test/api_roles_test.go create mode 100644 test/api_saml_assertions_test.go create mode 100644 test/api_smart_hooks_test.go create mode 100644 test/api_user_mappings_test.go create mode 100644 test/api_users_v1_test.go create mode 100644 test/api_users_v2_test.go create mode 100644 test/api_vigilance_ai_test.go diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index d60ec10..b17eab5 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -1,193 +1,397 @@ .gitignore +.openapi-generator-ignore .travis.yml README.md api/openapi.yaml -api_default.go +api_api_auth_claims.go +api_api_auth_client_apps.go +api_api_auth_scopes.go +api_api_authorization_server.go +api_app_rules.go +api_apps.go +api_branding_service.go +api_branding_service_smtp.go +api_branding_service_templates.go +api_events.go +api_groups.go +api_invite_links.go +api_multi_factor_authentication.go +api_multi_factor_authentication_v1.go +api_o_auth2.go +api_privileges.go +api_roles.go +api_saml_assertions.go +api_smart_hooks.go +api_user_mappings.go +api_users_v1.go +api_users_v2.go +api_vigilance_ai.go client.go configuration.go -docs/Action.md -docs/ActivateFactorRequest.md -docs/AddAccessTokenClaimRequest.md +docs/APIAuthClaimsApi.md +docs/APIAuthClientAppsApi.md +docs/APIAuthScopesApi.md +docs/APIAuthorizationServerApi.md +docs/ActionObj.md +docs/ActivateMfaFactorsRequest.md +docs/AddClientApp201Response.md docs/AddClientAppRequest.md -docs/AddRoleUsers200ResponseInner.md -docs/AddScopeRequest.md +docs/AddPrivilegeToRole201Response.md +docs/AddPrivilegeToRoleRequest.md +docs/AddRolesToUserRequest.md +docs/AltErr.md +docs/AppParameters.md +docs/AppRule.md +docs/AppRulesApi.md +docs/AppsApi.md +docs/AssignUsersToPrivilegeRequest.md +docs/AuthClaim.md +docs/AuthId.md docs/AuthMethod.md +docs/AuthScope.md +docs/AuthServer.md docs/AuthServerConfiguration.md -docs/ClientApp.md +docs/Brand.md +docs/BrandApp.md +docs/BrandBackground.md +docs/BrandBackgroundUrls.md +docs/BrandLogo.md +docs/BrandLogoUrls.md +docs/BrandReq.md +docs/BrandingServiceApi.md +docs/BrandingServiceSMTPApi.md +docs/BrandingServiceTemplatesApi.md +docs/ClientAppFull.md +docs/ClockCounter.md docs/Condition.md +docs/ConfigurationOidc.md +docs/ConfigurationSaml.md docs/Connector.md -docs/CreateAuthorizationServerRequest.md -docs/CreateEnvironmentVariableRequest.md -docs/CreateRoles201ResponseInner.md -docs/DefaultApi.md +docs/CreateApp200Response.md +docs/CreateAppRequest.md +docs/CreateDeviceVerification201Response.md +docs/CreateDeviceVerificationRequest.md +docs/CreateFactorRegistration201Response.md +docs/CreateFactorRegistrationRequest.md +docs/CreatePrivilege200Response.md +docs/CreateRole201ResponseInner.md docs/Device.md -docs/EnrollFactorRequest.md -docs/Envvar.md -docs/ErrorStatus.md -docs/ErrorStatusErrorsInner.md -docs/FactorInner.md -docs/FactorInnerFactorData.md -docs/GenerateMfaToken200Response.md -docs/GenerateMfaToken422Response.md -docs/GenerateMfaToken422ResponseDetails.md -docs/GenerateMfaTokenRequest.md -docs/GenerateSamlAssertionRequest.md -docs/GenerateToken200Response.md -docs/GenerateToken400Response.md +docs/EmailConfig.md +docs/EnforcementPoint.md +docs/EnforcementPointResourcesInner.md +docs/EnrollMfaFactor200Response.md +docs/Error.md +docs/Event.md +docs/EventsApi.md +docs/GenerateMFAtoken200Response.md +docs/GenerateMFAtokenRequest.md +docs/GenerateOTP201Response.md +docs/GenerateOTPRequest.md +docs/GenerateSamlAssert200Response.md docs/GenerateTokenRequest.md -docs/GetAuthorizationServer200Response.md -docs/GetAvailableFactors200ResponseInner.md -docs/GetClientApps200ResponseInner.md -docs/GetClientApps200ResponseInnerScopesInner.md +docs/GenericApp.md +docs/GenericAppProvisioning.md +docs/GetAssignedUser200Response.md +docs/GetAuthFactors200Response.md +docs/GetAuthenticationDevices200ResponseInner.md +docs/GetCustomAttributes200Response.md +docs/GetEmailSettings200Response.md +docs/GetEmailSettings200ResponseOneOf.md +docs/GetEnrolledFactors200Response.md +docs/GetEnrolledFactors200ResponseData.md +docs/GetEnrolledFactors200ResponseDataOtpDevicesInner.md +docs/GetEventById200Response.md +docs/GetEventTypes200Response.md +docs/GetEventTypes200ResponseDataInner.md +docs/GetEvents200Response.md +docs/GetEvents200ResponsePagination.md +docs/GetGroups200Response.md +docs/GetInviteLink200Response.md +docs/GetInviteLinkRequest.md +docs/GetMFAFactors200Response.md +docs/GetMFAFactors200ResponseData.md +docs/GetMFAFactors200ResponseDataAuthFactorsInner.md docs/GetRateLimit200Response.md -docs/GetRateLimit200ResponseData.md docs/GetRiskScore200Response.md -docs/GetRiskScore400Response.md docs/GetRiskScoreRequest.md -docs/GetScoreInsights200Response.md -docs/GetScoreInsights200ResponseScores.md +docs/GetRiskScores200Response.md +docs/GetRiskScores200ResponseScores.md +docs/GetRoleApps200ResponseInner.md +docs/GetRoleById200Response.md +docs/GetRoleById200ResponseDataInner.md +docs/GetRoleByName200Response.md +docs/GetRoleByName200ResponseDataInner.md +docs/GetRoleByName200ResponsePagination.md docs/GetUserApps200ResponseInner.md +docs/GetUserRoles200Response.md +docs/GetUserVerification200Response.md +docs/Group.md +docs/GroupsApi.md docs/Hook.md -docs/HookConditionsInner.md +docs/HookEnvvar.md +docs/HookLog.md docs/HookOptions.md docs/HookStatus.md -docs/Id.md -docs/ListAccessTokenClaims200ResponseInner.md -docs/ListActions200ResponseInner.md -docs/ListAppUsers200ResponseInner.md -docs/ListAuthorizationServers200ResponseInner.md -docs/ListAuthorizationServers200ResponseInnerConfiguration.md -docs/ListConditionOperators200ResponseInner.md -docs/ListConditionValues200ResponseInner.md +docs/InviteLinksApi.md docs/ListConditions200ResponseInner.md -docs/ListMappingConditionOperators200ResponseInner.md -docs/ListMappingConditions200ResponseInner.md -docs/ListScopes200ResponseInner.md -docs/Log.md +docs/ListMappingActionValues200ResponseInner.md +docs/ListMappingConditions200Response.md +docs/ListMappingConditionsOperators200ResponseInner.md +docs/ListMappingContionValues200ResponseInner.md +docs/ListMappingsActions200ResponseInner.md +docs/ListMessageTemplates200ResponseInner.md +docs/ListPrivelegeRoles200Response.md +docs/Locale.md +docs/LockAccountUserRequest.md docs/Mapping.md -docs/Registration.md +docs/MessageTemplate.md +docs/MessageTemplateTemplate.md +docs/MessageTemplateTemplateOneOf.md +docs/MessageTemplateTemplateOneOf1.md +docs/MultiFactorAuthenticationApi.md +docs/MultiFactorAuthenticationV1Api.md +docs/OAuth2Api.md +docs/OauthToken.md +docs/OidcApp.md +docs/OidcAppAllOf.md +docs/OtpDevice.md +docs/Privilege.md +docs/PrivilegePrivilege.md +docs/PrivilegePrivilegeStatementInner.md +docs/PrivilegesApi.md +docs/RateLimit.md docs/RemoveRoleUsersRequest.md -docs/RevokeTokenRequest.md +docs/RemoveUserRoleRequest.md +docs/RemoveUserRoleRequestRoleIdArrayInner.md +docs/RequestBrand.md +docs/RevokeTokensRequest.md docs/RiskDevice.md docs/RiskRule.md docs/RiskUser.md docs/Role.md -docs/Rule.md -docs/RuleId.md -docs/Schema.md -docs/Schema1.md -docs/Schema1AddedBy.md -docs/SchemaProvisioning.md +docs/RolesApi.md +docs/RuleAction.md +docs/RuleCondition.md +docs/SAMLAssertionsApi.md +docs/SamlApp.md +docs/SamlAppAllOf.md +docs/SamlAppAllOfParameters.md +docs/SamlAppAllOfParametersSamlUsername.md +docs/SamlAssert.md +docs/SamlFactor.md +docs/Scope.md +docs/SendInviteLink200Response.md +docs/SendInviteLinkRequest.md docs/Session.md -docs/SetRoleApps200ResponseInner.md +docs/SetUserStateRequest.md +docs/SmartHooksApi.md docs/Source.md -docs/Status.md -docs/Status1.md -docs/Status2.md -docs/Status2Status.md -docs/TrackEventRequest.md -docs/UpdateAuthorizationServer400Response.md +docs/SsoOidc.md +docs/SsoSaml.md +docs/SsoSamlCertificate.md +docs/TokenClaim.md +docs/TrackRiskEventRequest.md docs/UpdateClientAppRequest.md docs/UpdateEnvironmentVariableRequest.md +docs/UpdatePasswordInsecureRequest.md +docs/UpdatePasswordSecureRequest.md +docs/UpdatePrivilege200Response.md +docs/UpdateRiskRuleRequest.md docs/UpdateRole200Response.md docs/User.md -docs/VerifyEnrollmentRequest.md -docs/VerifyFactorRequest.md -docs/VerifyFactorSaml200Response.md -docs/VerifyFactorSamlRequest.md -docs/VerifyFactorVoice200ResponseInner.md +docs/UserMappingsApi.md +docs/UsersV1Api.md +docs/UsersV2Api.md +docs/VerFactorSaml200Response.md +docs/Verb.md +docs/VerifyMfaFactorRequest.md +docs/VerifyUserRegistration200Response.md +docs/VerifyUserRegistrationRequest.md +docs/VerifyUserVerificationRequest.md +docs/VigilanceAIApi.md git_push.sh go.mod go.sum -model_action.go -model_activate_factor_request.go -model_add_access_token_claim_request.go +model_action_obj.go +model_activate_mfa_factors_request.go +model_add_client_app_201_response.go model_add_client_app_request.go -model_add_role_users_200_response_inner.go -model_add_scope_request.go +model_add_privilege_to_role_201_response.go +model_add_privilege_to_role_request.go +model_add_roles_to_user_request.go +model_alt_err.go +model_app_parameters.go +model_app_rule.go +model_assign_users_to_privilege_request.go +model_auth_claim.go +model_auth_id.go model_auth_method.go +model_auth_scope.go +model_auth_server.go model_auth_server_configuration.go -model_client_app.go +model_brand.go +model_brand_app.go +model_brand_background.go +model_brand_background_urls.go +model_brand_logo.go +model_brand_logo_urls.go +model_brand_req.go +model_client_app_full.go +model_clock_counter.go model_condition.go +model_configuration_oidc.go +model_configuration_saml.go model_connector.go -model_create_authorization_server_request.go -model_create_environment_variable_request.go -model_create_roles_201_response_inner.go +model_create_app_200_response.go +model_create_app_request.go +model_create_device_verification_201_response.go +model_create_device_verification_request.go +model_create_factor_registration_201_response.go +model_create_factor_registration_request.go +model_create_privilege_200_response.go +model_create_role_201_response_inner.go model_device.go -model_enroll_factor_request.go -model_envvar.go -model_error_status.go -model_error_status_errors_inner.go -model_factor_inner.go -model_factor_inner_factor_data.go -model_generate_mfa_token_200_response.go -model_generate_mfa_token_422_response.go -model_generate_mfa_token_422_response_details.go -model_generate_mfa_token_request.go -model_generate_saml_assertion_request.go -model_generate_token_200_response.go -model_generate_token_400_response.go +model_email_config.go +model_enforcement_point.go +model_enforcement_point_resources_inner.go +model_enroll_mfa_factor_200_response.go +model_error.go +model_event.go +model_generate_mf_atoken_200_response.go +model_generate_mf_atoken_request.go +model_generate_otp_201_response.go +model_generate_otp_request.go +model_generate_saml_assert_200_response.go model_generate_token_request.go -model_get_authorization_server_200_response.go -model_get_available_factors_200_response_inner.go -model_get_client_apps_200_response_inner.go -model_get_client_apps_200_response_inner_scopes_inner.go +model_generic_app.go +model_generic_app_provisioning.go +model_get_assigned_user_200_response.go +model_get_auth_factors_200_response.go +model_get_authentication_devices_200_response_inner.go +model_get_custom_attributes_200_response.go +model_get_email_settings_200_response.go +model_get_email_settings_200_response_one_of.go +model_get_enrolled_factors_200_response.go +model_get_enrolled_factors_200_response_data.go +model_get_enrolled_factors_200_response_data_otp_devices_inner.go +model_get_event_by_id_200_response.go +model_get_event_types_200_response.go +model_get_event_types_200_response_data_inner.go +model_get_events_200_response.go +model_get_events_200_response_pagination.go +model_get_groups_200_response.go +model_get_invite_link_200_response.go +model_get_invite_link_request.go +model_get_mfa_factors_200_response.go +model_get_mfa_factors_200_response_data.go +model_get_mfa_factors_200_response_data_auth_factors_inner.go model_get_rate_limit_200_response.go -model_get_rate_limit_200_response_data.go model_get_risk_score_200_response.go -model_get_risk_score_400_response.go model_get_risk_score_request.go -model_get_score_insights_200_response.go -model_get_score_insights_200_response_scores.go +model_get_risk_scores_200_response.go +model_get_risk_scores_200_response_scores.go +model_get_role_apps_200_response_inner.go +model_get_role_by_id_200_response.go +model_get_role_by_id_200_response_data_inner.go +model_get_role_by_name_200_response.go +model_get_role_by_name_200_response_data_inner.go +model_get_role_by_name_200_response_pagination.go model_get_user_apps_200_response_inner.go +model_get_user_roles_200_response.go +model_get_user_verification_200_response.go +model_group.go model_hook.go -model_hook_conditions_inner.go +model_hook_envvar.go +model_hook_log.go model_hook_options.go model_hook_status.go -model_id.go -model_list_access_token_claims_200_response_inner.go -model_list_actions_200_response_inner.go -model_list_app_users_200_response_inner.go -model_list_authorization_servers_200_response_inner.go -model_list_authorization_servers_200_response_inner_configuration.go -model_list_condition_operators_200_response_inner.go -model_list_condition_values_200_response_inner.go model_list_conditions_200_response_inner.go -model_list_mapping_condition_operators_200_response_inner.go -model_list_mapping_conditions_200_response_inner.go -model_list_scopes_200_response_inner.go -model_log.go +model_list_mapping_action_values_200_response_inner.go +model_list_mapping_conditions_200_response.go +model_list_mapping_conditions_operators_200_response_inner.go +model_list_mapping_contion_values_200_response_inner.go +model_list_mappings_actions_200_response_inner.go +model_list_message_templates_200_response_inner.go +model_list_privelege_roles_200_response.go +model_locale.go +model_lock_account_user_request.go model_mapping.go -model_registration.go +model_message_template.go +model_message_template_template.go +model_message_template_template_one_of.go +model_message_template_template_one_of_1.go +model_oauth_token.go +model_oidc_app.go +model_oidc_app_all_of.go +model_otp_device.go +model_privilege.go +model_privilege_privilege.go +model_privilege_privilege_statement_inner.go +model_rate_limit.go model_remove_role_users_request.go -model_revoke_token_request.go +model_remove_user_role_request.go +model_remove_user_role_request_role_id_array_inner.go +model_request_brand.go +model_revoke_tokens_request.go model_risk_device.go model_risk_rule.go model_risk_user.go model_role.go -model_rule.go -model_rule_id.go -model_schema.go -model_schema_1.go -model_schema_1_added_by.go -model_schema_provisioning.go +model_rule_action.go +model_rule_condition.go +model_saml_app.go +model_saml_app_all_of.go +model_saml_app_all_of_parameters.go +model_saml_app_all_of_parameters_saml_username.go +model_saml_assert.go +model_saml_factor.go +model_scope.go +model_send_invite_link_200_response.go +model_send_invite_link_request.go model_session.go -model_set_role_apps_200_response_inner.go +model_set_user_state_request.go model_source.go -model_status.go -model_status_1.go -model_status_2.go -model_status_2_status.go -model_track_event_request.go -model_update_authorization_server_400_response.go +model_sso_oidc.go +model_sso_saml.go +model_sso_saml_certificate.go +model_token_claim.go +model_track_risk_event_request.go model_update_client_app_request.go model_update_environment_variable_request.go +model_update_password_insecure_request.go +model_update_password_secure_request.go +model_update_privilege_200_response.go +model_update_risk_rule_request.go model_update_role_200_response.go model_user.go -model_verify_enrollment_request.go -model_verify_factor_request.go -model_verify_factor_saml_200_response.go -model_verify_factor_saml_request.go -model_verify_factor_voice_200_response_inner.go +model_ver_factor_saml_200_response.go +model_verb.go +model_verify_mfa_factor_request.go +model_verify_user_registration_200_response.go +model_verify_user_registration_request.go +model_verify_user_verification_request.go response.go +test/api_api_auth_claims_test.go +test/api_api_auth_client_apps_test.go +test/api_api_auth_scopes_test.go +test/api_api_authorization_server_test.go +test/api_app_rules_test.go +test/api_apps_test.go +test/api_branding_service_smtp_test.go +test/api_branding_service_templates_test.go +test/api_branding_service_test.go +test/api_events_test.go +test/api_groups_test.go +test/api_invite_links_test.go +test/api_multi_factor_authentication_test.go +test/api_multi_factor_authentication_v1_test.go +test/api_o_auth2_test.go +test/api_privileges_test.go +test/api_roles_test.go +test/api_saml_assertions_test.go +test/api_smart_hooks_test.go +test/api_user_mappings_test.go +test/api_users_v1_test.go +test/api_users_v2_test.go +test/api_vigilance_ai_test.go utils.go diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION index 6d54bbd..e7e42a4 100644 --- a/.openapi-generator/VERSION +++ b/.openapi-generator/VERSION @@ -1 +1 @@ -6.0.1 \ No newline at end of file +6.3.0 \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index e69de29..0000000 diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 389489f..0000000 --- a/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 2010-2021 OneLogin, Inc. - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. diff --git a/api/openapi.yaml b/api/openapi.yaml index 98c6ceb..f16692b 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -1,1067 +1,1851 @@ openapi: 3.0.3 info: + contact: + name: OneLogin + url: https://support.onelogin.com + description: OpenAPI Specification for OneLogin title: OneLogin API - version: 3.0.0-alpha.1 + version: 3.1.1 servers: -- url: "https://{subdomain}.{domain}.com" - variables: - subdomain: - default: onelogininc - domain: - default: onelogin +- url: https://your-api-subdomain.onelogin.com +tags: +- description: OAuth2 + name: OAuth2 +- description: Collection of APIs that allow you to configure OneLogin as an Authorization + server + name: API Authorization Server +- description: Access and Authorization Scopes + name: "API Auth: Scopes" +- description: Regarding Token Claims + name: "API Auth: Claims" +- name: "API Auth: Client Apps" +- description: App Management Endpoint + name: Apps +- description: Application Rule policy creation and enforcement + name: App Rules +- description: General Branding Service Endpoints + name: Branding Service +- description: Branding Service Endpoints for custom templates + name: "Branding Service: Templates" +- description: Branding Service Endpoints for SMTP + name: "Branding Service: SMTP" +- description: "Event Types, IDs, tracking, tracing, and more" + name: Events +- description: Group Management Endpoint + name: Groups +- description: Invite Via Email Link + name: Invite Links +- description: "Multi Factor Authentication (MFA), One Time Passcodes (OTP)" + name: Multi Factor Authentication +- description: "Deprecated Multi Factor Authentication (MFA), One Time Passcodes (OTP)" + name: Multi Factor Authentication V1 +- description: Privilege Management Endpoint + name: Privileges +- description: Role Management Endpoint + name: Roles +- description: Dealing with SAML Authentication protocol + name: SAML Assertions +- description: User Management Endpoint Version 1 + name: Users V1 +- description: User Management Endpoint Version 2 + name: Users V2 +- description: User Mappings Management Endpoint + name: User Mappings +- description: Risk service Endpoint + name: Vigilance AI +- description: Smart Hook extensions + name: Smart Hooks paths: /auth/oauth2/v2/token: post: + description: Generate Token operationId: generateToken parameters: - - in: header - name: Authorization - required: true + - example: application/json + explode: false + in: header + name: Content-Type + required: false schema: + default: application/json type: string + style: simple requestBody: content: application/json: + example: + grant_type: client_credentials schema: $ref: '#/components/schemas/generateToken_request' + description: Request Body to Generate OAuth Token required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/generateToken_200_response' - description: OK + $ref: '#/components/schemas/oauth_token' + description: Successful Response "400": content: application/json: + example: + error: true + code: 400 + type: bad request + message: Request Failure schema: - $ref: '#/components/schemas/generateToken_400_response' - description: "Typically, either grant_type value is incorrect or Authorization\ - \ header is incorrectly formatted." + $ref: '#/components/schemas/Error' + description: Bad Request "401": content: application/json: + example: + error: true + code: 401 + type: Unauthorized + message: Unauthorized Error schema: - $ref: '#/components/schemas/generateToken_400_response' - description: "Typically, this error means that your client_id and/or client_secret\ - \ values are invalid." + $ref: '#/components/schemas/Error' + description: Unauthorized "404": content: application/json: + example: + error: true + code: 404 + type: Not Found + message: No Route Exists schema: - $ref: '#/components/schemas/generateToken_400_response' - description: "Typically, this error means that you are using the incorrect\ - \ method. Ensure that you are making a POST." + $ref: '#/components/schemas/Error' + description: Not Found + security: + - basicAuth: [] + summary: Generate Token + tags: + - OAuth2 /auth/oauth2/revoke: post: - operationId: revokeToken + description: Revoke Tokens + operationId: revokeTokens parameters: - - in: header - name: Authorization - required: true + - example: application/json + explode: false + in: header + name: Content-Type + required: false schema: + default: application/json type: string + style: simple requestBody: content: application/json: schema: - $ref: '#/components/schemas/revokeToken_request' + $ref: '#/components/schemas/revokeTokens_request' responses: "200": content: application/json: + example: + error: false + code: 200 + type: success + message: sucess schema: - $ref: '#/components/schemas/generateToken_400_response' - description: OK + $ref: '#/components/schemas/Error' + description: Successful response "400": content: application/json: + example: + error: true + code: 400 + type: bad request + message: Request Failure schema: - $ref: '#/components/schemas/generateToken_400_response' - description: "Possibly, the Authorization header is incorrectly formatted." + $ref: '#/components/schemas/Error' + description: Bad Request "401": content: application/json: + example: + error: true + code: 401 + type: Unauthorized + message: Unauthorized Error schema: - $ref: '#/components/schemas/generateToken_400_response' - description: "Typically, this error means that your client_id and/or client_secret\ - \ values are invalid." + $ref: '#/components/schemas/Error' + description: Unauthorized "404": content: application/json: + example: + error: true + code: 404 + type: Not Found + message: No Route Exists schema: - $ref: '#/components/schemas/generateToken_400_response' - description: "Typically, this error means that you are using the incorrect\ - \ method. Ensure that you are making a POST." + $ref: '#/components/schemas/Error' + description: Not Found + security: + - basicAuth: [] + summary: Revoke Tokens + tags: + - OAuth2 /auth/rate_limit: get: + description: Get Rate Limit operationId: getRateLimit - parameters: - - in: header - name: Authorization - required: true - schema: - type: string responses: "200": content: application/json: schema: $ref: '#/components/schemas/getRateLimit_200_response' - description: OK + description: Successful response "400": content: application/json: + example: + error: true + code: 400 + type: bad request + message: Request Failure schema: - $ref: '#/components/schemas/generateToken_400_response' + $ref: '#/components/schemas/Error' description: Bad Request "401": content: application/json: + example: + error: true + code: 401 + type: Unauthorized + message: Unauthorized Error schema: - $ref: '#/components/schemas/generateToken_400_response' + $ref: '#/components/schemas/Error' description: Unauthorized "404": content: application/json: - schema: - $ref: '#/components/schemas/generateToken_400_response' + example: + error: true + code: 404 + type: Not Found + message: No Route Exists + schema: + $ref: '#/components/schemas/Error' + description: Not Found + security: + - OAuth2: + - Read Users + - Manage users + - Manage All + - Read All + summary: Get Rate Limit + tags: + - OAuth2 /api/2/api_authorizations: get: - operationId: listAuthorizationServers - parameters: - - in: header - name: Authorization - required: true - schema: - type: string + description: List Authorization Servers + operationId: listAuthServers responses: "200": content: application/json: schema: items: - $ref: '#/components/schemas/listAuthorizationServers_200_response_inner' + $ref: '#/components/schemas/auth_server' type: array - description: OK + description: Successful response "401": content: application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." + $ref: '#/components/schemas/altErr' + description: Unauthorized + security: + - OAuth2: + - Manage All + summary: List Api Auth Servers + tags: + - API Authorization Server post: - operationId: createAuthorizationServer + description: Create Auth Server + operationId: createAuthServer parameters: - - in: header - name: Authorization - required: true + - example: application/json + explode: false + in: header + name: Content-Type + required: false schema: + default: application/json type: string + style: simple requestBody: - $ref: '#/components/requestBodies/auth_server' + content: + application/json: + schema: + $ref: '#/components/schemas/auth_server' responses: - "201": + "200": content: application/json: schema: - $ref: '#/components/schemas/id' - description: CREATED + $ref: '#/components/schemas/auth_server' + description: Successful response "401": content: application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." + $ref: '#/components/schemas/altErr' + description: Unauthorized "422": content: application/json: - schema: - $ref: '#/components/schemas/status_1' - description: Audiences are required - /api/2/api_authorizations/{id}: + example: + statusCode: 422 + name: UnprocessableEntityError + message: invalid value in \"auth_method\" + schema: + $ref: '#/components/schemas/altErr' + description: Unprocessable Entity + security: + - OAuth2: + - Manage All + summary: Create Api Auth Server + tags: + - API Authorization Server + /api/2/api_authorizations/{api_auth_id}: delete: - operationId: deleteAuthorizationServer + description: Delete Authentication Server + operationId: deleteAuthServer parameters: - - in: header - name: Authorization - required: true + - example: application/json + explode: false + in: header + name: Content-Type + required: false schema: + default: application/json type: string - - in: path - name: id + style: simple + - explode: false + in: path + name: api_auth_id required: true schema: - type: integer + type: string + style: simple responses: "204": - description: NO CONTENT + description: Success. The auth server is deleted. No content is returned. "401": content: application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." + $ref: '#/components/schemas/altErr' + description: Unauthorized "404": content: application/json: - schema: - $ref: '#/components/schemas/status_1' - description: Invalid ID + example: + statusCode: 404 + name: NotFoundError + message: The resource can't be found or the server has not found anything + matching the Request-URI + schema: + $ref: '#/components/schemas/altErr' + description: Not Found + security: + - OAuth2: + - Manage All + - Read All + summary: Delete Api Auth Server + tags: + - API Authorization Server get: - operationId: getAuthorizationServer + description: Get Authorization Server + operationId: getAuthServer parameters: - - in: header - name: Authorization - required: true + - example: application/json + explode: false + in: header + name: Content-Type + required: false schema: + default: application/json type: string - - in: path - name: id + style: simple + - explode: false + in: path + name: api_auth_id required: true schema: - type: integer + type: string + style: simple responses: "200": content: application/json: schema: - $ref: '#/components/schemas/getAuthorizationServer_200_response' - description: OK + $ref: '#/components/schemas/auth_server' + description: Successful response "401": content: application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/status_1' - description: NOT FOUND + $ref: '#/components/schemas/altErr' + description: Unauthorized + security: + - OAuth2: + - Manage All + summary: Get Api Auth Server + tags: + - API Authorization Server put: - operationId: updateAuthorizationServer + description: Update Authorization Server + operationId: updateAuthServer parameters: - - in: header - name: Authorization - required: true + - example: application/json + explode: false + in: header + name: Content-Type + required: false schema: + default: application/json type: string - - in: path - name: id + style: simple + - explode: false + in: path + name: api_auth_id required: true schema: - type: integer + type: string + style: simple requestBody: - $ref: '#/components/requestBodies/auth_server' + content: + application/json: + schema: + $ref: '#/components/schemas/auth_server' responses: "200": content: application/json: schema: - $ref: '#/components/schemas/id' - description: OK - "400": + $ref: '#/components/schemas/auth_server' + description: Successful response + "401": content: application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication schema: - $ref: '#/components/schemas/updateAuthorizationServer_400_response' - description: You need to submit all of the attributes - "401": + $ref: '#/components/schemas/altErr' + description: Unauthorized + "404": content: application/json: + example: + statusCode: 404 + name: NotFoundError + message: The resource can't be found or the server has not found anything + matching the Request-URI schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." + $ref: '#/components/schemas/altErr' + description: Not Found "422": content: application/json: - schema: - $ref: '#/components/schemas/status_1' - description: Indicates that the syntax of the request is good but a value - supplied is not valid. - /api/2/api_authorizations/{id}/claims: + example: + statusCode: 422 + name: UnprocessableEntityError + message: invalid value in \"auth_method\" + schema: + $ref: '#/components/schemas/altErr' + description: Unprocessable Entity + security: + - OAuth2: + - Manage All + summary: Update Api Auth Server + tags: + - API Authorization Server + /api/2/api_authorizations/{api_auth_id}/scopes: get: - operationId: listAccessTokenClaims + description: List Authorization Scopes + operationId: getScopes parameters: - - in: header - name: Authorization - required: true + - example: application/json + explode: false + in: header + name: Content-Type + required: false schema: + default: application/json type: string - - in: path - name: id + style: simple + - explode: false + in: path + name: api_auth_id required: true schema: - type: integer + type: string + style: simple responses: "200": content: application/json: schema: items: - $ref: '#/components/schemas/listAccessTokenClaims_200_response_inner' + $ref: '#/components/schemas/auth_scope' type: array - description: OK + description: Successful response "401": content: application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/status_1' - description: Invalid ID + $ref: '#/components/schemas/altErr' + description: Unauthorized + security: + - OAuth2: + - Manage All + summary: Get Api Auth Server Scopes + tags: + - "API Auth: Scopes" post: - operationId: addAccessTokenClaim + description: Create API Auth Server Scope + operationId: createScope parameters: - - in: header - name: Authorization - required: true + - example: application/json + explode: false + in: header + name: Content-Type + required: false schema: + default: application/json type: string - - in: path - name: id + style: simple + - explode: false + in: path + name: api_auth_id required: true schema: - type: integer + type: string + style: simple requestBody: - $ref: '#/components/requestBodies/claim' + content: + application/json: + schema: + $ref: '#/components/schemas/auth_scope' responses: "200": content: application/json: schema: - $ref: '#/components/schemas/id' - description: OK + $ref: '#/components/schemas/auth_scope' + description: Successful response "401": content: application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." + $ref: '#/components/schemas/altErr' + description: Unauthorized "404": content: application/json: + example: + statusCode: 404 + name: NotFoundError + message: The resource can't be found or the server has not found anything + matching the Request-URI schema: - $ref: '#/components/schemas/status_1' - description: Invalid ID + $ref: '#/components/schemas/altErr' + description: Not Found "422": content: application/json: - schema: - $ref: '#/components/schemas/status_1' - description: This name already exists - /api/2/api_authorizations/{id}/claims/{claim_id}: + example: + statusCode: 422 + name: UnprocessableEntityError + message: invalid value in \"auth_method\" + schema: + $ref: '#/components/schemas/altErr' + description: Unprocessable Entity + security: + - OAuth2: + - Manage All + summary: Create Api Auth Server Scope + tags: + - "API Auth: Scopes" + /api/2/api_authorizations/{api_auth_id}/scopes/{scope_id}: delete: - operationId: deleteAccessTokenClaim + description: Delete Scope + operationId: deleteScope parameters: - - in: header - name: Authorization - required: true + - example: application/json + explode: false + in: header + name: Content-Type + required: false schema: + default: application/json type: string - - in: path - name: id + style: simple + - explode: false + in: path + name: api_auth_id required: true schema: - type: integer - - in: path - name: claim_id + type: string + style: simple + - explode: false + in: path + name: scope_id required: true schema: type: integer + style: simple responses: "204": - description: NO CONTENT + description: Success. The scope is deleted. No content is returned. "401": content: application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." + $ref: '#/components/schemas/altErr' + description: Unauthorized "404": content: application/json: - schema: - $ref: '#/components/schemas/status_1' - description: Invalid ID + example: + statusCode: 404 + name: NotFoundError + message: The resource can't be found or the server has not found anything + matching the Request-URI + schema: + $ref: '#/components/schemas/altErr' + description: Not Found + security: + - OAuth2: + - Manage All + summary: Delete Api Auth Server Scope + tags: + - "API Auth: Scopes" put: - operationId: updateAccessTokenClaim + description: Update Scope + operationId: updateScope parameters: - - in: header - name: Authorization - required: true + - example: application/json + explode: false + in: header + name: Content-Type + required: false schema: + default: application/json type: string - - in: path - name: id + style: simple + - explode: false + in: path + name: api_auth_id required: true schema: - type: integer - - in: path - name: claim_id + type: string + style: simple + - explode: false + in: path + name: scope_id required: true schema: type: integer + style: simple requestBody: - $ref: '#/components/requestBodies/claim' + content: + application/json: + schema: + $ref: '#/components/schemas/auth_scope' responses: "200": content: application/json: schema: - $ref: '#/components/schemas/id' - description: OK + $ref: '#/components/schemas/auth_id' + description: Successful response "401": content: application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." + $ref: '#/components/schemas/altErr' + description: Unauthorized "404": content: application/json: + example: + statusCode: 404 + name: NotFoundError + message: The resource can't be found or the server has not found anything + matching the Request-URI schema: - $ref: '#/components/schemas/status_1' - description: Invalid ID + $ref: '#/components/schemas/altErr' + description: Not Found "422": content: application/json: - schema: - $ref: '#/components/schemas/status_1' - description: This name already exists - /api/2/api_authorizations/{id}/scopes: + example: + statusCode: 422 + name: UnprocessableEntityError + message: invalid value in \"auth_method\" + schema: + $ref: '#/components/schemas/altErr' + description: Unprocessable Entity + security: + - OAuth2: + - Manage All + summary: Update Api Auth Server Scope + tags: + - "API Auth: Scopes" + /api/2/api_authorizations/{api_auth_id}/claims: get: - operationId: listScopes + description: Get Authorization claims + operationId: getAuthclaims parameters: - - in: header - name: Authorization - required: true + - example: application/json + explode: false + in: header + name: Content-Type + required: false schema: + default: application/json type: string - - in: path - name: id + style: simple + - explode: false + in: path + name: api_auth_id required: true schema: - type: integer + type: string + style: simple responses: "200": content: application/json: schema: items: - $ref: '#/components/schemas/listScopes_200_response_inner' + $ref: '#/components/schemas/token_claim' type: array - description: OK + description: Successful response "401": content: application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." + $ref: '#/components/schemas/altErr' + description: Unauthorized "404": content: application/json: - schema: - $ref: '#/components/schemas/status_1' - description: Invalid ID + example: + statusCode: 404 + name: NotFoundError + message: The resource can't be found or the server has not found anything + matching the Request-URI + schema: + $ref: '#/components/schemas/altErr' + description: Not Found + security: + - OAuth2: + - Manage All + summary: Get Api Auth Server claims + tags: + - "API Auth: Claims" post: - operationId: addScope + description: Create Authorization Claim + operationId: createAuthClaim parameters: - - in: header - name: Authorization - required: true + - example: application/json + explode: false + in: header + name: Content-Type + required: false schema: + default: application/json type: string - - in: path - name: id + style: simple + - explode: false + in: path + name: api_auth_id required: true schema: - type: integer + type: string + style: simple requestBody: - $ref: '#/components/requestBodies/scope' + content: + application/json: + schema: + $ref: '#/components/schemas/auth_claim' responses: "200": content: application/json: schema: $ref: '#/components/schemas/id' - description: OK + description: Successful response "401": content: application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." + $ref: '#/components/schemas/altErr' + description: Unauthorized "404": content: application/json: + example: + statusCode: 404 + name: NotFoundError + message: The resource can't be found or the server has not found anything + matching the Request-URI schema: - $ref: '#/components/schemas/status_1' - description: Invalid ID + $ref: '#/components/schemas/altErr' + description: Not Found "422": content: application/json: - schema: - $ref: '#/components/schemas/status_1' - description: This name already exists - /api/2/api_authorizations/{id}/scopes/{scope_id}: + example: + statusCode: 422 + name: UnprocessableEntityError + message: invalid value in \"auth_method\" + schema: + $ref: '#/components/schemas/altErr' + description: Unprocessable Entity + security: + - OAuth2: + - Manage All + summary: Create Api Auth Server Claim + tags: + - "API Auth: Claims" + /api/2/api_authorizations/{api_auth_id}/claims/{claim_id}: delete: - operationId: deleteScope + description: Delete Authorization Claim + operationId: deleteAuthClaim parameters: - - in: header - name: Authorization - required: true + - example: application/json + explode: false + in: header + name: Content-Type + required: false schema: + default: application/json type: string - - in: path - name: id + style: simple + - explode: false + in: path + name: api_auth_id required: true schema: - type: integer - - in: path - name: scope_id + type: string + style: simple + - explode: false + in: path + name: claim_id required: true schema: type: integer + style: simple responses: "204": - description: NO CONTENT + description: Success. The claim is deleted. No content is returned. "401": content: application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." + $ref: '#/components/schemas/altErr' + description: Unauthorized "404": content: application/json: - schema: - $ref: '#/components/schemas/status_1' - description: Invalid ID + example: + statusCode: 404 + name: NotFoundError + message: The resource can't be found or the server has not found anything + matching the Request-URI + schema: + $ref: '#/components/schemas/altErr' + description: Not Found + security: + - OAuth2: + - Manage All + summary: Delete Api Auth Server Claim + tags: + - "API Auth: Claims" put: - operationId: updateScope + description: Update Authorization Server Claim + operationId: updateClaim parameters: - - in: header - name: Authorization - required: true + - example: application/json + explode: false + in: header + name: Content-Type + required: false schema: + default: application/json type: string - - in: path - name: id + style: simple + - explode: false + in: path + name: api_auth_id required: true schema: - type: integer - - in: path - name: scope_id + type: string + style: simple + - explode: false + in: path + name: claim_id required: true schema: type: integer + style: simple requestBody: - $ref: '#/components/requestBodies/scope' + content: + application/json: + schema: + $ref: '#/components/schemas/auth_claim' responses: "200": content: application/json: schema: - $ref: '#/components/schemas/id' - description: OK + $ref: '#/components/schemas/auth_id' + description: Successful response "401": content: application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." + $ref: '#/components/schemas/altErr' + description: Unauthorized "404": content: application/json: + example: + statusCode: 404 + name: NotFoundError + message: The resource can't be found or the server has not found anything + matching the Request-URI schema: - $ref: '#/components/schemas/status_1' - description: Invalid ID + $ref: '#/components/schemas/altErr' + description: Not Found "422": content: application/json: - schema: - $ref: '#/components/schemas/status_1' - description: This name already exists - /api/2/api_authorizations/{id}/clients: + example: + statusCode: 422 + name: UnprocessableEntityError + message: invalid value in \"auth_method\" + schema: + $ref: '#/components/schemas/altErr' + description: Unprocessable Entity + security: + - OAuth2: + - Manage All + summary: Update Api Auth Server Claim + tags: + - "API Auth: Claims" + /api/2/api_authorizations/{api_auth_id}/clients: get: - operationId: getClientApps + description: List Client Apps + operationId: listClientApps parameters: - - in: header - name: Authorization - required: true + - example: application/json + explode: false + in: header + name: Content-Type + required: false schema: + default: application/json type: string - - in: path - name: id + style: simple + - explode: false + in: path + name: api_auth_id required: true schema: - type: integer + type: string + style: simple responses: "200": content: application/json: schema: - items: - $ref: '#/components/schemas/getClientApps_200_response_inner' - type: array - description: OK + $ref: '#/components/schemas/client_app_full' + description: Successful response "401": content: application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." + $ref: '#/components/schemas/altErr' + description: Unauthorized "404": content: application/json: - schema: - $ref: '#/components/schemas/status_1' - description: Invalid ID + example: + statusCode: 404 + name: NotFoundError + message: The resource can't be found or the server has not found anything + matching the Request-URI + schema: + $ref: '#/components/schemas/altErr' + description: Not Found + security: + - OAuth2: + - Manage All + summary: List Clients Apps + tags: + - "API Auth: Client Apps" post: + description: Add Client App operationId: addClientApp parameters: - - in: header - name: Authorization - required: true + - example: application/json + explode: false + in: header + name: Content-Type + required: false schema: + default: application/json type: string - - in: path - name: id + style: simple + - explode: false + in: path + name: api_auth_id required: true schema: - type: integer + type: string + style: simple requestBody: content: application/json: schema: $ref: '#/components/schemas/addClientApp_request' - required: true responses: "201": content: application/json: schema: - $ref: '#/components/schemas/client_app' - description: CREATED + $ref: '#/components/schemas/addClientApp_201_response' + description: Created "401": content: application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." + $ref: '#/components/schemas/altErr' + description: Unauthorized "404": content: application/json: + example: + statusCode: 404 + name: NotFoundError + message: The resource can't be found or the server has not found anything + matching the Request-URI schema: - $ref: '#/components/schemas/status_1' - description: Invalid ID + $ref: '#/components/schemas/altErr' + description: Not Found "422": content: application/json: - schema: - $ref: '#/components/schemas/status_1' - description: An invalid scope id has been provided - /api/2/api_authorizations/{id}/clients/{client_app_id}: + example: + statusCode: 422 + name: UnprocessableEntityError + message: invalid value in \"auth_method\" + schema: + $ref: '#/components/schemas/altErr' + description: Unprocessable Entity + security: + - OAuth2: + - Manage All + summary: Add Client App + tags: + - "API Auth: Client Apps" + /api/2/api_authorizations/{api_auth_id}/clients/{client_app_id}: delete: - operationId: removeClientApp + description: Delete Client App + operationId: deleteClientApp parameters: - - in: header - name: Authorization - required: true + - example: application/json + explode: false + in: header + name: Content-Type + required: false schema: + default: application/json type: string - - in: path - name: id + style: simple + - explode: false + in: path + name: api_auth_id required: true schema: - type: integer - - in: path + type: string + style: simple + - explode: false + in: path name: client_app_id required: true schema: type: integer + style: simple responses: "200": - description: NO CONTENT + content: + application/json: + schema: + $ref: '#/components/schemas/addClientApp_201_response' + description: Successful response "401": content: application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." + $ref: '#/components/schemas/altErr' + description: Unauthorized + "404": + content: + application/json: + example: + statusCode: 404 + name: NotFoundError + message: The resource can't be found or the server has not found anything + matching the Request-URI + schema: + $ref: '#/components/schemas/altErr' + description: Not Found "422": content: application/json: + example: + statusCode: 422 + name: UnprocessableEntityError + message: invalid value in \"auth_method\" schema: - $ref: '#/components/schemas/status_1' - description: Indicates that the syntax of the request is good but a value - supplied is not valid. + $ref: '#/components/schemas/altErr' + description: Unprocessable Entity + security: + - OAuth2: + - Manage All + summary: Remove Client App + tags: + - "API Auth: Client Apps" put: + description: Update Client App operationId: updateClientApp parameters: - - in: header - name: Authorization - required: true + - example: application/json + explode: false + in: header + name: Content-Type + required: false schema: + default: application/json type: string - - in: path - name: id + style: simple + - explode: false + in: path + name: api_auth_id required: true schema: - type: integer - - in: path + type: string + style: simple + - explode: false + in: path name: client_app_id required: true schema: type: integer + style: simple requestBody: content: application/json: schema: $ref: '#/components/schemas/updateClientApp_request' - required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/client_app' - description: OK + $ref: '#/components/schemas/addClientApp_201_response' + description: Successful Response "401": content: application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." + $ref: '#/components/schemas/altErr' + description: Unauthorized "404": content: application/json: + example: + statusCode: 404 + name: NotFoundError + message: The resource can't be found or the server has not found anything + matching the Request-URI schema: - $ref: '#/components/schemas/status_1' - description: Invalid ID + $ref: '#/components/schemas/altErr' + description: Not Found "422": content: application/json: - schema: - $ref: '#/components/schemas/status_1' - description: An invalid scope id has been provided - /api/2/apps: + example: + statusCode: 422 + name: UnprocessableEntityError + message: invalid value in \"auth_method\" + schema: + $ref: '#/components/schemas/altErr' + description: Unprocessable Entity + security: + - OAuth2: + - Manage All + summary: Update Client App + tags: + - "API Auth: Client Apps" + /api/1/events: get: - operationId: listApps + description: Get Events + operationId: getEvents parameters: - - in: header - name: Authorization - required: true + - explode: true + in: query + name: event_type_id + required: false schema: - type: string - - description: "The total number of items returned per page. The maximum limit\ - \ varies between endpoints, see the relevant endpoint documentation for\ - \ the specific limit." + items: + type: integer + type: array + style: form + - explode: true in: query - name: limit + name: client_id + required: false schema: type: integer - - description: The page number of results to return. + style: form + - explode: true in: query - name: page + name: directory_id + required: false schema: type: integer - - description: Set to the value extracted from Before-Cursor or After-Cursor - headers to return the previous or next page. + style: form + - explode: true in: query - name: cursor + name: id + required: false + schema: + $ref: '#/components/schemas/id' + style: form + - explode: true + in: query + name: created_at + required: false schema: type: string - - description: The name or partial name of the app to search for. When using - a partial name you must append a wildcard `*` + style: form + - explode: true in: query - name: name + name: resolution + required: false schema: - $ref: '#/components/schemas/name' - - description: Returns all apps based off a specific connector. See List Connectors - for a complete list of Connector IDs. + type: string + style: form + - explode: true in: query - name: connector_id + name: since + required: false schema: - $ref: '#/components/schemas/connector_id' - - description: Returns all apps based of a given type. + type: string + style: form + - explode: true in: query - name: auth_method + name: until + required: false schema: - $ref: '#/components/schemas/auth_method' + type: string + style: form + - description: Set to the id of the user that you want to return. + explode: true + in: query + name: user_id + required: false + schema: + $ref: '#/components/schemas/id' + style: form responses: "200": content: application/json: schema: - items: - $ref: '#/components/schemas/schema' - type: array + $ref: '#/components/schemas/getEvents_200_response' description: OK - headers: - Current-Page: - $ref: '#/components/headers/Current-Page' - Page-Items: - $ref: '#/components/headers/Page-Items' - Total-Count: - $ref: '#/components/headers/Total-Count' - Total-Pages: - $ref: '#/components/headers/Total-Pages' - Link: - $ref: '#/components/headers/Link' - Before-Cursor: - $ref: '#/components/headers/Before-Cursor' - After-Cursor: - $ref: '#/components/headers/After-Cursor' - "401": + "400": content: application/json: + example: + error: true + code: 400 + type: bad request + message: Request Failure schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." - "422": + $ref: '#/components/schemas/Error' + description: Bad Request + "401": content: application/json: + example: + error: true + code: 401 + type: Unauthorized + message: Unauthorized Error schema: - $ref: '#/components/schemas/status_1' - description: Indicates that the syntax of the request is good but a value - supplied is not valid. - post: - operationId: createApp + $ref: '#/components/schemas/Error' + description: Unauthorized + security: + - OAuth2: + - Read Users + - Manage users + - Manage All + - Read All + summary: Get Events + tags: + - Events + /api/1/events/{event_id}: + get: + description: Get Event By ID + operationId: getEventById parameters: - - in: header - name: Authorization + - explode: false + in: path + name: event_id required: true schema: - type: string - requestBody: - $ref: '#/components/requestBodies/app' + type: integer + style: simple responses: - "201": + "200": content: application/json: schema: - $ref: '#/components/schemas/schema' - description: CREATED - "401": + $ref: '#/components/schemas/getEventById_200_response' + description: Successful response + "400": content: application/json: + example: + error: true + code: 400 + type: bad request + message: Request Failure schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." - "422": + $ref: '#/components/schemas/Error' + description: Bad Request + "401": content: application/json: + example: + error: true + code: 401 + type: Unauthorized + message: Unauthorized Error schema: - $ref: '#/components/schemas/status_1' - description: Indicates that the syntax of the request is good but a value - supplied is not valid. - /api/2/apps/{app_id}: - delete: - operationId: deleteApp + $ref: '#/components/schemas/Error' + description: Unauthorized + "404": + content: + application/json: + example: + error: true + code: 404 + type: Not Found + message: No Route Exists + schema: + $ref: '#/components/schemas/Error' + description: Not Found + security: + - OAuth2: + - Read Users + - Manage users + - Manage All + - Read All + summary: Get Event by ID + tags: + - Events + /api/1/events/types: + get: + description: Get Event types + operationId: getEventTypes parameters: - - in: header - name: Authorization - required: true + - example: application/json + explode: false + in: header + name: Content-Type + required: false schema: + default: application/json type: string - - in: path - name: app_id - required: true - schema: - $ref: '#/components/schemas/id_1' + style: simple responses: - "204": - description: NO CONTENT - "401": + "200": content: application/json: schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." - "404": + $ref: '#/components/schemas/getEventTypes_200_response' + description: Successful response + summary: Get Event Types + tags: + - Events + /api/1/groups: + get: + description: Get Groups + operationId: getGroups + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/getGroups_200_response' + description: Successful response + "400": content: application/json: + example: + error: true + code: 400 + type: bad request + message: Request Failure schema: - $ref: '#/components/schemas/status_1' - description: Invalid ID + $ref: '#/components/schemas/Error' + description: Bad Request + "401": + content: + application/json: + example: + error: true + code: 401 + type: Unauthorized + message: Unauthorized Error + schema: + $ref: '#/components/schemas/Error' + description: Unauthorized + security: + - OAuth2: + - Manage users + - Manage All + - Read All + - Read Users + summary: Get Groups + tags: + - Groups + /api/1/groups/{group_id}: get: - operationId: getApp + description: Get Group By ID + operationId: getGroupById parameters: - - in: header - name: Authorization + - explode: false + in: path + name: group_id required: true schema: type: string - - in: path - name: app_id - required: true - schema: - $ref: '#/components/schemas/id_1' + style: simple responses: "200": content: application/json: schema: - $ref: '#/components/schemas/schema' - description: OK + $ref: '#/components/schemas/getGroups_200_response' + description: Successful response + "400": + content: + application/json: + example: + error: true + code: 400 + type: bad request + message: Request Failure + schema: + $ref: '#/components/schemas/Error' + description: Bad Request "401": content: application/json: + example: + error: true + code: 401 + type: Unauthorized + message: Unauthorized Error schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." + $ref: '#/components/schemas/Error' + description: Unauthorized "404": content: application/json: - schema: - $ref: '#/components/schemas/status_1' - description: Invalid ID - put: - operationId: updateApp - parameters: - - in: header - name: Authorization - required: true - schema: - type: string - - in: path - name: app_id - required: true - schema: - $ref: '#/components/schemas/id_1' + example: + error: true + code: 404 + type: Not Found + message: No Route Exists + schema: + $ref: '#/components/schemas/Error' + description: Not Found + security: + - OAuth2: + - Read Users + - Manage users + - Manage All + - Read All + summary: Get Group by ID + tags: + - Groups + /api/1/invites/get_invite_link: + post: + description: Generate Invite Link + operationId: getInviteLink requestBody: - $ref: '#/components/requestBodies/app' + content: + application/json: + schema: + $ref: '#/components/schemas/getInviteLink_request' responses: "200": content: application/json: + example: + status: + type: success + message: success + code: 200 + error: false + data: + - http://app.onelogin.com/password/reset?token=1111111cf892e56957e35c9c12f128483031dd11 schema: - $ref: '#/components/schemas/schema' - description: OK - "401": + $ref: '#/components/schemas/getInviteLink_200_response' + description: Successful response + "400": content: application/json: + example: + error: true + code: 400 + type: bad request + message: Request Failure schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." - "422": + $ref: '#/components/schemas/Error' + description: Bad Request + "401": content: application/json: + example: + error: true + code: 401 + type: Unauthorized + message: Unauthorized Error schema: - $ref: '#/components/schemas/status_1' - description: Indicates that the syntax of the request is good but a value - supplied is not valid. - /api/2/apps/{app_id}/parameters/{parameter_id}: - delete: - operationId: deleteAppParameter - parameters: - - in: header - name: Authorization - required: true - schema: - type: string - - in: path - name: app_id - required: true - schema: - $ref: '#/components/schemas/id_1' - - in: path - name: parameter_id - required: true - schema: - type: integer + $ref: '#/components/schemas/Error' + description: Unauthorized + security: + - OAuth2: + - Manage All + summary: Generate Invite Link + tags: + - Invite Links + /api/1/invites/send_invite_link: + post: + description: Send Invite Link + operationId: sendInviteLink + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/sendInviteLink_request' responses: - "204": - description: NO CONTENT - "401": + "200": content: application/json: + example: + status: + type: success + message: Email sent successfully to jennifer.hasenfus@mail.com + code: 200 + error: false schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." - "403": + $ref: '#/components/schemas/sendInviteLink_200_response' + description: Successful response + "400": content: application/json: + example: + error: true + code: 400 + type: bad request + message: Request Failure schema: - $ref: '#/components/schemas/status_1' - description: You attempted to delete a connector level parameter. - "404": + $ref: '#/components/schemas/Error' + description: Bad Request + "401": content: application/json: + example: + error: true + code: 401 + type: Unauthorized + message: Unauthorized Error schema: - $ref: '#/components/schemas/status_1' - description: Invalid ID - /api/2/apps/{app_id}/users: + $ref: '#/components/schemas/Error' + description: Unauthorized + security: + - OAuth2: + - Manage All + summary: Send Invite Link + tags: + - Invite Links + /api/1/users: get: - operationId: listAppUsers + description: List Users + operationId: listUsers parameters: - - in: header - name: Authorization - required: true - schema: - type: string - - in: path - name: app_id - required: true - schema: - $ref: '#/components/schemas/id_1' - - description: "The total number of items returned per page. The maximum limit\ - \ varies between endpoints, see the relevant endpoint documentation for\ - \ the specific limit." + - description: How many items to return at one time (max 100) + explode: true in: query name: limit + required: false schema: + format: int32 type: integer + style: form - description: The page number of results to return. + explode: true in: query name: page + required: false schema: type: integer + style: form - description: Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. + explode: true in: query name: cursor + required: false + schema: + type: string + style: form + - description: An ISO8601 timestamp value that returns all users created after + a given date & time. + explode: true + in: query + name: created_since + required: false + schema: + type: string + style: form + - description: An ISO8601 timestamp value that returns all users created before + a given date & time. + explode: true + in: query + name: created_until + required: false schema: type: string + style: form + - description: An ISO8601 timestamp value that returns all users updated after + a given date & time. + explode: true + in: query + name: updated_since + required: false + schema: + type: string + style: form + - description: An ISO8601 timestamp value that returns all users updated before + a given date & time. + explode: true + in: query + name: updated_until + required: false + schema: + type: string + style: form + - description: An ISO8601 timestamp value that returns all users that logged + in after a given date & time. + explode: true + in: query + name: last_login_since + required: false + schema: + type: string + style: form + - description: An ISO8601 timestamp value that returns all users that logged + in before a given date & time. + explode: true + in: query + name: last_login_until + required: false + schema: + type: string + style: form + - description: The first name of the user + explode: true + in: query + name: firstname + required: false + schema: + type: string + style: form + - description: The last name of the user + explode: true + in: query + name: lastname + required: false + schema: + type: string + style: form + - description: The email address of the user + explode: true + in: query + name: email + required: false + schema: + type: string + style: form + - description: The username for the user + explode: true + in: query + name: username + required: false + schema: + type: string + style: form + - description: The AD login name for the user + explode: true + in: query + name: samaccountname + required: false + schema: + type: string + style: form + - explode: true + in: query + name: directory_id + required: false + schema: + type: integer + style: form + - description: An external identifier that has been set on the user + explode: true + in: query + name: external_id + required: false + schema: + type: string + style: form + - description: A comma separated list of OneLogin User IDs + explode: true + in: query + name: user_ids + required: false + schema: + type: string + style: form + - description: The short name of a custom attribute. Note that the attribute + name is prefixed with custom_attributes. + explode: true + in: query + name: "custom_attributes.{attribute_name}" + required: false + schema: + type: string + style: form + - description: Optional. Comma delimited list of fields to return. + explode: true + in: query + name: fields + required: false + schema: + enum: + - apps + - users + - admins + type: string + style: form responses: "200": content: application/json: schema: items: - $ref: '#/components/schemas/listAppUsers_200_response_inner' + $ref: '#/components/schemas/user' type: array description: OK headers: @@ -1079,3436 +1863,10232 @@ paths: $ref: '#/components/headers/Before-Cursor' After-Cursor: $ref: '#/components/headers/After-Cursor' - "401": + "400": content: application/json: + example: + error: true + code: 400 + type: bad request + message: Request Failure schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." - /api/2/apps/{app_id}/rules: - get: - operationId: listRules - parameters: - - in: header - name: Authorization - required: true - schema: - type: string - - in: path - name: app_id - required: true - schema: - $ref: '#/components/schemas/id_1' - - description: Defaults to true. When set to `false` will return all disabled - rules. - in: query - name: enabled - schema: - type: boolean - - description: Filters Rules based on their Conditions. - in: query - name: has_condition - schema: - type: string - - description: Filters Rules based on their condition types. - in: query - name: has_condition_type - schema: - type: string - - description: Filters Rules based on their Actions. - in: query - name: has_action - schema: - type: string - - description: Filters Rules based on their action types. - in: query - name: has_action_type - schema: - type: string - responses: - "200": + $ref: '#/components/schemas/Error' + description: Bad Request + "401": content: application/json: + example: + error: true + code: 401 + type: Unauthorized + message: Unauthorized Error schema: - items: - $ref: '#/components/schemas/rule' - type: array - description: OK - "401": + $ref: '#/components/schemas/Error' + description: Unauthorized + "422": content: application/json: - schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." + example: + error: true + code: 422 + type: UnprocessableEntityError + message: "Validation failed: Value has already been taken" + schema: + $ref: '#/components/schemas/Error' + description: Unprocessable + security: + - OAuth2: + - Manage users + - Manage All + - Read All + - Read Users + summary: List Users + tags: + - Users V1 post: - operationId: createRule + description: Create a User + operationId: createUser parameters: - - in: header - name: Authorization - required: true + - description: Controls how mappings will be applied to the user on creation. + Defaults to async. + explode: true + in: query + name: mappings + required: false schema: - type: string - - in: path - name: app_id - required: true + enum: + - async + - sync + - disabled + type: string + style: form + - description: Will passwords validate against the User Policy? Defaults to + true. + explode: true + in: query + name: validate_policy + required: false schema: - $ref: '#/components/schemas/id_1' + type: boolean + style: form requestBody: - $ref: '#/components/requestBodies/rule' + content: + application/json: + schema: + $ref: '#/components/schemas/user' responses: "201": content: application/json: schema: - $ref: '#/components/schemas/rule_id' - description: CREATED + $ref: '#/components/schemas/user' + description: The full user resource is returned + "400": + content: + application/json: + example: + error: true + code: 400 + type: bad request + message: Request Failure + schema: + $ref: '#/components/schemas/Error' + description: Bad Request "401": content: application/json: + example: + error: true + code: 401 + type: Unauthorized + message: Unauthorized Error schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." + $ref: '#/components/schemas/Error' + description: Unauthorized "422": content: application/json: - schema: - $ref: '#/components/schemas/error_status' - description: UNPROCESSABLE ENTRY - /api/2/apps/{app_id}/rules/{rule_id}: + example: + error: true + code: 422 + type: UnprocessableEntityError + message: "Validation failed: Value has already been taken" + schema: + $ref: '#/components/schemas/Error' + description: Unprocessable + security: + - OAuth2: + - Manage users + - Manage All + summary: Create a User + tags: + - Users V1 + /api/1/users/{user_id}: delete: - operationId: deleteRule + description: Delete A User + operationId: deleteUser parameters: - - in: header - name: Authorization - required: true - schema: - type: string - - in: path - name: app_id - required: true - schema: - $ref: '#/components/schemas/id_1' - - description: The id of the app rule to locate. + - description: Set to the id of the user that you want to return. + explode: false in: path - name: rule_id + name: user_id required: true schema: - $ref: '#/components/schemas/id_2' + $ref: '#/components/schemas/id' + style: simple responses: "204": - description: NO CONTENT + description: "On success, no content is returned in the response body." "401": content: application/json: + example: + error: true + code: 401 + type: Unauthorized + message: Unauthorized Error schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." + $ref: '#/components/schemas/Error' + description: Unauthorized "404": content: application/json: - schema: - $ref: '#/components/schemas/status_1' - description: Invalid ID + example: + error: true + code: 404 + type: Not Found + message: No Route Exists + schema: + $ref: '#/components/schemas/Error' + description: Not Found + security: + - OAuth2: + - Manage users + - Manage All + summary: Delete a User + tags: + - Users V1 get: - operationId: getRule + description: Get User By ID + operationId: getUserById parameters: - - in: header - name: Authorization - required: true - schema: - type: string - - in: path - name: app_id - required: true - schema: - $ref: '#/components/schemas/id_1' - - description: The id of the app rule to locate. + - description: Set to the id of the user that you want to return. + explode: false in: path - name: rule_id + name: user_id required: true schema: - $ref: '#/components/schemas/id_2' + $ref: '#/components/schemas/id' + style: simple responses: "200": content: application/json: schema: - $ref: '#/components/schemas/rule' + $ref: '#/components/schemas/user' description: OK - "401": + "400": content: application/json: + example: + error: true + code: 400 + type: bad request + message: Request Failure schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." + $ref: '#/components/schemas/Error' + description: Bad Request "404": content: application/json: - schema: - $ref: '#/components/schemas/status_1' - description: Invalid ID + example: + error: true + code: 404 + type: Not Found + message: No Route Exists + schema: + $ref: '#/components/schemas/Error' + description: Not Found + security: + - OAuth2: + - Manage users + - Manage All + - Read All + - Read Users + summary: Get User by ID + tags: + - Users V1 put: - operationId: updateRule + description: Update a User + operationId: updateUser parameters: - - in: header - name: Authorization + - description: Set to the id of the user that you want to return. + explode: false + in: path + name: user_id required: true schema: - type: string - - in: path - name: app_id - required: true + $ref: '#/components/schemas/id' + style: simple + - description: Controls how mappings will be applied to the user on creation. + Defaults to async. + explode: true + in: query + name: mappings + required: false schema: - $ref: '#/components/schemas/id_1' - - description: The id of the app rule to locate. - in: path - name: rule_id - required: true + enum: + - async + - sync + - disabled + type: string + style: form + - description: Will passwords validate against the User Policy? Defaults to + true. + explode: true + in: query + name: validate_policy + required: false schema: - $ref: '#/components/schemas/id_2' + type: boolean + style: form requestBody: - $ref: '#/components/requestBodies/rule' + content: + application/json: + schema: + $ref: '#/components/schemas/user' responses: "200": content: application/json: schema: - $ref: '#/components/schemas/rule_id' - description: OK + $ref: '#/components/schemas/user' + description: The full user resource is returned + "400": + content: + application/json: + example: + error: true + code: 400 + type: bad request + message: Request Failure + schema: + $ref: '#/components/schemas/Error' + description: Bad Request "401": content: application/json: + example: + error: true + code: 401 + type: Unauthorized + message: Unauthorized Error schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." - "422": + $ref: '#/components/schemas/Error' + description: Unauthorized + "404": content: application/json: + example: + error: true + code: 404 + type: Not Found + message: No Route Exists schema: - $ref: '#/components/schemas/error_status' - description: ID should not be included in the payload body. - /api/2/apps/{app_id}/rules/conditions: + $ref: '#/components/schemas/Error' + description: Not Found + "422": + content: + application/json: + example: + error: true + code: 422 + type: UnprocessableEntityError + message: "Validation failed: Value has already been taken" + schema: + $ref: '#/components/schemas/Error' + description: Unprocessable + security: + - OAuth2: + - Manage users + - Manage All + summary: Update a User + tags: + - Users V1 + /api/1/users/{user_id}/apps: get: - operationId: listConditions + description: Get Apps for User + operationId: getUserApps parameters: - - in: header - name: Authorization + - description: Set to the id of the user that you want to return. + explode: false + in: path + name: user_id required: true schema: - type: string - - in: path - name: app_id - required: true + $ref: '#/components/schemas/id' + style: simple + - description: Defaults to `false`. When `true` will show all apps that are + assigned to a user regardless of their portal visibility setting. + explode: true + in: query + name: ignore_visibility + required: false schema: - $ref: '#/components/schemas/id_1' + default: false + type: boolean + style: form responses: "200": content: application/json: schema: items: - $ref: '#/components/schemas/listConditions_200_response_inner' + $ref: '#/components/schemas/getUserApps_200_response_inner' type: array description: OK "401": content: application/json: + example: + error: true + code: 401 + type: Unauthorized + message: Unauthorized Error schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." - /api/2/apps/{app_id}/rules/conditions/{condition_value}/operators: + $ref: '#/components/schemas/Error' + description: Unauthorized + "404": + content: + application/json: + example: + error: true + code: 404 + type: Not Found + message: No Route Exists + schema: + $ref: '#/components/schemas/Error' + description: Not Found + security: + - OAuth2: + - Manage users + - Manage All + - Read All + - Read Users + summary: Get Apps for a User + tags: + - Users V1 + /api/1/users/{user_id}/roles: get: - operationId: listConditionOperators + description: Get User Roles + operationId: getUserRoles parameters: - - in: header - name: Authorization - required: true - schema: - type: string - - in: path - name: app_id - required: true - schema: - $ref: '#/components/schemas/id_1' - - description: The value for the selected condition. + - description: Set to the id of the user that you want to return. + explode: false in: path - name: condition_value + name: user_id required: true schema: - type: string + $ref: '#/components/schemas/id' + style: simple responses: "200": content: application/json: schema: - items: - $ref: '#/components/schemas/listConditionOperators_200_response_inner' - type: array - description: OK + $ref: '#/components/schemas/getUserRoles_200_response' + description: Successful response + "400": + content: + application/json: + example: + error: true + code: 400 + type: bad request + message: Request Failure + schema: + $ref: '#/components/schemas/Error' + description: Bad Request "401": content: application/json: + example: + error: true + code: 401 + type: Unauthorized + message: Unauthorized Error schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." - /api/2/apps/{app_id}/rules/conditions/{condition_value}/values: - get: - operationId: listConditionValues + $ref: '#/components/schemas/Error' + description: Unauthorized + "403": + content: + application/json: + example: + error: true + code: 403 + type: ForbiddenError + message: not allowed + schema: + $ref: '#/components/schemas/Error' + description: Forbidden + "404": + content: + application/json: + example: + error: true + code: 404 + type: Not Found + message: No Route Exists + schema: + $ref: '#/components/schemas/Error' + description: Not Found + security: + - OAuth2: + - Manage All + - Read All + summary: Get Roles for a User + tags: + - Users V1 + /api/1/users/set_password_clear_text/{user_id}: + put: + description: Update User password using their ID. This is done in cleartext + and is insecure. + operationId: updatePasswordInsecure parameters: - - in: header - name: Authorization - required: true - schema: - type: string - - in: path - name: app_id - required: true - schema: - $ref: '#/components/schemas/id_1' - - description: The value for the selected condition. + - description: Set to the id of the user that you want to return. + explode: false in: path - name: condition_value + name: user_id required: true schema: - type: string + $ref: '#/components/schemas/id' + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/updatePasswordInsecure_request' responses: "200": content: application/json: schema: - items: - $ref: '#/components/schemas/listConditionValues_200_response_inner' - type: array - description: OK + $ref: '#/components/schemas/Error' + description: Successful response + "400": + content: + application/json: + example: + error: true + code: 400 + type: bad request + message: Request Failure + schema: + $ref: '#/components/schemas/Error' + description: Bad Request "401": content: application/json: + example: + error: true + code: 401 + type: Unauthorized + message: Unauthorized Error schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." - /api/2/apps/{app_id}/rules/actions: - get: - operationId: listActions + $ref: '#/components/schemas/Error' + description: Unauthorized + "403": + content: + application/json: + example: + error: true + code: 403 + type: ForbiddenError + message: not allowed + schema: + $ref: '#/components/schemas/Error' + description: Forbidden + "404": + content: + application/json: + example: + error: true + code: 404 + type: Not Found + message: No Route Exists + schema: + $ref: '#/components/schemas/Error' + description: Not Found + security: + - OAuth2: + - Manage All + summary: Set Password Using ID in Cleartext + tags: + - Users V1 + /api/1/users/set_password_using_salt/{user_id}: + put: + description: Update User Password Using ID and SHA-256 with salt. + operationId: updatePasswordSecure parameters: - - in: header - name: Authorization - required: true - schema: - type: string - - in: path - name: app_id + - description: Set to the id of the user that you want to return. + explode: false + in: path + name: user_id required: true schema: - $ref: '#/components/schemas/id_1' + $ref: '#/components/schemas/id' + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/updatePasswordSecure_request' responses: "200": content: application/json: schema: - items: - $ref: '#/components/schemas/listActions_200_response_inner' - type: array - description: OK + $ref: '#/components/schemas/Error' + description: Successful response + "400": + content: + application/json: + example: + error: true + code: 400 + type: bad request + message: Request Failure + schema: + $ref: '#/components/schemas/Error' + description: Bad Request + "401": + content: + application/json: + example: + error: true + code: 401 + type: Unauthorized + message: Unauthorized Error + schema: + $ref: '#/components/schemas/Error' + description: Unauthorized + "403": + content: + application/json: + example: + error: true + code: 403 + type: ForbiddenError + message: not allowed + schema: + $ref: '#/components/schemas/Error' + description: Forbidden + "404": + content: + application/json: + example: + error: true + code: 404 + type: Not Found + message: No Route Exists + schema: + $ref: '#/components/schemas/Error' + description: Not Found + security: + - OAuth2: + - Manage All + summary: Set Password Using ID and SHA-256 and Salt + tags: + - Users V1 + /api/1/users/custom_attributes: + get: + description: Get Custom Attributes + operationId: getCustomAttributes + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/getCustomAttributes_200_response' + description: Successful response + "400": + content: + application/json: + example: + error: true + code: 400 + type: bad request + message: Request Failure + schema: + $ref: '#/components/schemas/Error' + description: Bad Request "401": content: application/json: + example: + error: true + code: 401 + type: Unauthorized + message: Unauthorized Error schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." - /api/2/apps/{app_id}/rules/actions/{actuion_value}/values: + $ref: '#/components/schemas/Error' + description: Unauthorized + security: + - OAuth2: + - Manage users + - Manage All + - Read All + - Read Users + summary: Get Custom Attributes + tags: + - Users V1 + /api/1/users/{user_id}/auth_factor: get: - operationId: listActionValues + description: Get MFA Factors + operationId: getMFAFactors parameters: - - in: header - name: Authorization - required: true - schema: - type: string - - in: path - name: app_id - required: true - schema: - $ref: '#/components/schemas/id_1' - - description: The value for the selected action. + - description: Set to the id of the user that you want to return. + explode: false in: path - name: action_value + name: user_id required: true schema: - type: string + $ref: '#/components/schemas/id' + style: simple responses: "200": content: application/json: schema: - items: - $ref: '#/components/schemas/listConditionValues_200_response_inner' - type: array - description: OK + $ref: '#/components/schemas/getMFAFactors_200_response' + description: Successful response + "400": + content: + application/json: + example: + error: true + code: 400 + type: bad request + message: Request Failure + schema: + $ref: '#/components/schemas/Error' + description: Bad Request "401": content: application/json: + example: + error: true + code: 401 + type: Unauthorized + message: Unauthorized Error schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." - /api/2/apps/{app_id}/rules/sort: + $ref: '#/components/schemas/Error' + description: Unauthorized + "404": + content: + application/json: + example: + error: true + code: 404 + type: Not Found + message: No Route Exists + schema: + $ref: '#/components/schemas/Error' + description: Not Found + security: + - OAuth2: + - Manage users + - Manage All + - Read All + - Read Users + summary: Get Available Factors + tags: + - Multi Factor Authentication V1 + /api/1/users/{user_id}/logout: put: - operationId: bulkSort + description: Log Out User + operationId: logOutUser parameters: - - in: header - name: Authorization - required: true - schema: - type: string - - in: path - name: app_id + - description: Set to the id of the user that you want to return. + explode: false + in: path + name: user_id required: true schema: - $ref: '#/components/schemas/id_1' + $ref: '#/components/schemas/id' + style: simple requestBody: content: application/json: schema: - $ref: '#/components/schemas/rule_id_list' - description: The request body must contain an array of App Rule IDs in the - desired order. - required: true + type: object responses: "200": content: application/json: schema: - $ref: '#/components/schemas/rule_id_list' - description: On success a complete list of ordered rules is returned. - "401": + $ref: '#/components/schemas/Error' + description: Successful response + "400": content: application/json: + example: + error: true + code: 400 + type: bad request + message: Request Failure schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." - "422": - content: + $ref: '#/components/schemas/Error' + description: Bad Request + "401": + content: application/json: + example: + error: true + code: 401 + type: Unauthorized + message: Unauthorized Error schema: - $ref: '#/components/schemas/error_status' - description: Indicates that not all rule IDs were included in the request. - /api/2/connectors: - get: - operationId: listConnectors + $ref: '#/components/schemas/Error' + description: Unauthorized + "403": + content: + application/json: + example: + error: true + code: 403 + type: ForbiddenError + message: not allowed + schema: + $ref: '#/components/schemas/Error' + description: Forbidden + "404": + content: + application/json: + example: + error: true + code: 404 + type: Not Found + message: No Route Exists + schema: + $ref: '#/components/schemas/Error' + description: Not Found + security: + - OAuth2: + - Manage users + - Manage All + - Authentication Only + summary: Log User Out + tags: + - Users V1 + /api/1/users/{user_id}/lock_user: + put: + description: Lock User Account + operationId: lockAccountUser parameters: - - in: header - name: Authorization + - description: Set to the id of the user that you want to return. + explode: false + in: path + name: user_id required: true schema: - type: string - - description: "The total number of items returned per page. The maximum limit\ - \ varies between endpoints, see the relevant endpoint documentation for\ - \ the specific limit." - in: query - name: limit - schema: - type: integer - - description: The page number of results to return. - in: query - name: page - schema: - type: integer - - description: Set to the value extracted from Before-Cursor or After-Cursor - headers to return the previous or next page. - in: query - name: cursor - schema: - type: string - - description: The name or partial name of the connector to search for. When - using a partial name you must append a wildcard `*` - in: query - name: name - schema: - $ref: '#/components/schemas/name_1' - - description: Returns all connectors of a given type. - in: query - name: auth_method - schema: - $ref: '#/components/schemas/auth_method' + $ref: '#/components/schemas/id' + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/lockAccountUser_request' responses: "200": content: application/json: schema: - items: - $ref: '#/components/schemas/connector' - type: array - description: OK - headers: - Current-Page: - $ref: '#/components/headers/Current-Page' - Page-Items: - $ref: '#/components/headers/Page-Items' - Total-Count: - $ref: '#/components/headers/Total-Count' - Total-Pages: - $ref: '#/components/headers/Total-Pages' - Link: - $ref: '#/components/headers/Link' - Before-Cursor: - $ref: '#/components/headers/Before-Cursor' - After-Cursor: - $ref: '#/components/headers/After-Cursor' + $ref: '#/components/schemas/Error' + description: Successful response + "400": + content: + application/json: + example: + error: true + code: 400 + type: bad request + message: Request Failure + schema: + $ref: '#/components/schemas/Error' + description: Bad Request "401": content: application/json: + example: + error: true + code: 401 + type: Unauthorized + message: Unauthorized Error schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." - "422": + $ref: '#/components/schemas/Error' + description: Unauthorized + "403": content: application/json: + example: + error: true + code: 403 + type: ForbiddenError + message: not allowed schema: - $ref: '#/components/schemas/status_1' - description: Indicates that the syntax of the request is good but a value - supplied is not valid. - /api/2/mfa/users/{user_id}/factors: + $ref: '#/components/schemas/Error' + description: Forbidden + "404": + content: + application/json: + example: + error: true + code: 404 + type: Not Found + message: No Route Exists + schema: + $ref: '#/components/schemas/Error' + description: Not Found + security: + - OAuth2: + - Manage All + summary: Lock User Account + tags: + - Users V1 + /api/1/users/{user_id}/otp_devices: get: - operationId: getAvailableFactors + description: Get Enrolled Factors + operationId: getEnrolledFactors parameters: - - in: header - name: Authorization - required: true - schema: - type: string - - description: Set to the id of the user. + - description: Set to the id of the user that you want to return. + explode: false in: path name: user_id required: true schema: - type: integer + $ref: '#/components/schemas/id' + style: simple responses: "200": content: application/json: schema: - items: - $ref: '#/components/schemas/getAvailableFactors_200_response_inner' - type: array - description: OK + $ref: '#/components/schemas/getEnrolledFactors_200_response' + description: Successful response + "400": + content: + application/json: + example: + error: true + code: 400 + type: bad request + message: Request Failure + schema: + $ref: '#/components/schemas/Error' + description: Bad Request "401": content: application/json: + example: + error: true + code: 401 + type: Unauthorized + message: Unauthorized Error schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." - /api/2/mfa/users/{user_id}/registrations: + $ref: '#/components/schemas/Error' + description: Unauthorized + security: + - OAuth2: + - Manage users + - Manage All + - Read All + - Read Users + summary: Get Enrolled Factors + tags: + - Multi Factor Authentication V1 post: - operationId: enrollFactor + description: ' Enroll an Authentication Factor' + operationId: enrollMfaFactor parameters: - - in: header - name: Authorization - required: true - schema: - type: string - - description: Set to the id of the user. + - description: Set to the id of the user that you want to return. + explode: false in: path name: user_id required: true schema: - type: integer + $ref: '#/components/schemas/id' + style: simple requestBody: content: application/json: schema: - $ref: '#/components/schemas/enrollFactor_request' - required: true + $ref: '#/components/schemas/otp_device' responses: "200": content: application/json: schema: - items: - $ref: '#/components/schemas/factor' - type: array - description: OK - "201": + $ref: '#/components/schemas/enrollMfaFactor_200_response' + description: Successful response + "400": content: application/json: + example: + error: true + code: 400 + type: bad request + message: Request Failure schema: - items: - $ref: '#/components/schemas/factor' - type: array - description: CREATED + $ref: '#/components/schemas/Error' + description: Bad Request "401": content: application/json: + example: + error: true + code: 401 + type: Unauthorized + message: Unauthorized Error schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." - /api/2/mfa/users/{user_id}/registrations/{registration_id}: - get: - operationId: verifyEnrollmentVoiceProtect + $ref: '#/components/schemas/Error' + description: Unauthorized + security: + - OAuth2: + - Manage users + - Manage All + summary: Enroll a Factor + tags: + - Multi Factor Authentication V1 + /api/1/users/{user_id}/mfa_token: + post: + description: Generate MFA Token + operationId: generateMFAtoken parameters: - - in: header - name: Authorization - required: true - schema: - type: string - - description: Set to the id of the user. + - description: Set to the id of the user that you want to return. + explode: false in: path name: user_id required: true schema: - type: integer - - description: Set to the uuid of the registration. This was included in the - response as part of the initial request in Enroll Factor. + $ref: '#/components/schemas/id' + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/generateMFAtoken_request' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/generateMFAtoken_200_response' + description: Successful response + security: + - OAuth2: + - Manage users + - Manage All + summary: Generate Temp MFA Token + tags: + - Multi Factor Authentication V1 + /api/1/users/{user_id}/add_roles: + put: + description: Add Roles for a User + operationId: addRolesToUser + parameters: + - description: Set to the id of the user that you want to return. + explode: false in: path - name: registration_id + name: user_id required: true schema: - type: integer + $ref: '#/components/schemas/id' + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/addRolesToUser_request' responses: "200": content: application/json: schema: - items: - $ref: '#/components/schemas/registration' - type: array - description: OK + $ref: '#/components/schemas/Error' + description: Successful response + "400": + content: + application/json: + example: + error: true + code: 400 + type: bad request + message: Request Failure + schema: + $ref: '#/components/schemas/Error' + description: Bad Request "401": content: application/json: + example: + error: true + code: 401 + type: Unauthorized + message: Unauthorized Error + schema: + $ref: '#/components/schemas/Error' + description: Unauthorized + "403": + content: + application/json: + example: + error: true + code: 403 + type: ForbiddenError + message: not allowed schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." + $ref: '#/components/schemas/Error' + description: Forbidden + "404": + content: + application/json: + example: + error: true + code: 404 + type: Not Found + message: No Route Exists + schema: + $ref: '#/components/schemas/Error' + description: Not Found + security: + - OAuth2: + - Manage users + summary: Add Roles for a User + tags: + - Users V1 + /api/1/users/{user_id}/set_state: put: - operationId: verifyEnrollment + description: Set User State + operationId: setUserState parameters: - - in: header - name: Authorization - required: true - schema: - type: string - - description: Set to the id of the user. + - description: Set to the id of the user that you want to return. + explode: false in: path name: user_id required: true schema: - type: integer - - description: Set to the uuid of the registration. This was included in the - response as part of the initial request in Enroll Factor. - in: path - name: registration_id - required: true - schema: - type: integer + $ref: '#/components/schemas/id' + style: simple requestBody: content: application/json: schema: - $ref: '#/components/schemas/verifyEnrollment_request' - required: true + $ref: '#/components/schemas/setUserState_request' responses: "200": content: application/json: schema: - items: - $ref: '#/components/schemas/registration' - type: array - description: OK + $ref: '#/components/schemas/Error' + description: Successful response + "400": + content: + application/json: + example: + error: true + code: 400 + type: bad request + message: Request Failure + schema: + $ref: '#/components/schemas/Error' + description: Bad Request "401": content: application/json: + example: + error: true + code: 401 + type: Unauthorized + message: Unauthorized Error schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." - /api/2/mfa/users/{user_id}/devices: - get: - operationId: getEnrolledFactors + $ref: '#/components/schemas/Error' + description: Unauthorized + "403": + content: + application/json: + example: + error: true + code: 403 + type: ForbiddenError + message: not allowed + schema: + $ref: '#/components/schemas/Error' + description: Forbidden + "404": + content: + application/json: + example: + error: true + code: 404 + type: Not Found + message: No Route Exists + schema: + $ref: '#/components/schemas/Error' + description: Not Found + security: + - OAuth2: + - Manage All + summary: Set User State + tags: + - Users V1 + /api/1/users/{user_id}/remove_roles: + put: + description: Remove Roles for a User + operationId: removeUserRole parameters: - - in: header - name: Authorization - required: true - schema: - type: string - - description: Set to the id of the user. + - description: Set to the id of the user that you want to return. + explode: false in: path name: user_id required: true schema: - type: integer + $ref: '#/components/schemas/id' + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/removeUserRole_request' responses: "200": content: application/json: schema: - items: - $ref: '#/components/schemas/device' - type: array - description: OK + $ref: '#/components/schemas/Error' + description: Successful response + "400": + content: + application/json: + example: + error: true + code: 400 + type: bad request + message: Request Failure + schema: + $ref: '#/components/schemas/Error' + description: Bad Request "401": content: application/json: + example: + error: true + code: 401 + type: Unauthorized + message: Unauthorized Error schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." - /api/2/mfa/users/{user_id}/devices/{device_id}: + $ref: '#/components/schemas/Error' + description: Unauthorized + "403": + content: + application/json: + example: + error: true + code: 403 + type: ForbiddenError + message: not allowed + schema: + $ref: '#/components/schemas/Error' + description: Forbidden + "404": + content: + application/json: + example: + error: true + code: 404 + type: Not Found + message: No Route Exists + schema: + $ref: '#/components/schemas/Error' + description: Not Found + security: + - OAuth2: + - Manage All + summary: Remove Roles for a User + tags: + - Users V1 + /api/1/users/{user_id}/otp_devices/{device_id}: delete: - operationId: deleteFactor + description: Remove an enrolled MFA device for a user + operationId: removeMfaFactors parameters: - - in: header - name: Authorization - required: true - schema: - type: string - - description: Set to the id of the user. + - description: Set to the id of the user that you want to return. + explode: false in: path name: user_id required: true schema: - type: integer - - description: Set to the device_id of the MFA device. + $ref: '#/components/schemas/id' + style: simple + - explode: false in: path name: device_id required: true schema: - type: integer + type: string + style: simple responses: - "204": - description: NO CONTENT - /api/2/mfa/users/{user_id}/verifications: + "200": + content: + application/json: {} + description: Successful response + "400": + content: + application/json: + example: + error: true + code: 400 + type: bad request + message: Request Failure + schema: + $ref: '#/components/schemas/Error' + description: Bad Request + "401": + content: + application/json: + example: + error: true + code: 401 + type: Unauthorized + message: Unauthorized Error + schema: + $ref: '#/components/schemas/Error' + description: Unauthorized + security: + - OAuth2: + - Manage users + - Manage All + summary: Remove an Enrolled Factor + tags: + - Multi Factor Authentication V1 + /api/1/users/{user_id}/otp_devices/{device_id}/verify: post: - operationId: activateFactor + description: Verify a Factor + operationId: verifyMfaFactor parameters: - - in: header - name: Authorization + - description: Set to the id of the user that you want to return. + explode: false + in: path + name: user_id required: true schema: - type: string - - description: Set to the id of the user. + $ref: '#/components/schemas/id' + style: simple + - explode: false in: path - name: user_id + name: device_id required: true schema: - type: integer + type: string + style: simple requestBody: content: application/json: schema: - $ref: '#/components/schemas/activateFactor_request' - required: true + $ref: '#/components/schemas/verifyMfaFactor_request' responses: - "201": + "200": content: - application/json: {} - description: CREATED + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Successful response + "400": + content: + application/json: + example: + error: true + code: 400 + type: bad request + message: Request Failure + schema: + $ref: '#/components/schemas/Error' + description: Bad Request "401": content: application/json: + example: + error: true + code: 401 + type: Unauthorized + message: Unauthorized Error schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." - /api/2/mfa/users/{user_id}/verifications/{verification_id}: - get: - operationId: verifyFactorVoice + $ref: '#/components/schemas/Error' + description: Unauthorized + security: + - OAuth2: + - Manage users + - Manage All + summary: Verify a Factor + tags: + - Multi Factor Authentication V1 + /api/1/users/{user_id}/otp_devices/{device_id}/trigger: + post: + description: Activate a Factor + operationId: activateMfaFactors parameters: - - in: header - name: Authorization + - description: Set to the id of the user that you want to return. + explode: false + in: path + name: user_id required: true schema: - type: string - - description: Set to the id of the user. - in: path - name: user_id - required: true - schema: - type: integer - - description: The verification_id is returned on activation of the factor or - you can get the device_id using the Activate Factor API call. + $ref: '#/components/schemas/id' + style: simple + - explode: false in: path - name: verification_id + name: device_id required: true schema: - type: integer + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/activateMfaFactors_request' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/getEnrolledFactors_200_response' + description: Successful response + "400": + content: + application/json: + example: + error: true + code: 400 + type: bad request + message: Request Failure + schema: + $ref: '#/components/schemas/Error' + description: Bad Request + "401": + content: + application/json: + example: + error: true + code: 401 + type: Unauthorized + message: Unauthorized Error + schema: + $ref: '#/components/schemas/Error' + description: Unauthorized + security: + - OAuth2: + - Manage users + - Manage All + summary: Activate a Factor + tags: + - Multi Factor Authentication V1 + /api/1/privileges: + get: + description: List Privileges + operationId: listPriveleges responses: "200": content: application/json: schema: items: - $ref: '#/components/schemas/verifyFactorVoice_200_response_inner' + $ref: '#/components/schemas/privilege' type: array - description: OK + description: Successful response "401": content: application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication schema: - $ref: '#/components/schemas/status_2' - description: NOT FOUND - "404": + $ref: '#/components/schemas/altErr' + description: Unauthorized + security: + - OAuth2: + - Manage All + summary: List Privileges + tags: + - Privileges + post: + description: Create privilege + operationId: createPrivilege + requestBody: + content: + application/json: + example: + name: User Helpdesk + description: Can administer helpdesk users + privilege: + Version: 2018-05-18 + Statement: + - Effect: Allow + Action: + - Users:List + - Users:Get + - Users:Unlock + - Users:ResetPassword + - Users:GenerateTempMfaToken + Scope: + - '*' + schema: + $ref: '#/components/schemas/privilege' + responses: + "200": content: application/json: schema: - $ref: '#/components/schemas/status_1' - description: Invalid ID - put: - operationId: verifyFactor + $ref: '#/components/schemas/createPrivilege_200_response' + description: Successful response + "400": + content: + application/json: + example: + statusCode: 400 + name: BadRequestError + message: "The request could not be understood by the server due to\ + \ malformed syntax: Statement required Action array" + schema: + $ref: '#/components/schemas/altErr' + description: Bad Request + "401": + content: + application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication + schema: + $ref: '#/components/schemas/altErr' + description: Unauthorized + security: + - OAuth2: + - Manage All + summary: Create a Privilege + tags: + - Privileges + /api/1/privileges/{privilege_id}: + delete: + description: Delete + operationId: deletePrivilege parameters: - - in: header - name: Authorization - required: true - schema: - type: string - - description: Set to the id of the user. + - explode: false in: path - name: user_id + name: privilege_id required: true schema: - type: integer - - description: The verification_id is returned on activation of the factor or - you can get the device_id using the Activate Factor API call. + type: string + style: simple + responses: + "204": + description: No Content + "401": + content: + application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication + schema: + $ref: '#/components/schemas/altErr' + description: Unauthorized + "404": + content: + application/json: + example: + statusCode: 404 + name: NotFoundError + message: The resource can't be found or the server has not found anything + matching the Request-URI + schema: + $ref: '#/components/schemas/altErr' + description: Not Found + security: + - OAuth2: + - Manage All + summary: Delete a Privilege + tags: + - Privileges + get: + description: Get a Privilige + operationId: getPrivilege + parameters: + - explode: false in: path - name: verification_id + name: privilege_id required: true schema: - type: integer - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/verifyFactor_request' - required: true + type: string + style: simple responses: "200": content: application/json: schema: - $ref: '#/components/schemas/status_2' - description: OK + $ref: '#/components/schemas/privilege' + description: Successful response "401": content: application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." - "403": + $ref: '#/components/schemas/altErr' + description: Unauthorized + "404": content: application/json: - schema: - $ref: '#/components/schemas/status_1' - description: FORBIDDEN - /api/2/mfs/users/{user_id}/mfa_token: - post: - operationId: generateMfaToken + example: + statusCode: 404 + name: NotFoundError + message: The resource can't be found or the server has not found anything + matching the Request-URI + schema: + $ref: '#/components/schemas/altErr' + description: Not Found + security: + - OAuth2: + - Manage All + summary: Get a Privilege + tags: + - Privileges + put: + description: Update privilege + operationId: updatePrivilege parameters: - - in: header - name: Authorization + - explode: false + in: path + name: privilege_id required: true schema: type: string + style: simple requestBody: content: application/json: + example: + name: User Administrator + description: Can administer users + privilege: + Version: 2018-05-18 + Statement: + - Effect: Allow + Action: + - Users:List + - Users:Get + - Users:Unlock + - Users:ResetPassword + - Users:GenerateTempMfaToken + Scope: + - '*' schema: - $ref: '#/components/schemas/generateMfaToken_request' - required: true + $ref: '#/components/schemas/privilege' responses: "200": content: application/json: + example: + id: 5e43a548-e9c6-47be-9341-92160902f7a6 schema: - $ref: '#/components/schemas/generateMfaToken_200_response' - description: OK - "401": + $ref: '#/components/schemas/updatePrivilege_200_response' + description: Successful response + "400": content: application/json: + example: + statusCode: 400 + name: BadRequestError + message: "The request could not be understood by the server due to\ + \ malformed syntax: Statement required Action array" schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." - "422": + $ref: '#/components/schemas/altErr' + description: Bad Request + "401": content: application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication schema: - $ref: '#/components/schemas/generateMfaToken_422_response' - description: The structure of the request payload is correct but it contains - an invalid value. - /api/2/roles: + $ref: '#/components/schemas/altErr' + description: Unauthorized + security: + - OAuth2: + - Manage All + summary: Update a Privilege + tags: + - Privileges + /api/1/privileges/{privilege_id}/roles: get: - operationId: listRoles + description: List roles for privilege + operationId: listPrivelegeRoles parameters: - - in: header - name: Authorization + - explode: false + in: path + name: privilege_id required: true schema: type: string - - description: "The total number of items returned per page. The maximum limit\ - \ varies between endpoints, see the relevant endpoint documentation for\ - \ the specific limit." - in: query - name: limit - schema: - type: integer - - description: The page number of results to return. - in: query - name: page - schema: - type: integer - - description: Set to the value extracted from Before-Cursor or After-Cursor - headers to return the previous or next page. - in: query - name: cursor - schema: - type: string - - description: Optional. Filters by role name. - in: query - name: name - schema: - $ref: '#/components/schemas/name_2' - - description: Optional. Returns roles that contain this app name. - in: query - name: app_id - schema: - $ref: '#/components/schemas/name' - - description: Optional. Comma delimited list of fields to return. - in: query - name: fields - schema: - enum: - - apps - - users - - admins - type: string + style: simple responses: "200": content: application/json: schema: - items: - $ref: '#/components/schemas/role' - type: array - description: OK - headers: - Current-Page: - $ref: '#/components/headers/Current-Page' - Page-Items: - $ref: '#/components/headers/Page-Items' - Total-Count: - $ref: '#/components/headers/Total-Count' - Total-Pages: - $ref: '#/components/headers/Total-Pages' - Link: - $ref: '#/components/headers/Link' - Before-Cursor: - $ref: '#/components/headers/Before-Cursor' - After-Cursor: - $ref: '#/components/headers/After-Cursor' + $ref: '#/components/schemas/listPrivelegeRoles_200_response' + description: Successful response "401": content: application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." + $ref: '#/components/schemas/altErr' + description: Unauthorized + "404": + content: + application/json: + example: + statusCode: 404 + name: NotFoundError + message: The resource can't be found or the server has not found anything + matching the Request-URI + schema: + $ref: '#/components/schemas/altErr' + description: Not Found + security: + - OAuth2: + - Manage All + summary: Get Roles assigned to Privilege + tags: + - Privileges post: - operationId: createRoles + description: 'Add roles to privilege ' + operationId: addPrivilegeToRole parameters: - - in: header - name: Authorization + - explode: false + in: path + name: privilege_id required: true schema: type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/addPrivilegeToRole_request' responses: "201": content: application/json: schema: - items: - $ref: '#/components/schemas/createRoles_201_response_inner' - type: array - description: CREATED + $ref: '#/components/schemas/addPrivilegeToRole_201_response' + description: Created + "400": + content: + application/json: + example: + statusCode: 400 + name: BadRequestError + message: "The request could not be understood by the server due to\ + \ malformed syntax: Statement required Action array" + schema: + $ref: '#/components/schemas/altErr' + description: Bad Request "401": content: application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." - /api/2/roles/{role_id}: + $ref: '#/components/schemas/altErr' + description: Unauthorized + security: + - OAuth2: + - Manage All + summary: Assign a Privilege to Roles + tags: + - Privileges + /api/1/privileges/{privilege_id}/roles/{role_id}: delete: - operationId: deleteRole + description: Add roles to privilege + operationId: deleteRoleFromPrivilege parameters: - - in: header - name: Authorization + - explode: false + in: path + name: privilege_id required: true schema: type: string + style: simple - description: Set to the id of the role you want to return. + explode: false in: path name: role_id required: true schema: - $ref: '#/components/schemas/role_id' + type: string + style: simple responses: "204": - description: NO CONTENT + description: No Content "401": content: application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." + $ref: '#/components/schemas/altErr' + description: Unauthorized "404": content: application/json: - schema: - $ref: '#/components/schemas/status_1' - description: Invalid ID + example: + statusCode: 404 + name: NotFoundError + message: The resource can't be found or the server has not found anything + matching the Request-URI + schema: + $ref: '#/components/schemas/altErr' + description: Not Found + security: + - OAuth2: + - Manage All + summary: Remove a Privilege from a Role + tags: + - Privileges + /api/1/privileges/{privilege_id}/users: get: - operationId: getRole + description: Get Assigned Users + operationId: getAssignedUser parameters: - - in: header - name: Authorization - required: true - schema: - type: string - - description: Set to the id of the role you want to return. + - explode: false in: path - name: role_id + name: privilege_id required: true schema: - $ref: '#/components/schemas/role_id' + type: string + style: simple responses: "200": content: application/json: schema: - $ref: '#/components/schemas/role' - description: OK + $ref: '#/components/schemas/getAssignedUser_200_response' + description: Successful response "401": content: application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." + $ref: '#/components/schemas/altErr' + description: Unauthorized "404": content: application/json: - schema: - $ref: '#/components/schemas/status_1' - description: Invalid ID - put: - operationId: updateRole + example: + statusCode: 404 + name: NotFoundError + message: The resource can't be found or the server has not found anything + matching the Request-URI + schema: + $ref: '#/components/schemas/altErr' + description: Not Found + security: + - OAuth2: + - Manage All + summary: Get Users assigned to a Privilege + tags: + - Privileges + post: + description: Assign Users to Privilege + operationId: assignUsersToPrivilege parameters: - - in: header - name: Authorization - required: true - schema: - type: string - - description: Set to the id of the role you want to return. + - explode: false in: path - name: role_id + name: privilege_id required: true schema: - $ref: '#/components/schemas/role_id' + type: string + style: simple requestBody: - $ref: '#/components/requestBodies/role' + content: + application/json: + schema: + $ref: '#/components/schemas/assignUsersToPrivilege_request' responses: "200": content: application/json: schema: - $ref: '#/components/schemas/updateRole_200_response' - description: OK - "401": + $ref: '#/components/schemas/addPrivilegeToRole_201_response' + description: Successful response + "400": content: application/json: + example: + statusCode: 400 + name: BadRequestError + message: "The request could not be understood by the server due to\ + \ malformed syntax: Statement required Action array" schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." - "422": + $ref: '#/components/schemas/altErr' + description: Bad Request + "401": content: application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication schema: - $ref: '#/components/schemas/status_1' - description: Indicates that the syntax of the request is good but a value - supplied is not valid. - /api/2/roles/{role_id}/apps: - get: - operationId: getRoleApps + $ref: '#/components/schemas/altErr' + description: Unauthorized + security: + - OAuth2: + - Manage All + summary: Assign Users to a Privilege + tags: + - Privileges + /api/1/privileges/{privilege_id}/users/{user_id}: + delete: + description: Remove a Privilege from Users + operationId: removeUserFromPrivilege parameters: - - in: header - name: Authorization + - explode: false + in: path + name: privilege_id required: true schema: type: string - - description: Set to the id of the role you want to return. + style: simple + - description: Set to the id of the user that you want to return. + explode: false in: path - name: role_id + name: user_id required: true schema: - $ref: '#/components/schemas/role_id' - - description: "The total number of items returned per page. The maximum limit\ - \ varies between endpoints, see the relevant endpoint documentation for\ - \ the specific limit." - in: query - name: limit - schema: - type: integer - - description: The page number of results to return. - in: query - name: page - schema: - type: integer - - description: Set to the value extracted from Before-Cursor or After-Cursor - headers to return the previous or next page. + $ref: '#/components/schemas/id' + style: simple + responses: + "204": + description: No Content + "401": + content: + application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication + schema: + $ref: '#/components/schemas/altErr' + description: Unauthorized + "404": + content: + application/json: + example: + statusCode: 404 + name: NotFoundError + message: The resource can't be found or the server has not found anything + matching the Request-URI + schema: + $ref: '#/components/schemas/altErr' + description: Not Found + security: + - OAuth2: + - Manage All + summary: Remove a Privilege from Users + tags: + - Privileges + /api/1/roles: + get: + description: Get Role by Name + operationId: getRoleByName + parameters: + - explode: true in: query - name: cursor + name: name + required: false schema: type: string - - description: Optional. Defaults to true. Returns all apps not yet assigned - to the role. - in: query - name: assigned - schema: - type: boolean + style: form responses: "200": content: - applcation/json: + application/json: schema: - items: - $ref: '#/components/schemas/schema' - type: array - description: OK - headers: - Current-Page: - $ref: '#/components/headers/Current-Page' - Page-Items: - $ref: '#/components/headers/Page-Items' - Total-Count: - $ref: '#/components/headers/Total-Count' - Total-Pages: - $ref: '#/components/headers/Total-Pages' - Link: - $ref: '#/components/headers/Link' - Before-Cursor: - $ref: '#/components/headers/Before-Cursor' - After-Cursor: - $ref: '#/components/headers/After-Cursor' - "401": + $ref: '#/components/schemas/getRoleByName_200_response' + description: Successful response + "400": content: application/json: + example: + error: true + code: 400 + type: bad request + message: Request Failure schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." - "404": + $ref: '#/components/schemas/Error' + description: Bad Request + "401": content: application/json: + example: + error: true + code: 401 + type: Unauthorized + message: Unauthorized Error schema: - $ref: '#/components/schemas/status_1' - description: Invalid ID - put: - operationId: setRoleApps + $ref: '#/components/schemas/Error' + description: Unauthorized + security: + - OAuth2: + - Manage users + - Manage All + - Read All + - Read Users + summary: Get Role by Name + tags: + - Roles + /api/1/roles/{role_id}: + get: + description: Get Role By ID + operationId: getRoleById parameters: - - in: header - name: Authorization - required: true - schema: - type: string - description: Set to the id of the role you want to return. + explode: false in: path name: role_id required: true schema: - $ref: '#/components/schemas/role_id' - requestBody: - content: - application/json: - schema: - description: The complete list of app_id values to assign to the role. - Don't submit a partial list of app IDs. - items: - $ref: '#/components/schemas/id_1' - type: array - required: true + type: string + style: simple responses: "200": content: application/json: schema: - items: - $ref: '#/components/schemas/setRoleApps_200_response_inner' - type: array - description: The response returns an array of app IDs sent in the request. + $ref: '#/components/schemas/getRoleById_200_response' + description: Successful response + "400": + content: + application/json: + example: + error: true + code: 400 + type: bad request + message: Request Failure + schema: + $ref: '#/components/schemas/Error' + description: Bad Request "401": content: application/json: + example: + error: true + code: 401 + type: Unauthorized + message: Unauthorized Error schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." - "404": + $ref: '#/components/schemas/Error' + description: Unauthorized + "403": content: application/json: + example: + error: true + code: 403 + type: ForbiddenError + message: not allowed schema: - $ref: '#/components/schemas/status_1' - description: Invalid ID - /api/2/roles/{role_id}/users: - delete: - operationId: removeRoleUsers + $ref: '#/components/schemas/Error' + description: Forbidden + "404": + content: + application/json: + example: + error: true + code: 404 + type: Not Found + message: No Route Exists + schema: + $ref: '#/components/schemas/Error' + description: Not Found + security: + - OAuth2: + - Manage users + - Manage All + - Read All + - Read Users + summary: Get Role by ID + tags: + - Roles + /api/1/saml_assertion: + post: + description: Generate SAML Assertion + operationId: generateSamlAssert parameters: - - in: header - name: Authorization - required: true + - example: application/json + explode: false + in: header + name: Content-Type + required: false schema: + default: application/json type: string - - description: Set to the id of the role you want to return. - in: path - name: role_id - required: true - schema: - $ref: '#/components/schemas/role_id' + style: simple requestBody: content: application/json: schema: - $ref: '#/components/schemas/removeRoleUsers_request' - required: true + $ref: '#/components/schemas/saml_assert' responses: - "204": - description: NO CONTENT - "401": + "200": content: application/json: schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." - "404": + $ref: '#/components/schemas/generateSamlAssert_200_response' + description: Successful response + "400": content: application/json: + example: + error: true + code: 400 + type: bad request + message: Request Failure schema: - $ref: '#/components/schemas/status_1' - description: Invalid ID - get: - operationId: getRoleUsers + $ref: '#/components/schemas/Error' + description: Bad Request + "401": + content: + application/json: + example: + error: true + code: 401 + type: Unauthorized + message: Unauthorized Error + schema: + $ref: '#/components/schemas/Error' + description: Unauthorized + security: + - OAuth2: + - Authentication Only + - Manage users + - Manage All + summary: Generate SAML Assertion + tags: + - SAML Assertions + /api/1/saml_assertion/verify_factor: + post: + description: "Verify Factor: SAML" + operationId: verFactorSaml parameters: - - in: header - name: Authorization - required: true - schema: - type: string - - description: Set to the id of the role you want to return. - in: path - name: role_id - required: true - schema: - $ref: '#/components/schemas/role_id' - - description: "The total number of items returned per page. The maximum limit\ - \ varies between endpoints, see the relevant endpoint documentation for\ - \ the specific limit." - in: query - name: limit - schema: - type: integer - - description: The page number of results to return. - in: query - name: page - schema: - type: integer - - description: Set to the value extracted from Before-Cursor or After-Cursor - headers to return the previous or next page. - in: query - name: cursor + - example: application/json + explode: false + in: header + name: Content-Type + required: false schema: + default: application/json type: string - - description: "Allows you to filter on first name, last name, username, and\ - \ email address." - in: query - name: name - schema: - type: string - - description: Optional. Defaults to false. Include users that aren’t assigned - to the role. - in: query - name: include_unassigned - schema: - type: boolean + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/saml_factor' responses: "200": content: - applcation/json: + application/json: schema: - items: - $ref: '#/components/schemas/schema_1' - type: array - description: OK - headers: - Current-Page: - $ref: '#/components/headers/Current-Page' - Page-Items: - $ref: '#/components/headers/Page-Items' - Total-Count: - $ref: '#/components/headers/Total-Count' - Total-Pages: - $ref: '#/components/headers/Total-Pages' - Link: - $ref: '#/components/headers/Link' - Before-Cursor: - $ref: '#/components/headers/Before-Cursor' - After-Cursor: - $ref: '#/components/headers/After-Cursor' + $ref: '#/components/schemas/verFactorSaml_200_response' + description: Successful response + "400": + content: + application/json: + example: + error: true + code: 400 + type: bad request + message: Request Failure + schema: + $ref: '#/components/schemas/Error' + description: Bad Request "401": content: application/json: + example: + error: true + code: 401 + type: Unauthorized + message: Unauthorized Error schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." + $ref: '#/components/schemas/Error' + description: Unauthorized "404": content: application/json: - schema: - $ref: '#/components/schemas/status_1' - description: Invalid ID + example: + error: true + code: 404 + type: Not Found + message: No Route Exists + schema: + $ref: '#/components/schemas/Error' + description: Not Found + security: + - OAuth2: + - Authentication Only + - Manage users + - Manage All + summary: Verify Factor SAML + tags: + - SAML Assertions + /api/2/saml_assertion: post: - operationId: addRoleUsers + description: Generate SAML Assertion + operationId: generateSamlAssert2 parameters: - - in: header - name: Authorization - required: true + - example: application/json + explode: false + in: header + name: Content-Type + required: false schema: + default: application/json type: string - - description: Set to the id of the role you want to return. - in: path - name: role_id - required: true - schema: - $ref: '#/components/schemas/role_id' + style: simple requestBody: content: application/json: schema: - description: "Set user_id values in array," - items: - $ref: '#/components/schemas/id_2' - type: array - required: true + $ref: '#/components/schemas/saml_assert' responses: "200": content: application/json: schema: - items: - $ref: '#/components/schemas/addRoleUsers_200_response_inner' - type: array - description: OK - "401": + $ref: '#/components/schemas/generateSamlAssert_200_response' + description: Successful response + "400": content: application/json: + example: + error: true + code: 400 + type: bad request + message: Request Failure schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." - "422": + $ref: '#/components/schemas/Error' + description: Bad Request + "401": content: application/json: + example: + error: true + code: 401 + type: Unauthorized + message: Unauthorized Error schema: - $ref: '#/components/schemas/status_1' - description: Indicates that the syntax of the request is good but a value - supplied is not valid. - /api/2/roles/{role_id}/admins: - delete: - operationId: removeRoleAdmins + $ref: '#/components/schemas/Error' + description: Unauthorized + security: + - OAuth2: + - Authentication Only + - Manage users + - Manage All + summary: Generate SAML Assertion + tags: + - SAML Assertions + /api/2/saml_assertion/verify_factor: + post: + description: "Verify Factor: SAML" + operationId: verFactorSaml2 parameters: - - in: header - name: Authorization - required: true + - example: application/json + explode: false + in: header + name: Content-Type + required: false schema: + default: application/json type: string - - description: Set to the id of the role you want to return. - in: path - name: role_id - required: true - schema: - $ref: '#/components/schemas/role_id' + style: simple requestBody: content: application/json: schema: - $ref: '#/components/schemas/removeRoleUsers_request' - required: true + $ref: '#/components/schemas/saml_factor' responses: - "204": - description: NO CONTENT + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/verFactorSaml_200_response' + description: Successful response + "400": + content: + application/json: + example: + error: true + code: 400 + type: bad request + message: Request Failure + schema: + $ref: '#/components/schemas/Error' + description: Bad Request "401": content: application/json: + example: + error: true + code: 401 + type: Unauthorized + message: Unauthorized Error schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." + $ref: '#/components/schemas/Error' + description: Unauthorized "404": content: application/json: - schema: - $ref: '#/components/schemas/status_1' - description: Invalid ID + example: + error: true + code: 404 + type: Not Found + message: No Route Exists + schema: + $ref: '#/components/schemas/Error' + description: Not Found + security: + - OAuth2: + - Authentication Only + - Manage users + - Manage All + summary: Verify Factor SAML + tags: + - SAML Assertions + /api/2/mappings: get: - operationId: getRoleAdmins + description: List Mappings + operationId: listMappings parameters: - - in: header - name: Authorization - required: true - schema: - type: string - - description: Set to the id of the role you want to return. - in: path - name: role_id - required: true - schema: - $ref: '#/components/schemas/role_id' - - description: "The total number of items returned per page. The maximum limit\ - \ varies between endpoints, see the relevant endpoint documentation for\ - \ the specific limit." + - description: Defaults to true. When set to `false` will return all disabled + mappings. + explode: true in: query - name: limit + name: enabled + required: false schema: - type: integer - - description: The page number of results to return. + default: true + type: boolean + style: form + - description: |- + Filters Rules based on their Conditions. Values formatted as :, where name is the Condition to look for, and value is the value to find. Multiple filters can be declared by using a comma delimited list. Wildcards are supported in both the name and value fields. + For example: + Single filter. has_condition=has_role:123456 + Multiple filters. has_condition=has_role:123456,status:1 + Wildcard for conditions. has_condition=*:123456 + Wildcard for condition values. has_condition=has_role:* + example: has_condition=has_role:123456 + explode: true in: query - name: page - schema: - type: integer - - description: Set to the value extracted from Before-Cursor or After-Cursor - headers to return the previous or next page. + name: has_condition + required: false + schema: + type: string + style: form + - description: |- + Filters Rules based on their Conditions. Values formatted as :, where name is the Condition to look for, and value is the value to find. Multiple filters can be declared by using a comma delimited list. Wildcards are supported in both the name and value fields. + For example: + Single filter. has_condition=has_role:123456 + Multiple filters. has_condition=has_role:123456,status:1 + Wildcard for conditions. has_condition=*:123456 + Wildcard for condition values. has_condition=has_role:* + explode: true in: query - name: cursor + name: has_condition_type + required: false schema: + enum: + - builtin + - custom + - none type: string - - description: "Allows you to filter on first name, last name, username, and\ - \ email address." + style: form + - description: |- + Filters Rules based on their Actions. Values formatted as :, where name is the Action to look for, and value is the value to find. Multiple filters can be declared by using a comma delimited list. Wildcards are supported in both the name and value fields. + For example: + Single filter. has_action=set_licenses:123456 + Multiple filters. has_action=set_groups:123456,set_usertype:* + Wildcard for actions. has_action=*:123456 + Wildcard for action values. has_action=set_userprincipalname:* + example: "has_action=set_groups:123456,set_usertype:*" + explode: true in: query - name: name + name: has_action + required: false schema: type: string - - description: Optional. Defaults to false. Include users that aren’t assigned - to the role. + style: form + - description: |- + Filters Rules based on their action types. + Allowed values are: + builtin - actions that involve standard attributes custom - actions that involve custom attributes none - no actions are defined For example: + Find Rules with no actions has_action_type=none + explode: true in: query - name: include_unassigned + name: has_action_type + required: false schema: - type: boolean + enum: + - builtin + - custom + - none + type: string + style: form responses: "200": content: - applcation/json: + application/json: schema: items: - $ref: '#/components/schemas/schema_1' + $ref: '#/components/schemas/mapping' type: array - description: OK - headers: - Current-Page: - $ref: '#/components/headers/Current-Page' - Page-Items: - $ref: '#/components/headers/Page-Items' - Total-Count: - $ref: '#/components/headers/Total-Count' - Total-Pages: - $ref: '#/components/headers/Total-Pages' - Link: - $ref: '#/components/headers/Link' - Before-Cursor: - $ref: '#/components/headers/Before-Cursor' - After-Cursor: - $ref: '#/components/headers/After-Cursor' + description: Successful response "401": content: application/json: + example: + error: true + code: 401 + type: Unauthorized + message: Unauthorized Error schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/status_1' - description: Invalid ID + $ref: '#/components/schemas/Error' + description: Unauthorized + security: + - OAuth2: + - Manage All + summary: List Mappings + tags: + - User Mappings post: - operationId: addRoleAdmins + description: Create Mapping + operationId: createMapping parameters: - - in: header - name: Authorization - required: true + - example: application/json + explode: false + in: header + name: Content-Type + required: false schema: + default: application/json type: string - - description: Set to the id of the role you want to return. - in: path - name: role_id - required: true - schema: - $ref: '#/components/schemas/role_id' + style: simple requestBody: content: application/json: schema: - description: "Set user_id values in array," - items: - $ref: '#/components/schemas/id_2' - type: array - required: true + $ref: '#/components/schemas/mapping' responses: - "200": + "201": content: application/json: schema: items: - $ref: '#/components/schemas/addRoleUsers_200_response_inner' + $ref: '#/components/schemas/mapping' type: array - description: OK + description: Successful response "401": content: application/json: + example: + error: true + code: 401 + type: Unauthorized + message: Unauthorized Error schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." - /api/2/saml_assertion: - post: - operationId: generateSamlAssertion + $ref: '#/components/schemas/Error' + description: Unauthorized + "422": + content: + application/json: + example: + error: true + code: 422 + type: UnprocessableEntityError + message: "Validation failed: Value has already been taken" + schema: + $ref: '#/components/schemas/Error' + description: Unprocessable + security: + - OAuth2: + - Manage All + summary: Create Mapping + tags: + - User Mappings + /api/2/mappings/{mapping_id}: + delete: + description: Delete Mapping + operationId: deleteMapping parameters: - - in: header - name: Authorization + - description: The id of the user mapping to locate. + explode: false + in: path + name: mapping_id required: true schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/generateSamlAssertion_request' + type: integer + style: simple + responses: + "204": + description: No Content + "401": + content: + application/json: + example: + error: true + code: 401 + type: Unauthorized + message: Unauthorized Error + schema: + $ref: '#/components/schemas/Error' + description: Unauthorized + "404": + content: + application/json: + example: + error: true + code: 404 + type: Not Found + message: No Route Exists + schema: + $ref: '#/components/schemas/Error' + description: Not Found + security: + - OAuth2: + - Manage All + summary: Delete Mapping + tags: + - User Mappings + get: + description: Get Mapping + operationId: getMapping + parameters: + - description: The id of the user mapping to locate. + explode: false + in: path + name: mapping_id required: true + schema: + type: integer + style: simple responses: "200": content: - application/json: {} - description: OK - /api/2/saml_assertion/verify_factor: - post: - operationId: verifyFactorSaml + application/json: + schema: + $ref: '#/components/schemas/mapping' + description: Successful response + "401": + content: + application/json: + example: + error: true + code: 401 + type: Unauthorized + message: Unauthorized Error + schema: + $ref: '#/components/schemas/Error' + description: Unauthorized + "404": + content: + application/json: + example: + error: true + code: 404 + type: Not Found + message: No Route Exists + schema: + $ref: '#/components/schemas/Error' + description: Not Found + security: + - OAuth2: + - Manage All + summary: Get Mapping + tags: + - User Mappings + put: + description: Update Mapping + operationId: updateMapping parameters: - - in: header - name: Authorization - required: true + - example: application/json + explode: false + in: header + name: Content-Type + required: false schema: + default: application/json type: string + style: simple + - description: The id of the user mapping to locate. + explode: false + in: path + name: mapping_id + required: true + schema: + type: integer + style: simple requestBody: content: application/json: schema: - $ref: '#/components/schemas/verifyFactorSaml_request' - required: true + example: + $ref: '#/components/schemas/mapping' + type: object responses: "200": content: application/json: schema: - $ref: '#/components/schemas/verifyFactorSaml_200_response' - description: OK - "400": + $ref: '#/components/schemas/id' + description: Successful response + "401": content: application/json: + example: + error: true + code: 401 + type: Unauthorized + message: Unauthorized Error schema: - $ref: '#/components/schemas/status_1' - description: BAD REQUEST - "401": + $ref: '#/components/schemas/Error' + description: Unauthorized + "422": + content: + application/json: + example: + error: true + code: 422 + type: UnprocessableEntityError + message: "Validation failed: Value has already been taken" + schema: + $ref: '#/components/schemas/Error' + description: Unprocessable + security: + - OAuth2: + - Manage All + summary: Update Mapping + tags: + - User Mappings + /api/2/mappings/conditions: + get: + description: List Mappings' Conditions + operationId: listMappingConditions + responses: + "200": content: application/json: schema: - $ref: '#/components/schemas/status_1' - description: UNAUTHORIZED - "404": + $ref: '#/components/schemas/listMappingConditions_200_response' + description: Successful response + "401": content: application/json: + example: + error: true + code: 401 + type: Unauthorized + message: Unauthorized Error schema: - $ref: '#/components/schemas/status_1' - description: Invalid ID - /api/2/hooks: + $ref: '#/components/schemas/Error' + description: Unauthorized + security: + - OAuth2: + - Manage All + summary: List Conditions + tags: + - User Mappings + /api/2/mappings/conditions/{mapping_condition_value}/operators: get: - operationId: listHooks + description: List Mappings' Conditions' Operators + operationId: listMappingConditionsOperators parameters: - - in: header - name: Authorization + - explode: false + in: path + name: mapping_condition_value required: true schema: type: string - - description: "The total number of items returned per page. The maximum limit\ - \ varies between endpoints, see the relevant endpoint documentation for\ - \ the specific limit." - in: query - name: limit - schema: - type: integer - - description: The page number of results to return. - in: query - name: page - schema: - type: integer - - description: Set to the value extracted from Before-Cursor or After-Cursor - headers to return the previous or next page. - in: query - name: cursor - schema: - type: string + style: simple responses: "200": content: application/json: schema: items: - $ref: '#/components/schemas/hook' + $ref: '#/components/schemas/listMappingConditionsOperators_200_response_inner' type: array - description: OK - headers: - Current-Page: - $ref: '#/components/headers/Current-Page' - Page-Items: - $ref: '#/components/headers/Page-Items' - Total-Count: - $ref: '#/components/headers/Total-Count' - Total-Pages: - $ref: '#/components/headers/Total-Pages' - Link: - $ref: '#/components/headers/Link' - Before-Cursor: - $ref: '#/components/headers/Before-Cursor' - After-Cursor: - $ref: '#/components/headers/After-Cursor' + description: Successful response "401": content: application/json: + example: + error: true + code: 401 + type: Unauthorized + message: Unauthorized Error schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." - post: - operationId: createHook - parameters: - - in: header - name: Authorization - required: true - schema: - type: string - requestBody: - $ref: '#/components/requestBodies/hook' - /api/2/hooks/{hook_id}: - delete: - operationId: deleteHook + $ref: '#/components/schemas/Error' + description: Unauthorized + security: + - OAuth2: + - Manage All + summary: List Conditions Operators + tags: + - User Mappings + /api/2/mappings/conditions/{mapping_condition_value}/values: + get: + description: List Mappings' Conditions' Values + operationId: listMappingContionValues parameters: - - in: header - name: Authorization - required: true - schema: - type: string - - description: Set to the id of the Hook that you want to return. + - explode: false in: path - name: hook_id + name: mapping_condition_value required: true schema: - $ref: '#/components/schemas/id_3' + type: string + style: simple responses: - "202": - description: Success. The hook function has been queued for deletion. This - typically happens within seconds of making the request. + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/listMappingContionValues_200_response_inner' + type: array + description: Successful response "401": content: application/json: + example: + error: true + code: 401 + type: Unauthorized + message: Unauthorized Error schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." - "404": + $ref: '#/components/schemas/Error' + description: Unauthorized + security: + - OAuth2: + - Manage All + summary: List Conditions Values + tags: + - User Mappings + /api/2/mappings/actions: + get: + description: List Mappings' Actions + operationId: listMappingsActions + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/listMappingsActions_200_response_inner' + type: array + description: Successful response + "401": content: application/json: + example: + error: true + code: 401 + type: Unauthorized + message: Unauthorized Error schema: - $ref: '#/components/schemas/status_1' - description: Invalid ID + $ref: '#/components/schemas/Error' + description: Unauthorized + security: + - OAuth2: + - Manage All + summary: List Actions + tags: + - User Mappings + /api/2/mappings/actions/{mapping_action_value}/values: get: - operationId: getHook + description: List Mappings' Actions' Values + operationId: listMappingActionValues parameters: - - in: header - name: Authorization - required: true - schema: - type: string - - description: Set to the id of the Hook that you want to return. + - explode: false in: path - name: hook_id + name: mapping_action_value required: true schema: - $ref: '#/components/schemas/id_3' + type: string + style: simple responses: "200": content: application/json: schema: - $ref: '#/components/schemas/hook' - description: OK + items: + $ref: '#/components/schemas/listMappingActionValues_200_response_inner' + type: array + description: Successful response "401": content: application/json: + example: + error: true + code: 401 + type: Unauthorized + message: Unauthorized Error schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." - "404": + $ref: '#/components/schemas/Error' + description: Unauthorized + security: + - OAuth2: + - Manage All + summary: List Actions Values + tags: + - User Mappings + /api/2/mappings/sort: + put: + description: Bulk Sort Mappings + operationId: sortMappings + requestBody: + content: + application/json: + schema: + example: + - 196671 + - 196670 + - 196672 + - 196676 + - 197758 + items: + type: integer + type: array + responses: + "200": content: application/json: + example: + - 197758 + - 196670 + - 196671 + - 196672 + - 196676 schema: - $ref: '#/components/schemas/status_1' - description: Invalid ID - put: - operationId: updateHook + items: + type: integer + type: array + description: Successful response + "401": + content: + application/json: + example: + error: true + code: 401 + type: Unauthorized + message: Unauthorized Error + schema: + $ref: '#/components/schemas/Error' + description: Unauthorized + "422": + content: + application/json: + example: + error: true + code: 422 + type: UnprocessableEntityError + message: "Validation failed: Value has already been taken" + schema: + $ref: '#/components/schemas/Error' + description: Unprocessable + security: + - OAuth2: + - Manage All + summary: Bulk Sort + tags: + - User Mappings + /api/2/apps: + get: + description: List Apps + operationId: listApps + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/generic-app' + type: array + description: Successful response + "401": + content: + application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication + schema: + $ref: '#/components/schemas/altErr' + description: Unauthorized + "422": + content: + application/json: + example: + statusCode: 422 + name: UnprocessableEntityError + message: invalid value in \"auth_method\" + schema: + $ref: '#/components/schemas/altErr' + description: Unprocessable Entity + security: + - OAuth2: + - Manage All + - Read All + summary: List Apps + tags: + - Apps + post: + description: Create App + operationId: createApp parameters: - - in: header - name: Authorization - required: true + - example: application/json + explode: false + in: header + name: Content-Type + required: false schema: + default: application/json type: string - - description: Set to the id of the Hook that you want to return. - in: path - name: hook_id - required: true - schema: - $ref: '#/components/schemas/id_3' + style: simple requestBody: - $ref: '#/components/requestBodies/hook' + content: + application/json: + schema: + $ref: '#/components/schemas/createApp_request' responses: "200": content: application/json: schema: - $ref: '#/components/schemas/hook' - description: OK + $ref: '#/components/schemas/createApp_200_response' + description: Successful response "401": content: application/json: + example: + error: true + code: 401 + type: Unauthorized + message: Unauthorized Error schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." + $ref: '#/components/schemas/Error' + description: Unauthorized "422": content: application/json: - schema: - $ref: '#/components/schemas/hook_status' - description: You function is not base64 encoded. - /api/2/hooks/{hook_id}/logs: - get: - operationId: getLogs + example: + error: true + code: 422 + type: UnprocessableEntityError + message: "Validation failed: Value has already been taken" + schema: + $ref: '#/components/schemas/Error' + description: Unprocessable + security: + - OAuth2: + - Manage All + summary: Create App + tags: + - Apps + /api/2/apps/{app_id}: + delete: + description: Delete App + operationId: deleteApp parameters: - - in: header - name: Authorization - required: true - schema: - type: string - - description: Set to the id of the Hook that you want to return. + - explode: false in: path - name: hook_id + name: app_id required: true - schema: - $ref: '#/components/schemas/id_3' - - description: "The total number of items returned per page. The maximum limit\ - \ varies between endpoints, see the relevant endpoint documentation for\ - \ the specific limit." - in: query - name: limit schema: type: integer - - description: The page number of results to return. - in: query - name: page + style: simple + responses: + "204": + description: No Content + "401": + content: + application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication + schema: + $ref: '#/components/schemas/altErr' + description: Unauthorized + "404": + content: + application/json: + example: + statusCode: 404 + name: NotFoundError + message: The resource can't be found or the server has not found anything + matching the Request-URI + schema: + $ref: '#/components/schemas/altErr' + description: Not Found + security: + - OAuth2: + - Manage All + - Read All + summary: Delete App + tags: + - Apps + get: + description: Get App + operationId: getApp + parameters: + - explode: false + in: path + name: app_id + required: true schema: type: integer - - description: Set to the value extracted from Before-Cursor or After-Cursor - headers to return the previous or next page. - in: query - name: cursor + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/generic-app' + description: Successful response + "401": + content: + application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication + schema: + $ref: '#/components/schemas/altErr' + description: Unauthorized + "404": + content: + application/json: + example: + statusCode: 404 + name: NotFoundError + message: The resource can't be found or the server has not found anything + matching the Request-URI + schema: + $ref: '#/components/schemas/altErr' + description: Not Found + security: + - OAuth2: + - Manage All + - Read All + summary: Get App + tags: + - Apps + put: + description: Update App + operationId: updateApp + parameters: + - explode: false + in: path + name: app_id + required: true schema: - type: string - - description: Returns logs that contain this request_id. - in: query - name: request_id + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/generic-app' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/generic-app' + description: Successful response + "401": + content: + application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication + schema: + $ref: '#/components/schemas/altErr' + description: Unauthorized + "404": + content: + application/json: + example: + statusCode: 404 + name: NotFoundError + message: The resource can't be found or the server has not found anything + matching the Request-URI + schema: + $ref: '#/components/schemas/altErr' + description: Not Found + security: + - OAuth2: + - Manage All + summary: Update App + tags: + - Apps + /api/2/apps/{app_id}/parameters/{parameter_id}: + delete: + description: Delete Parameter from App + operationId: deleteAppParameter + parameters: + - explode: false + in: path + name: app_id + required: true schema: - type: string - - description: Returns logs that contain this correlation_id. - in: query - name: correlation_id + type: integer + style: simple + - explode: false + in: path + name: parameter_id + required: true schema: type: string + style: simple responses: - "200": + "204": + description: No Content + "401": content: application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication schema: - items: - $ref: '#/components/schemas/log' - type: array - description: OK - headers: - Current-Page: - $ref: '#/components/headers/Current-Page' - Page-Items: - $ref: '#/components/headers/Page-Items' - Total-Count: - $ref: '#/components/headers/Total-Count' - Total-Pages: - $ref: '#/components/headers/Total-Pages' - Link: - $ref: '#/components/headers/Link' - Before-Cursor: - $ref: '#/components/headers/Before-Cursor' - After-Cursor: - $ref: '#/components/headers/After-Cursor' - "401": + $ref: '#/components/schemas/altErr' + description: Unauthorized + "403": content: application/json: + example: + statusCode: 403 + name: ForbiddenError + message: Not allowed to destroy specified resource schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." + $ref: '#/components/schemas/altErr' + description: Forbidden "404": + content: + application/json: + example: + statusCode: 404 + name: NotFoundError + message: The resource can't be found or the server has not found anything + matching the Request-URI + schema: + $ref: '#/components/schemas/altErr' + description: Not Found + security: + - OAuth2: + - Manage All + - Read All + summary: Delete Parameter from App + tags: + - Apps + /api/2/apps/{app_id}/users: + get: + description: Get App Users + operationId: getAppUsers + parameters: + - explode: false + in: path + name: app_id + required: true + schema: + type: integer + style: simple + responses: + "200": content: application/json: schema: - $ref: '#/components/schemas/status_1' - description: Invalid ID - /api/2/hooks/envs: + items: + $ref: '#/components/schemas/user' + type: array + description: Successful response + "401": + content: + application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication + schema: + $ref: '#/components/schemas/altErr' + description: Unauthorized + security: + - OAuth2: + - Manage All + - Read All + summary: Get App Users + tags: + - Apps + /api/2/apps/{app_id}/rules: get: - operationId: listEnvironmentVariables + description: List App Rules + operationId: listAppRules parameters: - - in: header - name: Authorization + - explode: false + in: path + name: app_id required: true schema: - type: string - - description: "The total number of items returned per page. The maximum limit\ - \ varies between endpoints, see the relevant endpoint documentation for\ - \ the specific limit." + type: integer + style: simple + - description: |- + Filters Rules based on their Conditions. Values formatted as :, where name is the Condition to look for, and value is the value to find. Multiple filters can be declared by using a comma delimited list. Wildcards are supported in both the name and value fields. + For example: + Single filter. has_condition=has_role:123456 + Multiple filters. has_condition=has_role:123456,status:1 + Wildcard for conditions. has_condition=*:123456 + Wildcard for condition values. has_condition=has_role:* + example: has_condition=has_role:123456 + explode: true in: query - name: limit + name: has_condition + required: false + schema: + type: string + style: form + - description: |- + Filters Rules based on their Conditions. Values formatted as :, where name is the Condition to look for, and value is the value to find. Multiple filters can be declared by using a comma delimited list. Wildcards are supported in both the name and value fields. + For example: + Single filter. has_condition=has_role:123456 + Multiple filters. has_condition=has_role:123456,status:1 + Wildcard for conditions. has_condition=*:123456 + Wildcard for condition values. has_condition=has_role:* + explode: true + in: query + name: has_condition_type + required: false schema: - type: integer - - description: The page number of results to return. + enum: + - builtin + - custom + - none + type: string + style: form + - description: |- + Filters Rules based on their Actions. Values formatted as :, where name is the Action to look for, and value is the value to find. Multiple filters can be declared by using a comma delimited list. Wildcards are supported in both the name and value fields. + For example: + Single filter. has_action=set_licenses:123456 + Multiple filters. has_action=set_groups:123456,set_usertype:* + Wildcard for actions. has_action=*:123456 + Wildcard for action values. has_action=set_userprincipalname:* + example: "has_action=set_groups:123456,set_usertype:*" + explode: true in: query - name: page + name: has_action + required: false schema: - type: integer - - description: Set to the value extracted from Before-Cursor or After-Cursor - headers to return the previous or next page. + type: string + style: form + - description: |- + Filters Rules based on their action types. + Allowed values are: + builtin - actions that involve standard attributes custom - actions that involve custom attributes none - no actions are defined For example: + Find Rules with no actions has_action_type=none + explode: true in: query - name: cursor + name: has_action_type + required: false schema: + enum: + - builtin + - custom + - none type: string + style: form + - description: Defaults to true. When set to `false` will return all disabled + mappings. + explode: true + in: query + name: enabled + required: false + schema: + default: true + type: boolean + style: form responses: "200": content: application/json: schema: items: - $ref: '#/components/schemas/envvar' + $ref: '#/components/schemas/app_rule' type: array - description: OK - headers: - Current-Page: - $ref: '#/components/headers/Current-Page' - Page-Items: - $ref: '#/components/headers/Page-Items' - Total-Count: - $ref: '#/components/headers/Total-Count' - Total-Pages: - $ref: '#/components/headers/Total-Pages' - Link: - $ref: '#/components/headers/Link' - Before-Cursor: - $ref: '#/components/headers/Before-Cursor' - After-Cursor: - $ref: '#/components/headers/After-Cursor' + description: Successful response "401": content: application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." + $ref: '#/components/schemas/altErr' + description: Unauthorized + security: + - OAuth2: + - Manage All + summary: List Rules + tags: + - App Rules post: - operationId: createEnvironmentVariable + description: Create App Rule + operationId: createAppRule parameters: - - in: header - name: Authorization + - explode: false + in: path + name: app_id required: true schema: - type: string + type: integer + style: simple requestBody: content: application/json: schema: - $ref: '#/components/schemas/createEnvironmentVariable_request' - required: true + $ref: '#/components/schemas/app_rule' responses: "201": content: application/json: schema: - $ref: '#/components/schemas/envvar' + $ref: '#/components/schemas/app_rule' description: CREATED "401": content: application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." + $ref: '#/components/schemas/altErr' + description: Unauthorized "422": content: application/json: + example: + statusCode: 422 + name: UnprocessableEntityError + message: invalid value in \"auth_method\" schema: - $ref: '#/components/schemas/status_1' - description: Indicates that the syntax of the request is good but a value - supplied is not valid. - /api/2/hooks/envs/{envvar_id}: + $ref: '#/components/schemas/altErr' + description: Unprocessable Entity + security: + - OAuth2: + - Manage All + tags: + - App Rules + /api/2/apps/{app_id}/rules/{rule_id}: delete: - operationId: deleteEnvironmentVariable + description: Delete App Rule + operationId: deleteRule parameters: - - in: header - name: Authorization + - explode: false + in: path + name: app_id required: true schema: - type: string - - description: Set to the id of the Hook Environment Variable that you want - to fetch. + type: integer + style: simple + - explode: false in: path - name: envvar_id + name: rule_id required: true schema: - $ref: '#/components/schemas/id_4' + type: string + style: simple responses: "204": - description: Success. The environment variable has been deleted. No content - is returned. + description: Success. The rule is deleted. No content is returned. "401": content: application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." + $ref: '#/components/schemas/altErr' + description: Unauthorized "404": content: application/json: - schema: - $ref: '#/components/schemas/status_1' - description: Invalid ID + example: + statusCode: 404 + name: NotFoundError + message: The resource can't be found or the server has not found anything + matching the Request-URI + schema: + $ref: '#/components/schemas/altErr' + description: Not Found + security: + - OAuth2: + - Manage All + summary: Delete Rule + tags: + - App Rules get: - operationId: getEnvironmentVariable + description: Get App Rule + operationId: getAppRule parameters: - - in: header - name: Authorization + - explode: false + in: path + name: app_id required: true schema: - type: string - - description: Set to the id of the Hook Environment Variable that you want - to fetch. + type: integer + style: simple + - explode: false in: path - name: envvar_id + name: rule_id required: true schema: - $ref: '#/components/schemas/id_4' + type: string + style: simple responses: "200": content: application/json: schema: - $ref: '#/components/schemas/envvar' - description: OK + $ref: '#/components/schemas/app_rule' + description: Successful response "401": content: application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." + $ref: '#/components/schemas/altErr' + description: Unauthorized + "404": + content: + application/json: + example: + statusCode: 404 + name: NotFoundError + message: The resource can't be found or the server has not found anything + matching the Request-URI + schema: + $ref: '#/components/schemas/altErr' + description: Not Found + security: + - OAuth2: + - Manage All + summary: Get Rule + tags: + - App Rules put: - operationId: updateEnvironmentVariable + description: Update App Rule. + operationId: updateAppRule parameters: - - in: header - name: Authorization + - explode: false + in: path + name: app_id required: true schema: - type: string - - description: Set to the id of the Hook Environment Variable that you want - to fetch. + type: integer + style: simple + - explode: false in: path - name: envvar_id + name: rule_id required: true schema: - $ref: '#/components/schemas/id_4' + type: string + style: simple requestBody: content: application/json: schema: - $ref: '#/components/schemas/updateEnvironmentVariable_request' - required: true + $ref: '#/components/schemas/app_rule' responses: "200": content: application/json: schema: - $ref: '#/components/schemas/envvar' - description: OK - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/status_1' - description: BAD REQUEST + $ref: '#/components/schemas/app_rule' + description: Successful response "401": content: application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." + $ref: '#/components/schemas/altErr' + description: Unauthorized "422": content: application/json: + example: + statusCode: 422 + name: UnprocessableEntityError + message: invalid value in \"auth_method\" schema: - $ref: '#/components/schemas/hook_status' - description: The name of a var can not be changed - /api/2/users: + $ref: '#/components/schemas/altErr' + description: Unprocessable Entity + security: + - OAuth2: + - Manage All + summary: Update Rule + tags: + - App Rules + /api/2/apps/{app_id}/rules/conditions: get: - operationId: listUsers + description: List App Conditions + operationId: listConditions parameters: - - in: header - name: Authorization + - explode: false + in: path + name: app_id required: true - schema: - type: string - - description: "The total number of items returned per page. The maximum limit\ - \ varies between endpoints, see the relevant endpoint documentation for\ - \ the specific limit." - in: query - name: limit - schema: - type: integer - - description: The page number of results to return. - in: query - name: page schema: type: integer - - description: Set to the value extracted from Before-Cursor or After-Cursor - headers to return the previous or next page. - in: query - name: cursor - schema: - type: string - - description: An ISO8601 timestamp value that returns all users created after - a given date & time. - in: query - name: created_since - schema: - type: string - - description: An ISO8601 timestamp value that returns all users created before - a given date & time. - in: query - name: created_until - schema: - type: string - - description: An ISO8601 timestamp value that returns all users updated after - a given date & time. - in: query - name: updated_since - schema: - type: string - - description: An ISO8601 timestamp value that returns all users updated before - a given date & time. - in: query - name: updated_until - schema: - type: string - - description: An ISO8601 timestamp value that returns all users that logged - in after a given date & time. - in: query - name: last_login_since - schema: - type: string - - in: query - name: last_login_until - schema: - type: string - - description: The first name of the user - in: query - name: firstname - schema: - type: string - - description: The last name of the user - in: query - name: lastname - schema: - type: string - - description: The email address of the user - in: query - name: email - schema: - type: string - - description: The username for the user - in: query - name: username - schema: - type: string - - description: The AD login name for the user - in: query - name: samaccountname - schema: - type: string - - description: The ID in OneLogin of the Directory that the user belongs to - in: query - name: directory_id - schema: - type: string - - description: An external identifier that has been set on the user - in: query - name: external_id - schema: - type: string - - description: The ID of a OneLogin Application - in: query - name: app_id - schema: - type: string - - description: A comma separated list of OneLogin User IDs - in: query - name: user_ids - schema: - type: string - - description: The short name of a custom attribute. Note that the attribute - name is prefixed with custom_attributes. - in: query - name: "custom_attributes.{attribute_name}" - schema: - type: string - - description: A comma separated list user attributes to return. - in: query - name: fields - schema: - type: string + style: simple responses: "200": content: application/json: schema: items: - $ref: '#/components/schemas/user' + $ref: '#/components/schemas/listConditions_200_response_inner' type: array - description: OK - headers: - Current-Page: - $ref: '#/components/headers/Current-Page' - Page-Items: - $ref: '#/components/headers/Page-Items' - Total-Count: - $ref: '#/components/headers/Total-Count' - Total-Pages: - $ref: '#/components/headers/Total-Pages' - Link: - $ref: '#/components/headers/Link' - Before-Cursor: - $ref: '#/components/headers/Before-Cursor' - After-Cursor: - $ref: '#/components/headers/After-Cursor' - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/status_1' - description: An invalid search parameter was used. + description: Successful response "401": content: application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." - "422": - content: - application/json: - schema: - $ref: '#/components/schemas/status_1' - description: You cant sort on this field. - post: - operationId: createUser + $ref: '#/components/schemas/altErr' + description: Unauthorized + security: + - OAuth2: + - Manage All + summary: List Conditions + tags: + - App Rules + /api/2/apps/{app_id}/rules/conditions/{rule_condition_value}/operators: + get: + description: List Condition Operators + operationId: listConditionOperators parameters: - - in: header - name: Authorization + - explode: false + in: path + name: app_id required: true schema: - type: string - - description: Controls how mappings will be applied to the user on creation. - Defaults to async. - in: query - name: mappings + type: integer + style: simple + - explode: false + in: path + name: rule_condition_value + required: true schema: - enum: - - async - - sync - - disabled type: string - - description: Will passwords validate against the User Policy? Defaults to - true. - in: query - name: validate_policy - schema: - type: boolean - requestBody: - $ref: '#/components/requestBodies/user' + style: simple responses: - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/user' - description: The full user resource is returned - "400": + "200": content: application/json: schema: - $ref: '#/components/schemas/status_1' - description: BAD REQUEST + items: + $ref: '#/components/schemas/rule_condition' + type: array + description: Successful response "401": content: application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." - "422": - content: - application/json: - schema: - $ref: '#/components/schemas/status_1' - description: Indicates that the syntax of the request is good but a value - supplied is not valid. - /api/2/users/{user_id}: - delete: - operationId: deleteUser + $ref: '#/components/schemas/altErr' + description: Unauthorized + security: + - OAuth2: + - Manage All + summary: List Conditions Operators + tags: + - App Rules + /api/2/apps/{app_id}/rules/conditions/{rule_condition_value}/values: + get: + description: List Condition Values + operationId: listConditionValues parameters: - - in: header - name: Authorization + - explode: false + in: path + name: app_id required: true schema: - type: string - - description: Set to the id of the user that you want to return. + type: integer + style: simple + - explode: false in: path - name: user_id + name: rule_condition_value required: true schema: - $ref: '#/components/schemas/id_2' + type: string + style: simple responses: - "204": - description: "On success, no content is returned in the response body." - "401": + "200": content: application/json: schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." - "404": + $ref: '#/components/schemas/rule_condition' + description: Successful response + "401": content: application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication schema: - $ref: '#/components/schemas/status_1' - description: Invalid ID + $ref: '#/components/schemas/altErr' + description: Unauthorized + security: + - OAuth2: + - Manage All + summary: List Conditions Values + tags: + - App Rules + /api/2/apps/{app_id}/rules/actions: get: - operationId: getUser + description: List Actions + operationId: listActions parameters: - - in: header - name: Authorization - required: true - schema: - type: string - - description: Set to the id of the user that you want to return. + - explode: false in: path - name: user_id + name: app_id required: true schema: - $ref: '#/components/schemas/id_2' + type: integer + style: simple responses: "200": content: application/json: schema: - $ref: '#/components/schemas/user' - description: OK + items: + $ref: '#/components/schemas/rule_action' + type: array + description: Successful response "401": content: application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/status_1' - description: Invalid ID - put: - operationId: updateUser + $ref: '#/components/schemas/altErr' + description: Unauthorized + security: + - OAuth2: + - Manage All + summary: List Actions + tags: + - App Rules + /api/2/apps/{app_id}/rules/actions/{rule_action_value}/values: + get: + description: Sort App rules + operationId: listActionValies parameters: - - in: header - name: Authorization + - explode: false + in: path + name: app_id required: true schema: - type: string - - description: Set to the id of the user that you want to return. + type: integer + style: simple + - explode: false in: path - name: user_id + name: rule_action_value required: true schema: - $ref: '#/components/schemas/id_2' - - description: Controls how mappings will be applied to the user on creation. - Defaults to async. - in: query - name: mappings - schema: - enum: - - async - - sync - - disabled type: string - - description: Will passwords validate against the User Policy? Defaults to - true. - in: query - name: validate_policy - schema: - type: boolean - requestBody: - $ref: '#/components/requestBodies/user' + style: simple responses: "200": content: application/json: schema: - $ref: '#/components/schemas/user' - description: The full user resource is returned - "400": + items: + $ref: '#/components/schemas/rule_action' + type: array + description: Successful response + "401": content: application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication schema: - $ref: '#/components/schemas/status_1' - description: BAD REQUEST - "401": + $ref: '#/components/schemas/altErr' + description: Unauthorized + security: + - OAuth2: + - Manage All + summary: List Actions Values + tags: + - App Rules + /api/2/apps/{app_id}/rules/sort: + put: + description: Sort App rules + operationId: sortAppRules + parameters: + - explode: false + in: path + name: app_id + required: true + schema: + type: integer + style: simple + requestBody: + content: + application/json: + schema: + example: + - 196671 + - 196670 + - 196672 + - 196676 + - 197758 + items: + type: integer + type: array + responses: + "200": content: application/json: schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." - "404": + example: + - 196671 + - 196670 + - 196672 + - 196676 + - 197758 + items: + type: integer + type: array + description: Successful response + "401": content: application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication schema: - $ref: '#/components/schemas/status_1' - description: Invalid ID + $ref: '#/components/schemas/altErr' + description: Unauthorized "422": content: application/json: + example: + statusCode: 422 + name: UnprocessableEntityError + message: invalid value in \"auth_method\" schema: - $ref: '#/components/schemas/status_1' - description: Indicates that the syntax of the request is good but a value - supplied is not valid. - /api/2/users/{user_id}/apps: + $ref: '#/components/schemas/altErr' + description: Unprocessable Entity + security: + - OAuth2: + - Manage All + summary: Bulk Sort + tags: + - App Rules + /api/2/connectors: get: - operationId: getUserApps + description: List Connectors + operationId: listConnectors parameters: - - in: header - name: Authorization - required: true + - explode: true + in: query + name: name + required: false schema: type: string - - description: Set to the id of the user that you want to return. - in: path - name: user_id - required: true - schema: - $ref: '#/components/schemas/id_2' - - description: Defaults to `false`. When `true` will show all apps that are - assigned to a user regardless of their portal visibility setting. - in: query - name: ignore_visibility - schema: - type: boolean + style: form responses: "200": content: application/json: schema: - items: - $ref: '#/components/schemas/getUserApps_200_response_inner' - type: array - description: OK + $ref: '#/components/schemas/connector' + description: Successful response "401": content: application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." - "404": + $ref: '#/components/schemas/altErr' + description: Unauthorized + "422": content: application/json: + example: + statusCode: 422 + name: UnprocessableEntityError + message: invalid value in \"auth_method\" schema: - $ref: '#/components/schemas/status_1' - description: Invalid ID - /api/2/mappings: + $ref: '#/components/schemas/altErr' + description: Unprocessable Entity + security: + - OAuth2: + - Manage All + summary: List Connectors + tags: + - Apps + /api/2/risk/rules: get: - operationId: listMappings - parameters: - - in: header - name: Authorization - required: true - schema: - type: string - - description: Defaults to true. When set to `false` will return all disabled - mappings. - in: query - name: enabled - schema: - default: true - type: boolean - - description: Filters Mappings based on their Conditions. - example: "has_condition=has_role:123456,status:1" - in: query - name: has_condition - schema: - type: string - - description: Filters Mappings based on their condition types. - in: query - name: has_condition_type - schema: - enum: - - builtin - - custom - - none - type: string - - description: Filters Mappings based on their Actions. - example: "has_action=set_groups:123456,set_usertype:*" - in: query - name: has_action - schema: - type: string - - description: Filters Mappings based on their action types. - in: query - name: has_action_type - schema: - enum: - - builtin - - custom - - none - type: string + description: List Vigilance AI (Risk Service) Rules + operationId: listRiskRules responses: "200": content: application/json: schema: items: - $ref: '#/components/schemas/mapping' + $ref: '#/components/schemas/risk_rule' type: array description: OK "401": content: application/json: + example: + error: true + code: 401 + type: Unauthorized + message: Unauthorized Error schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." + $ref: '#/components/schemas/Error' + description: Unauthorized + security: + - OAuth2: + - Manage All + - Read All + summary: List Rules + tags: + - Vigilance AI post: - operationId: createMapping - parameters: - - in: header - name: Authorization - required: true - schema: - type: string + description: Create Vigilance AI (Risk Service) Rule + operationId: createRiskRule requestBody: - $ref: '#/components/requestBodies/mapping' + content: + application/json: + schema: + $ref: '#/components/schemas/risk_rule' responses: "201": content: application/json: schema: - $ref: '#/components/schemas/id_2' + $ref: '#/components/schemas/risk_rule' description: CREATED - "401": + "400": content: application/json: + example: + error: true + code: 400 + type: bad request + message: Request Failure schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." - "422": + $ref: '#/components/schemas/Error' + description: Bad Request + "401": content: application/json: + example: + error: true + code: 401 + type: Unauthorized + message: Unauthorized Error schema: - $ref: '#/components/schemas/error_status' - description: UNPROCESSABLE_ENTRY - /api/2/mappings/{mapping_id}: + $ref: '#/components/schemas/Error' + description: Unauthorized + security: + - OAuth2: + - Manage All + summary: Create Rule + tags: + - Vigilance AI + /api/2/risk/rules/{rule_id}: delete: - operationId: deleteMapping + description: Delete Vigilance AI (Risk Service) + operationId: deleteRiskRule parameters: - - in: header - name: Authorization - required: true - schema: - type: string - - description: The id of the user mapping to locate. + - explode: false in: path - name: mapping_id + name: rule_id required: true schema: - type: integer + type: string + style: simple responses: "204": - description: NO CONTENT + description: Successful response "401": content: application/json: + example: + error: true + code: 401 + type: Unauthorized + message: Unauthorized Error schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/status_1' - description: Invalid ID + $ref: '#/components/schemas/Error' + description: Unauthorized + security: + - OAuth2: + - Manage All + - Read All + summary: Delete Rule + tags: + - Vigilance AI get: - operationId: getMapping + description: Use this API to return a single rule that has been created in the + Risk Sevice. + operationId: getRiskRule parameters: - - in: header - name: Authorization - required: true - schema: - type: string - - description: The id of the user mapping to locate. + - explode: false in: path - name: mapping_id + name: rule_id required: true schema: - type: integer + type: string + style: simple responses: "200": content: application/json: schema: - $ref: '#/components/schemas/mapping' - description: OK + $ref: '#/components/schemas/risk_rule' + description: Successful Response "401": content: application/json: + example: + error: true + code: 401 + type: Unauthorized + message: Unauthorized Error schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/status_1' - description: Invalid ID + $ref: '#/components/schemas/Error' + description: Unauthorized + security: + - OAuth2: + - Manage All + - Read All + summary: get Risk Rule + tags: + - Vigilance AI put: - operationId: updateMapping + description: Update Vigilance AI (Risk Service) Rule + operationId: updateRiskRule parameters: - - in: header - name: Authorization - required: true - schema: - type: string - - description: The id of the user mapping to locate. + - explode: false in: path - name: mapping_id + name: rule_id required: true schema: - type: integer + type: string + style: simple requestBody: - $ref: '#/components/requestBodies/mapping' + content: + application/json: + schema: + $ref: '#/components/schemas/updateRiskRule_request' responses: "200": content: application/json: schema: - $ref: '#/components/schemas/id_2' - description: OK - "401": + $ref: '#/components/schemas/risk_rule' + description: Successful Response + "400": content: application/json: + example: + error: true + code: 400 + type: bad request + message: Request Failure schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." - "422": + $ref: '#/components/schemas/Error' + description: Bad Request + "401": content: application/json: + example: + error: true + code: 401 + type: Unauthorized + message: Unauthorized Error schema: - $ref: '#/components/schemas/error_status' - description: UNPROCESSABLE_ENTRY - /api/2/mappings/{mapping_id}/dryrun: + $ref: '#/components/schemas/Error' + description: Unauthorized + security: + - OAuth2: + - Manage All + - Read All + summary: Update Rule + tags: + - Vigilance AI + /api/2/risk/events: post: - operationId: dryRunMapping - parameters: - - in: header - name: Authorization - required: true - schema: - type: string - - description: The id of the user mapping to locate. - in: path - name: mapping_id - required: true - schema: - type: integer + description: Track Vigilance AI (Risk Service) Event + operationId: trackRiskEvent requestBody: content: application/json: schema: - items: - type: integer - type: array - description: Request body is a list of user IDs tested against the mapping - conditions to verify that the mapping would be applied + $ref: '#/components/schemas/trackRiskEvent_request' required: true responses: "200": + description: No content is returned. This API is fire and forget. + "400": content: application/json: + example: + error: true + code: 400 + type: bad request + message: Request Failure schema: - items: - type: object - type: array - description: OK + $ref: '#/components/schemas/Error' + description: Bad Request "401": content: application/json: + example: + error: true + code: 401 + type: Unauthorized + message: Unauthorized Error schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." - "422": + $ref: '#/components/schemas/Error' + description: Unauthorized + security: + - OAuth2: + - Authentication Only + - Read Users + - Manage users + - Manage All + - Read All + summary: Track an Event + tags: + - Vigilance AI + /api/2/risk/scores: + get: + description: Get Vigilance AI (Risk Service) Score Summary + operationId: getRiskScores + responses: + "200": content: application/json: schema: - $ref: '#/components/schemas/error_status' - description: UNPROCESSABLE_ENTRY - /api/2/apps/mappings/conditions: - get: - operationId: listMappingConditions + $ref: '#/components/schemas/getRiskScores_200_response' + description: OK + "401": + content: + application/json: + example: + error: true + code: 401 + type: Unauthorized + message: Unauthorized Error + schema: + $ref: '#/components/schemas/Error' + description: Unauthorized + security: + - OAuth2: + - Manage All + - Read All + summary: Get Score Summary + tags: + - Vigilance AI + /api/2/risk/verify: + post: + description: Get Vigilance AI (Risk Service) Score + operationId: getRiskScore parameters: - - in: header - name: Authorization - required: true + - description: Optional ISO8601 formatted date string. Defaults to current date. + Maximum date is 90 days ago. + explode: true + in: query + name: before + required: false + schema: + type: string + style: form + - description: Optional ISO8601 formatted date string. Defaults to 30 days ago. + Maximum date is 90 days ago. + explode: true + in: query + name: after + required: false schema: type: string + style: form + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/getRiskScore_request' + required: true responses: "200": content: application/json: schema: - items: - $ref: '#/components/schemas/listMappingConditions_200_response_inner' - type: array - description: OK + $ref: '#/components/schemas/getRiskScore_200_response' + description: Successful response + "400": + content: + application/json: + example: + error: true + code: 400 + type: bad request + message: Request Failure + schema: + $ref: '#/components/schemas/Error' + description: Bad Request "401": content: application/json: + example: + error: true + code: 401 + type: Unauthorized + message: Unauthorized Error schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." - /api/2/apps/mappings/conditions/{condition_value}/operators: + $ref: '#/components/schemas/Error' + description: Unauthorized + security: + - OAuth2: + - Authentication Only + - Read Users + - Manage users + - Manage All + - Read All + summary: Get a Risk Score + tags: + - Vigilance AI + /api/2/mfa/users/{user_id}/registrations/{registration_id}: get: - operationId: listMappingConditionOperators + description: Get registration state by id + operationId: getUserRegistration parameters: - - in: header - name: Authorization + - description: Set to the id of the user that you want to return. + explode: false + in: path + name: user_id required: true schema: - type: string - - description: The value for the selected condition. + $ref: '#/components/schemas/id' + style: simple + - description: The id of a registration + example: + explode: false in: path - name: condition_value + name: registration_id required: true schema: type: string + style: simple responses: "200": content: application/json: + example: + id: ca332b26-0d83-444f-956b-0dbf004a3f03 + status: pending schema: - items: - $ref: '#/components/schemas/listMappingConditionOperators_200_response_inner' - type: array + type: object description: OK + headers: + Accept-Language: + explode: false + schema: + example: "en-US,en;q=1" + type: string + style: simple + Cache-Control: + explode: false + schema: + example: "no-cache, must-revalidate, no-store" + type: string + style: simple + Content-Length: + explode: false + schema: + example: 64 + type: integer + style: simple + Content-Type: + explode: false + schema: + example: application/json + type: string + style: simple + X-Content-Type-Options: + explode: false + schema: + example: nosniff + type: string + style: simple + X-Request-Id: + explode: false + schema: + example: 5F188C46-49E1609A-D47B-0A0B033A-01BB-11459E-43E7 + type: string + style: simple + Date: + explode: false + schema: + example: "Wed, 22 Jul 2020 18:58:14 GMT" + type: string + style: simple "401": content: application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." - /api/2/apps/mappings/conditions/{condition_value}/values: - get: - operationId: listMappingConditionValues + $ref: '#/components/schemas/altErr' + description: Unauthorized + security: + - OAuth2: + - Manage All + summary: Get User Registration + tags: + - Multi Factor Authentication + put: + description: Submit an otp for verification. + operationId: verifyUserRegistration parameters: - - in: header - name: Authorization - required: true + - example: application/json + explode: false + in: header + name: Content-Type + required: false schema: + default: application/json type: string - - description: The value for the selected condition. + style: simple + - description: Set to the id of the user that you want to return. + explode: false + in: path + name: user_id + required: true + schema: + $ref: '#/components/schemas/id' + style: simple + - description: The id of a registration + example: + explode: false in: path - name: condition_value + name: registration_id required: true schema: type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/verifyUserRegistration_request' responses: "200": content: application/json: schema: - items: - $ref: '#/components/schemas/listConditionValues_200_response_inner' - type: array + $ref: '#/components/schemas/verifyUserRegistration_200_response' description: OK + headers: + Accept-Language: + explode: false + schema: + example: "en-US,en;q=1" + type: string + style: simple + Cache-Control: + explode: false + schema: + example: "no-cache, must-revalidate, no-store" + type: string + style: simple + Content-Length: + explode: false + schema: + example: 87 + type: integer + style: simple + Content-Type: + explode: false + schema: + example: application/json + type: string + style: simple + X-Content-Type-Options: + explode: false + schema: + example: nosniff + type: string + style: simple + X-Request-Id: + explode: false + schema: + example: 5F188CDE-49E1609A-D480-0A0B0591-01BB-3589-0813 + type: string + style: simple + Date: + explode: false + schema: + example: "Wed, 22 Jul 2020 19:00:47 GMT" + type: string + style: simple "401": content: application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." - /api/2/apps/mappings/actions: - get: - operationId: listMappingActions + $ref: '#/components/schemas/altErr' + description: Unauthorized + security: + - OAuth2: + - Manage All + summary: Verify User Registration + tags: + - Multi Factor Authentication + /api/2/mfa/users/{user_id}/registrations: + post: + description: Create a new registration process + operationId: createFactorRegistration parameters: - - in: header - name: Authorization - required: true + - example: application/json + explode: false + in: header + name: Content-Type + required: false schema: + default: application/json type: string + style: simple + - description: Set to the id of the user that you want to return. + explode: false + in: path + name: user_id + required: true + schema: + $ref: '#/components/schemas/id' + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/createFactorRegistration_request' responses: - "200": + "201": content: application/json: schema: - items: - $ref: '#/components/schemas/listActions_200_response_inner' - type: array - description: OK + $ref: '#/components/schemas/createFactorRegistration_201_response' + description: Created + headers: + Accept-Language: + explode: false + schema: + example: "en-US,en;q=1" + type: string + style: simple + Cache-Control: + explode: false + schema: + example: "no-cache, must-revalidate, no-store" + type: string + style: simple + Content-Length: + explode: false + schema: + example: 186 + type: integer + style: simple + Content-Type: + explode: false + schema: + example: application/json + type: string + style: simple + X-Content-Type-Options: + explode: false + schema: + example: nosniff + type: string + style: simple + X-Request-Id: + explode: false + schema: + example: 5F188C90-49E1609A-D47D-0A0B03ED-01BB-2869-1581 + type: string + style: simple + Date: + explode: false + schema: + example: "Wed, 22 Jul 2020 18:59:30 GMT" + type: string + style: simple "401": content: application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." - /api/2/apps/mappings/actions/{actuion_value}/values: + $ref: '#/components/schemas/altErr' + description: Unauthorized + security: + - OAuth2: + - Manage All + summary: Create Factor Registration + tags: + - Multi Factor Authentication + /api/2/mfa/users/{user_id}/devices: get: - operationId: listMappingActionValues + description: Get a user authentication devices + operationId: getAuthenticationDevices parameters: - - in: header - name: Authorization - required: true - schema: - type: string - - description: The value for the selected action. + - description: Set to the id of the user that you want to return. + explode: false in: path - name: action_value + name: user_id required: true schema: - type: string + $ref: '#/components/schemas/id' + style: simple responses: "200": content: application/json: schema: items: - $ref: '#/components/schemas/listConditionValues_200_response_inner' + $ref: '#/components/schemas/getAuthenticationDevices_200_response_inner' type: array description: OK "401": content: application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." - /api/2/apps/mappings/sort: - put: - operationId: bulkMappingSort + $ref: '#/components/schemas/altErr' + description: Unauthorized + security: + - OAuth2: + - Manage All + summary: Get User Devices + tags: + - Multi Factor Authentication + /api/2/mfa/users/{user_id}/devices/{device_id}: + delete: + description: Delete a user\'s authentication device + operationId: deleteEnrolledFactor parameters: - - in: header - name: Authorization + - description: Set to the id of the user that you want to return. + explode: false + in: path + name: user_id + required: true + schema: + $ref: '#/components/schemas/id' + style: simple + - explode: false + in: path + name: device_id required: true schema: type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/mapping_id_list' - description: The request body must contain an array of User Mapping IDs in - the desired order. + style: simple + responses: + "204": + description: No Content + security: + - OAuth2: + - Manage All + summary: Delete Enrolled Factor + tags: + - Multi Factor Authentication + /api/2/mfa/users/{user_id}/verifications/{verification_id}: + get: + description: Get verification state by id + operationId: getUserVerification + parameters: + - description: Set to the id of the user that you want to return. + explode: false + in: path + name: user_id required: true + schema: + $ref: '#/components/schemas/id' + style: simple + - description: The verification_id is returned on activation of the factor or + you can get the device_id using the Activate Factor API call. + example: + explode: false + in: path + name: verification_id + required: true + schema: + type: string + style: simple responses: "200": content: application/json: schema: - $ref: '#/components/schemas/mapping_id_list' - description: On success a complete list of ordered mappings is returned. + $ref: '#/components/schemas/getUserVerification_200_response' + description: OK "401": content: application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is\ - \ invalid." - "422": + $ref: '#/components/schemas/altErr' + description: Unauthorized + "404": content: application/json: - schema: - $ref: '#/components/schemas/error_status' - description: Indicates that not all mapping IDs were included in the request. - /api/2/risk/events: - post: - operationId: trackEvent + example: + statusCode: 404 + name: NotFoundError + message: The resource can't be found or the server has not found anything + matching the Request-URI + schema: + $ref: '#/components/schemas/altErr' + description: Not Found + security: + - OAuth2: + - Manage All + summary: Get User Verification + tags: + - Multi Factor Authentication + put: + description: Submit an otp for verification. + operationId: verifyUserVerification parameters: - - in: header - name: Authorization + - example: application/json + explode: false + in: header + name: Content-Type + required: false + schema: + default: application/json + type: string + style: simple + - description: Set to the id of the user that you want to return. + explode: false + in: path + name: user_id + required: true + schema: + $ref: '#/components/schemas/id' + style: simple + - description: The verification_id is returned on activation of the factor or + you can get the device_id using the Activate Factor API call. + example: + explode: false + in: path + name: verification_id required: true schema: type: string + style: simple requestBody: content: application/json: schema: - $ref: '#/components/schemas/trackEvent_request' - required: true + $ref: '#/components/schemas/verifyUserVerification_request' responses: "200": - description: No content is returned. This API is fire and forget. - "400": - description: BAD REQUEST + content: + application/json: + example: + type: success + code: 200 + message: success + error: false + schema: + $ref: '#/components/schemas/Error' + description: OK + headers: + Content-Type: + explode: false + schema: + example: application/json + type: string + style: simple "401": - description: Invalid API Key - /api/2/risk/verify: + content: + application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication + schema: + $ref: '#/components/schemas/altErr' + description: Unauthorized + "403": + content: + application/json: + example: + statusCode: 403 + name: ForbiddenError + message: Not allowed to destroy specified resource + schema: + $ref: '#/components/schemas/altErr' + description: Forbidden + security: + - OAuth2: + - Manage All + summary: Verify User Verification + tags: + - Multi Factor Authentication + /api/2/mfa/users/{user_id}/verifications: post: - operationId: getRiskScore + description: Create a new verification process + operationId: createDeviceVerification parameters: - - in: header - name: Authorization - required: true + - example: application/json + explode: false + in: header + name: Content-Type + required: false schema: + default: application/json type: string + style: simple + - description: Set to the id of the user that you want to return. + explode: false + in: path + name: user_id + required: true + schema: + $ref: '#/components/schemas/id' + style: simple requestBody: content: application/json: schema: - $ref: '#/components/schemas/getRiskScore_request' - required: true + $ref: '#/components/schemas/createDeviceVerification_request' responses: - "200": + "201": content: application/json: + example: + id: 5a0ba80a-39a1-4627-9a8b-1273278b34ee + status: pending + user_id: 2323 + device_id: 489339 + factor_data: + verification_token: + totp_url: schema: - $ref: '#/components/schemas/getRiskScore_200_response' - description: OK - "400": + $ref: '#/components/schemas/createDeviceVerification_201_response' + description: Created + headers: + Content-Type: + explode: false + schema: + example: application/json + type: string + style: simple + "401": content: application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication schema: - $ref: '#/components/schemas/getRiskScore_400_response' - description: BAD REQUEST - "401": - description: Invalid API Key - /api/2/risk/rules: + $ref: '#/components/schemas/altErr' + description: Unauthorized + security: + - OAuth2: + - Manage All + summary: Create Device Verification + tags: + - Multi Factor Authentication + /api/2/mfa/users/{user_id}/factors: get: - operationId: listRiskRules + description: Get a user\'s available authentication factors + operationId: getAuthFactors parameters: - - in: header - name: Authorization + - description: Set to the id of the user that you want to return. + explode: false + in: path + name: user_id required: true schema: - type: string + $ref: '#/components/schemas/id' + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/getAuthFactors_200_response' + description: OK + headers: + Content-Type: + explode: false + schema: + example: application/json + type: string + style: simple + "401": + content: + application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication + schema: + $ref: '#/components/schemas/altErr' + description: Unauthorized + security: + - OAuth2: + - Manage All + summary: Get User Factors + tags: + - Multi Factor Authentication + /api/2/mfa/users/{user_id}/mfa_token: post: - operationId: createRiskRule - parameters: - - in: header - name: Authorization - required: true - schema: - type: string - requestBody: - $ref: '#/components/requestBodies/risk_rule' - /api/2/risk/rules/{risk_rule_id}: - delete: - operationId: deleteRiskRule + description: Create new MFA token on the user's account + operationId: generateOTP parameters: - - in: header - name: Authorization - required: true + - example: application/json + explode: false + in: header + name: Content-Type + required: false schema: + default: application/json type: string - - in: path - name: risk_rule_id + style: simple + - description: Set to the id of the user that you want to return. + explode: false + in: path + name: user_id required: true schema: - $ref: '#/components/schemas/id_5' + $ref: '#/components/schemas/id' + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/generateOTP_request' responses: - "200": + "201": content: application/json: schema: - $ref: '#/components/schemas/risk_rule' - description: OK + $ref: '#/components/schemas/generateOTP_201_response' + description: Created + headers: + Content-Type: + explode: false + schema: + example: application/json + type: string + style: simple "401": - description: Invalid API Key + content: + application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication + schema: + $ref: '#/components/schemas/altErr' + description: Unauthorized + "422": + content: + application/json: + example: + statusCode: 422 + name: UnprocessableEntityError + message: invalid value in \"auth_method\" + schema: + $ref: '#/components/schemas/altErr' + description: Unprocessable Entity + security: + - OAuth2: + - Manage All + summary: Generate MFA token + tags: + - Multi Factor Authentication + /api/2/roles: get: - operationId: getRiskRule + description: List Roles + operationId: listRoles parameters: - - in: header - name: Authorization - required: true + - description: How many items to return at one time (max 100) + explode: true + in: query + name: limit + required: false + schema: + format: int32 + type: integer + style: form + - description: The page number of results to return. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Set to the value extracted from Before-Cursor or After-Cursor + headers to return the previous or next page. + explode: true + in: query + name: cursor + required: false schema: type: string - - in: path - name: risk_rule_id - required: true + style: form + - description: Optional. Filters by role name. + explode: true + in: query + name: role_name + required: false schema: - $ref: '#/components/schemas/id_5' - put: - operationId: updateRiskRule - parameters: - - in: header - name: Authorization + type: string + style: form + - explode: true + in: query + name: app_id required: true + schema: + type: integer + style: form + - description: Optional. Returns roles that contain this app name. + explode: true + in: query + name: app_name + required: false schema: type: string - - in: path - name: risk_rule_id - required: true + style: form + - description: Optional. Comma delimited list of fields to return. + explode: true + in: query + name: fields + required: false schema: - $ref: '#/components/schemas/id_5' - requestBody: - $ref: '#/components/requestBodies/risk_rule' + enum: + - apps + - users + - admins + type: string + style: form responses: "200": content: application/json: schema: - $ref: '#/components/schemas/risk_rule' + items: + $ref: '#/components/schemas/role' + type: array description: OK - "400": - description: BAD REQUEST + headers: + Current-Page: + $ref: '#/components/headers/Current-Page' + Page-Items: + $ref: '#/components/headers/Page-Items' + Total-Count: + $ref: '#/components/headers/Total-Count' + Total-Pages: + $ref: '#/components/headers/Total-Pages' + Link: + $ref: '#/components/headers/Link' + Before-Cursor: + $ref: '#/components/headers/Before-Cursor' + After-Cursor: + $ref: '#/components/headers/After-Cursor' "401": - description: UNAUTHORIZED - /api/2/risk/scores: - get: - operationId: getScoreInsights + content: + application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication + schema: + $ref: '#/components/schemas/altErr' + description: Unauthorized + security: + - OAuth2: + - Manage All + - Read All + - Read Users + summary: List Roles + tags: + - Roles + post: + description: Create Role + operationId: createRole + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/role' + responses: + "201": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/createRole_201_response_inner' + type: array + description: CREATED + "401": + content: + application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication + schema: + $ref: '#/components/schemas/altErr' + description: Unauthorized + security: + - OAuth2: + - Manage All + summary: Create Role + tags: + - Roles + /api/2/roles/{role_id}: + delete: + description: Delete Role + operationId: deleteRole parameters: - - in: header - name: Authorization + - description: Set to the id of the role you want to return. + explode: false + in: path + name: role_id required: true schema: type: string - - description: Optional ISO8601 formatted date string. Defaults to current date. - Maximum date is 90 days ago. - in: query - name: before - schema: - type: string - - description: Optional ISO8601 formatted date string. Defaults to 30 days ago. - Maximum date is 90 days ago. - in: query - name: after + style: simple + responses: + "204": + description: NO CONTENT + "401": + content: + application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication + schema: + $ref: '#/components/schemas/altErr' + description: Unauthorized + "403": + content: + application/json: + example: + statusCode: 403 + name: ForbiddenError + message: Not allowed to destroy specified resource + schema: + $ref: '#/components/schemas/altErr' + description: Forbidden + "404": + content: + application/json: + example: + statusCode: 404 + name: NotFoundError + message: The resource can't be found or the server has not found anything + matching the Request-URI + schema: + $ref: '#/components/schemas/altErr' + description: Not Found + security: + - OAuth2: + - Manage All + summary: Delete Role by ID + tags: + - Roles + get: + description: Get Role + operationId: getRole + parameters: + - description: Set to the id of the role you want to return. + explode: false + in: path + name: role_id + required: true schema: type: string + style: simple responses: "200": content: application/json: schema: - $ref: '#/components/schemas/getScoreInsights_200_response' + $ref: '#/components/schemas/role' description: OK "401": - description: Invalid Access Token -components: - headers: + content: + application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication + schema: + $ref: '#/components/schemas/altErr' + description: Unauthorized + "404": + content: + application/json: + example: + statusCode: 404 + name: NotFoundError + message: The resource can't be found or the server has not found anything + matching the Request-URI + schema: + $ref: '#/components/schemas/altErr' + description: Not Found + security: + - OAuth2: + - Manage All + - Read All + - Read Users + summary: Get Role by ID + tags: + - Roles + put: + description: Update Role + operationId: updateRole + parameters: + - description: Set to the id of the role you want to return. + explode: false + in: path + name: role_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/role' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/updateRole_200_response' + description: OK + "401": + content: + application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication + schema: + $ref: '#/components/schemas/altErr' + description: Unauthorized + "422": + content: + application/json: + example: + statusCode: 422 + name: UnprocessableEntityError + message: invalid value in \"auth_method\" + schema: + $ref: '#/components/schemas/altErr' + description: Unprocessable Entity + security: + - OAuth2: + - Manage All + summary: Update Role + tags: + - Roles + /api/2/roles/{role_id}/apps: + get: + description: Get Role Apps + operationId: getRoleApps + parameters: + - description: Set to the id of the role you want to return. + explode: false + in: path + name: role_id + required: true + schema: + type: string + style: simple + - description: How many items to return at one time (max 100) + explode: true + in: query + name: limit + required: false + schema: + format: int32 + type: integer + style: form + - description: The page number of results to return. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Set to the value extracted from Before-Cursor or After-Cursor + headers to return the previous or next page. + explode: true + in: query + name: cursor + required: false + schema: + type: string + style: form + - description: Optional. Defaults to true. Returns all apps not yet assigned + to the role. + explode: true + in: query + name: assigned + required: false + schema: + type: boolean + style: form + responses: + "200": + content: + applcation/json: + schema: + items: + $ref: '#/components/schemas/getRoleApps_200_response_inner' + type: array + description: OK + headers: + Current-Page: + $ref: '#/components/headers/Current-Page' + Page-Items: + $ref: '#/components/headers/Page-Items' + Total-Count: + $ref: '#/components/headers/Total-Count' + Total-Pages: + $ref: '#/components/headers/Total-Pages' + Link: + $ref: '#/components/headers/Link' + Before-Cursor: + $ref: '#/components/headers/Before-Cursor' + After-Cursor: + $ref: '#/components/headers/After-Cursor' + "401": + content: + application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication + schema: + $ref: '#/components/schemas/altErr' + description: Unauthorized + "404": + content: + application/json: + example: + statusCode: 404 + name: NotFoundError + message: The resource can't be found or the server has not found anything + matching the Request-URI + schema: + $ref: '#/components/schemas/altErr' + description: Not Found + security: + - OAuth2: + - Manage All + - Read All + - Read Users + summary: Get all Apps assigned to Role + tags: + - Roles + put: + description: Set Role Apps + operationId: setRoleApps + parameters: + - description: Set to the id of the role you want to return. + explode: false + in: path + name: role_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + description: The complete list of app_id values to assign to the role. + Don't submit a partial list of app IDs. + items: + $ref: '#/components/schemas/id' + type: array + required: true + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/createRole_201_response_inner' + type: array + description: The response returns an array of app IDs sent in the request. + "401": + content: + application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication + schema: + $ref: '#/components/schemas/altErr' + description: Unauthorized + "404": + content: + application/json: + example: + statusCode: 404 + name: NotFoundError + message: The resource can't be found or the server has not found anything + matching the Request-URI + schema: + $ref: '#/components/schemas/altErr' + description: Not Found + security: + - OAuth2: + - Manage All + summary: Set Role Apps + tags: + - Roles + /api/2/roles/{role_id}/users: + delete: + description: Remove Role Users + operationId: removeRoleUsers + parameters: + - description: Set to the id of the role you want to return. + explode: false + in: path + name: role_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/removeRoleUsers_request' + required: true + responses: + "204": + description: NO CONTENT + "401": + content: + application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication + schema: + $ref: '#/components/schemas/altErr' + description: Unauthorized + "404": + content: + application/json: + example: + statusCode: 404 + name: NotFoundError + message: The resource can't be found or the server has not found anything + matching the Request-URI + schema: + $ref: '#/components/schemas/altErr' + description: Not Found + security: + - OAuth2: + - Manage All + summary: Remove Role Users + tags: + - Roles + get: + description: Get Role Users + operationId: getRoleUsers + parameters: + - description: Set to the id of the role you want to return. + explode: false + in: path + name: role_id + required: true + schema: + type: string + style: simple + - description: How many items to return at one time (max 100) + explode: true + in: query + name: limit + required: false + schema: + format: int32 + type: integer + style: form + - description: The page number of results to return. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Set to the value extracted from Before-Cursor or After-Cursor + headers to return the previous or next page. + explode: true + in: query + name: cursor + required: false + schema: + type: string + style: form + - description: "Allows you to filter on first name, last name, username, and\ + \ email address." + explode: true + in: query + name: name + required: false + schema: + type: string + style: form + - description: Optional. Defaults to false. Include users that aren’t assigned + to the role. + explode: true + in: query + name: include_unassigned + required: false + schema: + type: boolean + style: form + responses: + "200": + content: + applcation/json: + schema: + example: + - id: 345 + name: Joe User + username: joe.user@example.com + added_by: + id: 678 + name: Susan Boss + added_at: 2019-12-27T00:00:00Z + assigned: true + items: + $ref: '#/components/schemas/user' + type: array + description: OK + headers: + Current-Page: + $ref: '#/components/headers/Current-Page' + Page-Items: + $ref: '#/components/headers/Page-Items' + Total-Count: + $ref: '#/components/headers/Total-Count' + Total-Pages: + $ref: '#/components/headers/Total-Pages' + Link: + $ref: '#/components/headers/Link' + Before-Cursor: + $ref: '#/components/headers/Before-Cursor' + After-Cursor: + $ref: '#/components/headers/After-Cursor' + "401": + content: + application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication + schema: + $ref: '#/components/schemas/altErr' + description: Unauthorized + "404": + content: + application/json: + example: + statusCode: 404 + name: NotFoundError + message: The resource can't be found or the server has not found anything + matching the Request-URI + schema: + $ref: '#/components/schemas/altErr' + description: Not Found + security: + - OAuth2: + - Manage All + summary: Get Role Users + tags: + - Roles + post: + description: Add Role Users + operationId: addRoleUsers + parameters: + - description: Set to the id of the role you want to return. + explode: false + in: path + name: role_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + description: "Set user_id values in array," + items: + $ref: '#/components/schemas/id' + type: array + required: true + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/createRole_201_response_inner' + type: array + description: OK + "401": + content: + application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication + schema: + $ref: '#/components/schemas/altErr' + description: Unauthorized + "422": + content: + application/json: + example: + statusCode: 422 + name: UnprocessableEntityError + message: invalid value in \"auth_method\" + schema: + $ref: '#/components/schemas/altErr' + description: Unprocessable Entity + security: + - OAuth2: + - Manage All + summary: Add Role Users + tags: + - Roles + /api/2/roles/{role_id}/admins: + delete: + description: Remove Role Admins + operationId: removeRoleAdmins + parameters: + - description: Set to the id of the role you want to return. + explode: false + in: path + name: role_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/removeRoleUsers_request' + required: true + responses: + "204": + description: NO CONTENT + "401": + content: + application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication + schema: + $ref: '#/components/schemas/altErr' + description: Unauthorized + "404": + content: + application/json: + example: + statusCode: 404 + name: NotFoundError + message: The resource can't be found or the server has not found anything + matching the Request-URI + schema: + $ref: '#/components/schemas/altErr' + description: Not Found + security: + - OAuth2: + - Manage All + summary: Remove Role Admins + tags: + - Roles + get: + description: Get Role Admins + operationId: getRoleAdmins + parameters: + - description: Set to the id of the role you want to return. + explode: false + in: path + name: role_id + required: true + schema: + type: string + style: simple + - description: How many items to return at one time (max 100) + explode: true + in: query + name: limit + required: false + schema: + format: int32 + type: integer + style: form + - description: The page number of results to return. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Set to the value extracted from Before-Cursor or After-Cursor + headers to return the previous or next page. + explode: true + in: query + name: cursor + required: false + schema: + type: string + style: form + - description: "Allows you to filter on first name, last name, username, and\ + \ email address." + explode: true + in: query + name: name + required: false + schema: + type: string + style: form + - description: Optional. Defaults to false. Include users that aren’t assigned + to the role. + explode: true + in: query + name: include_unassigned + required: false + schema: + type: boolean + style: form + responses: + "200": + content: + applcation/json: + schema: + items: + $ref: '#/components/schemas/user' + type: array + description: OK + headers: + Current-Page: + $ref: '#/components/headers/Current-Page' + Page-Items: + $ref: '#/components/headers/Page-Items' + Total-Count: + $ref: '#/components/headers/Total-Count' + Total-Pages: + $ref: '#/components/headers/Total-Pages' + Link: + $ref: '#/components/headers/Link' + Before-Cursor: + $ref: '#/components/headers/Before-Cursor' + After-Cursor: + $ref: '#/components/headers/After-Cursor' + "401": + content: + application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication + schema: + $ref: '#/components/schemas/altErr' + description: Unauthorized + "404": + content: + application/json: + example: + statusCode: 404 + name: NotFoundError + message: The resource can't be found or the server has not found anything + matching the Request-URI + schema: + $ref: '#/components/schemas/altErr' + description: Not Found + security: + - OAuth2: + - Manage All + - Read All + - Read Users + summary: Get Role Admins + tags: + - Roles + post: + description: Add Role Admins + operationId: addRoleAdmins + parameters: + - description: Set to the id of the role you want to return. + explode: false + in: path + name: role_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + description: "Set user_id values in array," + items: + $ref: '#/components/schemas/id' + type: array + required: true + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/createRole_201_response_inner' + type: array + description: OK + "401": + content: + application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication + schema: + $ref: '#/components/schemas/altErr' + description: Unauthorized + security: + - OAuth2: + - Manage All + summary: Add Role Admins + tags: + - Roles + /api/2/hooks: + get: + description: List Smart Hooks + operationId: listHooks + parameters: + - description: How many items to return at one time (max 100) + explode: true + in: query + name: limit + required: false + schema: + format: int32 + type: integer + style: form + - description: The page number of results to return. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Set to the value extracted from Before-Cursor or After-Cursor + headers to return the previous or next page. + explode: true + in: query + name: cursor + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/hook' + type: array + description: OK + headers: + Current-Page: + $ref: '#/components/headers/Current-Page' + Page-Items: + $ref: '#/components/headers/Page-Items' + Total-Count: + $ref: '#/components/headers/Total-Count' + Total-Pages: + $ref: '#/components/headers/Total-Pages' + Link: + $ref: '#/components/headers/Link' + Before-Cursor: + $ref: '#/components/headers/Before-Cursor' + After-Cursor: + $ref: '#/components/headers/After-Cursor' + "401": + content: + application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication + schema: + $ref: '#/components/schemas/altErr' + description: Unauthorized + security: + - OAuth2: + - Manage All + summary: List all Smart Hooks + tags: + - Smart Hooks + post: + description: Create Smart Hook + operationId: createHook + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/hook' + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/hook' + description: CREATED + "401": + content: + application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication + schema: + $ref: '#/components/schemas/altErr' + description: Unauthorized + "409": + content: + application/json: + example: + statusCode: 409 + name: UnauthorizedError + message: This request requires Authentication + schema: + $ref: '#/components/schemas/altErr' + description: Conflict + "422": + content: + application/json: + example: + name: UnprocessableEntityError + message: instance additionalProperty \"name\" exists in instance when + not allowed + schema: + $ref: '#/components/schemas/hook_status' + description: You function is not base64 encoded. + security: + - OAuth2: + - Manage All + summary: Create Smart Hook + tags: + - Smart Hooks + /api/2/hooks/{hook_id}: + delete: + description: Delete Smart Hook + operationId: deleteHook + parameters: + - description: Set to the id of the Hook that you want to return. + explode: false + in: path + name: hook_id + required: true + schema: + description: The Hook unique ID in OneLogin. + type: string + style: simple + responses: + "202": + description: Success. The hook function has been queued for deletion. This + typically happens within seconds of making the request. + "401": + content: + application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication + schema: + $ref: '#/components/schemas/altErr' + description: Unauthorized + "404": + content: + application/json: + example: + statusCode: 404 + name: NotFoundError + message: The resource can't be found or the server has not found anything + matching the Request-URI + schema: + $ref: '#/components/schemas/altErr' + description: Not Found + security: + - OAuth2: + - Manage All + - Read All + summary: Delete Smart Hook by ID + tags: + - Smart Hooks + get: + description: Get Smart Hook + operationId: getHook + parameters: + - description: Set to the id of the Hook that you want to return. + explode: false + in: path + name: hook_id + required: true + schema: + description: The Hook unique ID in OneLogin. + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/hook' + description: OK + "401": + content: + application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication + schema: + $ref: '#/components/schemas/altErr' + description: Unauthorized + "404": + content: + application/json: + example: + statusCode: 404 + name: NotFoundError + message: The resource can't be found or the server has not found anything + matching the Request-URI + schema: + $ref: '#/components/schemas/altErr' + description: Not Found + security: + - OAuth2: + - Manage All + summary: Get Smart Hook by ID + tags: + - Smart Hooks + put: + description: Update Smart Hook + operationId: updateHook + parameters: + - description: Set to the id of the Hook that you want to return. + explode: false + in: path + name: hook_id + required: true + schema: + description: The Hook unique ID in OneLogin. + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/hook' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/hook' + description: OK + "401": + content: + application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication + schema: + $ref: '#/components/schemas/altErr' + description: Unauthorized + "422": + content: + application/json: + example: + name: UnprocessableEntityError + message: instance additionalProperty \"name\" exists in instance when + not allowed + schema: + $ref: '#/components/schemas/hook_status' + description: You function is not base64 encoded. + security: + - OAuth2: + - Manage All + summary: Update Smart Hook by ID + tags: + - Smart Hooks + /api/2/hooks/{hook_id}/logs: + get: + description: Get Smart Hook Logs + operationId: getLogs + parameters: + - description: Set to the id of the Hook that you want to return. + explode: false + in: path + name: hook_id + required: true + schema: + description: The Hook unique ID in OneLogin. + type: string + style: simple + - description: How many items to return at one time (max 100) + explode: true + in: query + name: limit + required: false + schema: + format: int32 + type: integer + style: form + - description: The page number of results to return. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Set to the value extracted from Before-Cursor or After-Cursor + headers to return the previous or next page. + explode: true + in: query + name: cursor + required: false + schema: + type: string + style: form + - description: Returns logs that contain this request_id. + explode: true + in: query + name: request_id + required: false + schema: + type: string + style: form + - description: Returns logs that contain this correlation_id. + explode: true + in: query + name: correlation_id + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/hook_log' + type: array + description: OK + headers: + Current-Page: + $ref: '#/components/headers/Current-Page' + Page-Items: + $ref: '#/components/headers/Page-Items' + Total-Count: + $ref: '#/components/headers/Total-Count' + Total-Pages: + $ref: '#/components/headers/Total-Pages' + Link: + $ref: '#/components/headers/Link' + Before-Cursor: + $ref: '#/components/headers/Before-Cursor' + After-Cursor: + $ref: '#/components/headers/After-Cursor' + "401": + content: + application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication + schema: + $ref: '#/components/schemas/altErr' + description: Unauthorized + "404": + content: + application/json: + example: + statusCode: 404 + name: NotFoundError + message: The resource can't be found or the server has not found anything + matching the Request-URI + schema: + $ref: '#/components/schemas/altErr' + description: Not Found + security: + - OAuth2: + - Manage All + summary: Get Smart Hook Logs + tags: + - Smart Hooks + /api/2/hooks/envs: + get: + description: List Environment Variables + operationId: listEnvironmentVariables + parameters: + - description: How many items to return at one time (max 100) + explode: true + in: query + name: limit + required: false + schema: + format: int32 + type: integer + style: form + - description: The page number of results to return. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Set to the value extracted from Before-Cursor or After-Cursor + headers to return the previous or next page. + explode: true + in: query + name: cursor + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/hook_envvar' + type: array + description: OK + headers: + Current-Page: + $ref: '#/components/headers/Current-Page' + Page-Items: + $ref: '#/components/headers/Page-Items' + Total-Count: + $ref: '#/components/headers/Total-Count' + Total-Pages: + $ref: '#/components/headers/Total-Pages' + Link: + $ref: '#/components/headers/Link' + Before-Cursor: + $ref: '#/components/headers/Before-Cursor' + After-Cursor: + $ref: '#/components/headers/After-Cursor' + "401": + content: + application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication + schema: + $ref: '#/components/schemas/altErr' + description: Unauthorized + security: + - OAuth2: + - Manage All + summary: List Environment Variables + tags: + - Smart Hooks + post: + description: Create Environment Variable + operationId: createEnvironmentVariable + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/hook_envvar' + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/hook_envvar' + description: CREATED + "401": + content: + application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication + schema: + $ref: '#/components/schemas/altErr' + description: Unauthorized + "422": + content: + application/json: + example: + statusCode: 422 + name: UnprocessableEntityError + message: invalid value in \"auth_method\" + schema: + $ref: '#/components/schemas/altErr' + description: Unprocessable Entity + security: + - OAuth2: + - Manage All + summary: Create Environment Variable + tags: + - Smart Hooks + /api/2/hooks/envs/{envvar_id}: + delete: + description: Delete Environment Variable + operationId: deleteEnvironmentVariable + parameters: + - description: Set to the id of the Hook Environment Variable that you want + to fetch. + explode: false + in: path + name: envvar_id + required: true + schema: + type: string + style: simple + responses: + "204": + description: Success. The environment variable has been deleted. No content + is returned. + "401": + content: + application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication + schema: + $ref: '#/components/schemas/altErr' + description: Unauthorized + "404": + content: + application/json: + example: + statusCode: 404 + name: NotFoundError + message: The resource can't be found or the server has not found anything + matching the Request-URI + schema: + $ref: '#/components/schemas/altErr' + description: Not Found + security: + - OAuth2: + - Manage All + - Read All + summary: Delete Environment Variable + tags: + - Smart Hooks + get: + description: Get Environment Variable + operationId: getEnvironmentVariable + parameters: + - description: Set to the id of the Hook Environment Variable that you want + to fetch. + explode: false + in: path + name: envvar_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/hook_envvar' + description: OK + "401": + content: + application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication + schema: + $ref: '#/components/schemas/altErr' + description: Unauthorized + security: + - OAuth2: + - Manage All + summary: Get Environment Variable + tags: + - Smart Hooks + put: + description: Update Environment Variable + operationId: updateEnvironmentVariable + parameters: + - description: Set to the id of the Hook Environment Variable that you want + to fetch. + explode: false + in: path + name: envvar_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/updateEnvironmentVariable_request' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/hook_envvar' + description: OK + "400": + content: + application/json: + example: + statusCode: 400 + name: BadRequestError + message: "The request could not be understood by the server due to\ + \ malformed syntax: Statement required Action array" + schema: + $ref: '#/components/schemas/altErr' + description: Bad Request + "401": + content: + application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication + schema: + $ref: '#/components/schemas/altErr' + description: Unauthorized + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/hook_status' + description: Unprocessable Entity + security: + - OAuth2: + - Manage All + summary: Update Environment Variable + tags: + - Smart Hooks + /api/2/users: + get: + description: Get a list of users + operationId: listUsers2 + parameters: + - description: How many items to return at one time (max 100) + explode: true + in: query + name: limit + required: false + schema: + format: int32 + type: integer + style: form + - description: The page number of results to return. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Set to the value extracted from Before-Cursor or After-Cursor + headers to return the previous or next page. + explode: true + in: query + name: cursor + required: false + schema: + type: string + style: form + - description: An ISO8601 timestamp value that returns all users created after + a given date & time. + explode: true + in: query + name: created_since + required: false + schema: + type: string + style: form + - description: An ISO8601 timestamp value that returns all users created before + a given date & time. + explode: true + in: query + name: created_until + required: false + schema: + type: string + style: form + - description: An ISO8601 timestamp value that returns all users updated after + a given date & time. + explode: true + in: query + name: updated_since + required: false + schema: + type: string + style: form + - description: An ISO8601 timestamp value that returns all users updated before + a given date & time. + explode: true + in: query + name: updated_until + required: false + schema: + type: string + style: form + - description: An ISO8601 timestamp value that returns all users that logged + in after a given date & time. + explode: true + in: query + name: last_login_since + required: false + schema: + type: string + style: form + - description: An ISO8601 timestamp value that returns all users that logged + in before a given date & time. + explode: true + in: query + name: last_login_until + required: false + schema: + type: string + style: form + - description: The first name of the user + explode: true + in: query + name: firstname + required: false + schema: + type: string + style: form + - description: The last name of the user + explode: true + in: query + name: lastname + required: false + schema: + type: string + style: form + - description: The email address of the user + explode: true + in: query + name: email + required: false + schema: + type: string + style: form + - description: The username for the user + explode: true + in: query + name: username + required: false + schema: + type: string + style: form + - description: The AD login name for the user + explode: true + in: query + name: samaccountname + required: false + schema: + type: string + style: form + - explode: true + in: query + name: directory_id + required: false + schema: + type: integer + style: form + - description: An external identifier that has been set on the user + explode: true + in: query + name: external_id + required: false + schema: + type: string + style: form + - description: A comma separated list of OneLogin User IDs + explode: true + in: query + name: user_ids + required: false + schema: + type: string + style: form + - description: The short name of a custom attribute. Note that the attribute + name is prefixed with custom_attributes. + explode: true + in: query + name: "custom_attributes.{attribute_name}" + required: false + schema: + type: string + style: form + - description: Optional. Comma delimited list of fields to return. + explode: true + in: query + name: fields + required: false + schema: + enum: + - apps + - users + - admins + type: string + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/user' + type: array + description: OK + "400": + content: + application/json: + example: + error: true + code: 400 + type: bad request + message: Request Failure + schema: + $ref: '#/components/schemas/Error' + description: Bad Request + "401": + content: + application/json: + example: + error: true + code: 401 + type: Unauthorized + message: Unauthorized Error + schema: + $ref: '#/components/schemas/Error' + description: Unauthorized + "422": + content: + application/json: + example: + error: true + code: 422 + type: UnprocessableEntityError + message: "Validation failed: Value has already been taken" + schema: + $ref: '#/components/schemas/Error' + description: Unprocessable + security: + - OAuth2: + - Manage users + - Manage All + - Read All + - Read Users + summary: List Users + tags: + - Users V2 + post: + description: Create User + operationId: createUser2 + parameters: + - description: Controls how mappings will be applied to the user on creation. + Defaults to async. + explode: true + in: query + name: mappings + required: false + schema: + enum: + - async + - sync + - disabled + type: string + style: form + - description: Will passwords validate against the User Policy? Defaults to + true. + explode: true + in: query + name: validate_policy + required: false + schema: + type: boolean + style: form + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/user' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/user' + description: The full user resource is returned + "400": + content: + application/json: + example: + error: true + code: 400 + type: bad request + message: Request Failure + schema: + $ref: '#/components/schemas/Error' + description: Bad Request + "401": + content: + application/json: + example: + error: true + code: 401 + type: Unauthorized + message: Unauthorized Error + schema: + $ref: '#/components/schemas/Error' + description: Unauthorized + "422": + content: + application/json: + example: + error: true + code: 422 + type: UnprocessableEntityError + message: "Validation failed: Value has already been taken" + schema: + $ref: '#/components/schemas/Error' + description: Unprocessable + summary: Create User + tags: + - Users V2 + /api/2/users/{user_id}: + delete: + description: Delete User + operationId: deleteUser2 + parameters: + - description: Set to the id of the user that you want to return. + explode: false + in: path + name: user_id + required: true + schema: + $ref: '#/components/schemas/id' + style: simple + responses: + "204": + description: "On success, no content is returned in the response body." + "401": + content: + application/json: + example: + error: true + code: 401 + type: Unauthorized + message: Unauthorized Error + schema: + $ref: '#/components/schemas/Error' + description: Unauthorized + "404": + content: + application/json: + example: + error: true + code: 404 + type: Not Found + message: No Route Exists + schema: + $ref: '#/components/schemas/Error' + description: Not Found + security: + - OAuth2: + - Manage users + - Manage All + summary: Delete User + tags: + - Users V2 + get: + description: Get User + operationId: getUser2 + parameters: + - description: Set to the id of the user that you want to return. + explode: false + in: path + name: user_id + required: true + schema: + $ref: '#/components/schemas/id' + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/user' + description: OK + "400": + content: + application/json: + example: + error: true + code: 400 + type: bad request + message: Request Failure + schema: + $ref: '#/components/schemas/Error' + description: Bad Request + "404": + content: + application/json: + example: + error: true + code: 404 + type: Not Found + message: No Route Exists + schema: + $ref: '#/components/schemas/Error' + description: Not Found + security: + - OAuth2: + - Manage users + - Manage All + - Read All + - Read Users + summary: Get User + tags: + - Users V2 + put: + description: Update User + operationId: updateUser2 + parameters: + - description: Set to the id of the user that you want to return. + explode: false + in: path + name: user_id + required: true + schema: + $ref: '#/components/schemas/id' + style: simple + - description: Controls how mappings will be applied to the user on creation. + Defaults to async. + explode: true + in: query + name: mappings + required: false + schema: + enum: + - async + - sync + - disabled + type: string + style: form + - description: Will passwords validate against the User Policy? Defaults to + true. + explode: true + in: query + name: validate_policy + required: false + schema: + type: boolean + style: form + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/user' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/user' + description: The full user resource is returned + "400": + content: + application/json: + example: + error: true + code: 400 + type: bad request + message: Request Failure + schema: + $ref: '#/components/schemas/Error' + description: Bad Request + "401": + content: + application/json: + example: + error: true + code: 401 + type: Unauthorized + message: Unauthorized Error + schema: + $ref: '#/components/schemas/Error' + description: Unauthorized + "404": + content: + application/json: + example: + error: true + code: 404 + type: Not Found + message: No Route Exists + schema: + $ref: '#/components/schemas/Error' + description: Not Found + "422": + content: + application/json: + example: + error: true + code: 422 + type: UnprocessableEntityError + message: "Validation failed: Value has already been taken" + schema: + $ref: '#/components/schemas/Error' + description: Unprocessable + summary: Update User + tags: + - Users V2 + /api/2/users/{user_id}/apps: + get: + description: Get User Apps + operationId: getUserApps2 + parameters: + - description: Set to the id of the user that you want to return. + explode: false + in: path + name: user_id + required: true + schema: + $ref: '#/components/schemas/id' + style: simple + - description: Defaults to `false`. When `true` will show all apps that are + assigned to a user regardless of their portal visibility setting. + explode: true + in: query + name: ignore_visibility + required: false + schema: + default: false + type: boolean + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/getUserApps_200_response_inner' + type: array + description: OK + "401": + content: + application/json: + example: + error: true + code: 401 + type: Unauthorized + message: Unauthorized Error + schema: + $ref: '#/components/schemas/Error' + description: Unauthorized + "404": + content: + application/json: + example: + error: true + code: 404 + type: Not Found + message: No Route Exists + schema: + $ref: '#/components/schemas/Error' + description: Not Found + security: + - OAuth2: + - Manage users + - Manage All + - Read All + - Read Users + summary: Get User Apps + tags: + - Users V2 + /api/2/branding/brands: + get: + description: List Account Brands + operationId: listBrands + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/brand_req' + type: array + description: Successful response + security: + - OAuth2: + - Manage All + summary: List Account Brands + tags: + - Branding Service + post: + description: Create a new Account Brand + operationId: createBrand + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/brand' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/brand' + description: Created + "401": + content: + application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication + schema: + $ref: '#/components/schemas/altErr' + description: Unauthorized + "422": + content: + application/json: + example: + statusCode: 422 + name: UnprocessableEntityError + message: invalid value in \"auth_method\" + schema: + $ref: '#/components/schemas/altErr' + description: Unprocessable Entity + security: + - OAuth2: + - Manage All + summary: Create Brand + tags: + - Branding Service + /api/2/branding/brands/{brand_id}: + delete: + description: Delete Brand + operationId: deleteBrand + parameters: + - description: Unique identifier for the branding object. + explode: false + in: path + name: brand_id + required: true + schema: + example: 9 + type: integer + style: simple + responses: + "204": + description: No Content + "401": + content: + application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication + schema: + $ref: '#/components/schemas/altErr' + description: Unauthorized + "404": + content: + application/json: + example: + statusCode: 404 + name: NotFoundError + message: The resource can't be found or the server has not found anything + matching the Request-URI + schema: + $ref: '#/components/schemas/altErr' + description: Not Found + security: + - OAuth2: + - Manage All + summary: Delete Brand + tags: + - Branding Service + get: + description: Retrieve a single brand via ID + operationId: getBrand + parameters: + - description: Unique identifier for the branding object. + explode: false + in: path + name: brand_id + required: true + schema: + example: 9 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/brand' + description: Successful response + "401": + content: + application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication + schema: + $ref: '#/components/schemas/altErr' + description: Unauthorized + "404": + content: + application/json: + example: + statusCode: 404 + name: NotFoundError + message: The resource can't be found or the server has not found anything + matching the Request-URI + schema: + $ref: '#/components/schemas/altErr' + description: Not Found + security: + - OAuth2: + - Manage All + summary: Get Brand + tags: + - Branding Service + put: + description: Update Account Brand + operationId: updateBrand + parameters: + - description: Unique identifier for the branding object. + explode: false + in: path + name: brand_id + required: true + schema: + example: 9 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/request_brand' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/brand' + description: Created + "401": + content: + application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication + schema: + $ref: '#/components/schemas/altErr' + description: Unauthorized + "422": + content: + application/json: + example: + statusCode: 422 + name: UnprocessableEntityError + message: invalid value in \"auth_method\" + schema: + $ref: '#/components/schemas/altErr' + description: Unprocessable Entity + security: + - OAuth2: + - Manage All + summary: Update Brand + tags: + - Branding Service + /api/2/branding/brands/{brand_id}/templates: + get: + description: List Message Templates + operationId: listMessageTemplates + parameters: + - description: Unique identifier for the branding object. + explode: false + in: path + name: brand_id + required: true + schema: + example: 9 + type: integer + style: simple + - description: "The 2 character language locale for the template. e.g. en =\ + \ English, es = Spanish" + explode: true + in: query + name: locale + required: false + schema: + example: en + pattern: "^[a-z]{2}$" + type: string + style: form + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/listMessageTemplates_200_response_inner' + type: array + description: Successful response + "401": + content: + application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication + schema: + $ref: '#/components/schemas/altErr' + description: Unauthorized + "422": + content: + application/json: + example: + statusCode: 422 + name: UnprocessableEntityError + message: invalid value in \"auth_method\" + schema: + $ref: '#/components/schemas/altErr' + description: Unprocessable Entity + security: + - OAuth2: + - Manage All + summary: List Message Templates + tags: + - "Branding Service: Templates" + post: + description: Create Message Template + operationId: createMessageTemplate + parameters: + - description: Unique identifier for the branding object. + explode: false + in: path + name: brand_id + required: true + schema: + example: 9 + type: integer + style: simple + - description: "The 2 character language locale for the template. e.g. en =\ + \ English, es = Spanish" + explode: true + in: query + name: locale + required: false + schema: + example: en + pattern: "^[a-z]{2}$" + type: string + style: form + requestBody: + content: + application/json: + example: + type: email_forgot_password + locale: es + template: + subject: Password Reset + html: "

Please update your password by\ + \ clicking this link

" + plain: "Please update your password by visiting this url: {{url}}" + schema: + $ref: '#/components/schemas/message_template' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/message_template' + description: Successful response + "401": + content: + application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication + schema: + $ref: '#/components/schemas/altErr' + description: Unauthorized + "422": + content: + application/json: + example: + statusCode: 422 + name: UnprocessableEntityError + message: invalid value in \"auth_method\" + schema: + $ref: '#/components/schemas/altErr' + description: Unprocessable Entity + security: + - OAuth2: + - Manage All + summary: Create Message Template + tags: + - "Branding Service: Templates" + /api/2/branding/brands/{brand_id}/templates/{template_id}: + delete: + description: Delete Message Template + operationId: deleteMessageTemplate + parameters: + - description: Unique identifier for the branding object. + explode: false + in: path + name: brand_id + required: true + schema: + example: 9 + type: integer + style: simple + - description: Unique identifier for the template to return. + explode: false + in: path + name: template_id + required: true + schema: + example: 25 + type: integer + style: simple + responses: + "204": + description: No Content + "404": + content: + application/json: + example: + statusCode: 404 + name: NotFoundError + message: The resource can't be found or the server has not found anything + matching the Request-URI + schema: + $ref: '#/components/schemas/altErr' + description: Not Found + security: + - OAuth2: + - Manage All + summary: Delete Message Template + tags: + - "Branding Service: Templates" + get: + description: Get Message Template by ID + operationId: getMessageTemplateById + parameters: + - description: Unique identifier for the branding object. + explode: false + in: path + name: brand_id + required: true + schema: + example: 9 + type: integer + style: simple + - description: Unique identifier for the template to return. + explode: false + in: path + name: template_id + required: true + schema: + example: 25 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/message_template' + description: Successful response + "401": + content: + application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication + schema: + $ref: '#/components/schemas/altErr' + description: Unauthorized + "404": + content: + application/json: + example: + statusCode: 404 + name: NotFoundError + message: The resource can't be found or the server has not found anything + matching the Request-URI + schema: + $ref: '#/components/schemas/altErr' + description: Not Found + security: + - OAuth2: + - Manage All + summary: Get Message Template + tags: + - "Branding Service: Templates" + put: + description: Update Message Template by ID + operationId: updateMessageTemplateById + parameters: + - description: Unique identifier for the branding object. + explode: false + in: path + name: brand_id + required: true + schema: + example: 9 + type: integer + style: simple + - description: Unique identifier for the template to return. + explode: false + in: path + name: template_id + required: true + schema: + example: 25 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/message_template' + description: Successful response + "401": + content: + application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication + schema: + $ref: '#/components/schemas/altErr' + description: Unauthorized + "422": + content: + application/json: + example: + statusCode: 422 + name: UnprocessableEntityError + message: invalid value in \"auth_method\" + schema: + $ref: '#/components/schemas/altErr' + description: Unprocessable Entity + security: + - OAuth2: + - Manage All + summary: Update Message Template + tags: + - "Branding Service: Templates" + /api/2/branding/brands/{brand_id}/apps: + get: + description: Get Apps Associated with Account Brand + operationId: getBrandApps + parameters: + - description: Unique identifier for the branding object. + explode: false + in: path + name: brand_id + required: true + schema: + example: 9 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/brand_app' + type: array + description: Successful response + "401": + content: + application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication + schema: + $ref: '#/components/schemas/altErr' + description: Unauthorized + "404": + content: + application/json: + example: + statusCode: 404 + name: NotFoundError + message: The resource can't be found or the server has not found anything + matching the Request-URI + schema: + $ref: '#/components/schemas/altErr' + description: Not Found + security: + - OAuth2: + - Manage All + summary: Get Brand Apps + tags: + - Branding Service + /api/2/branding/email_settings: + delete: + description: Reset Email Setting config + operationId: deleteEmailSettings + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/altErr' + description: Successful response + "401": + content: + application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication + schema: + $ref: '#/components/schemas/altErr' + description: Unauthorized + security: + - OAuth2: + - Manage All + summary: Delete Custom Email Settings + tags: + - "Branding Service: SMTP" + get: + description: Get Email Settings Config + operationId: getEmailSettings + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/getEmailSettings_200_response' + description: Successful response + "401": + content: + application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication + schema: + $ref: '#/components/schemas/altErr' + description: Unauthorized + security: + - OAuth2: + - Manage All + - Read All + summary: Get Email Settings + tags: + - "Branding Service: SMTP" + put: + description: Update Email Settings Config + operationId: updateEmailSettings + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/email_config' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/altErr' + description: Successful response + "401": + content: + application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication + schema: + $ref: '#/components/schemas/altErr' + description: Unauthorized + "422": + content: + application/json: + example: + statusCode: 422 + name: UnprocessableEntityError + message: invalid value in \"auth_method\" + schema: + $ref: '#/components/schemas/altErr' + description: Unprocessable Entity + security: + - OAuth2: + - Manage All + summary: Update Email Settings + tags: + - "Branding Service: SMTP" + /api/2/branding/brands/{brand_id}/templates/{template_type}/{locale}: + get: + description: Get Template by Type and Locale + operationId: getTemplateByLocale + parameters: + - description: Unique identifier for the branding object. + explode: false + in: path + name: brand_id + required: true + schema: + example: 9 + type: integer + style: simple + - description: The message template type to return. + explode: false + in: path + name: template_type + required: true + schema: + example: email_template + type: string + style: simple + - description: "The 2 character language locale for the template. e.g. en =\ + \ English, es = Spanish" + explode: false + in: path + name: locale + required: true + schema: + example: en + pattern: "^[a-z]{2}$" + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/message_template' + description: Successful response + "401": + content: + application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication + schema: + $ref: '#/components/schemas/altErr' + description: Unauthorized + "404": + content: + application/json: + example: + statusCode: 404 + name: NotFoundError + message: The resource can't be found or the server has not found anything + matching the Request-URI + schema: + $ref: '#/components/schemas/altErr' + description: Not Found + security: + - OAuth2: + - Manage All + summary: Get Template by Type & Locale + tags: + - "Branding Service: Templates" + put: + description: Update Template by Type and Locale + operationId: updateTemplateByLocale + parameters: + - description: Unique identifier for the branding object. + explode: false + in: path + name: brand_id + required: true + schema: + example: 9 + type: integer + style: simple + - description: The message template type to return. + explode: false + in: path + name: template_type + required: true + schema: + example: email_template + type: string + style: simple + - description: "The 2 character language locale for the template. e.g. en =\ + \ English, es = Spanish" + explode: false + in: path + name: locale + required: true + schema: + example: en + pattern: "^[a-z]{2}$" + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/message_template' + description: Successful response + "401": + content: + application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication + schema: + $ref: '#/components/schemas/altErr' + description: Unauthorized + "404": + content: + application/json: + example: + statusCode: 404 + name: NotFoundError + message: The resource can't be found or the server has not found anything + matching the Request-URI + schema: + $ref: '#/components/schemas/altErr' + description: Not Found + security: + - OAuth2: + - Manage All + summary: Update Template by Type & Locale + tags: + - "Branding Service: Templates" + /api/2/branding/brands/master/templates/{template_type}: + get: + description: Get Master Template by Type + operationId: getMasterByType + parameters: + - description: The message template type to return. + explode: false + in: path + name: template_type + required: true + schema: + example: email_template + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/message_template' + description: Successful response + "401": + content: + application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication + schema: + $ref: '#/components/schemas/altErr' + description: Unauthorized + "404": + content: + application/json: + example: + statusCode: 404 + name: NotFoundError + message: The resource can't be found or the server has not found anything + matching the Request-URI + schema: + $ref: '#/components/schemas/altErr' + description: Not Found + security: + - OAuth2: + - Manage All + summary: Get Master Template by Type + tags: + - "Branding Service: Templates" +components: + headers: Current-Page: description: The index number of the current page being returned. + explode: false + schema: + type: integer + style: simple + Page-Items: + description: The number of items returned in the response. + explode: false + schema: + type: integer + style: simple + Total-Count: + description: The total number of items across all pages. + explode: false + schema: + type: integer + style: simple + Total-Pages: + description: The total number of pages to return all results. + explode: false + schema: + type: integer + style: simple + Link: + description: "A set of urls which contains premade links for first, next" + explode: false + schema: + items: + type: string + type: array + style: simple + Before-Cursor: + description: A string that can be used to request the page of results that preceed + the current page using the same set of search filters and pagination options. + explode: false + schema: + type: string + style: simple + After-Cursor: + description: A string that can be used to request the page of results that follows + the current page using the same set of search filters and pagination options. + explode: false + schema: + type: string + style: simple + parameters: + api_auth_id: + explode: false + in: path + name: api_auth_id + required: true + schema: + type: string + style: simple + app_id: + explode: false + in: path + name: app_id + required: true + schema: + type: integer + style: simple + auth_method: + explode: true + in: query + name: auth_method + required: false + schema: + $ref: '#/components/schemas/auth_method' + style: form + claim_id: + explode: false + in: path + name: claim_id + required: true + schema: + type: integer + style: simple + client_app_id: + explode: false + in: path + name: client_app_id + required: true + schema: + type: integer + style: simple + client_id: + explode: true + in: query + name: client_id + required: false + schema: + type: integer + style: form + connector_id: + description: Returns all apps based off a specific connector. See List Connectors + for a complete list of Connector IDs. + explode: true + in: query + name: connector_id + required: false + schema: + type: integer + style: form + content-type: + example: application/json + explode: false + in: header + name: Content-Type + required: false + schema: + default: application/json + type: string + style: simple + created_at: + explode: true + in: query + name: created_at + required: false + schema: + type: string + style: form + cursor: + description: Set to the value extracted from Before-Cursor or After-Cursor headers + to return the previous or next page. + explode: true + in: query + name: cursor + required: false + schema: + type: string + style: form + device_id: + explode: false + in: path + name: device_id + required: true + schema: + type: string + style: simple + directory_id: + explode: true + in: query + name: directory_id + required: false + schema: + type: integer + style: form + event_id: + explode: false + in: path + name: event_id + required: true + schema: + type: integer + style: simple + event_type_id: + explode: true + in: query + name: event_type_id + required: false + schema: + items: + type: integer + type: array + style: form + group_id: + explode: false + in: path + name: group_id + required: true + schema: + type: string + style: simple + has_condition: + description: |- + Filters Rules based on their Conditions. Values formatted as :, where name is the Condition to look for, and value is the value to find. Multiple filters can be declared by using a comma delimited list. Wildcards are supported in both the name and value fields. + For example: + Single filter. has_condition=has_role:123456 + Multiple filters. has_condition=has_role:123456,status:1 + Wildcard for conditions. has_condition=*:123456 + Wildcard for condition values. has_condition=has_role:* + example: has_condition=has_role:123456 + explode: true + in: query + name: has_condition + required: false + schema: + type: string + style: form + kid: + example: ZoKMCcDDtLHKYPyZnXSDKTMmknGltey7M09CQy3RCIE + explode: false + in: path + name: kid + required: true + schema: + description: The unique identifier for the key to fetch. You can get a list + of keys and kids values via the List Signing Keys endpoint. + type: string + style: simple + limit: + description: How many items to return at one time (max 100) + explode: true + in: query + name: limit + required: false + schema: + format: int32 + type: integer + style: form + mapping_action_value: + explode: false + in: path + name: mapping_action_value + required: true + schema: + type: string + style: simple + mapping_condition_value: + explode: false + in: path + name: mapping_condition_value + required: true + schema: + type: string + style: simple + mapping_id: + description: The id of the user mapping to locate. + explode: false + in: path + name: mapping_id + required: true + schema: + type: integer + style: simple + name: + explode: true + in: query + name: name + required: false + schema: + type: string + style: form + page: + description: The page number of results to return. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + parameter_id: + explode: false + in: path + name: parameter_id + required: true + schema: + type: string + style: simple + privilege_id: + explode: false + in: path + name: privilege_id + required: true + schema: + type: string + style: simple + redirect_uri: + example: https://app.example.com/auth + explode: true + in: query + name: redirect_uri + required: false + schema: + description: The redirect uri that is registered with OneLogin for this OpenId + Connect app. + type: string + style: form + resolution: + explode: true + in: query + name: resolution + required: false + schema: + type: string + style: form + role_id: + description: Set to the id of the role you want to return. + explode: false + in: path + name: role_id + required: true + schema: + type: string + style: simple + rule_action_value: + explode: false + in: path + name: rule_action_value + required: true + schema: + type: string + style: simple + rule_condition_value: + explode: false + in: path + name: rule_condition_value + required: true + schema: + type: string + style: simple + rule_id: + explode: false + in: path + name: rule_id + required: true + schema: + type: string + style: simple + scope_id: + explode: false + in: path + name: scope_id + required: true + schema: + type: integer + style: simple + since: + explode: true + in: query + name: since + required: false + schema: + type: string + style: form + until: + explode: true + in: query + name: until + required: false + schema: + type: string + style: form + user_id: + description: Set to the id of the user that you want to return. + explode: false + in: path + name: user_id + required: true + schema: + $ref: '#/components/schemas/id' + style: simple + has_condition_type: + description: |- + Filters Rules based on their Conditions. Values formatted as :, where name is the Condition to look for, and value is the value to find. Multiple filters can be declared by using a comma delimited list. Wildcards are supported in both the name and value fields. + For example: + Single filter. has_condition=has_role:123456 + Multiple filters. has_condition=has_role:123456,status:1 + Wildcard for conditions. has_condition=*:123456 + Wildcard for condition values. has_condition=has_role:* + explode: true + in: query + name: has_condition_type + required: false + schema: + enum: + - builtin + - custom + - none + type: string + style: form + has_action: + description: |- + Filters Rules based on their Actions. Values formatted as :, where name is the Action to look for, and value is the value to find. Multiple filters can be declared by using a comma delimited list. Wildcards are supported in both the name and value fields. + For example: + Single filter. has_action=set_licenses:123456 + Multiple filters. has_action=set_groups:123456,set_usertype:* + Wildcard for actions. has_action=*:123456 + Wildcard for action values. has_action=set_userprincipalname:* + example: "has_action=set_groups:123456,set_usertype:*" + explode: true + in: query + name: has_action + required: false + schema: + type: string + style: form + has_action_type: + description: |- + Filters Rules based on their action types. + Allowed values are: + builtin - actions that involve standard attributes custom - actions that involve custom attributes none - no actions are defined For example: + Find Rules with no actions has_action_type=none + explode: true + in: query + name: has_action_type + required: false + schema: + enum: + - builtin + - custom + - none + type: string + style: form + enabled: + description: Defaults to true. When set to `false` will return all disabled + mappings. + explode: true + in: query + name: enabled + required: false + schema: + default: true + type: boolean + style: form + registration_id: + description: The id of a registration + example: + explode: false + in: path + name: registration_id + required: true + schema: + type: string + style: simple + verification_id: + description: The verification_id is returned on activation of the factor or + you can get the device_id using the Activate Factor API call. + example: + explode: false + in: path + name: verification_id + required: true schema: - type: integer - Page-Items: - description: The number of items returned in the response. + type: string + style: simple + brand_id: + description: Unique identifier for the branding object. + explode: false + in: path + name: brand_id + required: true schema: + example: 9 type: integer - Total-Count: - description: The total number of items across all pages. + style: simple + template_id: + description: Unique identifier for the template to return. + explode: false + in: path + name: template_id + required: true schema: + example: 25 type: integer - Total-Pages: - description: The total number of pages to return all results. + style: simple + template_type: + description: The message template type to return. + explode: false + in: path + name: template_type + required: true + schema: + example: email_template + type: string + style: simple + locale: + description: "The 2 character language locale for the template. e.g. en = English,\ + \ es = Spanish" + explode: false + in: path + name: locale + required: true + schema: + example: en + pattern: "^[a-z]{2}$" + type: string + style: simple + mappings: + description: Controls how mappings will be applied to the user on creation. + Defaults to async. + explode: true + in: query + name: mappings + required: false + schema: + enum: + - async + - sync + - disabled + type: string + style: form + validate_policy: + description: Will passwords validate against the User Policy? Defaults to true. + explode: true + in: query + name: validate_policy + required: false + schema: + type: boolean + style: form + ignore_visibility: + description: Defaults to `false`. When `true` will show all apps that are assigned + to a user regardless of their portal visibility setting. + explode: true + in: query + name: ignore_visibility + required: false + schema: + default: false + type: boolean + style: form + created_since: + description: An ISO8601 timestamp value that returns all users created after + a given date & time. + explode: true + in: query + name: created_since + required: false + schema: + type: string + style: form + created_until: + description: An ISO8601 timestamp value that returns all users created before + a given date & time. + explode: true + in: query + name: created_until + required: false + schema: + type: string + style: form + updated_since: + description: An ISO8601 timestamp value that returns all users updated after + a given date & time. + explode: true + in: query + name: updated_since + required: false + schema: + type: string + style: form + updated_until: + description: An ISO8601 timestamp value that returns all users updated before + a given date & time. + explode: true + in: query + name: updated_until + required: false + schema: + type: string + style: form + last_login_since: + description: An ISO8601 timestamp value that returns all users that logged in + after a given date & time. + explode: true + in: query + name: last_login_since + required: false + schema: + type: string + style: form + last_login_until: + description: An ISO8601 timestamp value that returns all users that logged in + before a given date & time. + explode: true + in: query + name: last_login_until + required: false + schema: + type: string + style: form + firstname: + description: The first name of the user + explode: true + in: query + name: firstname + required: false + schema: + type: string + style: form + lastname: + description: The last name of the user + explode: true + in: query + name: lastname + required: false + schema: + type: string + style: form + email: + description: The email address of the user + explode: true + in: query + name: email + required: false + schema: + type: string + style: form + username: + description: The username for the user + explode: true + in: query + name: username + required: false + schema: + type: string + style: form + samaccountname: + description: The AD login name for the user + explode: true + in: query + name: samaccountname + required: false + schema: + type: string + style: form + external_id: + description: An external identifier that has been set on the user + explode: true + in: query + name: external_id + required: false + schema: + type: string + style: form + user_ids: + description: A comma separated list of OneLogin User IDs + explode: true + in: query + name: user_ids + required: false + schema: + type: string + style: form + custom_attributes: + description: The short name of a custom attribute. Note that the attribute name + is prefixed with custom_attributes. + explode: true + in: query + name: "custom_attributes.{attribute_name}" + required: false + schema: + type: string + style: form + fields: + description: Optional. Comma delimited list of fields to return. + explode: true + in: query + name: fields + required: false + schema: + enum: + - apps + - users + - admins + type: string + style: form + user_id_query: + description: Set to the id of the user that you want to return. + explode: true + in: query + name: user_id + required: false + schema: + $ref: '#/components/schemas/id' + style: form + id_query: + explode: true + in: query + name: id + required: false + schema: + $ref: '#/components/schemas/id' + style: form + locale_query: + description: "The 2 character language locale for the template. e.g. en = English,\ + \ es = Spanish" + explode: true + in: query + name: locale + required: false + schema: + example: en + pattern: "^[a-z]{2}$" + type: string + style: form + app_name: + description: Optional. Returns roles that contain this app name. + explode: true + in: query + name: app_name + required: false + schema: + type: string + style: form + role_name: + description: Optional. Filters by role name. + explode: true + in: query + name: role_name + required: false + schema: + type: string + style: form + assigned: + description: Optional. Defaults to true. Returns all apps not yet assigned to + the role. + explode: true + in: query + name: assigned + required: false + schema: + type: boolean + style: form + include_unassigned: + description: Optional. Defaults to false. Include users that aren’t assigned + to the role. + explode: true + in: query + name: include_unassigned + required: false + schema: + type: boolean + style: form + user_name: + description: "Allows you to filter on first name, last name, username, and email\ + \ address." + explode: true + in: query + name: name + required: false + schema: + type: string + style: form + app_id_query: + explode: true + in: query + name: app_id + required: true schema: type: integer - Link: - description: "A set of urls which contains premade links for first, next" + style: form + after: + description: Optional ISO8601 formatted date string. Defaults to 30 days ago. + Maximum date is 90 days ago. + explode: true + in: query + name: after + required: false schema: - items: + type: string + style: form + before: + description: Optional ISO8601 formatted date string. Defaults to current date. + Maximum date is 90 days ago. + explode: true + in: query + name: before + required: false + schema: + type: string + style: form + hook_id_path: + description: Set to the id of the Hook that you want to return. + explode: false + in: path + name: hook_id + required: true + schema: + description: The Hook unique ID in OneLogin. + type: string + style: simple + envvar_id_path: + description: Set to the id of the Hook Environment Variable that you want to + fetch. + explode: false + in: path + name: envvar_id + required: true + schema: + type: string + style: simple + request_id_query: + description: Returns logs that contain this request_id. + explode: true + in: query + name: request_id + required: false + schema: + type: string + style: form + correlation_id_query: + description: Returns logs that contain this correlation_id. + explode: true + in: query + name: correlation_id + required: false + schema: + type: string + style: form + responses: + "400": + content: + application/json: + example: + statusCode: 400 + name: BadRequestError + message: "The request could not be understood by the server due to malformed\ + \ syntax: Statement required Action array" + schema: + $ref: '#/components/schemas/altErr' + description: Bad Request + "401": + content: + application/json: + example: + statusCode: 401 + name: UnauthorizedError + message: This request requires Authentication + schema: + $ref: '#/components/schemas/altErr' + description: Unauthorized + "403": + content: + application/json: + example: + statusCode: 403 + name: ForbiddenError + message: Not allowed to destroy specified resource + schema: + $ref: '#/components/schemas/altErr' + description: Forbidden + "404": + content: + application/json: + example: + statusCode: 404 + name: NotFoundError + message: The resource can't be found or the server has not found anything + matching the Request-URI + schema: + $ref: '#/components/schemas/altErr' + description: Not Found + "422": + content: + application/json: + example: + statusCode: 422 + name: UnprocessableEntityError + message: invalid value in \"auth_method\" + schema: + $ref: '#/components/schemas/altErr' + description: Unprocessable Entity + BadRequest: + content: + application/json: + example: + error: true + code: 400 + type: bad request + message: Request Failure + schema: + $ref: '#/components/schemas/Error' + description: Bad Request + Forbidden: + content: + application/json: + example: + error: true + code: 403 + type: ForbiddenError + message: not allowed + schema: + $ref: '#/components/schemas/Error' + description: Forbidden + NotFound: + content: + application/json: + example: + error: true + code: 404 + type: Not Found + message: No Route Exists + schema: + $ref: '#/components/schemas/Error' + description: Not Found + Unauthorized: + content: + application/json: + example: + error: true + code: 401 + type: Unauthorized + message: Unauthorized Error + schema: + $ref: '#/components/schemas/Error' + description: Unauthorized + Unprocessable: + content: + application/json: + example: + error: true + code: 422 + type: UnprocessableEntityError + message: "Validation failed: Value has already been taken" + schema: + $ref: '#/components/schemas/Error' + description: Unprocessable + schemas: + Error: + example: + code: 200 + error: false + type: Success + message: Success + properties: + error: + example: false + type: boolean + code: + example: 200 + type: integer + type: + example: Success + type: string + message: + example: Success + type: string + required: + - code + - message + type: object + action_obj: + example: + action: action + value: + - "2" + - "2" + properties: + action: + description: The action to apply + type: string + value: + description: Only applicable to provisioned and set_* actions. Items in + the array will be a plain text string or valid value for the selected + action. + items: + example: "2" + type: string + type: array + type: object + altErr: + example: + name: Success + message: Settings Updated + statusCode: 200 + properties: + statusCode: + description: HTTP error code https://developer.mozilla.org/en-US/docs/Web/HTTP/Status + example: 200 + type: integer + name: + description: Error Code Name + example: Success + type: string + message: + description: Description of Error + example: Settings Updated + type: string + type: object + app_parameters: + additionalProperties: true + description: |- + The parameters section contains parameterized attributes that have defined at the connector level as well as custom attributes that have been defined specifically for this app. Regardless of how they are defined, all parameters have the following attributes. + Each parameter is an object with the key for the object being set as the parameters short name. + example: + include_in_saml_assertion: true + user_attribute_macros: user_attribute_macros + user_attribute_mappings: user_attribute_mappings + label: label + properties: + user_attribute_mappings: + description: A user attribute to map values from For custom attributes prefix + the name of the attribute with `custom_attribute_`. e.g. To get the value + for custom attribute `employee_id` use `custom_attribute_employee_id`. + type: string + user_attribute_macros: + description: When `user_attribute_mappings` is set to `_macro_` this macro + will be used to assign the parameter value. + type: string + label: + description: The can only be set when creating a new parameter. It can not + be updated. + type: string + include_in_saml_assertion: + description: "When true, this parameter will be included in a SAML assertion\ + \ payload." + example: true + type: boolean + type: object + auth_claim: + properties: + name: + description: The attribute name for the claim when its returned in an Access + Token + example: email_address + type: string + user_attribute_mappings: + description: A user attribute to map values from For custom attributes prefix + the name of the attribute with `custom_attribute_`. e.g. To get the value + for custom attribute `employee_id` use `custom_attribute_employee_id`. + example: email + type: string + user_attribute_macros: + description: When `user_attribute_mappings` is set to `_macro_` this macro + will be used to assign the parameter value. + type: string + required: + - name + type: object + auth_id: + example: + id: 323005 + properties: + id: + description: Unique ID for the Scope + example: 323005 + type: integer + type: object + auth_method: + description: |- + An ID indicating the type of app: + - 0: Password + - 1: OpenId + - 2: SAML + - 3: API + - 4: Google + - 6: Forms Based App + - 7: WSFED + - 8: OpenId Connect + enum: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + example: 8 + type: integer + auth_scope: + example: + description: A custom scope + id: 323005 + value: custom:scope + properties: + id: + description: Unique ID for the Scope + example: 323005 + readOnly: true + type: integer + value: + description: A value representing the api scope that with be authorized + example: custom:scope + type: string + description: + description: A description of what access the scope enables + example: A custom scope + type: string + type: object + auth_server: + description: base resource for configuring api authorization in OneLogin + example: + configuration: + access_token_expiration_minutes: 20 + resource_identifier: https://example.com/contacts + audiences: + - audiences + - audiences + refresh_token_expiration_minutes: 30 + name: Contacts API + description: API manages contacts + id: 1022697 + properties: + id: + description: Auth server unique ID in Onelogin + example: 1022697 + readOnly: true + type: integer + name: + description: Name of the API. + example: Contacts API + type: string + description: + description: Description of what the API does. + example: API manages contacts + type: string + configuration: + $ref: '#/components/schemas/auth_server_configuration' + required: + - configuration + - description + - name + type: object + auth_server_configuration: + description: Authorization server configuration + example: + access_token_expiration_minutes: 20 + resource_identifier: https://example.com/contacts + audiences: + - audiences + - audiences + refresh_token_expiration_minutes: 30 + properties: + audiences: + description: List of API endpoints that will be returned in Access Tokens. + items: + type: string + type: array + refresh_token_expiration_minutes: + description: The number of minutes until refresh token expires. There is + no maximum expiry limit. + example: 30 + type: integer + resource_identifier: + description: Unique identifier for the API that the Authorization Server + will issue Access Tokens for. + example: https://example.com/contacts + type: string + access_token_expiration_minutes: + description: The number of minutes until access token expires. There is + no maximum expiry limit. + example: 20 + type: integer + required: + - audiences + - resource_identifier + type: object + brand: + example: + id: 9 + enabled: true + custom_support_enabled: false + custom_color: '#1298b4' + custom_accent_color: '#b60012' + custom_masking_color: '#beefed' + custom_masking_opacity: 40 + mfa_enrollment_message: You must register with the OneLogin Protect app in + order to login + enable_custom_label_for_login_screen: true + custom_label_text_for_login_screen: ACME Username or Email + login_instruction: "To login, enter your ACME Username or Email. Reach out\ + \ to help.desk@acme.org if you have trouble logging in." + login_instruction_title: ACME Login Instructions + hide_onelogin_footer: false + background: + urls: + original: https://cdn.onelogin.com/images/account_branding/account_background/original/9ada91a5d34b497f6f0b93934165f0c713ed3c2d.?1599165114 + login: https://cdn.onelogin.com/images/account_branding/account_background/login/a2011597bad264455796281b94471284c6919857.jpg?1599165114 + branding: https://cdn.onelogin.com/images/account_branding/account_background/branding/8547d161732776facb3d9127146c06a09aa63362.jpg?1599165114 + file_size: 30338 + updated_at: 2020-09-03T20:31:54.146Z + content_type: image/jpeg + logo: + urls: + original: https://cdn.onelogin.com/images/account_branding/account_logo/original/25506f4f5b795b39f8ab6ea8a6c85f78094941bf.?1599165114 + login: https://cdn.onelogin.com/images/account_branding/account_logo/login/103d08ec5efb4ab204421f3dd15eddc973c8d0c5.png?1599165114 + navigation: https://cdn.onelogin.com/images/account_branding/account_logo/navigation/08fef613402a898832d215a3359b56e6d69ac232.png?1599165114 + file_size: 4408 + updated_at: 2020-09-03T20:31:54.373Z + content_type: image/png + properties: + id: + type: integer + enabled: + default: false + description: Indicates if the brand is enabled or not + example: true + type: boolean + custom_support_enabled: + description: "Indicates if the custom support is enabled. If enabled, the\ + \ login page includes the ability to submit a support request." + example: false + type: boolean + custom_color: + description: Primary brand color + example: '#1298b4' + type: string + custom_accent_color: + description: Secondary brand color + example: '#b60012' + type: string + custom_masking_color: + description: Color for the masking layer above the background image of the + branded login screen. + example: '#beefed' + type: string + custom_masking_opacity: + description: Opacity for the custom_masking_color. + example: 40 + type: integer + mfa_enrollment_message: + description: Text that replaces the default text displayed on the initial + screen of the MFA Registration. + example: You must register with the OneLogin Protect app in order to login + type: string + enable_custom_label_for_login_screen: + description: Indicates if the custom Username/Email field label is enabled + or not + example: true + type: boolean + custom_label_text_for_login_screen: + description: Custom label for the Username/Email field on the login screen. + See example here. + example: ACME Username or Email + type: string + login_instruction: + description: "Text for the login instruction screen, styled in Markdown." + example: "To login, enter your ACME Username or Email. Reach out to help.desk@acme.org\ + \ if you have trouble logging in." + type: string + login_instruction_title: + description: Link text to show login instruction screen. + example: ACME Login Instructions + type: string + hide_onelogin_footer: + description: Indicates if the OneLogin footer will appear at the bottom + of the login page. + example: true + type: boolean + background: + $ref: '#/components/schemas/brand_background' + logo: + $ref: '#/components/schemas/brand_logo' + required: + - background + - custom_accent_color + - custom_color + - custom_label_text_for_login_screen + - custom_masking_color + - custom_masking_opacity + - custom_support_enabled + - enable_custom_label_for_login_screen + - enabled + - hide_onelogin_footer + - id + - login_instruction + - login_instruction_title + - logo + - mfa_enrollment_message + type: object + brand_app: + example: + auth_method: 2 + visible: true + updated_at: 2020-09-11T19:35:08.288Z + name: Mom Corp + connector_id: 3001 + description: Mom’s Friendly Robot Company + created_at: 2020-09-08T22:24:19.551Z + id: 1455 + auth_method_description: SAML2.0 + properties: + id: + example: 1455 + type: integer + updated_at: + example: 2020-09-11T19:35:08.288Z + type: string + name: + example: Mom Corp type: string - type: array - Before-Cursor: - description: A string that can be used to request the page of results that preceed - the current page using the same set of search filters and pagination options. - schema: - type: string - After-Cursor: - description: A string that can be used to request the page of results that follows - the current page using the same set of search filters and pagination options. - schema: - type: string - requestBodies: - auth_server: - content: - application/json: - schema: - $ref: '#/components/schemas/createAuthorizationServer_request' - required: true - claim: - content: - application/json: - schema: - $ref: '#/components/schemas/addAccessTokenClaim_request' - required: true - scope: - content: - application/json: - schema: - $ref: '#/components/schemas/addScope_request' - required: true - app: - content: - application/json: - schema: - $ref: '#/components/schemas/schema' - required: true - rule: - content: - application/json: - schema: - $ref: '#/components/schemas/rule' - required: true - role: - content: - application/json: - schema: - $ref: '#/components/schemas/role' - required: true - hook: - content: - application/json: - schema: - $ref: '#/components/schemas/hook' - required: true - user: - content: - application/json: - schema: - $ref: '#/components/schemas/user' - required: true - mapping: - content: - application/json: - schema: - $ref: '#/components/schemas/mapping' - required: true - risk_rule: - content: - application/json: - schema: - $ref: '#/components/schemas/risk_rule' - required: true - responses: - token_401: - content: - application/json: - schema: - $ref: '#/components/schemas/generateToken_400_response' - description: "Typically, this error means that your client_id and/or client_secret\ - \ values are invalid." - token_404: - content: - application/json: - schema: - $ref: '#/components/schemas/generateToken_400_response' - description: "Typically, this error means that you are using the incorrect method.\ - \ Ensure that you are making a POST." - "401_invalid_access_token": - content: - application/json: - schema: - $ref: '#/components/schemas/status_1' - description: "Typically, this error means that your access token value is invalid." - status_200: - content: - application/json: - schema: - $ref: '#/components/schemas/id' - description: OK - "404_not_found": - content: - application/json: - schema: - $ref: '#/components/schemas/status_1' - description: Invalid ID - status_422: - content: - application/json: - schema: - $ref: '#/components/schemas/status_1' - description: This name already exists - status_invalid_scope: - content: - application/json: - schema: - $ref: '#/components/schemas/status_1' - description: An invalid scope id has been provided - "422_invalid_value": - content: - application/json: - schema: - $ref: '#/components/schemas/status_1' - description: Indicates that the syntax of the request is good but a value supplied - is not valid. - app: - content: - application/json: - schema: - $ref: '#/components/schemas/schema' - description: OK - "422_id_included": - content: - application/json: - schema: - $ref: '#/components/schemas/error_status' - description: ID should not be included in the payload body. - "403_forbidden": - content: - application/json: - schema: - $ref: '#/components/schemas/status_1' - description: FORBIDDEN - "400_bad_request": - content: - application/json: - schema: - $ref: '#/components/schemas/status_1' - description: BAD REQUEST - "401_unauthorized": - content: - application/json: - schema: - $ref: '#/components/schemas/status_1' - description: UNAUTHORIZED - "422_function_not_base64": - content: - application/json: - schema: - $ref: '#/components/schemas/hook_status' - description: You function is not base64 encoded. - "200_envvar": - content: - application/json: - schema: - $ref: '#/components/schemas/envvar' - description: OK - "422_unprocessable_entry": - content: - application/json: - schema: - $ref: '#/components/schemas/error_status' - description: UNPROCESSABLE_ENTRY - "200_risk_rule": - content: - application/json: - schema: - $ref: '#/components/schemas/risk_rule' - description: OK - schemas: - status: + connector_id: + example: 3001 + type: integer + auth_method_description: + example: SAML2.0 + type: string + description: + example: Mom’s Friendly Robot Company + type: string + auth_method: + example: 2 + type: integer + created_at: + example: 2020-09-08T22:24:19.551Z + type: string + visible: + example: true + type: boolean + required: + - auth_method + - auth_method_description + - connector_id + - created_at + - description + - id + - name + - updated_at + - visible + type: object + brand_req: example: - code: 0 - error: true - type: type - message: message + name: ACME + id: 912 + enabled: true properties: - error: + id: + description: Brand’s unique ID in OneLogin. + example: 912 + type: integer + enabled: + description: Indicates if the brand is enabled or not. + example: true type: boolean - code: + name: + description: Brand name for humans. This isn’t related to subdomains. + example: ACME + type: string + type: object + client_app_full: + example: + name: An oidc app + scopes: + - description: Read some contacts + id: 25 + value: read:contacts + - description: Read some contacts + id: 25 + value: read:contacts + api_auth_id: 1033034 + app_id: 1026152 + properties: + scopes: + description: List of All Scopes assigned to a client app + items: + $ref: '#/components/schemas/scope' + type: array + app_id: + description: Unique Client App ID + example: 1026152 + type: integer + name: + description: Name of client app + example: An oidc app + type: string + api_auth_id: + example: 1033034 + type: integer + type: object + clock_counter: + description: "unit: - 0 = Seconds - 1 = Minutes - 2 = Hours value: - When Unit\ + \ = 0 or 1 value must be 0-60 - When Unit = 2 value must be 0-24" + example: + value: 30 + unit: 1 + properties: + value: + type: integer + unit: + type: integer + type: object + condition: + description: Conditions in which mappings are applied + example: + source: last_login + value: "90" + operator: '>' + properties: + source: + description: source field to check. + example: last_login + type: string + operator: + description: A valid operator for the selected condition source + example: '>' + type: string + value: + description: A plain text string or valid value for the selected condition + source + example: "90" + type: string + type: object + configuration_oidc: + properties: + login_url: + description: The OpenId Connect Client Id. Note that client_secret is only + returned after Creating an App. + type: string + redirect_uri: + description: Comma or newline separated list of valid redirect uris for + the OpenId Connect Authorization Code flow. + example: https://localhost:3000/callback + type: string + access_token_expiration_minutes: + description: Number of minutes the refresh token will be valid for. + example: 1 + type: integer + refresh_token_expiration_minutes: + description: Number of minutes the refresh token will be valid for. + example: 1 + type: integer + token_endpoint_auth_method: + description: "- 0: Basic - 1: POST - 2: None / PKCE" + enum: + - 0 + - 1 + - 2 + type: integer + oidc_application_type: + description: "- 0 : Web - 1 : Native / Mobile" + enum: + - 0 + - 1 + example: 0 + type: integer + required: + - access_token_expiration_minutes + - login_url + - oidc_application_type + - redirect_uri + - refresh_token_expiration_minutes + - token_endpoint_auth_method + type: object + configuration_saml: + properties: + signature_algorithm: + description: |- + One of the following: + - SHA-1 + - SHA-256 + - SHA-348 + - SHA-512 + example: SHA-512 + type: string + certificate_id: + description: When creating apps the default certificate will be used unless + the `certificate_id` attribute is applied in the `configuration` object. + example: 123456 + type: integer + required: + - certificate_id + - signature_algorithm + type: object + connector: + example: + icon_url: https://cdn-shadow.onlgn.net/images/icons/square/amazonwebservices3multirole/old_original.png?1421095823 + allows_new_parameters: true + auth_method: 8 + name: Amazon Web Services Multi-Role + id: 1061937 + properties: + id: + description: Connectors unique ID in OneLogin. + example: 1061937 + type: integer + name: + description: Name of Connector + example: Amazon Web Services Multi-Role + type: string + icon_url: + description: A link to the icon's url. + example: https://cdn-shadow.onlgn.net/images/icons/square/amazonwebservices3multirole/old_original.png?1421095823 + type: string + auth_method: + $ref: '#/components/schemas/auth_method' + allows_new_parameters: + description: Indicates if apps created using this connector will be allowed + to create custom parameters. + type: boolean + type: object + device: + properties: + device_id: + description: an ID for the device type that must be submitted with the Verify + Factor API call. + example: 654984 + type: integer + device_type: + description: "Lists an available MFA device type, such as OneLogin OTP SMS\ + \ or Google Authenticator." + example: Google Authenticator + type: string + type: object + devices: + example: + - device_id: 51684 + device_type: Google Authenticator + items: + $ref: '#/components/schemas/device' + type: array + email_config: + properties: + address: + description: Email Settings server address + example: smtp.sendgrid.net + type: string + use_tls: + default: true + description: Use TLS + example: true + type: boolean + from: + description: The From email address in the message. + example: email@example.com + type: string + domain: + description: Domain of the From address. + example: example.com + type: string + user_name: + description: The user name of the account to authenticate with the Email + Settings server. + example: user-name + type: string + password: + description: The password of the account to authenticate with the Email + Settings server. + example: password + format: password + type: string + port: + default: 25 + description: Defaults to 25. + example: 587 + type: integer + required: + - address + - domain + - from + type: object + enforcement_point: + description: For apps that connect to a OneLogin Access Enforcement Point the + following enforcement_point object will be included with the app payload. + example: + context_root: / + resources: + - resource_id: 809 + conditions: "" + is_path_regex: false + permissions: allow + require_auth: false + path: / + landing_page: "" + require_sitewide_authentication: false + token: b491c647f5e0cff854ad606722ac98342b4b0882 + target: "" + vhost: "" + permissions: allow + session_expiry_fixed: + value: 30 + unit: 1 + case_sensitive: false + use_target_host_header: false + conditions: "" + session_expiry_inactivity: + value: 30 + unit: 1 + properties: + require_sitewide_authentication: + description: Require user authentication to access any resource protected + by this enforcement point. + example: false + type: boolean + conditions: + description: "If access is conditional, the conditions that must evaluate\ + \ to true to allow access to a resource. For example, to require the user\ + \ must be authenticated and have either the role Admin or User" + example: "" + type: string + session_expiry_fixed: + $ref: '#/components/schemas/clock_counter' + session_expiry_inactivity: + $ref: '#/components/schemas/clock_counter' + permissions: + description: "Specify to always `allow`, `deny` access to resources, of\ + \ if access is `conditional`." + enum: + - allow + - deny + - conditional + example: allow + type: string + token: + description: Can only be set on create. Access Gateway Token. + example: b491c647f5e0cff854ad606722ac98342b4b0882 + readOnly: true + type: string + target: + description: "A fully-qualified URL to the internal application including\ + \ scheme, authority and path. The target host authority must be an IP\ + \ address, not a hostname." + example: "" + nullable: true + type: string + resources: + description: Array of resource objects + example: + - resource_id: 809 + conditions: "" + is_path_regex: false + permissions: allow + require_auth: false + path: / + items: + $ref: '#/components/schemas/enforcement_point_resources_inner' + type: array + context_root: + description: "The root path to the application, often the name of the application.\ + \ Can be any name, path or just a slash (“/”). The context root uniquely\ + \ identifies the application within the enforcement point." + example: / + type: string + use_target_host_header: + description: Use the target host header as opposed to the original gateway + or upstream host header. + example: false + type: boolean + vhost: + description: A comma-delimited list of one or more virtual hosts that map + to applications assigned to the enforcement point. A VHOST may be a host + name or an IP address. VHOST distinguish between applications that are + at the same context root. + example: "" + nullable: true + type: string + landing_page: + description: "The location within the context root to which the browser\ + \ will be redirected for IdP-initiated single sign-on. For example, the\ + \ landing page might be an index page in the context root such as index.html\ + \ or default.aspx. The landing page cannot begin with a slash and must\ + \ use valid URL characters." + example: "" + nullable: true + type: string + case_sensitive: + description: "The URL path evaluation is case insensitive by default. Resources\ + \ hosted on web servers such as Apache, NGINX and Java EE are case sensitive\ + \ paths. Web servers such as Microsoft IIS are not case-sensitive." + example: false + type: boolean + type: object + event: + example: + privilege_id: 6 + risk_reasons: risk_reasons + notes: notes + assumed_by_superadmin_or_reseller: 5 + policy_id: 1 + service_directory_id: 9 + directory_sync_run_id: 9 + user_name: user_name + risk_cookie_id: risk_cookie_id + created_at: created_at + solved: true + client_id: client_id + event_type_id: 3 + otp_device_id: 1 + actor_user_id: 6 + certificate_id: 7 + resource_type_id: 1 + actor_user_name: actor_user_name + param: param + role_id: 5 + error_description: error_description + user_field_id: 6 + id: 4 + ipaddr: ipaddr + app_id: 5 + assuming_acting_user_id: 2 + proxy_ip: proxy_ip + risk_score: 4 + otp_device_name: otp_device_name + policy_name: policy_name + object_id: 1 + adc_id: 1 + app-name: app-name + role_name: role_name + custom_message: custom_message + policy_type: policy_type + account_id: 0 + group-name: group-name + group_id: 2 + user_id: 8 + resolved_at: resolved_at + mapping_id: 7 + radius_config_id: 7 + trusted_idp_id: 9 + actor_system: actor_system + properties: + account_id: + description: Account that triggered the event. + type: integer + actor_system: + description: Acting system that triggered the event when the actor is not + a user. + type: string + actor_user_id: + description: ID of the user whose action triggered the event. + type: integer + actor_user_name: + description: First and last name of the user whose action triggered the + event. + type: string + adc_id: + type: integer + app-name: + description: "Name of the app involved in the event, if applicable." + type: string + app_id: + description: "ID of the app involved in the event, if applicable." + type: integer + assumed_by_superadmin_or_reseller: + type: integer + assuming_acting_user_id: + description: "ID of the user who assumed the role of the acting user to\ + \ trigger the event, if applicable." + type: integer + certificate_id: + type: integer + client_id: + description: Client ID used to generate the access token that made the API + call that generated the event. + type: string + created_at: + description: ISO8601 Time and date at which the event was created. This + value is autogenerated by OneLogin. + type: string + custom_message: + description: More details about the event. + type: string + directory_sync_run_id: + description: Directory sync run ID. type: integer - type: + error_description: + description: "Provisioning error details, if applicable." type: string - message: + event_type_id: + description: Type of event triggered. + enum: + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 10 + - 11 + - 12 + - 13 + - 14 + - 15 + - 16 + - 17 + - 18 + - 19 + - 20 + - 21 + - 22 + - 23 + - 24 + - 25 + - 26 + - 27 + - 28 + - 29 + - 30 + - 31 + - 32 + - 33 + - 34 + - 35 + - 36 + - 37 + - 38 + - 39 + - 40 + - 41 + - 42 + - 43 + - 44 + - 45 + - 46 + - 47 + - 48 + - 49 + - 50 + - 51 + - 52 + - 53 + - 54 + - 55 + - 56 + - 57 + - 58 + - 59 + - 60 + - 61 + - 62 + - 63 + - 64 + - 65 + - 66 + - 67 + - 68 + - 69 + - 70 + - 71 + - 72 + - 73 + - 74 + - 75 + - 76 + - 77 + - 78 + - 79 + - 80 + - 81 + - 82 + - 83 + - 84 + - 85 + - 86 + - 87 + - 88 + - 89 + - 90 + - 91 + - 92 + - 95 + - 96 + - 100 + - 101 + - 102 + - 103 + - 104 + - 105 + - 106 + - 110 + - 111 + - 112 + - 113 + - 114 + - 115 + - 116 + - 117 + - 118 + - 119 + - 120 + - 121 + - 122 + - 123 + - 124 + - 125 + - 126 + - 127 + - 128 + - 129 + - 130 + - 131 + - 132 + - 133 + - 134 + - 135 + - 136 + - 137 + - 138 + - 139 + - 140 + - 141 + - 145 + - 146 + - 147 + - 148 + - 149 + - 150 + - 151 + - 152 + - 153 + - 154 + - 155 + - 156 + - 157 + - 158 + - 159 + - 160 + - 161 + - 162 + - 163 + - 164 + - 165 + - 166 + - 167 + - 168 + - 169 + - 170 + - 171 + - 172 + - 173 + - 174 + - 175 + - 176 + - 177 + - 178 + - 179 + - 180 + - 181 + - 182 + - 183 + - 184 + - 185 + - 186 + - 187 + - 188 + - 189 + - 190 + - 191 + - 192 + - 193 + - 194 + - 195 + - 196 + - 197 + - 198 + - 199 + - 200 + - 201 + - 202 + - 203 + - 204 + - 205 + - 206 + - 207 + - 208 + - 209 + - 210 + - 211 + - 212 + - 213 + - 214 + - 215 + - 216 + - 217 + - 218 + - 219 + - 220 + - 221 + - 222 + - 223 + - 224 + - 225 + - 226 + - 227 + - 228 + - 229 + - 230 + - 231 + - 232 + - 233 + - 234 + - 235 + - 236 + - 237 + - 238 + - 239 + - 240 + - 241 + - 242 + - 243 + - 244 + - 245 + - 246 + - 247 + - 248 + - 249 + - 250 + - 251 + - 252 + - 253 + - 254 + - 255 + - 291 + - 300 + - 301 + - 303 + - 304 + - 305 + - 306 + - 307 + - 330 + - 331 + - 332 + - 333 + - 334 + - 400 + - 401 + - 402 + - 410 + - 411 + - 412 + - 501 + - 502 + - 503 + - 510 + - 511 + - 512 + - 513 + - 514 + - 515 + - 516 + - 517 + - 518 + - 519 + - 520 + - 521 + - 522 + - 523 + - 524 + - 525 + - 526 + - 527 + - 528 + - 529 + - 530 + - 531 + - 532 + - 533 + - 534 + - 535 + - 536 + - 537 + - 538 + - 539 + - 540 + - 541 + - 542 + - 545 + - 546 + - 550 + - 551 + - 552 + - 553 + - 554 + - 555 + - 600 + - 601 + - 602 + - 700 + - 701 + - 702 + - 703 + - 704 + - 705 + - 706 + - 800 + - 801 + - 802 + - 803 + - 804 + - 805 + - 900 + - 901 + - 902 + - 903 + - 904 + - 905 + - 906 + - 907 + - 911 + - 912 + - 931 + - 932 + - 950 + - 1001 + - 1002 + - 1010 + - 1100 + - 1101 + - 1200 + - 1201 + - 1244 + - 1245 + - 1300 + - 1301 + - 1302 + - 1303 + - 1304 + - 1305 + - 1400 + - 1401 + - 1402 + - 1403 + - 1404 + - 1405 + - 1406 + - 1407 + - 1408 + - 1409 + - 1410 + - 1411 + - 1412 + - 1413 + - 1414 + - 1415 + - 1416 + - 1417 + - 1418 + - 1419 + - 1420 + - 1421 + - 1422 + - 1423 + - 1424 + - 1500 + - 1501 + - 1502 + - 1503 + - 1504 + - 1505 + - 1506 + - 1507 + - 1508 + - 1509 + - 1510 + - 1511 + - 1512 + - 1513 + - 1514 + - 1600 + - 1601 + - 1602 + - 1603 + - 1604 + - 1605 + - 1606 + - 1607 + - 1608 + - 1609 + - 1700 + - 1701 + - 1702 + - 1801 + - 1802 + - 1900 + - 1901 + - 1902 + - 1903 + - 1904 + - 1905 + - 2000 + - 2001 + - 2002 + - 2003 + - 2004 + - 2005 + - 2006 + - 2007 + - 2008 + - 2009 + - 2010 + - 2011 + - 2012 + - 2013 + - 2014 + - 2015 + - 2016 + - 2017 + - 2018 + - 2100 + - 2101 + - 2102 + - 2103 + - 2104 + - 2105 + - 2106 + - 2107 + - 2108 + - 2109 + - 2110 + - 2111 + - 2112 + - 2113 + - 2114 + - 2201 + - 2202 + - 2203 + - 2204 + - 3000 + - 3001 + - 3002 + - 3003 + - 3004 + - 3005 + - 3006 + - 3007 + - 3008 + - 3009 + - 3010 + - 3011 + - 3012 + - 3013 + - 3014 + - 3015 + - 3016 + - 3017 + - 3018 + - 3019 + - 3020 + - 3021 + - 3022 + - 3023 + - 3024 + - 3025 + - 3026 + - 3027 + - 3028 + - 9000 + - 9001 + - 9002 + - 9003 + - 9004 + - 9005 + - 9006 + - 9007 + - 9008 + - 9009 + - 9010 + - 9011 + - 9012 + - 9013 + - 9014 + - 9015 + - 9016 + - 9017 + - 9018 + - 9019 + - 9020 + - 9021 + - 9022 + - 9023 + - 9024 + - 9025 + - 9026 + - 9027 + - 9028 + - 9029 + - 9030 + - 9031 + - 9032 + - 9033 + - 9034 + - 9035 + - 9036 + - 9037 + - 9038 + - 9039 + - 9040 + - 9041 + - 9042 + - 9043 + - 9044 + - 9045 + - 9046 + - 9047 + - 9048 + - 9049 + - 9050 + - 9051 + - 9052 + - 9053 + - 9054 + - 9055 + - 9056 + - 9057 + - 9058 + - 9059 + type: integer + group-name: + description: Name of a group involved in the event. type: string - type: object - id: - example: - id: id - properties: + group_id: + description: ID of a group involved in the event. + type: integer id: + description: Event's unique ID in OneLogin. Autogenerated by OneLogin. + type: integer + ipaddr: + description: IP address of the machine used to trigger the event. type: string - type: object - status_1: - properties: - message: + mapping_id: + type: integer + notes: + description: More details about the event. type: string - statusCode: + object_id: type: integer - name: + otp_device_id: + description: ID of a device involved in the event. + type: integer + otp_device_name: + description: Name of a device involved in the event. type: string - type: object - auth_server_configuration: - example: - access_token_expiration_minutes: 6 - resource_identifier: resource_identifier - audiences: - - audiences - - audiences - refresh_token_expiration_minutes: 0 - properties: - audiences: - items: - type: string - type: array - refresh_token_expiration_minutes: + param: + type: string + policy_id: + description: ID of the policy involved in the event. type: integer - resource_identifier: + policy_name: + description: Name of the policy involved in the event. type: string - access_token_expiration_minutes: + policy_type: + type: string + privilege_id: type: integer - type: object - client_app: - example: - api_auth_id: 6 - app_id: 0 - properties: - app_id: + proxy_ip: + type: string + radius_config_id: type: integer - api_auth_id: + resolved_at: + type: string + resource_type_id: + description: "ID of the resource (user, role, group, and so forth) associated\ + \ with the event." + type: integer + risk_cookie_id: + description: Identifier for risk cookie + type: string + risk_reasons: + type: string + risk_score: + type: integer + role_id: + description: ID of a role involved in the event. + type: integer + role_name: + description: Name of a role involved in the event. + type: string + service_directory_id: + type: integer + solved: + type: boolean + trusted_idp_id: + type: integer + user_field_id: + type: integer + user_id: + description: ID of the user that was acted upon to trigger the event. type: integer + user_name: + description: Name of the user that was acted upon to trigger the event. + type: string type: object - name: - description: App name. + fp: + description: Set to the value of the __tdli_fp cookie. type: string - connector_id: - description: ID of the apps underlying connector. - type: integer - auth_method: - description: An ID indicating the type of app. - enum: - - 0 - - 1 - - 2 - - 3 - - 4 - - 6 - - 7 - - 8 - type: integer - schema: + generic-app: + additionalProperties: true example: - icon_url: icon_url - notes: notes + icon_url: /images/missing_connector_icon/square/old_original.png visible: true - policy_id: 1 - configuration: "{}" - allow_assumed_signin: true + notes: This app is in beta. + policy_id: 0 + allow_assumed_signin: false description: description - created_at: created_at + created_at: 2018-04-12T21:50:42Z role_ids: - - 7 - - 7 - sso: "{}" - brand_id: 5 - auth_method: 5 - tab_id: 2 - enforcement_point: "{}" - updated_at: updated_at - connector_id: 6 - name: name + - 192513 + auth_method: 8 + tab_id: 196885 + enforcement_point: + context_root: / + resources: + - resource_id: 809 + conditions: "" + is_path_regex: false + permissions: allow + require_auth: false + path: / + landing_page: "" + require_sitewide_authentication: false + token: b491c647f5e0cff854ad606722ac98342b4b0882 + target: "" + vhost: "" + permissions: allow + session_expiry_fixed: + value: 30 + unit: 1 + case_sensitive: false + use_target_host_header: false + conditions: "" + session_expiry_inactivity: + value: 30 + unit: 1 + updated_at: 2019-05-16T19:20:34Z + name: A Sample App + connector_id: 108419 provisioning: enabled: true - id: 0 - parameters: "{}" + id: 775664 + parameters: + include_in_saml_assertion: true + user_attribute_macros: user_attribute_macros + user_attribute_mappings: user_attribute_mappings + label: label properties: id: description: Apps unique ID in OneLogin. - type: integer - connector_id: - description: ID of the apps underlying connector. + example: 775664 + readOnly: true type: integer name: - description: App name. + description: The name of the app. + example: A Sample App type: string + visible: + description: Indicates if the app is visible in the OneLogin portal. + example: true + type: boolean description: description: Freeform description of the app. type: string notes: description: Freeform notes about the app. + example: This app is in beta. type: string - policy_id: - description: The security policy assigned to the app. - type: integer - brand_id: - description: The custom login page branding to use for this app. Applies - to app initiated logins via OIDC or SAML. - type: integer icon_url: - description: A link to the apps icon url. + description: A link to the apps icon url + example: /images/missing_connector_icon/square/old_original.png type: string - visible: - description: Indicates if the app is visible in the OneLogin portal. - type: boolean auth_method: - description: An ID indicating the type of app. - enum: - - 0 - - 1 - - 2 - - 3 - - 4 - - 6 - - 7 - - 8 + $ref: '#/components/schemas/auth_method' + policy_id: + description: The security policy assigned to the app. type: integer + allow_assumed_signin: + description: Indicates whether or not administrators can access the app + as a user that they have assumed control over. + example: false + type: boolean tab_id: description: ID of the OneLogin portal tab that the app is assigned to. + example: 196885 + type: integer + connector_id: + description: ID of the connector to base the app from. + example: 108419 type: integer created_at: - description: The date the app was created. + description: the date the app was created + example: 2018-04-12T21:50:42Z type: string updated_at: - description: The date the app was last updated. + description: the date the app was last updated + example: 2019-05-16T19:20:34Z type: string role_ids: description: List of Role IDs that are assigned to the app. On App Create or Update the entire array is replaced with the values provided. + example: + - 192513 items: + description: Role ID type: integer type: array - allow_assumed_signin: - description: Indicates whether or not administrators can access the app - as a user that they have assumed control over. - type: boolean provisioning: - $ref: '#/components/schemas/schema_provisioning' - sso: - type: object - configuration: - type: object + $ref: '#/components/schemas/generic_app_provisioning' parameters: - type: object + $ref: '#/components/schemas/app_parameters' enforcement_point: - type: object + $ref: '#/components/schemas/enforcement_point' + type: object + group: + example: + reference: "null" + name: group.security.policy.default + id: 425741 + properties: + id: + description: Group's unique Onelogin ID + example: 425741 + type: integer + name: + description: Group name + example: group.security.policy.default + type: string + reference: + description: Deprecated. Will always show the attribute nil="true". + example: "null" + type: string type: object - id_1: - description: Apps unique ID in OneLogin. + id: type: integer - rule: + ip: + description: The IP address of the User's request. + type: string + locale: + properties: + language: + description: locale string + format: "^[a-z]{2,4}(-[A-Z][a-z]{3})?(-([A-Z]{2}|[0-9]{3}))?$" + type: string + is_default: + description: indicator if language is default + type: boolean + type: object + mapping: example: name: name match: all id: 0 position: 6 conditions: - - source: source - value: value - operator: operator - - source: source - value: value - operator: operator + - source: last_login + value: "90" + operator: '>' + - source: last_login + value: "90" + operator: '>' actions: - - macro: macro - expression: expression - scriplet: scriplet - action: action + - action: action value: - - value - - value - - macro: macro - expression: expression - scriplet: scriplet - action: action + - "2" + - "2" + - action: action value: - - value - - value + - "2" + - "2" enabled: true properties: id: type: integer name: - description: The name of the rule. + description: The name of the mapping. type: string + enabled: + description: Indicates if the mapping is enabled or not. + type: boolean match: description: Indicates how conditions should be matched. enum: - all - any type: string - enabled: - description: Indicates if the rule is enabled or not. - type: boolean position: - description: Indicates the order of the rule. When `null` this will default + description: Indicates the order of the mapping. When `null` this will default to last position. type: integer conditions: description: An array of conditions that the user must meet in order for - the rule to be applied. + the mapping to be applied. items: $ref: '#/components/schemas/condition' type: array @@ -4516,113 +12096,323 @@ components: description: An array of actions that will be applied to the users that are matched by the conditions. items: - $ref: '#/components/schemas/action' + $ref: '#/components/schemas/action_obj' type: array + required: + - actions + - conditions + - enabled + - match + - name + - position type: object - rule_id: + message_template: example: - id: 0 + template: null + account_id: 118462 + updated_at: 2021-11-24T21:25:29.480Z + id: 544880 + type: email_forgot_password + locale: en + template_class: email_template + brand_id: 5 properties: id: + example: 544880 + readOnly: true + type: integer + account_id: + example: 118462 + readOnly: true + type: integer + type: + description: "Template type that describes the source (sms, voice, email)\ + \ and purpose (registration, invite, etc)" + enum: + - email_forgot_password + - email_code_registration + - email_code_login_verification + - email_code_app_verification + - email_code_pw_reset_verification + - email_magiclink_registration + - email_magiclink_login_verification + - email_magiclink_app_verification + - email_magiclink_pw_reset_verification + - sms_registration + - sms_login_verification + - sms_app_verification + - sms_pw_reset_verification + type: string + locale: + description: "The 2 character language locale for the template. e.g. en\ + \ = English, es = Spanish" + example: en + pattern: "^[a-z]{2}$" + type: string + template: + $ref: '#/components/schemas/message_template_template' + template_class: + example: email_template + readOnly: true + type: string + updated_at: + description: Last time template was updated + example: 2021-11-24T21:25:29.480Z + readOnly: true + type: string + brand_id: + description: brand id number + example: 5 + readOnly: true type: integer + required: + - locale + - template + - type type: object - id_2: - type: integer - error_status: + oauth_token: + example: + access_token: xx508xx63817x752xx74004x30705xx92x58349x5x78f5xx34xxxxx51 + refresh_token: deprecated + account_id: 555555 + created_at: 2015-11-11T03:36:18.714Z + token_type: bearer + expires_in: 36000 properties: - code: + access_token: + description: Provides the requested access token. You can use this token + to call our resource APIs. + example: xx508xx63817x752xx74004x30705xx92x58349x5x78f5xx34xxxxx51 + type: string + created_at: + description: Time at which the access token was generated. + example: 2015-11-11T03:36:18.714Z + type: string + expires_in: + description: |- + Indicates that the generated access token expires in 36,000 seconds, 600 minutes, or 10 hours. + An expired access token cannot be used to make resource API calls, but it can still be used along with its associated refresh token to call the Refresh Tokens v2 API. + example: 36000 type: integer - message: + refresh_token: + description: deprecated No longer in use + example: deprecated type: string - errors: - items: - $ref: '#/components/schemas/error_status_errors_inner' - type: array + token_type: + description: Indicates that the generated access token is a bearer token. + example: bearer + type: string + account_id: + description: Account ID associated with the API credentials used to generate + the token. + example: 555555 + type: integer type: object - rule_id_list: - items: - type: integer - type: array - connector: + oidc_app: + allOf: + - $ref: '#/components/schemas/generic-app' + - $ref: '#/components/schemas/oidc_app_allOf' + privilege: example: - icon_url: icon_url - allows_new_parameters: true - auth_method: null - name: name - id: 0 + name: User Administrator + description: Can administer users + id: 2c963197-bee2-4607-abc0-4786f1bfa55a + privilege: + Version: 2018-05-18 + Statement: + - Action: + - Users:Delete + - Users:ResetPassword + - Users:Unlock + - Users:Get + Scope: + - '*' + - '*' + Effect: Allow + - Action: + - Users:Delete + - Users:ResetPassword + - Users:Unlock + - Users:Get + Scope: + - '*' + - '*' + Effect: Allow properties: id: - description: The connectors unique ID in OneLogin. + example: 2c963197-bee2-4607-abc0-4786f1bfa55a + type: string + name: + example: User Administrator + type: string + description: + example: Can administer users + type: string + privilege: + $ref: '#/components/schemas/privilege_privilege' + required: + - name + - privilege + type: object + rate_limit: + example: + X-RateLimit-Remaining: 4988 + X-RateLimit-Reset: 832 + X-RateLimit-Limit: 5000 + properties: + X-RateLimit-Limit: + description: Rate Limit Limit + example: 5000 + type: integer + X-RateLimit-Remaining: + description: Rate Limit Remaining + example: 4988 type: integer + X-RateLimit-Reset: + description: Rate Limit Reset + example: 832 + type: integer + type: object + request_brand: + properties: + enabled: + default: false + description: Indicates if the brand is enabled or not + example: true + type: boolean name: - description: The name of the connector. + description: Brand’s name for humans. This isn’t related to subdomains. + example: Acme Branding type: string - auth_method: - $ref: '#/components/schemas/auth_method' - allows_new_parameters: - description: Indicates if apps created using this connector will be allowed - to create custom parameters. + custom_support_enabled: + description: "Indicates if the custom support is enabled. If enabled, the\ + \ login page includes the ability to submit a support request." + example: false type: boolean - icon_url: - description: A link to the apps icon url. + custom_color: + description: Primary brand color + example: '#1298b4' + type: string + custom_accent_color: + description: Secondary brand color + example: '#b60012' + type: string + custom_masking_color: + description: Color for the masking layer above the background image of the + branded login screen. + example: '#beefed' + type: string + custom_masking_opacity: + description: Opacity for the custom_masking_color. + example: 40 + type: integer + enable_custom_label_for_login_screen: + description: Indicates if the custom Username/Email field label is enabled + or not + example: true + type: boolean + custom_label_text_for_login_screen: + description: Custom label for the Username/Email field on the login screen. + See example here. + example: ACME Username or Email + type: string + login_instruction_title: + description: Link text to show login instruction screen. + example: ACME Login Instructions + type: string + login_instruction: + description: "Text for the login instruction screen, styled in Markdown." + example: "To login, enter your ACME Username or Email. Reach out to help.desk@acme.org\ + \ if you have trouble logging in." + type: string + hide_onelogin_footer: + description: Indicates if the OneLogin footer will appear at the bottom + of the login page. + example: true + type: boolean + mfa_enrollment_message: + description: Text that replaces the default text displayed on the initial + screen of the MFA Registration. + example: You must register with the OneLogin Protect app in order to login + type: string + background: + description: "Base64 encoded image data (JPG/PNG, <5MB)" + example: /9j/4AAQSkZJRgAB...J3a+IvMu7D8T/9k= type: string + logo: + description: "Base64 encoded image data (PNG, <1MB)" + example: iVBORw0KGgoAAAAN...AABJRU5ErkJggg== + type: string + required: + - name type: object - name_1: - description: The name of the connector. - type: string - factor: - items: - $ref: '#/components/schemas/factor_inner' - type: array - registration: + risk_device: + description: Information about the device being used. + properties: + id: + description: This device's unique identifier + type: string + type: object + risk_rule: example: - device_id: device_id + name: name + description: description id: id - status: pending + filters: + - filters + - filters + source: + name: name + id: id + type: blacklist + target: location.ip properties: id: - description: Registration identifier. type: string - status: - description: pending registration has not been completed successfully. accepted - registration has successfully completed. + name: + description: The name of this rule + type: string + description: + type: string + type: + description: The type parameter specifies the type of rule that will be + created. enum: - - pending - - accepted + - blacklist + - whitelist type: string - device_id: - description: Device id to be used with Verify the Factor. + target: + description: The target parameter that will be used when evaluating the + rule against an incoming event. + enum: + - location.ip + - location.address.country_iso_code type: string + filters: + description: A list of IP addresses or country codes or names to evaluate + against each event. + items: + type: string + type: array + source: + $ref: '#/components/schemas/source' type: object - device: - example: - type_display_name: type_display_name - default: true - device_id: device_id - auth_factor_name: auth_factor_name - user_display_name: user_display_name + risk_user: + description: An Object containing User details. properties: - device_id: - type: string - user_display_name: - type: string - type_display_name: + id: + description: A unique identifier for the user. type: string - auth_factor_name: + name: + description: A name for the user. type: string - default: + authenticated: + default: false + description: Indicates if the metadata supplied in this event should be + considered as trusted for the user. type: boolean - type: object - status_2: - example: - status: - code: 0 - type: type - message: message - error: true - properties: - status: - $ref: '#/components/schemas/status_2_status' + required: + - id type: object role: example: @@ -4635,220 +12425,262 @@ components: - 1 - 1 apps: - - null - - null + - 234 + - 567 + - 777 properties: id: + description: Role ID + readOnly: true type: integer name: + description: The name of the role. type: string apps: + description: A list of app IDs that will be assigned to the role. + example: + - 234 + - 567 + - 777 items: - $ref: '#/components/schemas/id_1' + $ref: '#/components/schemas/id' type: array users: + description: A list of user IDs to assign to the role. items: type: integer type: array admins: + description: A list of user IDs to assign as role administrators. items: type: integer type: array required: - name type: object - role_id: - type: integer - name_2: - type: string - schema_1: + app_rule: example: - added_at: added_at - added_by: - name: name - id: 6 - name: name - assigned: true - id: 0 - username: username + name: My first app rule + match: all + id: 196670 + position: 1 + conditions: + - source: last_login + value: "90" + operator: '>' + - source: last_login + value: "90" + operator: '>' + actions: + - action: action + value: + - "2" + - "2" + - action: action + value: + - "2" + - "2" + enabled: true properties: id: + description: App Rule ID + example: 196670 type: integer name: + description: Rule Name + example: My first app rule type: string - username: - type: string - added_by: - $ref: '#/components/schemas/schema_1_added_by' - added_at: - type: string - assigned: - description: Indicates if assigned to role or not. Defaults to true. - type: boolean - type: object - hook: - example: - runtime: runtime - created_at: created_at - type: type - packages: "{}" - timeout: 0 - env_vars: - - env_vars - - env_vars - retries: 2 - updated_at: updated_at - context_version: context_version - function: function - options: - risk_enabled: true - mfa_device_info_enabled: true - location_enabled: true - disabled: true - id: id - conditions: - - source: source - value: value - operator: operator - - source: source - value: value - operator: operator - status: ready - properties: - id: - description: The Hook unique ID in OneLogin. - type: string - type: - description: A string describing the type of hook. e.g. `pre-authentication` + match: + description: Indicates how conditions should be matched. + enum: + - all + - any type: string - disabled: - default: true - description: Boolean to enable or disable the hook. Disabled hooks will - not run. + enabled: + description: Indicates if the rule is enabled or not. type: boolean - timeout: - default: 1 - description: The number of seconds to allow the hook function to run before - before timing out. Maximum timeout varies based on the type of hook. + position: + description: Indicates the order of the rule. When `null` this will default + to last position. + example: 1 type: integer - env_vars: - description: Environment Variable objects that will be available via process.env.ENV_VAR_NAME - in the hook code. + conditions: + description: An array of conditions that the user must meet in order for + the rule to be applied. items: - type: string + $ref: '#/components/schemas/condition' type: array - runtime: - description: The Smart Hooks supported Node.js version to execute this hook - with. - type: string - retries: - default: 0 - description: Number of retries if execution fails. - maximum: 4 - type: integer - packages: - description: An object containing NPM packages that are bundled with the - hook function. - type: object - function: - description: A base64 encoded string containing the javascript function - code. + actions: + items: + $ref: '#/components/schemas/action_obj' + type: array + type: object + saml_app: + allOf: + - $ref: '#/components/schemas/generic-app' + - $ref: '#/components/schemas/saml_app_allOf' + saml_assert: + example: + username_or_email: hazel.zhang@onelogin.com + password: P@ssw0rd + app_id: "16819324" + subdomain: exampleOrganization + ip_address: 174.66.77.24 + properties: + username_or_email: + description: Set this to the username or email of the OneLogin user accessing + the app for which you want to generate a SAML token. type: string - context_version: - description: The semantic version of the content that will be injected into - this hook. + password: + description: Password of the OneLogin user accessing the app for which you + want to generate a SAML token. type: string - status: - description: String describing the state of the hook function. When a hook - is ready and disabled is false it will be executed. - enum: - - ready - - create-queued - - create-running - - create-failed - - update-queued - - update-running - - update-failed + app_id: + description: App ID of the app for which you want to generate a SAML token. + This is the app ID in OneLogin. type: string - options: - $ref: '#/components/schemas/hook_options' - conditions: - description: An array of objects that let you limit the execution of a hook - to users in specific roles. - items: - $ref: '#/components/schemas/hook_conditions_inner' - type: array - created_at: - description: ISO8601 format date that they hook function was created. + subdomain: + description: Set to the subdomain of the OneLogin user accessing the app + for which you want to generate a SAML token. type: string - updated_at: - description: ISO8601 format date that they hook function was last updated. + ip_address: + description: "If you are using this API in a scenario in which MFA is required\ + \ and you’ll need to be able to honor IP address whitelisting defined\ + \ in MFA policies, provide this parameter and set its value to the whitelisted\ + \ IP address that needs to be bypassed." type: string required: - - disabled - - env_vars - - function - - packages - - retries - - runtime - - timeout - - type + - app_id + - password + - subdomain + - username_or_email type: object - id_3: - description: The Hook unique ID in OneLogin. - type: string - hook_status: + saml_factor: properties: - name: + app_id: + description: App ID of the app for which you want to generate a SAML token. + This is the app ID in OneLogin. + example: "1657651" type: string - message: + device_id: + description: Provide the MFA device_id you are submitting for verification. + The device_id is supplied by the Generate SAML Assertion API. + example: "1657651" type: string + state_token: + description: Provide the state_token associated with the MFA device_id you + are submitting for verification. The state_token is supplied by the Generate + SAML Assertion API. + example: 11x0x1x16x1x3259xxxx0x59xx6xxxx670x61x45xxxxx + type: string + otp_token: + description: "Provide the OTP value for the MFA factor you are submitting\ + \ for verification. For some MFA factors; such as OneLogin OTP SMS, which\ + \ requires the user to request an OTP; the otp_token value is not required,\ + \ and if not included, returns a 200 OK - Pending result. You’ll make\ + \ a subsequent Verify Factor API call to provide the otp_token value once\ + \ it has been provided to the user." + example: "999999" + type: string + do_not_notify: + description: "When verifying MFA via Protect Push, set this to true to stop\ + \ additional push notifications being sent to the OneLogin Protect device." + example: false + type: boolean + required: + - app_id + - device_id + - state_token type: object - log: + scope: example: - correlation_id: correlation_id - created_at: created_at - request_id: request_id - events: - - events - - events + description: Read some contacts + id: 25 + value: read:contacts properties: - request_id: + id: + description: Unique Scope ID value + example: 25 + type: integer + value: + description: Scope Value + example: read:contacts type: string - correlation_id: + description: + description: Description of the scope + example: Read some contacts type: string - created_at: + type: object + session: + description: "A dictionary of extra information that provides useful context\ + \ about the session, for example the session ID, or some cookie information." + properties: + id: + description: "If you use a database to track sessions, you can send us the\ + \ session ID." type: string - events: - items: - type: string - type: array type: object - envvar: + source: + description: "Used for targeting custom rules based on a group of people, customers,\ + \ accounts, or even a single user." example: - updated_at: updated_at name: name - created_at: created_at id: id properties: id: - description: A unique identifier for the Hook Environment Variable + description: A unique id that represents the source of the event. type: string name: - description: The name of the environment variable. + description: The name of the source type: string - created_at: - description: The ISO8601 formatted date that the environment variable was - created. + type: object + token_claim: + example: + default_values: default_values + provisioned_entitlements: true + attribute_transformations: attribute_transformations + values: [] + user_attribute_macros: user_attribute_macros + skip_if_blank: true + id: 320780 + label: email_address + user_attribute_mappings: email + properties: + id: + description: The unique ID of the claim. + example: 320780 + type: integer + label: + description: The UI label for the claims. + example: email_address type: string - updated_at: - description: The ISO8601 formatted date that the environment variable was - last updated. + user_attribute_mappings: + description: A user attribute to map values from. + example: email + type: string + user_attribute_macros: + description: When `user_attribute_mappings` is set to `_macro_` this macro + will be used to assign the claims value. + type: string + attribute_transformations: + description: The type of transformation to perform on multi valued attributes. + type: string + skip_if_blank: + description: not used + type: boolean + values: + description: Relates to Rules/Entitlements. Not supported yet. + example: [] + items: + type: string + type: array + default_values: + description: Relates to Rules/Entitlements. Not supported yet. type: string + provisioned_entitlements: + description: Relates to Rules/Entitlements. Not supported yet. + type: boolean type: object - id_4: - description: A unique identifier for the Hook Environment Variable - type: string user: example: firstname: firstname @@ -4859,17 +12691,15 @@ components: title: title invitation_sent_at: invitation_sent_at role_ids: - - null - - null - custom_attributes: "{}" - samaccount_name: samaccount_name + - 1 + - 1 password: password updated_at: updated_at password_algorithm: password_algorithm company: company id: 0 - state: 1 - directory_id: 5 + state: 5 + directory_id: 2 department: department member_of: member_of email: email @@ -4877,16 +12707,17 @@ components: password_changed_at: password_changed_at salt: salt last_login: last_login - invalid_login_attempts: 7 + invalid_login_attempts: 9 preferred_locale_code: preferred_locale_code manager_user_id: manager_user_id lastname: lastname + samaccountname: samaccountname activated_at: activated_at userprincipalname: userprincipalname group_id: 6 phone: phone distinguished_name: distinguished_name - trusted_idp_id: 2 + trusted_idp_id: 7 comment: comment username: username status: 5 @@ -4923,7 +12754,8 @@ components: role_ids: description: A list of OneLogin Role IDs of the user items: - $ref: '#/components/schemas/role_id' + type: integer + minLength: 1 type: array phone: description: The E.164 format phone number for a user. @@ -4958,7 +12790,7 @@ components: manager_user_id: description: The OneLogin User ID for the user's manager. type: string - samaccount_name: + samaccountname: description: The user's Active Directory username. type: string member_of: @@ -4981,1157 +12813,2344 @@ components: type: string updated_at: type: string - preferred_locale_code: + preferred_locale_code: + type: string + created_at: + type: string + invalid_login_attempts: + type: integer + locked_until: + type: string + password_changed_at: + type: string + password: + description: The password to set for a user. + type: string + password_confirmation: + description: Required if the password is being set. + type: string + password_algorithm: + description: Use this when importing a password that's already hashed. Prepend + the salt value to the cleartext password value before SHA-256-encoding + it + type: string + salt: + description: The salt value used with the password_algorithm. + type: string + type: object + user_agent: + description: The user agent of the User's request. + type: string + verb: + description: Verbs are used to distinguish between different types of events. + Where possible use one of the following verbs to describe the event. Alternately + you can create custom verbs to describe other types of actions within your + application. + enum: + - log-in + - log-out + - log-in-denied + - authentication-challenge + - authentication-challenge-pass + - authentication-challenge-fail + type: string + sso_oidc: + properties: + client_id: + description: "OIDC: The OpenId Connect Client Id. Note that client_secret\ + \ is only returned after Creating an App" + example: 78d1d040-20c9-0136-5146-067351775fae92920 + type: string + type: object + sso_saml: + properties: + metadata_url: + example: https://app.onelogin.com/saml/metadata/5772393d-2ad3-47d6-a64f-2339b1028291 + type: string + acs_url: + example: https://sharkbytes.onelogin.com/trust/saml2/http-post/sso/928532 + type: string + sls_url: + example: https://sharkbytes.onelogin.com/trust/saml2/http-redirect/slo/928532 + type: string + issuer: + example: https://app.onelogin.com/saml/metadata/5772393d-2ad3-47d6-a64f-2339b1028291 + type: string + certificate: + $ref: '#/components/schemas/sso_saml_certificate' + type: object + rule_condition: + example: + name: Administrators + value: "272445" + properties: + name: + description: Name of the operator + example: Administrators + type: string + value: + description: The condition operator value to use when creating or updating + rules. + example: "272445" + type: string + type: object + rule_action: + example: + name: Set Role + value: add_role + properties: + name: + description: Name of the Action + example: Set Role + type: string + value: + description: The unique identifier of the action. This should be used when + defining actions for a User Mapping. + example: add_role + type: string + type: object + otp_device: + properties: + factor_id: + description: The identifier of the factor to enroll the user with. + example: 16282 + readOnly: true + type: integer + display_name: + description: A name for the users device + example: Rich's Phone + type: string + number: + description: The phone number of the user in E.164 format. + example: +1xxxxxxxxxx + type: string + verified: + description: "Defaults to false. Some factors like SMS or Voice require\ + \ that a user recieve a token and then that token is supplied to the Verify\ + \ endpoint before the device is considered active.\nYou can set verfied\ + \ to `true` which indicates the the users phone number is pre verified\ + \ and the device can be immediately activated. " + type: boolean + required: + - display_name + - factor_id + - number + type: object + hook_envvar: + example: + updated_at: updated_at + name: name + created_at: created_at + id: id + value: value + properties: + id: + description: A unique identifier for the Hook Environment Variable + readOnly: true + type: string + name: + description: The name of the environment variable. + type: string + created_at: + description: The ISO8601 formatted date that the environment variable was + created. + type: string + updated_at: + description: The ISO8601 formatted date that the environment variable was + last updated. + type: string + value: + description: The secret value that will be encrypted at rest and injected + in applicable hook functions at run time. + type: string + writeOnly: true + required: + - name + - value + type: object + hook_log: + example: + correlation_id: correlation_id + created_at: created_at + request_id: request_id + events: + - events + - events + properties: + request_id: + type: string + correlation_id: + type: string + created_at: + type: string + events: + items: + type: string + type: array + type: object + hook_status: + properties: + name: + description: responses status nam + example: success + type: string + message: + description: your operation was successful + type: string + type: object + hook: + example: + runtime: runtime + created_at: created_at + type: type + packages: + key: packages + timeout: 0 + env_vars: + - env_vars + - env_vars + retries: 2 + updated_at: updated_at + context_version: context_version + function: function + options: + risk_enabled: true + mfa_device_info_enabled: true + location_enabled: true + disabled: true + id: id + conditions: + - source: last_login + value: "90" + operator: '>' + - source: last_login + value: "90" + operator: '>' + status: ready + properties: + id: + description: The Hook unique ID in OneLogin. + type: string + type: + description: A string describing the type of hook. e.g. `pre-authentication` + type: string + disabled: + default: true + description: Boolean to enable or disable the hook. Disabled hooks will + not run. + type: boolean + timeout: + default: 1 + description: The number of seconds to allow the hook function to run before + before timing out. Maximum timeout varies based on the type of hook. + type: integer + env_vars: + description: Environment Variable objects that will be available via process.env.ENV_VAR_NAME + in the hook code. + items: + type: string + type: array + runtime: + description: The Smart Hooks supported Node.js version to execute this hook + with. + type: string + retries: + default: 0 + description: Number of retries if execution fails. + maximum: 4 + type: integer + packages: + additionalProperties: + type: string + description: An object containing NPM packages that are bundled with the + hook function. + type: object + function: + description: A base64 encoded string containing the javascript function + code. + type: string + context_version: + description: The semantic version of the content that will be injected into + this hook. + type: string + status: + description: String describing the state of the hook function. When a hook + is ready and disabled is false it will be executed. + enum: + - ready + - create-queued + - create-running + - create-failed + - update-queued + - update-running + - update-failed + type: string + options: + $ref: '#/components/schemas/hook_options' + conditions: + description: An array of objects that let you limit the execution of a hook + to users in specific roles. + items: + $ref: '#/components/schemas/condition' + type: array + created_at: + description: ISO8601 format date that they hook function was created. + type: string + updated_at: + description: ISO8601 format date that they hook function was last updated. + type: string + required: + - disabled + - env_vars + - function + - packages + - retries + - runtime + - timeout + - type + type: object + generateToken_request: + properties: + grant_type: + default: client_credentials + description: Set to client_credentials. type: string - created_at: + required: + - grant_type + type: object + revokeTokens_request: + properties: + access_token: + description: |- + Set to the access token you want to revoke. + This access token must have been generated using the client_id and client_secret provided in the Authorization header. + example: xx508xx63817x752xx74004x30705xx92x58349x5x78f5xx34x8x614xxxx1451 type: string - custom_attributes: - type: object - invalid_login_attempts: + required: + - access_token + type: object + getRateLimit_200_response: + example: + data: + X-RateLimit-Remaining: 4988 + X-RateLimit-Reset: 832 + X-RateLimit-Limit: 5000 + status: + code: 200 + error: false + type: Success + message: Success + properties: + status: + $ref: '#/components/schemas/Error' + data: + $ref: '#/components/schemas/rate_limit' + type: object + addClientApp_request: + properties: + app_id: + description: The ID of the OpenId Connect app to allow access through. + example: 1026152 type: integer - locked_until: - type: string - password_changed_at: - type: string - password: - description: The password to set for a user. + scopes: + description: An array of Scope IDs that represent scopes the app can request + example: + - 31 + - 24 + items: + type: integer + type: array + type: object + addClientApp_201_response: + example: + api_auth_id: 1022697 + app_id: 909021 + properties: + app_id: + example: 909021 + type: integer + api_auth_id: + example: 1022697 + type: integer + type: object + updateClientApp_request: + properties: + scopes: + description: An array of Scope IDs the scopes the app can request + example: + - 123 + - 456 + items: + type: integer + type: array + type: object + getEvents_200_response_pagination: + example: + after_cursor: xWNjb3VudF9pZDo6OjUzNDEzLS0jI2lkOjo6OTA0MjU3NTQ2 + previous_link: "null" + before_cursor: "null" + next_link: https://your-api-subdomain.onelogin.com/api/1/events?after_cursor=xWNjb3VudF9pZDo6OjUzNDEzLS0jI2lkOjo6OTA0MjU3NTQ2 + properties: + before_cursor: + example: "null" type: string - password_confirmation: - description: Required if the password is being set. + after_cursor: + example: xWNjb3VudF9pZDo6OjUzNDEzLS0jI2lkOjo6OTA0MjU3NTQ2 type: string - password_algorithm: - description: Use this when importing a password that's already hashed. Prepend - the salt value to the cleartext password value before SHA-256-encoding - it + previous_link: + example: "null" type: string - salt: - description: The salt value used with the password_algorithm. + next_link: + example: https://your-api-subdomain.onelogin.com/api/1/events?after_cursor=xWNjb3VudF9pZDo6OjUzNDEzLS0jI2lkOjo6OTA0MjU3NTQ2 type: string type: object - mapping: + getEvents_200_response: example: - name: name - match: all - id: 0 - position: 6 - conditions: - - source: source - value: value - operator: operator - - source: source - value: value - operator: operator - actions: - - macro: macro - expression: expression - scriplet: scriplet - action: action - value: - - value - - value - - macro: macro - expression: expression - scriplet: scriplet - action: action - value: - - value - - value - enabled: true + pagination: + after_cursor: xWNjb3VudF9pZDo6OjUzNDEzLS0jI2lkOjo6OTA0MjU3NTQ2 + previous_link: "null" + before_cursor: "null" + next_link: https://your-api-subdomain.onelogin.com/api/1/events?after_cursor=xWNjb3VudF9pZDo6OjUzNDEzLS0jI2lkOjo6OTA0MjU3NTQ2 + data: + - privilege_id: 6 + risk_reasons: risk_reasons + notes: notes + assumed_by_superadmin_or_reseller: 5 + policy_id: 1 + service_directory_id: 9 + directory_sync_run_id: 9 + user_name: user_name + risk_cookie_id: risk_cookie_id + created_at: created_at + solved: true + client_id: client_id + event_type_id: 3 + otp_device_id: 1 + actor_user_id: 6 + certificate_id: 7 + resource_type_id: 1 + actor_user_name: actor_user_name + param: param + role_id: 5 + error_description: error_description + user_field_id: 6 + id: 4 + ipaddr: ipaddr + app_id: 5 + assuming_acting_user_id: 2 + proxy_ip: proxy_ip + risk_score: 4 + otp_device_name: otp_device_name + policy_name: policy_name + object_id: 1 + adc_id: 1 + app-name: app-name + role_name: role_name + custom_message: custom_message + policy_type: policy_type + account_id: 0 + group-name: group-name + group_id: 2 + user_id: 8 + resolved_at: resolved_at + mapping_id: 7 + radius_config_id: 7 + trusted_idp_id: 9 + actor_system: actor_system + - privilege_id: 6 + risk_reasons: risk_reasons + notes: notes + assumed_by_superadmin_or_reseller: 5 + policy_id: 1 + service_directory_id: 9 + directory_sync_run_id: 9 + user_name: user_name + risk_cookie_id: risk_cookie_id + created_at: created_at + solved: true + client_id: client_id + event_type_id: 3 + otp_device_id: 1 + actor_user_id: 6 + certificate_id: 7 + resource_type_id: 1 + actor_user_name: actor_user_name + param: param + role_id: 5 + error_description: error_description + user_field_id: 6 + id: 4 + ipaddr: ipaddr + app_id: 5 + assuming_acting_user_id: 2 + proxy_ip: proxy_ip + risk_score: 4 + otp_device_name: otp_device_name + policy_name: policy_name + object_id: 1 + adc_id: 1 + app-name: app-name + role_name: role_name + custom_message: custom_message + policy_type: policy_type + account_id: 0 + group-name: group-name + group_id: 2 + user_id: 8 + resolved_at: resolved_at + mapping_id: 7 + radius_config_id: 7 + trusted_idp_id: 9 + actor_system: actor_system + status: + code: 200 + error: false + type: Success + message: Success + properties: + status: + $ref: '#/components/schemas/Error' + pagination: + $ref: '#/components/schemas/getEvents_200_response_pagination' + data: + items: + $ref: '#/components/schemas/event' + type: array + type: object + getEventById_200_response: + example: + data: + privilege_id: 6 + risk_reasons: risk_reasons + notes: notes + assumed_by_superadmin_or_reseller: 5 + policy_id: 1 + service_directory_id: 9 + directory_sync_run_id: 9 + user_name: user_name + risk_cookie_id: risk_cookie_id + created_at: created_at + solved: true + client_id: client_id + event_type_id: 3 + otp_device_id: 1 + actor_user_id: 6 + certificate_id: 7 + resource_type_id: 1 + actor_user_name: actor_user_name + param: param + role_id: 5 + error_description: error_description + user_field_id: 6 + id: 4 + ipaddr: ipaddr + app_id: 5 + assuming_acting_user_id: 2 + proxy_ip: proxy_ip + risk_score: 4 + otp_device_name: otp_device_name + policy_name: policy_name + object_id: 1 + adc_id: 1 + app-name: app-name + role_name: role_name + custom_message: custom_message + policy_type: policy_type + account_id: 0 + group-name: group-name + group_id: 2 + user_id: 8 + resolved_at: resolved_at + mapping_id: 7 + radius_config_id: 7 + trusted_idp_id: 9 + actor_system: actor_system + status: + code: 200 + error: false + type: Success + message: Success + properties: + status: + $ref: '#/components/schemas/Error' + data: + $ref: '#/components/schemas/event' + type: object + getEventTypes_200_response_data_inner: + example: + name: APP_REMOVED_FROM_ROLE + description: App %app% removed from role %role% + id: 2 properties: - id: - type: integer name: - description: The name of the mapping. + example: APP_REMOVED_FROM_ROLE type: string - enabled: - description: Indicates if the mapping is enabled or not. - type: boolean - match: - description: Indicates how conditions should be matched. - enum: - - all - - any + description: + example: App %app% removed from role %role% type: string - position: - description: Indicates the order of the mapping. When `null` this will default - to last position. + id: + example: 2 type: integer - conditions: - description: An array of conditions that the user must meet in order for - the mapping to be applied. + type: object + getEventTypes_200_response: + example: + data: + - name: APP_REMOVED_FROM_ROLE + description: App %app% removed from role %role% + id: 2 + - name: APP_REMOVED_FROM_ROLE + description: App %app% removed from role %role% + id: 2 + status: + code: 200 + error: false + type: Success + message: Success + properties: + status: + $ref: '#/components/schemas/Error' + data: items: - $ref: '#/components/schemas/condition' + $ref: '#/components/schemas/getEventTypes_200_response_data_inner' type: array - actions: - description: An array of actions that will be applied to the users that - are matched by the conditions. + type: object + getGroups_200_response: + example: + data: + - reference: "null" + name: group.security.policy.default + id: 425741 + - reference: "null" + name: group.security.policy.default + id: 425741 + status: + code: 200 + error: false + type: Success + message: Success + properties: + status: + $ref: '#/components/schemas/Error' + data: items: - $ref: '#/components/schemas/action' + $ref: '#/components/schemas/group' type: array - required: - - actions - - contiditions - - enabled - - match - - name - - position type: object - mapping_id_list: - items: - type: integer - type: array - ip: - description: The IP address of the User's request. - type: string - user_agent: - description: The user agent of the User's request. - type: string - risk_user: - description: An Object containing User details. + getInviteLink_request: properties: - id: - description: A unique identifier for the user. - type: string - name: - description: A name for the user. + email: + description: Set to the user email address to generate an invite link. The + value is case sensitive. + example: jennifer.hasenfus@mycompany.com type: string - authenticated: - default: false - description: Indicates if the metadata supplied in this event should be - considered as trusted for the user. - type: boolean - required: - - id type: object - source: - description: "Used for targeting custom rules based on a group of people, customers,\ - \ accounts, or even a single user." + getInviteLink_200_response: example: - name: name - id: id + data: + - data + - data + status: + code: 200 + error: false + type: Success + message: Success properties: - id: - type: string - name: - description: The name of the source - type: string + status: + $ref: '#/components/schemas/Error' + data: + description: Provides reset password link + items: + type: string + type: array type: object - session: - description: "A dictionary of extra information that provides useful context\ - \ about the session, for example the session ID, or some cookie information." + sendInviteLink_request: properties: - id: - description: "If you use a database to track sessions, you can send us the\ - \ session ID." + email: + description: Set to the user email address to generate an invite link. The + value is case sensitive. + example: jennifer.hasenfus@mycompany.com + type: string + personal_email: + description: "To send an invite email to a different address than the one\ + \ provided in email, provide it here. The invite link is sent to this\ + \ address instead." + example: jennifer.hasenfus@mail.com type: string type: object - risk_device: - description: Information about the device being used. + sendInviteLink_200_response: + example: + status: + code: 200 + error: false + type: Success + message: Success properties: - id: - description: This device's unique identifier - type: string + status: + $ref: '#/components/schemas/Error' type: object - fp: - description: Set to the value of the __tdli_fp cookie. - type: string - risk_rule: + getUserApps_200_response_inner: example: + icon_url: icon_url + provisioning_enabled: true + login_id: 6 + provisioning_state: unknown + extension: true name: name - description: description - id: id - filters: - - filters - - filters - source: - name: name - id: id - type: blacklist - target: location.ip + provisioning_status: enabling + id: 0 properties: id: + description: The App ID + type: integer + icon_url: + description: A url for the icon that represents the app in the OneLogin + portal type: string + extension: + description: Boolean that indicates if the OneLogin browser extension is + required to launch this app. + type: boolean + login_id: + description: Unqiue identifier for this user and app combination. + type: integer name: - description: The name of this rule - type: string - description: + description: The name of the app. type: string - type: - description: The type parameter specifies the type of rule that will be - created. + provisioning_status: enum: - - blacklist - - whitelist + - enabling + - disabling + - enabling_pending_approval + - disabling_pendding_approval + - enabled + - disabled + - disabling_failed + - enabling_failed type: string - target: - description: The target parameter that will be used when evaluating the - rule against an incoming event. + provisioning_state: + description: If provisioning is enabled this indicates the state of provisioning + for the given user. enum: - - location.ip - - location.address.country_iso_code + - unknown + - provisioning + - modifying + - deleting + - provisioning_pending_approval + - deleting_pending_approval + - modifying_pending_approval + - linking + - provisioned + - deleted + - modifying_failed + - provisioning_failed + - deleting_failed + - linking_failed + - disabled + - nonexistent + - modifying_pending_approval_then_disabled type: string - filters: - description: A list of IP addresses or country codes or names to evaluate - against each event. + provisioning_enabled: + description: Indicates if provisioning is enabled for this app. + type: boolean + type: object + getUserRoles_200_response: + example: + data: + - 0 + - 0 + status: + code: 200 + error: false + type: Success + message: Success + properties: + status: + $ref: '#/components/schemas/Error' + data: + description: List of Role IDs that are assigned to the User items: - type: string + type: integer type: array - source: - $ref: '#/components/schemas/source' type: object - id_5: - type: string - condition: - example: - source: source - value: value - operator: operator + updatePasswordInsecure_request: properties: - source: - description: The source field to check. - type: string - operator: - description: A valid operator for the selected condition source + password: + description: |- + Set to the password value using cleartext. + Hashes are never stored as cleartext. They are stored securely using cryptographic hash. OneLogin continuously upgrades the strength of the hash. Ensure that the value meets the password strength requirements set for the account. + example: type: string - value: - description: A plain text string or valid value for the selected condition - source. + password_confirmation: + description: Ensure that this value matches the password value exactly. + example: type: string + validate_policy: + default: false + description: Will passwords validate against the User Policy. Defaults to + false. + example: false + type: boolean + required: + - password + - password_confirmation type: object - action: - example: - macro: macro - expression: expression - scriplet: scriplet - action: action - value: - - value - - value + updatePasswordSecure_request: properties: - action: - description: The action to apply + password: + description: |- + Set to the password value using a SHA-256-encoded value. If you are including your own password_salt value in your request, prepend the salt value to the cleartext password value before SHA-256-encoding it. + For example, if your salt value is hello and your cleartext password value is password, the value you need to SHA-256-encode is hellopassword. The resulting encoded value would be b1c788abac15390de987ad17b65ac73c9b475d428a51f245c645a442fddd078b. + Note that the alpha characters in this has must all be lower case. + example: xxxxx637aead4030a653f29dae62f1542d67484342c00627a65066e05c5f0 type: string - value: - description: Only applicable to provisioned and set_* actions. Items in - the array will be a plain text string or valid value for the selected - action. - items: - type: string - type: array - expression: - description: "A regular expression to extract a value. Applies to provisionable,\ - \ multi-selects, and string actions." + password_confirmation: + description: This value must match the password value. + example: xxxxx637aead4030a653f29dae62f1542d67484342c00627a65066e05c5f0 type: string - scriplet: - description: A hash containing scriptlet code that returns a value. + password_algorithm: + description: Set to salt+sha256. + example: salt+sha256 type: string - macro: - description: "A template to construct a value. Applies to default, string,\ - \ and list actions." + password_salt: + description: |- + Optional. If your password hash has been salted then you can provide the salt used in this param. + This assumes that the salt was prepended to the password before doing the SHA256 hash. + The API supports a salt value that is up to 40 characters long. + example: 11xxxx1 type: string + required: + - password + - password_algorithm + - password_confirmation type: object - generateToken_request: + getCustomAttributes_200_response: + example: + data: + - - alias + - branch + status: + code: 200 + error: false + type: Success + message: Success properties: - grant_type: - enum: - - client_credentials - type: string + status: + $ref: '#/components/schemas/Error' + data: + description: |- + Provides a list of custom attribute fields (also known as custom user fields) that are available for your account. + The values returned correspond to the values you provided in the Shortname field when you defined the custom user field. + For details about defining custom user fields, see Custom User Fields. + example: + - - alias + - branch + items: + items: + type: string + type: array + type: array type: object - generateToken_200_response: + getMFAFactors_200_response_data_auth_factors_inner: example: - access_token: access_token - refresh_token: refresh_token - created_at: created_at - token_type: token_type - expires_in: 0 - accountt_id: 6 + name: Onelogin SMS + factor_id: 16282 properties: - access_token: - type: string - created_at: - type: string - expires_in: - type: integer - refresh_token: - type: string - token_type: + name: + description: "Official authentication factor name, as it appears to administrators\ + \ in OneLogin." + example: Onelogin SMS type: string - accountt_id: + factor_id: + description: Identifier for the factor which will be used for user enrollment + example: 16282 type: integer + getMFAFactors_200_response_data: + example: + auth_factors: + - name: Onelogin SMS + factor_id: 16282 + - name: Onelogin SMS + factor_id: 16282 + properties: + auth_factors: + items: + $ref: '#/components/schemas/getMFAFactors_200_response_data_auth_factors_inner' + type: array type: object - generateToken_400_response: + getMFAFactors_200_response: example: + data: + auth_factors: + - name: Onelogin SMS + factor_id: 16282 + - name: Onelogin SMS + factor_id: 16282 status: - code: 0 - error: true - type: type - message: message + code: 200 + error: false + type: Success + message: Success properties: status: - $ref: '#/components/schemas/status' + $ref: '#/components/schemas/Error' + data: + $ref: '#/components/schemas/getMFAFactors_200_response_data' type: object - revokeToken_request: + lockAccountUser_request: properties: - access_token: - type: string + locked_until: + description: |- + Set to the number of minutes for which you want to lock the user account. + Set to 0 if you want to lock the user account based on the Lock effective period set in the policy assigned to the user. + If no policy is assigned to the user, setting this value to 0 will lock the user’s account until you unlock it + Note that this value can not be less time that the Lock Effective Period specified on a user policy. + example: 15 + type: integer + required: + - locked_until type: object - getRateLimit_200_response_data: + getEnrolledFactors_200_response_data_otp_devices_inner: example: - X-RateLimit-Remaining: 6 - X-RateLimit-Reset: 1 - X-RateLimit-Limit: 0 + type_display_name: Onelogin SMS + default: false + needs_trigger: true + active: true + state_token: f2402de2b446abd86ea5aa1f79b3fa72b4befacd + phone_number: +1xxxxxxxxxx + auth_factor_name: Onelogin SMS + id: 525509 + user_display_name: Rich's Phone properties: - X-RateLimit-Limit: - type: integer - X-RateLimit-Remaining: - type: integer - X-RateLimit-Reset: + active: + description: True = enabled (used successfully for authentication at least + once). False = pending (registered but never used). + example: true + type: boolean + default: + description: True = is user’s default MFA device for OneLogin. + example: false + type: boolean + state_token: + description: A short lived token that is required to Verify the Factor. + This token expires in 120 seconds. + example: f2402de2b446abd86ea5aa1f79b3fa72b4befacd + type: string + auth_factor_name: + description: "\"Official\" authentication factor name, as it appears to\ + \ administrators in OneLogin." + example: Onelogin SMS + type: string + phone_number: + description: "For OTP codes sent via SMS, the phone number receiving the\ + \ SMS message." + example: +1xxxxxxxxxx + type: string + type_display_name: + description: "Authentication factor display name as it appears to users\ + \ upon initial registration, as defined by admins at Settings > Authentication\ + \ Factors." + example: Onelogin SMS + type: string + needs_trigger: + description: |- + true: You MUST Activate this Factor to trigger an SMS or Push notification before Verifying the OTP code. false: No Activation required. You can Verify the OTP immediately. + MFA factors that provide both push notifications (user accepts notification) and pull code submission (user initiates code submission from device or enters it manually) should appear twice; once with needs_trigger: true and once with needs_trigger: false. + example: true + type: boolean + user_display_name: + description: Authentication factor display name assigned by users when they + enroll the device. + example: Rich's Phone + type: string + id: + description: MFA device identifier. + example: 525509 type: integer + getEnrolledFactors_200_response_data: + example: + otp_devices: + - type_display_name: Onelogin SMS + default: false + needs_trigger: true + active: true + state_token: f2402de2b446abd86ea5aa1f79b3fa72b4befacd + phone_number: +1xxxxxxxxxx + auth_factor_name: Onelogin SMS + id: 525509 + user_display_name: Rich's Phone + - type_display_name: Onelogin SMS + default: false + needs_trigger: true + active: true + state_token: f2402de2b446abd86ea5aa1f79b3fa72b4befacd + phone_number: +1xxxxxxxxxx + auth_factor_name: Onelogin SMS + id: 525509 + user_display_name: Rich's Phone + properties: + otp_devices: + items: + $ref: '#/components/schemas/getEnrolledFactors_200_response_data_otp_devices_inner' + type: array type: object - getRateLimit_200_response: + getEnrolledFactors_200_response: example: data: - X-RateLimit-Remaining: 6 - X-RateLimit-Reset: 1 - X-RateLimit-Limit: 0 + otp_devices: + - type_display_name: Onelogin SMS + default: false + needs_trigger: true + active: true + state_token: f2402de2b446abd86ea5aa1f79b3fa72b4befacd + phone_number: +1xxxxxxxxxx + auth_factor_name: Onelogin SMS + id: 525509 + user_display_name: Rich's Phone + - type_display_name: Onelogin SMS + default: false + needs_trigger: true + active: true + state_token: f2402de2b446abd86ea5aa1f79b3fa72b4befacd + phone_number: +1xxxxxxxxxx + auth_factor_name: Onelogin SMS + id: 525509 + user_display_name: Rich's Phone status: - code: 0 - error: true - type: type - message: message + code: 200 + error: false + type: Success + message: Success properties: status: - $ref: '#/components/schemas/status' + $ref: '#/components/schemas/Error' data: - $ref: '#/components/schemas/getRateLimit_200_response_data' + $ref: '#/components/schemas/getEnrolledFactors_200_response_data' type: object - listAuthorizationServers_200_response_inner_configuration: + enrollMfaFactor_200_response: example: - resource_identifier: resource_identifier - audiences: - - audiences - - audiences + data: + - type_display_name: Onelogin SMS + default: false + needs_trigger: true + active: true + state_token: f2402de2b446abd86ea5aa1f79b3fa72b4befacd + phone_number: +1xxxxxxxxxx + auth_factor_name: Onelogin SMS + id: 525509 + user_display_name: Rich's Phone + - type_display_name: Onelogin SMS + default: false + needs_trigger: true + active: true + state_token: f2402de2b446abd86ea5aa1f79b3fa72b4befacd + phone_number: +1xxxxxxxxxx + auth_factor_name: Onelogin SMS + id: 525509 + user_display_name: Rich's Phone + status: + code: 200 + error: false + type: Success + message: Success properties: - resource_identifier: - type: string - audiences: + status: + $ref: '#/components/schemas/Error' + data: items: - type: string + $ref: '#/components/schemas/getEnrolledFactors_200_response_data_otp_devices_inner' type: array type: object - listAuthorizationServers_200_response_inner: - example: - configuration: - resource_identifier: resource_identifier - audiences: - - audiences - - audiences - name: name - description: description - id: 0 + generateMFAtoken_request: properties: - id: + expires_in: + description: |- + Set the duration of the token in seconds. + Token expiration defaults to 259200 seconds = 72 hours. 72 hours is the max value. + example: 300 type: integer - name: - type: string - configuration: - $ref: '#/components/schemas/listAuthorizationServers_200_response_inner_configuration' - description: - type: string + reusable: + default: false + description: |- + Defines if the token is reusable multiple times within the expiry window. + Value defaults to false. If set to true, token can be used multiple times, until it expires. + example: false + type: boolean type: object - createAuthorizationServer_request: + generateMFAtoken_200_response: + example: + expires_at: 2019-01-16T22:16:38.000Z + mfa_token: "55647655" + resuable: true properties: - name: + mfa_token: + description: Token can function as a temporary MFA token. It can be used + to authenticate for any app when valid. + example: "55647655" type: string - description: + resuable: + description: "true indcates the token can be used multiple times, until\ + \ it expires. false indicates the token is invalid after a single use\ + \ or once it expires. Defaults to false." + example: true + type: boolean + expires_at: + description: Defines the expiration time and date for the token. Format + is UTC time. + example: 2019-01-16T22:16:38.000Z type: string - configuration: - $ref: '#/components/schemas/auth_server_configuration' type: object - getAuthorizationServer_200_response: - example: - configuration: - access_token_expiration_minutes: 6 - resource_identifier: resource_identifier - audiences: - - audiences - - audiences - refresh_token_expiration_minutes: 0 - name: name - description: description - id: 1 + addRolesToUser_request: properties: - configuration: - $ref: '#/components/schemas/auth_server_configuration' - id: + role_id_array: + description: Set to an array of one or more role IDs. The IDs must be positive + integers. + items: + type: integer + type: array + required: + - role_id_array + type: object + setUserState_request: + properties: + state: + description: |- + Set to the state value. Valid values include: + - 0 : Unapproved + - 1 : Approved + - 2 : Rejected + - 3 : Unlicensed + enum: + - 0 + - 1 + - 2 + - 3 + example: 1 type: integer - description: - type: string - name: - type: string + required: + - state + type: object + removeUserRole_request_role_id_array_inner: + properties: + role_id: + type: integer + removeUserRole_request: + properties: + role_id_array: + items: + $ref: '#/components/schemas/removeUserRole_request_role_id_array_inner' + type: array + required: + - role_id_array type: object - updateAuthorizationServer_400_response: + verifyMfaFactor_request: properties: - field: + state_token: + description: |- + The state_token is returned after a successful request to Enroll a Factor or Activate a Factor. The state_token MUST be provided if the needs_trigger attribute from the proceeding calls is set to true. + Note that the state_token expires 120 seconds after creation. If the token is expired you will need to Activate the Factor again. + example: 98e008497066bc2763c52342996e06358aab2e32 type: string - message: + otp_token: + description: |- + OTP code provided by the device or SMS message sent to user. + When a device like OneLogin Protect that supports Push has been used you do not need to provide the otp_token and can keep polling this endpoint until the state_token expires. + example: B41832 type: string - statusCode: - type: integer - name: + type: object + activateMfaFactors_request: + properties: + state_token_expires_in: + description: |- + Optional. Sets the window of time in seconds that the factor must be verified within. + Defaults to 120 seconds (2 minutes). Max 900 seconds (15 minutes). + example: 300 + type: integer + numeric_sms_otp: + description: |- + Optional. Defaults to false. Only applies to SMS factor. + When set to `true` a 6 digit numeric code will be sent to the user instead of the standard code which is alphanumeric. + example: true + type: boolean + sms_message: + description: |- + Optional. Only applies to SMS factor. + A message template that will be sent via SMS. Max length of the message after template items are inserted is 160 characters. + The following template variables can be included in the message. + - {{otp_code}} - The security code. - {{expiration}} - The number of minutes until the one time code expires. + example: "This is a security code from ABC Co {{otp_code}}. It expires in\ + \ {{expiration}} minutes." type: string type: object - listAccessTokenClaims_200_response_inner: + createPrivilege_200_response: example: - default_values: default_values - provisioned_entitlements: true - attributes_transformations: attributes_transformations - values: - - values - - values - user_attribute_macros: user_attribute_macros - skip_if_blank: true - id: 0 - label: label - user_attribute_mappings: user_attribute_mappings + id: 5e43a548-e9c6-47be-9341-92160902f7a6 properties: id: - type: integer - label: + description: Privilege Id + example: 5e43a548-e9c6-47be-9341-92160902f7a6 type: string - user_attribute_mappings: + type: object + updatePrivilege_200_response: + example: + id: id + properties: + id: + description: Privilege ID type: string - user_attribute_macros: + type: object + listPrivelegeRoles_200_response: + example: + total: 0 + previousLink: previousLink + beforeCursor: 1 + roles: + - 6 + - 6 + afterCursor: 5 + nextLink: nextLink + properties: + total: + type: integer + roles: + items: + type: integer + type: array + beforeCursor: + nullable: true + type: integer + previousLink: + nullable: true type: string - attributes_transformations: + afterCursor: + nullable: true + type: integer + nextLink: + nullable: true type: string - skip_if_blank: - type: boolean - values: + type: object + addPrivilegeToRole_request: + example: + roles: + - 123 + - 456 + - 789 + properties: + roles: items: - type: string + type: integer type: array - default_values: - type: string - provisioned_entitlements: - type: boolean type: object - addAccessTokenClaim_request: + addPrivilegeToRole_201_response: + example: + success: true properties: - name: - type: string - user_attribute_mappings: - type: string - user_attribute_macros: - type: string + success: + example: true + type: boolean type: object - listScopes_200_response_inner: + getAssignedUser_200_response: example: - description: description - id: 0 - value: value + total: 0 + previousLink: previousLink + beforeCursor: 1 + afterCursor: 5 + users: + - 6 + - 6 + nextLink: nextLink properties: - id: + total: type: integer - value: + users: + items: + type: integer + type: array + beforeCursor: + nullable: true + type: integer + previousLink: + nullable: true type: string - description: + afterCursor: + nullable: true + type: integer + nextLink: + nullable: true type: string type: object - addScope_request: + assignUsersToPrivilege_request: properties: - value: - type: string - description: - type: string + users: + items: + type: integer + type: array type: object - getClientApps_200_response_inner_scopes_inner: + getRoleByName_200_response_pagination: example: - description: description - id: 0 - value: value + after_cursor: xWNjb3VudF9pZDo6OjUzNDEzLS0jI2lkOjo6OTA0MjU3NTQ2 + previous_link: '""' + before_cursor: '""' + next_link: https://your-api-subdomain.onelogin.com/api/1/events?after_cursor=xWNjb3VudF9pZDo6OjUzNDEzLS0jI2lkOjo6OTA0MjU3NTQ2 properties: - description: + after_cursor: + example: xWNjb3VudF9pZDo6OjUzNDEzLS0jI2lkOjo6OTA0MjU3NTQ2 type: string - value: + before_cursor: + example: '""' + type: string + next_link: + example: https://your-api-subdomain.onelogin.com/api/1/events?after_cursor=xWNjb3VudF9pZDo6OjUzNDEzLS0jI2lkOjo6OTA0MjU3NTQ2 type: string + previous_link: + example: '""' + type: string + type: object + getRoleByName_200_response_data_inner: + properties: id: + description: Role ID type: integer + name: + description: Role Name + type: string type: object - getClientApps_200_response_inner: + getRoleByName_200_response: example: - name: name - scopes: - - description: description - id: 0 - value: value - - description: description - id: 0 - value: value - api_auth_id: 1 - app_id: 6 + pagination: + after_cursor: xWNjb3VudF9pZDo6OjUzNDEzLS0jI2lkOjo6OTA0MjU3NTQ2 + previous_link: '""' + before_cursor: '""' + next_link: https://your-api-subdomain.onelogin.com/api/1/events?after_cursor=xWNjb3VudF9pZDo6OjUzNDEzLS0jI2lkOjo6OTA0MjU3NTQ2 + data: + - id: 1111 + name: C-Executive + - id: 1112 + name: Contractor + - id: 1113 + name: Default + - id: 1114 + name: Employee + status: + code: 200 + error: false + type: Success + message: Success properties: - scopes: + status: + $ref: '#/components/schemas/Error' + pagination: + $ref: '#/components/schemas/getRoleByName_200_response_pagination' + data: + example: + - id: 1111 + name: C-Executive + - id: 1112 + name: Contractor + - id: 1113 + name: Default + - id: 1114 + name: Employee items: - $ref: '#/components/schemas/getClientApps_200_response_inner_scopes_inner' + $ref: '#/components/schemas/getRoleByName_200_response_data_inner' type: array - app_id: + type: object + getRoleById_200_response_data_inner: + example: + name: Employee + id: 123456 + properties: + id: + description: role's unique ID in Onelogin + example: 123456 type: integer name: + description: Role name + example: Employee type: string - api_auth_id: - type: integer type: object - addClientApp_request: + getRoleById_200_response: + example: + data: + - name: Employee + id: 123456 + - name: Employee + id: 123456 + status: + code: 200 + error: false + type: Success + message: Success properties: - app_id: - type: integer - scopes: + status: + $ref: '#/components/schemas/Error' + data: items: - type: integer + $ref: '#/components/schemas/getRoleById_200_response_data_inner' type: array type: object - updateClientApp_request: + generateSamlAssert_200_response: + example: + data: + - "{}" + - "{}" + status: + code: 200 + error: false + type: Success + message: Success properties: - scopes: + status: + $ref: '#/components/schemas/Error' + data: items: - type: integer + type: object type: array type: object - listAppUsers_200_response_inner: + verFactorSaml_200_response: example: - firstname: firstname - id: 0 - email: email - lastname: lastname - username: username + data: PHNhbWxwOlJlc3BvbnNlIHhtbG5zOnNhbWw9InVybjpvYXNpczpuYW1lczp0YzpTQU1MOjIuMDphc3NlcnRpb24iIHhtbG5zOnNhbWxwPSJ1cm46b2FzaXM6bmFtZXM6dGM6U0FNTDoyLjA6cHJvdG9jb2wiIElEPSJSZjE5Y2EyMTI0ZGMxNzJmNzhmMjI3OTk3YzMwOTBkODVkNzFjYWMzOCIgVmVyc2lvbj0iMi4wIiBJc3N1ZUluc3RhbnQ9IjIwMjAtM + message: SMS token sent to your mobile device. Authentication pending properties: - firstname: - type: string - id: - type: integer - email: - type: string - lastname: + data: + description: Provides the SAML assertion. + example: PHNhbWxwOlJlc3BvbnNlIHhtbG5zOnNhbWw9InVybjpvYXNpczpuYW1lczp0YzpTQU1MOjIuMDphc3NlcnRpb24iIHhtbG5zOnNhbWxwPSJ1cm46b2FzaXM6bmFtZXM6dGM6U0FNTDoyLjA6cHJvdG9jb2wiIElEPSJSZjE5Y2EyMTI0ZGMxNzJmNzhmMjI3OTk3YzMwOTBkODVkNzFjYWMzOCIgVmVyc2lvbj0iMi4wIiBJc3N1ZUluc3RhbnQ9IjIwMjAtM type: string - username: + message: + description: Plain text description describing the outcome of the response. + example: SMS token sent to your mobile device. Authentication pending type: string type: object - listConditions_200_response_inner: + listMappingConditions_200_response: example: - name: name - value: value + name: MemberOf + value: member_of properties: name: - description: The name of the Condition. + description: Name of Condition + example: MemberOf type: string value: description: The unique identifier of the condition. This should be used - when defining conditions for a rule. + when defining conditions for a User Mapping + example: member_of type: string type: object - listConditionOperators_200_response_inner: + listMappingConditionsOperators_200_response_inner: example: - name: name - value: value + name: equals + value: = properties: name: - description: The name or description of the operator. + description: Name or description of operator + example: equals type: string value: description: The condition operator value to use when creating or updating - App Rules. + User Mappings. + example: = type: string - type: object - listConditionValues_200_response_inner: + listMappingContionValues_200_response_inner: example: - name: name - value: value + name: default + value: 199848 properties: name: + description: Name or description of operator + example: default type: string value: - type: string - type: object - listActions_200_response_inner: + description: The condition operator value to use when creating or updating + User Mappings. + example: 199848 + type: integer + listMappingsActions_200_response_inner: example: - name: name - value: value + name: set Role + value: add_role properties: name: - description: The name of the Action. + description: Name of the action + example: set Role type: string value: description: The unique identifier of the action. This should be used when defining actions for a User Mapping. + example: add_role type: string - type: object - getAvailableFactors_200_response_inner: + listMappingActionValues_200_response_inner: example: - name: name - factor_id: 0 - auth_factor_name: auth_factor_name + name: default + value: 199848 properties: - factor_id: - description: Identifier for the factor which will be used for user enrollment - type: integer name: - description: "Authentication factor name, as it appears to administrators\ - \ in OneLogin." + description: Name or description of operator + example: default type: string - auth_factor_name: - description: Internal use only - type: string - type: object - enrollFactor_request: + value: + description: The action operator value to use when creating or updating + User Mappings. + example: 199848 + type: integer + createApp_request: + oneOf: + - $ref: '#/components/schemas/oidc_app' + - $ref: '#/components/schemas/saml_app' + - $ref: '#/components/schemas/generic-app' + createApp_200_response: + discriminator: + mapping: + "0": '#/components/schemas/generic-app' + "1": '#/components/schemas/generic-app' + "2": '#/components/schemas/saml_app' + "3": '#/components/schemas/generic-app' + "4": '#/components/schemas/generic-app' + "5": '#/components/schemas/generic-app' + "6": '#/components/schemas/generic-app' + "7": '#/components/schemas/generic-app' + "8": '#/components/schemas/oidc_app' + propertyName: auth_method + oneOf: + - $ref: '#/components/schemas/oidc_app' + - $ref: '#/components/schemas/saml_app' + - $ref: '#/components/schemas/generic-app' + listConditions_200_response_inner: + example: + name: MemberOf + value: member_of properties: - factor_id: - description: The identifier of the factor to enroll the user with. - type: integer - display_name: - description: A name for the users device. - type: string - expires_in: - description: "Defaults to 120. Valid values are: 120-900 seconds." - type: string - verified: - description: Defaults to false. - type: boolean - redirect_to: - description: Redirects MagicLink success page to specified URL after 2 seconds. + name: + description: Name of the rule condition + example: MemberOf type: string - custom_message: - description: A message template that will be sent via SMS. Max length of - the message after template items are inserted is 160 characters including - the OTP code. + value: + description: The unique identifier of the condition. This should be used + when defining conditions for a rule. + example: member_of type: string - required: - - display_name - - factor_id type: object - verifyEnrollment_request: + updateRiskRule_request: properties: - otp: - type: integer + id: + description: The ID of the Rule to Update + type: string type: object - activateFactor_request: + trackRiskEvent_request: properties: - device_id: - description: Required. Specifies the factor to be verified. - type: integer - expires_in: - description: 'Optional. Sets the window of time in seconds that the factor - must be verified within. ' - type: integer - redirect_to: - description: Optional. Only applies to Email MagicLink factor. + verb: + description: Verbs are used to distinguish between different types of events. type: string - custom_message: - description: Optional. Only applies to SMS factor. A message template that - will be sent via SMS. + ip: + description: The IP address of the User's request. type: string - type: object - verifyFactorVoice_200_response_inner: - example: - device_id: device_id - id: id - status: pending - properties: - id: + user_agent: + description: The user agent of the User's request. type: string - status: - enum: - - pending - - accepted - - rejected + user: + $ref: '#/components/schemas/risk_user' + source: + $ref: '#/components/schemas/source' + session: + $ref: '#/components/schemas/session' + device: + $ref: '#/components/schemas/risk_device' + fp: + description: Set to the value of the __tdli_fp cookie. type: string - device_id: + published: + description: Date and time of the event in IS08601 format. Useful for preloading + old events. Defaults to date time this API request is received. type: string + required: + - ip + - user + - user_agent + - verb type: object - verifyFactor_request: + getRiskScores_200_response_scores: + example: + minimal: 0 + high: 5 + low: 6 + very_high: 5 + medium: 1 properties: - otp: - description: OTP code provided by the device or SMS message sent to user. - type: string - device_id: - description: ID of the specified device which has been registerd for the - given user. + minimal: + type: integer + low: + type: integer + medium: + type: integer + high: + type: integer + very_high: type: integer type: object - generateMfaToken_request: + getRiskScores_200_response: + example: + total: 2 + scores: + minimal: 0 + high: 5 + low: 6 + very_high: 5 + medium: 1 properties: - expires_in: - description: Set the duration of the token in seconds. - type: string - reusable: - description: Defines if the token is reusable multiple times within the - expiry window. - type: boolean + scores: + $ref: '#/components/schemas/getRiskScores_200_response_scores' + total: + type: integer type: object - generateMfaToken_200_response: - example: - expires_at: expires_at - device_id: device_id - mfa_token: mfa_token - reusable: true + getRiskScore_request: properties: - mfa_token: - description: Token can function as a temporary MFA token. It can be used - to authenticate for any app when valid. + ip: + description: The IP address of the User's request. type: string - reusable: - description: true indcates the token can be used multiple times. false indicates - the token is invalid after a single use - type: boolean - expires_at: - description: Defines the expiration time and date for the token. Format - is UTC time. + user_agent: + description: The user agent of the User's request. type: string - device_id: - description: Defines the expiration time and date for the token. Format - is UTC time. + user: + $ref: '#/components/schemas/risk_user' + source: + $ref: '#/components/schemas/source' + session: + $ref: '#/components/schemas/session' + device: + $ref: '#/components/schemas/risk_device' + fp: + description: Set to the value of the __tdli_fp cookie. type: string + required: + - ip + - user + - user_agent type: object - generateMfaToken_422_response_details: + getRiskScore_200_response: + example: + score: 8.008281904610115 + triggers: + - triggers + - triggers properties: - parameters: + score: + description: A risk score 0 is low risk and 100 is the highest risk level + possible. + maximum: 100 + minimum: 0 + type: number + triggers: + description: Triggers are indicators of some of the key items that influenced + the risk score. items: type: string type: array type: object - generateMfaToken_422_response: - properties: - statusCode: - type: integer - name: - type: string - message: - type: string - details: - $ref: '#/components/schemas/generateMfaToken_422_response_details' - type: object - createRoles_201_response_inner: + verifyUserRegistration_request: example: - id: 0 + otp: 58959 properties: - id: + otp: + description: One-Time-Password (OTP) that was sent to the user based on + the chosen factor. OneLogin SMS and OneLogin Email support this OTP code. type: integer type: object - updateRole_200_response: + verifyUserRegistration_200_response: example: - id: 0 + device_id: "3926157" + id: 44aa6883-5048-4cd5-8cb2-64d47784230c + status: accepted properties: id: - type: integer + description: Registration identifier. + example: 44aa6883-5048-4cd5-8cb2-64d47784230c + type: string + status: + description: pending registration has not been completed successfully. accepted + registration has successfully completed. + example: accepted + type: string + device_id: + description: Device id to be used with Verify the Factor. + example: "3926157" + type: string type: object - setRoleApps_200_response_inner: - example: - id: 0 + createFactorRegistration_request: properties: - id: - description: Apps unique ID in OneLogin. + factor_id: + description: The identifier of the factor to enroll the user with. See Get + Available Factors for a list of possible id values. + example: 58959 type: integer + display_name: + description: A name for the users device + example: OneLogin SMS + type: string + expires_in: + description: "Defaults to 120. Valid values are: 120-900 seconds." + type: string + verified: + description: |- + Defaults to false. The following factors support verified = true as part of the initial registration request: OneLogin SMS, OneLogin Voice, OneLogin Email. When using verified = true it is critical that the supported factors have pre-verified values, most likely imported from an existing directory or by the users themselvdes. + Factors such as Authenticator and OneLogin Protect do not support verification = true as the user interaction is required to verify the factor. + type: boolean + redirect_to: + description: Only applies to Email MagicLink factor. Redirects MagicLink + success page to specified URL after 2 seconds. Email must already be configured + by the user. + type: string + custom_message: + description: |- + Only applies to SMS factor. + A message template that will be sent via SMS. Max length of the message after template items are inserted is 160 characters including the OTP code. SMS must already be configured by the user. + The following template variables can be included in the message. - {{otp_code}} - The security code. - {{otp_expiry}} - The number of minutes until the one time code expires. + type: string + required: + - display_name + - factor_id type: object - addRoleUsers_200_response_inner: + createFactorRegistration_201_response: example: - id: 0 - properties: - id: - type: integer - type: object - removeRoleUsers_request: - properties: - user_id: - items: - $ref: '#/components/schemas/id_2' - type: array - type: object - generateSamlAssertion_request: + type_display_name: OneLogin Voice + device_id: "3920373" + user_id: 5a0ba80a-39a1-4627-9a8b-1273278b34ee + auth_factor_name: OneLogin Voice + id: 5a0ba80a-39a1-4627-9a8b-1273278b34ee + user_display_name: OneLogin Voice properties: - username_or_email: - description: Set this to the username or email of the OneLogin user accessing - the app for which you want to generate a SAML token. + device_id: + description: MFA device identifier. + example: "3920373" type: string - password: - description: Password of the OneLogin user accessing the app for which you - want to generate a SAML token. + user_display_name: + description: Authentication factor display name assigned by users when they + register the device. + example: OneLogin Voice type: string - app_id: - description: App ID of the app for which you want to generate a SAML token. - This is the app ID in OneLogin. + type_display_name: + description: "Authentication factor display name as it appears to users\ + \ upon initial registration, as defined by admins at Settings > Authentication\ + \ Factors." + example: OneLogin Voice type: string - subdomain: - description: Set to the subdomain of the OneLogin user accessing the app - for which you want to generate a SAML token. + auth_factor_name: + description: "Authentication factor name, as it appears to administrators\ + \ in OneLogin." + example: OneLogin Voice type: string - ip_address: - description: "Whitelisted IP address, if MFA is required and you need to\ - \ honor IP address whitelisting defined in MFA policies." + id: + description: Verification identifier used in subsequent verification step. + example: 5a0ba80a-39a1-4627-9a8b-1273278b34ee + type: string + user_id: + description: User identifier + example: 5a0ba80a-39a1-4627-9a8b-1273278b34ee type: string - required: - - app_id - - password - - subdomain - - username_or_email type: object - verifyFactorSaml_request: + getAuthenticationDevices_200_response_inner: + example: + type_display_name: OneLogin Voice + default: false + device_id: "3920373" + auth_factor_name: OneLogin Voice + user_display_name: OneLogin Voice properties: - app_id: - description: App ID of the app for which you want to generate a SAML token. - This is the app ID in OneLogin. - type: string device_id: - description: Provide the MFA device_id you are submitting for verification. - The device_id is supplied by the Generate SAML Assertion API. + description: MFA device identifier. + example: "3920373" type: string - state_token: - description: state_token associated with the MFA device_id you are submitting. - The state_token is supplied by the Generate SAML Assertion API. + user_display_name: + description: Authentication factor display name assigned by users when they + register the device. + example: OneLogin Voice type: string - otp_token: - description: Provide the OTP value for the MFA factor you are submitting - for verification. + type_display_name: + description: "Authentication factor display name as it appears to users\ + \ upon initial registration, as defined by admins at Settings > Authentication\ + \ Factors." + example: OneLogin Voice type: string - do_not_notify: - description: "When verifying MFA via Protect Push, set this to true to stop\ - \ additional push notifications being sent to the OneLogin Protect device." + auth_factor_name: + description: "Authentication factor name, as it appears to administrators\ + \ in OneLogin." + example: OneLogin Voice + type: string + default: + default: false + description: true = is user’s default MFA device for OneLogin. type: boolean - required: - - app_id - - device_id - - state_token type: object - verifyFactorSaml_200_response: + getUserVerification_200_response: example: - data: data - message: message + device_id: "331991" + id: 5a0ba80a-39a1-4627-9a8b-1273278b34ee + status: pending properties: - data: - description: Provides the SAML assertion. + id: + description: registration identifier + example: 5a0ba80a-39a1-4627-9a8b-1273278b34ee type: string - message: - description: Plain text description describing the outcome of the response. + status: + description: "pending = has not been completed. accepted registration has\ + \ successfully completed, rejected user has denied the MFA attempt or\ + \ incorrectly provided the OneLogin Voice OTP code." + example: pending + type: string + device_id: + description: Device Id to be used with verify factor + example: "331991" type: string type: object - createEnvironmentVariable_request: + verifyUserVerification_request: properties: - name: - description: The name for the environment variable that will be used to - retrieve the value from a hook function. - type: string - value: - description: The secret value that will be encrypted at rest and injected - in applicable hook functions at run time. + otp: + description: OTP code provided by the device or SMS message sent to user. + example: "123456" type: string - required: - - name - - value + device_id: + description: ID of the specified device which has been registerd for the + given user. Available on Get Devices API call. + example: 98765 + type: integer type: object - updateEnvironmentVariable_request: + createDeviceVerification_request: properties: - value: - description: The secret value that will be encrypted at rest and injected - in applicable hook functions at run time. + device_id: + description: Specifies the factor to be verified. + example: 58959 + type: integer + display_name: + description: A name for the users device + example: OneLogin SMS + type: string + expires_in: + description: "Defaults to 120. Valid values are: 120-900 seconds." + type: string + redirect_to: + description: Only applies to Email MagicLink factor. Redirects MagicLink + success page to specified URL after 2 seconds. Email must already be configured + by the user. + type: string + custom_message: + description: |- + Only applies to SMS factor. + A message template that will be sent via SMS. Max length of the message after template items are inserted is 160 characters including the OTP code. SMS must already be configured by the user. + The following template variables can be included in the message. - {{otp_code}} - The security code. - {{otp_expiry}} - The number of minutes until the one time code expires. type: string required: - - value + - device_id type: object - getUserApps_200_response_inner: + createDeviceVerification_201_response: example: - icon_url: icon_url - provisioning_enabled: true - login_id: 6 - provisioning_state: unknown - extension: true - name: name - provisioning_status: enabling - id: 0 + type_display_name: OneLogin Voice + expires_at: 2020-07-11T22:24:50Z + device_id: 58959 + id: 44aa6883-5048-4cd5-8cb2-64d47784230c + auth_factor_name: OneLogin Voice + display_name: OneLogin SMS + user_display_name: OneLogin Voice + redirect_to: redirect_to properties: - id: - description: The App ID + device_id: + description: Specifies the factor to be verified. + example: 58959 type: integer - icon_url: - description: A url for the icon that represents the app in the OneLogin - portal + display_name: + description: A name for the users device + example: OneLogin SMS type: string - extension: - description: Boolean that indicates if the OneLogin browser extension is - required to launch this app. - type: boolean - login_id: - description: Unqiue identifier for this user and app combination. + expires_at: + description: A short lived token that is required to Verify the Factor. + This token expires based on the expires_in parameter passed in. + example: 2020-07-11T22:24:50Z + type: string + redirect_to: + description: Only applies to Email MagicLink factor. Redirects MagicLink + success page to specified URL after 2 seconds. Email must already be configured + by the user. + type: string + user_display_name: + description: Authentication factor display name assigned by users when they + register the device. + example: OneLogin Voice + type: string + id: + description: Registration identifier. + example: 44aa6883-5048-4cd5-8cb2-64d47784230c + type: string + type_display_name: + description: "Authentication factor display name as it appears to users\ + \ upon initial registration, as defined by admins at Settings > Authentication\ + \ Factors." + example: OneLogin Voice + type: string + auth_factor_name: + description: "Authentication factor name, as it appears to administrators\ + \ in OneLogin." + example: OneLogin Voice + type: string + type: object + getAuthFactors_200_response: + example: + name: Onelogin Protect + factor_id: 598524 + auth_factor_name: Onelogin + properties: + factor_id: + description: Identifier for the factor which will be used for user enrollment + example: 598524 type: integer name: - description: The name of the app. + description: "Authentication factor name, as it appears to administrators\ + \ in OneLogin." + example: Onelogin Protect type: string - provisioning_status: - enum: - - enabling - - disabling - - enabling_pending_approval - - disabling_pendding_approval - - enabled - - disabled - - disabling_failed - - enabling_failed + auth_factor_name: + description: Internal use only + example: Onelogin type: string - provisioning_state: - description: If provisioning is enabled this indicates the state of provisioning - for the given user. - enum: - - unknown - - provisioning - - modifying - - deleting - - provisioning_pending_approval - - deleting_pending_approval - - modifying_pending_approval - - linking - - provisioned - - deleted - - modifying_failed - - provisioning_failed - - deleting_failed - - linking_failed - - disabled - - nonexistent - - modifying_pending_approval_then_disabled + type: object + generateOTP_request: + properties: + expires_in: + description: Set the duration of the token in seconds. Token expiration + defaults to 259200 seconds = 72 hours. 72 hours is the max value. + example: 300 + type: integer + reusable: + default: false + description: "Defines if the token is reusable multiple times within the\ + \ expiry window. Value defaults to false. If set to true, token can be\ + \ used multiple times, until it expires." + type: boolean + type: object + generateOTP_201_response: + example: + expires_at: 2020-06-26T21:52:56Z + device_id: user_temp_otp_36216766 + mfa_token: UIOWE787979 + reusable: false + properties: + mfa_token: + description: Token can function as a temporary MFA token. It can be used + to authenticate for any app when valid. + example: UIOWE787979 type: string - provisioning_enabled: - description: Indicates if provisioning is enabled for this app. + reusable: + default: false + description: "true indcates the token can be used multiple times, until\ + \ it expires. false indicates the token is invalid after a single use\ + \ or once it expires. Defaults to false." type: boolean + expires_at: + description: Defines the expiration time and date for the token. Format + is UTC time. + example: 2020-06-26T21:52:56Z + type: string + device_id: + description: A unique identifier for the temp otp device that has been created + for this token. + example: user_temp_otp_36216766 + type: string type: object - listMappingConditions_200_response_inner: + createRole_201_response_inner: example: - name: name - value: value + id: 0 + properties: + id: + type: integer + type: object + updateRole_200_response: + example: + id: 0 + properties: + id: + type: integer + type: object + getRoleApps_200_response_inner: + example: + id: 345 + name: Dropbox + icon_url: https://testurl.com properties: + id: + description: app id + type: integer name: - description: The name of the Condition. + description: app name + type: string + icon_url: + description: url of Icon + format: url type: string + type: object + removeRoleUsers_request: + properties: + user_id: + items: + $ref: '#/components/schemas/id' + type: array + type: object + updateEnvironmentVariable_request: + properties: value: - description: The unique identifier of the condition. This should be used - when defining conditions for a User Mapping. + description: The secret value that will be encrypted at rest and injected + in applicable hook functions at run time. type: string + required: + - value type: object - listMappingConditionOperators_200_response_inner: + listMessageTemplates_200_response_inner: example: - name: name - value: value + name: ACME + id: 912 + enabled: true properties: + id: + description: template ID + example: 912 + type: integer + enabled: + description: indicator if template is enabled + example: true + type: boolean name: - description: The name or description of the operator. + description: name of message template + example: ACME type: string - value: - description: The condition operator value to use when creating or updating - User Mappings. + type: object + getEmailSettings_200_response_oneOf: + properties: + mode: + example: onelogin_email type: string type: object - trackEvent_request: + getEmailSettings_200_response: + oneOf: + - $ref: '#/components/schemas/getEmailSettings_200_response_oneOf' + - $ref: '#/components/schemas/email_config' + brand_background_urls: properties: - verb: - description: Verbs are used to distinguish between different types of events. + original: type: string - ip: - description: The IP address of the User's request. + login: type: string - user_agent: - description: The user agent of the User's request. + branding: type: string - user: - $ref: '#/components/schemas/risk_user' - source: - $ref: '#/components/schemas/source' - session: - $ref: '#/components/schemas/session' - device: - $ref: '#/components/schemas/risk_device' - fp: - description: Set to the value of the __tdli_fp cookie. + required: + - branding + - login + - original + type: object + brand_background: + properties: + urls: + $ref: '#/components/schemas/brand_background_urls' + file_size: + type: integer + updated_at: type: string - published: - description: Date and time of the event in IS08601 format. Useful for preloading - old events. Defaults to date time this API request is received. + content_type: type: string required: - - ip - - user - - user_agent - - verb + - content_type + - file_size + - updated_at + - urls type: object - getRiskScore_request: + brand_logo_urls: properties: - ip: - description: The IP address of the User's request. + original: type: string - user_agent: - description: The user agent of the User's request. + login: type: string - user: - $ref: '#/components/schemas/risk_user' - source: - $ref: '#/components/schemas/source' - session: - $ref: '#/components/schemas/session' - device: - $ref: '#/components/schemas/risk_device' - fp: - description: Set to the value of the __tdli_fp cookie. + navigation: type: string required: - - ip - - user - - user_agent - type: object - getRiskScore_200_response: - example: - score: 8.008281904610115 - triggers: - - triggers - - triggers - properties: - score: - description: A risk score 0 is low risk and 100 is the highest risk level - possible. - maximum: 100.0 - minimum: 0.0 - type: number - triggers: - description: Triggers are indicators of some of the key items that influenced - the risk score. - items: - type: string - type: array - type: object - getRiskScore_400_response: - properties: - messages: - items: - type: string - type: array + - login + - navigation + - original type: object - getScoreInsights_200_response_scores: - example: - minimal: 0 - high: 5 - low: 6 - very_high: 5 - medium: 1 + brand_logo: properties: - minimal: - type: integer - low: - type: integer - medium: - type: integer - high: - type: integer - very_high: + urls: + $ref: '#/components/schemas/brand_logo_urls' + file_size: type: integer + updated_at: + type: string + content_type: + type: string + required: + - content_type + - file_size + - updated_at + - urls type: object - getScoreInsights_200_response: - example: - total: 2 - scores: - minimal: 0 - high: 5 - low: 6 - very_high: 5 - medium: 1 + enforcement_point_resources_inner: properties: - scores: - $ref: '#/components/schemas/getScoreInsights_200_response_scores' - total: - type: integer + path: + example: / + type: string + is_path_regex: + nullable: true + type: boolean + require_auth: + example: false + type: boolean + permission: + enum: + - allow + - deny + - conditions + type: string + conditions: + description: required if permission == "conditions" + type: string type: object - schema_provisioning: + generic_app_provisioning: + description: Indicates if provisioning is enabled for this app. example: enabled: true properties: enabled: - description: Indicates if provisioning is enabled for this app. + example: true type: boolean type: object - error_status_errors_inner: + message_template_template_oneOf: properties: - field: + subject: + description: Custom Email Subject + example: Email MFA App Verification Code + type: string + html: + description: The HTML body of the Custom Email + example: "

Here is the code: {{otp_code}}

" + type: string + plain: + description: The Plain text body of the email + example: "Here is the code: {{otp_code}}" type: string + required: + - html + - plain + - subject + type: object + message_template_template_oneOf_1: + properties: message: + description: The body of the SMS message. Max length 160 characters. + example: "Here is the code: {{otp_code}}" + maxLength: 160 + type: string + required: + - message + type: object + message_template_template: + oneOf: + - $ref: '#/components/schemas/message_template_template_oneOf' + - $ref: '#/components/schemas/message_template_template_oneOf_1' + oidc_app_allOf: + example: "{\"id\":928549,\"name\":\"Sample OpenId Connect App\",\"visible\"\ + :true,\"description\":\"\",\"notes\":null,\"icon_url\":\"/images/missing_connector_icon/square/old_original.png\"\ + ,\"auth_method\":8,\"policy_id\":165278,\"provisioning\":{\"enabled\":false},\"\ + allow_assumed_signin\":false,\"tab_id\":null,\"connector_id\":108419,\"sso\"\ + :{\"client_secret\":\"3acdcdba4e57bbb4f0454a8729fbc4ec5c4ac327c8e1d6d60c305cc9ea5dbcd3\"\ + ,\"client_id\":\"b5dee2e0-5cbf-0137-6e19-12c80e5197ec92920\"},\"configuration\"\ + :{\"redirect_uri\":\"http://example.com/callback\",\"refresh_token_expiration_minutes\"\ + :60,\"login_url\":\"http://example.com/login\",\"oidc_encryption_key\":\"\"\ + ,\"oidc_application_type\":0,\"token_endpoint_auth_method\":0,\"access_token_expiration_minutes\"\ + :5},\"created_at\":\"2019-05-19T23:56:57Z\",\"updated_at\":\"2019-05-19T23:56:57Z\"\ + ,\"parameters\":{\"groups\":{\"values\":null,\"user_attribute_mappings\":null,\"\ + provisioned_entitlements\":false,\"skip_if_blank\":false,\"id\":237825,\"\ + default_values\":null,\"attributes_transformations\":null,\"label\":\"Groups\"\ + ,\"user_attribute_macros\":null,\"include_in_saml_assertion\":true}}}" + properties: + configuration: + $ref: '#/components/schemas/configuration_oidc' + sso: + $ref: '#/components/schemas/sso_oidc' + required: + - configuration + - connector_id + - description + - name + - policy_id + - visible + type: object + privilege_privilege_Statement_inner: + example: + Action: + - Users:Delete + - Users:ResetPassword + - Users:Unlock + - Users:Get + Scope: + - '*' + - '*' + Effect: Allow + properties: + Effect: + description: "Set to “Allow.” By default, all actions are denied, this Statement\ + \ allows the listed actions to be executed." + example: Allow + type: string + Action: + description: |- + An array of strings that represent actions within OneLogin. Actions are prefixed with the class of object they are related to and followed by a specific action for the given class. + e.g. users:List, where the class is users and the specific action is List. Don’t mix classes within an Action array. To create a privilege that includes multiple different classes, create multiple statements. A wildcard * that includes all actions is supported. Use wildcards to create a Super User privilege. + example: + - Users:Delete + - Users:ResetPassword + - Users:Unlock + - Users:Get + items: + enum: + - Apps:Create + - Apps:Delete + - Apps:List + - Apps:Get + - Apps:Update + - Apps:ManageConnectors + - Apps:ManageRoles + - Apps:ManageTabs + - Apps:ManageUsers + - Apps:ReapplyMappings + - Users:Create + - Users:Delete + - Users:List + - Users:Get + - Users:Update + - Users:AssumeUser + - Users:ManageApps + - Users:Unlock + - Users:GenerateTempMfaToken + - Users:ResetPassword + - Users:ReapplyMappings + - Users:ManageLicense + - Users:Invite + - Users:ManageRoles + - Roles:Create + - Roles:Get + - Roles:List + - Roles:Update + - Roles:Delete + - Roles:ManageUsers + - Roles:ManageApps + - Reports:Create + - Reports:Get + - Reports:List + - Reports:Update + - Reports:Delete + - Reports:Clone + - Events:Get + - Events:List + - Groups:Create + - Groups:Get + - Groups:List + - Groups:Update + - Groups:Delete + - Policies:Create + - Policies:Get + - Policies:List + - Policies:Update + - Policies:Delete + - Policies:SetDefault + type: string + type: array + Scope: + description: |- + Target the privileged action against specific resources with the scope. + The scope pattern is the class of object used by the Action, followed by an ID that represents a resource in OneLogin. + e.g. apps/1234, where apps is the class and 1234 is the ID of an app. + The wildcard * is supported and indicates that all resources of the class type declared, in the Action, are in scope. + The Action and Scope classes must match. However, there is an exception, a scope of roles/{role_id} can be combined with Actions on the user or app class. The exception allows you to target groups of users or apps with specific actions. items: + example: '*' type: string type: array + required: + - Action + - Effect + - Scope type: object - factor_inner_factor_data: - description: "Array of factor specific properties. For example, the token or\ - \ totp code for OneLogin Protect." + privilege_privilege: + example: + Version: 2018-05-18 + Statement: + - Action: + - Users:Delete + - Users:ResetPassword + - Users:Unlock + - Users:Get + Scope: + - '*' + - '*' + Effect: Allow + - Action: + - Users:Delete + - Users:ResetPassword + - Users:Unlock + - Users:Get + Scope: + - '*' + - '*' + Effect: Allow properties: - verification_token: - description: The token which can be used to verify the factor registration. - type: string - totp_url: - description: OTP Url that can be leveraged for any authenticator that supports - the key uri format. + Version: + example: 2018-05-18 type: string + Statement: + items: + $ref: '#/components/schemas/privilege_privilege_Statement_inner' + type: array type: object - factor_inner: + saml_app_allOf_parameters_saml_username: properties: - id: - description: MFA device identifier. - type: string - status: - description: "accepted : factor has been verified. pending: registered but\ - \ has not been verified." - enum: - - pending - - accepted - type: string - default: - description: True = is user's default MFA device for OneLogin. - type: boolean - auth_factor_name: - description: "\"Official\" authentication factor name, as it appears to\ - \ administrators in OneLogin." - type: string - type_display_name: - description: "Authentication factor display name as it appears to users\ - \ upon initial registration, as defined by admins at Settings > Authentication\ - \ Factors." - type: string - user_display_name: - description: Authentication factor display name assigned by users when they - enroll the device. - type: string - expires_at: - description: A short lived token that is required to Verify the Factor. - This token expires based on the expires_in parameter passed in. + user_attribute_mappings: type: string - factor_data: - $ref: '#/components/schemas/factor_inner_factor_data' + required: + - user_attribute_mappings type: object - status_2_status: - example: - code: 0 - type: type - message: message - error: true + example: null + saml_app_allOf_parameters: properties: - type: - type: string - code: - type: integer - message: - type: string - error: - type: boolean + saml_username: + $ref: '#/components/schemas/saml_app_allOf_parameters_saml_username' + required: + - saml_username type: object - schema_1_added_by: - example: - name: name - id: 6 + example: null + saml_app_allOf: + properties: + configuration: + $ref: '#/components/schemas/configuration_saml' + sso: + $ref: '#/components/schemas/sso_saml' + parameters: + $ref: '#/components/schemas/saml_app_allOf_parameters' + required: + - configuration + - connector_id + - description + - name + - parameters + - policy_id + - visible + type: object + example: null + sso_saml_certificate: + description: The Certificate used for signing properties: id: + description: SAML Certificate ID + example: 170216 type: integer name: + description: SAML Certificate Name + example: My Companies SAML Certificate + type: string + value: + description: SAML Certificate Value + example: c6d814d032f000d9c03bc79727265 type: string type: object hook_options: @@ -6149,16 +15168,35 @@ components: mfa_device_info_enabled: type: boolean type: object - hook_conditions_inner: - example: - source: source - value: value - operator: operator - properties: - source: - type: string - operator: - type: string - value: - type: string - type: object + securitySchemes: + OAuth2: + description: "This API uses OAuth2 with the Client Credential grant flow. [More\ + \ info](https://developers.onelogin.com/api-docs/2/getting-started/working-with-api-credentials)" + flows: + clientCredentials: + scopes: + Authentication Only: |- + Gives the credential pair the ability to generate an access token that can perform POST calls only to authentication endpoints, providing least privileged access to authentication code. These endpoints include: + - Verify Factor (SAML Assertion) + - Generate SAML Assertion + - Verify Factor (Login) + - Create Session Login Token + - Log User Out + Read Users: "Gives the credential pair the ability to generate an access\ + \ token that can perform GET calls available for the User, Role, and\ + \ Group API resources." + Manage users: "Gives the credential pair the ability to generate an access\ + \ token that can perform GET, POST, PUT, and DELETE calls available\ + \ for the User, Role, and Group API resources, with the exception of\ + \ setting passwords and assigning and removing roles" + Manage All: "Gives the credential pair the ability to generate an access\ + \ token that can perform GET, POST, PUT, and DELETE calls for all available\ + \ API resources, including the ability to set passwords and assign and\ + \ remove roles." + Read All: Gives the credential pair the ability to generate an access + token that can perform GET calls available for all API resources. + tokenUrl: https://your-api-subdomain.onelogin.com/auth/oauth2/v2/token + type: oauth2 + basicAuth: + scheme: basic + type: http diff --git a/api_api_auth_claims.go b/api_api_auth_claims.go new file mode 100644 index 0000000..93632ab --- /dev/null +++ b/api_api_auth_claims.go @@ -0,0 +1,591 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "bytes" + "context" + "io/ioutil" + "net/http" + "net/url" + "strings" +) + + +// APIAuthClaimsApiService APIAuthClaimsApi service +type APIAuthClaimsApiService service + +type ApiCreateAuthClaimRequest struct { + ctx context.Context + ApiService *APIAuthClaimsApiService + apiAuthId string + contentType *string + authClaim *AuthClaim +} + +func (r ApiCreateAuthClaimRequest) ContentType(contentType string) ApiCreateAuthClaimRequest { + r.contentType = &contentType + return r +} + +func (r ApiCreateAuthClaimRequest) AuthClaim(authClaim AuthClaim) ApiCreateAuthClaimRequest { + r.authClaim = &authClaim + return r +} + +func (r ApiCreateAuthClaimRequest) Execute() (int32, *http.Response, error) { + return r.ApiService.CreateAuthClaimExecute(r) +} + +/* +CreateAuthClaim Create Api Auth Server Claim + +Create Authorization Claim + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param apiAuthId + @return ApiCreateAuthClaimRequest +*/ +func (a *APIAuthClaimsApiService) CreateAuthClaim(ctx context.Context, apiAuthId string) ApiCreateAuthClaimRequest { + return ApiCreateAuthClaimRequest{ + ApiService: a, + ctx: ctx, + apiAuthId: apiAuthId, + } +} + +// Execute executes the request +// @return int32 +func (a *APIAuthClaimsApiService) CreateAuthClaimExecute(r ApiCreateAuthClaimRequest) (int32, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue int32 + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "APIAuthClaimsApiService.CreateAuthClaim") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/api_authorizations/{api_auth_id}/claims" + localVarPath = strings.Replace(localVarPath, "{"+"api_auth_id"+"}", url.PathEscape(parameterValueToString(r.apiAuthId, "apiAuthId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.contentType != nil { + parameterAddToQuery(localVarQueryParams, "Content-Type", r.contentType, "") + } + // body params + localVarPostBody = r.authClaim + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteAuthClaimRequest struct { + ctx context.Context + ApiService *APIAuthClaimsApiService + apiAuthId string + claimId int32 + contentType *string +} + +func (r ApiDeleteAuthClaimRequest) ContentType(contentType string) ApiDeleteAuthClaimRequest { + r.contentType = &contentType + return r +} + +func (r ApiDeleteAuthClaimRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteAuthClaimExecute(r) +} + +/* +DeleteAuthClaim Delete Api Auth Server Claim + +Delete Authorization Claim + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param apiAuthId + @param claimId + @return ApiDeleteAuthClaimRequest +*/ +func (a *APIAuthClaimsApiService) DeleteAuthClaim(ctx context.Context, apiAuthId string, claimId int32) ApiDeleteAuthClaimRequest { + return ApiDeleteAuthClaimRequest{ + ApiService: a, + ctx: ctx, + apiAuthId: apiAuthId, + claimId: claimId, + } +} + +// Execute executes the request +func (a *APIAuthClaimsApiService) DeleteAuthClaimExecute(r ApiDeleteAuthClaimRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "APIAuthClaimsApiService.DeleteAuthClaim") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/api_authorizations/{api_auth_id}/claims/{claim_id}" + localVarPath = strings.Replace(localVarPath, "{"+"api_auth_id"+"}", url.PathEscape(parameterValueToString(r.apiAuthId, "apiAuthId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"claim_id"+"}", url.PathEscape(parameterValueToString(r.claimId, "claimId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.contentType != nil { + parameterAddToQuery(localVarQueryParams, "Content-Type", r.contentType, "") + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiGetAuthclaimsRequest struct { + ctx context.Context + ApiService *APIAuthClaimsApiService + apiAuthId string + contentType *string +} + +func (r ApiGetAuthclaimsRequest) ContentType(contentType string) ApiGetAuthclaimsRequest { + r.contentType = &contentType + return r +} + +func (r ApiGetAuthclaimsRequest) Execute() ([]TokenClaim, *http.Response, error) { + return r.ApiService.GetAuthclaimsExecute(r) +} + +/* +GetAuthclaims Get Api Auth Server claims + +Get Authorization claims + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param apiAuthId + @return ApiGetAuthclaimsRequest +*/ +func (a *APIAuthClaimsApiService) GetAuthclaims(ctx context.Context, apiAuthId string) ApiGetAuthclaimsRequest { + return ApiGetAuthclaimsRequest{ + ApiService: a, + ctx: ctx, + apiAuthId: apiAuthId, + } +} + +// Execute executes the request +// @return []TokenClaim +func (a *APIAuthClaimsApiService) GetAuthclaimsExecute(r ApiGetAuthclaimsRequest) ([]TokenClaim, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []TokenClaim + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "APIAuthClaimsApiService.GetAuthclaims") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/api_authorizations/{api_auth_id}/claims" + localVarPath = strings.Replace(localVarPath, "{"+"api_auth_id"+"}", url.PathEscape(parameterValueToString(r.apiAuthId, "apiAuthId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.contentType != nil { + parameterAddToQuery(localVarQueryParams, "Content-Type", r.contentType, "") + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateClaimRequest struct { + ctx context.Context + ApiService *APIAuthClaimsApiService + apiAuthId string + claimId int32 + contentType *string + authClaim *AuthClaim +} + +func (r ApiUpdateClaimRequest) ContentType(contentType string) ApiUpdateClaimRequest { + r.contentType = &contentType + return r +} + +func (r ApiUpdateClaimRequest) AuthClaim(authClaim AuthClaim) ApiUpdateClaimRequest { + r.authClaim = &authClaim + return r +} + +func (r ApiUpdateClaimRequest) Execute() (*AuthId, *http.Response, error) { + return r.ApiService.UpdateClaimExecute(r) +} + +/* +UpdateClaim Update Api Auth Server Claim + +Update Authorization Server Claim + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param apiAuthId + @param claimId + @return ApiUpdateClaimRequest +*/ +func (a *APIAuthClaimsApiService) UpdateClaim(ctx context.Context, apiAuthId string, claimId int32) ApiUpdateClaimRequest { + return ApiUpdateClaimRequest{ + ApiService: a, + ctx: ctx, + apiAuthId: apiAuthId, + claimId: claimId, + } +} + +// Execute executes the request +// @return AuthId +func (a *APIAuthClaimsApiService) UpdateClaimExecute(r ApiUpdateClaimRequest) (*AuthId, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AuthId + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "APIAuthClaimsApiService.UpdateClaim") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/api_authorizations/{api_auth_id}/claims/{claim_id}" + localVarPath = strings.Replace(localVarPath, "{"+"api_auth_id"+"}", url.PathEscape(parameterValueToString(r.apiAuthId, "apiAuthId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"claim_id"+"}", url.PathEscape(parameterValueToString(r.claimId, "claimId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.contentType != nil { + parameterAddToQuery(localVarQueryParams, "Content-Type", r.contentType, "") + } + // body params + localVarPostBody = r.authClaim + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/api_api_auth_client_apps.go b/api_api_auth_client_apps.go new file mode 100644 index 0000000..e07d90f --- /dev/null +++ b/api_api_auth_client_apps.go @@ -0,0 +1,613 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "bytes" + "context" + "io/ioutil" + "net/http" + "net/url" + "strings" +) + + +// APIAuthClientAppsApiService APIAuthClientAppsApi service +type APIAuthClientAppsApiService service + +type ApiAddClientAppRequest struct { + ctx context.Context + ApiService *APIAuthClientAppsApiService + apiAuthId string + contentType *string + addClientAppRequest *AddClientAppRequest +} + +func (r ApiAddClientAppRequest) ContentType(contentType string) ApiAddClientAppRequest { + r.contentType = &contentType + return r +} + +func (r ApiAddClientAppRequest) AddClientAppRequest(addClientAppRequest AddClientAppRequest) ApiAddClientAppRequest { + r.addClientAppRequest = &addClientAppRequest + return r +} + +func (r ApiAddClientAppRequest) Execute() (*AddClientApp201Response, *http.Response, error) { + return r.ApiService.AddClientAppExecute(r) +} + +/* +AddClientApp Add Client App + +Add Client App + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param apiAuthId + @return ApiAddClientAppRequest +*/ +func (a *APIAuthClientAppsApiService) AddClientApp(ctx context.Context, apiAuthId string) ApiAddClientAppRequest { + return ApiAddClientAppRequest{ + ApiService: a, + ctx: ctx, + apiAuthId: apiAuthId, + } +} + +// Execute executes the request +// @return AddClientApp201Response +func (a *APIAuthClientAppsApiService) AddClientAppExecute(r ApiAddClientAppRequest) (*AddClientApp201Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AddClientApp201Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "APIAuthClientAppsApiService.AddClientApp") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/api_authorizations/{api_auth_id}/clients" + localVarPath = strings.Replace(localVarPath, "{"+"api_auth_id"+"}", url.PathEscape(parameterValueToString(r.apiAuthId, "apiAuthId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.contentType != nil { + parameterAddToQuery(localVarQueryParams, "Content-Type", r.contentType, "") + } + // body params + localVarPostBody = r.addClientAppRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteClientAppRequest struct { + ctx context.Context + ApiService *APIAuthClientAppsApiService + apiAuthId string + clientAppId int32 + contentType *string +} + +func (r ApiDeleteClientAppRequest) ContentType(contentType string) ApiDeleteClientAppRequest { + r.contentType = &contentType + return r +} + +func (r ApiDeleteClientAppRequest) Execute() (*AddClientApp201Response, *http.Response, error) { + return r.ApiService.DeleteClientAppExecute(r) +} + +/* +DeleteClientApp Remove Client App + +Delete Client App + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param apiAuthId + @param clientAppId + @return ApiDeleteClientAppRequest +*/ +func (a *APIAuthClientAppsApiService) DeleteClientApp(ctx context.Context, apiAuthId string, clientAppId int32) ApiDeleteClientAppRequest { + return ApiDeleteClientAppRequest{ + ApiService: a, + ctx: ctx, + apiAuthId: apiAuthId, + clientAppId: clientAppId, + } +} + +// Execute executes the request +// @return AddClientApp201Response +func (a *APIAuthClientAppsApiService) DeleteClientAppExecute(r ApiDeleteClientAppRequest) (*AddClientApp201Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AddClientApp201Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "APIAuthClientAppsApiService.DeleteClientApp") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/api_authorizations/{api_auth_id}/clients/{client_app_id}" + localVarPath = strings.Replace(localVarPath, "{"+"api_auth_id"+"}", url.PathEscape(parameterValueToString(r.apiAuthId, "apiAuthId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"client_app_id"+"}", url.PathEscape(parameterValueToString(r.clientAppId, "clientAppId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.contentType != nil { + parameterAddToQuery(localVarQueryParams, "Content-Type", r.contentType, "") + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListClientAppsRequest struct { + ctx context.Context + ApiService *APIAuthClientAppsApiService + apiAuthId string + contentType *string +} + +func (r ApiListClientAppsRequest) ContentType(contentType string) ApiListClientAppsRequest { + r.contentType = &contentType + return r +} + +func (r ApiListClientAppsRequest) Execute() (*ClientAppFull, *http.Response, error) { + return r.ApiService.ListClientAppsExecute(r) +} + +/* +ListClientApps List Clients Apps + +List Client Apps + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param apiAuthId + @return ApiListClientAppsRequest +*/ +func (a *APIAuthClientAppsApiService) ListClientApps(ctx context.Context, apiAuthId string) ApiListClientAppsRequest { + return ApiListClientAppsRequest{ + ApiService: a, + ctx: ctx, + apiAuthId: apiAuthId, + } +} + +// Execute executes the request +// @return ClientAppFull +func (a *APIAuthClientAppsApiService) ListClientAppsExecute(r ApiListClientAppsRequest) (*ClientAppFull, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ClientAppFull + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "APIAuthClientAppsApiService.ListClientApps") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/api_authorizations/{api_auth_id}/clients" + localVarPath = strings.Replace(localVarPath, "{"+"api_auth_id"+"}", url.PathEscape(parameterValueToString(r.apiAuthId, "apiAuthId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.contentType != nil { + parameterAddToQuery(localVarQueryParams, "Content-Type", r.contentType, "") + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateClientAppRequest struct { + ctx context.Context + ApiService *APIAuthClientAppsApiService + apiAuthId string + clientAppId int32 + contentType *string + updateClientAppRequest *UpdateClientAppRequest +} + +func (r ApiUpdateClientAppRequest) ContentType(contentType string) ApiUpdateClientAppRequest { + r.contentType = &contentType + return r +} + +func (r ApiUpdateClientAppRequest) UpdateClientAppRequest(updateClientAppRequest UpdateClientAppRequest) ApiUpdateClientAppRequest { + r.updateClientAppRequest = &updateClientAppRequest + return r +} + +func (r ApiUpdateClientAppRequest) Execute() (*AddClientApp201Response, *http.Response, error) { + return r.ApiService.UpdateClientAppExecute(r) +} + +/* +UpdateClientApp Update Client App + +Update Client App + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param apiAuthId + @param clientAppId + @return ApiUpdateClientAppRequest +*/ +func (a *APIAuthClientAppsApiService) UpdateClientApp(ctx context.Context, apiAuthId string, clientAppId int32) ApiUpdateClientAppRequest { + return ApiUpdateClientAppRequest{ + ApiService: a, + ctx: ctx, + apiAuthId: apiAuthId, + clientAppId: clientAppId, + } +} + +// Execute executes the request +// @return AddClientApp201Response +func (a *APIAuthClientAppsApiService) UpdateClientAppExecute(r ApiUpdateClientAppRequest) (*AddClientApp201Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AddClientApp201Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "APIAuthClientAppsApiService.UpdateClientApp") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/api_authorizations/{api_auth_id}/clients/{client_app_id}" + localVarPath = strings.Replace(localVarPath, "{"+"api_auth_id"+"}", url.PathEscape(parameterValueToString(r.apiAuthId, "apiAuthId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"client_app_id"+"}", url.PathEscape(parameterValueToString(r.clientAppId, "clientAppId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.contentType != nil { + parameterAddToQuery(localVarQueryParams, "Content-Type", r.contentType, "") + } + // body params + localVarPostBody = r.updateClientAppRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/api_api_auth_scopes.go b/api_api_auth_scopes.go new file mode 100644 index 0000000..820a131 --- /dev/null +++ b/api_api_auth_scopes.go @@ -0,0 +1,580 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "bytes" + "context" + "io/ioutil" + "net/http" + "net/url" + "strings" +) + + +// APIAuthScopesApiService APIAuthScopesApi service +type APIAuthScopesApiService service + +type ApiCreateScopeRequest struct { + ctx context.Context + ApiService *APIAuthScopesApiService + apiAuthId string + contentType *string + authScope *AuthScope +} + +func (r ApiCreateScopeRequest) ContentType(contentType string) ApiCreateScopeRequest { + r.contentType = &contentType + return r +} + +func (r ApiCreateScopeRequest) AuthScope(authScope AuthScope) ApiCreateScopeRequest { + r.authScope = &authScope + return r +} + +func (r ApiCreateScopeRequest) Execute() (*AuthScope, *http.Response, error) { + return r.ApiService.CreateScopeExecute(r) +} + +/* +CreateScope Create Api Auth Server Scope + +Create API Auth Server Scope + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param apiAuthId + @return ApiCreateScopeRequest +*/ +func (a *APIAuthScopesApiService) CreateScope(ctx context.Context, apiAuthId string) ApiCreateScopeRequest { + return ApiCreateScopeRequest{ + ApiService: a, + ctx: ctx, + apiAuthId: apiAuthId, + } +} + +// Execute executes the request +// @return AuthScope +func (a *APIAuthScopesApiService) CreateScopeExecute(r ApiCreateScopeRequest) (*AuthScope, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AuthScope + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "APIAuthScopesApiService.CreateScope") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/api_authorizations/{api_auth_id}/scopes" + localVarPath = strings.Replace(localVarPath, "{"+"api_auth_id"+"}", url.PathEscape(parameterValueToString(r.apiAuthId, "apiAuthId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.contentType != nil { + parameterAddToQuery(localVarQueryParams, "Content-Type", r.contentType, "") + } + // body params + localVarPostBody = r.authScope + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteScopeRequest struct { + ctx context.Context + ApiService *APIAuthScopesApiService + apiAuthId string + scopeId int32 + contentType *string +} + +func (r ApiDeleteScopeRequest) ContentType(contentType string) ApiDeleteScopeRequest { + r.contentType = &contentType + return r +} + +func (r ApiDeleteScopeRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteScopeExecute(r) +} + +/* +DeleteScope Delete Api Auth Server Scope + +Delete Scope + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param apiAuthId + @param scopeId + @return ApiDeleteScopeRequest +*/ +func (a *APIAuthScopesApiService) DeleteScope(ctx context.Context, apiAuthId string, scopeId int32) ApiDeleteScopeRequest { + return ApiDeleteScopeRequest{ + ApiService: a, + ctx: ctx, + apiAuthId: apiAuthId, + scopeId: scopeId, + } +} + +// Execute executes the request +func (a *APIAuthScopesApiService) DeleteScopeExecute(r ApiDeleteScopeRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "APIAuthScopesApiService.DeleteScope") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/api_authorizations/{api_auth_id}/scopes/{scope_id}" + localVarPath = strings.Replace(localVarPath, "{"+"api_auth_id"+"}", url.PathEscape(parameterValueToString(r.apiAuthId, "apiAuthId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"scope_id"+"}", url.PathEscape(parameterValueToString(r.scopeId, "scopeId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.contentType != nil { + parameterAddToQuery(localVarQueryParams, "Content-Type", r.contentType, "") + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiGetScopesRequest struct { + ctx context.Context + ApiService *APIAuthScopesApiService + apiAuthId string + contentType *string +} + +func (r ApiGetScopesRequest) ContentType(contentType string) ApiGetScopesRequest { + r.contentType = &contentType + return r +} + +func (r ApiGetScopesRequest) Execute() ([]AuthScope, *http.Response, error) { + return r.ApiService.GetScopesExecute(r) +} + +/* +GetScopes Get Api Auth Server Scopes + +List Authorization Scopes + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param apiAuthId + @return ApiGetScopesRequest +*/ +func (a *APIAuthScopesApiService) GetScopes(ctx context.Context, apiAuthId string) ApiGetScopesRequest { + return ApiGetScopesRequest{ + ApiService: a, + ctx: ctx, + apiAuthId: apiAuthId, + } +} + +// Execute executes the request +// @return []AuthScope +func (a *APIAuthScopesApiService) GetScopesExecute(r ApiGetScopesRequest) ([]AuthScope, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []AuthScope + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "APIAuthScopesApiService.GetScopes") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/api_authorizations/{api_auth_id}/scopes" + localVarPath = strings.Replace(localVarPath, "{"+"api_auth_id"+"}", url.PathEscape(parameterValueToString(r.apiAuthId, "apiAuthId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.contentType != nil { + parameterAddToQuery(localVarQueryParams, "Content-Type", r.contentType, "") + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateScopeRequest struct { + ctx context.Context + ApiService *APIAuthScopesApiService + apiAuthId string + scopeId int32 + contentType *string + authScope *AuthScope +} + +func (r ApiUpdateScopeRequest) ContentType(contentType string) ApiUpdateScopeRequest { + r.contentType = &contentType + return r +} + +func (r ApiUpdateScopeRequest) AuthScope(authScope AuthScope) ApiUpdateScopeRequest { + r.authScope = &authScope + return r +} + +func (r ApiUpdateScopeRequest) Execute() (*AuthId, *http.Response, error) { + return r.ApiService.UpdateScopeExecute(r) +} + +/* +UpdateScope Update Api Auth Server Scope + +Update Scope + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param apiAuthId + @param scopeId + @return ApiUpdateScopeRequest +*/ +func (a *APIAuthScopesApiService) UpdateScope(ctx context.Context, apiAuthId string, scopeId int32) ApiUpdateScopeRequest { + return ApiUpdateScopeRequest{ + ApiService: a, + ctx: ctx, + apiAuthId: apiAuthId, + scopeId: scopeId, + } +} + +// Execute executes the request +// @return AuthId +func (a *APIAuthScopesApiService) UpdateScopeExecute(r ApiUpdateScopeRequest) (*AuthId, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AuthId + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "APIAuthScopesApiService.UpdateScope") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/api_authorizations/{api_auth_id}/scopes/{scope_id}" + localVarPath = strings.Replace(localVarPath, "{"+"api_auth_id"+"}", url.PathEscape(parameterValueToString(r.apiAuthId, "apiAuthId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"scope_id"+"}", url.PathEscape(parameterValueToString(r.scopeId, "scopeId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.contentType != nil { + parameterAddToQuery(localVarQueryParams, "Content-Type", r.contentType, "") + } + // body params + localVarPostBody = r.authScope + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/api_api_authorization_server.go b/api_api_authorization_server.go new file mode 100644 index 0000000..81aeda6 --- /dev/null +++ b/api_api_authorization_server.go @@ -0,0 +1,666 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "bytes" + "context" + "io/ioutil" + "net/http" + "net/url" + "strings" +) + + +// APIAuthorizationServerApiService APIAuthorizationServerApi service +type APIAuthorizationServerApiService service + +type ApiCreateAuthServerRequest struct { + ctx context.Context + ApiService *APIAuthorizationServerApiService + contentType *string + authServer *AuthServer +} + +func (r ApiCreateAuthServerRequest) ContentType(contentType string) ApiCreateAuthServerRequest { + r.contentType = &contentType + return r +} + +func (r ApiCreateAuthServerRequest) AuthServer(authServer AuthServer) ApiCreateAuthServerRequest { + r.authServer = &authServer + return r +} + +func (r ApiCreateAuthServerRequest) Execute() (*AuthServer, *http.Response, error) { + return r.ApiService.CreateAuthServerExecute(r) +} + +/* +CreateAuthServer Create Api Auth Server + +Create Auth Server + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateAuthServerRequest +*/ +func (a *APIAuthorizationServerApiService) CreateAuthServer(ctx context.Context) ApiCreateAuthServerRequest { + return ApiCreateAuthServerRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return AuthServer +func (a *APIAuthorizationServerApiService) CreateAuthServerExecute(r ApiCreateAuthServerRequest) (*AuthServer, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AuthServer + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "APIAuthorizationServerApiService.CreateAuthServer") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/api_authorizations" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.contentType != nil { + parameterAddToQuery(localVarQueryParams, "Content-Type", r.contentType, "") + } + // body params + localVarPostBody = r.authServer + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteAuthServerRequest struct { + ctx context.Context + ApiService *APIAuthorizationServerApiService + apiAuthId string + contentType *string +} + +func (r ApiDeleteAuthServerRequest) ContentType(contentType string) ApiDeleteAuthServerRequest { + r.contentType = &contentType + return r +} + +func (r ApiDeleteAuthServerRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteAuthServerExecute(r) +} + +/* +DeleteAuthServer Delete Api Auth Server + +Delete Authentication Server + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param apiAuthId + @return ApiDeleteAuthServerRequest +*/ +func (a *APIAuthorizationServerApiService) DeleteAuthServer(ctx context.Context, apiAuthId string) ApiDeleteAuthServerRequest { + return ApiDeleteAuthServerRequest{ + ApiService: a, + ctx: ctx, + apiAuthId: apiAuthId, + } +} + +// Execute executes the request +func (a *APIAuthorizationServerApiService) DeleteAuthServerExecute(r ApiDeleteAuthServerRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "APIAuthorizationServerApiService.DeleteAuthServer") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/api_authorizations/{api_auth_id}" + localVarPath = strings.Replace(localVarPath, "{"+"api_auth_id"+"}", url.PathEscape(parameterValueToString(r.apiAuthId, "apiAuthId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.contentType != nil { + parameterAddToQuery(localVarQueryParams, "Content-Type", r.contentType, "") + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiGetAuthServerRequest struct { + ctx context.Context + ApiService *APIAuthorizationServerApiService + apiAuthId string + contentType *string +} + +func (r ApiGetAuthServerRequest) ContentType(contentType string) ApiGetAuthServerRequest { + r.contentType = &contentType + return r +} + +func (r ApiGetAuthServerRequest) Execute() (*AuthServer, *http.Response, error) { + return r.ApiService.GetAuthServerExecute(r) +} + +/* +GetAuthServer Get Api Auth Server + +Get Authorization Server + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param apiAuthId + @return ApiGetAuthServerRequest +*/ +func (a *APIAuthorizationServerApiService) GetAuthServer(ctx context.Context, apiAuthId string) ApiGetAuthServerRequest { + return ApiGetAuthServerRequest{ + ApiService: a, + ctx: ctx, + apiAuthId: apiAuthId, + } +} + +// Execute executes the request +// @return AuthServer +func (a *APIAuthorizationServerApiService) GetAuthServerExecute(r ApiGetAuthServerRequest) (*AuthServer, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AuthServer + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "APIAuthorizationServerApiService.GetAuthServer") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/api_authorizations/{api_auth_id}" + localVarPath = strings.Replace(localVarPath, "{"+"api_auth_id"+"}", url.PathEscape(parameterValueToString(r.apiAuthId, "apiAuthId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.contentType != nil { + parameterAddToQuery(localVarQueryParams, "Content-Type", r.contentType, "") + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListAuthServersRequest struct { + ctx context.Context + ApiService *APIAuthorizationServerApiService +} + +func (r ApiListAuthServersRequest) Execute() ([]AuthServer, *http.Response, error) { + return r.ApiService.ListAuthServersExecute(r) +} + +/* +ListAuthServers List Api Auth Servers + +List Authorization Servers + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListAuthServersRequest +*/ +func (a *APIAuthorizationServerApiService) ListAuthServers(ctx context.Context) ApiListAuthServersRequest { + return ApiListAuthServersRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return []AuthServer +func (a *APIAuthorizationServerApiService) ListAuthServersExecute(r ApiListAuthServersRequest) ([]AuthServer, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []AuthServer + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "APIAuthorizationServerApiService.ListAuthServers") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/api_authorizations" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateAuthServerRequest struct { + ctx context.Context + ApiService *APIAuthorizationServerApiService + apiAuthId string + contentType *string + authServer *AuthServer +} + +func (r ApiUpdateAuthServerRequest) ContentType(contentType string) ApiUpdateAuthServerRequest { + r.contentType = &contentType + return r +} + +func (r ApiUpdateAuthServerRequest) AuthServer(authServer AuthServer) ApiUpdateAuthServerRequest { + r.authServer = &authServer + return r +} + +func (r ApiUpdateAuthServerRequest) Execute() (*AuthServer, *http.Response, error) { + return r.ApiService.UpdateAuthServerExecute(r) +} + +/* +UpdateAuthServer Update Api Auth Server + +Update Authorization Server + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param apiAuthId + @return ApiUpdateAuthServerRequest +*/ +func (a *APIAuthorizationServerApiService) UpdateAuthServer(ctx context.Context, apiAuthId string) ApiUpdateAuthServerRequest { + return ApiUpdateAuthServerRequest{ + ApiService: a, + ctx: ctx, + apiAuthId: apiAuthId, + } +} + +// Execute executes the request +// @return AuthServer +func (a *APIAuthorizationServerApiService) UpdateAuthServerExecute(r ApiUpdateAuthServerRequest) (*AuthServer, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AuthServer + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "APIAuthorizationServerApiService.UpdateAuthServer") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/api_authorizations/{api_auth_id}" + localVarPath = strings.Replace(localVarPath, "{"+"api_auth_id"+"}", url.PathEscape(parameterValueToString(r.apiAuthId, "apiAuthId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.contentType != nil { + parameterAddToQuery(localVarQueryParams, "Content-Type", r.contentType, "") + } + // body params + localVarPostBody = r.authServer + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/api_app_rules.go b/api_app_rules.go new file mode 100644 index 0000000..8b68199 --- /dev/null +++ b/api_app_rules.go @@ -0,0 +1,1409 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "bytes" + "context" + "io/ioutil" + "net/http" + "net/url" + "strings" +) + + +// AppRulesApiService AppRulesApi service +type AppRulesApiService service + +type ApiCreateAppRuleRequest struct { + ctx context.Context + ApiService *AppRulesApiService + appId int32 + appRule *AppRule +} + +func (r ApiCreateAppRuleRequest) AppRule(appRule AppRule) ApiCreateAppRuleRequest { + r.appRule = &appRule + return r +} + +func (r ApiCreateAppRuleRequest) Execute() (*AppRule, *http.Response, error) { + return r.ApiService.CreateAppRuleExecute(r) +} + +/* +CreateAppRule Method for CreateAppRule + +Create App Rule + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param appId + @return ApiCreateAppRuleRequest +*/ +func (a *AppRulesApiService) CreateAppRule(ctx context.Context, appId int32) ApiCreateAppRuleRequest { + return ApiCreateAppRuleRequest{ + ApiService: a, + ctx: ctx, + appId: appId, + } +} + +// Execute executes the request +// @return AppRule +func (a *AppRulesApiService) CreateAppRuleExecute(r ApiCreateAppRuleRequest) (*AppRule, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AppRule + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AppRulesApiService.CreateAppRule") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/apps/{app_id}/rules" + localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterValueToString(r.appId, "appId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.appRule + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteRuleRequest struct { + ctx context.Context + ApiService *AppRulesApiService + appId int32 + ruleId string +} + +func (r ApiDeleteRuleRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteRuleExecute(r) +} + +/* +DeleteRule Delete Rule + +Delete App Rule + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param appId + @param ruleId + @return ApiDeleteRuleRequest +*/ +func (a *AppRulesApiService) DeleteRule(ctx context.Context, appId int32, ruleId string) ApiDeleteRuleRequest { + return ApiDeleteRuleRequest{ + ApiService: a, + ctx: ctx, + appId: appId, + ruleId: ruleId, + } +} + +// Execute executes the request +func (a *AppRulesApiService) DeleteRuleExecute(r ApiDeleteRuleRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AppRulesApiService.DeleteRule") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/apps/{app_id}/rules/{rule_id}" + localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterValueToString(r.appId, "appId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"rule_id"+"}", url.PathEscape(parameterValueToString(r.ruleId, "ruleId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiGetAppRuleRequest struct { + ctx context.Context + ApiService *AppRulesApiService + appId int32 + ruleId string +} + +func (r ApiGetAppRuleRequest) Execute() (*AppRule, *http.Response, error) { + return r.ApiService.GetAppRuleExecute(r) +} + +/* +GetAppRule Get Rule + +Get App Rule + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param appId + @param ruleId + @return ApiGetAppRuleRequest +*/ +func (a *AppRulesApiService) GetAppRule(ctx context.Context, appId int32, ruleId string) ApiGetAppRuleRequest { + return ApiGetAppRuleRequest{ + ApiService: a, + ctx: ctx, + appId: appId, + ruleId: ruleId, + } +} + +// Execute executes the request +// @return AppRule +func (a *AppRulesApiService) GetAppRuleExecute(r ApiGetAppRuleRequest) (*AppRule, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AppRule + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AppRulesApiService.GetAppRule") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/apps/{app_id}/rules/{rule_id}" + localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterValueToString(r.appId, "appId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"rule_id"+"}", url.PathEscape(parameterValueToString(r.ruleId, "ruleId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListActionValiesRequest struct { + ctx context.Context + ApiService *AppRulesApiService + appId int32 + ruleActionValue string +} + +func (r ApiListActionValiesRequest) Execute() ([]RuleAction, *http.Response, error) { + return r.ApiService.ListActionValiesExecute(r) +} + +/* +ListActionValies List Actions Values + +Sort App rules + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param appId + @param ruleActionValue + @return ApiListActionValiesRequest +*/ +func (a *AppRulesApiService) ListActionValies(ctx context.Context, appId int32, ruleActionValue string) ApiListActionValiesRequest { + return ApiListActionValiesRequest{ + ApiService: a, + ctx: ctx, + appId: appId, + ruleActionValue: ruleActionValue, + } +} + +// Execute executes the request +// @return []RuleAction +func (a *AppRulesApiService) ListActionValiesExecute(r ApiListActionValiesRequest) ([]RuleAction, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []RuleAction + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AppRulesApiService.ListActionValies") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/apps/{app_id}/rules/actions/{rule_action_value}/values" + localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterValueToString(r.appId, "appId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"rule_action_value"+"}", url.PathEscape(parameterValueToString(r.ruleActionValue, "ruleActionValue")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListActionsRequest struct { + ctx context.Context + ApiService *AppRulesApiService + appId int32 +} + +func (r ApiListActionsRequest) Execute() ([]RuleAction, *http.Response, error) { + return r.ApiService.ListActionsExecute(r) +} + +/* +ListActions List Actions + +List Actions + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param appId + @return ApiListActionsRequest +*/ +func (a *AppRulesApiService) ListActions(ctx context.Context, appId int32) ApiListActionsRequest { + return ApiListActionsRequest{ + ApiService: a, + ctx: ctx, + appId: appId, + } +} + +// Execute executes the request +// @return []RuleAction +func (a *AppRulesApiService) ListActionsExecute(r ApiListActionsRequest) ([]RuleAction, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []RuleAction + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AppRulesApiService.ListActions") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/apps/{app_id}/rules/actions" + localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterValueToString(r.appId, "appId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListAppRulesRequest struct { + ctx context.Context + ApiService *AppRulesApiService + appId int32 + hasCondition *string + hasConditionType *string + hasAction *string + hasActionType *string + enabled *bool +} + +// Filters Rules based on their Conditions. Values formatted as :, where name is the Condition to look for, and value is the value to find. Multiple filters can be declared by using a comma delimited list. Wildcards are supported in both the name and value fields. For example: Single filter. has_condition=has_role:123456 Multiple filters. has_condition=has_role:123456,status:1 Wildcard for conditions. has_condition=*:123456 Wildcard for condition values. has_condition=has_role:* +func (r ApiListAppRulesRequest) HasCondition(hasCondition string) ApiListAppRulesRequest { + r.hasCondition = &hasCondition + return r +} + +// Filters Rules based on their Conditions. Values formatted as :, where name is the Condition to look for, and value is the value to find. Multiple filters can be declared by using a comma delimited list. Wildcards are supported in both the name and value fields. For example: Single filter. has_condition=has_role:123456 Multiple filters. has_condition=has_role:123456,status:1 Wildcard for conditions. has_condition=*:123456 Wildcard for condition values. has_condition=has_role:* +func (r ApiListAppRulesRequest) HasConditionType(hasConditionType string) ApiListAppRulesRequest { + r.hasConditionType = &hasConditionType + return r +} + +// Filters Rules based on their Actions. Values formatted as :, where name is the Action to look for, and value is the value to find. Multiple filters can be declared by using a comma delimited list. Wildcards are supported in both the name and value fields. For example: Single filter. has_action=set_licenses:123456 Multiple filters. has_action=set_groups:123456,set_usertype:* Wildcard for actions. has_action=*:123456 Wildcard for action values. has_action=set_userprincipalname:* +func (r ApiListAppRulesRequest) HasAction(hasAction string) ApiListAppRulesRequest { + r.hasAction = &hasAction + return r +} + +// Filters Rules based on their action types. Allowed values are: builtin - actions that involve standard attributes custom - actions that involve custom attributes none - no actions are defined For example: Find Rules with no actions has_action_type=none +func (r ApiListAppRulesRequest) HasActionType(hasActionType string) ApiListAppRulesRequest { + r.hasActionType = &hasActionType + return r +} + +// Defaults to true. When set to `false` will return all disabled mappings. +func (r ApiListAppRulesRequest) Enabled(enabled bool) ApiListAppRulesRequest { + r.enabled = &enabled + return r +} + +func (r ApiListAppRulesRequest) Execute() ([]AppRule, *http.Response, error) { + return r.ApiService.ListAppRulesExecute(r) +} + +/* +ListAppRules List Rules + +List App Rules + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param appId + @return ApiListAppRulesRequest +*/ +func (a *AppRulesApiService) ListAppRules(ctx context.Context, appId int32) ApiListAppRulesRequest { + return ApiListAppRulesRequest{ + ApiService: a, + ctx: ctx, + appId: appId, + } +} + +// Execute executes the request +// @return []AppRule +func (a *AppRulesApiService) ListAppRulesExecute(r ApiListAppRulesRequest) ([]AppRule, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []AppRule + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AppRulesApiService.ListAppRules") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/apps/{app_id}/rules" + localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterValueToString(r.appId, "appId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.hasCondition != nil { + parameterAddToQuery(localVarQueryParams, "has_condition", r.hasCondition, "") + } + if r.hasConditionType != nil { + parameterAddToQuery(localVarQueryParams, "has_condition_type", r.hasConditionType, "") + } + if r.hasAction != nil { + parameterAddToQuery(localVarQueryParams, "has_action", r.hasAction, "") + } + if r.hasActionType != nil { + parameterAddToQuery(localVarQueryParams, "has_action_type", r.hasActionType, "") + } + if r.enabled != nil { + parameterAddToQuery(localVarQueryParams, "enabled", r.enabled, "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListConditionOperatorsRequest struct { + ctx context.Context + ApiService *AppRulesApiService + appId int32 + ruleConditionValue string +} + +func (r ApiListConditionOperatorsRequest) Execute() ([]RuleCondition, *http.Response, error) { + return r.ApiService.ListConditionOperatorsExecute(r) +} + +/* +ListConditionOperators List Conditions Operators + +List Condition Operators + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param appId + @param ruleConditionValue + @return ApiListConditionOperatorsRequest +*/ +func (a *AppRulesApiService) ListConditionOperators(ctx context.Context, appId int32, ruleConditionValue string) ApiListConditionOperatorsRequest { + return ApiListConditionOperatorsRequest{ + ApiService: a, + ctx: ctx, + appId: appId, + ruleConditionValue: ruleConditionValue, + } +} + +// Execute executes the request +// @return []RuleCondition +func (a *AppRulesApiService) ListConditionOperatorsExecute(r ApiListConditionOperatorsRequest) ([]RuleCondition, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []RuleCondition + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AppRulesApiService.ListConditionOperators") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/apps/{app_id}/rules/conditions/{rule_condition_value}/operators" + localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterValueToString(r.appId, "appId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"rule_condition_value"+"}", url.PathEscape(parameterValueToString(r.ruleConditionValue, "ruleConditionValue")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListConditionValuesRequest struct { + ctx context.Context + ApiService *AppRulesApiService + appId int32 + ruleConditionValue string +} + +func (r ApiListConditionValuesRequest) Execute() (*RuleCondition, *http.Response, error) { + return r.ApiService.ListConditionValuesExecute(r) +} + +/* +ListConditionValues List Conditions Values + +List Condition Values + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param appId + @param ruleConditionValue + @return ApiListConditionValuesRequest +*/ +func (a *AppRulesApiService) ListConditionValues(ctx context.Context, appId int32, ruleConditionValue string) ApiListConditionValuesRequest { + return ApiListConditionValuesRequest{ + ApiService: a, + ctx: ctx, + appId: appId, + ruleConditionValue: ruleConditionValue, + } +} + +// Execute executes the request +// @return RuleCondition +func (a *AppRulesApiService) ListConditionValuesExecute(r ApiListConditionValuesRequest) (*RuleCondition, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RuleCondition + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AppRulesApiService.ListConditionValues") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/apps/{app_id}/rules/conditions/{rule_condition_value}/values" + localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterValueToString(r.appId, "appId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"rule_condition_value"+"}", url.PathEscape(parameterValueToString(r.ruleConditionValue, "ruleConditionValue")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListConditionsRequest struct { + ctx context.Context + ApiService *AppRulesApiService + appId int32 +} + +func (r ApiListConditionsRequest) Execute() ([]ListConditions200ResponseInner, *http.Response, error) { + return r.ApiService.ListConditionsExecute(r) +} + +/* +ListConditions List Conditions + +List App Conditions + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param appId + @return ApiListConditionsRequest +*/ +func (a *AppRulesApiService) ListConditions(ctx context.Context, appId int32) ApiListConditionsRequest { + return ApiListConditionsRequest{ + ApiService: a, + ctx: ctx, + appId: appId, + } +} + +// Execute executes the request +// @return []ListConditions200ResponseInner +func (a *AppRulesApiService) ListConditionsExecute(r ApiListConditionsRequest) ([]ListConditions200ResponseInner, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []ListConditions200ResponseInner + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AppRulesApiService.ListConditions") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/apps/{app_id}/rules/conditions" + localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterValueToString(r.appId, "appId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSortAppRulesRequest struct { + ctx context.Context + ApiService *AppRulesApiService + appId int32 + requestBody *[]int32 +} + +func (r ApiSortAppRulesRequest) RequestBody(requestBody []int32) ApiSortAppRulesRequest { + r.requestBody = &requestBody + return r +} + +func (r ApiSortAppRulesRequest) Execute() ([]int32, *http.Response, error) { + return r.ApiService.SortAppRulesExecute(r) +} + +/* +SortAppRules Bulk Sort + +Sort App rules + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param appId + @return ApiSortAppRulesRequest +*/ +func (a *AppRulesApiService) SortAppRules(ctx context.Context, appId int32) ApiSortAppRulesRequest { + return ApiSortAppRulesRequest{ + ApiService: a, + ctx: ctx, + appId: appId, + } +} + +// Execute executes the request +// @return []int32 +func (a *AppRulesApiService) SortAppRulesExecute(r ApiSortAppRulesRequest) ([]int32, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []int32 + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AppRulesApiService.SortAppRules") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/apps/{app_id}/rules/sort" + localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterValueToString(r.appId, "appId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.requestBody + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateAppRuleRequest struct { + ctx context.Context + ApiService *AppRulesApiService + appId int32 + ruleId string + appRule *AppRule +} + +func (r ApiUpdateAppRuleRequest) AppRule(appRule AppRule) ApiUpdateAppRuleRequest { + r.appRule = &appRule + return r +} + +func (r ApiUpdateAppRuleRequest) Execute() (*AppRule, *http.Response, error) { + return r.ApiService.UpdateAppRuleExecute(r) +} + +/* +UpdateAppRule Update Rule + +Update App Rule. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param appId + @param ruleId + @return ApiUpdateAppRuleRequest +*/ +func (a *AppRulesApiService) UpdateAppRule(ctx context.Context, appId int32, ruleId string) ApiUpdateAppRuleRequest { + return ApiUpdateAppRuleRequest{ + ApiService: a, + ctx: ctx, + appId: appId, + ruleId: ruleId, + } +} + +// Execute executes the request +// @return AppRule +func (a *AppRulesApiService) UpdateAppRuleExecute(r ApiUpdateAppRuleRequest) (*AppRule, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AppRule + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AppRulesApiService.UpdateAppRule") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/apps/{app_id}/rules/{rule_id}" + localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterValueToString(r.appId, "appId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"rule_id"+"}", url.PathEscape(parameterValueToString(r.ruleId, "ruleId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.appRule + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/api_apps.go b/api_apps.go new file mode 100644 index 0000000..b36ca37 --- /dev/null +++ b/api_apps.go @@ -0,0 +1,1020 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "bytes" + "context" + "io/ioutil" + "net/http" + "net/url" + "strings" +) + + +// AppsApiService AppsApi service +type AppsApiService service + +type ApiCreateAppRequest struct { + ctx context.Context + ApiService *AppsApiService + contentType *string + createAppRequest *CreateAppRequest +} + +func (r ApiCreateAppRequest) ContentType(contentType string) ApiCreateAppRequest { + r.contentType = &contentType + return r +} + +func (r ApiCreateAppRequest) CreateAppRequest(createAppRequest CreateAppRequest) ApiCreateAppRequest { + r.createAppRequest = &createAppRequest + return r +} + +func (r ApiCreateAppRequest) Execute() (*CreateApp200Response, *http.Response, error) { + return r.ApiService.CreateAppExecute(r) +} + +/* +CreateApp Create App + +Create App + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateAppRequest +*/ +func (a *AppsApiService) CreateApp(ctx context.Context) ApiCreateAppRequest { + return ApiCreateAppRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return CreateApp200Response +func (a *AppsApiService) CreateAppExecute(r ApiCreateAppRequest) (*CreateApp200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreateApp200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AppsApiService.CreateApp") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/apps" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.contentType != nil { + parameterAddToQuery(localVarQueryParams, "Content-Type", r.contentType, "") + } + // body params + localVarPostBody = r.createAppRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteAppRequest struct { + ctx context.Context + ApiService *AppsApiService + appId int32 +} + +func (r ApiDeleteAppRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteAppExecute(r) +} + +/* +DeleteApp Delete App + +Delete App + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param appId + @return ApiDeleteAppRequest +*/ +func (a *AppsApiService) DeleteApp(ctx context.Context, appId int32) ApiDeleteAppRequest { + return ApiDeleteAppRequest{ + ApiService: a, + ctx: ctx, + appId: appId, + } +} + +// Execute executes the request +func (a *AppsApiService) DeleteAppExecute(r ApiDeleteAppRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AppsApiService.DeleteApp") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/apps/{app_id}" + localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterValueToString(r.appId, "appId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiDeleteAppParameterRequest struct { + ctx context.Context + ApiService *AppsApiService + appId int32 + parameterId string +} + +func (r ApiDeleteAppParameterRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteAppParameterExecute(r) +} + +/* +DeleteAppParameter Delete Parameter from App + +Delete Parameter from App + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param appId + @param parameterId + @return ApiDeleteAppParameterRequest +*/ +func (a *AppsApiService) DeleteAppParameter(ctx context.Context, appId int32, parameterId string) ApiDeleteAppParameterRequest { + return ApiDeleteAppParameterRequest{ + ApiService: a, + ctx: ctx, + appId: appId, + parameterId: parameterId, + } +} + +// Execute executes the request +func (a *AppsApiService) DeleteAppParameterExecute(r ApiDeleteAppParameterRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AppsApiService.DeleteAppParameter") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/apps/{app_id}/parameters/{parameter_id}" + localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterValueToString(r.appId, "appId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"parameter_id"+"}", url.PathEscape(parameterValueToString(r.parameterId, "parameterId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiGetAppRequest struct { + ctx context.Context + ApiService *AppsApiService + appId int32 +} + +func (r ApiGetAppRequest) Execute() (*GenericApp, *http.Response, error) { + return r.ApiService.GetAppExecute(r) +} + +/* +GetApp Get App + +Get App + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param appId + @return ApiGetAppRequest +*/ +func (a *AppsApiService) GetApp(ctx context.Context, appId int32) ApiGetAppRequest { + return ApiGetAppRequest{ + ApiService: a, + ctx: ctx, + appId: appId, + } +} + +// Execute executes the request +// @return GenericApp +func (a *AppsApiService) GetAppExecute(r ApiGetAppRequest) (*GenericApp, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GenericApp + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AppsApiService.GetApp") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/apps/{app_id}" + localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterValueToString(r.appId, "appId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetAppUsersRequest struct { + ctx context.Context + ApiService *AppsApiService + appId int32 +} + +func (r ApiGetAppUsersRequest) Execute() ([]User, *http.Response, error) { + return r.ApiService.GetAppUsersExecute(r) +} + +/* +GetAppUsers Get App Users + +Get App Users + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param appId + @return ApiGetAppUsersRequest +*/ +func (a *AppsApiService) GetAppUsers(ctx context.Context, appId int32) ApiGetAppUsersRequest { + return ApiGetAppUsersRequest{ + ApiService: a, + ctx: ctx, + appId: appId, + } +} + +// Execute executes the request +// @return []User +func (a *AppsApiService) GetAppUsersExecute(r ApiGetAppUsersRequest) ([]User, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []User + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AppsApiService.GetAppUsers") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/apps/{app_id}/users" + localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterValueToString(r.appId, "appId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListAppsRequest struct { + ctx context.Context + ApiService *AppsApiService +} + +func (r ApiListAppsRequest) Execute() ([]GenericApp, *http.Response, error) { + return r.ApiService.ListAppsExecute(r) +} + +/* +ListApps List Apps + +List Apps + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListAppsRequest +*/ +func (a *AppsApiService) ListApps(ctx context.Context) ApiListAppsRequest { + return ApiListAppsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return []GenericApp +func (a *AppsApiService) ListAppsExecute(r ApiListAppsRequest) ([]GenericApp, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []GenericApp + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AppsApiService.ListApps") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/apps" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListConnectorsRequest struct { + ctx context.Context + ApiService *AppsApiService + name *string +} + +func (r ApiListConnectorsRequest) Name(name string) ApiListConnectorsRequest { + r.name = &name + return r +} + +func (r ApiListConnectorsRequest) Execute() (*Connector, *http.Response, error) { + return r.ApiService.ListConnectorsExecute(r) +} + +/* +ListConnectors List Connectors + +List Connectors + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListConnectorsRequest +*/ +func (a *AppsApiService) ListConnectors(ctx context.Context) ApiListConnectorsRequest { + return ApiListConnectorsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return Connector +func (a *AppsApiService) ListConnectorsExecute(r ApiListConnectorsRequest) (*Connector, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Connector + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AppsApiService.ListConnectors") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/connectors" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.name != nil { + parameterAddToQuery(localVarQueryParams, "name", r.name, "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateAppRequest struct { + ctx context.Context + ApiService *AppsApiService + appId int32 + requestBody *map[string]interface{} +} + +func (r ApiUpdateAppRequest) RequestBody(requestBody map[string]interface{}) ApiUpdateAppRequest { + r.requestBody = &requestBody + return r +} + +func (r ApiUpdateAppRequest) Execute() (*GenericApp, *http.Response, error) { + return r.ApiService.UpdateAppExecute(r) +} + +/* +UpdateApp Update App + +Update App + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param appId + @return ApiUpdateAppRequest +*/ +func (a *AppsApiService) UpdateApp(ctx context.Context, appId int32) ApiUpdateAppRequest { + return ApiUpdateAppRequest{ + ApiService: a, + ctx: ctx, + appId: appId, + } +} + +// Execute executes the request +// @return GenericApp +func (a *AppsApiService) UpdateAppExecute(r ApiUpdateAppRequest) (*GenericApp, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GenericApp + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AppsApiService.UpdateApp") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/apps/{app_id}" + localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterValueToString(r.appId, "appId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.requestBody + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/api_branding_service.go b/api_branding_service.go new file mode 100644 index 0000000..04d45c4 --- /dev/null +++ b/api_branding_service.go @@ -0,0 +1,744 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "bytes" + "context" + "io/ioutil" + "net/http" + "net/url" + "strings" +) + + +// BrandingServiceApiService BrandingServiceApi service +type BrandingServiceApiService service + +type ApiCreateBrandRequest struct { + ctx context.Context + ApiService *BrandingServiceApiService + brand *Brand +} + +func (r ApiCreateBrandRequest) Brand(brand Brand) ApiCreateBrandRequest { + r.brand = &brand + return r +} + +func (r ApiCreateBrandRequest) Execute() (*Brand, *http.Response, error) { + return r.ApiService.CreateBrandExecute(r) +} + +/* +CreateBrand Create Brand + +Create a new Account Brand + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateBrandRequest +*/ +func (a *BrandingServiceApiService) CreateBrand(ctx context.Context) ApiCreateBrandRequest { + return ApiCreateBrandRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return Brand +func (a *BrandingServiceApiService) CreateBrandExecute(r ApiCreateBrandRequest) (*Brand, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Brand + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BrandingServiceApiService.CreateBrand") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/branding/brands" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.brand + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteBrandRequest struct { + ctx context.Context + ApiService *BrandingServiceApiService + brandId int32 +} + +func (r ApiDeleteBrandRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteBrandExecute(r) +} + +/* +DeleteBrand Delete Brand + +Delete Brand + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param brandId Unique identifier for the branding object. + @return ApiDeleteBrandRequest +*/ +func (a *BrandingServiceApiService) DeleteBrand(ctx context.Context, brandId int32) ApiDeleteBrandRequest { + return ApiDeleteBrandRequest{ + ApiService: a, + ctx: ctx, + brandId: brandId, + } +} + +// Execute executes the request +func (a *BrandingServiceApiService) DeleteBrandExecute(r ApiDeleteBrandRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BrandingServiceApiService.DeleteBrand") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/branding/brands/{brand_id}" + localVarPath = strings.Replace(localVarPath, "{"+"brand_id"+"}", url.PathEscape(parameterValueToString(r.brandId, "brandId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiGetBrandRequest struct { + ctx context.Context + ApiService *BrandingServiceApiService + brandId int32 +} + +func (r ApiGetBrandRequest) Execute() (*Brand, *http.Response, error) { + return r.ApiService.GetBrandExecute(r) +} + +/* +GetBrand Get Brand + +Retrieve a single brand via ID + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param brandId Unique identifier for the branding object. + @return ApiGetBrandRequest +*/ +func (a *BrandingServiceApiService) GetBrand(ctx context.Context, brandId int32) ApiGetBrandRequest { + return ApiGetBrandRequest{ + ApiService: a, + ctx: ctx, + brandId: brandId, + } +} + +// Execute executes the request +// @return Brand +func (a *BrandingServiceApiService) GetBrandExecute(r ApiGetBrandRequest) (*Brand, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Brand + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BrandingServiceApiService.GetBrand") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/branding/brands/{brand_id}" + localVarPath = strings.Replace(localVarPath, "{"+"brand_id"+"}", url.PathEscape(parameterValueToString(r.brandId, "brandId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetBrandAppsRequest struct { + ctx context.Context + ApiService *BrandingServiceApiService + brandId int32 +} + +func (r ApiGetBrandAppsRequest) Execute() ([]BrandApp, *http.Response, error) { + return r.ApiService.GetBrandAppsExecute(r) +} + +/* +GetBrandApps Get Brand Apps + +Get Apps Associated with Account Brand + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param brandId Unique identifier for the branding object. + @return ApiGetBrandAppsRequest +*/ +func (a *BrandingServiceApiService) GetBrandApps(ctx context.Context, brandId int32) ApiGetBrandAppsRequest { + return ApiGetBrandAppsRequest{ + ApiService: a, + ctx: ctx, + brandId: brandId, + } +} + +// Execute executes the request +// @return []BrandApp +func (a *BrandingServiceApiService) GetBrandAppsExecute(r ApiGetBrandAppsRequest) ([]BrandApp, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []BrandApp + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BrandingServiceApiService.GetBrandApps") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/branding/brands/{brand_id}/apps" + localVarPath = strings.Replace(localVarPath, "{"+"brand_id"+"}", url.PathEscape(parameterValueToString(r.brandId, "brandId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListBrandsRequest struct { + ctx context.Context + ApiService *BrandingServiceApiService +} + +func (r ApiListBrandsRequest) Execute() ([]BrandReq, *http.Response, error) { + return r.ApiService.ListBrandsExecute(r) +} + +/* +ListBrands List Account Brands + +List Account Brands + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListBrandsRequest +*/ +func (a *BrandingServiceApiService) ListBrands(ctx context.Context) ApiListBrandsRequest { + return ApiListBrandsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return []BrandReq +func (a *BrandingServiceApiService) ListBrandsExecute(r ApiListBrandsRequest) ([]BrandReq, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []BrandReq + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BrandingServiceApiService.ListBrands") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/branding/brands" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateBrandRequest struct { + ctx context.Context + ApiService *BrandingServiceApiService + brandId int32 + requestBrand *RequestBrand +} + +func (r ApiUpdateBrandRequest) RequestBrand(requestBrand RequestBrand) ApiUpdateBrandRequest { + r.requestBrand = &requestBrand + return r +} + +func (r ApiUpdateBrandRequest) Execute() (*Brand, *http.Response, error) { + return r.ApiService.UpdateBrandExecute(r) +} + +/* +UpdateBrand Update Brand + +Update Account Brand + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param brandId Unique identifier for the branding object. + @return ApiUpdateBrandRequest +*/ +func (a *BrandingServiceApiService) UpdateBrand(ctx context.Context, brandId int32) ApiUpdateBrandRequest { + return ApiUpdateBrandRequest{ + ApiService: a, + ctx: ctx, + brandId: brandId, + } +} + +// Execute executes the request +// @return Brand +func (a *BrandingServiceApiService) UpdateBrandExecute(r ApiUpdateBrandRequest) (*Brand, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Brand + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BrandingServiceApiService.UpdateBrand") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/branding/brands/{brand_id}" + localVarPath = strings.Replace(localVarPath, "{"+"brand_id"+"}", url.PathEscape(parameterValueToString(r.brandId, "brandId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.requestBrand + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/api_branding_service_smtp.go b/api_branding_service_smtp.go new file mode 100644 index 0000000..4879d0b --- /dev/null +++ b/api_branding_service_smtp.go @@ -0,0 +1,369 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "bytes" + "context" + "io/ioutil" + "net/http" + "net/url" +) + + +// BrandingServiceSMTPApiService BrandingServiceSMTPApi service +type BrandingServiceSMTPApiService service + +type ApiDeleteEmailSettingsRequest struct { + ctx context.Context + ApiService *BrandingServiceSMTPApiService +} + +func (r ApiDeleteEmailSettingsRequest) Execute() (*AltErr, *http.Response, error) { + return r.ApiService.DeleteEmailSettingsExecute(r) +} + +/* +DeleteEmailSettings Delete Custom Email Settings + +Reset Email Setting config + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiDeleteEmailSettingsRequest +*/ +func (a *BrandingServiceSMTPApiService) DeleteEmailSettings(ctx context.Context) ApiDeleteEmailSettingsRequest { + return ApiDeleteEmailSettingsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return AltErr +func (a *BrandingServiceSMTPApiService) DeleteEmailSettingsExecute(r ApiDeleteEmailSettingsRequest) (*AltErr, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AltErr + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BrandingServiceSMTPApiService.DeleteEmailSettings") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/branding/email_settings" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetEmailSettingsRequest struct { + ctx context.Context + ApiService *BrandingServiceSMTPApiService +} + +func (r ApiGetEmailSettingsRequest) Execute() (*GetEmailSettings200Response, *http.Response, error) { + return r.ApiService.GetEmailSettingsExecute(r) +} + +/* +GetEmailSettings Get Email Settings + +Get Email Settings Config + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetEmailSettingsRequest +*/ +func (a *BrandingServiceSMTPApiService) GetEmailSettings(ctx context.Context) ApiGetEmailSettingsRequest { + return ApiGetEmailSettingsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return GetEmailSettings200Response +func (a *BrandingServiceSMTPApiService) GetEmailSettingsExecute(r ApiGetEmailSettingsRequest) (*GetEmailSettings200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GetEmailSettings200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BrandingServiceSMTPApiService.GetEmailSettings") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/branding/email_settings" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateEmailSettingsRequest struct { + ctx context.Context + ApiService *BrandingServiceSMTPApiService + emailConfig *EmailConfig +} + +func (r ApiUpdateEmailSettingsRequest) EmailConfig(emailConfig EmailConfig) ApiUpdateEmailSettingsRequest { + r.emailConfig = &emailConfig + return r +} + +func (r ApiUpdateEmailSettingsRequest) Execute() (*AltErr, *http.Response, error) { + return r.ApiService.UpdateEmailSettingsExecute(r) +} + +/* +UpdateEmailSettings Update Email Settings + +Update Email Settings Config + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiUpdateEmailSettingsRequest +*/ +func (a *BrandingServiceSMTPApiService) UpdateEmailSettings(ctx context.Context) ApiUpdateEmailSettingsRequest { + return ApiUpdateEmailSettingsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return AltErr +func (a *BrandingServiceSMTPApiService) UpdateEmailSettingsExecute(r ApiUpdateEmailSettingsRequest) (*AltErr, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AltErr + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BrandingServiceSMTPApiService.UpdateEmailSettings") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/branding/email_settings" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.emailConfig + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/api_branding_service_templates.go b/api_branding_service_templates.go new file mode 100644 index 0000000..2dec71a --- /dev/null +++ b/api_branding_service_templates.go @@ -0,0 +1,1050 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "bytes" + "context" + "io/ioutil" + "net/http" + "net/url" + "strings" +) + + +// BrandingServiceTemplatesApiService BrandingServiceTemplatesApi service +type BrandingServiceTemplatesApiService service + +type ApiCreateMessageTemplateRequest struct { + ctx context.Context + ApiService *BrandingServiceTemplatesApiService + brandId int32 + locale *string + messageTemplate *MessageTemplate +} + +// The 2 character language locale for the template. e.g. en = English, es = Spanish +func (r ApiCreateMessageTemplateRequest) Locale(locale string) ApiCreateMessageTemplateRequest { + r.locale = &locale + return r +} + +func (r ApiCreateMessageTemplateRequest) MessageTemplate(messageTemplate MessageTemplate) ApiCreateMessageTemplateRequest { + r.messageTemplate = &messageTemplate + return r +} + +func (r ApiCreateMessageTemplateRequest) Execute() (*MessageTemplate, *http.Response, error) { + return r.ApiService.CreateMessageTemplateExecute(r) +} + +/* +CreateMessageTemplate Create Message Template + +Create Message Template + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param brandId Unique identifier for the branding object. + @return ApiCreateMessageTemplateRequest +*/ +func (a *BrandingServiceTemplatesApiService) CreateMessageTemplate(ctx context.Context, brandId int32) ApiCreateMessageTemplateRequest { + return ApiCreateMessageTemplateRequest{ + ApiService: a, + ctx: ctx, + brandId: brandId, + } +} + +// Execute executes the request +// @return MessageTemplate +func (a *BrandingServiceTemplatesApiService) CreateMessageTemplateExecute(r ApiCreateMessageTemplateRequest) (*MessageTemplate, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MessageTemplate + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BrandingServiceTemplatesApiService.CreateMessageTemplate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/branding/brands/{brand_id}/templates" + localVarPath = strings.Replace(localVarPath, "{"+"brand_id"+"}", url.PathEscape(parameterValueToString(r.brandId, "brandId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.locale != nil { + parameterAddToQuery(localVarQueryParams, "locale", r.locale, "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.messageTemplate + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteMessageTemplateRequest struct { + ctx context.Context + ApiService *BrandingServiceTemplatesApiService + brandId int32 + templateId int32 +} + +func (r ApiDeleteMessageTemplateRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteMessageTemplateExecute(r) +} + +/* +DeleteMessageTemplate Delete Message Template + +Delete Message Template + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param brandId Unique identifier for the branding object. + @param templateId Unique identifier for the template to return. + @return ApiDeleteMessageTemplateRequest +*/ +func (a *BrandingServiceTemplatesApiService) DeleteMessageTemplate(ctx context.Context, brandId int32, templateId int32) ApiDeleteMessageTemplateRequest { + return ApiDeleteMessageTemplateRequest{ + ApiService: a, + ctx: ctx, + brandId: brandId, + templateId: templateId, + } +} + +// Execute executes the request +func (a *BrandingServiceTemplatesApiService) DeleteMessageTemplateExecute(r ApiDeleteMessageTemplateRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BrandingServiceTemplatesApiService.DeleteMessageTemplate") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/branding/brands/{brand_id}/templates/{template_id}" + localVarPath = strings.Replace(localVarPath, "{"+"brand_id"+"}", url.PathEscape(parameterValueToString(r.brandId, "brandId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"template_id"+"}", url.PathEscape(parameterValueToString(r.templateId, "templateId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 404 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiGetMasterByTypeRequest struct { + ctx context.Context + ApiService *BrandingServiceTemplatesApiService + templateType string +} + +func (r ApiGetMasterByTypeRequest) Execute() (*MessageTemplate, *http.Response, error) { + return r.ApiService.GetMasterByTypeExecute(r) +} + +/* +GetMasterByType Get Master Template by Type + +Get Master Template by Type + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param templateType The message template type to return. + @return ApiGetMasterByTypeRequest +*/ +func (a *BrandingServiceTemplatesApiService) GetMasterByType(ctx context.Context, templateType string) ApiGetMasterByTypeRequest { + return ApiGetMasterByTypeRequest{ + ApiService: a, + ctx: ctx, + templateType: templateType, + } +} + +// Execute executes the request +// @return MessageTemplate +func (a *BrandingServiceTemplatesApiService) GetMasterByTypeExecute(r ApiGetMasterByTypeRequest) (*MessageTemplate, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MessageTemplate + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BrandingServiceTemplatesApiService.GetMasterByType") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/branding/brands/master/templates/{template_type}" + localVarPath = strings.Replace(localVarPath, "{"+"template_type"+"}", url.PathEscape(parameterValueToString(r.templateType, "templateType")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetMessageTemplateByIdRequest struct { + ctx context.Context + ApiService *BrandingServiceTemplatesApiService + brandId int32 + templateId int32 +} + +func (r ApiGetMessageTemplateByIdRequest) Execute() (*MessageTemplate, *http.Response, error) { + return r.ApiService.GetMessageTemplateByIdExecute(r) +} + +/* +GetMessageTemplateById Get Message Template + +Get Message Template by ID + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param brandId Unique identifier for the branding object. + @param templateId Unique identifier for the template to return. + @return ApiGetMessageTemplateByIdRequest +*/ +func (a *BrandingServiceTemplatesApiService) GetMessageTemplateById(ctx context.Context, brandId int32, templateId int32) ApiGetMessageTemplateByIdRequest { + return ApiGetMessageTemplateByIdRequest{ + ApiService: a, + ctx: ctx, + brandId: brandId, + templateId: templateId, + } +} + +// Execute executes the request +// @return MessageTemplate +func (a *BrandingServiceTemplatesApiService) GetMessageTemplateByIdExecute(r ApiGetMessageTemplateByIdRequest) (*MessageTemplate, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MessageTemplate + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BrandingServiceTemplatesApiService.GetMessageTemplateById") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/branding/brands/{brand_id}/templates/{template_id}" + localVarPath = strings.Replace(localVarPath, "{"+"brand_id"+"}", url.PathEscape(parameterValueToString(r.brandId, "brandId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"template_id"+"}", url.PathEscape(parameterValueToString(r.templateId, "templateId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetTemplateByLocaleRequest struct { + ctx context.Context + ApiService *BrandingServiceTemplatesApiService + brandId int32 + templateType string + locale string +} + +func (r ApiGetTemplateByLocaleRequest) Execute() (*MessageTemplate, *http.Response, error) { + return r.ApiService.GetTemplateByLocaleExecute(r) +} + +/* +GetTemplateByLocale Get Template by Type & Locale + +Get Template by Type and Locale + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param brandId Unique identifier for the branding object. + @param templateType The message template type to return. + @param locale The 2 character language locale for the template. e.g. en = English, es = Spanish + @return ApiGetTemplateByLocaleRequest +*/ +func (a *BrandingServiceTemplatesApiService) GetTemplateByLocale(ctx context.Context, brandId int32, templateType string, locale string) ApiGetTemplateByLocaleRequest { + return ApiGetTemplateByLocaleRequest{ + ApiService: a, + ctx: ctx, + brandId: brandId, + templateType: templateType, + locale: locale, + } +} + +// Execute executes the request +// @return MessageTemplate +func (a *BrandingServiceTemplatesApiService) GetTemplateByLocaleExecute(r ApiGetTemplateByLocaleRequest) (*MessageTemplate, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MessageTemplate + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BrandingServiceTemplatesApiService.GetTemplateByLocale") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/branding/brands/{brand_id}/templates/{template_type}/{locale}" + localVarPath = strings.Replace(localVarPath, "{"+"brand_id"+"}", url.PathEscape(parameterValueToString(r.brandId, "brandId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"template_type"+"}", url.PathEscape(parameterValueToString(r.templateType, "templateType")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"locale"+"}", url.PathEscape(parameterValueToString(r.locale, "locale")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListMessageTemplatesRequest struct { + ctx context.Context + ApiService *BrandingServiceTemplatesApiService + brandId int32 + locale *string +} + +// The 2 character language locale for the template. e.g. en = English, es = Spanish +func (r ApiListMessageTemplatesRequest) Locale(locale string) ApiListMessageTemplatesRequest { + r.locale = &locale + return r +} + +func (r ApiListMessageTemplatesRequest) Execute() ([]ListMessageTemplates200ResponseInner, *http.Response, error) { + return r.ApiService.ListMessageTemplatesExecute(r) +} + +/* +ListMessageTemplates List Message Templates + +List Message Templates + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param brandId Unique identifier for the branding object. + @return ApiListMessageTemplatesRequest +*/ +func (a *BrandingServiceTemplatesApiService) ListMessageTemplates(ctx context.Context, brandId int32) ApiListMessageTemplatesRequest { + return ApiListMessageTemplatesRequest{ + ApiService: a, + ctx: ctx, + brandId: brandId, + } +} + +// Execute executes the request +// @return []ListMessageTemplates200ResponseInner +func (a *BrandingServiceTemplatesApiService) ListMessageTemplatesExecute(r ApiListMessageTemplatesRequest) ([]ListMessageTemplates200ResponseInner, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []ListMessageTemplates200ResponseInner + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BrandingServiceTemplatesApiService.ListMessageTemplates") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/branding/brands/{brand_id}/templates" + localVarPath = strings.Replace(localVarPath, "{"+"brand_id"+"}", url.PathEscape(parameterValueToString(r.brandId, "brandId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.locale != nil { + parameterAddToQuery(localVarQueryParams, "locale", r.locale, "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateMessageTemplateByIdRequest struct { + ctx context.Context + ApiService *BrandingServiceTemplatesApiService + brandId int32 + templateId int32 +} + +func (r ApiUpdateMessageTemplateByIdRequest) Execute() (*MessageTemplate, *http.Response, error) { + return r.ApiService.UpdateMessageTemplateByIdExecute(r) +} + +/* +UpdateMessageTemplateById Update Message Template + +Update Message Template by ID + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param brandId Unique identifier for the branding object. + @param templateId Unique identifier for the template to return. + @return ApiUpdateMessageTemplateByIdRequest +*/ +func (a *BrandingServiceTemplatesApiService) UpdateMessageTemplateById(ctx context.Context, brandId int32, templateId int32) ApiUpdateMessageTemplateByIdRequest { + return ApiUpdateMessageTemplateByIdRequest{ + ApiService: a, + ctx: ctx, + brandId: brandId, + templateId: templateId, + } +} + +// Execute executes the request +// @return MessageTemplate +func (a *BrandingServiceTemplatesApiService) UpdateMessageTemplateByIdExecute(r ApiUpdateMessageTemplateByIdRequest) (*MessageTemplate, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MessageTemplate + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BrandingServiceTemplatesApiService.UpdateMessageTemplateById") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/branding/brands/{brand_id}/templates/{template_id}" + localVarPath = strings.Replace(localVarPath, "{"+"brand_id"+"}", url.PathEscape(parameterValueToString(r.brandId, "brandId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"template_id"+"}", url.PathEscape(parameterValueToString(r.templateId, "templateId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateTemplateByLocaleRequest struct { + ctx context.Context + ApiService *BrandingServiceTemplatesApiService + brandId int32 + templateType string + locale string +} + +func (r ApiUpdateTemplateByLocaleRequest) Execute() (*MessageTemplate, *http.Response, error) { + return r.ApiService.UpdateTemplateByLocaleExecute(r) +} + +/* +UpdateTemplateByLocale Update Template by Type & Locale + +Update Template by Type and Locale + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param brandId Unique identifier for the branding object. + @param templateType The message template type to return. + @param locale The 2 character language locale for the template. e.g. en = English, es = Spanish + @return ApiUpdateTemplateByLocaleRequest +*/ +func (a *BrandingServiceTemplatesApiService) UpdateTemplateByLocale(ctx context.Context, brandId int32, templateType string, locale string) ApiUpdateTemplateByLocaleRequest { + return ApiUpdateTemplateByLocaleRequest{ + ApiService: a, + ctx: ctx, + brandId: brandId, + templateType: templateType, + locale: locale, + } +} + +// Execute executes the request +// @return MessageTemplate +func (a *BrandingServiceTemplatesApiService) UpdateTemplateByLocaleExecute(r ApiUpdateTemplateByLocaleRequest) (*MessageTemplate, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MessageTemplate + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BrandingServiceTemplatesApiService.UpdateTemplateByLocale") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/branding/brands/{brand_id}/templates/{template_type}/{locale}" + localVarPath = strings.Replace(localVarPath, "{"+"brand_id"+"}", url.PathEscape(parameterValueToString(r.brandId, "brandId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"template_type"+"}", url.PathEscape(parameterValueToString(r.templateType, "templateType")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"locale"+"}", url.PathEscape(parameterValueToString(r.locale, "locale")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/api_default.go b/api_default.go deleted file mode 100644 index bfbadba..0000000 --- a/api_default.go +++ /dev/null @@ -1,13860 +0,0 @@ -/* -OneLogin API - -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -API version: 3.0.0-alpha.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package openapi - -import ( - "bytes" - "context" - "io/ioutil" - "net/http" - "net/url" - "strings" -) - - -// DefaultApiService DefaultApi service -type DefaultApiService service - -type ApiActivateFactorRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - userId int32 - activateFactorRequest *ActivateFactorRequest -} - -func (r ApiActivateFactorRequest) Authorization(authorization string) ApiActivateFactorRequest { - r.authorization = &authorization - return r -} - -func (r ApiActivateFactorRequest) ActivateFactorRequest(activateFactorRequest ActivateFactorRequest) ApiActivateFactorRequest { - r.activateFactorRequest = &activateFactorRequest - return r -} - -func (r ApiActivateFactorRequest) Execute() (*http.Response, error) { - return r.ApiService.ActivateFactorExecute(r) -} - -/* -ActivateFactor Method for ActivateFactor - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param userId Set to the id of the user. - @return ApiActivateFactorRequest -*/ -func (a *DefaultApiService) ActivateFactor(ctx context.Context, userId int32) ApiActivateFactorRequest { - return ApiActivateFactorRequest{ - ApiService: a, - ctx: ctx, - userId: userId, - } -} - -// Execute executes the request -func (a *DefaultApiService) ActivateFactorExecute(r ApiActivateFactorRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ActivateFactor") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/mfa/users/{user_id}/verifications" - localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterToString(r.userId, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return nil, reportError("authorization is required and must be specified") - } - if r.activateFactorRequest == nil { - return nil, reportError("activateFactorRequest is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - // body params - localVarPostBody = r.activateFactorRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiAddAccessTokenClaimRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - id int32 - addAccessTokenClaimRequest *AddAccessTokenClaimRequest -} - -func (r ApiAddAccessTokenClaimRequest) Authorization(authorization string) ApiAddAccessTokenClaimRequest { - r.authorization = &authorization - return r -} - -func (r ApiAddAccessTokenClaimRequest) AddAccessTokenClaimRequest(addAccessTokenClaimRequest AddAccessTokenClaimRequest) ApiAddAccessTokenClaimRequest { - r.addAccessTokenClaimRequest = &addAccessTokenClaimRequest - return r -} - -func (r ApiAddAccessTokenClaimRequest) Execute() (*Id, *http.Response, error) { - return r.ApiService.AddAccessTokenClaimExecute(r) -} - -/* -AddAccessTokenClaim Method for AddAccessTokenClaim - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id - @return ApiAddAccessTokenClaimRequest -*/ -func (a *DefaultApiService) AddAccessTokenClaim(ctx context.Context, id int32) ApiAddAccessTokenClaimRequest { - return ApiAddAccessTokenClaimRequest{ - ApiService: a, - ctx: ctx, - id: id, - } -} - -// Execute executes the request -// @return Id -func (a *DefaultApiService) AddAccessTokenClaimExecute(r ApiAddAccessTokenClaimRequest) (*Id, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Id - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.AddAccessTokenClaim") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/api_authorizations/{id}/claims" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return localVarReturnValue, nil, reportError("authorization is required and must be specified") - } - if r.addAccessTokenClaimRequest == nil { - return localVarReturnValue, nil, reportError("addAccessTokenClaimRequest is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - // body params - localVarPostBody = r.addAccessTokenClaimRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiAddClientAppRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - id int32 - addClientAppRequest *AddClientAppRequest -} - -func (r ApiAddClientAppRequest) Authorization(authorization string) ApiAddClientAppRequest { - r.authorization = &authorization - return r -} - -func (r ApiAddClientAppRequest) AddClientAppRequest(addClientAppRequest AddClientAppRequest) ApiAddClientAppRequest { - r.addClientAppRequest = &addClientAppRequest - return r -} - -func (r ApiAddClientAppRequest) Execute() (*ClientApp, *http.Response, error) { - return r.ApiService.AddClientAppExecute(r) -} - -/* -AddClientApp Method for AddClientApp - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id - @return ApiAddClientAppRequest -*/ -func (a *DefaultApiService) AddClientApp(ctx context.Context, id int32) ApiAddClientAppRequest { - return ApiAddClientAppRequest{ - ApiService: a, - ctx: ctx, - id: id, - } -} - -// Execute executes the request -// @return ClientApp -func (a *DefaultApiService) AddClientAppExecute(r ApiAddClientAppRequest) (*ClientApp, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ClientApp - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.AddClientApp") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/api_authorizations/{id}/clients" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return localVarReturnValue, nil, reportError("authorization is required and must be specified") - } - if r.addClientAppRequest == nil { - return localVarReturnValue, nil, reportError("addClientAppRequest is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - // body params - localVarPostBody = r.addClientAppRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiAddRoleAdminsRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - roleId int32 - requestBody *[]int32 -} - -func (r ApiAddRoleAdminsRequest) Authorization(authorization string) ApiAddRoleAdminsRequest { - r.authorization = &authorization - return r -} - -func (r ApiAddRoleAdminsRequest) RequestBody(requestBody []int32) ApiAddRoleAdminsRequest { - r.requestBody = &requestBody - return r -} - -func (r ApiAddRoleAdminsRequest) Execute() ([]AddRoleUsers200ResponseInner, *http.Response, error) { - return r.ApiService.AddRoleAdminsExecute(r) -} - -/* -AddRoleAdmins Method for AddRoleAdmins - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param roleId Set to the id of the role you want to return. - @return ApiAddRoleAdminsRequest -*/ -func (a *DefaultApiService) AddRoleAdmins(ctx context.Context, roleId int32) ApiAddRoleAdminsRequest { - return ApiAddRoleAdminsRequest{ - ApiService: a, - ctx: ctx, - roleId: roleId, - } -} - -// Execute executes the request -// @return []AddRoleUsers200ResponseInner -func (a *DefaultApiService) AddRoleAdminsExecute(r ApiAddRoleAdminsRequest) ([]AddRoleUsers200ResponseInner, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []AddRoleUsers200ResponseInner - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.AddRoleAdmins") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/roles/{role_id}/admins" - localVarPath = strings.Replace(localVarPath, "{"+"role_id"+"}", url.PathEscape(parameterToString(r.roleId, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return localVarReturnValue, nil, reportError("authorization is required and must be specified") - } - if r.requestBody == nil { - return localVarReturnValue, nil, reportError("requestBody is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - // body params - localVarPostBody = r.requestBody - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiAddRoleUsersRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - roleId int32 - requestBody *[]int32 -} - -func (r ApiAddRoleUsersRequest) Authorization(authorization string) ApiAddRoleUsersRequest { - r.authorization = &authorization - return r -} - -func (r ApiAddRoleUsersRequest) RequestBody(requestBody []int32) ApiAddRoleUsersRequest { - r.requestBody = &requestBody - return r -} - -func (r ApiAddRoleUsersRequest) Execute() ([]AddRoleUsers200ResponseInner, *http.Response, error) { - return r.ApiService.AddRoleUsersExecute(r) -} - -/* -AddRoleUsers Method for AddRoleUsers - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param roleId Set to the id of the role you want to return. - @return ApiAddRoleUsersRequest -*/ -func (a *DefaultApiService) AddRoleUsers(ctx context.Context, roleId int32) ApiAddRoleUsersRequest { - return ApiAddRoleUsersRequest{ - ApiService: a, - ctx: ctx, - roleId: roleId, - } -} - -// Execute executes the request -// @return []AddRoleUsers200ResponseInner -func (a *DefaultApiService) AddRoleUsersExecute(r ApiAddRoleUsersRequest) ([]AddRoleUsers200ResponseInner, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []AddRoleUsers200ResponseInner - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.AddRoleUsers") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/roles/{role_id}/users" - localVarPath = strings.Replace(localVarPath, "{"+"role_id"+"}", url.PathEscape(parameterToString(r.roleId, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return localVarReturnValue, nil, reportError("authorization is required and must be specified") - } - if r.requestBody == nil { - return localVarReturnValue, nil, reportError("requestBody is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - // body params - localVarPostBody = r.requestBody - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiAddScopeRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - id int32 - addScopeRequest *AddScopeRequest -} - -func (r ApiAddScopeRequest) Authorization(authorization string) ApiAddScopeRequest { - r.authorization = &authorization - return r -} - -func (r ApiAddScopeRequest) AddScopeRequest(addScopeRequest AddScopeRequest) ApiAddScopeRequest { - r.addScopeRequest = &addScopeRequest - return r -} - -func (r ApiAddScopeRequest) Execute() (*Id, *http.Response, error) { - return r.ApiService.AddScopeExecute(r) -} - -/* -AddScope Method for AddScope - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id - @return ApiAddScopeRequest -*/ -func (a *DefaultApiService) AddScope(ctx context.Context, id int32) ApiAddScopeRequest { - return ApiAddScopeRequest{ - ApiService: a, - ctx: ctx, - id: id, - } -} - -// Execute executes the request -// @return Id -func (a *DefaultApiService) AddScopeExecute(r ApiAddScopeRequest) (*Id, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Id - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.AddScope") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/api_authorizations/{id}/scopes" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return localVarReturnValue, nil, reportError("authorization is required and must be specified") - } - if r.addScopeRequest == nil { - return localVarReturnValue, nil, reportError("addScopeRequest is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - // body params - localVarPostBody = r.addScopeRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiBulkMappingSortRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - requestBody *[]int32 -} - -func (r ApiBulkMappingSortRequest) Authorization(authorization string) ApiBulkMappingSortRequest { - r.authorization = &authorization - return r -} - -// The request body must contain an array of User Mapping IDs in the desired order. -func (r ApiBulkMappingSortRequest) RequestBody(requestBody []int32) ApiBulkMappingSortRequest { - r.requestBody = &requestBody - return r -} - -func (r ApiBulkMappingSortRequest) Execute() ([]int32, *http.Response, error) { - return r.ApiService.BulkMappingSortExecute(r) -} - -/* -BulkMappingSort Method for BulkMappingSort - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiBulkMappingSortRequest -*/ -func (a *DefaultApiService) BulkMappingSort(ctx context.Context) ApiBulkMappingSortRequest { - return ApiBulkMappingSortRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return []int32 -func (a *DefaultApiService) BulkMappingSortExecute(r ApiBulkMappingSortRequest) ([]int32, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []int32 - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.BulkMappingSort") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/apps/mappings/sort" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return localVarReturnValue, nil, reportError("authorization is required and must be specified") - } - if r.requestBody == nil { - return localVarReturnValue, nil, reportError("requestBody is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - // body params - localVarPostBody = r.requestBody - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ErrorStatus - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiBulkSortRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - appId int32 - requestBody *[]int32 -} - -func (r ApiBulkSortRequest) Authorization(authorization string) ApiBulkSortRequest { - r.authorization = &authorization - return r -} - -// The request body must contain an array of App Rule IDs in the desired order. -func (r ApiBulkSortRequest) RequestBody(requestBody []int32) ApiBulkSortRequest { - r.requestBody = &requestBody - return r -} - -func (r ApiBulkSortRequest) Execute() ([]int32, *http.Response, error) { - return r.ApiService.BulkSortExecute(r) -} - -/* -BulkSort Method for BulkSort - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param appId - @return ApiBulkSortRequest -*/ -func (a *DefaultApiService) BulkSort(ctx context.Context, appId int32) ApiBulkSortRequest { - return ApiBulkSortRequest{ - ApiService: a, - ctx: ctx, - appId: appId, - } -} - -// Execute executes the request -// @return []int32 -func (a *DefaultApiService) BulkSortExecute(r ApiBulkSortRequest) ([]int32, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []int32 - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.BulkSort") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/apps/{app_id}/rules/sort" - localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterToString(r.appId, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return localVarReturnValue, nil, reportError("authorization is required and must be specified") - } - if r.requestBody == nil { - return localVarReturnValue, nil, reportError("requestBody is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - // body params - localVarPostBody = r.requestBody - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ErrorStatus - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiCreateAppRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - schema *Schema -} - -func (r ApiCreateAppRequest) Authorization(authorization string) ApiCreateAppRequest { - r.authorization = &authorization - return r -} - -func (r ApiCreateAppRequest) Schema(schema Schema) ApiCreateAppRequest { - r.schema = &schema - return r -} - -func (r ApiCreateAppRequest) Execute() (*Schema, *http.Response, error) { - return r.ApiService.CreateAppExecute(r) -} - -/* -CreateApp Method for CreateApp - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiCreateAppRequest -*/ -func (a *DefaultApiService) CreateApp(ctx context.Context) ApiCreateAppRequest { - return ApiCreateAppRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return Schema -func (a *DefaultApiService) CreateAppExecute(r ApiCreateAppRequest) (*Schema, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Schema - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.CreateApp") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/apps" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return localVarReturnValue, nil, reportError("authorization is required and must be specified") - } - if r.schema == nil { - return localVarReturnValue, nil, reportError("schema is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - // body params - localVarPostBody = r.schema - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiCreateAuthorizationServerRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - createAuthorizationServerRequest *CreateAuthorizationServerRequest -} - -func (r ApiCreateAuthorizationServerRequest) Authorization(authorization string) ApiCreateAuthorizationServerRequest { - r.authorization = &authorization - return r -} - -func (r ApiCreateAuthorizationServerRequest) CreateAuthorizationServerRequest(createAuthorizationServerRequest CreateAuthorizationServerRequest) ApiCreateAuthorizationServerRequest { - r.createAuthorizationServerRequest = &createAuthorizationServerRequest - return r -} - -func (r ApiCreateAuthorizationServerRequest) Execute() (*Id, *http.Response, error) { - return r.ApiService.CreateAuthorizationServerExecute(r) -} - -/* -CreateAuthorizationServer Method for CreateAuthorizationServer - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiCreateAuthorizationServerRequest -*/ -func (a *DefaultApiService) CreateAuthorizationServer(ctx context.Context) ApiCreateAuthorizationServerRequest { - return ApiCreateAuthorizationServerRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return Id -func (a *DefaultApiService) CreateAuthorizationServerExecute(r ApiCreateAuthorizationServerRequest) (*Id, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Id - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.CreateAuthorizationServer") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/api_authorizations" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return localVarReturnValue, nil, reportError("authorization is required and must be specified") - } - if r.createAuthorizationServerRequest == nil { - return localVarReturnValue, nil, reportError("createAuthorizationServerRequest is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - // body params - localVarPostBody = r.createAuthorizationServerRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiCreateEnvironmentVariableRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - createEnvironmentVariableRequest *CreateEnvironmentVariableRequest -} - -func (r ApiCreateEnvironmentVariableRequest) Authorization(authorization string) ApiCreateEnvironmentVariableRequest { - r.authorization = &authorization - return r -} - -func (r ApiCreateEnvironmentVariableRequest) CreateEnvironmentVariableRequest(createEnvironmentVariableRequest CreateEnvironmentVariableRequest) ApiCreateEnvironmentVariableRequest { - r.createEnvironmentVariableRequest = &createEnvironmentVariableRequest - return r -} - -func (r ApiCreateEnvironmentVariableRequest) Execute() (*Envvar, *http.Response, error) { - return r.ApiService.CreateEnvironmentVariableExecute(r) -} - -/* -CreateEnvironmentVariable Method for CreateEnvironmentVariable - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiCreateEnvironmentVariableRequest -*/ -func (a *DefaultApiService) CreateEnvironmentVariable(ctx context.Context) ApiCreateEnvironmentVariableRequest { - return ApiCreateEnvironmentVariableRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return Envvar -func (a *DefaultApiService) CreateEnvironmentVariableExecute(r ApiCreateEnvironmentVariableRequest) (*Envvar, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Envvar - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.CreateEnvironmentVariable") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/hooks/envs" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return localVarReturnValue, nil, reportError("authorization is required and must be specified") - } - if r.createEnvironmentVariableRequest == nil { - return localVarReturnValue, nil, reportError("createEnvironmentVariableRequest is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - // body params - localVarPostBody = r.createEnvironmentVariableRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiCreateHookRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - hook *Hook -} - -func (r ApiCreateHookRequest) Authorization(authorization string) ApiCreateHookRequest { - r.authorization = &authorization - return r -} - -func (r ApiCreateHookRequest) Hook(hook Hook) ApiCreateHookRequest { - r.hook = &hook - return r -} - -func (r ApiCreateHookRequest) Execute() (*http.Response, error) { - return r.ApiService.CreateHookExecute(r) -} - -/* -CreateHook Method for CreateHook - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiCreateHookRequest -*/ -func (a *DefaultApiService) CreateHook(ctx context.Context) ApiCreateHookRequest { - return ApiCreateHookRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -func (a *DefaultApiService) CreateHookExecute(r ApiCreateHookRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.CreateHook") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/hooks" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return nil, reportError("authorization is required and must be specified") - } - if r.hook == nil { - return nil, reportError("hook is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - // body params - localVarPostBody = r.hook - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiCreateMappingRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - mapping *Mapping -} - -func (r ApiCreateMappingRequest) Authorization(authorization string) ApiCreateMappingRequest { - r.authorization = &authorization - return r -} - -func (r ApiCreateMappingRequest) Mapping(mapping Mapping) ApiCreateMappingRequest { - r.mapping = &mapping - return r -} - -func (r ApiCreateMappingRequest) Execute() (int32, *http.Response, error) { - return r.ApiService.CreateMappingExecute(r) -} - -/* -CreateMapping Method for CreateMapping - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiCreateMappingRequest -*/ -func (a *DefaultApiService) CreateMapping(ctx context.Context) ApiCreateMappingRequest { - return ApiCreateMappingRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return int32 -func (a *DefaultApiService) CreateMappingExecute(r ApiCreateMappingRequest) (int32, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue int32 - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.CreateMapping") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/mappings" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return localVarReturnValue, nil, reportError("authorization is required and must be specified") - } - if r.mapping == nil { - return localVarReturnValue, nil, reportError("mapping is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - // body params - localVarPostBody = r.mapping - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ErrorStatus - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiCreateRiskRuleRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - riskRule *RiskRule -} - -func (r ApiCreateRiskRuleRequest) Authorization(authorization string) ApiCreateRiskRuleRequest { - r.authorization = &authorization - return r -} - -func (r ApiCreateRiskRuleRequest) RiskRule(riskRule RiskRule) ApiCreateRiskRuleRequest { - r.riskRule = &riskRule - return r -} - -func (r ApiCreateRiskRuleRequest) Execute() (*http.Response, error) { - return r.ApiService.CreateRiskRuleExecute(r) -} - -/* -CreateRiskRule Method for CreateRiskRule - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiCreateRiskRuleRequest -*/ -func (a *DefaultApiService) CreateRiskRule(ctx context.Context) ApiCreateRiskRuleRequest { - return ApiCreateRiskRuleRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -func (a *DefaultApiService) CreateRiskRuleExecute(r ApiCreateRiskRuleRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.CreateRiskRule") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/risk/rules" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return nil, reportError("authorization is required and must be specified") - } - if r.riskRule == nil { - return nil, reportError("riskRule is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - // body params - localVarPostBody = r.riskRule - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiCreateRolesRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string -} - -func (r ApiCreateRolesRequest) Authorization(authorization string) ApiCreateRolesRequest { - r.authorization = &authorization - return r -} - -func (r ApiCreateRolesRequest) Execute() ([]CreateRoles201ResponseInner, *http.Response, error) { - return r.ApiService.CreateRolesExecute(r) -} - -/* -CreateRoles Method for CreateRoles - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiCreateRolesRequest -*/ -func (a *DefaultApiService) CreateRoles(ctx context.Context) ApiCreateRolesRequest { - return ApiCreateRolesRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return []CreateRoles201ResponseInner -func (a *DefaultApiService) CreateRolesExecute(r ApiCreateRolesRequest) ([]CreateRoles201ResponseInner, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []CreateRoles201ResponseInner - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.CreateRoles") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/roles" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return localVarReturnValue, nil, reportError("authorization is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiCreateRuleRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - appId int32 - rule *Rule -} - -func (r ApiCreateRuleRequest) Authorization(authorization string) ApiCreateRuleRequest { - r.authorization = &authorization - return r -} - -func (r ApiCreateRuleRequest) Rule(rule Rule) ApiCreateRuleRequest { - r.rule = &rule - return r -} - -func (r ApiCreateRuleRequest) Execute() (*RuleId, *http.Response, error) { - return r.ApiService.CreateRuleExecute(r) -} - -/* -CreateRule Method for CreateRule - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param appId - @return ApiCreateRuleRequest -*/ -func (a *DefaultApiService) CreateRule(ctx context.Context, appId int32) ApiCreateRuleRequest { - return ApiCreateRuleRequest{ - ApiService: a, - ctx: ctx, - appId: appId, - } -} - -// Execute executes the request -// @return RuleId -func (a *DefaultApiService) CreateRuleExecute(r ApiCreateRuleRequest) (*RuleId, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *RuleId - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.CreateRule") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/apps/{app_id}/rules" - localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterToString(r.appId, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return localVarReturnValue, nil, reportError("authorization is required and must be specified") - } - if r.rule == nil { - return localVarReturnValue, nil, reportError("rule is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - // body params - localVarPostBody = r.rule - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ErrorStatus - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiCreateUserRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - user *User - mappings *string - validatePolicy *bool -} - -func (r ApiCreateUserRequest) Authorization(authorization string) ApiCreateUserRequest { - r.authorization = &authorization - return r -} - -func (r ApiCreateUserRequest) User(user User) ApiCreateUserRequest { - r.user = &user - return r -} - -// Controls how mappings will be applied to the user on creation. Defaults to async. -func (r ApiCreateUserRequest) Mappings(mappings string) ApiCreateUserRequest { - r.mappings = &mappings - return r -} - -// Will passwords validate against the User Policy? Defaults to true. -func (r ApiCreateUserRequest) ValidatePolicy(validatePolicy bool) ApiCreateUserRequest { - r.validatePolicy = &validatePolicy - return r -} - -func (r ApiCreateUserRequest) Execute() (*User, *http.Response, error) { - return r.ApiService.CreateUserExecute(r) -} - -/* -CreateUser Method for CreateUser - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiCreateUserRequest -*/ -func (a *DefaultApiService) CreateUser(ctx context.Context) ApiCreateUserRequest { - return ApiCreateUserRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return User -func (a *DefaultApiService) CreateUserExecute(r ApiCreateUserRequest) (*User, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *User - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.CreateUser") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/users" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return localVarReturnValue, nil, reportError("authorization is required and must be specified") - } - if r.user == nil { - return localVarReturnValue, nil, reportError("user is required and must be specified") - } - - if r.mappings != nil { - localVarQueryParams.Add("mappings", parameterToString(*r.mappings, "")) - } - if r.validatePolicy != nil { - localVarQueryParams.Add("validate_policy", parameterToString(*r.validatePolicy, "")) - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - // body params - localVarPostBody = r.user - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiDeleteAccessTokenClaimRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - id int32 - claimId int32 -} - -func (r ApiDeleteAccessTokenClaimRequest) Authorization(authorization string) ApiDeleteAccessTokenClaimRequest { - r.authorization = &authorization - return r -} - -func (r ApiDeleteAccessTokenClaimRequest) Execute() (*http.Response, error) { - return r.ApiService.DeleteAccessTokenClaimExecute(r) -} - -/* -DeleteAccessTokenClaim Method for DeleteAccessTokenClaim - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id - @param claimId - @return ApiDeleteAccessTokenClaimRequest -*/ -func (a *DefaultApiService) DeleteAccessTokenClaim(ctx context.Context, id int32, claimId int32) ApiDeleteAccessTokenClaimRequest { - return ApiDeleteAccessTokenClaimRequest{ - ApiService: a, - ctx: ctx, - id: id, - claimId: claimId, - } -} - -// Execute executes the request -func (a *DefaultApiService) DeleteAccessTokenClaimExecute(r ApiDeleteAccessTokenClaimRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeleteAccessTokenClaim") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/api_authorizations/{id}/claims/{claim_id}" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"claim_id"+"}", url.PathEscape(parameterToString(r.claimId, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return nil, reportError("authorization is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.model = v - return localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiDeleteAppRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - appId int32 -} - -func (r ApiDeleteAppRequest) Authorization(authorization string) ApiDeleteAppRequest { - r.authorization = &authorization - return r -} - -func (r ApiDeleteAppRequest) Execute() (*http.Response, error) { - return r.ApiService.DeleteAppExecute(r) -} - -/* -DeleteApp Method for DeleteApp - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param appId - @return ApiDeleteAppRequest -*/ -func (a *DefaultApiService) DeleteApp(ctx context.Context, appId int32) ApiDeleteAppRequest { - return ApiDeleteAppRequest{ - ApiService: a, - ctx: ctx, - appId: appId, - } -} - -// Execute executes the request -func (a *DefaultApiService) DeleteAppExecute(r ApiDeleteAppRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeleteApp") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/apps/{app_id}" - localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterToString(r.appId, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return nil, reportError("authorization is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.model = v - return localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiDeleteAppParameterRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - appId int32 - parameterId int32 -} - -func (r ApiDeleteAppParameterRequest) Authorization(authorization string) ApiDeleteAppParameterRequest { - r.authorization = &authorization - return r -} - -func (r ApiDeleteAppParameterRequest) Execute() (*http.Response, error) { - return r.ApiService.DeleteAppParameterExecute(r) -} - -/* -DeleteAppParameter Method for DeleteAppParameter - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param appId - @param parameterId - @return ApiDeleteAppParameterRequest -*/ -func (a *DefaultApiService) DeleteAppParameter(ctx context.Context, appId int32, parameterId int32) ApiDeleteAppParameterRequest { - return ApiDeleteAppParameterRequest{ - ApiService: a, - ctx: ctx, - appId: appId, - parameterId: parameterId, - } -} - -// Execute executes the request -func (a *DefaultApiService) DeleteAppParameterExecute(r ApiDeleteAppParameterRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeleteAppParameter") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/apps/{app_id}/parameters/{parameter_id}" - localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterToString(r.appId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"parameter_id"+"}", url.PathEscape(parameterToString(r.parameterId, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return nil, reportError("authorization is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.model = v - return localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.model = v - return localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiDeleteAuthorizationServerRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - id int32 -} - -func (r ApiDeleteAuthorizationServerRequest) Authorization(authorization string) ApiDeleteAuthorizationServerRequest { - r.authorization = &authorization - return r -} - -func (r ApiDeleteAuthorizationServerRequest) Execute() (*http.Response, error) { - return r.ApiService.DeleteAuthorizationServerExecute(r) -} - -/* -DeleteAuthorizationServer Method for DeleteAuthorizationServer - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id - @return ApiDeleteAuthorizationServerRequest -*/ -func (a *DefaultApiService) DeleteAuthorizationServer(ctx context.Context, id int32) ApiDeleteAuthorizationServerRequest { - return ApiDeleteAuthorizationServerRequest{ - ApiService: a, - ctx: ctx, - id: id, - } -} - -// Execute executes the request -func (a *DefaultApiService) DeleteAuthorizationServerExecute(r ApiDeleteAuthorizationServerRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeleteAuthorizationServer") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/api_authorizations/{id}" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return nil, reportError("authorization is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.model = v - return localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiDeleteEnvironmentVariableRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - envvarId string -} - -func (r ApiDeleteEnvironmentVariableRequest) Authorization(authorization string) ApiDeleteEnvironmentVariableRequest { - r.authorization = &authorization - return r -} - -func (r ApiDeleteEnvironmentVariableRequest) Execute() (*http.Response, error) { - return r.ApiService.DeleteEnvironmentVariableExecute(r) -} - -/* -DeleteEnvironmentVariable Method for DeleteEnvironmentVariable - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param envvarId Set to the id of the Hook Environment Variable that you want to fetch. - @return ApiDeleteEnvironmentVariableRequest -*/ -func (a *DefaultApiService) DeleteEnvironmentVariable(ctx context.Context, envvarId string) ApiDeleteEnvironmentVariableRequest { - return ApiDeleteEnvironmentVariableRequest{ - ApiService: a, - ctx: ctx, - envvarId: envvarId, - } -} - -// Execute executes the request -func (a *DefaultApiService) DeleteEnvironmentVariableExecute(r ApiDeleteEnvironmentVariableRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeleteEnvironmentVariable") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/hooks/envs/{envvar_id}" - localVarPath = strings.Replace(localVarPath, "{"+"envvar_id"+"}", url.PathEscape(parameterToString(r.envvarId, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return nil, reportError("authorization is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.model = v - return localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiDeleteFactorRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - userId int32 - deviceId int32 -} - -func (r ApiDeleteFactorRequest) Authorization(authorization string) ApiDeleteFactorRequest { - r.authorization = &authorization - return r -} - -func (r ApiDeleteFactorRequest) Execute() (*http.Response, error) { - return r.ApiService.DeleteFactorExecute(r) -} - -/* -DeleteFactor Method for DeleteFactor - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param userId Set to the id of the user. - @param deviceId Set to the device_id of the MFA device. - @return ApiDeleteFactorRequest -*/ -func (a *DefaultApiService) DeleteFactor(ctx context.Context, userId int32, deviceId int32) ApiDeleteFactorRequest { - return ApiDeleteFactorRequest{ - ApiService: a, - ctx: ctx, - userId: userId, - deviceId: deviceId, - } -} - -// Execute executes the request -func (a *DefaultApiService) DeleteFactorExecute(r ApiDeleteFactorRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeleteFactor") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/mfa/users/{user_id}/devices/{device_id}" - localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterToString(r.userId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"device_id"+"}", url.PathEscape(parameterToString(r.deviceId, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return nil, reportError("authorization is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiDeleteHookRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - hookId string -} - -func (r ApiDeleteHookRequest) Authorization(authorization string) ApiDeleteHookRequest { - r.authorization = &authorization - return r -} - -func (r ApiDeleteHookRequest) Execute() (*http.Response, error) { - return r.ApiService.DeleteHookExecute(r) -} - -/* -DeleteHook Method for DeleteHook - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param hookId Set to the id of the Hook that you want to return. - @return ApiDeleteHookRequest -*/ -func (a *DefaultApiService) DeleteHook(ctx context.Context, hookId string) ApiDeleteHookRequest { - return ApiDeleteHookRequest{ - ApiService: a, - ctx: ctx, - hookId: hookId, - } -} - -// Execute executes the request -func (a *DefaultApiService) DeleteHookExecute(r ApiDeleteHookRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeleteHook") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/hooks/{hook_id}" - localVarPath = strings.Replace(localVarPath, "{"+"hook_id"+"}", url.PathEscape(parameterToString(r.hookId, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return nil, reportError("authorization is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.model = v - return localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiDeleteMappingRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - mappingId int32 -} - -func (r ApiDeleteMappingRequest) Authorization(authorization string) ApiDeleteMappingRequest { - r.authorization = &authorization - return r -} - -func (r ApiDeleteMappingRequest) Execute() (*http.Response, error) { - return r.ApiService.DeleteMappingExecute(r) -} - -/* -DeleteMapping Method for DeleteMapping - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param mappingId The id of the user mapping to locate. - @return ApiDeleteMappingRequest -*/ -func (a *DefaultApiService) DeleteMapping(ctx context.Context, mappingId int32) ApiDeleteMappingRequest { - return ApiDeleteMappingRequest{ - ApiService: a, - ctx: ctx, - mappingId: mappingId, - } -} - -// Execute executes the request -func (a *DefaultApiService) DeleteMappingExecute(r ApiDeleteMappingRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeleteMapping") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/mappings/{mapping_id}" - localVarPath = strings.Replace(localVarPath, "{"+"mapping_id"+"}", url.PathEscape(parameterToString(r.mappingId, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return nil, reportError("authorization is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.model = v - return localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiDeleteRiskRuleRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - riskRuleId string -} - -func (r ApiDeleteRiskRuleRequest) Authorization(authorization string) ApiDeleteRiskRuleRequest { - r.authorization = &authorization - return r -} - -func (r ApiDeleteRiskRuleRequest) Execute() (*RiskRule, *http.Response, error) { - return r.ApiService.DeleteRiskRuleExecute(r) -} - -/* -DeleteRiskRule Method for DeleteRiskRule - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param riskRuleId - @return ApiDeleteRiskRuleRequest -*/ -func (a *DefaultApiService) DeleteRiskRule(ctx context.Context, riskRuleId string) ApiDeleteRiskRuleRequest { - return ApiDeleteRiskRuleRequest{ - ApiService: a, - ctx: ctx, - riskRuleId: riskRuleId, - } -} - -// Execute executes the request -// @return RiskRule -func (a *DefaultApiService) DeleteRiskRuleExecute(r ApiDeleteRiskRuleRequest) (*RiskRule, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *RiskRule - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeleteRiskRule") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/risk/rules/{risk_rule_id}" - localVarPath = strings.Replace(localVarPath, "{"+"risk_rule_id"+"}", url.PathEscape(parameterToString(r.riskRuleId, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return localVarReturnValue, nil, reportError("authorization is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiDeleteRoleRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - roleId int32 -} - -func (r ApiDeleteRoleRequest) Authorization(authorization string) ApiDeleteRoleRequest { - r.authorization = &authorization - return r -} - -func (r ApiDeleteRoleRequest) Execute() (*http.Response, error) { - return r.ApiService.DeleteRoleExecute(r) -} - -/* -DeleteRole Method for DeleteRole - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param roleId Set to the id of the role you want to return. - @return ApiDeleteRoleRequest -*/ -func (a *DefaultApiService) DeleteRole(ctx context.Context, roleId int32) ApiDeleteRoleRequest { - return ApiDeleteRoleRequest{ - ApiService: a, - ctx: ctx, - roleId: roleId, - } -} - -// Execute executes the request -func (a *DefaultApiService) DeleteRoleExecute(r ApiDeleteRoleRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeleteRole") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/roles/{role_id}" - localVarPath = strings.Replace(localVarPath, "{"+"role_id"+"}", url.PathEscape(parameterToString(r.roleId, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return nil, reportError("authorization is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.model = v - return localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiDeleteRuleRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - appId int32 - ruleId int32 -} - -func (r ApiDeleteRuleRequest) Authorization(authorization string) ApiDeleteRuleRequest { - r.authorization = &authorization - return r -} - -func (r ApiDeleteRuleRequest) Execute() (*http.Response, error) { - return r.ApiService.DeleteRuleExecute(r) -} - -/* -DeleteRule Method for DeleteRule - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param appId - @param ruleId The id of the app rule to locate. - @return ApiDeleteRuleRequest -*/ -func (a *DefaultApiService) DeleteRule(ctx context.Context, appId int32, ruleId int32) ApiDeleteRuleRequest { - return ApiDeleteRuleRequest{ - ApiService: a, - ctx: ctx, - appId: appId, - ruleId: ruleId, - } -} - -// Execute executes the request -func (a *DefaultApiService) DeleteRuleExecute(r ApiDeleteRuleRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeleteRule") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/apps/{app_id}/rules/{rule_id}" - localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterToString(r.appId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"rule_id"+"}", url.PathEscape(parameterToString(r.ruleId, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return nil, reportError("authorization is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.model = v - return localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiDeleteScopeRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - id int32 - scopeId int32 -} - -func (r ApiDeleteScopeRequest) Authorization(authorization string) ApiDeleteScopeRequest { - r.authorization = &authorization - return r -} - -func (r ApiDeleteScopeRequest) Execute() (*http.Response, error) { - return r.ApiService.DeleteScopeExecute(r) -} - -/* -DeleteScope Method for DeleteScope - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id - @param scopeId - @return ApiDeleteScopeRequest -*/ -func (a *DefaultApiService) DeleteScope(ctx context.Context, id int32, scopeId int32) ApiDeleteScopeRequest { - return ApiDeleteScopeRequest{ - ApiService: a, - ctx: ctx, - id: id, - scopeId: scopeId, - } -} - -// Execute executes the request -func (a *DefaultApiService) DeleteScopeExecute(r ApiDeleteScopeRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeleteScope") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/api_authorizations/{id}/scopes/{scope_id}" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"scope_id"+"}", url.PathEscape(parameterToString(r.scopeId, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return nil, reportError("authorization is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.model = v - return localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiDeleteUserRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - userId int32 -} - -func (r ApiDeleteUserRequest) Authorization(authorization string) ApiDeleteUserRequest { - r.authorization = &authorization - return r -} - -func (r ApiDeleteUserRequest) Execute() (*http.Response, error) { - return r.ApiService.DeleteUserExecute(r) -} - -/* -DeleteUser Method for DeleteUser - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param userId Set to the id of the user that you want to return. - @return ApiDeleteUserRequest -*/ -func (a *DefaultApiService) DeleteUser(ctx context.Context, userId int32) ApiDeleteUserRequest { - return ApiDeleteUserRequest{ - ApiService: a, - ctx: ctx, - userId: userId, - } -} - -// Execute executes the request -func (a *DefaultApiService) DeleteUserExecute(r ApiDeleteUserRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeleteUser") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/users/{user_id}" - localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterToString(r.userId, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return nil, reportError("authorization is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.model = v - return localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiDryRunMappingRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - mappingId int32 - requestBody *[]int32 -} - -func (r ApiDryRunMappingRequest) Authorization(authorization string) ApiDryRunMappingRequest { - r.authorization = &authorization - return r -} - -// Request body is a list of user IDs tested against the mapping conditions to verify that the mapping would be applied -func (r ApiDryRunMappingRequest) RequestBody(requestBody []int32) ApiDryRunMappingRequest { - r.requestBody = &requestBody - return r -} - -func (r ApiDryRunMappingRequest) Execute() ([]map[string]interface{}, *http.Response, error) { - return r.ApiService.DryRunMappingExecute(r) -} - -/* -DryRunMapping Method for DryRunMapping - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param mappingId The id of the user mapping to locate. - @return ApiDryRunMappingRequest -*/ -func (a *DefaultApiService) DryRunMapping(ctx context.Context, mappingId int32) ApiDryRunMappingRequest { - return ApiDryRunMappingRequest{ - ApiService: a, - ctx: ctx, - mappingId: mappingId, - } -} - -// Execute executes the request -// @return []map[string]interface{} -func (a *DefaultApiService) DryRunMappingExecute(r ApiDryRunMappingRequest) ([]map[string]interface{}, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []map[string]interface{} - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DryRunMapping") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/mappings/{mapping_id}/dryrun" - localVarPath = strings.Replace(localVarPath, "{"+"mapping_id"+"}", url.PathEscape(parameterToString(r.mappingId, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return localVarReturnValue, nil, reportError("authorization is required and must be specified") - } - if r.requestBody == nil { - return localVarReturnValue, nil, reportError("requestBody is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - // body params - localVarPostBody = r.requestBody - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ErrorStatus - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiEnrollFactorRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - userId int32 - enrollFactorRequest *EnrollFactorRequest -} - -func (r ApiEnrollFactorRequest) Authorization(authorization string) ApiEnrollFactorRequest { - r.authorization = &authorization - return r -} - -func (r ApiEnrollFactorRequest) EnrollFactorRequest(enrollFactorRequest EnrollFactorRequest) ApiEnrollFactorRequest { - r.enrollFactorRequest = &enrollFactorRequest - return r -} - -func (r ApiEnrollFactorRequest) Execute() ([][]FactorInner, *http.Response, error) { - return r.ApiService.EnrollFactorExecute(r) -} - -/* -EnrollFactor Method for EnrollFactor - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param userId Set to the id of the user. - @return ApiEnrollFactorRequest -*/ -func (a *DefaultApiService) EnrollFactor(ctx context.Context, userId int32) ApiEnrollFactorRequest { - return ApiEnrollFactorRequest{ - ApiService: a, - ctx: ctx, - userId: userId, - } -} - -// Execute executes the request -// @return [][]FactorInner -func (a *DefaultApiService) EnrollFactorExecute(r ApiEnrollFactorRequest) ([][]FactorInner, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue [][]FactorInner - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.EnrollFactor") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/mfa/users/{user_id}/registrations" - localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterToString(r.userId, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return localVarReturnValue, nil, reportError("authorization is required and must be specified") - } - if r.enrollFactorRequest == nil { - return localVarReturnValue, nil, reportError("enrollFactorRequest is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - // body params - localVarPostBody = r.enrollFactorRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGenerateMfaTokenRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - generateMfaTokenRequest *GenerateMfaTokenRequest -} - -func (r ApiGenerateMfaTokenRequest) Authorization(authorization string) ApiGenerateMfaTokenRequest { - r.authorization = &authorization - return r -} - -func (r ApiGenerateMfaTokenRequest) GenerateMfaTokenRequest(generateMfaTokenRequest GenerateMfaTokenRequest) ApiGenerateMfaTokenRequest { - r.generateMfaTokenRequest = &generateMfaTokenRequest - return r -} - -func (r ApiGenerateMfaTokenRequest) Execute() (*GenerateMfaToken200Response, *http.Response, error) { - return r.ApiService.GenerateMfaTokenExecute(r) -} - -/* -GenerateMfaToken Method for GenerateMfaToken - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGenerateMfaTokenRequest -*/ -func (a *DefaultApiService) GenerateMfaToken(ctx context.Context) ApiGenerateMfaTokenRequest { - return ApiGenerateMfaTokenRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return GenerateMfaToken200Response -func (a *DefaultApiService) GenerateMfaTokenExecute(r ApiGenerateMfaTokenRequest) (*GenerateMfaToken200Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GenerateMfaToken200Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GenerateMfaToken") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/mfs/users/{user_id}/mfa_token" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return localVarReturnValue, nil, reportError("authorization is required and must be specified") - } - if r.generateMfaTokenRequest == nil { - return localVarReturnValue, nil, reportError("generateMfaTokenRequest is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - // body params - localVarPostBody = r.generateMfaTokenRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v GenerateMfaToken422Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGenerateSamlAssertionRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - generateSamlAssertionRequest *GenerateSamlAssertionRequest -} - -func (r ApiGenerateSamlAssertionRequest) Authorization(authorization string) ApiGenerateSamlAssertionRequest { - r.authorization = &authorization - return r -} - -func (r ApiGenerateSamlAssertionRequest) GenerateSamlAssertionRequest(generateSamlAssertionRequest GenerateSamlAssertionRequest) ApiGenerateSamlAssertionRequest { - r.generateSamlAssertionRequest = &generateSamlAssertionRequest - return r -} - -func (r ApiGenerateSamlAssertionRequest) Execute() (*http.Response, error) { - return r.ApiService.GenerateSamlAssertionExecute(r) -} - -/* -GenerateSamlAssertion Method for GenerateSamlAssertion - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGenerateSamlAssertionRequest -*/ -func (a *DefaultApiService) GenerateSamlAssertion(ctx context.Context) ApiGenerateSamlAssertionRequest { - return ApiGenerateSamlAssertionRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -func (a *DefaultApiService) GenerateSamlAssertionExecute(r ApiGenerateSamlAssertionRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GenerateSamlAssertion") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/saml_assertion" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return nil, reportError("authorization is required and must be specified") - } - if r.generateSamlAssertionRequest == nil { - return nil, reportError("generateSamlAssertionRequest is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - // body params - localVarPostBody = r.generateSamlAssertionRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiGenerateTokenRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - generateTokenRequest *GenerateTokenRequest -} - -func (r ApiGenerateTokenRequest) Authorization(authorization string) ApiGenerateTokenRequest { - r.authorization = &authorization - return r -} - -func (r ApiGenerateTokenRequest) GenerateTokenRequest(generateTokenRequest GenerateTokenRequest) ApiGenerateTokenRequest { - r.generateTokenRequest = &generateTokenRequest - return r -} - -func (r ApiGenerateTokenRequest) Execute() (*GenerateToken200Response, *http.Response, error) { - return r.ApiService.GenerateTokenExecute(r) -} - -/* -GenerateToken Method for GenerateToken - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGenerateTokenRequest -*/ -func (a *DefaultApiService) GenerateToken(ctx context.Context) ApiGenerateTokenRequest { - return ApiGenerateTokenRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return GenerateToken200Response -func (a *DefaultApiService) GenerateTokenExecute(r ApiGenerateTokenRequest) (*GenerateToken200Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GenerateToken200Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GenerateToken") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/auth/oauth2/v2/token" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return localVarReturnValue, nil, reportError("authorization is required and must be specified") - } - if r.generateTokenRequest == nil { - return localVarReturnValue, nil, reportError("generateTokenRequest is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - // body params - localVarPostBody = r.generateTokenRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v GenerateToken400Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v GenerateToken400Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v GenerateToken400Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetAppRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - appId int32 -} - -func (r ApiGetAppRequest) Authorization(authorization string) ApiGetAppRequest { - r.authorization = &authorization - return r -} - -func (r ApiGetAppRequest) Execute() (*Schema, *http.Response, error) { - return r.ApiService.GetAppExecute(r) -} - -/* -GetApp Method for GetApp - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param appId - @return ApiGetAppRequest -*/ -func (a *DefaultApiService) GetApp(ctx context.Context, appId int32) ApiGetAppRequest { - return ApiGetAppRequest{ - ApiService: a, - ctx: ctx, - appId: appId, - } -} - -// Execute executes the request -// @return Schema -func (a *DefaultApiService) GetAppExecute(r ApiGetAppRequest) (*Schema, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Schema - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetApp") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/apps/{app_id}" - localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterToString(r.appId, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return localVarReturnValue, nil, reportError("authorization is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetAuthorizationServerRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - id int32 -} - -func (r ApiGetAuthorizationServerRequest) Authorization(authorization string) ApiGetAuthorizationServerRequest { - r.authorization = &authorization - return r -} - -func (r ApiGetAuthorizationServerRequest) Execute() (*GetAuthorizationServer200Response, *http.Response, error) { - return r.ApiService.GetAuthorizationServerExecute(r) -} - -/* -GetAuthorizationServer Method for GetAuthorizationServer - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id - @return ApiGetAuthorizationServerRequest -*/ -func (a *DefaultApiService) GetAuthorizationServer(ctx context.Context, id int32) ApiGetAuthorizationServerRequest { - return ApiGetAuthorizationServerRequest{ - ApiService: a, - ctx: ctx, - id: id, - } -} - -// Execute executes the request -// @return GetAuthorizationServer200Response -func (a *DefaultApiService) GetAuthorizationServerExecute(r ApiGetAuthorizationServerRequest) (*GetAuthorizationServer200Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetAuthorizationServer200Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetAuthorizationServer") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/api_authorizations/{id}" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return localVarReturnValue, nil, reportError("authorization is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetAvailableFactorsRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - userId int32 -} - -func (r ApiGetAvailableFactorsRequest) Authorization(authorization string) ApiGetAvailableFactorsRequest { - r.authorization = &authorization - return r -} - -func (r ApiGetAvailableFactorsRequest) Execute() ([]GetAvailableFactors200ResponseInner, *http.Response, error) { - return r.ApiService.GetAvailableFactorsExecute(r) -} - -/* -GetAvailableFactors Method for GetAvailableFactors - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param userId Set to the id of the user. - @return ApiGetAvailableFactorsRequest -*/ -func (a *DefaultApiService) GetAvailableFactors(ctx context.Context, userId int32) ApiGetAvailableFactorsRequest { - return ApiGetAvailableFactorsRequest{ - ApiService: a, - ctx: ctx, - userId: userId, - } -} - -// Execute executes the request -// @return []GetAvailableFactors200ResponseInner -func (a *DefaultApiService) GetAvailableFactorsExecute(r ApiGetAvailableFactorsRequest) ([]GetAvailableFactors200ResponseInner, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []GetAvailableFactors200ResponseInner - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetAvailableFactors") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/mfa/users/{user_id}/factors" - localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterToString(r.userId, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return localVarReturnValue, nil, reportError("authorization is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetClientAppsRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - id int32 -} - -func (r ApiGetClientAppsRequest) Authorization(authorization string) ApiGetClientAppsRequest { - r.authorization = &authorization - return r -} - -func (r ApiGetClientAppsRequest) Execute() ([]GetClientApps200ResponseInner, *http.Response, error) { - return r.ApiService.GetClientAppsExecute(r) -} - -/* -GetClientApps Method for GetClientApps - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id - @return ApiGetClientAppsRequest -*/ -func (a *DefaultApiService) GetClientApps(ctx context.Context, id int32) ApiGetClientAppsRequest { - return ApiGetClientAppsRequest{ - ApiService: a, - ctx: ctx, - id: id, - } -} - -// Execute executes the request -// @return []GetClientApps200ResponseInner -func (a *DefaultApiService) GetClientAppsExecute(r ApiGetClientAppsRequest) ([]GetClientApps200ResponseInner, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []GetClientApps200ResponseInner - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetClientApps") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/api_authorizations/{id}/clients" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return localVarReturnValue, nil, reportError("authorization is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetEnrolledFactorsRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - userId int32 -} - -func (r ApiGetEnrolledFactorsRequest) Authorization(authorization string) ApiGetEnrolledFactorsRequest { - r.authorization = &authorization - return r -} - -func (r ApiGetEnrolledFactorsRequest) Execute() ([]Device, *http.Response, error) { - return r.ApiService.GetEnrolledFactorsExecute(r) -} - -/* -GetEnrolledFactors Method for GetEnrolledFactors - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param userId Set to the id of the user. - @return ApiGetEnrolledFactorsRequest -*/ -func (a *DefaultApiService) GetEnrolledFactors(ctx context.Context, userId int32) ApiGetEnrolledFactorsRequest { - return ApiGetEnrolledFactorsRequest{ - ApiService: a, - ctx: ctx, - userId: userId, - } -} - -// Execute executes the request -// @return []Device -func (a *DefaultApiService) GetEnrolledFactorsExecute(r ApiGetEnrolledFactorsRequest) ([]Device, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []Device - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetEnrolledFactors") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/mfa/users/{user_id}/devices" - localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterToString(r.userId, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return localVarReturnValue, nil, reportError("authorization is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetEnvironmentVariableRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - envvarId string -} - -func (r ApiGetEnvironmentVariableRequest) Authorization(authorization string) ApiGetEnvironmentVariableRequest { - r.authorization = &authorization - return r -} - -func (r ApiGetEnvironmentVariableRequest) Execute() (*Envvar, *http.Response, error) { - return r.ApiService.GetEnvironmentVariableExecute(r) -} - -/* -GetEnvironmentVariable Method for GetEnvironmentVariable - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param envvarId Set to the id of the Hook Environment Variable that you want to fetch. - @return ApiGetEnvironmentVariableRequest -*/ -func (a *DefaultApiService) GetEnvironmentVariable(ctx context.Context, envvarId string) ApiGetEnvironmentVariableRequest { - return ApiGetEnvironmentVariableRequest{ - ApiService: a, - ctx: ctx, - envvarId: envvarId, - } -} - -// Execute executes the request -// @return Envvar -func (a *DefaultApiService) GetEnvironmentVariableExecute(r ApiGetEnvironmentVariableRequest) (*Envvar, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Envvar - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetEnvironmentVariable") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/hooks/envs/{envvar_id}" - localVarPath = strings.Replace(localVarPath, "{"+"envvar_id"+"}", url.PathEscape(parameterToString(r.envvarId, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return localVarReturnValue, nil, reportError("authorization is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetHookRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - hookId string -} - -func (r ApiGetHookRequest) Authorization(authorization string) ApiGetHookRequest { - r.authorization = &authorization - return r -} - -func (r ApiGetHookRequest) Execute() (*Hook, *http.Response, error) { - return r.ApiService.GetHookExecute(r) -} - -/* -GetHook Method for GetHook - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param hookId Set to the id of the Hook that you want to return. - @return ApiGetHookRequest -*/ -func (a *DefaultApiService) GetHook(ctx context.Context, hookId string) ApiGetHookRequest { - return ApiGetHookRequest{ - ApiService: a, - ctx: ctx, - hookId: hookId, - } -} - -// Execute executes the request -// @return Hook -func (a *DefaultApiService) GetHookExecute(r ApiGetHookRequest) (*Hook, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Hook - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetHook") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/hooks/{hook_id}" - localVarPath = strings.Replace(localVarPath, "{"+"hook_id"+"}", url.PathEscape(parameterToString(r.hookId, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return localVarReturnValue, nil, reportError("authorization is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetLogsRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - hookId string - limit *int32 - page *int32 - cursor *string - requestId *string - correlationId *string -} - -func (r ApiGetLogsRequest) Authorization(authorization string) ApiGetLogsRequest { - r.authorization = &authorization - return r -} - -// The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. -func (r ApiGetLogsRequest) Limit(limit int32) ApiGetLogsRequest { - r.limit = &limit - return r -} - -// The page number of results to return. -func (r ApiGetLogsRequest) Page(page int32) ApiGetLogsRequest { - r.page = &page - return r -} - -// Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. -func (r ApiGetLogsRequest) Cursor(cursor string) ApiGetLogsRequest { - r.cursor = &cursor - return r -} - -// Returns logs that contain this request_id. -func (r ApiGetLogsRequest) RequestId(requestId string) ApiGetLogsRequest { - r.requestId = &requestId - return r -} - -// Returns logs that contain this correlation_id. -func (r ApiGetLogsRequest) CorrelationId(correlationId string) ApiGetLogsRequest { - r.correlationId = &correlationId - return r -} - -func (r ApiGetLogsRequest) Execute() ([]Log, *http.Response, error) { - return r.ApiService.GetLogsExecute(r) -} - -/* -GetLogs Method for GetLogs - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param hookId Set to the id of the Hook that you want to return. - @return ApiGetLogsRequest -*/ -func (a *DefaultApiService) GetLogs(ctx context.Context, hookId string) ApiGetLogsRequest { - return ApiGetLogsRequest{ - ApiService: a, - ctx: ctx, - hookId: hookId, - } -} - -// Execute executes the request -// @return []Log -func (a *DefaultApiService) GetLogsExecute(r ApiGetLogsRequest) ([]Log, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []Log - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetLogs") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/hooks/{hook_id}/logs" - localVarPath = strings.Replace(localVarPath, "{"+"hook_id"+"}", url.PathEscape(parameterToString(r.hookId, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return localVarReturnValue, nil, reportError("authorization is required and must be specified") - } - - if r.limit != nil { - localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) - } - if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) - } - if r.cursor != nil { - localVarQueryParams.Add("cursor", parameterToString(*r.cursor, "")) - } - if r.requestId != nil { - localVarQueryParams.Add("request_id", parameterToString(*r.requestId, "")) - } - if r.correlationId != nil { - localVarQueryParams.Add("correlation_id", parameterToString(*r.correlationId, "")) - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetMappingRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - mappingId int32 -} - -func (r ApiGetMappingRequest) Authorization(authorization string) ApiGetMappingRequest { - r.authorization = &authorization - return r -} - -func (r ApiGetMappingRequest) Execute() (*Mapping, *http.Response, error) { - return r.ApiService.GetMappingExecute(r) -} - -/* -GetMapping Method for GetMapping - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param mappingId The id of the user mapping to locate. - @return ApiGetMappingRequest -*/ -func (a *DefaultApiService) GetMapping(ctx context.Context, mappingId int32) ApiGetMappingRequest { - return ApiGetMappingRequest{ - ApiService: a, - ctx: ctx, - mappingId: mappingId, - } -} - -// Execute executes the request -// @return Mapping -func (a *DefaultApiService) GetMappingExecute(r ApiGetMappingRequest) (*Mapping, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Mapping - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetMapping") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/mappings/{mapping_id}" - localVarPath = strings.Replace(localVarPath, "{"+"mapping_id"+"}", url.PathEscape(parameterToString(r.mappingId, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return localVarReturnValue, nil, reportError("authorization is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetRateLimitRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string -} - -func (r ApiGetRateLimitRequest) Authorization(authorization string) ApiGetRateLimitRequest { - r.authorization = &authorization - return r -} - -func (r ApiGetRateLimitRequest) Execute() (*GetRateLimit200Response, *http.Response, error) { - return r.ApiService.GetRateLimitExecute(r) -} - -/* -GetRateLimit Method for GetRateLimit - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetRateLimitRequest -*/ -func (a *DefaultApiService) GetRateLimit(ctx context.Context) ApiGetRateLimitRequest { - return ApiGetRateLimitRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return GetRateLimit200Response -func (a *DefaultApiService) GetRateLimitExecute(r ApiGetRateLimitRequest) (*GetRateLimit200Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetRateLimit200Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetRateLimit") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/auth/rate_limit" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return localVarReturnValue, nil, reportError("authorization is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v GenerateToken400Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v GenerateToken400Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v GenerateToken400Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetRiskRuleRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - riskRuleId string -} - -func (r ApiGetRiskRuleRequest) Authorization(authorization string) ApiGetRiskRuleRequest { - r.authorization = &authorization - return r -} - -func (r ApiGetRiskRuleRequest) Execute() (*http.Response, error) { - return r.ApiService.GetRiskRuleExecute(r) -} - -/* -GetRiskRule Method for GetRiskRule - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param riskRuleId - @return ApiGetRiskRuleRequest -*/ -func (a *DefaultApiService) GetRiskRule(ctx context.Context, riskRuleId string) ApiGetRiskRuleRequest { - return ApiGetRiskRuleRequest{ - ApiService: a, - ctx: ctx, - riskRuleId: riskRuleId, - } -} - -// Execute executes the request -func (a *DefaultApiService) GetRiskRuleExecute(r ApiGetRiskRuleRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetRiskRule") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/risk/rules/{risk_rule_id}" - localVarPath = strings.Replace(localVarPath, "{"+"risk_rule_id"+"}", url.PathEscape(parameterToString(r.riskRuleId, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return nil, reportError("authorization is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiGetRiskScoreRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - getRiskScoreRequest *GetRiskScoreRequest -} - -func (r ApiGetRiskScoreRequest) Authorization(authorization string) ApiGetRiskScoreRequest { - r.authorization = &authorization - return r -} - -func (r ApiGetRiskScoreRequest) GetRiskScoreRequest(getRiskScoreRequest GetRiskScoreRequest) ApiGetRiskScoreRequest { - r.getRiskScoreRequest = &getRiskScoreRequest - return r -} - -func (r ApiGetRiskScoreRequest) Execute() (*GetRiskScore200Response, *http.Response, error) { - return r.ApiService.GetRiskScoreExecute(r) -} - -/* -GetRiskScore Method for GetRiskScore - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetRiskScoreRequest -*/ -func (a *DefaultApiService) GetRiskScore(ctx context.Context) ApiGetRiskScoreRequest { - return ApiGetRiskScoreRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return GetRiskScore200Response -func (a *DefaultApiService) GetRiskScoreExecute(r ApiGetRiskScoreRequest) (*GetRiskScore200Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetRiskScore200Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetRiskScore") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/risk/verify" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return localVarReturnValue, nil, reportError("authorization is required and must be specified") - } - if r.getRiskScoreRequest == nil { - return localVarReturnValue, nil, reportError("getRiskScoreRequest is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - // body params - localVarPostBody = r.getRiskScoreRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v GetRiskScore400Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetRoleRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - roleId int32 -} - -func (r ApiGetRoleRequest) Authorization(authorization string) ApiGetRoleRequest { - r.authorization = &authorization - return r -} - -func (r ApiGetRoleRequest) Execute() (*Role, *http.Response, error) { - return r.ApiService.GetRoleExecute(r) -} - -/* -GetRole Method for GetRole - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param roleId Set to the id of the role you want to return. - @return ApiGetRoleRequest -*/ -func (a *DefaultApiService) GetRole(ctx context.Context, roleId int32) ApiGetRoleRequest { - return ApiGetRoleRequest{ - ApiService: a, - ctx: ctx, - roleId: roleId, - } -} - -// Execute executes the request -// @return Role -func (a *DefaultApiService) GetRoleExecute(r ApiGetRoleRequest) (*Role, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Role - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetRole") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/roles/{role_id}" - localVarPath = strings.Replace(localVarPath, "{"+"role_id"+"}", url.PathEscape(parameterToString(r.roleId, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return localVarReturnValue, nil, reportError("authorization is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetRoleAdminsRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - roleId int32 - limit *int32 - page *int32 - cursor *string - name *string - includeUnassigned *bool -} - -func (r ApiGetRoleAdminsRequest) Authorization(authorization string) ApiGetRoleAdminsRequest { - r.authorization = &authorization - return r -} - -// The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. -func (r ApiGetRoleAdminsRequest) Limit(limit int32) ApiGetRoleAdminsRequest { - r.limit = &limit - return r -} - -// The page number of results to return. -func (r ApiGetRoleAdminsRequest) Page(page int32) ApiGetRoleAdminsRequest { - r.page = &page - return r -} - -// Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. -func (r ApiGetRoleAdminsRequest) Cursor(cursor string) ApiGetRoleAdminsRequest { - r.cursor = &cursor - return r -} - -// Allows you to filter on first name, last name, username, and email address. -func (r ApiGetRoleAdminsRequest) Name(name string) ApiGetRoleAdminsRequest { - r.name = &name - return r -} - -// Optional. Defaults to false. Include users that aren’t assigned to the role. -func (r ApiGetRoleAdminsRequest) IncludeUnassigned(includeUnassigned bool) ApiGetRoleAdminsRequest { - r.includeUnassigned = &includeUnassigned - return r -} - -func (r ApiGetRoleAdminsRequest) Execute() ([]Schema1, *http.Response, error) { - return r.ApiService.GetRoleAdminsExecute(r) -} - -/* -GetRoleAdmins Method for GetRoleAdmins - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param roleId Set to the id of the role you want to return. - @return ApiGetRoleAdminsRequest -*/ -func (a *DefaultApiService) GetRoleAdmins(ctx context.Context, roleId int32) ApiGetRoleAdminsRequest { - return ApiGetRoleAdminsRequest{ - ApiService: a, - ctx: ctx, - roleId: roleId, - } -} - -// Execute executes the request -// @return []Schema1 -func (a *DefaultApiService) GetRoleAdminsExecute(r ApiGetRoleAdminsRequest) ([]Schema1, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []Schema1 - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetRoleAdmins") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/roles/{role_id}/admins" - localVarPath = strings.Replace(localVarPath, "{"+"role_id"+"}", url.PathEscape(parameterToString(r.roleId, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return localVarReturnValue, nil, reportError("authorization is required and must be specified") - } - - if r.limit != nil { - localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) - } - if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) - } - if r.cursor != nil { - localVarQueryParams.Add("cursor", parameterToString(*r.cursor, "")) - } - if r.name != nil { - localVarQueryParams.Add("name", parameterToString(*r.name, "")) - } - if r.includeUnassigned != nil { - localVarQueryParams.Add("include_unassigned", parameterToString(*r.includeUnassigned, "")) - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"applcation/json", "application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetRoleAppsRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - roleId int32 - limit *int32 - page *int32 - cursor *string - assigned *bool -} - -func (r ApiGetRoleAppsRequest) Authorization(authorization string) ApiGetRoleAppsRequest { - r.authorization = &authorization - return r -} - -// The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. -func (r ApiGetRoleAppsRequest) Limit(limit int32) ApiGetRoleAppsRequest { - r.limit = &limit - return r -} - -// The page number of results to return. -func (r ApiGetRoleAppsRequest) Page(page int32) ApiGetRoleAppsRequest { - r.page = &page - return r -} - -// Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. -func (r ApiGetRoleAppsRequest) Cursor(cursor string) ApiGetRoleAppsRequest { - r.cursor = &cursor - return r -} - -// Optional. Defaults to true. Returns all apps not yet assigned to the role. -func (r ApiGetRoleAppsRequest) Assigned(assigned bool) ApiGetRoleAppsRequest { - r.assigned = &assigned - return r -} - -func (r ApiGetRoleAppsRequest) Execute() ([]Schema, *http.Response, error) { - return r.ApiService.GetRoleAppsExecute(r) -} - -/* -GetRoleApps Method for GetRoleApps - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param roleId Set to the id of the role you want to return. - @return ApiGetRoleAppsRequest -*/ -func (a *DefaultApiService) GetRoleApps(ctx context.Context, roleId int32) ApiGetRoleAppsRequest { - return ApiGetRoleAppsRequest{ - ApiService: a, - ctx: ctx, - roleId: roleId, - } -} - -// Execute executes the request -// @return []Schema -func (a *DefaultApiService) GetRoleAppsExecute(r ApiGetRoleAppsRequest) ([]Schema, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []Schema - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetRoleApps") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/roles/{role_id}/apps" - localVarPath = strings.Replace(localVarPath, "{"+"role_id"+"}", url.PathEscape(parameterToString(r.roleId, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return localVarReturnValue, nil, reportError("authorization is required and must be specified") - } - - if r.limit != nil { - localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) - } - if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) - } - if r.cursor != nil { - localVarQueryParams.Add("cursor", parameterToString(*r.cursor, "")) - } - if r.assigned != nil { - localVarQueryParams.Add("assigned", parameterToString(*r.assigned, "")) - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"applcation/json", "application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetRoleUsersRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - roleId int32 - limit *int32 - page *int32 - cursor *string - name *string - includeUnassigned *bool -} - -func (r ApiGetRoleUsersRequest) Authorization(authorization string) ApiGetRoleUsersRequest { - r.authorization = &authorization - return r -} - -// The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. -func (r ApiGetRoleUsersRequest) Limit(limit int32) ApiGetRoleUsersRequest { - r.limit = &limit - return r -} - -// The page number of results to return. -func (r ApiGetRoleUsersRequest) Page(page int32) ApiGetRoleUsersRequest { - r.page = &page - return r -} - -// Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. -func (r ApiGetRoleUsersRequest) Cursor(cursor string) ApiGetRoleUsersRequest { - r.cursor = &cursor - return r -} - -// Allows you to filter on first name, last name, username, and email address. -func (r ApiGetRoleUsersRequest) Name(name string) ApiGetRoleUsersRequest { - r.name = &name - return r -} - -// Optional. Defaults to false. Include users that aren’t assigned to the role. -func (r ApiGetRoleUsersRequest) IncludeUnassigned(includeUnassigned bool) ApiGetRoleUsersRequest { - r.includeUnassigned = &includeUnassigned - return r -} - -func (r ApiGetRoleUsersRequest) Execute() ([]Schema1, *http.Response, error) { - return r.ApiService.GetRoleUsersExecute(r) -} - -/* -GetRoleUsers Method for GetRoleUsers - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param roleId Set to the id of the role you want to return. - @return ApiGetRoleUsersRequest -*/ -func (a *DefaultApiService) GetRoleUsers(ctx context.Context, roleId int32) ApiGetRoleUsersRequest { - return ApiGetRoleUsersRequest{ - ApiService: a, - ctx: ctx, - roleId: roleId, - } -} - -// Execute executes the request -// @return []Schema1 -func (a *DefaultApiService) GetRoleUsersExecute(r ApiGetRoleUsersRequest) ([]Schema1, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []Schema1 - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetRoleUsers") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/roles/{role_id}/users" - localVarPath = strings.Replace(localVarPath, "{"+"role_id"+"}", url.PathEscape(parameterToString(r.roleId, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return localVarReturnValue, nil, reportError("authorization is required and must be specified") - } - - if r.limit != nil { - localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) - } - if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) - } - if r.cursor != nil { - localVarQueryParams.Add("cursor", parameterToString(*r.cursor, "")) - } - if r.name != nil { - localVarQueryParams.Add("name", parameterToString(*r.name, "")) - } - if r.includeUnassigned != nil { - localVarQueryParams.Add("include_unassigned", parameterToString(*r.includeUnassigned, "")) - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"applcation/json", "application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetRuleRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - appId int32 - ruleId int32 -} - -func (r ApiGetRuleRequest) Authorization(authorization string) ApiGetRuleRequest { - r.authorization = &authorization - return r -} - -func (r ApiGetRuleRequest) Execute() (*Rule, *http.Response, error) { - return r.ApiService.GetRuleExecute(r) -} - -/* -GetRule Method for GetRule - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param appId - @param ruleId The id of the app rule to locate. - @return ApiGetRuleRequest -*/ -func (a *DefaultApiService) GetRule(ctx context.Context, appId int32, ruleId int32) ApiGetRuleRequest { - return ApiGetRuleRequest{ - ApiService: a, - ctx: ctx, - appId: appId, - ruleId: ruleId, - } -} - -// Execute executes the request -// @return Rule -func (a *DefaultApiService) GetRuleExecute(r ApiGetRuleRequest) (*Rule, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Rule - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetRule") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/apps/{app_id}/rules/{rule_id}" - localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterToString(r.appId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"rule_id"+"}", url.PathEscape(parameterToString(r.ruleId, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return localVarReturnValue, nil, reportError("authorization is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetScoreInsightsRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - before *string - after *string -} - -func (r ApiGetScoreInsightsRequest) Authorization(authorization string) ApiGetScoreInsightsRequest { - r.authorization = &authorization - return r -} - -// Optional ISO8601 formatted date string. Defaults to current date. Maximum date is 90 days ago. -func (r ApiGetScoreInsightsRequest) Before(before string) ApiGetScoreInsightsRequest { - r.before = &before - return r -} - -// Optional ISO8601 formatted date string. Defaults to 30 days ago. Maximum date is 90 days ago. -func (r ApiGetScoreInsightsRequest) After(after string) ApiGetScoreInsightsRequest { - r.after = &after - return r -} - -func (r ApiGetScoreInsightsRequest) Execute() (*GetScoreInsights200Response, *http.Response, error) { - return r.ApiService.GetScoreInsightsExecute(r) -} - -/* -GetScoreInsights Method for GetScoreInsights - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetScoreInsightsRequest -*/ -func (a *DefaultApiService) GetScoreInsights(ctx context.Context) ApiGetScoreInsightsRequest { - return ApiGetScoreInsightsRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return GetScoreInsights200Response -func (a *DefaultApiService) GetScoreInsightsExecute(r ApiGetScoreInsightsRequest) (*GetScoreInsights200Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetScoreInsights200Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetScoreInsights") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/risk/scores" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return localVarReturnValue, nil, reportError("authorization is required and must be specified") - } - - if r.before != nil { - localVarQueryParams.Add("before", parameterToString(*r.before, "")) - } - if r.after != nil { - localVarQueryParams.Add("after", parameterToString(*r.after, "")) - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetUserRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - userId int32 -} - -func (r ApiGetUserRequest) Authorization(authorization string) ApiGetUserRequest { - r.authorization = &authorization - return r -} - -func (r ApiGetUserRequest) Execute() (*User, *http.Response, error) { - return r.ApiService.GetUserExecute(r) -} - -/* -GetUser Method for GetUser - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param userId Set to the id of the user that you want to return. - @return ApiGetUserRequest -*/ -func (a *DefaultApiService) GetUser(ctx context.Context, userId int32) ApiGetUserRequest { - return ApiGetUserRequest{ - ApiService: a, - ctx: ctx, - userId: userId, - } -} - -// Execute executes the request -// @return User -func (a *DefaultApiService) GetUserExecute(r ApiGetUserRequest) (*User, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *User - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetUser") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/users/{user_id}" - localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterToString(r.userId, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return localVarReturnValue, nil, reportError("authorization is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetUserAppsRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - userId int32 - ignoreVisibility *bool -} - -func (r ApiGetUserAppsRequest) Authorization(authorization string) ApiGetUserAppsRequest { - r.authorization = &authorization - return r -} - -// Defaults to `false`. When `true` will show all apps that are assigned to a user regardless of their portal visibility setting. -func (r ApiGetUserAppsRequest) IgnoreVisibility(ignoreVisibility bool) ApiGetUserAppsRequest { - r.ignoreVisibility = &ignoreVisibility - return r -} - -func (r ApiGetUserAppsRequest) Execute() ([]GetUserApps200ResponseInner, *http.Response, error) { - return r.ApiService.GetUserAppsExecute(r) -} - -/* -GetUserApps Method for GetUserApps - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param userId Set to the id of the user that you want to return. - @return ApiGetUserAppsRequest -*/ -func (a *DefaultApiService) GetUserApps(ctx context.Context, userId int32) ApiGetUserAppsRequest { - return ApiGetUserAppsRequest{ - ApiService: a, - ctx: ctx, - userId: userId, - } -} - -// Execute executes the request -// @return []GetUserApps200ResponseInner -func (a *DefaultApiService) GetUserAppsExecute(r ApiGetUserAppsRequest) ([]GetUserApps200ResponseInner, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []GetUserApps200ResponseInner - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetUserApps") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/users/{user_id}/apps" - localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterToString(r.userId, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return localVarReturnValue, nil, reportError("authorization is required and must be specified") - } - - if r.ignoreVisibility != nil { - localVarQueryParams.Add("ignore_visibility", parameterToString(*r.ignoreVisibility, "")) - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiListAccessTokenClaimsRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - id int32 -} - -func (r ApiListAccessTokenClaimsRequest) Authorization(authorization string) ApiListAccessTokenClaimsRequest { - r.authorization = &authorization - return r -} - -func (r ApiListAccessTokenClaimsRequest) Execute() ([]ListAccessTokenClaims200ResponseInner, *http.Response, error) { - return r.ApiService.ListAccessTokenClaimsExecute(r) -} - -/* -ListAccessTokenClaims Method for ListAccessTokenClaims - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id - @return ApiListAccessTokenClaimsRequest -*/ -func (a *DefaultApiService) ListAccessTokenClaims(ctx context.Context, id int32) ApiListAccessTokenClaimsRequest { - return ApiListAccessTokenClaimsRequest{ - ApiService: a, - ctx: ctx, - id: id, - } -} - -// Execute executes the request -// @return []ListAccessTokenClaims200ResponseInner -func (a *DefaultApiService) ListAccessTokenClaimsExecute(r ApiListAccessTokenClaimsRequest) ([]ListAccessTokenClaims200ResponseInner, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []ListAccessTokenClaims200ResponseInner - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListAccessTokenClaims") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/api_authorizations/{id}/claims" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return localVarReturnValue, nil, reportError("authorization is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiListActionValuesRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - appId int32 - actionValue string -} - -func (r ApiListActionValuesRequest) Authorization(authorization string) ApiListActionValuesRequest { - r.authorization = &authorization - return r -} - -func (r ApiListActionValuesRequest) Execute() ([]ListConditionValues200ResponseInner, *http.Response, error) { - return r.ApiService.ListActionValuesExecute(r) -} - -/* -ListActionValues Method for ListActionValues - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param appId - @param actionValue The value for the selected action. - @return ApiListActionValuesRequest -*/ -func (a *DefaultApiService) ListActionValues(ctx context.Context, appId int32, actionValue string) ApiListActionValuesRequest { - return ApiListActionValuesRequest{ - ApiService: a, - ctx: ctx, - appId: appId, - actionValue: actionValue, - } -} - -// Execute executes the request -// @return []ListConditionValues200ResponseInner -func (a *DefaultApiService) ListActionValuesExecute(r ApiListActionValuesRequest) ([]ListConditionValues200ResponseInner, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []ListConditionValues200ResponseInner - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListActionValues") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/apps/{app_id}/rules/actions/{actuion_value}/values" - localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterToString(r.appId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"action_value"+"}", url.PathEscape(parameterToString(r.actionValue, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return localVarReturnValue, nil, reportError("authorization is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiListActionsRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - appId int32 -} - -func (r ApiListActionsRequest) Authorization(authorization string) ApiListActionsRequest { - r.authorization = &authorization - return r -} - -func (r ApiListActionsRequest) Execute() ([]ListActions200ResponseInner, *http.Response, error) { - return r.ApiService.ListActionsExecute(r) -} - -/* -ListActions Method for ListActions - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param appId - @return ApiListActionsRequest -*/ -func (a *DefaultApiService) ListActions(ctx context.Context, appId int32) ApiListActionsRequest { - return ApiListActionsRequest{ - ApiService: a, - ctx: ctx, - appId: appId, - } -} - -// Execute executes the request -// @return []ListActions200ResponseInner -func (a *DefaultApiService) ListActionsExecute(r ApiListActionsRequest) ([]ListActions200ResponseInner, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []ListActions200ResponseInner - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListActions") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/apps/{app_id}/rules/actions" - localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterToString(r.appId, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return localVarReturnValue, nil, reportError("authorization is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiListAppUsersRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - appId int32 - limit *int32 - page *int32 - cursor *string -} - -func (r ApiListAppUsersRequest) Authorization(authorization string) ApiListAppUsersRequest { - r.authorization = &authorization - return r -} - -// The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. -func (r ApiListAppUsersRequest) Limit(limit int32) ApiListAppUsersRequest { - r.limit = &limit - return r -} - -// The page number of results to return. -func (r ApiListAppUsersRequest) Page(page int32) ApiListAppUsersRequest { - r.page = &page - return r -} - -// Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. -func (r ApiListAppUsersRequest) Cursor(cursor string) ApiListAppUsersRequest { - r.cursor = &cursor - return r -} - -func (r ApiListAppUsersRequest) Execute() ([]ListAppUsers200ResponseInner, *http.Response, error) { - return r.ApiService.ListAppUsersExecute(r) -} - -/* -ListAppUsers Method for ListAppUsers - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param appId - @return ApiListAppUsersRequest -*/ -func (a *DefaultApiService) ListAppUsers(ctx context.Context, appId int32) ApiListAppUsersRequest { - return ApiListAppUsersRequest{ - ApiService: a, - ctx: ctx, - appId: appId, - } -} - -// Execute executes the request -// @return []ListAppUsers200ResponseInner -func (a *DefaultApiService) ListAppUsersExecute(r ApiListAppUsersRequest) ([]ListAppUsers200ResponseInner, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []ListAppUsers200ResponseInner - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListAppUsers") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/apps/{app_id}/users" - localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterToString(r.appId, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return localVarReturnValue, nil, reportError("authorization is required and must be specified") - } - - if r.limit != nil { - localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) - } - if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) - } - if r.cursor != nil { - localVarQueryParams.Add("cursor", parameterToString(*r.cursor, "")) - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiListAppsRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - limit *int32 - page *int32 - cursor *string - name *string - connectorId *int32 - authMethod *AuthMethod -} - -func (r ApiListAppsRequest) Authorization(authorization string) ApiListAppsRequest { - r.authorization = &authorization - return r -} - -// The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. -func (r ApiListAppsRequest) Limit(limit int32) ApiListAppsRequest { - r.limit = &limit - return r -} - -// The page number of results to return. -func (r ApiListAppsRequest) Page(page int32) ApiListAppsRequest { - r.page = &page - return r -} - -// Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. -func (r ApiListAppsRequest) Cursor(cursor string) ApiListAppsRequest { - r.cursor = &cursor - return r -} - -// The name or partial name of the app to search for. When using a partial name you must append a wildcard `*` -func (r ApiListAppsRequest) Name(name string) ApiListAppsRequest { - r.name = &name - return r -} - -// Returns all apps based off a specific connector. See List Connectors for a complete list of Connector IDs. -func (r ApiListAppsRequest) ConnectorId(connectorId int32) ApiListAppsRequest { - r.connectorId = &connectorId - return r -} - -// Returns all apps based of a given type. -func (r ApiListAppsRequest) AuthMethod(authMethod AuthMethod) ApiListAppsRequest { - r.authMethod = &authMethod - return r -} - -func (r ApiListAppsRequest) Execute() ([]Schema, *http.Response, error) { - return r.ApiService.ListAppsExecute(r) -} - -/* -ListApps Method for ListApps - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiListAppsRequest -*/ -func (a *DefaultApiService) ListApps(ctx context.Context) ApiListAppsRequest { - return ApiListAppsRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return []Schema -func (a *DefaultApiService) ListAppsExecute(r ApiListAppsRequest) ([]Schema, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []Schema - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListApps") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/apps" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return localVarReturnValue, nil, reportError("authorization is required and must be specified") - } - - if r.limit != nil { - localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) - } - if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) - } - if r.cursor != nil { - localVarQueryParams.Add("cursor", parameterToString(*r.cursor, "")) - } - if r.name != nil { - localVarQueryParams.Add("name", parameterToString(*r.name, "")) - } - if r.connectorId != nil { - localVarQueryParams.Add("connector_id", parameterToString(*r.connectorId, "")) - } - if r.authMethod != nil { - localVarQueryParams.Add("auth_method", parameterToString(*r.authMethod, "")) - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiListAuthorizationServersRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string -} - -func (r ApiListAuthorizationServersRequest) Authorization(authorization string) ApiListAuthorizationServersRequest { - r.authorization = &authorization - return r -} - -func (r ApiListAuthorizationServersRequest) Execute() ([]ListAuthorizationServers200ResponseInner, *http.Response, error) { - return r.ApiService.ListAuthorizationServersExecute(r) -} - -/* -ListAuthorizationServers Method for ListAuthorizationServers - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiListAuthorizationServersRequest -*/ -func (a *DefaultApiService) ListAuthorizationServers(ctx context.Context) ApiListAuthorizationServersRequest { - return ApiListAuthorizationServersRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return []ListAuthorizationServers200ResponseInner -func (a *DefaultApiService) ListAuthorizationServersExecute(r ApiListAuthorizationServersRequest) ([]ListAuthorizationServers200ResponseInner, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []ListAuthorizationServers200ResponseInner - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListAuthorizationServers") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/api_authorizations" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return localVarReturnValue, nil, reportError("authorization is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiListConditionOperatorsRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - appId int32 - conditionValue string -} - -func (r ApiListConditionOperatorsRequest) Authorization(authorization string) ApiListConditionOperatorsRequest { - r.authorization = &authorization - return r -} - -func (r ApiListConditionOperatorsRequest) Execute() ([]ListConditionOperators200ResponseInner, *http.Response, error) { - return r.ApiService.ListConditionOperatorsExecute(r) -} - -/* -ListConditionOperators Method for ListConditionOperators - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param appId - @param conditionValue The value for the selected condition. - @return ApiListConditionOperatorsRequest -*/ -func (a *DefaultApiService) ListConditionOperators(ctx context.Context, appId int32, conditionValue string) ApiListConditionOperatorsRequest { - return ApiListConditionOperatorsRequest{ - ApiService: a, - ctx: ctx, - appId: appId, - conditionValue: conditionValue, - } -} - -// Execute executes the request -// @return []ListConditionOperators200ResponseInner -func (a *DefaultApiService) ListConditionOperatorsExecute(r ApiListConditionOperatorsRequest) ([]ListConditionOperators200ResponseInner, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []ListConditionOperators200ResponseInner - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListConditionOperators") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/apps/{app_id}/rules/conditions/{condition_value}/operators" - localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterToString(r.appId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"condition_value"+"}", url.PathEscape(parameterToString(r.conditionValue, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return localVarReturnValue, nil, reportError("authorization is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiListConditionValuesRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - appId int32 - conditionValue string -} - -func (r ApiListConditionValuesRequest) Authorization(authorization string) ApiListConditionValuesRequest { - r.authorization = &authorization - return r -} - -func (r ApiListConditionValuesRequest) Execute() ([]ListConditionValues200ResponseInner, *http.Response, error) { - return r.ApiService.ListConditionValuesExecute(r) -} - -/* -ListConditionValues Method for ListConditionValues - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param appId - @param conditionValue The value for the selected condition. - @return ApiListConditionValuesRequest -*/ -func (a *DefaultApiService) ListConditionValues(ctx context.Context, appId int32, conditionValue string) ApiListConditionValuesRequest { - return ApiListConditionValuesRequest{ - ApiService: a, - ctx: ctx, - appId: appId, - conditionValue: conditionValue, - } -} - -// Execute executes the request -// @return []ListConditionValues200ResponseInner -func (a *DefaultApiService) ListConditionValuesExecute(r ApiListConditionValuesRequest) ([]ListConditionValues200ResponseInner, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []ListConditionValues200ResponseInner - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListConditionValues") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/apps/{app_id}/rules/conditions/{condition_value}/values" - localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterToString(r.appId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"condition_value"+"}", url.PathEscape(parameterToString(r.conditionValue, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return localVarReturnValue, nil, reportError("authorization is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiListConditionsRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - appId int32 -} - -func (r ApiListConditionsRequest) Authorization(authorization string) ApiListConditionsRequest { - r.authorization = &authorization - return r -} - -func (r ApiListConditionsRequest) Execute() ([]ListConditions200ResponseInner, *http.Response, error) { - return r.ApiService.ListConditionsExecute(r) -} - -/* -ListConditions Method for ListConditions - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param appId - @return ApiListConditionsRequest -*/ -func (a *DefaultApiService) ListConditions(ctx context.Context, appId int32) ApiListConditionsRequest { - return ApiListConditionsRequest{ - ApiService: a, - ctx: ctx, - appId: appId, - } -} - -// Execute executes the request -// @return []ListConditions200ResponseInner -func (a *DefaultApiService) ListConditionsExecute(r ApiListConditionsRequest) ([]ListConditions200ResponseInner, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []ListConditions200ResponseInner - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListConditions") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/apps/{app_id}/rules/conditions" - localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterToString(r.appId, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return localVarReturnValue, nil, reportError("authorization is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiListConnectorsRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - limit *int32 - page *int32 - cursor *string - name *string - authMethod *AuthMethod -} - -func (r ApiListConnectorsRequest) Authorization(authorization string) ApiListConnectorsRequest { - r.authorization = &authorization - return r -} - -// The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. -func (r ApiListConnectorsRequest) Limit(limit int32) ApiListConnectorsRequest { - r.limit = &limit - return r -} - -// The page number of results to return. -func (r ApiListConnectorsRequest) Page(page int32) ApiListConnectorsRequest { - r.page = &page - return r -} - -// Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. -func (r ApiListConnectorsRequest) Cursor(cursor string) ApiListConnectorsRequest { - r.cursor = &cursor - return r -} - -// The name or partial name of the connector to search for. When using a partial name you must append a wildcard `*` -func (r ApiListConnectorsRequest) Name(name string) ApiListConnectorsRequest { - r.name = &name - return r -} - -// Returns all connectors of a given type. -func (r ApiListConnectorsRequest) AuthMethod(authMethod AuthMethod) ApiListConnectorsRequest { - r.authMethod = &authMethod - return r -} - -func (r ApiListConnectorsRequest) Execute() ([]Connector, *http.Response, error) { - return r.ApiService.ListConnectorsExecute(r) -} - -/* -ListConnectors Method for ListConnectors - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiListConnectorsRequest -*/ -func (a *DefaultApiService) ListConnectors(ctx context.Context) ApiListConnectorsRequest { - return ApiListConnectorsRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return []Connector -func (a *DefaultApiService) ListConnectorsExecute(r ApiListConnectorsRequest) ([]Connector, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []Connector - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListConnectors") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/connectors" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return localVarReturnValue, nil, reportError("authorization is required and must be specified") - } - - if r.limit != nil { - localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) - } - if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) - } - if r.cursor != nil { - localVarQueryParams.Add("cursor", parameterToString(*r.cursor, "")) - } - if r.name != nil { - localVarQueryParams.Add("name", parameterToString(*r.name, "")) - } - if r.authMethod != nil { - localVarQueryParams.Add("auth_method", parameterToString(*r.authMethod, "")) - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiListEnvironmentVariablesRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - limit *int32 - page *int32 - cursor *string -} - -func (r ApiListEnvironmentVariablesRequest) Authorization(authorization string) ApiListEnvironmentVariablesRequest { - r.authorization = &authorization - return r -} - -// The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. -func (r ApiListEnvironmentVariablesRequest) Limit(limit int32) ApiListEnvironmentVariablesRequest { - r.limit = &limit - return r -} - -// The page number of results to return. -func (r ApiListEnvironmentVariablesRequest) Page(page int32) ApiListEnvironmentVariablesRequest { - r.page = &page - return r -} - -// Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. -func (r ApiListEnvironmentVariablesRequest) Cursor(cursor string) ApiListEnvironmentVariablesRequest { - r.cursor = &cursor - return r -} - -func (r ApiListEnvironmentVariablesRequest) Execute() ([]Envvar, *http.Response, error) { - return r.ApiService.ListEnvironmentVariablesExecute(r) -} - -/* -ListEnvironmentVariables Method for ListEnvironmentVariables - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiListEnvironmentVariablesRequest -*/ -func (a *DefaultApiService) ListEnvironmentVariables(ctx context.Context) ApiListEnvironmentVariablesRequest { - return ApiListEnvironmentVariablesRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return []Envvar -func (a *DefaultApiService) ListEnvironmentVariablesExecute(r ApiListEnvironmentVariablesRequest) ([]Envvar, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []Envvar - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListEnvironmentVariables") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/hooks/envs" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return localVarReturnValue, nil, reportError("authorization is required and must be specified") - } - - if r.limit != nil { - localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) - } - if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) - } - if r.cursor != nil { - localVarQueryParams.Add("cursor", parameterToString(*r.cursor, "")) - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiListHooksRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - limit *int32 - page *int32 - cursor *string -} - -func (r ApiListHooksRequest) Authorization(authorization string) ApiListHooksRequest { - r.authorization = &authorization - return r -} - -// The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. -func (r ApiListHooksRequest) Limit(limit int32) ApiListHooksRequest { - r.limit = &limit - return r -} - -// The page number of results to return. -func (r ApiListHooksRequest) Page(page int32) ApiListHooksRequest { - r.page = &page - return r -} - -// Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. -func (r ApiListHooksRequest) Cursor(cursor string) ApiListHooksRequest { - r.cursor = &cursor - return r -} - -func (r ApiListHooksRequest) Execute() ([]Hook, *http.Response, error) { - return r.ApiService.ListHooksExecute(r) -} - -/* -ListHooks Method for ListHooks - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiListHooksRequest -*/ -func (a *DefaultApiService) ListHooks(ctx context.Context) ApiListHooksRequest { - return ApiListHooksRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return []Hook -func (a *DefaultApiService) ListHooksExecute(r ApiListHooksRequest) ([]Hook, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []Hook - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListHooks") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/hooks" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return localVarReturnValue, nil, reportError("authorization is required and must be specified") - } - - if r.limit != nil { - localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) - } - if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) - } - if r.cursor != nil { - localVarQueryParams.Add("cursor", parameterToString(*r.cursor, "")) - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiListMappingActionValuesRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - actionValue string -} - -func (r ApiListMappingActionValuesRequest) Authorization(authorization string) ApiListMappingActionValuesRequest { - r.authorization = &authorization - return r -} - -func (r ApiListMappingActionValuesRequest) Execute() ([]ListConditionValues200ResponseInner, *http.Response, error) { - return r.ApiService.ListMappingActionValuesExecute(r) -} - -/* -ListMappingActionValues Method for ListMappingActionValues - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param actionValue The value for the selected action. - @return ApiListMappingActionValuesRequest -*/ -func (a *DefaultApiService) ListMappingActionValues(ctx context.Context, actionValue string) ApiListMappingActionValuesRequest { - return ApiListMappingActionValuesRequest{ - ApiService: a, - ctx: ctx, - actionValue: actionValue, - } -} - -// Execute executes the request -// @return []ListConditionValues200ResponseInner -func (a *DefaultApiService) ListMappingActionValuesExecute(r ApiListMappingActionValuesRequest) ([]ListConditionValues200ResponseInner, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []ListConditionValues200ResponseInner - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListMappingActionValues") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/apps/mappings/actions/{actuion_value}/values" - localVarPath = strings.Replace(localVarPath, "{"+"action_value"+"}", url.PathEscape(parameterToString(r.actionValue, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return localVarReturnValue, nil, reportError("authorization is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiListMappingActionsRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string -} - -func (r ApiListMappingActionsRequest) Authorization(authorization string) ApiListMappingActionsRequest { - r.authorization = &authorization - return r -} - -func (r ApiListMappingActionsRequest) Execute() ([]ListActions200ResponseInner, *http.Response, error) { - return r.ApiService.ListMappingActionsExecute(r) -} - -/* -ListMappingActions Method for ListMappingActions - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiListMappingActionsRequest -*/ -func (a *DefaultApiService) ListMappingActions(ctx context.Context) ApiListMappingActionsRequest { - return ApiListMappingActionsRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return []ListActions200ResponseInner -func (a *DefaultApiService) ListMappingActionsExecute(r ApiListMappingActionsRequest) ([]ListActions200ResponseInner, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []ListActions200ResponseInner - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListMappingActions") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/apps/mappings/actions" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return localVarReturnValue, nil, reportError("authorization is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiListMappingConditionOperatorsRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - conditionValue string -} - -func (r ApiListMappingConditionOperatorsRequest) Authorization(authorization string) ApiListMappingConditionOperatorsRequest { - r.authorization = &authorization - return r -} - -func (r ApiListMappingConditionOperatorsRequest) Execute() ([]ListMappingConditionOperators200ResponseInner, *http.Response, error) { - return r.ApiService.ListMappingConditionOperatorsExecute(r) -} - -/* -ListMappingConditionOperators Method for ListMappingConditionOperators - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param conditionValue The value for the selected condition. - @return ApiListMappingConditionOperatorsRequest -*/ -func (a *DefaultApiService) ListMappingConditionOperators(ctx context.Context, conditionValue string) ApiListMappingConditionOperatorsRequest { - return ApiListMappingConditionOperatorsRequest{ - ApiService: a, - ctx: ctx, - conditionValue: conditionValue, - } -} - -// Execute executes the request -// @return []ListMappingConditionOperators200ResponseInner -func (a *DefaultApiService) ListMappingConditionOperatorsExecute(r ApiListMappingConditionOperatorsRequest) ([]ListMappingConditionOperators200ResponseInner, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []ListMappingConditionOperators200ResponseInner - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListMappingConditionOperators") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/apps/mappings/conditions/{condition_value}/operators" - localVarPath = strings.Replace(localVarPath, "{"+"condition_value"+"}", url.PathEscape(parameterToString(r.conditionValue, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return localVarReturnValue, nil, reportError("authorization is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiListMappingConditionValuesRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - conditionValue string -} - -func (r ApiListMappingConditionValuesRequest) Authorization(authorization string) ApiListMappingConditionValuesRequest { - r.authorization = &authorization - return r -} - -func (r ApiListMappingConditionValuesRequest) Execute() ([]ListConditionValues200ResponseInner, *http.Response, error) { - return r.ApiService.ListMappingConditionValuesExecute(r) -} - -/* -ListMappingConditionValues Method for ListMappingConditionValues - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param conditionValue The value for the selected condition. - @return ApiListMappingConditionValuesRequest -*/ -func (a *DefaultApiService) ListMappingConditionValues(ctx context.Context, conditionValue string) ApiListMappingConditionValuesRequest { - return ApiListMappingConditionValuesRequest{ - ApiService: a, - ctx: ctx, - conditionValue: conditionValue, - } -} - -// Execute executes the request -// @return []ListConditionValues200ResponseInner -func (a *DefaultApiService) ListMappingConditionValuesExecute(r ApiListMappingConditionValuesRequest) ([]ListConditionValues200ResponseInner, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []ListConditionValues200ResponseInner - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListMappingConditionValues") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/apps/mappings/conditions/{condition_value}/values" - localVarPath = strings.Replace(localVarPath, "{"+"condition_value"+"}", url.PathEscape(parameterToString(r.conditionValue, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return localVarReturnValue, nil, reportError("authorization is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiListMappingConditionsRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string -} - -func (r ApiListMappingConditionsRequest) Authorization(authorization string) ApiListMappingConditionsRequest { - r.authorization = &authorization - return r -} - -func (r ApiListMappingConditionsRequest) Execute() ([]ListMappingConditions200ResponseInner, *http.Response, error) { - return r.ApiService.ListMappingConditionsExecute(r) -} - -/* -ListMappingConditions Method for ListMappingConditions - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiListMappingConditionsRequest -*/ -func (a *DefaultApiService) ListMappingConditions(ctx context.Context) ApiListMappingConditionsRequest { - return ApiListMappingConditionsRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return []ListMappingConditions200ResponseInner -func (a *DefaultApiService) ListMappingConditionsExecute(r ApiListMappingConditionsRequest) ([]ListMappingConditions200ResponseInner, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []ListMappingConditions200ResponseInner - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListMappingConditions") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/apps/mappings/conditions" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return localVarReturnValue, nil, reportError("authorization is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiListMappingsRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - enabled *bool - hasCondition *string - hasConditionType *string - hasAction *string - hasActionType *string -} - -func (r ApiListMappingsRequest) Authorization(authorization string) ApiListMappingsRequest { - r.authorization = &authorization - return r -} - -// Defaults to true. When set to `false` will return all disabled mappings. -func (r ApiListMappingsRequest) Enabled(enabled bool) ApiListMappingsRequest { - r.enabled = &enabled - return r -} - -// Filters Mappings based on their Conditions. -func (r ApiListMappingsRequest) HasCondition(hasCondition string) ApiListMappingsRequest { - r.hasCondition = &hasCondition - return r -} - -// Filters Mappings based on their condition types. -func (r ApiListMappingsRequest) HasConditionType(hasConditionType string) ApiListMappingsRequest { - r.hasConditionType = &hasConditionType - return r -} - -// Filters Mappings based on their Actions. -func (r ApiListMappingsRequest) HasAction(hasAction string) ApiListMappingsRequest { - r.hasAction = &hasAction - return r -} - -// Filters Mappings based on their action types. -func (r ApiListMappingsRequest) HasActionType(hasActionType string) ApiListMappingsRequest { - r.hasActionType = &hasActionType - return r -} - -func (r ApiListMappingsRequest) Execute() ([]Mapping, *http.Response, error) { - return r.ApiService.ListMappingsExecute(r) -} - -/* -ListMappings Method for ListMappings - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiListMappingsRequest -*/ -func (a *DefaultApiService) ListMappings(ctx context.Context) ApiListMappingsRequest { - return ApiListMappingsRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return []Mapping -func (a *DefaultApiService) ListMappingsExecute(r ApiListMappingsRequest) ([]Mapping, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []Mapping - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListMappings") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/mappings" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return localVarReturnValue, nil, reportError("authorization is required and must be specified") - } - - if r.enabled != nil { - localVarQueryParams.Add("enabled", parameterToString(*r.enabled, "")) - } - if r.hasCondition != nil { - localVarQueryParams.Add("has_condition", parameterToString(*r.hasCondition, "")) - } - if r.hasConditionType != nil { - localVarQueryParams.Add("has_condition_type", parameterToString(*r.hasConditionType, "")) - } - if r.hasAction != nil { - localVarQueryParams.Add("has_action", parameterToString(*r.hasAction, "")) - } - if r.hasActionType != nil { - localVarQueryParams.Add("has_action_type", parameterToString(*r.hasActionType, "")) - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiListRiskRulesRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string -} - -func (r ApiListRiskRulesRequest) Authorization(authorization string) ApiListRiskRulesRequest { - r.authorization = &authorization - return r -} - -func (r ApiListRiskRulesRequest) Execute() (*http.Response, error) { - return r.ApiService.ListRiskRulesExecute(r) -} - -/* -ListRiskRules Method for ListRiskRules - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiListRiskRulesRequest -*/ -func (a *DefaultApiService) ListRiskRules(ctx context.Context) ApiListRiskRulesRequest { - return ApiListRiskRulesRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -func (a *DefaultApiService) ListRiskRulesExecute(r ApiListRiskRulesRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListRiskRules") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/risk/rules" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return nil, reportError("authorization is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiListRolesRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - limit *int32 - page *int32 - cursor *string - name *string - appId *string - fields *string -} - -func (r ApiListRolesRequest) Authorization(authorization string) ApiListRolesRequest { - r.authorization = &authorization - return r -} - -// The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. -func (r ApiListRolesRequest) Limit(limit int32) ApiListRolesRequest { - r.limit = &limit - return r -} - -// The page number of results to return. -func (r ApiListRolesRequest) Page(page int32) ApiListRolesRequest { - r.page = &page - return r -} - -// Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. -func (r ApiListRolesRequest) Cursor(cursor string) ApiListRolesRequest { - r.cursor = &cursor - return r -} - -// Optional. Filters by role name. -func (r ApiListRolesRequest) Name(name string) ApiListRolesRequest { - r.name = &name - return r -} - -// Optional. Returns roles that contain this app name. -func (r ApiListRolesRequest) AppId(appId string) ApiListRolesRequest { - r.appId = &appId - return r -} - -// Optional. Comma delimited list of fields to return. -func (r ApiListRolesRequest) Fields(fields string) ApiListRolesRequest { - r.fields = &fields - return r -} - -func (r ApiListRolesRequest) Execute() ([]Role, *http.Response, error) { - return r.ApiService.ListRolesExecute(r) -} - -/* -ListRoles Method for ListRoles - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiListRolesRequest -*/ -func (a *DefaultApiService) ListRoles(ctx context.Context) ApiListRolesRequest { - return ApiListRolesRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return []Role -func (a *DefaultApiService) ListRolesExecute(r ApiListRolesRequest) ([]Role, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []Role - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListRoles") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/roles" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return localVarReturnValue, nil, reportError("authorization is required and must be specified") - } - - if r.limit != nil { - localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) - } - if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) - } - if r.cursor != nil { - localVarQueryParams.Add("cursor", parameterToString(*r.cursor, "")) - } - if r.name != nil { - localVarQueryParams.Add("name", parameterToString(*r.name, "")) - } - if r.appId != nil { - localVarQueryParams.Add("app_id", parameterToString(*r.appId, "")) - } - if r.fields != nil { - localVarQueryParams.Add("fields", parameterToString(*r.fields, "")) - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiListRulesRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - appId int32 - enabled *bool - hasCondition *string - hasConditionType *string - hasAction *string - hasActionType *string -} - -func (r ApiListRulesRequest) Authorization(authorization string) ApiListRulesRequest { - r.authorization = &authorization - return r -} - -// Defaults to true. When set to `false` will return all disabled rules. -func (r ApiListRulesRequest) Enabled(enabled bool) ApiListRulesRequest { - r.enabled = &enabled - return r -} - -// Filters Rules based on their Conditions. -func (r ApiListRulesRequest) HasCondition(hasCondition string) ApiListRulesRequest { - r.hasCondition = &hasCondition - return r -} - -// Filters Rules based on their condition types. -func (r ApiListRulesRequest) HasConditionType(hasConditionType string) ApiListRulesRequest { - r.hasConditionType = &hasConditionType - return r -} - -// Filters Rules based on their Actions. -func (r ApiListRulesRequest) HasAction(hasAction string) ApiListRulesRequest { - r.hasAction = &hasAction - return r -} - -// Filters Rules based on their action types. -func (r ApiListRulesRequest) HasActionType(hasActionType string) ApiListRulesRequest { - r.hasActionType = &hasActionType - return r -} - -func (r ApiListRulesRequest) Execute() ([]Rule, *http.Response, error) { - return r.ApiService.ListRulesExecute(r) -} - -/* -ListRules Method for ListRules - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param appId - @return ApiListRulesRequest -*/ -func (a *DefaultApiService) ListRules(ctx context.Context, appId int32) ApiListRulesRequest { - return ApiListRulesRequest{ - ApiService: a, - ctx: ctx, - appId: appId, - } -} - -// Execute executes the request -// @return []Rule -func (a *DefaultApiService) ListRulesExecute(r ApiListRulesRequest) ([]Rule, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []Rule - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListRules") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/apps/{app_id}/rules" - localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterToString(r.appId, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return localVarReturnValue, nil, reportError("authorization is required and must be specified") - } - - if r.enabled != nil { - localVarQueryParams.Add("enabled", parameterToString(*r.enabled, "")) - } - if r.hasCondition != nil { - localVarQueryParams.Add("has_condition", parameterToString(*r.hasCondition, "")) - } - if r.hasConditionType != nil { - localVarQueryParams.Add("has_condition_type", parameterToString(*r.hasConditionType, "")) - } - if r.hasAction != nil { - localVarQueryParams.Add("has_action", parameterToString(*r.hasAction, "")) - } - if r.hasActionType != nil { - localVarQueryParams.Add("has_action_type", parameterToString(*r.hasActionType, "")) - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiListScopesRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - id int32 -} - -func (r ApiListScopesRequest) Authorization(authorization string) ApiListScopesRequest { - r.authorization = &authorization - return r -} - -func (r ApiListScopesRequest) Execute() ([]ListScopes200ResponseInner, *http.Response, error) { - return r.ApiService.ListScopesExecute(r) -} - -/* -ListScopes Method for ListScopes - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id - @return ApiListScopesRequest -*/ -func (a *DefaultApiService) ListScopes(ctx context.Context, id int32) ApiListScopesRequest { - return ApiListScopesRequest{ - ApiService: a, - ctx: ctx, - id: id, - } -} - -// Execute executes the request -// @return []ListScopes200ResponseInner -func (a *DefaultApiService) ListScopesExecute(r ApiListScopesRequest) ([]ListScopes200ResponseInner, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []ListScopes200ResponseInner - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListScopes") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/api_authorizations/{id}/scopes" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return localVarReturnValue, nil, reportError("authorization is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiListUsersRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - limit *int32 - page *int32 - cursor *string - createdSince *string - createdUntil *string - updatedSince *string - updatedUntil *string - lastLoginSince *string - lastLoginUntil *string - firstname *string - lastname *string - email *string - username *string - samaccountname *string - directoryId *string - externalId *string - appId *string - userIds *string - customAttributesAttributeName *string - fields *string -} - -func (r ApiListUsersRequest) Authorization(authorization string) ApiListUsersRequest { - r.authorization = &authorization - return r -} - -// The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. -func (r ApiListUsersRequest) Limit(limit int32) ApiListUsersRequest { - r.limit = &limit - return r -} - -// The page number of results to return. -func (r ApiListUsersRequest) Page(page int32) ApiListUsersRequest { - r.page = &page - return r -} - -// Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. -func (r ApiListUsersRequest) Cursor(cursor string) ApiListUsersRequest { - r.cursor = &cursor - return r -} - -// An ISO8601 timestamp value that returns all users created after a given date & time. -func (r ApiListUsersRequest) CreatedSince(createdSince string) ApiListUsersRequest { - r.createdSince = &createdSince - return r -} - -// An ISO8601 timestamp value that returns all users created before a given date & time. -func (r ApiListUsersRequest) CreatedUntil(createdUntil string) ApiListUsersRequest { - r.createdUntil = &createdUntil - return r -} - -// An ISO8601 timestamp value that returns all users updated after a given date & time. -func (r ApiListUsersRequest) UpdatedSince(updatedSince string) ApiListUsersRequest { - r.updatedSince = &updatedSince - return r -} - -// An ISO8601 timestamp value that returns all users updated before a given date & time. -func (r ApiListUsersRequest) UpdatedUntil(updatedUntil string) ApiListUsersRequest { - r.updatedUntil = &updatedUntil - return r -} - -// An ISO8601 timestamp value that returns all users that logged in after a given date & time. -func (r ApiListUsersRequest) LastLoginSince(lastLoginSince string) ApiListUsersRequest { - r.lastLoginSince = &lastLoginSince - return r -} - -func (r ApiListUsersRequest) LastLoginUntil(lastLoginUntil string) ApiListUsersRequest { - r.lastLoginUntil = &lastLoginUntil - return r -} - -// The first name of the user -func (r ApiListUsersRequest) Firstname(firstname string) ApiListUsersRequest { - r.firstname = &firstname - return r -} - -// The last name of the user -func (r ApiListUsersRequest) Lastname(lastname string) ApiListUsersRequest { - r.lastname = &lastname - return r -} - -// The email address of the user -func (r ApiListUsersRequest) Email(email string) ApiListUsersRequest { - r.email = &email - return r -} - -// The username for the user -func (r ApiListUsersRequest) Username(username string) ApiListUsersRequest { - r.username = &username - return r -} - -// The AD login name for the user -func (r ApiListUsersRequest) Samaccountname(samaccountname string) ApiListUsersRequest { - r.samaccountname = &samaccountname - return r -} - -// The ID in OneLogin of the Directory that the user belongs to -func (r ApiListUsersRequest) DirectoryId(directoryId string) ApiListUsersRequest { - r.directoryId = &directoryId - return r -} - -// An external identifier that has been set on the user -func (r ApiListUsersRequest) ExternalId(externalId string) ApiListUsersRequest { - r.externalId = &externalId - return r -} - -// The ID of a OneLogin Application -func (r ApiListUsersRequest) AppId(appId string) ApiListUsersRequest { - r.appId = &appId - return r -} - -// A comma separated list of OneLogin User IDs -func (r ApiListUsersRequest) UserIds(userIds string) ApiListUsersRequest { - r.userIds = &userIds - return r -} - -// The short name of a custom attribute. Note that the attribute name is prefixed with custom_attributes. -func (r ApiListUsersRequest) CustomAttributesAttributeName(customAttributesAttributeName string) ApiListUsersRequest { - r.customAttributesAttributeName = &customAttributesAttributeName - return r -} - -// A comma separated list user attributes to return. -func (r ApiListUsersRequest) Fields(fields string) ApiListUsersRequest { - r.fields = &fields - return r -} - -func (r ApiListUsersRequest) Execute() ([]User, *http.Response, error) { - return r.ApiService.ListUsersExecute(r) -} - -/* -ListUsers Method for ListUsers - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiListUsersRequest -*/ -func (a *DefaultApiService) ListUsers(ctx context.Context) ApiListUsersRequest { - return ApiListUsersRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return []User -func (a *DefaultApiService) ListUsersExecute(r ApiListUsersRequest) ([]User, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []User - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListUsers") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/users" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return localVarReturnValue, nil, reportError("authorization is required and must be specified") - } - - if r.limit != nil { - localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) - } - if r.page != nil { - localVarQueryParams.Add("page", parameterToString(*r.page, "")) - } - if r.cursor != nil { - localVarQueryParams.Add("cursor", parameterToString(*r.cursor, "")) - } - if r.createdSince != nil { - localVarQueryParams.Add("created_since", parameterToString(*r.createdSince, "")) - } - if r.createdUntil != nil { - localVarQueryParams.Add("created_until", parameterToString(*r.createdUntil, "")) - } - if r.updatedSince != nil { - localVarQueryParams.Add("updated_since", parameterToString(*r.updatedSince, "")) - } - if r.updatedUntil != nil { - localVarQueryParams.Add("updated_until", parameterToString(*r.updatedUntil, "")) - } - if r.lastLoginSince != nil { - localVarQueryParams.Add("last_login_since", parameterToString(*r.lastLoginSince, "")) - } - if r.lastLoginUntil != nil { - localVarQueryParams.Add("last_login_until", parameterToString(*r.lastLoginUntil, "")) - } - if r.firstname != nil { - localVarQueryParams.Add("firstname", parameterToString(*r.firstname, "")) - } - if r.lastname != nil { - localVarQueryParams.Add("lastname", parameterToString(*r.lastname, "")) - } - if r.email != nil { - localVarQueryParams.Add("email", parameterToString(*r.email, "")) - } - if r.username != nil { - localVarQueryParams.Add("username", parameterToString(*r.username, "")) - } - if r.samaccountname != nil { - localVarQueryParams.Add("samaccountname", parameterToString(*r.samaccountname, "")) - } - if r.directoryId != nil { - localVarQueryParams.Add("directory_id", parameterToString(*r.directoryId, "")) - } - if r.externalId != nil { - localVarQueryParams.Add("external_id", parameterToString(*r.externalId, "")) - } - if r.appId != nil { - localVarQueryParams.Add("app_id", parameterToString(*r.appId, "")) - } - if r.userIds != nil { - localVarQueryParams.Add("user_ids", parameterToString(*r.userIds, "")) - } - if r.customAttributesAttributeName != nil { - localVarQueryParams.Add("custom_attributes.{attribute_name}", parameterToString(*r.customAttributesAttributeName, "")) - } - if r.fields != nil { - localVarQueryParams.Add("fields", parameterToString(*r.fields, "")) - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiRemoveClientAppRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - id int32 - clientAppId int32 -} - -func (r ApiRemoveClientAppRequest) Authorization(authorization string) ApiRemoveClientAppRequest { - r.authorization = &authorization - return r -} - -func (r ApiRemoveClientAppRequest) Execute() (*http.Response, error) { - return r.ApiService.RemoveClientAppExecute(r) -} - -/* -RemoveClientApp Method for RemoveClientApp - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id - @param clientAppId - @return ApiRemoveClientAppRequest -*/ -func (a *DefaultApiService) RemoveClientApp(ctx context.Context, id int32, clientAppId int32) ApiRemoveClientAppRequest { - return ApiRemoveClientAppRequest{ - ApiService: a, - ctx: ctx, - id: id, - clientAppId: clientAppId, - } -} - -// Execute executes the request -func (a *DefaultApiService) RemoveClientAppExecute(r ApiRemoveClientAppRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.RemoveClientApp") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/api_authorizations/{id}/clients/{client_app_id}" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"client_app_id"+"}", url.PathEscape(parameterToString(r.clientAppId, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return nil, reportError("authorization is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.model = v - return localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiRemoveRoleAdminsRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - roleId int32 - removeRoleUsersRequest *RemoveRoleUsersRequest -} - -func (r ApiRemoveRoleAdminsRequest) Authorization(authorization string) ApiRemoveRoleAdminsRequest { - r.authorization = &authorization - return r -} - -func (r ApiRemoveRoleAdminsRequest) RemoveRoleUsersRequest(removeRoleUsersRequest RemoveRoleUsersRequest) ApiRemoveRoleAdminsRequest { - r.removeRoleUsersRequest = &removeRoleUsersRequest - return r -} - -func (r ApiRemoveRoleAdminsRequest) Execute() (*http.Response, error) { - return r.ApiService.RemoveRoleAdminsExecute(r) -} - -/* -RemoveRoleAdmins Method for RemoveRoleAdmins - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param roleId Set to the id of the role you want to return. - @return ApiRemoveRoleAdminsRequest -*/ -func (a *DefaultApiService) RemoveRoleAdmins(ctx context.Context, roleId int32) ApiRemoveRoleAdminsRequest { - return ApiRemoveRoleAdminsRequest{ - ApiService: a, - ctx: ctx, - roleId: roleId, - } -} - -// Execute executes the request -func (a *DefaultApiService) RemoveRoleAdminsExecute(r ApiRemoveRoleAdminsRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.RemoveRoleAdmins") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/roles/{role_id}/admins" - localVarPath = strings.Replace(localVarPath, "{"+"role_id"+"}", url.PathEscape(parameterToString(r.roleId, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return nil, reportError("authorization is required and must be specified") - } - if r.removeRoleUsersRequest == nil { - return nil, reportError("removeRoleUsersRequest is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - // body params - localVarPostBody = r.removeRoleUsersRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.model = v - return localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiRemoveRoleUsersRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - roleId int32 - removeRoleUsersRequest *RemoveRoleUsersRequest -} - -func (r ApiRemoveRoleUsersRequest) Authorization(authorization string) ApiRemoveRoleUsersRequest { - r.authorization = &authorization - return r -} - -func (r ApiRemoveRoleUsersRequest) RemoveRoleUsersRequest(removeRoleUsersRequest RemoveRoleUsersRequest) ApiRemoveRoleUsersRequest { - r.removeRoleUsersRequest = &removeRoleUsersRequest - return r -} - -func (r ApiRemoveRoleUsersRequest) Execute() (*http.Response, error) { - return r.ApiService.RemoveRoleUsersExecute(r) -} - -/* -RemoveRoleUsers Method for RemoveRoleUsers - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param roleId Set to the id of the role you want to return. - @return ApiRemoveRoleUsersRequest -*/ -func (a *DefaultApiService) RemoveRoleUsers(ctx context.Context, roleId int32) ApiRemoveRoleUsersRequest { - return ApiRemoveRoleUsersRequest{ - ApiService: a, - ctx: ctx, - roleId: roleId, - } -} - -// Execute executes the request -func (a *DefaultApiService) RemoveRoleUsersExecute(r ApiRemoveRoleUsersRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.RemoveRoleUsers") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/roles/{role_id}/users" - localVarPath = strings.Replace(localVarPath, "{"+"role_id"+"}", url.PathEscape(parameterToString(r.roleId, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return nil, reportError("authorization is required and must be specified") - } - if r.removeRoleUsersRequest == nil { - return nil, reportError("removeRoleUsersRequest is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - // body params - localVarPostBody = r.removeRoleUsersRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.model = v - return localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiRevokeTokenRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - revokeTokenRequest *RevokeTokenRequest -} - -func (r ApiRevokeTokenRequest) Authorization(authorization string) ApiRevokeTokenRequest { - r.authorization = &authorization - return r -} - -func (r ApiRevokeTokenRequest) RevokeTokenRequest(revokeTokenRequest RevokeTokenRequest) ApiRevokeTokenRequest { - r.revokeTokenRequest = &revokeTokenRequest - return r -} - -func (r ApiRevokeTokenRequest) Execute() (*GenerateToken400Response, *http.Response, error) { - return r.ApiService.RevokeTokenExecute(r) -} - -/* -RevokeToken Method for RevokeToken - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiRevokeTokenRequest -*/ -func (a *DefaultApiService) RevokeToken(ctx context.Context) ApiRevokeTokenRequest { - return ApiRevokeTokenRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return GenerateToken400Response -func (a *DefaultApiService) RevokeTokenExecute(r ApiRevokeTokenRequest) (*GenerateToken400Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GenerateToken400Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.RevokeToken") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/auth/oauth2/revoke" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return localVarReturnValue, nil, reportError("authorization is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - // body params - localVarPostBody = r.revokeTokenRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v GenerateToken400Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v GenerateToken400Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v GenerateToken400Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiSetRoleAppsRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - roleId int32 - requestBody *[]int32 -} - -func (r ApiSetRoleAppsRequest) Authorization(authorization string) ApiSetRoleAppsRequest { - r.authorization = &authorization - return r -} - -func (r ApiSetRoleAppsRequest) RequestBody(requestBody []int32) ApiSetRoleAppsRequest { - r.requestBody = &requestBody - return r -} - -func (r ApiSetRoleAppsRequest) Execute() ([]SetRoleApps200ResponseInner, *http.Response, error) { - return r.ApiService.SetRoleAppsExecute(r) -} - -/* -SetRoleApps Method for SetRoleApps - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param roleId Set to the id of the role you want to return. - @return ApiSetRoleAppsRequest -*/ -func (a *DefaultApiService) SetRoleApps(ctx context.Context, roleId int32) ApiSetRoleAppsRequest { - return ApiSetRoleAppsRequest{ - ApiService: a, - ctx: ctx, - roleId: roleId, - } -} - -// Execute executes the request -// @return []SetRoleApps200ResponseInner -func (a *DefaultApiService) SetRoleAppsExecute(r ApiSetRoleAppsRequest) ([]SetRoleApps200ResponseInner, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []SetRoleApps200ResponseInner - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.SetRoleApps") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/roles/{role_id}/apps" - localVarPath = strings.Replace(localVarPath, "{"+"role_id"+"}", url.PathEscape(parameterToString(r.roleId, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return localVarReturnValue, nil, reportError("authorization is required and must be specified") - } - if r.requestBody == nil { - return localVarReturnValue, nil, reportError("requestBody is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - // body params - localVarPostBody = r.requestBody - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiTrackEventRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - trackEventRequest *TrackEventRequest -} - -func (r ApiTrackEventRequest) Authorization(authorization string) ApiTrackEventRequest { - r.authorization = &authorization - return r -} - -func (r ApiTrackEventRequest) TrackEventRequest(trackEventRequest TrackEventRequest) ApiTrackEventRequest { - r.trackEventRequest = &trackEventRequest - return r -} - -func (r ApiTrackEventRequest) Execute() (*http.Response, error) { - return r.ApiService.TrackEventExecute(r) -} - -/* -TrackEvent Method for TrackEvent - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiTrackEventRequest -*/ -func (a *DefaultApiService) TrackEvent(ctx context.Context) ApiTrackEventRequest { - return ApiTrackEventRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -func (a *DefaultApiService) TrackEventExecute(r ApiTrackEventRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.TrackEvent") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/risk/events" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return nil, reportError("authorization is required and must be specified") - } - if r.trackEventRequest == nil { - return nil, reportError("trackEventRequest is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - // body params - localVarPostBody = r.trackEventRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiUpdateAccessTokenClaimRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - id int32 - claimId int32 - addAccessTokenClaimRequest *AddAccessTokenClaimRequest -} - -func (r ApiUpdateAccessTokenClaimRequest) Authorization(authorization string) ApiUpdateAccessTokenClaimRequest { - r.authorization = &authorization - return r -} - -func (r ApiUpdateAccessTokenClaimRequest) AddAccessTokenClaimRequest(addAccessTokenClaimRequest AddAccessTokenClaimRequest) ApiUpdateAccessTokenClaimRequest { - r.addAccessTokenClaimRequest = &addAccessTokenClaimRequest - return r -} - -func (r ApiUpdateAccessTokenClaimRequest) Execute() (*Id, *http.Response, error) { - return r.ApiService.UpdateAccessTokenClaimExecute(r) -} - -/* -UpdateAccessTokenClaim Method for UpdateAccessTokenClaim - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id - @param claimId - @return ApiUpdateAccessTokenClaimRequest -*/ -func (a *DefaultApiService) UpdateAccessTokenClaim(ctx context.Context, id int32, claimId int32) ApiUpdateAccessTokenClaimRequest { - return ApiUpdateAccessTokenClaimRequest{ - ApiService: a, - ctx: ctx, - id: id, - claimId: claimId, - } -} - -// Execute executes the request -// @return Id -func (a *DefaultApiService) UpdateAccessTokenClaimExecute(r ApiUpdateAccessTokenClaimRequest) (*Id, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Id - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.UpdateAccessTokenClaim") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/api_authorizations/{id}/claims/{claim_id}" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"claim_id"+"}", url.PathEscape(parameterToString(r.claimId, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return localVarReturnValue, nil, reportError("authorization is required and must be specified") - } - if r.addAccessTokenClaimRequest == nil { - return localVarReturnValue, nil, reportError("addAccessTokenClaimRequest is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - // body params - localVarPostBody = r.addAccessTokenClaimRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiUpdateAppRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - appId int32 - schema *Schema -} - -func (r ApiUpdateAppRequest) Authorization(authorization string) ApiUpdateAppRequest { - r.authorization = &authorization - return r -} - -func (r ApiUpdateAppRequest) Schema(schema Schema) ApiUpdateAppRequest { - r.schema = &schema - return r -} - -func (r ApiUpdateAppRequest) Execute() (*Schema, *http.Response, error) { - return r.ApiService.UpdateAppExecute(r) -} - -/* -UpdateApp Method for UpdateApp - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param appId - @return ApiUpdateAppRequest -*/ -func (a *DefaultApiService) UpdateApp(ctx context.Context, appId int32) ApiUpdateAppRequest { - return ApiUpdateAppRequest{ - ApiService: a, - ctx: ctx, - appId: appId, - } -} - -// Execute executes the request -// @return Schema -func (a *DefaultApiService) UpdateAppExecute(r ApiUpdateAppRequest) (*Schema, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Schema - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.UpdateApp") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/apps/{app_id}" - localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterToString(r.appId, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return localVarReturnValue, nil, reportError("authorization is required and must be specified") - } - if r.schema == nil { - return localVarReturnValue, nil, reportError("schema is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - // body params - localVarPostBody = r.schema - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiUpdateAuthorizationServerRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - id int32 - createAuthorizationServerRequest *CreateAuthorizationServerRequest -} - -func (r ApiUpdateAuthorizationServerRequest) Authorization(authorization string) ApiUpdateAuthorizationServerRequest { - r.authorization = &authorization - return r -} - -func (r ApiUpdateAuthorizationServerRequest) CreateAuthorizationServerRequest(createAuthorizationServerRequest CreateAuthorizationServerRequest) ApiUpdateAuthorizationServerRequest { - r.createAuthorizationServerRequest = &createAuthorizationServerRequest - return r -} - -func (r ApiUpdateAuthorizationServerRequest) Execute() (*Id, *http.Response, error) { - return r.ApiService.UpdateAuthorizationServerExecute(r) -} - -/* -UpdateAuthorizationServer Method for UpdateAuthorizationServer - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id - @return ApiUpdateAuthorizationServerRequest -*/ -func (a *DefaultApiService) UpdateAuthorizationServer(ctx context.Context, id int32) ApiUpdateAuthorizationServerRequest { - return ApiUpdateAuthorizationServerRequest{ - ApiService: a, - ctx: ctx, - id: id, - } -} - -// Execute executes the request -// @return Id -func (a *DefaultApiService) UpdateAuthorizationServerExecute(r ApiUpdateAuthorizationServerRequest) (*Id, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Id - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.UpdateAuthorizationServer") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/api_authorizations/{id}" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return localVarReturnValue, nil, reportError("authorization is required and must be specified") - } - if r.createAuthorizationServerRequest == nil { - return localVarReturnValue, nil, reportError("createAuthorizationServerRequest is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - // body params - localVarPostBody = r.createAuthorizationServerRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v UpdateAuthorizationServer400Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiUpdateClientAppRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - id int32 - clientAppId int32 - updateClientAppRequest *UpdateClientAppRequest -} - -func (r ApiUpdateClientAppRequest) Authorization(authorization string) ApiUpdateClientAppRequest { - r.authorization = &authorization - return r -} - -func (r ApiUpdateClientAppRequest) UpdateClientAppRequest(updateClientAppRequest UpdateClientAppRequest) ApiUpdateClientAppRequest { - r.updateClientAppRequest = &updateClientAppRequest - return r -} - -func (r ApiUpdateClientAppRequest) Execute() (*ClientApp, *http.Response, error) { - return r.ApiService.UpdateClientAppExecute(r) -} - -/* -UpdateClientApp Method for UpdateClientApp - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id - @param clientAppId - @return ApiUpdateClientAppRequest -*/ -func (a *DefaultApiService) UpdateClientApp(ctx context.Context, id int32, clientAppId int32) ApiUpdateClientAppRequest { - return ApiUpdateClientAppRequest{ - ApiService: a, - ctx: ctx, - id: id, - clientAppId: clientAppId, - } -} - -// Execute executes the request -// @return ClientApp -func (a *DefaultApiService) UpdateClientAppExecute(r ApiUpdateClientAppRequest) (*ClientApp, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ClientApp - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.UpdateClientApp") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/api_authorizations/{id}/clients/{client_app_id}" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"client_app_id"+"}", url.PathEscape(parameterToString(r.clientAppId, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return localVarReturnValue, nil, reportError("authorization is required and must be specified") - } - if r.updateClientAppRequest == nil { - return localVarReturnValue, nil, reportError("updateClientAppRequest is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - // body params - localVarPostBody = r.updateClientAppRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiUpdateEnvironmentVariableRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - envvarId string - updateEnvironmentVariableRequest *UpdateEnvironmentVariableRequest -} - -func (r ApiUpdateEnvironmentVariableRequest) Authorization(authorization string) ApiUpdateEnvironmentVariableRequest { - r.authorization = &authorization - return r -} - -func (r ApiUpdateEnvironmentVariableRequest) UpdateEnvironmentVariableRequest(updateEnvironmentVariableRequest UpdateEnvironmentVariableRequest) ApiUpdateEnvironmentVariableRequest { - r.updateEnvironmentVariableRequest = &updateEnvironmentVariableRequest - return r -} - -func (r ApiUpdateEnvironmentVariableRequest) Execute() (*Envvar, *http.Response, error) { - return r.ApiService.UpdateEnvironmentVariableExecute(r) -} - -/* -UpdateEnvironmentVariable Method for UpdateEnvironmentVariable - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param envvarId Set to the id of the Hook Environment Variable that you want to fetch. - @return ApiUpdateEnvironmentVariableRequest -*/ -func (a *DefaultApiService) UpdateEnvironmentVariable(ctx context.Context, envvarId string) ApiUpdateEnvironmentVariableRequest { - return ApiUpdateEnvironmentVariableRequest{ - ApiService: a, - ctx: ctx, - envvarId: envvarId, - } -} - -// Execute executes the request -// @return Envvar -func (a *DefaultApiService) UpdateEnvironmentVariableExecute(r ApiUpdateEnvironmentVariableRequest) (*Envvar, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Envvar - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.UpdateEnvironmentVariable") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/hooks/envs/{envvar_id}" - localVarPath = strings.Replace(localVarPath, "{"+"envvar_id"+"}", url.PathEscape(parameterToString(r.envvarId, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return localVarReturnValue, nil, reportError("authorization is required and must be specified") - } - if r.updateEnvironmentVariableRequest == nil { - return localVarReturnValue, nil, reportError("updateEnvironmentVariableRequest is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - // body params - localVarPostBody = r.updateEnvironmentVariableRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v HookStatus - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiUpdateHookRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - hookId string - hook *Hook -} - -func (r ApiUpdateHookRequest) Authorization(authorization string) ApiUpdateHookRequest { - r.authorization = &authorization - return r -} - -func (r ApiUpdateHookRequest) Hook(hook Hook) ApiUpdateHookRequest { - r.hook = &hook - return r -} - -func (r ApiUpdateHookRequest) Execute() (*Hook, *http.Response, error) { - return r.ApiService.UpdateHookExecute(r) -} - -/* -UpdateHook Method for UpdateHook - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param hookId Set to the id of the Hook that you want to return. - @return ApiUpdateHookRequest -*/ -func (a *DefaultApiService) UpdateHook(ctx context.Context, hookId string) ApiUpdateHookRequest { - return ApiUpdateHookRequest{ - ApiService: a, - ctx: ctx, - hookId: hookId, - } -} - -// Execute executes the request -// @return Hook -func (a *DefaultApiService) UpdateHookExecute(r ApiUpdateHookRequest) (*Hook, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Hook - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.UpdateHook") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/hooks/{hook_id}" - localVarPath = strings.Replace(localVarPath, "{"+"hook_id"+"}", url.PathEscape(parameterToString(r.hookId, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return localVarReturnValue, nil, reportError("authorization is required and must be specified") - } - if r.hook == nil { - return localVarReturnValue, nil, reportError("hook is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - // body params - localVarPostBody = r.hook - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v HookStatus - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiUpdateMappingRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - mappingId int32 - mapping *Mapping -} - -func (r ApiUpdateMappingRequest) Authorization(authorization string) ApiUpdateMappingRequest { - r.authorization = &authorization - return r -} - -func (r ApiUpdateMappingRequest) Mapping(mapping Mapping) ApiUpdateMappingRequest { - r.mapping = &mapping - return r -} - -func (r ApiUpdateMappingRequest) Execute() (int32, *http.Response, error) { - return r.ApiService.UpdateMappingExecute(r) -} - -/* -UpdateMapping Method for UpdateMapping - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param mappingId The id of the user mapping to locate. - @return ApiUpdateMappingRequest -*/ -func (a *DefaultApiService) UpdateMapping(ctx context.Context, mappingId int32) ApiUpdateMappingRequest { - return ApiUpdateMappingRequest{ - ApiService: a, - ctx: ctx, - mappingId: mappingId, - } -} - -// Execute executes the request -// @return int32 -func (a *DefaultApiService) UpdateMappingExecute(r ApiUpdateMappingRequest) (int32, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue int32 - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.UpdateMapping") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/mappings/{mapping_id}" - localVarPath = strings.Replace(localVarPath, "{"+"mapping_id"+"}", url.PathEscape(parameterToString(r.mappingId, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return localVarReturnValue, nil, reportError("authorization is required and must be specified") - } - if r.mapping == nil { - return localVarReturnValue, nil, reportError("mapping is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - // body params - localVarPostBody = r.mapping - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ErrorStatus - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiUpdateRiskRuleRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - riskRuleId string - riskRule *RiskRule -} - -func (r ApiUpdateRiskRuleRequest) Authorization(authorization string) ApiUpdateRiskRuleRequest { - r.authorization = &authorization - return r -} - -func (r ApiUpdateRiskRuleRequest) RiskRule(riskRule RiskRule) ApiUpdateRiskRuleRequest { - r.riskRule = &riskRule - return r -} - -func (r ApiUpdateRiskRuleRequest) Execute() (*RiskRule, *http.Response, error) { - return r.ApiService.UpdateRiskRuleExecute(r) -} - -/* -UpdateRiskRule Method for UpdateRiskRule - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param riskRuleId - @return ApiUpdateRiskRuleRequest -*/ -func (a *DefaultApiService) UpdateRiskRule(ctx context.Context, riskRuleId string) ApiUpdateRiskRuleRequest { - return ApiUpdateRiskRuleRequest{ - ApiService: a, - ctx: ctx, - riskRuleId: riskRuleId, - } -} - -// Execute executes the request -// @return RiskRule -func (a *DefaultApiService) UpdateRiskRuleExecute(r ApiUpdateRiskRuleRequest) (*RiskRule, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *RiskRule - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.UpdateRiskRule") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/risk/rules/{risk_rule_id}" - localVarPath = strings.Replace(localVarPath, "{"+"risk_rule_id"+"}", url.PathEscape(parameterToString(r.riskRuleId, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return localVarReturnValue, nil, reportError("authorization is required and must be specified") - } - if r.riskRule == nil { - return localVarReturnValue, nil, reportError("riskRule is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - // body params - localVarPostBody = r.riskRule - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiUpdateRoleRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - roleId int32 - role *Role -} - -func (r ApiUpdateRoleRequest) Authorization(authorization string) ApiUpdateRoleRequest { - r.authorization = &authorization - return r -} - -func (r ApiUpdateRoleRequest) Role(role Role) ApiUpdateRoleRequest { - r.role = &role - return r -} - -func (r ApiUpdateRoleRequest) Execute() (*UpdateRole200Response, *http.Response, error) { - return r.ApiService.UpdateRoleExecute(r) -} - -/* -UpdateRole Method for UpdateRole - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param roleId Set to the id of the role you want to return. - @return ApiUpdateRoleRequest -*/ -func (a *DefaultApiService) UpdateRole(ctx context.Context, roleId int32) ApiUpdateRoleRequest { - return ApiUpdateRoleRequest{ - ApiService: a, - ctx: ctx, - roleId: roleId, - } -} - -// Execute executes the request -// @return UpdateRole200Response -func (a *DefaultApiService) UpdateRoleExecute(r ApiUpdateRoleRequest) (*UpdateRole200Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *UpdateRole200Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.UpdateRole") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/roles/{role_id}" - localVarPath = strings.Replace(localVarPath, "{"+"role_id"+"}", url.PathEscape(parameterToString(r.roleId, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return localVarReturnValue, nil, reportError("authorization is required and must be specified") - } - if r.role == nil { - return localVarReturnValue, nil, reportError("role is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - // body params - localVarPostBody = r.role - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiUpdateRuleRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - appId int32 - ruleId int32 - rule *Rule -} - -func (r ApiUpdateRuleRequest) Authorization(authorization string) ApiUpdateRuleRequest { - r.authorization = &authorization - return r -} - -func (r ApiUpdateRuleRequest) Rule(rule Rule) ApiUpdateRuleRequest { - r.rule = &rule - return r -} - -func (r ApiUpdateRuleRequest) Execute() (*RuleId, *http.Response, error) { - return r.ApiService.UpdateRuleExecute(r) -} - -/* -UpdateRule Method for UpdateRule - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param appId - @param ruleId The id of the app rule to locate. - @return ApiUpdateRuleRequest -*/ -func (a *DefaultApiService) UpdateRule(ctx context.Context, appId int32, ruleId int32) ApiUpdateRuleRequest { - return ApiUpdateRuleRequest{ - ApiService: a, - ctx: ctx, - appId: appId, - ruleId: ruleId, - } -} - -// Execute executes the request -// @return RuleId -func (a *DefaultApiService) UpdateRuleExecute(r ApiUpdateRuleRequest) (*RuleId, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *RuleId - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.UpdateRule") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/apps/{app_id}/rules/{rule_id}" - localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterToString(r.appId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"rule_id"+"}", url.PathEscape(parameterToString(r.ruleId, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return localVarReturnValue, nil, reportError("authorization is required and must be specified") - } - if r.rule == nil { - return localVarReturnValue, nil, reportError("rule is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - // body params - localVarPostBody = r.rule - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ErrorStatus - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiUpdateScopeRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - id int32 - scopeId int32 - addScopeRequest *AddScopeRequest -} - -func (r ApiUpdateScopeRequest) Authorization(authorization string) ApiUpdateScopeRequest { - r.authorization = &authorization - return r -} - -func (r ApiUpdateScopeRequest) AddScopeRequest(addScopeRequest AddScopeRequest) ApiUpdateScopeRequest { - r.addScopeRequest = &addScopeRequest - return r -} - -func (r ApiUpdateScopeRequest) Execute() (*Id, *http.Response, error) { - return r.ApiService.UpdateScopeExecute(r) -} - -/* -UpdateScope Method for UpdateScope - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id - @param scopeId - @return ApiUpdateScopeRequest -*/ -func (a *DefaultApiService) UpdateScope(ctx context.Context, id int32, scopeId int32) ApiUpdateScopeRequest { - return ApiUpdateScopeRequest{ - ApiService: a, - ctx: ctx, - id: id, - scopeId: scopeId, - } -} - -// Execute executes the request -// @return Id -func (a *DefaultApiService) UpdateScopeExecute(r ApiUpdateScopeRequest) (*Id, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Id - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.UpdateScope") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/api_authorizations/{id}/scopes/{scope_id}" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"scope_id"+"}", url.PathEscape(parameterToString(r.scopeId, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return localVarReturnValue, nil, reportError("authorization is required and must be specified") - } - if r.addScopeRequest == nil { - return localVarReturnValue, nil, reportError("addScopeRequest is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - // body params - localVarPostBody = r.addScopeRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiUpdateUserRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - userId int32 - user *User - mappings *string - validatePolicy *bool -} - -func (r ApiUpdateUserRequest) Authorization(authorization string) ApiUpdateUserRequest { - r.authorization = &authorization - return r -} - -func (r ApiUpdateUserRequest) User(user User) ApiUpdateUserRequest { - r.user = &user - return r -} - -// Controls how mappings will be applied to the user on creation. Defaults to async. -func (r ApiUpdateUserRequest) Mappings(mappings string) ApiUpdateUserRequest { - r.mappings = &mappings - return r -} - -// Will passwords validate against the User Policy? Defaults to true. -func (r ApiUpdateUserRequest) ValidatePolicy(validatePolicy bool) ApiUpdateUserRequest { - r.validatePolicy = &validatePolicy - return r -} - -func (r ApiUpdateUserRequest) Execute() (*User, *http.Response, error) { - return r.ApiService.UpdateUserExecute(r) -} - -/* -UpdateUser Method for UpdateUser - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param userId Set to the id of the user that you want to return. - @return ApiUpdateUserRequest -*/ -func (a *DefaultApiService) UpdateUser(ctx context.Context, userId int32) ApiUpdateUserRequest { - return ApiUpdateUserRequest{ - ApiService: a, - ctx: ctx, - userId: userId, - } -} - -// Execute executes the request -// @return User -func (a *DefaultApiService) UpdateUserExecute(r ApiUpdateUserRequest) (*User, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *User - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.UpdateUser") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/users/{user_id}" - localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterToString(r.userId, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return localVarReturnValue, nil, reportError("authorization is required and must be specified") - } - if r.user == nil { - return localVarReturnValue, nil, reportError("user is required and must be specified") - } - - if r.mappings != nil { - localVarQueryParams.Add("mappings", parameterToString(*r.mappings, "")) - } - if r.validatePolicy != nil { - localVarQueryParams.Add("validate_policy", parameterToString(*r.validatePolicy, "")) - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - // body params - localVarPostBody = r.user - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiVerifyEnrollmentRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - userId int32 - registrationId int32 - verifyEnrollmentRequest *VerifyEnrollmentRequest -} - -func (r ApiVerifyEnrollmentRequest) Authorization(authorization string) ApiVerifyEnrollmentRequest { - r.authorization = &authorization - return r -} - -func (r ApiVerifyEnrollmentRequest) VerifyEnrollmentRequest(verifyEnrollmentRequest VerifyEnrollmentRequest) ApiVerifyEnrollmentRequest { - r.verifyEnrollmentRequest = &verifyEnrollmentRequest - return r -} - -func (r ApiVerifyEnrollmentRequest) Execute() ([]Registration, *http.Response, error) { - return r.ApiService.VerifyEnrollmentExecute(r) -} - -/* -VerifyEnrollment Method for VerifyEnrollment - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param userId Set to the id of the user. - @param registrationId Set to the uuid of the registration. This was included in the response as part of the initial request in Enroll Factor. - @return ApiVerifyEnrollmentRequest -*/ -func (a *DefaultApiService) VerifyEnrollment(ctx context.Context, userId int32, registrationId int32) ApiVerifyEnrollmentRequest { - return ApiVerifyEnrollmentRequest{ - ApiService: a, - ctx: ctx, - userId: userId, - registrationId: registrationId, - } -} - -// Execute executes the request -// @return []Registration -func (a *DefaultApiService) VerifyEnrollmentExecute(r ApiVerifyEnrollmentRequest) ([]Registration, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []Registration - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.VerifyEnrollment") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/mfa/users/{user_id}/registrations/{registration_id}" - localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterToString(r.userId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"registration_id"+"}", url.PathEscape(parameterToString(r.registrationId, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return localVarReturnValue, nil, reportError("authorization is required and must be specified") - } - if r.verifyEnrollmentRequest == nil { - return localVarReturnValue, nil, reportError("verifyEnrollmentRequest is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - // body params - localVarPostBody = r.verifyEnrollmentRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiVerifyEnrollmentVoiceProtectRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - userId int32 - registrationId int32 -} - -func (r ApiVerifyEnrollmentVoiceProtectRequest) Authorization(authorization string) ApiVerifyEnrollmentVoiceProtectRequest { - r.authorization = &authorization - return r -} - -func (r ApiVerifyEnrollmentVoiceProtectRequest) Execute() ([]Registration, *http.Response, error) { - return r.ApiService.VerifyEnrollmentVoiceProtectExecute(r) -} - -/* -VerifyEnrollmentVoiceProtect Method for VerifyEnrollmentVoiceProtect - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param userId Set to the id of the user. - @param registrationId Set to the uuid of the registration. This was included in the response as part of the initial request in Enroll Factor. - @return ApiVerifyEnrollmentVoiceProtectRequest -*/ -func (a *DefaultApiService) VerifyEnrollmentVoiceProtect(ctx context.Context, userId int32, registrationId int32) ApiVerifyEnrollmentVoiceProtectRequest { - return ApiVerifyEnrollmentVoiceProtectRequest{ - ApiService: a, - ctx: ctx, - userId: userId, - registrationId: registrationId, - } -} - -// Execute executes the request -// @return []Registration -func (a *DefaultApiService) VerifyEnrollmentVoiceProtectExecute(r ApiVerifyEnrollmentVoiceProtectRequest) ([]Registration, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []Registration - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.VerifyEnrollmentVoiceProtect") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/mfa/users/{user_id}/registrations/{registration_id}" - localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterToString(r.userId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"registration_id"+"}", url.PathEscape(parameterToString(r.registrationId, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return localVarReturnValue, nil, reportError("authorization is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiVerifyFactorRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - userId int32 - verificationId int32 - verifyFactorRequest *VerifyFactorRequest -} - -func (r ApiVerifyFactorRequest) Authorization(authorization string) ApiVerifyFactorRequest { - r.authorization = &authorization - return r -} - -func (r ApiVerifyFactorRequest) VerifyFactorRequest(verifyFactorRequest VerifyFactorRequest) ApiVerifyFactorRequest { - r.verifyFactorRequest = &verifyFactorRequest - return r -} - -func (r ApiVerifyFactorRequest) Execute() (*Status2, *http.Response, error) { - return r.ApiService.VerifyFactorExecute(r) -} - -/* -VerifyFactor Method for VerifyFactor - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param userId Set to the id of the user. - @param verificationId The verification_id is returned on activation of the factor or you can get the device_id using the Activate Factor API call. - @return ApiVerifyFactorRequest -*/ -func (a *DefaultApiService) VerifyFactor(ctx context.Context, userId int32, verificationId int32) ApiVerifyFactorRequest { - return ApiVerifyFactorRequest{ - ApiService: a, - ctx: ctx, - userId: userId, - verificationId: verificationId, - } -} - -// Execute executes the request -// @return Status2 -func (a *DefaultApiService) VerifyFactorExecute(r ApiVerifyFactorRequest) (*Status2, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Status2 - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.VerifyFactor") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/mfa/users/{user_id}/verifications/{verification_id}" - localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterToString(r.userId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"verification_id"+"}", url.PathEscape(parameterToString(r.verificationId, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return localVarReturnValue, nil, reportError("authorization is required and must be specified") - } - if r.verifyFactorRequest == nil { - return localVarReturnValue, nil, reportError("verifyFactorRequest is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - // body params - localVarPostBody = r.verifyFactorRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiVerifyFactorSamlRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - verifyFactorSamlRequest *VerifyFactorSamlRequest -} - -func (r ApiVerifyFactorSamlRequest) Authorization(authorization string) ApiVerifyFactorSamlRequest { - r.authorization = &authorization - return r -} - -func (r ApiVerifyFactorSamlRequest) VerifyFactorSamlRequest(verifyFactorSamlRequest VerifyFactorSamlRequest) ApiVerifyFactorSamlRequest { - r.verifyFactorSamlRequest = &verifyFactorSamlRequest - return r -} - -func (r ApiVerifyFactorSamlRequest) Execute() (*VerifyFactorSaml200Response, *http.Response, error) { - return r.ApiService.VerifyFactorSamlExecute(r) -} - -/* -VerifyFactorSaml Method for VerifyFactorSaml - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiVerifyFactorSamlRequest -*/ -func (a *DefaultApiService) VerifyFactorSaml(ctx context.Context) ApiVerifyFactorSamlRequest { - return ApiVerifyFactorSamlRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return VerifyFactorSaml200Response -func (a *DefaultApiService) VerifyFactorSamlExecute(r ApiVerifyFactorSamlRequest) (*VerifyFactorSaml200Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *VerifyFactorSaml200Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.VerifyFactorSaml") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/saml_assertion/verify_factor" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return localVarReturnValue, nil, reportError("authorization is required and must be specified") - } - if r.verifyFactorSamlRequest == nil { - return localVarReturnValue, nil, reportError("verifyFactorSamlRequest is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - // body params - localVarPostBody = r.verifyFactorSamlRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiVerifyFactorVoiceRequest struct { - ctx context.Context - ApiService *DefaultApiService - authorization *string - userId int32 - verificationId int32 -} - -func (r ApiVerifyFactorVoiceRequest) Authorization(authorization string) ApiVerifyFactorVoiceRequest { - r.authorization = &authorization - return r -} - -func (r ApiVerifyFactorVoiceRequest) Execute() ([]VerifyFactorVoice200ResponseInner, *http.Response, error) { - return r.ApiService.VerifyFactorVoiceExecute(r) -} - -/* -VerifyFactorVoice Method for VerifyFactorVoice - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param userId Set to the id of the user. - @param verificationId The verification_id is returned on activation of the factor or you can get the device_id using the Activate Factor API call. - @return ApiVerifyFactorVoiceRequest -*/ -func (a *DefaultApiService) VerifyFactorVoice(ctx context.Context, userId int32, verificationId int32) ApiVerifyFactorVoiceRequest { - return ApiVerifyFactorVoiceRequest{ - ApiService: a, - ctx: ctx, - userId: userId, - verificationId: verificationId, - } -} - -// Execute executes the request -// @return []VerifyFactorVoice200ResponseInner -func (a *DefaultApiService) VerifyFactorVoiceExecute(r ApiVerifyFactorVoiceRequest) ([]VerifyFactorVoice200ResponseInner, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []VerifyFactorVoice200ResponseInner - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.VerifyFactorVoice") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/mfa/users/{user_id}/verifications/{verification_id}" - localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterToString(r.userId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"verification_id"+"}", url.PathEscape(parameterToString(r.verificationId, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorization == nil { - return localVarReturnValue, nil, reportError("authorization is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarHeaderParams["Authorization"] = parameterToString(*r.authorization, "") - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Status2 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Status1 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} diff --git a/api_events.go b/api_events.go new file mode 100644 index 0000000..fdeba40 --- /dev/null +++ b/api_events.go @@ -0,0 +1,478 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "bytes" + "context" + "io/ioutil" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// EventsApiService EventsApi service +type EventsApiService service + +type ApiGetEventByIdRequest struct { + ctx context.Context + ApiService *EventsApiService + eventId int32 +} + +func (r ApiGetEventByIdRequest) Execute() (*GetEventById200Response, *http.Response, error) { + return r.ApiService.GetEventByIdExecute(r) +} + +/* +GetEventById Get Event by ID + +Get Event By ID + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param eventId + @return ApiGetEventByIdRequest +*/ +func (a *EventsApiService) GetEventById(ctx context.Context, eventId int32) ApiGetEventByIdRequest { + return ApiGetEventByIdRequest{ + ApiService: a, + ctx: ctx, + eventId: eventId, + } +} + +// Execute executes the request +// @return GetEventById200Response +func (a *EventsApiService) GetEventByIdExecute(r ApiGetEventByIdRequest) (*GetEventById200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GetEventById200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EventsApiService.GetEventById") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/1/events/{event_id}" + localVarPath = strings.Replace(localVarPath, "{"+"event_id"+"}", url.PathEscape(parameterValueToString(r.eventId, "eventId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetEventTypesRequest struct { + ctx context.Context + ApiService *EventsApiService + contentType *string +} + +func (r ApiGetEventTypesRequest) ContentType(contentType string) ApiGetEventTypesRequest { + r.contentType = &contentType + return r +} + +func (r ApiGetEventTypesRequest) Execute() (*GetEventTypes200Response, *http.Response, error) { + return r.ApiService.GetEventTypesExecute(r) +} + +/* +GetEventTypes Get Event Types + +Get Event types + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetEventTypesRequest +*/ +func (a *EventsApiService) GetEventTypes(ctx context.Context) ApiGetEventTypesRequest { + return ApiGetEventTypesRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return GetEventTypes200Response +func (a *EventsApiService) GetEventTypesExecute(r ApiGetEventTypesRequest) (*GetEventTypes200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GetEventTypes200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EventsApiService.GetEventTypes") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/1/events/types" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.contentType != nil { + parameterAddToQuery(localVarQueryParams, "Content-Type", r.contentType, "") + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetEventsRequest struct { + ctx context.Context + ApiService *EventsApiService + eventTypeId *[]int32 + clientId *int32 + directoryId *int32 + id *int32 + createdAt *string + resolution *string + since *string + until *string + userId *int32 +} + +func (r ApiGetEventsRequest) EventTypeId(eventTypeId []int32) ApiGetEventsRequest { + r.eventTypeId = &eventTypeId + return r +} + +func (r ApiGetEventsRequest) ClientId(clientId int32) ApiGetEventsRequest { + r.clientId = &clientId + return r +} + +func (r ApiGetEventsRequest) DirectoryId(directoryId int32) ApiGetEventsRequest { + r.directoryId = &directoryId + return r +} + +func (r ApiGetEventsRequest) Id(id int32) ApiGetEventsRequest { + r.id = &id + return r +} + +func (r ApiGetEventsRequest) CreatedAt(createdAt string) ApiGetEventsRequest { + r.createdAt = &createdAt + return r +} + +func (r ApiGetEventsRequest) Resolution(resolution string) ApiGetEventsRequest { + r.resolution = &resolution + return r +} + +func (r ApiGetEventsRequest) Since(since string) ApiGetEventsRequest { + r.since = &since + return r +} + +func (r ApiGetEventsRequest) Until(until string) ApiGetEventsRequest { + r.until = &until + return r +} + +// Set to the id of the user that you want to return. +func (r ApiGetEventsRequest) UserId(userId int32) ApiGetEventsRequest { + r.userId = &userId + return r +} + +func (r ApiGetEventsRequest) Execute() (*GetEvents200Response, *http.Response, error) { + return r.ApiService.GetEventsExecute(r) +} + +/* +GetEvents Get Events + +Get Events + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetEventsRequest +*/ +func (a *EventsApiService) GetEvents(ctx context.Context) ApiGetEventsRequest { + return ApiGetEventsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return GetEvents200Response +func (a *EventsApiService) GetEventsExecute(r ApiGetEventsRequest) (*GetEvents200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GetEvents200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EventsApiService.GetEvents") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/1/events" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.eventTypeId != nil { + t := *r.eventTypeId + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToQuery(localVarQueryParams, "event_type_id", s.Index(i), "multi") + } + } else { + parameterAddToQuery(localVarQueryParams, "event_type_id", t, "multi") + } + } + if r.clientId != nil { + parameterAddToQuery(localVarQueryParams, "client_id", r.clientId, "") + } + if r.directoryId != nil { + parameterAddToQuery(localVarQueryParams, "directory_id", r.directoryId, "") + } + if r.id != nil { + parameterAddToQuery(localVarQueryParams, "id", r.id, "") + } + if r.createdAt != nil { + parameterAddToQuery(localVarQueryParams, "created_at", r.createdAt, "") + } + if r.resolution != nil { + parameterAddToQuery(localVarQueryParams, "resolution", r.resolution, "") + } + if r.since != nil { + parameterAddToQuery(localVarQueryParams, "since", r.since, "") + } + if r.until != nil { + parameterAddToQuery(localVarQueryParams, "until", r.until, "") + } + if r.userId != nil { + parameterAddToQuery(localVarQueryParams, "user_id", r.userId, "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/api_groups.go b/api_groups.go new file mode 100644 index 0000000..fe93300 --- /dev/null +++ b/api_groups.go @@ -0,0 +1,279 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "bytes" + "context" + "io/ioutil" + "net/http" + "net/url" + "strings" +) + + +// GroupsApiService GroupsApi service +type GroupsApiService service + +type ApiGetGroupByIdRequest struct { + ctx context.Context + ApiService *GroupsApiService + groupId string +} + +func (r ApiGetGroupByIdRequest) Execute() (*GetGroups200Response, *http.Response, error) { + return r.ApiService.GetGroupByIdExecute(r) +} + +/* +GetGroupById Get Group by ID + +Get Group By ID + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param groupId + @return ApiGetGroupByIdRequest +*/ +func (a *GroupsApiService) GetGroupById(ctx context.Context, groupId string) ApiGetGroupByIdRequest { + return ApiGetGroupByIdRequest{ + ApiService: a, + ctx: ctx, + groupId: groupId, + } +} + +// Execute executes the request +// @return GetGroups200Response +func (a *GroupsApiService) GetGroupByIdExecute(r ApiGetGroupByIdRequest) (*GetGroups200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GetGroups200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GroupsApiService.GetGroupById") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/1/groups/{group_id}" + localVarPath = strings.Replace(localVarPath, "{"+"group_id"+"}", url.PathEscape(parameterValueToString(r.groupId, "groupId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetGroupsRequest struct { + ctx context.Context + ApiService *GroupsApiService +} + +func (r ApiGetGroupsRequest) Execute() (*GetGroups200Response, *http.Response, error) { + return r.ApiService.GetGroupsExecute(r) +} + +/* +GetGroups Get Groups + +Get Groups + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetGroupsRequest +*/ +func (a *GroupsApiService) GetGroups(ctx context.Context) ApiGetGroupsRequest { + return ApiGetGroupsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return GetGroups200Response +func (a *GroupsApiService) GetGroupsExecute(r ApiGetGroupsRequest) (*GetGroups200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GetGroups200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GroupsApiService.GetGroups") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/1/groups" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/api_invite_links.go b/api_invite_links.go new file mode 100644 index 0000000..e8fd7ef --- /dev/null +++ b/api_invite_links.go @@ -0,0 +1,279 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "bytes" + "context" + "io/ioutil" + "net/http" + "net/url" +) + + +// InviteLinksApiService InviteLinksApi service +type InviteLinksApiService service + +type ApiGetInviteLinkRequest struct { + ctx context.Context + ApiService *InviteLinksApiService + getInviteLinkRequest *GetInviteLinkRequest +} + +func (r ApiGetInviteLinkRequest) GetInviteLinkRequest(getInviteLinkRequest GetInviteLinkRequest) ApiGetInviteLinkRequest { + r.getInviteLinkRequest = &getInviteLinkRequest + return r +} + +func (r ApiGetInviteLinkRequest) Execute() (*GetInviteLink200Response, *http.Response, error) { + return r.ApiService.GetInviteLinkExecute(r) +} + +/* +GetInviteLink Generate Invite Link + +Generate Invite Link + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetInviteLinkRequest +*/ +func (a *InviteLinksApiService) GetInviteLink(ctx context.Context) ApiGetInviteLinkRequest { + return ApiGetInviteLinkRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return GetInviteLink200Response +func (a *InviteLinksApiService) GetInviteLinkExecute(r ApiGetInviteLinkRequest) (*GetInviteLink200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GetInviteLink200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "InviteLinksApiService.GetInviteLink") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/1/invites/get_invite_link" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.getInviteLinkRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSendInviteLinkRequest struct { + ctx context.Context + ApiService *InviteLinksApiService + sendInviteLinkRequest *SendInviteLinkRequest +} + +func (r ApiSendInviteLinkRequest) SendInviteLinkRequest(sendInviteLinkRequest SendInviteLinkRequest) ApiSendInviteLinkRequest { + r.sendInviteLinkRequest = &sendInviteLinkRequest + return r +} + +func (r ApiSendInviteLinkRequest) Execute() (*SendInviteLink200Response, *http.Response, error) { + return r.ApiService.SendInviteLinkExecute(r) +} + +/* +SendInviteLink Send Invite Link + +Send Invite Link + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiSendInviteLinkRequest +*/ +func (a *InviteLinksApiService) SendInviteLink(ctx context.Context) ApiSendInviteLinkRequest { + return ApiSendInviteLinkRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return SendInviteLink200Response +func (a *InviteLinksApiService) SendInviteLinkExecute(r ApiSendInviteLinkRequest) (*SendInviteLink200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *SendInviteLink200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "InviteLinksApiService.SendInviteLink") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/1/invites/send_invite_link" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.sendInviteLinkRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/api_multi_factor_authentication.go b/api_multi_factor_authentication.go new file mode 100644 index 0000000..ee176d6 --- /dev/null +++ b/api_multi_factor_authentication.go @@ -0,0 +1,1271 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "bytes" + "context" + "io/ioutil" + "net/http" + "net/url" + "strings" +) + + +// MultiFactorAuthenticationApiService MultiFactorAuthenticationApi service +type MultiFactorAuthenticationApiService service + +type ApiCreateDeviceVerificationRequest struct { + ctx context.Context + ApiService *MultiFactorAuthenticationApiService + userId int32 + contentType *string + createDeviceVerificationRequest *CreateDeviceVerificationRequest +} + +func (r ApiCreateDeviceVerificationRequest) ContentType(contentType string) ApiCreateDeviceVerificationRequest { + r.contentType = &contentType + return r +} + +func (r ApiCreateDeviceVerificationRequest) CreateDeviceVerificationRequest(createDeviceVerificationRequest CreateDeviceVerificationRequest) ApiCreateDeviceVerificationRequest { + r.createDeviceVerificationRequest = &createDeviceVerificationRequest + return r +} + +func (r ApiCreateDeviceVerificationRequest) Execute() (*CreateDeviceVerification201Response, *http.Response, error) { + return r.ApiService.CreateDeviceVerificationExecute(r) +} + +/* +CreateDeviceVerification Create Device Verification + +Create a new verification process + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param userId Set to the id of the user that you want to return. + @return ApiCreateDeviceVerificationRequest +*/ +func (a *MultiFactorAuthenticationApiService) CreateDeviceVerification(ctx context.Context, userId int32) ApiCreateDeviceVerificationRequest { + return ApiCreateDeviceVerificationRequest{ + ApiService: a, + ctx: ctx, + userId: userId, + } +} + +// Execute executes the request +// @return CreateDeviceVerification201Response +func (a *MultiFactorAuthenticationApiService) CreateDeviceVerificationExecute(r ApiCreateDeviceVerificationRequest) (*CreateDeviceVerification201Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreateDeviceVerification201Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MultiFactorAuthenticationApiService.CreateDeviceVerification") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/mfa/users/{user_id}/verifications" + localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.contentType != nil { + parameterAddToQuery(localVarQueryParams, "Content-Type", r.contentType, "") + } + // body params + localVarPostBody = r.createDeviceVerificationRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiCreateFactorRegistrationRequest struct { + ctx context.Context + ApiService *MultiFactorAuthenticationApiService + userId int32 + contentType *string + createFactorRegistrationRequest *CreateFactorRegistrationRequest +} + +func (r ApiCreateFactorRegistrationRequest) ContentType(contentType string) ApiCreateFactorRegistrationRequest { + r.contentType = &contentType + return r +} + +func (r ApiCreateFactorRegistrationRequest) CreateFactorRegistrationRequest(createFactorRegistrationRequest CreateFactorRegistrationRequest) ApiCreateFactorRegistrationRequest { + r.createFactorRegistrationRequest = &createFactorRegistrationRequest + return r +} + +func (r ApiCreateFactorRegistrationRequest) Execute() (*CreateFactorRegistration201Response, *http.Response, error) { + return r.ApiService.CreateFactorRegistrationExecute(r) +} + +/* +CreateFactorRegistration Create Factor Registration + +Create a new registration process + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param userId Set to the id of the user that you want to return. + @return ApiCreateFactorRegistrationRequest +*/ +func (a *MultiFactorAuthenticationApiService) CreateFactorRegistration(ctx context.Context, userId int32) ApiCreateFactorRegistrationRequest { + return ApiCreateFactorRegistrationRequest{ + ApiService: a, + ctx: ctx, + userId: userId, + } +} + +// Execute executes the request +// @return CreateFactorRegistration201Response +func (a *MultiFactorAuthenticationApiService) CreateFactorRegistrationExecute(r ApiCreateFactorRegistrationRequest) (*CreateFactorRegistration201Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreateFactorRegistration201Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MultiFactorAuthenticationApiService.CreateFactorRegistration") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/mfa/users/{user_id}/registrations" + localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.contentType != nil { + parameterAddToQuery(localVarQueryParams, "Content-Type", r.contentType, "") + } + // body params + localVarPostBody = r.createFactorRegistrationRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteEnrolledFactorRequest struct { + ctx context.Context + ApiService *MultiFactorAuthenticationApiService + userId int32 + deviceId string +} + +func (r ApiDeleteEnrolledFactorRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteEnrolledFactorExecute(r) +} + +/* +DeleteEnrolledFactor Delete Enrolled Factor + +Delete a user\'s authentication device + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param userId Set to the id of the user that you want to return. + @param deviceId + @return ApiDeleteEnrolledFactorRequest +*/ +func (a *MultiFactorAuthenticationApiService) DeleteEnrolledFactor(ctx context.Context, userId int32, deviceId string) ApiDeleteEnrolledFactorRequest { + return ApiDeleteEnrolledFactorRequest{ + ApiService: a, + ctx: ctx, + userId: userId, + deviceId: deviceId, + } +} + +// Execute executes the request +func (a *MultiFactorAuthenticationApiService) DeleteEnrolledFactorExecute(r ApiDeleteEnrolledFactorRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MultiFactorAuthenticationApiService.DeleteEnrolledFactor") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/mfa/users/{user_id}/devices/{device_id}" + localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"device_id"+"}", url.PathEscape(parameterValueToString(r.deviceId, "deviceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiGenerateOTPRequest struct { + ctx context.Context + ApiService *MultiFactorAuthenticationApiService + userId int32 + contentType *string + generateOTPRequest *GenerateOTPRequest +} + +func (r ApiGenerateOTPRequest) ContentType(contentType string) ApiGenerateOTPRequest { + r.contentType = &contentType + return r +} + +func (r ApiGenerateOTPRequest) GenerateOTPRequest(generateOTPRequest GenerateOTPRequest) ApiGenerateOTPRequest { + r.generateOTPRequest = &generateOTPRequest + return r +} + +func (r ApiGenerateOTPRequest) Execute() (*GenerateOTP201Response, *http.Response, error) { + return r.ApiService.GenerateOTPExecute(r) +} + +/* +GenerateOTP Generate MFA token + +Create new MFA token on the user's account + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param userId Set to the id of the user that you want to return. + @return ApiGenerateOTPRequest +*/ +func (a *MultiFactorAuthenticationApiService) GenerateOTP(ctx context.Context, userId int32) ApiGenerateOTPRequest { + return ApiGenerateOTPRequest{ + ApiService: a, + ctx: ctx, + userId: userId, + } +} + +// Execute executes the request +// @return GenerateOTP201Response +func (a *MultiFactorAuthenticationApiService) GenerateOTPExecute(r ApiGenerateOTPRequest) (*GenerateOTP201Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GenerateOTP201Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MultiFactorAuthenticationApiService.GenerateOTP") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/mfa/users/{user_id}/mfa_token" + localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.contentType != nil { + parameterAddToQuery(localVarQueryParams, "Content-Type", r.contentType, "") + } + // body params + localVarPostBody = r.generateOTPRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetAuthFactorsRequest struct { + ctx context.Context + ApiService *MultiFactorAuthenticationApiService + userId int32 +} + +func (r ApiGetAuthFactorsRequest) Execute() (*GetAuthFactors200Response, *http.Response, error) { + return r.ApiService.GetAuthFactorsExecute(r) +} + +/* +GetAuthFactors Get User Factors + +Get a user\'s available authentication factors + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param userId Set to the id of the user that you want to return. + @return ApiGetAuthFactorsRequest +*/ +func (a *MultiFactorAuthenticationApiService) GetAuthFactors(ctx context.Context, userId int32) ApiGetAuthFactorsRequest { + return ApiGetAuthFactorsRequest{ + ApiService: a, + ctx: ctx, + userId: userId, + } +} + +// Execute executes the request +// @return GetAuthFactors200Response +func (a *MultiFactorAuthenticationApiService) GetAuthFactorsExecute(r ApiGetAuthFactorsRequest) (*GetAuthFactors200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GetAuthFactors200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MultiFactorAuthenticationApiService.GetAuthFactors") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/mfa/users/{user_id}/factors" + localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetAuthenticationDevicesRequest struct { + ctx context.Context + ApiService *MultiFactorAuthenticationApiService + userId int32 +} + +func (r ApiGetAuthenticationDevicesRequest) Execute() ([]GetAuthenticationDevices200ResponseInner, *http.Response, error) { + return r.ApiService.GetAuthenticationDevicesExecute(r) +} + +/* +GetAuthenticationDevices Get User Devices + +Get a user authentication devices + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param userId Set to the id of the user that you want to return. + @return ApiGetAuthenticationDevicesRequest +*/ +func (a *MultiFactorAuthenticationApiService) GetAuthenticationDevices(ctx context.Context, userId int32) ApiGetAuthenticationDevicesRequest { + return ApiGetAuthenticationDevicesRequest{ + ApiService: a, + ctx: ctx, + userId: userId, + } +} + +// Execute executes the request +// @return []GetAuthenticationDevices200ResponseInner +func (a *MultiFactorAuthenticationApiService) GetAuthenticationDevicesExecute(r ApiGetAuthenticationDevicesRequest) ([]GetAuthenticationDevices200ResponseInner, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []GetAuthenticationDevices200ResponseInner + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MultiFactorAuthenticationApiService.GetAuthenticationDevices") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/mfa/users/{user_id}/devices" + localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetUserRegistrationRequest struct { + ctx context.Context + ApiService *MultiFactorAuthenticationApiService + userId int32 + registrationId string +} + +func (r ApiGetUserRegistrationRequest) Execute() (map[string]interface{}, *http.Response, error) { + return r.ApiService.GetUserRegistrationExecute(r) +} + +/* +GetUserRegistration Get User Registration + +Get registration state by id + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param userId Set to the id of the user that you want to return. + @param registrationId The id of a registration + @return ApiGetUserRegistrationRequest +*/ +func (a *MultiFactorAuthenticationApiService) GetUserRegistration(ctx context.Context, userId int32, registrationId string) ApiGetUserRegistrationRequest { + return ApiGetUserRegistrationRequest{ + ApiService: a, + ctx: ctx, + userId: userId, + registrationId: registrationId, + } +} + +// Execute executes the request +// @return map[string]interface{} +func (a *MultiFactorAuthenticationApiService) GetUserRegistrationExecute(r ApiGetUserRegistrationRequest) (map[string]interface{}, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue map[string]interface{} + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MultiFactorAuthenticationApiService.GetUserRegistration") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/mfa/users/{user_id}/registrations/{registration_id}" + localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"registration_id"+"}", url.PathEscape(parameterValueToString(r.registrationId, "registrationId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetUserVerificationRequest struct { + ctx context.Context + ApiService *MultiFactorAuthenticationApiService + userId int32 + verificationId string +} + +func (r ApiGetUserVerificationRequest) Execute() (*GetUserVerification200Response, *http.Response, error) { + return r.ApiService.GetUserVerificationExecute(r) +} + +/* +GetUserVerification Get User Verification + +Get verification state by id + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param userId Set to the id of the user that you want to return. + @param verificationId The verification_id is returned on activation of the factor or you can get the device_id using the Activate Factor API call. + @return ApiGetUserVerificationRequest +*/ +func (a *MultiFactorAuthenticationApiService) GetUserVerification(ctx context.Context, userId int32, verificationId string) ApiGetUserVerificationRequest { + return ApiGetUserVerificationRequest{ + ApiService: a, + ctx: ctx, + userId: userId, + verificationId: verificationId, + } +} + +// Execute executes the request +// @return GetUserVerification200Response +func (a *MultiFactorAuthenticationApiService) GetUserVerificationExecute(r ApiGetUserVerificationRequest) (*GetUserVerification200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GetUserVerification200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MultiFactorAuthenticationApiService.GetUserVerification") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/mfa/users/{user_id}/verifications/{verification_id}" + localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"verification_id"+"}", url.PathEscape(parameterValueToString(r.verificationId, "verificationId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiVerifyUserRegistrationRequest struct { + ctx context.Context + ApiService *MultiFactorAuthenticationApiService + userId int32 + registrationId string + contentType *string + verifyUserRegistrationRequest *VerifyUserRegistrationRequest +} + +func (r ApiVerifyUserRegistrationRequest) ContentType(contentType string) ApiVerifyUserRegistrationRequest { + r.contentType = &contentType + return r +} + +func (r ApiVerifyUserRegistrationRequest) VerifyUserRegistrationRequest(verifyUserRegistrationRequest VerifyUserRegistrationRequest) ApiVerifyUserRegistrationRequest { + r.verifyUserRegistrationRequest = &verifyUserRegistrationRequest + return r +} + +func (r ApiVerifyUserRegistrationRequest) Execute() (*VerifyUserRegistration200Response, *http.Response, error) { + return r.ApiService.VerifyUserRegistrationExecute(r) +} + +/* +VerifyUserRegistration Verify User Registration + +Submit an otp for verification. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param userId Set to the id of the user that you want to return. + @param registrationId The id of a registration + @return ApiVerifyUserRegistrationRequest +*/ +func (a *MultiFactorAuthenticationApiService) VerifyUserRegistration(ctx context.Context, userId int32, registrationId string) ApiVerifyUserRegistrationRequest { + return ApiVerifyUserRegistrationRequest{ + ApiService: a, + ctx: ctx, + userId: userId, + registrationId: registrationId, + } +} + +// Execute executes the request +// @return VerifyUserRegistration200Response +func (a *MultiFactorAuthenticationApiService) VerifyUserRegistrationExecute(r ApiVerifyUserRegistrationRequest) (*VerifyUserRegistration200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *VerifyUserRegistration200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MultiFactorAuthenticationApiService.VerifyUserRegistration") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/mfa/users/{user_id}/registrations/{registration_id}" + localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"registration_id"+"}", url.PathEscape(parameterValueToString(r.registrationId, "registrationId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.contentType != nil { + parameterAddToQuery(localVarQueryParams, "Content-Type", r.contentType, "") + } + // body params + localVarPostBody = r.verifyUserRegistrationRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiVerifyUserVerificationRequest struct { + ctx context.Context + ApiService *MultiFactorAuthenticationApiService + userId int32 + verificationId string + contentType *string + verifyUserVerificationRequest *VerifyUserVerificationRequest +} + +func (r ApiVerifyUserVerificationRequest) ContentType(contentType string) ApiVerifyUserVerificationRequest { + r.contentType = &contentType + return r +} + +func (r ApiVerifyUserVerificationRequest) VerifyUserVerificationRequest(verifyUserVerificationRequest VerifyUserVerificationRequest) ApiVerifyUserVerificationRequest { + r.verifyUserVerificationRequest = &verifyUserVerificationRequest + return r +} + +func (r ApiVerifyUserVerificationRequest) Execute() (*Error, *http.Response, error) { + return r.ApiService.VerifyUserVerificationExecute(r) +} + +/* +VerifyUserVerification Verify User Verification + +Submit an otp for verification. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param userId Set to the id of the user that you want to return. + @param verificationId The verification_id is returned on activation of the factor or you can get the device_id using the Activate Factor API call. + @return ApiVerifyUserVerificationRequest +*/ +func (a *MultiFactorAuthenticationApiService) VerifyUserVerification(ctx context.Context, userId int32, verificationId string) ApiVerifyUserVerificationRequest { + return ApiVerifyUserVerificationRequest{ + ApiService: a, + ctx: ctx, + userId: userId, + verificationId: verificationId, + } +} + +// Execute executes the request +// @return Error +func (a *MultiFactorAuthenticationApiService) VerifyUserVerificationExecute(r ApiVerifyUserVerificationRequest) (*Error, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Error + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MultiFactorAuthenticationApiService.VerifyUserVerification") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/mfa/users/{user_id}/verifications/{verification_id}" + localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"verification_id"+"}", url.PathEscape(parameterValueToString(r.verificationId, "verificationId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.contentType != nil { + parameterAddToQuery(localVarQueryParams, "Content-Type", r.contentType, "") + } + // body params + localVarPostBody = r.verifyUserVerificationRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/api_multi_factor_authentication_v1.go b/api_multi_factor_authentication_v1.go new file mode 100644 index 0000000..d123f35 --- /dev/null +++ b/api_multi_factor_authentication_v1.go @@ -0,0 +1,915 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "bytes" + "context" + "io/ioutil" + "net/http" + "net/url" + "strings" +) + + +// MultiFactorAuthenticationV1ApiService MultiFactorAuthenticationV1Api service +type MultiFactorAuthenticationV1ApiService service + +type ApiActivateMfaFactorsRequest struct { + ctx context.Context + ApiService *MultiFactorAuthenticationV1ApiService + userId int32 + deviceId string + activateMfaFactorsRequest *ActivateMfaFactorsRequest +} + +func (r ApiActivateMfaFactorsRequest) ActivateMfaFactorsRequest(activateMfaFactorsRequest ActivateMfaFactorsRequest) ApiActivateMfaFactorsRequest { + r.activateMfaFactorsRequest = &activateMfaFactorsRequest + return r +} + +func (r ApiActivateMfaFactorsRequest) Execute() (*GetEnrolledFactors200Response, *http.Response, error) { + return r.ApiService.ActivateMfaFactorsExecute(r) +} + +/* +ActivateMfaFactors Activate a Factor + +Activate a Factor + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param userId Set to the id of the user that you want to return. + @param deviceId + @return ApiActivateMfaFactorsRequest +*/ +func (a *MultiFactorAuthenticationV1ApiService) ActivateMfaFactors(ctx context.Context, userId int32, deviceId string) ApiActivateMfaFactorsRequest { + return ApiActivateMfaFactorsRequest{ + ApiService: a, + ctx: ctx, + userId: userId, + deviceId: deviceId, + } +} + +// Execute executes the request +// @return GetEnrolledFactors200Response +func (a *MultiFactorAuthenticationV1ApiService) ActivateMfaFactorsExecute(r ApiActivateMfaFactorsRequest) (*GetEnrolledFactors200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GetEnrolledFactors200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MultiFactorAuthenticationV1ApiService.ActivateMfaFactors") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/1/users/{user_id}/otp_devices/{device_id}/trigger" + localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"device_id"+"}", url.PathEscape(parameterValueToString(r.deviceId, "deviceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.activateMfaFactorsRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiEnrollMfaFactorRequest struct { + ctx context.Context + ApiService *MultiFactorAuthenticationV1ApiService + userId int32 + otpDevice *OtpDevice +} + +func (r ApiEnrollMfaFactorRequest) OtpDevice(otpDevice OtpDevice) ApiEnrollMfaFactorRequest { + r.otpDevice = &otpDevice + return r +} + +func (r ApiEnrollMfaFactorRequest) Execute() (*EnrollMfaFactor200Response, *http.Response, error) { + return r.ApiService.EnrollMfaFactorExecute(r) +} + +/* +EnrollMfaFactor Enroll a Factor + + Enroll an Authentication Factor + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param userId Set to the id of the user that you want to return. + @return ApiEnrollMfaFactorRequest +*/ +func (a *MultiFactorAuthenticationV1ApiService) EnrollMfaFactor(ctx context.Context, userId int32) ApiEnrollMfaFactorRequest { + return ApiEnrollMfaFactorRequest{ + ApiService: a, + ctx: ctx, + userId: userId, + } +} + +// Execute executes the request +// @return EnrollMfaFactor200Response +func (a *MultiFactorAuthenticationV1ApiService) EnrollMfaFactorExecute(r ApiEnrollMfaFactorRequest) (*EnrollMfaFactor200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *EnrollMfaFactor200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MultiFactorAuthenticationV1ApiService.EnrollMfaFactor") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/1/users/{user_id}/otp_devices" + localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.otpDevice + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGenerateMFAtokenRequest struct { + ctx context.Context + ApiService *MultiFactorAuthenticationV1ApiService + userId int32 + generateMFAtokenRequest *GenerateMFAtokenRequest +} + +func (r ApiGenerateMFAtokenRequest) GenerateMFAtokenRequest(generateMFAtokenRequest GenerateMFAtokenRequest) ApiGenerateMFAtokenRequest { + r.generateMFAtokenRequest = &generateMFAtokenRequest + return r +} + +func (r ApiGenerateMFAtokenRequest) Execute() (*GenerateMFAtoken200Response, *http.Response, error) { + return r.ApiService.GenerateMFAtokenExecute(r) +} + +/* +GenerateMFAtoken Generate Temp MFA Token + +Generate MFA Token + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param userId Set to the id of the user that you want to return. + @return ApiGenerateMFAtokenRequest +*/ +func (a *MultiFactorAuthenticationV1ApiService) GenerateMFAtoken(ctx context.Context, userId int32) ApiGenerateMFAtokenRequest { + return ApiGenerateMFAtokenRequest{ + ApiService: a, + ctx: ctx, + userId: userId, + } +} + +// Execute executes the request +// @return GenerateMFAtoken200Response +func (a *MultiFactorAuthenticationV1ApiService) GenerateMFAtokenExecute(r ApiGenerateMFAtokenRequest) (*GenerateMFAtoken200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GenerateMFAtoken200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MultiFactorAuthenticationV1ApiService.GenerateMFAtoken") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/1/users/{user_id}/mfa_token" + localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.generateMFAtokenRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetEnrolledFactorsRequest struct { + ctx context.Context + ApiService *MultiFactorAuthenticationV1ApiService + userId int32 +} + +func (r ApiGetEnrolledFactorsRequest) Execute() (*GetEnrolledFactors200Response, *http.Response, error) { + return r.ApiService.GetEnrolledFactorsExecute(r) +} + +/* +GetEnrolledFactors Get Enrolled Factors + +Get Enrolled Factors + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param userId Set to the id of the user that you want to return. + @return ApiGetEnrolledFactorsRequest +*/ +func (a *MultiFactorAuthenticationV1ApiService) GetEnrolledFactors(ctx context.Context, userId int32) ApiGetEnrolledFactorsRequest { + return ApiGetEnrolledFactorsRequest{ + ApiService: a, + ctx: ctx, + userId: userId, + } +} + +// Execute executes the request +// @return GetEnrolledFactors200Response +func (a *MultiFactorAuthenticationV1ApiService) GetEnrolledFactorsExecute(r ApiGetEnrolledFactorsRequest) (*GetEnrolledFactors200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GetEnrolledFactors200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MultiFactorAuthenticationV1ApiService.GetEnrolledFactors") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/1/users/{user_id}/otp_devices" + localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetMFAFactorsRequest struct { + ctx context.Context + ApiService *MultiFactorAuthenticationV1ApiService + userId int32 +} + +func (r ApiGetMFAFactorsRequest) Execute() (*GetMFAFactors200Response, *http.Response, error) { + return r.ApiService.GetMFAFactorsExecute(r) +} + +/* +GetMFAFactors Get Available Factors + +Get MFA Factors + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param userId Set to the id of the user that you want to return. + @return ApiGetMFAFactorsRequest +*/ +func (a *MultiFactorAuthenticationV1ApiService) GetMFAFactors(ctx context.Context, userId int32) ApiGetMFAFactorsRequest { + return ApiGetMFAFactorsRequest{ + ApiService: a, + ctx: ctx, + userId: userId, + } +} + +// Execute executes the request +// @return GetMFAFactors200Response +func (a *MultiFactorAuthenticationV1ApiService) GetMFAFactorsExecute(r ApiGetMFAFactorsRequest) (*GetMFAFactors200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GetMFAFactors200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MultiFactorAuthenticationV1ApiService.GetMFAFactors") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/1/users/{user_id}/auth_factor" + localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRemoveMfaFactorsRequest struct { + ctx context.Context + ApiService *MultiFactorAuthenticationV1ApiService + userId int32 + deviceId string +} + +func (r ApiRemoveMfaFactorsRequest) Execute() (*http.Response, error) { + return r.ApiService.RemoveMfaFactorsExecute(r) +} + +/* +RemoveMfaFactors Remove an Enrolled Factor + +Remove an enrolled MFA device for a user + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param userId Set to the id of the user that you want to return. + @param deviceId + @return ApiRemoveMfaFactorsRequest +*/ +func (a *MultiFactorAuthenticationV1ApiService) RemoveMfaFactors(ctx context.Context, userId int32, deviceId string) ApiRemoveMfaFactorsRequest { + return ApiRemoveMfaFactorsRequest{ + ApiService: a, + ctx: ctx, + userId: userId, + deviceId: deviceId, + } +} + +// Execute executes the request +func (a *MultiFactorAuthenticationV1ApiService) RemoveMfaFactorsExecute(r ApiRemoveMfaFactorsRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MultiFactorAuthenticationV1ApiService.RemoveMfaFactors") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/1/users/{user_id}/otp_devices/{device_id}" + localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"device_id"+"}", url.PathEscape(parameterValueToString(r.deviceId, "deviceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiVerifyMfaFactorRequest struct { + ctx context.Context + ApiService *MultiFactorAuthenticationV1ApiService + userId int32 + deviceId string + verifyMfaFactorRequest *VerifyMfaFactorRequest +} + +func (r ApiVerifyMfaFactorRequest) VerifyMfaFactorRequest(verifyMfaFactorRequest VerifyMfaFactorRequest) ApiVerifyMfaFactorRequest { + r.verifyMfaFactorRequest = &verifyMfaFactorRequest + return r +} + +func (r ApiVerifyMfaFactorRequest) Execute() (*Error, *http.Response, error) { + return r.ApiService.VerifyMfaFactorExecute(r) +} + +/* +VerifyMfaFactor Verify a Factor + +Verify a Factor + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param userId Set to the id of the user that you want to return. + @param deviceId + @return ApiVerifyMfaFactorRequest +*/ +func (a *MultiFactorAuthenticationV1ApiService) VerifyMfaFactor(ctx context.Context, userId int32, deviceId string) ApiVerifyMfaFactorRequest { + return ApiVerifyMfaFactorRequest{ + ApiService: a, + ctx: ctx, + userId: userId, + deviceId: deviceId, + } +} + +// Execute executes the request +// @return Error +func (a *MultiFactorAuthenticationV1ApiService) VerifyMfaFactorExecute(r ApiVerifyMfaFactorRequest) (*Error, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Error + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MultiFactorAuthenticationV1ApiService.VerifyMfaFactor") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/1/users/{user_id}/otp_devices/{device_id}/verify" + localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"device_id"+"}", url.PathEscape(parameterValueToString(r.deviceId, "deviceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.verifyMfaFactorRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/api_o_auth2.go b/api_o_auth2.go new file mode 100644 index 0000000..eee3a68 --- /dev/null +++ b/api_o_auth2.go @@ -0,0 +1,454 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "bytes" + "context" + "io/ioutil" + "net/http" + "net/url" +) + + +// OAuth2ApiService OAuth2Api service +type OAuth2ApiService service + +type ApiGenerateTokenRequest struct { + ctx context.Context + ApiService *OAuth2ApiService + generateTokenRequest *GenerateTokenRequest + contentType *string +} + +// Request Body to Generate OAuth Token +func (r ApiGenerateTokenRequest) GenerateTokenRequest(generateTokenRequest GenerateTokenRequest) ApiGenerateTokenRequest { + r.generateTokenRequest = &generateTokenRequest + return r +} + +func (r ApiGenerateTokenRequest) ContentType(contentType string) ApiGenerateTokenRequest { + r.contentType = &contentType + return r +} + +func (r ApiGenerateTokenRequest) Execute() (*OauthToken, *http.Response, error) { + return r.ApiService.GenerateTokenExecute(r) +} + +/* +GenerateToken Generate Token + +Generate Token + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGenerateTokenRequest +*/ +func (a *OAuth2ApiService) GenerateToken(ctx context.Context) ApiGenerateTokenRequest { + return ApiGenerateTokenRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return OauthToken +func (a *OAuth2ApiService) GenerateTokenExecute(r ApiGenerateTokenRequest) (*OauthToken, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *OauthToken + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OAuth2ApiService.GenerateToken") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/auth/oauth2/v2/token" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.generateTokenRequest == nil { + return localVarReturnValue, nil, reportError("generateTokenRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.contentType != nil { + parameterAddToQuery(localVarQueryParams, "Content-Type", r.contentType, "") + } + // body params + localVarPostBody = r.generateTokenRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetRateLimitRequest struct { + ctx context.Context + ApiService *OAuth2ApiService +} + +func (r ApiGetRateLimitRequest) Execute() (*GetRateLimit200Response, *http.Response, error) { + return r.ApiService.GetRateLimitExecute(r) +} + +/* +GetRateLimit Get Rate Limit + +Get Rate Limit + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetRateLimitRequest +*/ +func (a *OAuth2ApiService) GetRateLimit(ctx context.Context) ApiGetRateLimitRequest { + return ApiGetRateLimitRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return GetRateLimit200Response +func (a *OAuth2ApiService) GetRateLimitExecute(r ApiGetRateLimitRequest) (*GetRateLimit200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GetRateLimit200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OAuth2ApiService.GetRateLimit") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/auth/rate_limit" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRevokeTokensRequest struct { + ctx context.Context + ApiService *OAuth2ApiService + contentType *string + revokeTokensRequest *RevokeTokensRequest +} + +func (r ApiRevokeTokensRequest) ContentType(contentType string) ApiRevokeTokensRequest { + r.contentType = &contentType + return r +} + +func (r ApiRevokeTokensRequest) RevokeTokensRequest(revokeTokensRequest RevokeTokensRequest) ApiRevokeTokensRequest { + r.revokeTokensRequest = &revokeTokensRequest + return r +} + +func (r ApiRevokeTokensRequest) Execute() (*Error, *http.Response, error) { + return r.ApiService.RevokeTokensExecute(r) +} + +/* +RevokeTokens Revoke Tokens + +Revoke Tokens + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiRevokeTokensRequest +*/ +func (a *OAuth2ApiService) RevokeTokens(ctx context.Context) ApiRevokeTokensRequest { + return ApiRevokeTokensRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return Error +func (a *OAuth2ApiService) RevokeTokensExecute(r ApiRevokeTokensRequest) (*Error, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Error + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OAuth2ApiService.RevokeTokens") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/auth/oauth2/revoke" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.contentType != nil { + parameterAddToQuery(localVarQueryParams, "Content-Type", r.contentType, "") + } + // body params + localVarPostBody = r.revokeTokensRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/api_privileges.go b/api_privileges.go new file mode 100644 index 0000000..6dcf7f7 --- /dev/null +++ b/api_privileges.go @@ -0,0 +1,1376 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "bytes" + "context" + "io/ioutil" + "net/http" + "net/url" + "strings" +) + + +// PrivilegesApiService PrivilegesApi service +type PrivilegesApiService service + +type ApiAddPrivilegeToRoleRequest struct { + ctx context.Context + ApiService *PrivilegesApiService + privilegeId string + addPrivilegeToRoleRequest *AddPrivilegeToRoleRequest +} + +func (r ApiAddPrivilegeToRoleRequest) AddPrivilegeToRoleRequest(addPrivilegeToRoleRequest AddPrivilegeToRoleRequest) ApiAddPrivilegeToRoleRequest { + r.addPrivilegeToRoleRequest = &addPrivilegeToRoleRequest + return r +} + +func (r ApiAddPrivilegeToRoleRequest) Execute() (*AddPrivilegeToRole201Response, *http.Response, error) { + return r.ApiService.AddPrivilegeToRoleExecute(r) +} + +/* +AddPrivilegeToRole Assign a Privilege to Roles + +Add roles to privilege + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param privilegeId + @return ApiAddPrivilegeToRoleRequest +*/ +func (a *PrivilegesApiService) AddPrivilegeToRole(ctx context.Context, privilegeId string) ApiAddPrivilegeToRoleRequest { + return ApiAddPrivilegeToRoleRequest{ + ApiService: a, + ctx: ctx, + privilegeId: privilegeId, + } +} + +// Execute executes the request +// @return AddPrivilegeToRole201Response +func (a *PrivilegesApiService) AddPrivilegeToRoleExecute(r ApiAddPrivilegeToRoleRequest) (*AddPrivilegeToRole201Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AddPrivilegeToRole201Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PrivilegesApiService.AddPrivilegeToRole") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/1/privileges/{privilege_id}/roles" + localVarPath = strings.Replace(localVarPath, "{"+"privilege_id"+"}", url.PathEscape(parameterValueToString(r.privilegeId, "privilegeId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.addPrivilegeToRoleRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiAssignUsersToPrivilegeRequest struct { + ctx context.Context + ApiService *PrivilegesApiService + privilegeId string + assignUsersToPrivilegeRequest *AssignUsersToPrivilegeRequest +} + +func (r ApiAssignUsersToPrivilegeRequest) AssignUsersToPrivilegeRequest(assignUsersToPrivilegeRequest AssignUsersToPrivilegeRequest) ApiAssignUsersToPrivilegeRequest { + r.assignUsersToPrivilegeRequest = &assignUsersToPrivilegeRequest + return r +} + +func (r ApiAssignUsersToPrivilegeRequest) Execute() (*AddPrivilegeToRole201Response, *http.Response, error) { + return r.ApiService.AssignUsersToPrivilegeExecute(r) +} + +/* +AssignUsersToPrivilege Assign Users to a Privilege + +Assign Users to Privilege + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param privilegeId + @return ApiAssignUsersToPrivilegeRequest +*/ +func (a *PrivilegesApiService) AssignUsersToPrivilege(ctx context.Context, privilegeId string) ApiAssignUsersToPrivilegeRequest { + return ApiAssignUsersToPrivilegeRequest{ + ApiService: a, + ctx: ctx, + privilegeId: privilegeId, + } +} + +// Execute executes the request +// @return AddPrivilegeToRole201Response +func (a *PrivilegesApiService) AssignUsersToPrivilegeExecute(r ApiAssignUsersToPrivilegeRequest) (*AddPrivilegeToRole201Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *AddPrivilegeToRole201Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PrivilegesApiService.AssignUsersToPrivilege") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/1/privileges/{privilege_id}/users" + localVarPath = strings.Replace(localVarPath, "{"+"privilege_id"+"}", url.PathEscape(parameterValueToString(r.privilegeId, "privilegeId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.assignUsersToPrivilegeRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiCreatePrivilegeRequest struct { + ctx context.Context + ApiService *PrivilegesApiService + privilege *Privilege +} + +func (r ApiCreatePrivilegeRequest) Privilege(privilege Privilege) ApiCreatePrivilegeRequest { + r.privilege = &privilege + return r +} + +func (r ApiCreatePrivilegeRequest) Execute() (*CreatePrivilege200Response, *http.Response, error) { + return r.ApiService.CreatePrivilegeExecute(r) +} + +/* +CreatePrivilege Create a Privilege + +Create privilege + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreatePrivilegeRequest +*/ +func (a *PrivilegesApiService) CreatePrivilege(ctx context.Context) ApiCreatePrivilegeRequest { + return ApiCreatePrivilegeRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return CreatePrivilege200Response +func (a *PrivilegesApiService) CreatePrivilegeExecute(r ApiCreatePrivilegeRequest) (*CreatePrivilege200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreatePrivilege200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PrivilegesApiService.CreatePrivilege") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/1/privileges" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.privilege + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeletePrivilegeRequest struct { + ctx context.Context + ApiService *PrivilegesApiService + privilegeId string +} + +func (r ApiDeletePrivilegeRequest) Execute() (*http.Response, error) { + return r.ApiService.DeletePrivilegeExecute(r) +} + +/* +DeletePrivilege Delete a Privilege + +Delete + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param privilegeId + @return ApiDeletePrivilegeRequest +*/ +func (a *PrivilegesApiService) DeletePrivilege(ctx context.Context, privilegeId string) ApiDeletePrivilegeRequest { + return ApiDeletePrivilegeRequest{ + ApiService: a, + ctx: ctx, + privilegeId: privilegeId, + } +} + +// Execute executes the request +func (a *PrivilegesApiService) DeletePrivilegeExecute(r ApiDeletePrivilegeRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PrivilegesApiService.DeletePrivilege") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/1/privileges/{privilege_id}" + localVarPath = strings.Replace(localVarPath, "{"+"privilege_id"+"}", url.PathEscape(parameterValueToString(r.privilegeId, "privilegeId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiDeleteRoleFromPrivilegeRequest struct { + ctx context.Context + ApiService *PrivilegesApiService + privilegeId string + roleId string +} + +func (r ApiDeleteRoleFromPrivilegeRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteRoleFromPrivilegeExecute(r) +} + +/* +DeleteRoleFromPrivilege Remove a Privilege from a Role + +Add roles to privilege + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param privilegeId + @param roleId Set to the id of the role you want to return. + @return ApiDeleteRoleFromPrivilegeRequest +*/ +func (a *PrivilegesApiService) DeleteRoleFromPrivilege(ctx context.Context, privilegeId string, roleId string) ApiDeleteRoleFromPrivilegeRequest { + return ApiDeleteRoleFromPrivilegeRequest{ + ApiService: a, + ctx: ctx, + privilegeId: privilegeId, + roleId: roleId, + } +} + +// Execute executes the request +func (a *PrivilegesApiService) DeleteRoleFromPrivilegeExecute(r ApiDeleteRoleFromPrivilegeRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PrivilegesApiService.DeleteRoleFromPrivilege") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/1/privileges/{privilege_id}/roles/{role_id}" + localVarPath = strings.Replace(localVarPath, "{"+"privilege_id"+"}", url.PathEscape(parameterValueToString(r.privilegeId, "privilegeId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"role_id"+"}", url.PathEscape(parameterValueToString(r.roleId, "roleId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiGetAssignedUserRequest struct { + ctx context.Context + ApiService *PrivilegesApiService + privilegeId string +} + +func (r ApiGetAssignedUserRequest) Execute() (*GetAssignedUser200Response, *http.Response, error) { + return r.ApiService.GetAssignedUserExecute(r) +} + +/* +GetAssignedUser Get Users assigned to a Privilege + +Get Assigned Users + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param privilegeId + @return ApiGetAssignedUserRequest +*/ +func (a *PrivilegesApiService) GetAssignedUser(ctx context.Context, privilegeId string) ApiGetAssignedUserRequest { + return ApiGetAssignedUserRequest{ + ApiService: a, + ctx: ctx, + privilegeId: privilegeId, + } +} + +// Execute executes the request +// @return GetAssignedUser200Response +func (a *PrivilegesApiService) GetAssignedUserExecute(r ApiGetAssignedUserRequest) (*GetAssignedUser200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GetAssignedUser200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PrivilegesApiService.GetAssignedUser") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/1/privileges/{privilege_id}/users" + localVarPath = strings.Replace(localVarPath, "{"+"privilege_id"+"}", url.PathEscape(parameterValueToString(r.privilegeId, "privilegeId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetPrivilegeRequest struct { + ctx context.Context + ApiService *PrivilegesApiService + privilegeId string +} + +func (r ApiGetPrivilegeRequest) Execute() (*Privilege, *http.Response, error) { + return r.ApiService.GetPrivilegeExecute(r) +} + +/* +GetPrivilege Get a Privilege + +Get a Privilige + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param privilegeId + @return ApiGetPrivilegeRequest +*/ +func (a *PrivilegesApiService) GetPrivilege(ctx context.Context, privilegeId string) ApiGetPrivilegeRequest { + return ApiGetPrivilegeRequest{ + ApiService: a, + ctx: ctx, + privilegeId: privilegeId, + } +} + +// Execute executes the request +// @return Privilege +func (a *PrivilegesApiService) GetPrivilegeExecute(r ApiGetPrivilegeRequest) (*Privilege, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Privilege + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PrivilegesApiService.GetPrivilege") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/1/privileges/{privilege_id}" + localVarPath = strings.Replace(localVarPath, "{"+"privilege_id"+"}", url.PathEscape(parameterValueToString(r.privilegeId, "privilegeId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListPrivelegeRolesRequest struct { + ctx context.Context + ApiService *PrivilegesApiService + privilegeId string +} + +func (r ApiListPrivelegeRolesRequest) Execute() (*ListPrivelegeRoles200Response, *http.Response, error) { + return r.ApiService.ListPrivelegeRolesExecute(r) +} + +/* +ListPrivelegeRoles Get Roles assigned to Privilege + +List roles for privilege + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param privilegeId + @return ApiListPrivelegeRolesRequest +*/ +func (a *PrivilegesApiService) ListPrivelegeRoles(ctx context.Context, privilegeId string) ApiListPrivelegeRolesRequest { + return ApiListPrivelegeRolesRequest{ + ApiService: a, + ctx: ctx, + privilegeId: privilegeId, + } +} + +// Execute executes the request +// @return ListPrivelegeRoles200Response +func (a *PrivilegesApiService) ListPrivelegeRolesExecute(r ApiListPrivelegeRolesRequest) (*ListPrivelegeRoles200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListPrivelegeRoles200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PrivilegesApiService.ListPrivelegeRoles") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/1/privileges/{privilege_id}/roles" + localVarPath = strings.Replace(localVarPath, "{"+"privilege_id"+"}", url.PathEscape(parameterValueToString(r.privilegeId, "privilegeId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListPrivelegesRequest struct { + ctx context.Context + ApiService *PrivilegesApiService +} + +func (r ApiListPrivelegesRequest) Execute() ([]Privilege, *http.Response, error) { + return r.ApiService.ListPrivelegesExecute(r) +} + +/* +ListPriveleges List Privileges + +List Privileges + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListPrivelegesRequest +*/ +func (a *PrivilegesApiService) ListPriveleges(ctx context.Context) ApiListPrivelegesRequest { + return ApiListPrivelegesRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return []Privilege +func (a *PrivilegesApiService) ListPrivelegesExecute(r ApiListPrivelegesRequest) ([]Privilege, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []Privilege + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PrivilegesApiService.ListPriveleges") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/1/privileges" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRemoveUserFromPrivilegeRequest struct { + ctx context.Context + ApiService *PrivilegesApiService + privilegeId string + userId int32 +} + +func (r ApiRemoveUserFromPrivilegeRequest) Execute() (*http.Response, error) { + return r.ApiService.RemoveUserFromPrivilegeExecute(r) +} + +/* +RemoveUserFromPrivilege Remove a Privilege from Users + +Remove a Privilege from Users + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param privilegeId + @param userId Set to the id of the user that you want to return. + @return ApiRemoveUserFromPrivilegeRequest +*/ +func (a *PrivilegesApiService) RemoveUserFromPrivilege(ctx context.Context, privilegeId string, userId int32) ApiRemoveUserFromPrivilegeRequest { + return ApiRemoveUserFromPrivilegeRequest{ + ApiService: a, + ctx: ctx, + privilegeId: privilegeId, + userId: userId, + } +} + +// Execute executes the request +func (a *PrivilegesApiService) RemoveUserFromPrivilegeExecute(r ApiRemoveUserFromPrivilegeRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PrivilegesApiService.RemoveUserFromPrivilege") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/1/privileges/{privilege_id}/users/{user_id}" + localVarPath = strings.Replace(localVarPath, "{"+"privilege_id"+"}", url.PathEscape(parameterValueToString(r.privilegeId, "privilegeId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiUpdatePrivilegeRequest struct { + ctx context.Context + ApiService *PrivilegesApiService + privilegeId string + privilege *Privilege +} + +func (r ApiUpdatePrivilegeRequest) Privilege(privilege Privilege) ApiUpdatePrivilegeRequest { + r.privilege = &privilege + return r +} + +func (r ApiUpdatePrivilegeRequest) Execute() (*UpdatePrivilege200Response, *http.Response, error) { + return r.ApiService.UpdatePrivilegeExecute(r) +} + +/* +UpdatePrivilege Update a Privilege + +Update privilege + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param privilegeId + @return ApiUpdatePrivilegeRequest +*/ +func (a *PrivilegesApiService) UpdatePrivilege(ctx context.Context, privilegeId string) ApiUpdatePrivilegeRequest { + return ApiUpdatePrivilegeRequest{ + ApiService: a, + ctx: ctx, + privilegeId: privilegeId, + } +} + +// Execute executes the request +// @return UpdatePrivilege200Response +func (a *PrivilegesApiService) UpdatePrivilegeExecute(r ApiUpdatePrivilegeRequest) (*UpdatePrivilege200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *UpdatePrivilege200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PrivilegesApiService.UpdatePrivilege") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/1/privileges/{privilege_id}" + localVarPath = strings.Replace(localVarPath, "{"+"privilege_id"+"}", url.PathEscape(parameterValueToString(r.privilegeId, "privilegeId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.privilege + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/api_roles.go b/api_roles.go new file mode 100644 index 0000000..46b6331 --- /dev/null +++ b/api_roles.go @@ -0,0 +1,2129 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "bytes" + "context" + "io/ioutil" + "net/http" + "net/url" + "strings" +) + + +// RolesApiService RolesApi service +type RolesApiService service + +type ApiAddRoleAdminsRequest struct { + ctx context.Context + ApiService *RolesApiService + roleId string + requestBody *[]int32 +} + +func (r ApiAddRoleAdminsRequest) RequestBody(requestBody []int32) ApiAddRoleAdminsRequest { + r.requestBody = &requestBody + return r +} + +func (r ApiAddRoleAdminsRequest) Execute() ([]CreateRole201ResponseInner, *http.Response, error) { + return r.ApiService.AddRoleAdminsExecute(r) +} + +/* +AddRoleAdmins Add Role Admins + +Add Role Admins + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param roleId Set to the id of the role you want to return. + @return ApiAddRoleAdminsRequest +*/ +func (a *RolesApiService) AddRoleAdmins(ctx context.Context, roleId string) ApiAddRoleAdminsRequest { + return ApiAddRoleAdminsRequest{ + ApiService: a, + ctx: ctx, + roleId: roleId, + } +} + +// Execute executes the request +// @return []CreateRole201ResponseInner +func (a *RolesApiService) AddRoleAdminsExecute(r ApiAddRoleAdminsRequest) ([]CreateRole201ResponseInner, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []CreateRole201ResponseInner + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RolesApiService.AddRoleAdmins") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/roles/{role_id}/admins" + localVarPath = strings.Replace(localVarPath, "{"+"role_id"+"}", url.PathEscape(parameterValueToString(r.roleId, "roleId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.requestBody == nil { + return localVarReturnValue, nil, reportError("requestBody is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.requestBody + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiAddRoleUsersRequest struct { + ctx context.Context + ApiService *RolesApiService + roleId string + requestBody *[]int32 +} + +func (r ApiAddRoleUsersRequest) RequestBody(requestBody []int32) ApiAddRoleUsersRequest { + r.requestBody = &requestBody + return r +} + +func (r ApiAddRoleUsersRequest) Execute() ([]CreateRole201ResponseInner, *http.Response, error) { + return r.ApiService.AddRoleUsersExecute(r) +} + +/* +AddRoleUsers Add Role Users + +Add Role Users + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param roleId Set to the id of the role you want to return. + @return ApiAddRoleUsersRequest +*/ +func (a *RolesApiService) AddRoleUsers(ctx context.Context, roleId string) ApiAddRoleUsersRequest { + return ApiAddRoleUsersRequest{ + ApiService: a, + ctx: ctx, + roleId: roleId, + } +} + +// Execute executes the request +// @return []CreateRole201ResponseInner +func (a *RolesApiService) AddRoleUsersExecute(r ApiAddRoleUsersRequest) ([]CreateRole201ResponseInner, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []CreateRole201ResponseInner + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RolesApiService.AddRoleUsers") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/roles/{role_id}/users" + localVarPath = strings.Replace(localVarPath, "{"+"role_id"+"}", url.PathEscape(parameterValueToString(r.roleId, "roleId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.requestBody == nil { + return localVarReturnValue, nil, reportError("requestBody is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.requestBody + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiCreateRoleRequest struct { + ctx context.Context + ApiService *RolesApiService + role *Role +} + +func (r ApiCreateRoleRequest) Role(role Role) ApiCreateRoleRequest { + r.role = &role + return r +} + +func (r ApiCreateRoleRequest) Execute() ([]CreateRole201ResponseInner, *http.Response, error) { + return r.ApiService.CreateRoleExecute(r) +} + +/* +CreateRole Create Role + +Create Role + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateRoleRequest +*/ +func (a *RolesApiService) CreateRole(ctx context.Context) ApiCreateRoleRequest { + return ApiCreateRoleRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return []CreateRole201ResponseInner +func (a *RolesApiService) CreateRoleExecute(r ApiCreateRoleRequest) ([]CreateRole201ResponseInner, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []CreateRole201ResponseInner + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RolesApiService.CreateRole") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/roles" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.role + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteRoleRequest struct { + ctx context.Context + ApiService *RolesApiService + roleId string +} + +func (r ApiDeleteRoleRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteRoleExecute(r) +} + +/* +DeleteRole Delete Role by ID + +Delete Role + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param roleId Set to the id of the role you want to return. + @return ApiDeleteRoleRequest +*/ +func (a *RolesApiService) DeleteRole(ctx context.Context, roleId string) ApiDeleteRoleRequest { + return ApiDeleteRoleRequest{ + ApiService: a, + ctx: ctx, + roleId: roleId, + } +} + +// Execute executes the request +func (a *RolesApiService) DeleteRoleExecute(r ApiDeleteRoleRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RolesApiService.DeleteRole") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/roles/{role_id}" + localVarPath = strings.Replace(localVarPath, "{"+"role_id"+"}", url.PathEscape(parameterValueToString(r.roleId, "roleId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiGetRoleRequest struct { + ctx context.Context + ApiService *RolesApiService + roleId string +} + +func (r ApiGetRoleRequest) Execute() (*Role, *http.Response, error) { + return r.ApiService.GetRoleExecute(r) +} + +/* +GetRole Get Role by ID + +Get Role + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param roleId Set to the id of the role you want to return. + @return ApiGetRoleRequest +*/ +func (a *RolesApiService) GetRole(ctx context.Context, roleId string) ApiGetRoleRequest { + return ApiGetRoleRequest{ + ApiService: a, + ctx: ctx, + roleId: roleId, + } +} + +// Execute executes the request +// @return Role +func (a *RolesApiService) GetRoleExecute(r ApiGetRoleRequest) (*Role, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Role + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RolesApiService.GetRole") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/roles/{role_id}" + localVarPath = strings.Replace(localVarPath, "{"+"role_id"+"}", url.PathEscape(parameterValueToString(r.roleId, "roleId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetRoleAdminsRequest struct { + ctx context.Context + ApiService *RolesApiService + roleId string + limit *int32 + page *int32 + cursor *string + name *string + includeUnassigned *bool +} + +// How many items to return at one time (max 100) +func (r ApiGetRoleAdminsRequest) Limit(limit int32) ApiGetRoleAdminsRequest { + r.limit = &limit + return r +} + +// The page number of results to return. +func (r ApiGetRoleAdminsRequest) Page(page int32) ApiGetRoleAdminsRequest { + r.page = &page + return r +} + +// Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. +func (r ApiGetRoleAdminsRequest) Cursor(cursor string) ApiGetRoleAdminsRequest { + r.cursor = &cursor + return r +} + +// Allows you to filter on first name, last name, username, and email address. +func (r ApiGetRoleAdminsRequest) Name(name string) ApiGetRoleAdminsRequest { + r.name = &name + return r +} + +// Optional. Defaults to false. Include users that aren’t assigned to the role. +func (r ApiGetRoleAdminsRequest) IncludeUnassigned(includeUnassigned bool) ApiGetRoleAdminsRequest { + r.includeUnassigned = &includeUnassigned + return r +} + +func (r ApiGetRoleAdminsRequest) Execute() ([]User, *http.Response, error) { + return r.ApiService.GetRoleAdminsExecute(r) +} + +/* +GetRoleAdmins Get Role Admins + +Get Role Admins + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param roleId Set to the id of the role you want to return. + @return ApiGetRoleAdminsRequest +*/ +func (a *RolesApiService) GetRoleAdmins(ctx context.Context, roleId string) ApiGetRoleAdminsRequest { + return ApiGetRoleAdminsRequest{ + ApiService: a, + ctx: ctx, + roleId: roleId, + } +} + +// Execute executes the request +// @return []User +func (a *RolesApiService) GetRoleAdminsExecute(r ApiGetRoleAdminsRequest) ([]User, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []User + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RolesApiService.GetRoleAdmins") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/roles/{role_id}/admins" + localVarPath = strings.Replace(localVarPath, "{"+"role_id"+"}", url.PathEscape(parameterValueToString(r.roleId, "roleId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.limit != nil { + parameterAddToQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.page != nil { + parameterAddToQuery(localVarQueryParams, "page", r.page, "") + } + if r.cursor != nil { + parameterAddToQuery(localVarQueryParams, "cursor", r.cursor, "") + } + if r.name != nil { + parameterAddToQuery(localVarQueryParams, "name", r.name, "") + } + if r.includeUnassigned != nil { + parameterAddToQuery(localVarQueryParams, "include_unassigned", r.includeUnassigned, "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"applcation/json", "application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetRoleAppsRequest struct { + ctx context.Context + ApiService *RolesApiService + roleId string + limit *int32 + page *int32 + cursor *string + assigned *bool +} + +// How many items to return at one time (max 100) +func (r ApiGetRoleAppsRequest) Limit(limit int32) ApiGetRoleAppsRequest { + r.limit = &limit + return r +} + +// The page number of results to return. +func (r ApiGetRoleAppsRequest) Page(page int32) ApiGetRoleAppsRequest { + r.page = &page + return r +} + +// Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. +func (r ApiGetRoleAppsRequest) Cursor(cursor string) ApiGetRoleAppsRequest { + r.cursor = &cursor + return r +} + +// Optional. Defaults to true. Returns all apps not yet assigned to the role. +func (r ApiGetRoleAppsRequest) Assigned(assigned bool) ApiGetRoleAppsRequest { + r.assigned = &assigned + return r +} + +func (r ApiGetRoleAppsRequest) Execute() ([]GetRoleApps200ResponseInner, *http.Response, error) { + return r.ApiService.GetRoleAppsExecute(r) +} + +/* +GetRoleApps Get all Apps assigned to Role + +Get Role Apps + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param roleId Set to the id of the role you want to return. + @return ApiGetRoleAppsRequest +*/ +func (a *RolesApiService) GetRoleApps(ctx context.Context, roleId string) ApiGetRoleAppsRequest { + return ApiGetRoleAppsRequest{ + ApiService: a, + ctx: ctx, + roleId: roleId, + } +} + +// Execute executes the request +// @return []GetRoleApps200ResponseInner +func (a *RolesApiService) GetRoleAppsExecute(r ApiGetRoleAppsRequest) ([]GetRoleApps200ResponseInner, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []GetRoleApps200ResponseInner + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RolesApiService.GetRoleApps") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/roles/{role_id}/apps" + localVarPath = strings.Replace(localVarPath, "{"+"role_id"+"}", url.PathEscape(parameterValueToString(r.roleId, "roleId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.limit != nil { + parameterAddToQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.page != nil { + parameterAddToQuery(localVarQueryParams, "page", r.page, "") + } + if r.cursor != nil { + parameterAddToQuery(localVarQueryParams, "cursor", r.cursor, "") + } + if r.assigned != nil { + parameterAddToQuery(localVarQueryParams, "assigned", r.assigned, "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"applcation/json", "application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetRoleByIdRequest struct { + ctx context.Context + ApiService *RolesApiService + roleId string +} + +func (r ApiGetRoleByIdRequest) Execute() (*GetRoleById200Response, *http.Response, error) { + return r.ApiService.GetRoleByIdExecute(r) +} + +/* +GetRoleById Get Role by ID + +Get Role By ID + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param roleId Set to the id of the role you want to return. + @return ApiGetRoleByIdRequest +*/ +func (a *RolesApiService) GetRoleById(ctx context.Context, roleId string) ApiGetRoleByIdRequest { + return ApiGetRoleByIdRequest{ + ApiService: a, + ctx: ctx, + roleId: roleId, + } +} + +// Execute executes the request +// @return GetRoleById200Response +func (a *RolesApiService) GetRoleByIdExecute(r ApiGetRoleByIdRequest) (*GetRoleById200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GetRoleById200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RolesApiService.GetRoleById") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/1/roles/{role_id}" + localVarPath = strings.Replace(localVarPath, "{"+"role_id"+"}", url.PathEscape(parameterValueToString(r.roleId, "roleId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetRoleByNameRequest struct { + ctx context.Context + ApiService *RolesApiService + name *string +} + +func (r ApiGetRoleByNameRequest) Name(name string) ApiGetRoleByNameRequest { + r.name = &name + return r +} + +func (r ApiGetRoleByNameRequest) Execute() (*GetRoleByName200Response, *http.Response, error) { + return r.ApiService.GetRoleByNameExecute(r) +} + +/* +GetRoleByName Get Role by Name + +Get Role by Name + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetRoleByNameRequest +*/ +func (a *RolesApiService) GetRoleByName(ctx context.Context) ApiGetRoleByNameRequest { + return ApiGetRoleByNameRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return GetRoleByName200Response +func (a *RolesApiService) GetRoleByNameExecute(r ApiGetRoleByNameRequest) (*GetRoleByName200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GetRoleByName200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RolesApiService.GetRoleByName") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/1/roles" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.name != nil { + parameterAddToQuery(localVarQueryParams, "name", r.name, "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetRoleUsersRequest struct { + ctx context.Context + ApiService *RolesApiService + roleId string + limit *int32 + page *int32 + cursor *string + name *string + includeUnassigned *bool +} + +// How many items to return at one time (max 100) +func (r ApiGetRoleUsersRequest) Limit(limit int32) ApiGetRoleUsersRequest { + r.limit = &limit + return r +} + +// The page number of results to return. +func (r ApiGetRoleUsersRequest) Page(page int32) ApiGetRoleUsersRequest { + r.page = &page + return r +} + +// Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. +func (r ApiGetRoleUsersRequest) Cursor(cursor string) ApiGetRoleUsersRequest { + r.cursor = &cursor + return r +} + +// Allows you to filter on first name, last name, username, and email address. +func (r ApiGetRoleUsersRequest) Name(name string) ApiGetRoleUsersRequest { + r.name = &name + return r +} + +// Optional. Defaults to false. Include users that aren’t assigned to the role. +func (r ApiGetRoleUsersRequest) IncludeUnassigned(includeUnassigned bool) ApiGetRoleUsersRequest { + r.includeUnassigned = &includeUnassigned + return r +} + +func (r ApiGetRoleUsersRequest) Execute() ([]User, *http.Response, error) { + return r.ApiService.GetRoleUsersExecute(r) +} + +/* +GetRoleUsers Get Role Users + +Get Role Users + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param roleId Set to the id of the role you want to return. + @return ApiGetRoleUsersRequest +*/ +func (a *RolesApiService) GetRoleUsers(ctx context.Context, roleId string) ApiGetRoleUsersRequest { + return ApiGetRoleUsersRequest{ + ApiService: a, + ctx: ctx, + roleId: roleId, + } +} + +// Execute executes the request +// @return []User +func (a *RolesApiService) GetRoleUsersExecute(r ApiGetRoleUsersRequest) ([]User, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []User + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RolesApiService.GetRoleUsers") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/roles/{role_id}/users" + localVarPath = strings.Replace(localVarPath, "{"+"role_id"+"}", url.PathEscape(parameterValueToString(r.roleId, "roleId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.limit != nil { + parameterAddToQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.page != nil { + parameterAddToQuery(localVarQueryParams, "page", r.page, "") + } + if r.cursor != nil { + parameterAddToQuery(localVarQueryParams, "cursor", r.cursor, "") + } + if r.name != nil { + parameterAddToQuery(localVarQueryParams, "name", r.name, "") + } + if r.includeUnassigned != nil { + parameterAddToQuery(localVarQueryParams, "include_unassigned", r.includeUnassigned, "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"applcation/json", "application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListRolesRequest struct { + ctx context.Context + ApiService *RolesApiService + appId *int32 + limit *int32 + page *int32 + cursor *string + roleName *string + appName *string + fields *string +} + +func (r ApiListRolesRequest) AppId(appId int32) ApiListRolesRequest { + r.appId = &appId + return r +} + +// How many items to return at one time (max 100) +func (r ApiListRolesRequest) Limit(limit int32) ApiListRolesRequest { + r.limit = &limit + return r +} + +// The page number of results to return. +func (r ApiListRolesRequest) Page(page int32) ApiListRolesRequest { + r.page = &page + return r +} + +// Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. +func (r ApiListRolesRequest) Cursor(cursor string) ApiListRolesRequest { + r.cursor = &cursor + return r +} + +// Optional. Filters by role name. +func (r ApiListRolesRequest) RoleName(roleName string) ApiListRolesRequest { + r.roleName = &roleName + return r +} + +// Optional. Returns roles that contain this app name. +func (r ApiListRolesRequest) AppName(appName string) ApiListRolesRequest { + r.appName = &appName + return r +} + +// Optional. Comma delimited list of fields to return. +func (r ApiListRolesRequest) Fields(fields string) ApiListRolesRequest { + r.fields = &fields + return r +} + +func (r ApiListRolesRequest) Execute() ([]Role, *http.Response, error) { + return r.ApiService.ListRolesExecute(r) +} + +/* +ListRoles List Roles + +List Roles + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListRolesRequest +*/ +func (a *RolesApiService) ListRoles(ctx context.Context) ApiListRolesRequest { + return ApiListRolesRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return []Role +func (a *RolesApiService) ListRolesExecute(r ApiListRolesRequest) ([]Role, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []Role + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RolesApiService.ListRoles") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/roles" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.appId == nil { + return localVarReturnValue, nil, reportError("appId is required and must be specified") + } + + if r.limit != nil { + parameterAddToQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.page != nil { + parameterAddToQuery(localVarQueryParams, "page", r.page, "") + } + if r.cursor != nil { + parameterAddToQuery(localVarQueryParams, "cursor", r.cursor, "") + } + if r.roleName != nil { + parameterAddToQuery(localVarQueryParams, "role_name", r.roleName, "") + } + parameterAddToQuery(localVarQueryParams, "app_id", r.appId, "") + if r.appName != nil { + parameterAddToQuery(localVarQueryParams, "app_name", r.appName, "") + } + if r.fields != nil { + parameterAddToQuery(localVarQueryParams, "fields", r.fields, "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRemoveRoleAdminsRequest struct { + ctx context.Context + ApiService *RolesApiService + roleId string + removeRoleUsersRequest *RemoveRoleUsersRequest +} + +func (r ApiRemoveRoleAdminsRequest) RemoveRoleUsersRequest(removeRoleUsersRequest RemoveRoleUsersRequest) ApiRemoveRoleAdminsRequest { + r.removeRoleUsersRequest = &removeRoleUsersRequest + return r +} + +func (r ApiRemoveRoleAdminsRequest) Execute() (*http.Response, error) { + return r.ApiService.RemoveRoleAdminsExecute(r) +} + +/* +RemoveRoleAdmins Remove Role Admins + +Remove Role Admins + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param roleId Set to the id of the role you want to return. + @return ApiRemoveRoleAdminsRequest +*/ +func (a *RolesApiService) RemoveRoleAdmins(ctx context.Context, roleId string) ApiRemoveRoleAdminsRequest { + return ApiRemoveRoleAdminsRequest{ + ApiService: a, + ctx: ctx, + roleId: roleId, + } +} + +// Execute executes the request +func (a *RolesApiService) RemoveRoleAdminsExecute(r ApiRemoveRoleAdminsRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RolesApiService.RemoveRoleAdmins") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/roles/{role_id}/admins" + localVarPath = strings.Replace(localVarPath, "{"+"role_id"+"}", url.PathEscape(parameterValueToString(r.roleId, "roleId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.removeRoleUsersRequest == nil { + return nil, reportError("removeRoleUsersRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.removeRoleUsersRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiRemoveRoleUsersRequest struct { + ctx context.Context + ApiService *RolesApiService + roleId string + removeRoleUsersRequest *RemoveRoleUsersRequest +} + +func (r ApiRemoveRoleUsersRequest) RemoveRoleUsersRequest(removeRoleUsersRequest RemoveRoleUsersRequest) ApiRemoveRoleUsersRequest { + r.removeRoleUsersRequest = &removeRoleUsersRequest + return r +} + +func (r ApiRemoveRoleUsersRequest) Execute() (*http.Response, error) { + return r.ApiService.RemoveRoleUsersExecute(r) +} + +/* +RemoveRoleUsers Remove Role Users + +Remove Role Users + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param roleId Set to the id of the role you want to return. + @return ApiRemoveRoleUsersRequest +*/ +func (a *RolesApiService) RemoveRoleUsers(ctx context.Context, roleId string) ApiRemoveRoleUsersRequest { + return ApiRemoveRoleUsersRequest{ + ApiService: a, + ctx: ctx, + roleId: roleId, + } +} + +// Execute executes the request +func (a *RolesApiService) RemoveRoleUsersExecute(r ApiRemoveRoleUsersRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RolesApiService.RemoveRoleUsers") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/roles/{role_id}/users" + localVarPath = strings.Replace(localVarPath, "{"+"role_id"+"}", url.PathEscape(parameterValueToString(r.roleId, "roleId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.removeRoleUsersRequest == nil { + return nil, reportError("removeRoleUsersRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.removeRoleUsersRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiSetRoleAppsRequest struct { + ctx context.Context + ApiService *RolesApiService + roleId string + requestBody *[]int32 +} + +func (r ApiSetRoleAppsRequest) RequestBody(requestBody []int32) ApiSetRoleAppsRequest { + r.requestBody = &requestBody + return r +} + +func (r ApiSetRoleAppsRequest) Execute() ([]CreateRole201ResponseInner, *http.Response, error) { + return r.ApiService.SetRoleAppsExecute(r) +} + +/* +SetRoleApps Set Role Apps + +Set Role Apps + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param roleId Set to the id of the role you want to return. + @return ApiSetRoleAppsRequest +*/ +func (a *RolesApiService) SetRoleApps(ctx context.Context, roleId string) ApiSetRoleAppsRequest { + return ApiSetRoleAppsRequest{ + ApiService: a, + ctx: ctx, + roleId: roleId, + } +} + +// Execute executes the request +// @return []CreateRole201ResponseInner +func (a *RolesApiService) SetRoleAppsExecute(r ApiSetRoleAppsRequest) ([]CreateRole201ResponseInner, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []CreateRole201ResponseInner + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RolesApiService.SetRoleApps") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/roles/{role_id}/apps" + localVarPath = strings.Replace(localVarPath, "{"+"role_id"+"}", url.PathEscape(parameterValueToString(r.roleId, "roleId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.requestBody == nil { + return localVarReturnValue, nil, reportError("requestBody is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.requestBody + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateRoleRequest struct { + ctx context.Context + ApiService *RolesApiService + roleId string + role *Role +} + +func (r ApiUpdateRoleRequest) Role(role Role) ApiUpdateRoleRequest { + r.role = &role + return r +} + +func (r ApiUpdateRoleRequest) Execute() (*UpdateRole200Response, *http.Response, error) { + return r.ApiService.UpdateRoleExecute(r) +} + +/* +UpdateRole Update Role + +Update Role + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param roleId Set to the id of the role you want to return. + @return ApiUpdateRoleRequest +*/ +func (a *RolesApiService) UpdateRole(ctx context.Context, roleId string) ApiUpdateRoleRequest { + return ApiUpdateRoleRequest{ + ApiService: a, + ctx: ctx, + roleId: roleId, + } +} + +// Execute executes the request +// @return UpdateRole200Response +func (a *RolesApiService) UpdateRoleExecute(r ApiUpdateRoleRequest) (*UpdateRole200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *UpdateRole200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RolesApiService.UpdateRole") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/roles/{role_id}" + localVarPath = strings.Replace(localVarPath, "{"+"role_id"+"}", url.PathEscape(parameterValueToString(r.roleId, "roleId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.role + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/api_saml_assertions.go b/api_saml_assertions.go new file mode 100644 index 0000000..fed2a89 --- /dev/null +++ b/api_saml_assertions.go @@ -0,0 +1,593 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "bytes" + "context" + "io/ioutil" + "net/http" + "net/url" +) + + +// SAMLAssertionsApiService SAMLAssertionsApi service +type SAMLAssertionsApiService service + +type ApiGenerateSamlAssertRequest struct { + ctx context.Context + ApiService *SAMLAssertionsApiService + contentType *string + samlAssert *SamlAssert +} + +func (r ApiGenerateSamlAssertRequest) ContentType(contentType string) ApiGenerateSamlAssertRequest { + r.contentType = &contentType + return r +} + +func (r ApiGenerateSamlAssertRequest) SamlAssert(samlAssert SamlAssert) ApiGenerateSamlAssertRequest { + r.samlAssert = &samlAssert + return r +} + +func (r ApiGenerateSamlAssertRequest) Execute() (*GenerateSamlAssert200Response, *http.Response, error) { + return r.ApiService.GenerateSamlAssertExecute(r) +} + +/* +GenerateSamlAssert Generate SAML Assertion + +Generate SAML Assertion + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGenerateSamlAssertRequest +*/ +func (a *SAMLAssertionsApiService) GenerateSamlAssert(ctx context.Context) ApiGenerateSamlAssertRequest { + return ApiGenerateSamlAssertRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return GenerateSamlAssert200Response +func (a *SAMLAssertionsApiService) GenerateSamlAssertExecute(r ApiGenerateSamlAssertRequest) (*GenerateSamlAssert200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GenerateSamlAssert200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SAMLAssertionsApiService.GenerateSamlAssert") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/1/saml_assertion" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.contentType != nil { + parameterAddToQuery(localVarQueryParams, "Content-Type", r.contentType, "") + } + // body params + localVarPostBody = r.samlAssert + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGenerateSamlAssert2Request struct { + ctx context.Context + ApiService *SAMLAssertionsApiService + contentType *string + samlAssert *SamlAssert +} + +func (r ApiGenerateSamlAssert2Request) ContentType(contentType string) ApiGenerateSamlAssert2Request { + r.contentType = &contentType + return r +} + +func (r ApiGenerateSamlAssert2Request) SamlAssert(samlAssert SamlAssert) ApiGenerateSamlAssert2Request { + r.samlAssert = &samlAssert + return r +} + +func (r ApiGenerateSamlAssert2Request) Execute() (*GenerateSamlAssert200Response, *http.Response, error) { + return r.ApiService.GenerateSamlAssert2Execute(r) +} + +/* +GenerateSamlAssert2 Generate SAML Assertion + +Generate SAML Assertion + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGenerateSamlAssert2Request +*/ +func (a *SAMLAssertionsApiService) GenerateSamlAssert2(ctx context.Context) ApiGenerateSamlAssert2Request { + return ApiGenerateSamlAssert2Request{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return GenerateSamlAssert200Response +func (a *SAMLAssertionsApiService) GenerateSamlAssert2Execute(r ApiGenerateSamlAssert2Request) (*GenerateSamlAssert200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GenerateSamlAssert200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SAMLAssertionsApiService.GenerateSamlAssert2") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/saml_assertion" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.contentType != nil { + parameterAddToQuery(localVarQueryParams, "Content-Type", r.contentType, "") + } + // body params + localVarPostBody = r.samlAssert + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiVerFactorSamlRequest struct { + ctx context.Context + ApiService *SAMLAssertionsApiService + contentType *string + samlFactor *SamlFactor +} + +func (r ApiVerFactorSamlRequest) ContentType(contentType string) ApiVerFactorSamlRequest { + r.contentType = &contentType + return r +} + +func (r ApiVerFactorSamlRequest) SamlFactor(samlFactor SamlFactor) ApiVerFactorSamlRequest { + r.samlFactor = &samlFactor + return r +} + +func (r ApiVerFactorSamlRequest) Execute() (*VerFactorSaml200Response, *http.Response, error) { + return r.ApiService.VerFactorSamlExecute(r) +} + +/* +VerFactorSaml Verify Factor SAML + +Verify Factor: SAML + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiVerFactorSamlRequest +*/ +func (a *SAMLAssertionsApiService) VerFactorSaml(ctx context.Context) ApiVerFactorSamlRequest { + return ApiVerFactorSamlRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return VerFactorSaml200Response +func (a *SAMLAssertionsApiService) VerFactorSamlExecute(r ApiVerFactorSamlRequest) (*VerFactorSaml200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *VerFactorSaml200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SAMLAssertionsApiService.VerFactorSaml") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/1/saml_assertion/verify_factor" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.contentType != nil { + parameterAddToQuery(localVarQueryParams, "Content-Type", r.contentType, "") + } + // body params + localVarPostBody = r.samlFactor + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiVerFactorSaml2Request struct { + ctx context.Context + ApiService *SAMLAssertionsApiService + contentType *string + samlFactor *SamlFactor +} + +func (r ApiVerFactorSaml2Request) ContentType(contentType string) ApiVerFactorSaml2Request { + r.contentType = &contentType + return r +} + +func (r ApiVerFactorSaml2Request) SamlFactor(samlFactor SamlFactor) ApiVerFactorSaml2Request { + r.samlFactor = &samlFactor + return r +} + +func (r ApiVerFactorSaml2Request) Execute() (*VerFactorSaml200Response, *http.Response, error) { + return r.ApiService.VerFactorSaml2Execute(r) +} + +/* +VerFactorSaml2 Verify Factor SAML + +Verify Factor: SAML + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiVerFactorSaml2Request +*/ +func (a *SAMLAssertionsApiService) VerFactorSaml2(ctx context.Context) ApiVerFactorSaml2Request { + return ApiVerFactorSaml2Request{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return VerFactorSaml200Response +func (a *SAMLAssertionsApiService) VerFactorSaml2Execute(r ApiVerFactorSaml2Request) (*VerFactorSaml200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *VerFactorSaml200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SAMLAssertionsApiService.VerFactorSaml2") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/saml_assertion/verify_factor" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.contentType != nil { + parameterAddToQuery(localVarQueryParams, "Content-Type", r.contentType, "") + } + // body params + localVarPostBody = r.samlFactor + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/api_smart_hooks.go b/api_smart_hooks.go new file mode 100644 index 0000000..6facf62 --- /dev/null +++ b/api_smart_hooks.go @@ -0,0 +1,1493 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "bytes" + "context" + "io/ioutil" + "net/http" + "net/url" + "strings" +) + + +// SmartHooksApiService SmartHooksApi service +type SmartHooksApiService service + +type ApiCreateEnvironmentVariableRequest struct { + ctx context.Context + ApiService *SmartHooksApiService + hookEnvvar *HookEnvvar +} + +func (r ApiCreateEnvironmentVariableRequest) HookEnvvar(hookEnvvar HookEnvvar) ApiCreateEnvironmentVariableRequest { + r.hookEnvvar = &hookEnvvar + return r +} + +func (r ApiCreateEnvironmentVariableRequest) Execute() (*HookEnvvar, *http.Response, error) { + return r.ApiService.CreateEnvironmentVariableExecute(r) +} + +/* +CreateEnvironmentVariable Create Environment Variable + +Create Environment Variable + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateEnvironmentVariableRequest +*/ +func (a *SmartHooksApiService) CreateEnvironmentVariable(ctx context.Context) ApiCreateEnvironmentVariableRequest { + return ApiCreateEnvironmentVariableRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return HookEnvvar +func (a *SmartHooksApiService) CreateEnvironmentVariableExecute(r ApiCreateEnvironmentVariableRequest) (*HookEnvvar, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *HookEnvvar + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SmartHooksApiService.CreateEnvironmentVariable") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/hooks/envs" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.hookEnvvar == nil { + return localVarReturnValue, nil, reportError("hookEnvvar is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.hookEnvvar + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiCreateHookRequest struct { + ctx context.Context + ApiService *SmartHooksApiService + hook *Hook +} + +func (r ApiCreateHookRequest) Hook(hook Hook) ApiCreateHookRequest { + r.hook = &hook + return r +} + +func (r ApiCreateHookRequest) Execute() (*Hook, *http.Response, error) { + return r.ApiService.CreateHookExecute(r) +} + +/* +CreateHook Create Smart Hook + +Create Smart Hook + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateHookRequest +*/ +func (a *SmartHooksApiService) CreateHook(ctx context.Context) ApiCreateHookRequest { + return ApiCreateHookRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return Hook +func (a *SmartHooksApiService) CreateHookExecute(r ApiCreateHookRequest) (*Hook, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Hook + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SmartHooksApiService.CreateHook") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/hooks" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.hook == nil { + return localVarReturnValue, nil, reportError("hook is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.hook + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v HookStatus + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteEnvironmentVariableRequest struct { + ctx context.Context + ApiService *SmartHooksApiService + envvarId string +} + +func (r ApiDeleteEnvironmentVariableRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteEnvironmentVariableExecute(r) +} + +/* +DeleteEnvironmentVariable Delete Environment Variable + +Delete Environment Variable + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param envvarId Set to the id of the Hook Environment Variable that you want to fetch. + @return ApiDeleteEnvironmentVariableRequest +*/ +func (a *SmartHooksApiService) DeleteEnvironmentVariable(ctx context.Context, envvarId string) ApiDeleteEnvironmentVariableRequest { + return ApiDeleteEnvironmentVariableRequest{ + ApiService: a, + ctx: ctx, + envvarId: envvarId, + } +} + +// Execute executes the request +func (a *SmartHooksApiService) DeleteEnvironmentVariableExecute(r ApiDeleteEnvironmentVariableRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SmartHooksApiService.DeleteEnvironmentVariable") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/hooks/envs/{envvar_id}" + localVarPath = strings.Replace(localVarPath, "{"+"envvar_id"+"}", url.PathEscape(parameterValueToString(r.envvarId, "envvarId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiDeleteHookRequest struct { + ctx context.Context + ApiService *SmartHooksApiService + hookId string +} + +func (r ApiDeleteHookRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteHookExecute(r) +} + +/* +DeleteHook Delete Smart Hook by ID + +Delete Smart Hook + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param hookId Set to the id of the Hook that you want to return. + @return ApiDeleteHookRequest +*/ +func (a *SmartHooksApiService) DeleteHook(ctx context.Context, hookId string) ApiDeleteHookRequest { + return ApiDeleteHookRequest{ + ApiService: a, + ctx: ctx, + hookId: hookId, + } +} + +// Execute executes the request +func (a *SmartHooksApiService) DeleteHookExecute(r ApiDeleteHookRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SmartHooksApiService.DeleteHook") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/hooks/{hook_id}" + localVarPath = strings.Replace(localVarPath, "{"+"hook_id"+"}", url.PathEscape(parameterValueToString(r.hookId, "hookId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiGetEnvironmentVariableRequest struct { + ctx context.Context + ApiService *SmartHooksApiService + envvarId string +} + +func (r ApiGetEnvironmentVariableRequest) Execute() (*HookEnvvar, *http.Response, error) { + return r.ApiService.GetEnvironmentVariableExecute(r) +} + +/* +GetEnvironmentVariable Get Environment Variable + +Get Environment Variable + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param envvarId Set to the id of the Hook Environment Variable that you want to fetch. + @return ApiGetEnvironmentVariableRequest +*/ +func (a *SmartHooksApiService) GetEnvironmentVariable(ctx context.Context, envvarId string) ApiGetEnvironmentVariableRequest { + return ApiGetEnvironmentVariableRequest{ + ApiService: a, + ctx: ctx, + envvarId: envvarId, + } +} + +// Execute executes the request +// @return HookEnvvar +func (a *SmartHooksApiService) GetEnvironmentVariableExecute(r ApiGetEnvironmentVariableRequest) (*HookEnvvar, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *HookEnvvar + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SmartHooksApiService.GetEnvironmentVariable") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/hooks/envs/{envvar_id}" + localVarPath = strings.Replace(localVarPath, "{"+"envvar_id"+"}", url.PathEscape(parameterValueToString(r.envvarId, "envvarId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetHookRequest struct { + ctx context.Context + ApiService *SmartHooksApiService + hookId string +} + +func (r ApiGetHookRequest) Execute() (*Hook, *http.Response, error) { + return r.ApiService.GetHookExecute(r) +} + +/* +GetHook Get Smart Hook by ID + +Get Smart Hook + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param hookId Set to the id of the Hook that you want to return. + @return ApiGetHookRequest +*/ +func (a *SmartHooksApiService) GetHook(ctx context.Context, hookId string) ApiGetHookRequest { + return ApiGetHookRequest{ + ApiService: a, + ctx: ctx, + hookId: hookId, + } +} + +// Execute executes the request +// @return Hook +func (a *SmartHooksApiService) GetHookExecute(r ApiGetHookRequest) (*Hook, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Hook + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SmartHooksApiService.GetHook") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/hooks/{hook_id}" + localVarPath = strings.Replace(localVarPath, "{"+"hook_id"+"}", url.PathEscape(parameterValueToString(r.hookId, "hookId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetLogsRequest struct { + ctx context.Context + ApiService *SmartHooksApiService + hookId string + limit *int32 + page *int32 + cursor *string + requestId *string + correlationId *string +} + +// How many items to return at one time (max 100) +func (r ApiGetLogsRequest) Limit(limit int32) ApiGetLogsRequest { + r.limit = &limit + return r +} + +// The page number of results to return. +func (r ApiGetLogsRequest) Page(page int32) ApiGetLogsRequest { + r.page = &page + return r +} + +// Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. +func (r ApiGetLogsRequest) Cursor(cursor string) ApiGetLogsRequest { + r.cursor = &cursor + return r +} + +// Returns logs that contain this request_id. +func (r ApiGetLogsRequest) RequestId(requestId string) ApiGetLogsRequest { + r.requestId = &requestId + return r +} + +// Returns logs that contain this correlation_id. +func (r ApiGetLogsRequest) CorrelationId(correlationId string) ApiGetLogsRequest { + r.correlationId = &correlationId + return r +} + +func (r ApiGetLogsRequest) Execute() ([]HookLog, *http.Response, error) { + return r.ApiService.GetLogsExecute(r) +} + +/* +GetLogs Get Smart Hook Logs + +Get Smart Hook Logs + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param hookId Set to the id of the Hook that you want to return. + @return ApiGetLogsRequest +*/ +func (a *SmartHooksApiService) GetLogs(ctx context.Context, hookId string) ApiGetLogsRequest { + return ApiGetLogsRequest{ + ApiService: a, + ctx: ctx, + hookId: hookId, + } +} + +// Execute executes the request +// @return []HookLog +func (a *SmartHooksApiService) GetLogsExecute(r ApiGetLogsRequest) ([]HookLog, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []HookLog + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SmartHooksApiService.GetLogs") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/hooks/{hook_id}/logs" + localVarPath = strings.Replace(localVarPath, "{"+"hook_id"+"}", url.PathEscape(parameterValueToString(r.hookId, "hookId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.limit != nil { + parameterAddToQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.page != nil { + parameterAddToQuery(localVarQueryParams, "page", r.page, "") + } + if r.cursor != nil { + parameterAddToQuery(localVarQueryParams, "cursor", r.cursor, "") + } + if r.requestId != nil { + parameterAddToQuery(localVarQueryParams, "request_id", r.requestId, "") + } + if r.correlationId != nil { + parameterAddToQuery(localVarQueryParams, "correlation_id", r.correlationId, "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListEnvironmentVariablesRequest struct { + ctx context.Context + ApiService *SmartHooksApiService + limit *int32 + page *int32 + cursor *string +} + +// How many items to return at one time (max 100) +func (r ApiListEnvironmentVariablesRequest) Limit(limit int32) ApiListEnvironmentVariablesRequest { + r.limit = &limit + return r +} + +// The page number of results to return. +func (r ApiListEnvironmentVariablesRequest) Page(page int32) ApiListEnvironmentVariablesRequest { + r.page = &page + return r +} + +// Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. +func (r ApiListEnvironmentVariablesRequest) Cursor(cursor string) ApiListEnvironmentVariablesRequest { + r.cursor = &cursor + return r +} + +func (r ApiListEnvironmentVariablesRequest) Execute() ([]HookEnvvar, *http.Response, error) { + return r.ApiService.ListEnvironmentVariablesExecute(r) +} + +/* +ListEnvironmentVariables List Environment Variables + +List Environment Variables + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListEnvironmentVariablesRequest +*/ +func (a *SmartHooksApiService) ListEnvironmentVariables(ctx context.Context) ApiListEnvironmentVariablesRequest { + return ApiListEnvironmentVariablesRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return []HookEnvvar +func (a *SmartHooksApiService) ListEnvironmentVariablesExecute(r ApiListEnvironmentVariablesRequest) ([]HookEnvvar, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []HookEnvvar + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SmartHooksApiService.ListEnvironmentVariables") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/hooks/envs" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.limit != nil { + parameterAddToQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.page != nil { + parameterAddToQuery(localVarQueryParams, "page", r.page, "") + } + if r.cursor != nil { + parameterAddToQuery(localVarQueryParams, "cursor", r.cursor, "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListHooksRequest struct { + ctx context.Context + ApiService *SmartHooksApiService + limit *int32 + page *int32 + cursor *string +} + +// How many items to return at one time (max 100) +func (r ApiListHooksRequest) Limit(limit int32) ApiListHooksRequest { + r.limit = &limit + return r +} + +// The page number of results to return. +func (r ApiListHooksRequest) Page(page int32) ApiListHooksRequest { + r.page = &page + return r +} + +// Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. +func (r ApiListHooksRequest) Cursor(cursor string) ApiListHooksRequest { + r.cursor = &cursor + return r +} + +func (r ApiListHooksRequest) Execute() ([]Hook, *http.Response, error) { + return r.ApiService.ListHooksExecute(r) +} + +/* +ListHooks List all Smart Hooks + +List Smart Hooks + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListHooksRequest +*/ +func (a *SmartHooksApiService) ListHooks(ctx context.Context) ApiListHooksRequest { + return ApiListHooksRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return []Hook +func (a *SmartHooksApiService) ListHooksExecute(r ApiListHooksRequest) ([]Hook, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []Hook + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SmartHooksApiService.ListHooks") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/hooks" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.limit != nil { + parameterAddToQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.page != nil { + parameterAddToQuery(localVarQueryParams, "page", r.page, "") + } + if r.cursor != nil { + parameterAddToQuery(localVarQueryParams, "cursor", r.cursor, "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateEnvironmentVariableRequest struct { + ctx context.Context + ApiService *SmartHooksApiService + envvarId string + updateEnvironmentVariableRequest *UpdateEnvironmentVariableRequest +} + +func (r ApiUpdateEnvironmentVariableRequest) UpdateEnvironmentVariableRequest(updateEnvironmentVariableRequest UpdateEnvironmentVariableRequest) ApiUpdateEnvironmentVariableRequest { + r.updateEnvironmentVariableRequest = &updateEnvironmentVariableRequest + return r +} + +func (r ApiUpdateEnvironmentVariableRequest) Execute() (*HookEnvvar, *http.Response, error) { + return r.ApiService.UpdateEnvironmentVariableExecute(r) +} + +/* +UpdateEnvironmentVariable Update Environment Variable + +Update Environment Variable + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param envvarId Set to the id of the Hook Environment Variable that you want to fetch. + @return ApiUpdateEnvironmentVariableRequest +*/ +func (a *SmartHooksApiService) UpdateEnvironmentVariable(ctx context.Context, envvarId string) ApiUpdateEnvironmentVariableRequest { + return ApiUpdateEnvironmentVariableRequest{ + ApiService: a, + ctx: ctx, + envvarId: envvarId, + } +} + +// Execute executes the request +// @return HookEnvvar +func (a *SmartHooksApiService) UpdateEnvironmentVariableExecute(r ApiUpdateEnvironmentVariableRequest) (*HookEnvvar, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *HookEnvvar + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SmartHooksApiService.UpdateEnvironmentVariable") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/hooks/envs/{envvar_id}" + localVarPath = strings.Replace(localVarPath, "{"+"envvar_id"+"}", url.PathEscape(parameterValueToString(r.envvarId, "envvarId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.updateEnvironmentVariableRequest == nil { + return localVarReturnValue, nil, reportError("updateEnvironmentVariableRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.updateEnvironmentVariableRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v HookStatus + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateHookRequest struct { + ctx context.Context + ApiService *SmartHooksApiService + hookId string + hook *Hook +} + +func (r ApiUpdateHookRequest) Hook(hook Hook) ApiUpdateHookRequest { + r.hook = &hook + return r +} + +func (r ApiUpdateHookRequest) Execute() (*Hook, *http.Response, error) { + return r.ApiService.UpdateHookExecute(r) +} + +/* +UpdateHook Update Smart Hook by ID + +Update Smart Hook + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param hookId Set to the id of the Hook that you want to return. + @return ApiUpdateHookRequest +*/ +func (a *SmartHooksApiService) UpdateHook(ctx context.Context, hookId string) ApiUpdateHookRequest { + return ApiUpdateHookRequest{ + ApiService: a, + ctx: ctx, + hookId: hookId, + } +} + +// Execute executes the request +// @return Hook +func (a *SmartHooksApiService) UpdateHookExecute(r ApiUpdateHookRequest) (*Hook, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Hook + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SmartHooksApiService.UpdateHook") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/hooks/{hook_id}" + localVarPath = strings.Replace(localVarPath, "{"+"hook_id"+"}", url.PathEscape(parameterValueToString(r.hookId, "hookId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.hook == nil { + return localVarReturnValue, nil, reportError("hook is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.hook + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v AltErr + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v HookStatus + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/api_user_mappings.go b/api_user_mappings.go new file mode 100644 index 0000000..4966a27 --- /dev/null +++ b/api_user_mappings.go @@ -0,0 +1,1383 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "bytes" + "context" + "io/ioutil" + "net/http" + "net/url" + "strings" +) + + +// UserMappingsApiService UserMappingsApi service +type UserMappingsApiService service + +type ApiCreateMappingRequest struct { + ctx context.Context + ApiService *UserMappingsApiService + contentType *string + mapping *Mapping +} + +func (r ApiCreateMappingRequest) ContentType(contentType string) ApiCreateMappingRequest { + r.contentType = &contentType + return r +} + +func (r ApiCreateMappingRequest) Mapping(mapping Mapping) ApiCreateMappingRequest { + r.mapping = &mapping + return r +} + +func (r ApiCreateMappingRequest) Execute() ([]Mapping, *http.Response, error) { + return r.ApiService.CreateMappingExecute(r) +} + +/* +CreateMapping Create Mapping + +Create Mapping + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateMappingRequest +*/ +func (a *UserMappingsApiService) CreateMapping(ctx context.Context) ApiCreateMappingRequest { + return ApiCreateMappingRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return []Mapping +func (a *UserMappingsApiService) CreateMappingExecute(r ApiCreateMappingRequest) ([]Mapping, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []Mapping + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserMappingsApiService.CreateMapping") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/mappings" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.contentType != nil { + parameterAddToQuery(localVarQueryParams, "Content-Type", r.contentType, "") + } + // body params + localVarPostBody = r.mapping + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteMappingRequest struct { + ctx context.Context + ApiService *UserMappingsApiService + mappingId int32 +} + +func (r ApiDeleteMappingRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteMappingExecute(r) +} + +/* +DeleteMapping Delete Mapping + +Delete Mapping + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param mappingId The id of the user mapping to locate. + @return ApiDeleteMappingRequest +*/ +func (a *UserMappingsApiService) DeleteMapping(ctx context.Context, mappingId int32) ApiDeleteMappingRequest { + return ApiDeleteMappingRequest{ + ApiService: a, + ctx: ctx, + mappingId: mappingId, + } +} + +// Execute executes the request +func (a *UserMappingsApiService) DeleteMappingExecute(r ApiDeleteMappingRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserMappingsApiService.DeleteMapping") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/mappings/{mapping_id}" + localVarPath = strings.Replace(localVarPath, "{"+"mapping_id"+"}", url.PathEscape(parameterValueToString(r.mappingId, "mappingId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiGetMappingRequest struct { + ctx context.Context + ApiService *UserMappingsApiService + mappingId int32 +} + +func (r ApiGetMappingRequest) Execute() (*Mapping, *http.Response, error) { + return r.ApiService.GetMappingExecute(r) +} + +/* +GetMapping Get Mapping + +Get Mapping + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param mappingId The id of the user mapping to locate. + @return ApiGetMappingRequest +*/ +func (a *UserMappingsApiService) GetMapping(ctx context.Context, mappingId int32) ApiGetMappingRequest { + return ApiGetMappingRequest{ + ApiService: a, + ctx: ctx, + mappingId: mappingId, + } +} + +// Execute executes the request +// @return Mapping +func (a *UserMappingsApiService) GetMappingExecute(r ApiGetMappingRequest) (*Mapping, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Mapping + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserMappingsApiService.GetMapping") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/mappings/{mapping_id}" + localVarPath = strings.Replace(localVarPath, "{"+"mapping_id"+"}", url.PathEscape(parameterValueToString(r.mappingId, "mappingId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListMappingActionValuesRequest struct { + ctx context.Context + ApiService *UserMappingsApiService + mappingActionValue string +} + +func (r ApiListMappingActionValuesRequest) Execute() ([]ListMappingActionValues200ResponseInner, *http.Response, error) { + return r.ApiService.ListMappingActionValuesExecute(r) +} + +/* +ListMappingActionValues List Actions Values + +List Mappings' Actions' Values + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param mappingActionValue + @return ApiListMappingActionValuesRequest +*/ +func (a *UserMappingsApiService) ListMappingActionValues(ctx context.Context, mappingActionValue string) ApiListMappingActionValuesRequest { + return ApiListMappingActionValuesRequest{ + ApiService: a, + ctx: ctx, + mappingActionValue: mappingActionValue, + } +} + +// Execute executes the request +// @return []ListMappingActionValues200ResponseInner +func (a *UserMappingsApiService) ListMappingActionValuesExecute(r ApiListMappingActionValuesRequest) ([]ListMappingActionValues200ResponseInner, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []ListMappingActionValues200ResponseInner + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserMappingsApiService.ListMappingActionValues") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/mappings/actions/{mapping_action_value}/values" + localVarPath = strings.Replace(localVarPath, "{"+"mapping_action_value"+"}", url.PathEscape(parameterValueToString(r.mappingActionValue, "mappingActionValue")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListMappingConditionsRequest struct { + ctx context.Context + ApiService *UserMappingsApiService +} + +func (r ApiListMappingConditionsRequest) Execute() (*ListMappingConditions200Response, *http.Response, error) { + return r.ApiService.ListMappingConditionsExecute(r) +} + +/* +ListMappingConditions List Conditions + +List Mappings' Conditions + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListMappingConditionsRequest +*/ +func (a *UserMappingsApiService) ListMappingConditions(ctx context.Context) ApiListMappingConditionsRequest { + return ApiListMappingConditionsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return ListMappingConditions200Response +func (a *UserMappingsApiService) ListMappingConditionsExecute(r ApiListMappingConditionsRequest) (*ListMappingConditions200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListMappingConditions200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserMappingsApiService.ListMappingConditions") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/mappings/conditions" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListMappingConditionsOperatorsRequest struct { + ctx context.Context + ApiService *UserMappingsApiService + mappingConditionValue string +} + +func (r ApiListMappingConditionsOperatorsRequest) Execute() ([]ListMappingConditionsOperators200ResponseInner, *http.Response, error) { + return r.ApiService.ListMappingConditionsOperatorsExecute(r) +} + +/* +ListMappingConditionsOperators List Conditions Operators + +List Mappings' Conditions' Operators + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param mappingConditionValue + @return ApiListMappingConditionsOperatorsRequest +*/ +func (a *UserMappingsApiService) ListMappingConditionsOperators(ctx context.Context, mappingConditionValue string) ApiListMappingConditionsOperatorsRequest { + return ApiListMappingConditionsOperatorsRequest{ + ApiService: a, + ctx: ctx, + mappingConditionValue: mappingConditionValue, + } +} + +// Execute executes the request +// @return []ListMappingConditionsOperators200ResponseInner +func (a *UserMappingsApiService) ListMappingConditionsOperatorsExecute(r ApiListMappingConditionsOperatorsRequest) ([]ListMappingConditionsOperators200ResponseInner, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []ListMappingConditionsOperators200ResponseInner + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserMappingsApiService.ListMappingConditionsOperators") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/mappings/conditions/{mapping_condition_value}/operators" + localVarPath = strings.Replace(localVarPath, "{"+"mapping_condition_value"+"}", url.PathEscape(parameterValueToString(r.mappingConditionValue, "mappingConditionValue")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListMappingContionValuesRequest struct { + ctx context.Context + ApiService *UserMappingsApiService + mappingConditionValue string +} + +func (r ApiListMappingContionValuesRequest) Execute() ([]ListMappingContionValues200ResponseInner, *http.Response, error) { + return r.ApiService.ListMappingContionValuesExecute(r) +} + +/* +ListMappingContionValues List Conditions Values + +List Mappings' Conditions' Values + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param mappingConditionValue + @return ApiListMappingContionValuesRequest +*/ +func (a *UserMappingsApiService) ListMappingContionValues(ctx context.Context, mappingConditionValue string) ApiListMappingContionValuesRequest { + return ApiListMappingContionValuesRequest{ + ApiService: a, + ctx: ctx, + mappingConditionValue: mappingConditionValue, + } +} + +// Execute executes the request +// @return []ListMappingContionValues200ResponseInner +func (a *UserMappingsApiService) ListMappingContionValuesExecute(r ApiListMappingContionValuesRequest) ([]ListMappingContionValues200ResponseInner, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []ListMappingContionValues200ResponseInner + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserMappingsApiService.ListMappingContionValues") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/mappings/conditions/{mapping_condition_value}/values" + localVarPath = strings.Replace(localVarPath, "{"+"mapping_condition_value"+"}", url.PathEscape(parameterValueToString(r.mappingConditionValue, "mappingConditionValue")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListMappingsRequest struct { + ctx context.Context + ApiService *UserMappingsApiService + enabled *bool + hasCondition *string + hasConditionType *string + hasAction *string + hasActionType *string +} + +// Defaults to true. When set to `false` will return all disabled mappings. +func (r ApiListMappingsRequest) Enabled(enabled bool) ApiListMappingsRequest { + r.enabled = &enabled + return r +} + +// Filters Rules based on their Conditions. Values formatted as :, where name is the Condition to look for, and value is the value to find. Multiple filters can be declared by using a comma delimited list. Wildcards are supported in both the name and value fields. For example: Single filter. has_condition=has_role:123456 Multiple filters. has_condition=has_role:123456,status:1 Wildcard for conditions. has_condition=*:123456 Wildcard for condition values. has_condition=has_role:* +func (r ApiListMappingsRequest) HasCondition(hasCondition string) ApiListMappingsRequest { + r.hasCondition = &hasCondition + return r +} + +// Filters Rules based on their Conditions. Values formatted as :, where name is the Condition to look for, and value is the value to find. Multiple filters can be declared by using a comma delimited list. Wildcards are supported in both the name and value fields. For example: Single filter. has_condition=has_role:123456 Multiple filters. has_condition=has_role:123456,status:1 Wildcard for conditions. has_condition=*:123456 Wildcard for condition values. has_condition=has_role:* +func (r ApiListMappingsRequest) HasConditionType(hasConditionType string) ApiListMappingsRequest { + r.hasConditionType = &hasConditionType + return r +} + +// Filters Rules based on their Actions. Values formatted as :, where name is the Action to look for, and value is the value to find. Multiple filters can be declared by using a comma delimited list. Wildcards are supported in both the name and value fields. For example: Single filter. has_action=set_licenses:123456 Multiple filters. has_action=set_groups:123456,set_usertype:* Wildcard for actions. has_action=*:123456 Wildcard for action values. has_action=set_userprincipalname:* +func (r ApiListMappingsRequest) HasAction(hasAction string) ApiListMappingsRequest { + r.hasAction = &hasAction + return r +} + +// Filters Rules based on their action types. Allowed values are: builtin - actions that involve standard attributes custom - actions that involve custom attributes none - no actions are defined For example: Find Rules with no actions has_action_type=none +func (r ApiListMappingsRequest) HasActionType(hasActionType string) ApiListMappingsRequest { + r.hasActionType = &hasActionType + return r +} + +func (r ApiListMappingsRequest) Execute() ([]Mapping, *http.Response, error) { + return r.ApiService.ListMappingsExecute(r) +} + +/* +ListMappings List Mappings + +List Mappings + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListMappingsRequest +*/ +func (a *UserMappingsApiService) ListMappings(ctx context.Context) ApiListMappingsRequest { + return ApiListMappingsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return []Mapping +func (a *UserMappingsApiService) ListMappingsExecute(r ApiListMappingsRequest) ([]Mapping, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []Mapping + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserMappingsApiService.ListMappings") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/mappings" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.enabled != nil { + parameterAddToQuery(localVarQueryParams, "enabled", r.enabled, "") + } + if r.hasCondition != nil { + parameterAddToQuery(localVarQueryParams, "has_condition", r.hasCondition, "") + } + if r.hasConditionType != nil { + parameterAddToQuery(localVarQueryParams, "has_condition_type", r.hasConditionType, "") + } + if r.hasAction != nil { + parameterAddToQuery(localVarQueryParams, "has_action", r.hasAction, "") + } + if r.hasActionType != nil { + parameterAddToQuery(localVarQueryParams, "has_action_type", r.hasActionType, "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListMappingsActionsRequest struct { + ctx context.Context + ApiService *UserMappingsApiService +} + +func (r ApiListMappingsActionsRequest) Execute() ([]ListMappingsActions200ResponseInner, *http.Response, error) { + return r.ApiService.ListMappingsActionsExecute(r) +} + +/* +ListMappingsActions List Actions + +List Mappings' Actions + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListMappingsActionsRequest +*/ +func (a *UserMappingsApiService) ListMappingsActions(ctx context.Context) ApiListMappingsActionsRequest { + return ApiListMappingsActionsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return []ListMappingsActions200ResponseInner +func (a *UserMappingsApiService) ListMappingsActionsExecute(r ApiListMappingsActionsRequest) ([]ListMappingsActions200ResponseInner, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []ListMappingsActions200ResponseInner + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserMappingsApiService.ListMappingsActions") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/mappings/actions" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSortMappingsRequest struct { + ctx context.Context + ApiService *UserMappingsApiService + requestBody *[]int32 +} + +func (r ApiSortMappingsRequest) RequestBody(requestBody []int32) ApiSortMappingsRequest { + r.requestBody = &requestBody + return r +} + +func (r ApiSortMappingsRequest) Execute() ([]int32, *http.Response, error) { + return r.ApiService.SortMappingsExecute(r) +} + +/* +SortMappings Bulk Sort + +Bulk Sort Mappings + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiSortMappingsRequest +*/ +func (a *UserMappingsApiService) SortMappings(ctx context.Context) ApiSortMappingsRequest { + return ApiSortMappingsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return []int32 +func (a *UserMappingsApiService) SortMappingsExecute(r ApiSortMappingsRequest) ([]int32, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []int32 + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserMappingsApiService.SortMappings") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/mappings/sort" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.requestBody + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateMappingRequest struct { + ctx context.Context + ApiService *UserMappingsApiService + mappingId int32 + contentType *string + body *map[string]interface{} +} + +func (r ApiUpdateMappingRequest) ContentType(contentType string) ApiUpdateMappingRequest { + r.contentType = &contentType + return r +} + +func (r ApiUpdateMappingRequest) Body(body map[string]interface{}) ApiUpdateMappingRequest { + r.body = &body + return r +} + +func (r ApiUpdateMappingRequest) Execute() (int32, *http.Response, error) { + return r.ApiService.UpdateMappingExecute(r) +} + +/* +UpdateMapping Update Mapping + +Update Mapping + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param mappingId The id of the user mapping to locate. + @return ApiUpdateMappingRequest +*/ +func (a *UserMappingsApiService) UpdateMapping(ctx context.Context, mappingId int32) ApiUpdateMappingRequest { + return ApiUpdateMappingRequest{ + ApiService: a, + ctx: ctx, + mappingId: mappingId, + } +} + +// Execute executes the request +// @return int32 +func (a *UserMappingsApiService) UpdateMappingExecute(r ApiUpdateMappingRequest) (int32, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue int32 + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserMappingsApiService.UpdateMapping") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/mappings/{mapping_id}" + localVarPath = strings.Replace(localVarPath, "{"+"mapping_id"+"}", url.PathEscape(parameterValueToString(r.mappingId, "mappingId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.contentType != nil { + parameterAddToQuery(localVarQueryParams, "Content-Type", r.contentType, "") + } + // body params + localVarPostBody = r.body + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/api_users_v1.go b/api_users_v1.go new file mode 100644 index 0000000..4113341 --- /dev/null +++ b/api_users_v1.go @@ -0,0 +1,2392 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "bytes" + "context" + "io/ioutil" + "net/http" + "net/url" + "strings" +) + + +// UsersV1ApiService UsersV1Api service +type UsersV1ApiService service + +type ApiAddRolesToUserRequest struct { + ctx context.Context + ApiService *UsersV1ApiService + userId int32 + addRolesToUserRequest *AddRolesToUserRequest +} + +func (r ApiAddRolesToUserRequest) AddRolesToUserRequest(addRolesToUserRequest AddRolesToUserRequest) ApiAddRolesToUserRequest { + r.addRolesToUserRequest = &addRolesToUserRequest + return r +} + +func (r ApiAddRolesToUserRequest) Execute() (*Error, *http.Response, error) { + return r.ApiService.AddRolesToUserExecute(r) +} + +/* +AddRolesToUser Add Roles for a User + +Add Roles for a User + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param userId Set to the id of the user that you want to return. + @return ApiAddRolesToUserRequest +*/ +func (a *UsersV1ApiService) AddRolesToUser(ctx context.Context, userId int32) ApiAddRolesToUserRequest { + return ApiAddRolesToUserRequest{ + ApiService: a, + ctx: ctx, + userId: userId, + } +} + +// Execute executes the request +// @return Error +func (a *UsersV1ApiService) AddRolesToUserExecute(r ApiAddRolesToUserRequest) (*Error, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Error + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsersV1ApiService.AddRolesToUser") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/1/users/{user_id}/add_roles" + localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.addRolesToUserRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiCreateUserRequest struct { + ctx context.Context + ApiService *UsersV1ApiService + mappings *string + validatePolicy *bool + user *User +} + +// Controls how mappings will be applied to the user on creation. Defaults to async. +func (r ApiCreateUserRequest) Mappings(mappings string) ApiCreateUserRequest { + r.mappings = &mappings + return r +} + +// Will passwords validate against the User Policy? Defaults to true. +func (r ApiCreateUserRequest) ValidatePolicy(validatePolicy bool) ApiCreateUserRequest { + r.validatePolicy = &validatePolicy + return r +} + +func (r ApiCreateUserRequest) User(user User) ApiCreateUserRequest { + r.user = &user + return r +} + +func (r ApiCreateUserRequest) Execute() (*User, *http.Response, error) { + return r.ApiService.CreateUserExecute(r) +} + +/* +CreateUser Create a User + +Create a User + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateUserRequest +*/ +func (a *UsersV1ApiService) CreateUser(ctx context.Context) ApiCreateUserRequest { + return ApiCreateUserRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return User +func (a *UsersV1ApiService) CreateUserExecute(r ApiCreateUserRequest) (*User, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *User + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsersV1ApiService.CreateUser") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/1/users" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.mappings != nil { + parameterAddToQuery(localVarQueryParams, "mappings", r.mappings, "") + } + if r.validatePolicy != nil { + parameterAddToQuery(localVarQueryParams, "validate_policy", r.validatePolicy, "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.user + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteUserRequest struct { + ctx context.Context + ApiService *UsersV1ApiService + userId int32 +} + +func (r ApiDeleteUserRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteUserExecute(r) +} + +/* +DeleteUser Delete a User + +Delete A User + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param userId Set to the id of the user that you want to return. + @return ApiDeleteUserRequest +*/ +func (a *UsersV1ApiService) DeleteUser(ctx context.Context, userId int32) ApiDeleteUserRequest { + return ApiDeleteUserRequest{ + ApiService: a, + ctx: ctx, + userId: userId, + } +} + +// Execute executes the request +func (a *UsersV1ApiService) DeleteUserExecute(r ApiDeleteUserRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsersV1ApiService.DeleteUser") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/1/users/{user_id}" + localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiGetCustomAttributesRequest struct { + ctx context.Context + ApiService *UsersV1ApiService +} + +func (r ApiGetCustomAttributesRequest) Execute() (*GetCustomAttributes200Response, *http.Response, error) { + return r.ApiService.GetCustomAttributesExecute(r) +} + +/* +GetCustomAttributes Get Custom Attributes + +Get Custom Attributes + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetCustomAttributesRequest +*/ +func (a *UsersV1ApiService) GetCustomAttributes(ctx context.Context) ApiGetCustomAttributesRequest { + return ApiGetCustomAttributesRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return GetCustomAttributes200Response +func (a *UsersV1ApiService) GetCustomAttributesExecute(r ApiGetCustomAttributesRequest) (*GetCustomAttributes200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GetCustomAttributes200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsersV1ApiService.GetCustomAttributes") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/1/users/custom_attributes" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetUserAppsRequest struct { + ctx context.Context + ApiService *UsersV1ApiService + userId int32 + ignoreVisibility *bool +} + +// Defaults to `false`. When `true` will show all apps that are assigned to a user regardless of their portal visibility setting. +func (r ApiGetUserAppsRequest) IgnoreVisibility(ignoreVisibility bool) ApiGetUserAppsRequest { + r.ignoreVisibility = &ignoreVisibility + return r +} + +func (r ApiGetUserAppsRequest) Execute() ([]GetUserApps200ResponseInner, *http.Response, error) { + return r.ApiService.GetUserAppsExecute(r) +} + +/* +GetUserApps Get Apps for a User + +Get Apps for User + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param userId Set to the id of the user that you want to return. + @return ApiGetUserAppsRequest +*/ +func (a *UsersV1ApiService) GetUserApps(ctx context.Context, userId int32) ApiGetUserAppsRequest { + return ApiGetUserAppsRequest{ + ApiService: a, + ctx: ctx, + userId: userId, + } +} + +// Execute executes the request +// @return []GetUserApps200ResponseInner +func (a *UsersV1ApiService) GetUserAppsExecute(r ApiGetUserAppsRequest) ([]GetUserApps200ResponseInner, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []GetUserApps200ResponseInner + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsersV1ApiService.GetUserApps") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/1/users/{user_id}/apps" + localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.ignoreVisibility != nil { + parameterAddToQuery(localVarQueryParams, "ignore_visibility", r.ignoreVisibility, "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetUserByIdRequest struct { + ctx context.Context + ApiService *UsersV1ApiService + userId int32 +} + +func (r ApiGetUserByIdRequest) Execute() (*User, *http.Response, error) { + return r.ApiService.GetUserByIdExecute(r) +} + +/* +GetUserById Get User by ID + +Get User By ID + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param userId Set to the id of the user that you want to return. + @return ApiGetUserByIdRequest +*/ +func (a *UsersV1ApiService) GetUserById(ctx context.Context, userId int32) ApiGetUserByIdRequest { + return ApiGetUserByIdRequest{ + ApiService: a, + ctx: ctx, + userId: userId, + } +} + +// Execute executes the request +// @return User +func (a *UsersV1ApiService) GetUserByIdExecute(r ApiGetUserByIdRequest) (*User, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *User + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsersV1ApiService.GetUserById") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/1/users/{user_id}" + localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetUserRolesRequest struct { + ctx context.Context + ApiService *UsersV1ApiService + userId int32 +} + +func (r ApiGetUserRolesRequest) Execute() (*GetUserRoles200Response, *http.Response, error) { + return r.ApiService.GetUserRolesExecute(r) +} + +/* +GetUserRoles Get Roles for a User + +Get User Roles + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param userId Set to the id of the user that you want to return. + @return ApiGetUserRolesRequest +*/ +func (a *UsersV1ApiService) GetUserRoles(ctx context.Context, userId int32) ApiGetUserRolesRequest { + return ApiGetUserRolesRequest{ + ApiService: a, + ctx: ctx, + userId: userId, + } +} + +// Execute executes the request +// @return GetUserRoles200Response +func (a *UsersV1ApiService) GetUserRolesExecute(r ApiGetUserRolesRequest) (*GetUserRoles200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GetUserRoles200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsersV1ApiService.GetUserRoles") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/1/users/{user_id}/roles" + localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListUsersRequest struct { + ctx context.Context + ApiService *UsersV1ApiService + limit *int32 + page *int32 + cursor *string + createdSince *string + createdUntil *string + updatedSince *string + updatedUntil *string + lastLoginSince *string + lastLoginUntil *string + firstname *string + lastname *string + email *string + username *string + samaccountname *string + directoryId *int32 + externalId *string + userIds *string + customAttributesAttributeName *string + fields *string +} + +// How many items to return at one time (max 100) +func (r ApiListUsersRequest) Limit(limit int32) ApiListUsersRequest { + r.limit = &limit + return r +} + +// The page number of results to return. +func (r ApiListUsersRequest) Page(page int32) ApiListUsersRequest { + r.page = &page + return r +} + +// Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. +func (r ApiListUsersRequest) Cursor(cursor string) ApiListUsersRequest { + r.cursor = &cursor + return r +} + +// An ISO8601 timestamp value that returns all users created after a given date & time. +func (r ApiListUsersRequest) CreatedSince(createdSince string) ApiListUsersRequest { + r.createdSince = &createdSince + return r +} + +// An ISO8601 timestamp value that returns all users created before a given date & time. +func (r ApiListUsersRequest) CreatedUntil(createdUntil string) ApiListUsersRequest { + r.createdUntil = &createdUntil + return r +} + +// An ISO8601 timestamp value that returns all users updated after a given date & time. +func (r ApiListUsersRequest) UpdatedSince(updatedSince string) ApiListUsersRequest { + r.updatedSince = &updatedSince + return r +} + +// An ISO8601 timestamp value that returns all users updated before a given date & time. +func (r ApiListUsersRequest) UpdatedUntil(updatedUntil string) ApiListUsersRequest { + r.updatedUntil = &updatedUntil + return r +} + +// An ISO8601 timestamp value that returns all users that logged in after a given date & time. +func (r ApiListUsersRequest) LastLoginSince(lastLoginSince string) ApiListUsersRequest { + r.lastLoginSince = &lastLoginSince + return r +} + +// An ISO8601 timestamp value that returns all users that logged in before a given date & time. +func (r ApiListUsersRequest) LastLoginUntil(lastLoginUntil string) ApiListUsersRequest { + r.lastLoginUntil = &lastLoginUntil + return r +} + +// The first name of the user +func (r ApiListUsersRequest) Firstname(firstname string) ApiListUsersRequest { + r.firstname = &firstname + return r +} + +// The last name of the user +func (r ApiListUsersRequest) Lastname(lastname string) ApiListUsersRequest { + r.lastname = &lastname + return r +} + +// The email address of the user +func (r ApiListUsersRequest) Email(email string) ApiListUsersRequest { + r.email = &email + return r +} + +// The username for the user +func (r ApiListUsersRequest) Username(username string) ApiListUsersRequest { + r.username = &username + return r +} + +// The AD login name for the user +func (r ApiListUsersRequest) Samaccountname(samaccountname string) ApiListUsersRequest { + r.samaccountname = &samaccountname + return r +} + +func (r ApiListUsersRequest) DirectoryId(directoryId int32) ApiListUsersRequest { + r.directoryId = &directoryId + return r +} + +// An external identifier that has been set on the user +func (r ApiListUsersRequest) ExternalId(externalId string) ApiListUsersRequest { + r.externalId = &externalId + return r +} + +// A comma separated list of OneLogin User IDs +func (r ApiListUsersRequest) UserIds(userIds string) ApiListUsersRequest { + r.userIds = &userIds + return r +} + +// The short name of a custom attribute. Note that the attribute name is prefixed with custom_attributes. +func (r ApiListUsersRequest) CustomAttributesAttributeName(customAttributesAttributeName string) ApiListUsersRequest { + r.customAttributesAttributeName = &customAttributesAttributeName + return r +} + +// Optional. Comma delimited list of fields to return. +func (r ApiListUsersRequest) Fields(fields string) ApiListUsersRequest { + r.fields = &fields + return r +} + +func (r ApiListUsersRequest) Execute() ([]User, *http.Response, error) { + return r.ApiService.ListUsersExecute(r) +} + +/* +ListUsers List Users + +List Users + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListUsersRequest +*/ +func (a *UsersV1ApiService) ListUsers(ctx context.Context) ApiListUsersRequest { + return ApiListUsersRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return []User +func (a *UsersV1ApiService) ListUsersExecute(r ApiListUsersRequest) ([]User, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []User + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsersV1ApiService.ListUsers") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/1/users" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.limit != nil { + parameterAddToQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.page != nil { + parameterAddToQuery(localVarQueryParams, "page", r.page, "") + } + if r.cursor != nil { + parameterAddToQuery(localVarQueryParams, "cursor", r.cursor, "") + } + if r.createdSince != nil { + parameterAddToQuery(localVarQueryParams, "created_since", r.createdSince, "") + } + if r.createdUntil != nil { + parameterAddToQuery(localVarQueryParams, "created_until", r.createdUntil, "") + } + if r.updatedSince != nil { + parameterAddToQuery(localVarQueryParams, "updated_since", r.updatedSince, "") + } + if r.updatedUntil != nil { + parameterAddToQuery(localVarQueryParams, "updated_until", r.updatedUntil, "") + } + if r.lastLoginSince != nil { + parameterAddToQuery(localVarQueryParams, "last_login_since", r.lastLoginSince, "") + } + if r.lastLoginUntil != nil { + parameterAddToQuery(localVarQueryParams, "last_login_until", r.lastLoginUntil, "") + } + if r.firstname != nil { + parameterAddToQuery(localVarQueryParams, "firstname", r.firstname, "") + } + if r.lastname != nil { + parameterAddToQuery(localVarQueryParams, "lastname", r.lastname, "") + } + if r.email != nil { + parameterAddToQuery(localVarQueryParams, "email", r.email, "") + } + if r.username != nil { + parameterAddToQuery(localVarQueryParams, "username", r.username, "") + } + if r.samaccountname != nil { + parameterAddToQuery(localVarQueryParams, "samaccountname", r.samaccountname, "") + } + if r.directoryId != nil { + parameterAddToQuery(localVarQueryParams, "directory_id", r.directoryId, "") + } + if r.externalId != nil { + parameterAddToQuery(localVarQueryParams, "external_id", r.externalId, "") + } + if r.userIds != nil { + parameterAddToQuery(localVarQueryParams, "user_ids", r.userIds, "") + } + if r.customAttributesAttributeName != nil { + parameterAddToQuery(localVarQueryParams, "custom_attributes.{attribute_name}", r.customAttributesAttributeName, "") + } + if r.fields != nil { + parameterAddToQuery(localVarQueryParams, "fields", r.fields, "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiLockAccountUserRequest struct { + ctx context.Context + ApiService *UsersV1ApiService + userId int32 + lockAccountUserRequest *LockAccountUserRequest +} + +func (r ApiLockAccountUserRequest) LockAccountUserRequest(lockAccountUserRequest LockAccountUserRequest) ApiLockAccountUserRequest { + r.lockAccountUserRequest = &lockAccountUserRequest + return r +} + +func (r ApiLockAccountUserRequest) Execute() (*Error, *http.Response, error) { + return r.ApiService.LockAccountUserExecute(r) +} + +/* +LockAccountUser Lock User Account + +Lock User Account + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param userId Set to the id of the user that you want to return. + @return ApiLockAccountUserRequest +*/ +func (a *UsersV1ApiService) LockAccountUser(ctx context.Context, userId int32) ApiLockAccountUserRequest { + return ApiLockAccountUserRequest{ + ApiService: a, + ctx: ctx, + userId: userId, + } +} + +// Execute executes the request +// @return Error +func (a *UsersV1ApiService) LockAccountUserExecute(r ApiLockAccountUserRequest) (*Error, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Error + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsersV1ApiService.LockAccountUser") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/1/users/{user_id}/lock_user" + localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.lockAccountUserRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiLogOutUserRequest struct { + ctx context.Context + ApiService *UsersV1ApiService + userId int32 + body *map[string]interface{} +} + +func (r ApiLogOutUserRequest) Body(body map[string]interface{}) ApiLogOutUserRequest { + r.body = &body + return r +} + +func (r ApiLogOutUserRequest) Execute() (*Error, *http.Response, error) { + return r.ApiService.LogOutUserExecute(r) +} + +/* +LogOutUser Log User Out + +Log Out User + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param userId Set to the id of the user that you want to return. + @return ApiLogOutUserRequest +*/ +func (a *UsersV1ApiService) LogOutUser(ctx context.Context, userId int32) ApiLogOutUserRequest { + return ApiLogOutUserRequest{ + ApiService: a, + ctx: ctx, + userId: userId, + } +} + +// Execute executes the request +// @return Error +func (a *UsersV1ApiService) LogOutUserExecute(r ApiLogOutUserRequest) (*Error, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Error + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsersV1ApiService.LogOutUser") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/1/users/{user_id}/logout" + localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.body + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRemoveUserRoleRequest struct { + ctx context.Context + ApiService *UsersV1ApiService + userId int32 + removeUserRoleRequest *RemoveUserRoleRequest +} + +func (r ApiRemoveUserRoleRequest) RemoveUserRoleRequest(removeUserRoleRequest RemoveUserRoleRequest) ApiRemoveUserRoleRequest { + r.removeUserRoleRequest = &removeUserRoleRequest + return r +} + +func (r ApiRemoveUserRoleRequest) Execute() (*Error, *http.Response, error) { + return r.ApiService.RemoveUserRoleExecute(r) +} + +/* +RemoveUserRole Remove Roles for a User + +Remove Roles for a User + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param userId Set to the id of the user that you want to return. + @return ApiRemoveUserRoleRequest +*/ +func (a *UsersV1ApiService) RemoveUserRole(ctx context.Context, userId int32) ApiRemoveUserRoleRequest { + return ApiRemoveUserRoleRequest{ + ApiService: a, + ctx: ctx, + userId: userId, + } +} + +// Execute executes the request +// @return Error +func (a *UsersV1ApiService) RemoveUserRoleExecute(r ApiRemoveUserRoleRequest) (*Error, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Error + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsersV1ApiService.RemoveUserRole") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/1/users/{user_id}/remove_roles" + localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.removeUserRoleRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSetUserStateRequest struct { + ctx context.Context + ApiService *UsersV1ApiService + userId int32 + setUserStateRequest *SetUserStateRequest +} + +func (r ApiSetUserStateRequest) SetUserStateRequest(setUserStateRequest SetUserStateRequest) ApiSetUserStateRequest { + r.setUserStateRequest = &setUserStateRequest + return r +} + +func (r ApiSetUserStateRequest) Execute() (*Error, *http.Response, error) { + return r.ApiService.SetUserStateExecute(r) +} + +/* +SetUserState Set User State + +Set User State + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param userId Set to the id of the user that you want to return. + @return ApiSetUserStateRequest +*/ +func (a *UsersV1ApiService) SetUserState(ctx context.Context, userId int32) ApiSetUserStateRequest { + return ApiSetUserStateRequest{ + ApiService: a, + ctx: ctx, + userId: userId, + } +} + +// Execute executes the request +// @return Error +func (a *UsersV1ApiService) SetUserStateExecute(r ApiSetUserStateRequest) (*Error, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Error + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsersV1ApiService.SetUserState") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/1/users/{user_id}/set_state" + localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.setUserStateRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdatePasswordInsecureRequest struct { + ctx context.Context + ApiService *UsersV1ApiService + userId int32 + updatePasswordInsecureRequest *UpdatePasswordInsecureRequest +} + +func (r ApiUpdatePasswordInsecureRequest) UpdatePasswordInsecureRequest(updatePasswordInsecureRequest UpdatePasswordInsecureRequest) ApiUpdatePasswordInsecureRequest { + r.updatePasswordInsecureRequest = &updatePasswordInsecureRequest + return r +} + +func (r ApiUpdatePasswordInsecureRequest) Execute() (*Error, *http.Response, error) { + return r.ApiService.UpdatePasswordInsecureExecute(r) +} + +/* +UpdatePasswordInsecure Set Password Using ID in Cleartext + +Update User password using their ID. This is done in cleartext and is insecure. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param userId Set to the id of the user that you want to return. + @return ApiUpdatePasswordInsecureRequest +*/ +func (a *UsersV1ApiService) UpdatePasswordInsecure(ctx context.Context, userId int32) ApiUpdatePasswordInsecureRequest { + return ApiUpdatePasswordInsecureRequest{ + ApiService: a, + ctx: ctx, + userId: userId, + } +} + +// Execute executes the request +// @return Error +func (a *UsersV1ApiService) UpdatePasswordInsecureExecute(r ApiUpdatePasswordInsecureRequest) (*Error, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Error + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsersV1ApiService.UpdatePasswordInsecure") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/1/users/set_password_clear_text/{user_id}" + localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.updatePasswordInsecureRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdatePasswordSecureRequest struct { + ctx context.Context + ApiService *UsersV1ApiService + userId int32 + updatePasswordSecureRequest *UpdatePasswordSecureRequest +} + +func (r ApiUpdatePasswordSecureRequest) UpdatePasswordSecureRequest(updatePasswordSecureRequest UpdatePasswordSecureRequest) ApiUpdatePasswordSecureRequest { + r.updatePasswordSecureRequest = &updatePasswordSecureRequest + return r +} + +func (r ApiUpdatePasswordSecureRequest) Execute() (*Error, *http.Response, error) { + return r.ApiService.UpdatePasswordSecureExecute(r) +} + +/* +UpdatePasswordSecure Set Password Using ID and SHA-256 and Salt + +Update User Password Using ID and SHA-256 with salt. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param userId Set to the id of the user that you want to return. + @return ApiUpdatePasswordSecureRequest +*/ +func (a *UsersV1ApiService) UpdatePasswordSecure(ctx context.Context, userId int32) ApiUpdatePasswordSecureRequest { + return ApiUpdatePasswordSecureRequest{ + ApiService: a, + ctx: ctx, + userId: userId, + } +} + +// Execute executes the request +// @return Error +func (a *UsersV1ApiService) UpdatePasswordSecureExecute(r ApiUpdatePasswordSecureRequest) (*Error, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Error + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsersV1ApiService.UpdatePasswordSecure") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/1/users/set_password_using_salt/{user_id}" + localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.updatePasswordSecureRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateUserRequest struct { + ctx context.Context + ApiService *UsersV1ApiService + userId int32 + mappings *string + validatePolicy *bool + user *User +} + +// Controls how mappings will be applied to the user on creation. Defaults to async. +func (r ApiUpdateUserRequest) Mappings(mappings string) ApiUpdateUserRequest { + r.mappings = &mappings + return r +} + +// Will passwords validate against the User Policy? Defaults to true. +func (r ApiUpdateUserRequest) ValidatePolicy(validatePolicy bool) ApiUpdateUserRequest { + r.validatePolicy = &validatePolicy + return r +} + +func (r ApiUpdateUserRequest) User(user User) ApiUpdateUserRequest { + r.user = &user + return r +} + +func (r ApiUpdateUserRequest) Execute() (*User, *http.Response, error) { + return r.ApiService.UpdateUserExecute(r) +} + +/* +UpdateUser Update a User + +Update a User + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param userId Set to the id of the user that you want to return. + @return ApiUpdateUserRequest +*/ +func (a *UsersV1ApiService) UpdateUser(ctx context.Context, userId int32) ApiUpdateUserRequest { + return ApiUpdateUserRequest{ + ApiService: a, + ctx: ctx, + userId: userId, + } +} + +// Execute executes the request +// @return User +func (a *UsersV1ApiService) UpdateUserExecute(r ApiUpdateUserRequest) (*User, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *User + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsersV1ApiService.UpdateUser") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/1/users/{user_id}" + localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.mappings != nil { + parameterAddToQuery(localVarQueryParams, "mappings", r.mappings, "") + } + if r.validatePolicy != nil { + parameterAddToQuery(localVarQueryParams, "validate_policy", r.validatePolicy, "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.user + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/api_users_v2.go b/api_users_v2.go new file mode 100644 index 0000000..155b701 --- /dev/null +++ b/api_users_v2.go @@ -0,0 +1,1048 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "bytes" + "context" + "io/ioutil" + "net/http" + "net/url" + "strings" +) + + +// UsersV2ApiService UsersV2Api service +type UsersV2ApiService service + +type ApiCreateUser2Request struct { + ctx context.Context + ApiService *UsersV2ApiService + mappings *string + validatePolicy *bool + user *User +} + +// Controls how mappings will be applied to the user on creation. Defaults to async. +func (r ApiCreateUser2Request) Mappings(mappings string) ApiCreateUser2Request { + r.mappings = &mappings + return r +} + +// Will passwords validate against the User Policy? Defaults to true. +func (r ApiCreateUser2Request) ValidatePolicy(validatePolicy bool) ApiCreateUser2Request { + r.validatePolicy = &validatePolicy + return r +} + +func (r ApiCreateUser2Request) User(user User) ApiCreateUser2Request { + r.user = &user + return r +} + +func (r ApiCreateUser2Request) Execute() (*User, *http.Response, error) { + return r.ApiService.CreateUser2Execute(r) +} + +/* +CreateUser2 Create User + +Create User + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateUser2Request +*/ +func (a *UsersV2ApiService) CreateUser2(ctx context.Context) ApiCreateUser2Request { + return ApiCreateUser2Request{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return User +func (a *UsersV2ApiService) CreateUser2Execute(r ApiCreateUser2Request) (*User, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *User + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsersV2ApiService.CreateUser2") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/users" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.mappings != nil { + parameterAddToQuery(localVarQueryParams, "mappings", r.mappings, "") + } + if r.validatePolicy != nil { + parameterAddToQuery(localVarQueryParams, "validate_policy", r.validatePolicy, "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.user + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteUser2Request struct { + ctx context.Context + ApiService *UsersV2ApiService + userId int32 +} + +func (r ApiDeleteUser2Request) Execute() (*http.Response, error) { + return r.ApiService.DeleteUser2Execute(r) +} + +/* +DeleteUser2 Delete User + +Delete User + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param userId Set to the id of the user that you want to return. + @return ApiDeleteUser2Request +*/ +func (a *UsersV2ApiService) DeleteUser2(ctx context.Context, userId int32) ApiDeleteUser2Request { + return ApiDeleteUser2Request{ + ApiService: a, + ctx: ctx, + userId: userId, + } +} + +// Execute executes the request +func (a *UsersV2ApiService) DeleteUser2Execute(r ApiDeleteUser2Request) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsersV2ApiService.DeleteUser2") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/users/{user_id}" + localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiGetUser2Request struct { + ctx context.Context + ApiService *UsersV2ApiService + userId int32 +} + +func (r ApiGetUser2Request) Execute() (*User, *http.Response, error) { + return r.ApiService.GetUser2Execute(r) +} + +/* +GetUser2 Get User + +Get User + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param userId Set to the id of the user that you want to return. + @return ApiGetUser2Request +*/ +func (a *UsersV2ApiService) GetUser2(ctx context.Context, userId int32) ApiGetUser2Request { + return ApiGetUser2Request{ + ApiService: a, + ctx: ctx, + userId: userId, + } +} + +// Execute executes the request +// @return User +func (a *UsersV2ApiService) GetUser2Execute(r ApiGetUser2Request) (*User, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *User + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsersV2ApiService.GetUser2") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/users/{user_id}" + localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetUserApps2Request struct { + ctx context.Context + ApiService *UsersV2ApiService + userId int32 + ignoreVisibility *bool +} + +// Defaults to `false`. When `true` will show all apps that are assigned to a user regardless of their portal visibility setting. +func (r ApiGetUserApps2Request) IgnoreVisibility(ignoreVisibility bool) ApiGetUserApps2Request { + r.ignoreVisibility = &ignoreVisibility + return r +} + +func (r ApiGetUserApps2Request) Execute() ([]GetUserApps200ResponseInner, *http.Response, error) { + return r.ApiService.GetUserApps2Execute(r) +} + +/* +GetUserApps2 Get User Apps + +Get User Apps + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param userId Set to the id of the user that you want to return. + @return ApiGetUserApps2Request +*/ +func (a *UsersV2ApiService) GetUserApps2(ctx context.Context, userId int32) ApiGetUserApps2Request { + return ApiGetUserApps2Request{ + ApiService: a, + ctx: ctx, + userId: userId, + } +} + +// Execute executes the request +// @return []GetUserApps200ResponseInner +func (a *UsersV2ApiService) GetUserApps2Execute(r ApiGetUserApps2Request) ([]GetUserApps200ResponseInner, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []GetUserApps200ResponseInner + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsersV2ApiService.GetUserApps2") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/users/{user_id}/apps" + localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.ignoreVisibility != nil { + parameterAddToQuery(localVarQueryParams, "ignore_visibility", r.ignoreVisibility, "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListUsers2Request struct { + ctx context.Context + ApiService *UsersV2ApiService + limit *int32 + page *int32 + cursor *string + createdSince *string + createdUntil *string + updatedSince *string + updatedUntil *string + lastLoginSince *string + lastLoginUntil *string + firstname *string + lastname *string + email *string + username *string + samaccountname *string + directoryId *int32 + externalId *string + userIds *string + customAttributesAttributeName *string + fields *string +} + +// How many items to return at one time (max 100) +func (r ApiListUsers2Request) Limit(limit int32) ApiListUsers2Request { + r.limit = &limit + return r +} + +// The page number of results to return. +func (r ApiListUsers2Request) Page(page int32) ApiListUsers2Request { + r.page = &page + return r +} + +// Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. +func (r ApiListUsers2Request) Cursor(cursor string) ApiListUsers2Request { + r.cursor = &cursor + return r +} + +// An ISO8601 timestamp value that returns all users created after a given date & time. +func (r ApiListUsers2Request) CreatedSince(createdSince string) ApiListUsers2Request { + r.createdSince = &createdSince + return r +} + +// An ISO8601 timestamp value that returns all users created before a given date & time. +func (r ApiListUsers2Request) CreatedUntil(createdUntil string) ApiListUsers2Request { + r.createdUntil = &createdUntil + return r +} + +// An ISO8601 timestamp value that returns all users updated after a given date & time. +func (r ApiListUsers2Request) UpdatedSince(updatedSince string) ApiListUsers2Request { + r.updatedSince = &updatedSince + return r +} + +// An ISO8601 timestamp value that returns all users updated before a given date & time. +func (r ApiListUsers2Request) UpdatedUntil(updatedUntil string) ApiListUsers2Request { + r.updatedUntil = &updatedUntil + return r +} + +// An ISO8601 timestamp value that returns all users that logged in after a given date & time. +func (r ApiListUsers2Request) LastLoginSince(lastLoginSince string) ApiListUsers2Request { + r.lastLoginSince = &lastLoginSince + return r +} + +// An ISO8601 timestamp value that returns all users that logged in before a given date & time. +func (r ApiListUsers2Request) LastLoginUntil(lastLoginUntil string) ApiListUsers2Request { + r.lastLoginUntil = &lastLoginUntil + return r +} + +// The first name of the user +func (r ApiListUsers2Request) Firstname(firstname string) ApiListUsers2Request { + r.firstname = &firstname + return r +} + +// The last name of the user +func (r ApiListUsers2Request) Lastname(lastname string) ApiListUsers2Request { + r.lastname = &lastname + return r +} + +// The email address of the user +func (r ApiListUsers2Request) Email(email string) ApiListUsers2Request { + r.email = &email + return r +} + +// The username for the user +func (r ApiListUsers2Request) Username(username string) ApiListUsers2Request { + r.username = &username + return r +} + +// The AD login name for the user +func (r ApiListUsers2Request) Samaccountname(samaccountname string) ApiListUsers2Request { + r.samaccountname = &samaccountname + return r +} + +func (r ApiListUsers2Request) DirectoryId(directoryId int32) ApiListUsers2Request { + r.directoryId = &directoryId + return r +} + +// An external identifier that has been set on the user +func (r ApiListUsers2Request) ExternalId(externalId string) ApiListUsers2Request { + r.externalId = &externalId + return r +} + +// A comma separated list of OneLogin User IDs +func (r ApiListUsers2Request) UserIds(userIds string) ApiListUsers2Request { + r.userIds = &userIds + return r +} + +// The short name of a custom attribute. Note that the attribute name is prefixed with custom_attributes. +func (r ApiListUsers2Request) CustomAttributesAttributeName(customAttributesAttributeName string) ApiListUsers2Request { + r.customAttributesAttributeName = &customAttributesAttributeName + return r +} + +// Optional. Comma delimited list of fields to return. +func (r ApiListUsers2Request) Fields(fields string) ApiListUsers2Request { + r.fields = &fields + return r +} + +func (r ApiListUsers2Request) Execute() ([]User, *http.Response, error) { + return r.ApiService.ListUsers2Execute(r) +} + +/* +ListUsers2 List Users + +Get a list of users + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListUsers2Request +*/ +func (a *UsersV2ApiService) ListUsers2(ctx context.Context) ApiListUsers2Request { + return ApiListUsers2Request{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return []User +func (a *UsersV2ApiService) ListUsers2Execute(r ApiListUsers2Request) ([]User, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []User + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsersV2ApiService.ListUsers2") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/users" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.limit != nil { + parameterAddToQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.page != nil { + parameterAddToQuery(localVarQueryParams, "page", r.page, "") + } + if r.cursor != nil { + parameterAddToQuery(localVarQueryParams, "cursor", r.cursor, "") + } + if r.createdSince != nil { + parameterAddToQuery(localVarQueryParams, "created_since", r.createdSince, "") + } + if r.createdUntil != nil { + parameterAddToQuery(localVarQueryParams, "created_until", r.createdUntil, "") + } + if r.updatedSince != nil { + parameterAddToQuery(localVarQueryParams, "updated_since", r.updatedSince, "") + } + if r.updatedUntil != nil { + parameterAddToQuery(localVarQueryParams, "updated_until", r.updatedUntil, "") + } + if r.lastLoginSince != nil { + parameterAddToQuery(localVarQueryParams, "last_login_since", r.lastLoginSince, "") + } + if r.lastLoginUntil != nil { + parameterAddToQuery(localVarQueryParams, "last_login_until", r.lastLoginUntil, "") + } + if r.firstname != nil { + parameterAddToQuery(localVarQueryParams, "firstname", r.firstname, "") + } + if r.lastname != nil { + parameterAddToQuery(localVarQueryParams, "lastname", r.lastname, "") + } + if r.email != nil { + parameterAddToQuery(localVarQueryParams, "email", r.email, "") + } + if r.username != nil { + parameterAddToQuery(localVarQueryParams, "username", r.username, "") + } + if r.samaccountname != nil { + parameterAddToQuery(localVarQueryParams, "samaccountname", r.samaccountname, "") + } + if r.directoryId != nil { + parameterAddToQuery(localVarQueryParams, "directory_id", r.directoryId, "") + } + if r.externalId != nil { + parameterAddToQuery(localVarQueryParams, "external_id", r.externalId, "") + } + if r.userIds != nil { + parameterAddToQuery(localVarQueryParams, "user_ids", r.userIds, "") + } + if r.customAttributesAttributeName != nil { + parameterAddToQuery(localVarQueryParams, "custom_attributes.{attribute_name}", r.customAttributesAttributeName, "") + } + if r.fields != nil { + parameterAddToQuery(localVarQueryParams, "fields", r.fields, "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateUser2Request struct { + ctx context.Context + ApiService *UsersV2ApiService + userId int32 + mappings *string + validatePolicy *bool + user *User +} + +// Controls how mappings will be applied to the user on creation. Defaults to async. +func (r ApiUpdateUser2Request) Mappings(mappings string) ApiUpdateUser2Request { + r.mappings = &mappings + return r +} + +// Will passwords validate against the User Policy? Defaults to true. +func (r ApiUpdateUser2Request) ValidatePolicy(validatePolicy bool) ApiUpdateUser2Request { + r.validatePolicy = &validatePolicy + return r +} + +func (r ApiUpdateUser2Request) User(user User) ApiUpdateUser2Request { + r.user = &user + return r +} + +func (r ApiUpdateUser2Request) Execute() (*User, *http.Response, error) { + return r.ApiService.UpdateUser2Execute(r) +} + +/* +UpdateUser2 Update User + +Update User + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param userId Set to the id of the user that you want to return. + @return ApiUpdateUser2Request +*/ +func (a *UsersV2ApiService) UpdateUser2(ctx context.Context, userId int32) ApiUpdateUser2Request { + return ApiUpdateUser2Request{ + ApiService: a, + ctx: ctx, + userId: userId, + } +} + +// Execute executes the request +// @return User +func (a *UsersV2ApiService) UpdateUser2Execute(r ApiUpdateUser2Request) (*User, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *User + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsersV2ApiService.UpdateUser2") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/users/{user_id}" + localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.mappings != nil { + parameterAddToQuery(localVarQueryParams, "mappings", r.mappings, "") + } + if r.validatePolicy != nil { + parameterAddToQuery(localVarQueryParams, "validate_policy", r.validatePolicy, "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.user + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/api_vigilance_ai.go b/api_vigilance_ai.go new file mode 100644 index 0000000..1a87ba6 --- /dev/null +++ b/api_vigilance_ai.go @@ -0,0 +1,988 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "bytes" + "context" + "io/ioutil" + "net/http" + "net/url" + "strings" +) + + +// VigilanceAIApiService VigilanceAIApi service +type VigilanceAIApiService service + +type ApiCreateRiskRuleRequest struct { + ctx context.Context + ApiService *VigilanceAIApiService + riskRule *RiskRule +} + +func (r ApiCreateRiskRuleRequest) RiskRule(riskRule RiskRule) ApiCreateRiskRuleRequest { + r.riskRule = &riskRule + return r +} + +func (r ApiCreateRiskRuleRequest) Execute() (*RiskRule, *http.Response, error) { + return r.ApiService.CreateRiskRuleExecute(r) +} + +/* +CreateRiskRule Create Rule + +Create Vigilance AI (Risk Service) Rule + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateRiskRuleRequest +*/ +func (a *VigilanceAIApiService) CreateRiskRule(ctx context.Context) ApiCreateRiskRuleRequest { + return ApiCreateRiskRuleRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return RiskRule +func (a *VigilanceAIApiService) CreateRiskRuleExecute(r ApiCreateRiskRuleRequest) (*RiskRule, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RiskRule + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "VigilanceAIApiService.CreateRiskRule") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/risk/rules" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.riskRule + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteRiskRuleRequest struct { + ctx context.Context + ApiService *VigilanceAIApiService + ruleId string +} + +func (r ApiDeleteRiskRuleRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteRiskRuleExecute(r) +} + +/* +DeleteRiskRule Delete Rule + +Delete Vigilance AI (Risk Service) + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ruleId + @return ApiDeleteRiskRuleRequest +*/ +func (a *VigilanceAIApiService) DeleteRiskRule(ctx context.Context, ruleId string) ApiDeleteRiskRuleRequest { + return ApiDeleteRiskRuleRequest{ + ApiService: a, + ctx: ctx, + ruleId: ruleId, + } +} + +// Execute executes the request +func (a *VigilanceAIApiService) DeleteRiskRuleExecute(r ApiDeleteRiskRuleRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "VigilanceAIApiService.DeleteRiskRule") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/risk/rules/{rule_id}" + localVarPath = strings.Replace(localVarPath, "{"+"rule_id"+"}", url.PathEscape(parameterValueToString(r.ruleId, "ruleId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiGetRiskRuleRequest struct { + ctx context.Context + ApiService *VigilanceAIApiService + ruleId string +} + +func (r ApiGetRiskRuleRequest) Execute() (*RiskRule, *http.Response, error) { + return r.ApiService.GetRiskRuleExecute(r) +} + +/* +GetRiskRule get Risk Rule + +Use this API to return a single rule that has been created in the Risk Sevice. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ruleId + @return ApiGetRiskRuleRequest +*/ +func (a *VigilanceAIApiService) GetRiskRule(ctx context.Context, ruleId string) ApiGetRiskRuleRequest { + return ApiGetRiskRuleRequest{ + ApiService: a, + ctx: ctx, + ruleId: ruleId, + } +} + +// Execute executes the request +// @return RiskRule +func (a *VigilanceAIApiService) GetRiskRuleExecute(r ApiGetRiskRuleRequest) (*RiskRule, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RiskRule + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "VigilanceAIApiService.GetRiskRule") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/risk/rules/{rule_id}" + localVarPath = strings.Replace(localVarPath, "{"+"rule_id"+"}", url.PathEscape(parameterValueToString(r.ruleId, "ruleId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetRiskScoreRequest struct { + ctx context.Context + ApiService *VigilanceAIApiService + getRiskScoreRequest *GetRiskScoreRequest + before *string + after *string +} + +func (r ApiGetRiskScoreRequest) GetRiskScoreRequest(getRiskScoreRequest GetRiskScoreRequest) ApiGetRiskScoreRequest { + r.getRiskScoreRequest = &getRiskScoreRequest + return r +} + +// Optional ISO8601 formatted date string. Defaults to current date. Maximum date is 90 days ago. +func (r ApiGetRiskScoreRequest) Before(before string) ApiGetRiskScoreRequest { + r.before = &before + return r +} + +// Optional ISO8601 formatted date string. Defaults to 30 days ago. Maximum date is 90 days ago. +func (r ApiGetRiskScoreRequest) After(after string) ApiGetRiskScoreRequest { + r.after = &after + return r +} + +func (r ApiGetRiskScoreRequest) Execute() (*GetRiskScore200Response, *http.Response, error) { + return r.ApiService.GetRiskScoreExecute(r) +} + +/* +GetRiskScore Get a Risk Score + +Get Vigilance AI (Risk Service) Score + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetRiskScoreRequest +*/ +func (a *VigilanceAIApiService) GetRiskScore(ctx context.Context) ApiGetRiskScoreRequest { + return ApiGetRiskScoreRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return GetRiskScore200Response +func (a *VigilanceAIApiService) GetRiskScoreExecute(r ApiGetRiskScoreRequest) (*GetRiskScore200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GetRiskScore200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "VigilanceAIApiService.GetRiskScore") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/risk/verify" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.getRiskScoreRequest == nil { + return localVarReturnValue, nil, reportError("getRiskScoreRequest is required and must be specified") + } + + if r.before != nil { + parameterAddToQuery(localVarQueryParams, "before", r.before, "") + } + if r.after != nil { + parameterAddToQuery(localVarQueryParams, "after", r.after, "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.getRiskScoreRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetRiskScoresRequest struct { + ctx context.Context + ApiService *VigilanceAIApiService +} + +func (r ApiGetRiskScoresRequest) Execute() (*GetRiskScores200Response, *http.Response, error) { + return r.ApiService.GetRiskScoresExecute(r) +} + +/* +GetRiskScores Get Score Summary + +Get Vigilance AI (Risk Service) Score Summary + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetRiskScoresRequest +*/ +func (a *VigilanceAIApiService) GetRiskScores(ctx context.Context) ApiGetRiskScoresRequest { + return ApiGetRiskScoresRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return GetRiskScores200Response +func (a *VigilanceAIApiService) GetRiskScoresExecute(r ApiGetRiskScoresRequest) (*GetRiskScores200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GetRiskScores200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "VigilanceAIApiService.GetRiskScores") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/risk/scores" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListRiskRulesRequest struct { + ctx context.Context + ApiService *VigilanceAIApiService +} + +func (r ApiListRiskRulesRequest) Execute() ([]RiskRule, *http.Response, error) { + return r.ApiService.ListRiskRulesExecute(r) +} + +/* +ListRiskRules List Rules + +List Vigilance AI (Risk Service) Rules + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListRiskRulesRequest +*/ +func (a *VigilanceAIApiService) ListRiskRules(ctx context.Context) ApiListRiskRulesRequest { + return ApiListRiskRulesRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return []RiskRule +func (a *VigilanceAIApiService) ListRiskRulesExecute(r ApiListRiskRulesRequest) ([]RiskRule, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []RiskRule + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "VigilanceAIApiService.ListRiskRules") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/risk/rules" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiTrackRiskEventRequest struct { + ctx context.Context + ApiService *VigilanceAIApiService + trackRiskEventRequest *TrackRiskEventRequest +} + +func (r ApiTrackRiskEventRequest) TrackRiskEventRequest(trackRiskEventRequest TrackRiskEventRequest) ApiTrackRiskEventRequest { + r.trackRiskEventRequest = &trackRiskEventRequest + return r +} + +func (r ApiTrackRiskEventRequest) Execute() (*http.Response, error) { + return r.ApiService.TrackRiskEventExecute(r) +} + +/* +TrackRiskEvent Track an Event + +Track Vigilance AI (Risk Service) Event + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTrackRiskEventRequest +*/ +func (a *VigilanceAIApiService) TrackRiskEvent(ctx context.Context) ApiTrackRiskEventRequest { + return ApiTrackRiskEventRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +func (a *VigilanceAIApiService) TrackRiskEventExecute(r ApiTrackRiskEventRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "VigilanceAIApiService.TrackRiskEvent") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/risk/events" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.trackRiskEventRequest == nil { + return nil, reportError("trackRiskEventRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.trackRiskEventRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiUpdateRiskRuleRequest struct { + ctx context.Context + ApiService *VigilanceAIApiService + ruleId string + updateRiskRuleRequest *UpdateRiskRuleRequest +} + +func (r ApiUpdateRiskRuleRequest) UpdateRiskRuleRequest(updateRiskRuleRequest UpdateRiskRuleRequest) ApiUpdateRiskRuleRequest { + r.updateRiskRuleRequest = &updateRiskRuleRequest + return r +} + +func (r ApiUpdateRiskRuleRequest) Execute() (*RiskRule, *http.Response, error) { + return r.ApiService.UpdateRiskRuleExecute(r) +} + +/* +UpdateRiskRule Update Rule + +Update Vigilance AI (Risk Service) Rule + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param ruleId + @return ApiUpdateRiskRuleRequest +*/ +func (a *VigilanceAIApiService) UpdateRiskRule(ctx context.Context, ruleId string) ApiUpdateRiskRuleRequest { + return ApiUpdateRiskRuleRequest{ + ApiService: a, + ctx: ctx, + ruleId: ruleId, + } +} + +// Execute executes the request +// @return RiskRule +func (a *VigilanceAIApiService) UpdateRiskRuleExecute(r ApiUpdateRiskRuleRequest) (*RiskRule, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RiskRule + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "VigilanceAIApiService.UpdateRiskRule") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/2/risk/rules/{rule_id}" + localVarPath = strings.Replace(localVarPath, "{"+"rule_id"+"}", url.PathEscape(parameterValueToString(r.ruleId, "ruleId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.updateRiskRuleRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/client.go b/client.go index 5e859b8..97fba65 100644 --- a/client.go +++ b/client.go @@ -1,14 +1,14 @@ /* OneLogin API -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) +OpenAPI Specification for OneLogin -API version: 3.0.0-alpha.1 +API version: 3.1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package openapi +package onelogin import ( "bytes" @@ -39,9 +39,11 @@ import ( var ( 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 OneLogin API API v3.0.0-alpha.1 +// APIClient manages communication with the OneLogin API API v3.1.1 // In most cases there should be only one, shared, APIClient. type APIClient struct { cfg *Configuration @@ -49,7 +51,51 @@ type APIClient struct { // API Services - DefaultApi *DefaultApiService + APIAuthClaimsApi *APIAuthClaimsApiService + + APIAuthClientAppsApi *APIAuthClientAppsApiService + + APIAuthScopesApi *APIAuthScopesApiService + + APIAuthorizationServerApi *APIAuthorizationServerApiService + + AppRulesApi *AppRulesApiService + + AppsApi *AppsApiService + + BrandingServiceApi *BrandingServiceApiService + + BrandingServiceSMTPApi *BrandingServiceSMTPApiService + + BrandingServiceTemplatesApi *BrandingServiceTemplatesApiService + + EventsApi *EventsApiService + + GroupsApi *GroupsApiService + + InviteLinksApi *InviteLinksApiService + + MultiFactorAuthenticationApi *MultiFactorAuthenticationApiService + + MultiFactorAuthenticationV1Api *MultiFactorAuthenticationV1ApiService + + OAuth2Api *OAuth2ApiService + + PrivilegesApi *PrivilegesApiService + + RolesApi *RolesApiService + + SAMLAssertionsApi *SAMLAssertionsApiService + + SmartHooksApi *SmartHooksApiService + + UserMappingsApi *UserMappingsApiService + + UsersV1Api *UsersV1ApiService + + UsersV2Api *UsersV2ApiService + + VigilanceAIApi *VigilanceAIApiService } type service struct { @@ -68,7 +114,29 @@ func NewAPIClient(cfg *Configuration) *APIClient { c.common.client = c // API Services - c.DefaultApi = (*DefaultApiService)(&c.common) + c.APIAuthClaimsApi = (*APIAuthClaimsApiService)(&c.common) + c.APIAuthClientAppsApi = (*APIAuthClientAppsApiService)(&c.common) + c.APIAuthScopesApi = (*APIAuthScopesApiService)(&c.common) + c.APIAuthorizationServerApi = (*APIAuthorizationServerApiService)(&c.common) + c.AppRulesApi = (*AppRulesApiService)(&c.common) + c.AppsApi = (*AppsApiService)(&c.common) + c.BrandingServiceApi = (*BrandingServiceApiService)(&c.common) + c.BrandingServiceSMTPApi = (*BrandingServiceSMTPApiService)(&c.common) + c.BrandingServiceTemplatesApi = (*BrandingServiceTemplatesApiService)(&c.common) + c.EventsApi = (*EventsApiService)(&c.common) + c.GroupsApi = (*GroupsApiService)(&c.common) + c.InviteLinksApi = (*InviteLinksApiService)(&c.common) + c.MultiFactorAuthenticationApi = (*MultiFactorAuthenticationApiService)(&c.common) + c.MultiFactorAuthenticationV1Api = (*MultiFactorAuthenticationV1ApiService)(&c.common) + c.OAuth2Api = (*OAuth2ApiService)(&c.common) + c.PrivilegesApi = (*PrivilegesApiService)(&c.common) + c.RolesApi = (*RolesApiService)(&c.common) + c.SAMLAssertionsApi = (*SAMLAssertionsApiService)(&c.common) + c.SmartHooksApi = (*SmartHooksApiService)(&c.common) + c.UserMappingsApi = (*UserMappingsApiService)(&c.common) + c.UsersV1Api = (*UsersV1ApiService)(&c.common) + c.UsersV2Api = (*UsersV2ApiService)(&c.common) + c.VigilanceAIApi = (*VigilanceAIApiService)(&c.common) return c } @@ -120,33 +188,110 @@ 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]) +} + +// parameterAddToQuery adds the provided object to the url query supporting deep object syntax +func parameterAddToQuery(queryParams 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 + } + parameterAddToQuery(queryParams, keyPrefix, dataMap, collectionType) + return + } + if t, ok := obj.(time.Time); ok { + parameterAddToQuery(queryParams, 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 int32 CreateAuthClaim(ctx, apiAuthId).ContentType(contentType).AuthClaim(authClaim).Execute() + +Create Api Auth Server Claim + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + apiAuthId := "apiAuthId_example" // string | + contentType := "application/json" // string | (optional) (default to "application/json") + authClaim := *openapiclient.NewAuthClaim("email_address") // AuthClaim | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.APIAuthClaimsApi.CreateAuthClaim(context.Background(), apiAuthId).ContentType(contentType).AuthClaim(authClaim).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `APIAuthClaimsApi.CreateAuthClaim``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateAuthClaim`: int32 + fmt.Fprintf(os.Stdout, "Response from `APIAuthClaimsApi.CreateAuthClaim`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**apiAuthId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateAuthClaimRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **contentType** | **string** | | [default to "application/json"] + **authClaim** | [**AuthClaim**](AuthClaim.md) | | + +### Return type + +**int32** + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteAuthClaim + +> DeleteAuthClaim(ctx, apiAuthId, claimId).ContentType(contentType).Execute() + +Delete Api Auth Server Claim + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + apiAuthId := "apiAuthId_example" // string | + claimId := int32(56) // int32 | + contentType := "application/json" // string | (optional) (default to "application/json") + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.APIAuthClaimsApi.DeleteAuthClaim(context.Background(), apiAuthId, claimId).ContentType(contentType).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `APIAuthClaimsApi.DeleteAuthClaim``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**apiAuthId** | **string** | | +**claimId** | **int32** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteAuthClaimRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **contentType** | **string** | | [default to "application/json"] + +### Return type + + (empty response body) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetAuthclaims + +> []TokenClaim GetAuthclaims(ctx, apiAuthId).ContentType(contentType).Execute() + +Get Api Auth Server claims + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + apiAuthId := "apiAuthId_example" // string | + contentType := "application/json" // string | (optional) (default to "application/json") + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.APIAuthClaimsApi.GetAuthclaims(context.Background(), apiAuthId).ContentType(contentType).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `APIAuthClaimsApi.GetAuthclaims``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetAuthclaims`: []TokenClaim + fmt.Fprintf(os.Stdout, "Response from `APIAuthClaimsApi.GetAuthclaims`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**apiAuthId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetAuthclaimsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **contentType** | **string** | | [default to "application/json"] + +### Return type + +[**[]TokenClaim**](TokenClaim.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateClaim + +> AuthId UpdateClaim(ctx, apiAuthId, claimId).ContentType(contentType).AuthClaim(authClaim).Execute() + +Update Api Auth Server Claim + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + apiAuthId := "apiAuthId_example" // string | + claimId := int32(56) // int32 | + contentType := "application/json" // string | (optional) (default to "application/json") + authClaim := *openapiclient.NewAuthClaim("email_address") // AuthClaim | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.APIAuthClaimsApi.UpdateClaim(context.Background(), apiAuthId, claimId).ContentType(contentType).AuthClaim(authClaim).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `APIAuthClaimsApi.UpdateClaim``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateClaim`: AuthId + fmt.Fprintf(os.Stdout, "Response from `APIAuthClaimsApi.UpdateClaim`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**apiAuthId** | **string** | | +**claimId** | **int32** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateClaimRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **contentType** | **string** | | [default to "application/json"] + **authClaim** | [**AuthClaim**](AuthClaim.md) | | + +### Return type + +[**AuthId**](AuthId.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/docs/APIAuthClientAppsApi.md b/docs/APIAuthClientAppsApi.md new file mode 100644 index 0000000..5296ed3 --- /dev/null +++ b/docs/APIAuthClientAppsApi.md @@ -0,0 +1,310 @@ +# \APIAuthClientAppsApi + +All URIs are relative to *https://your-api-subdomain.onelogin.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**AddClientApp**](APIAuthClientAppsApi.md#AddClientApp) | **Post** /api/2/api_authorizations/{api_auth_id}/clients | Add Client App +[**DeleteClientApp**](APIAuthClientAppsApi.md#DeleteClientApp) | **Delete** /api/2/api_authorizations/{api_auth_id}/clients/{client_app_id} | Remove Client App +[**ListClientApps**](APIAuthClientAppsApi.md#ListClientApps) | **Get** /api/2/api_authorizations/{api_auth_id}/clients | List Clients Apps +[**UpdateClientApp**](APIAuthClientAppsApi.md#UpdateClientApp) | **Put** /api/2/api_authorizations/{api_auth_id}/clients/{client_app_id} | Update Client App + + + +## AddClientApp + +> AddClientApp201Response AddClientApp(ctx, apiAuthId).ContentType(contentType).AddClientAppRequest(addClientAppRequest).Execute() + +Add Client App + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + apiAuthId := "apiAuthId_example" // string | + contentType := "application/json" // string | (optional) (default to "application/json") + addClientAppRequest := *openapiclient.NewAddClientAppRequest() // AddClientAppRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.APIAuthClientAppsApi.AddClientApp(context.Background(), apiAuthId).ContentType(contentType).AddClientAppRequest(addClientAppRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `APIAuthClientAppsApi.AddClientApp``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AddClientApp`: AddClientApp201Response + fmt.Fprintf(os.Stdout, "Response from `APIAuthClientAppsApi.AddClientApp`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**apiAuthId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiAddClientAppRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **contentType** | **string** | | [default to "application/json"] + **addClientAppRequest** | [**AddClientAppRequest**](AddClientAppRequest.md) | | + +### Return type + +[**AddClientApp201Response**](AddClientApp201Response.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteClientApp + +> AddClientApp201Response DeleteClientApp(ctx, apiAuthId, clientAppId).ContentType(contentType).Execute() + +Remove Client App + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + apiAuthId := "apiAuthId_example" // string | + clientAppId := int32(56) // int32 | + contentType := "application/json" // string | (optional) (default to "application/json") + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.APIAuthClientAppsApi.DeleteClientApp(context.Background(), apiAuthId, clientAppId).ContentType(contentType).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `APIAuthClientAppsApi.DeleteClientApp``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DeleteClientApp`: AddClientApp201Response + fmt.Fprintf(os.Stdout, "Response from `APIAuthClientAppsApi.DeleteClientApp`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**apiAuthId** | **string** | | +**clientAppId** | **int32** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteClientAppRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **contentType** | **string** | | [default to "application/json"] + +### Return type + +[**AddClientApp201Response**](AddClientApp201Response.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListClientApps + +> ClientAppFull ListClientApps(ctx, apiAuthId).ContentType(contentType).Execute() + +List Clients Apps + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + apiAuthId := "apiAuthId_example" // string | + contentType := "application/json" // string | (optional) (default to "application/json") + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.APIAuthClientAppsApi.ListClientApps(context.Background(), apiAuthId).ContentType(contentType).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `APIAuthClientAppsApi.ListClientApps``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListClientApps`: ClientAppFull + fmt.Fprintf(os.Stdout, "Response from `APIAuthClientAppsApi.ListClientApps`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**apiAuthId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListClientAppsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **contentType** | **string** | | [default to "application/json"] + +### Return type + +[**ClientAppFull**](ClientAppFull.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateClientApp + +> AddClientApp201Response UpdateClientApp(ctx, apiAuthId, clientAppId).ContentType(contentType).UpdateClientAppRequest(updateClientAppRequest).Execute() + +Update Client App + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + apiAuthId := "apiAuthId_example" // string | + clientAppId := int32(56) // int32 | + contentType := "application/json" // string | (optional) (default to "application/json") + updateClientAppRequest := *openapiclient.NewUpdateClientAppRequest() // UpdateClientAppRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.APIAuthClientAppsApi.UpdateClientApp(context.Background(), apiAuthId, clientAppId).ContentType(contentType).UpdateClientAppRequest(updateClientAppRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `APIAuthClientAppsApi.UpdateClientApp``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateClientApp`: AddClientApp201Response + fmt.Fprintf(os.Stdout, "Response from `APIAuthClientAppsApi.UpdateClientApp`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**apiAuthId** | **string** | | +**clientAppId** | **int32** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateClientAppRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **contentType** | **string** | | [default to "application/json"] + **updateClientAppRequest** | [**UpdateClientAppRequest**](UpdateClientAppRequest.md) | | + +### Return type + +[**AddClientApp201Response**](AddClientApp201Response.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/docs/APIAuthScopesApi.md b/docs/APIAuthScopesApi.md new file mode 100644 index 0000000..6c772af --- /dev/null +++ b/docs/APIAuthScopesApi.md @@ -0,0 +1,308 @@ +# \APIAuthScopesApi + +All URIs are relative to *https://your-api-subdomain.onelogin.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateScope**](APIAuthScopesApi.md#CreateScope) | **Post** /api/2/api_authorizations/{api_auth_id}/scopes | Create Api Auth Server Scope +[**DeleteScope**](APIAuthScopesApi.md#DeleteScope) | **Delete** /api/2/api_authorizations/{api_auth_id}/scopes/{scope_id} | Delete Api Auth Server Scope +[**GetScopes**](APIAuthScopesApi.md#GetScopes) | **Get** /api/2/api_authorizations/{api_auth_id}/scopes | Get Api Auth Server Scopes +[**UpdateScope**](APIAuthScopesApi.md#UpdateScope) | **Put** /api/2/api_authorizations/{api_auth_id}/scopes/{scope_id} | Update Api Auth Server Scope + + + +## CreateScope + +> AuthScope CreateScope(ctx, apiAuthId).ContentType(contentType).AuthScope(authScope).Execute() + +Create Api Auth Server Scope + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + apiAuthId := "apiAuthId_example" // string | + contentType := "application/json" // string | (optional) (default to "application/json") + authScope := *openapiclient.NewAuthScope() // AuthScope | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.APIAuthScopesApi.CreateScope(context.Background(), apiAuthId).ContentType(contentType).AuthScope(authScope).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `APIAuthScopesApi.CreateScope``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateScope`: AuthScope + fmt.Fprintf(os.Stdout, "Response from `APIAuthScopesApi.CreateScope`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**apiAuthId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateScopeRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **contentType** | **string** | | [default to "application/json"] + **authScope** | [**AuthScope**](AuthScope.md) | | + +### Return type + +[**AuthScope**](AuthScope.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteScope + +> DeleteScope(ctx, apiAuthId, scopeId).ContentType(contentType).Execute() + +Delete Api Auth Server Scope + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + apiAuthId := "apiAuthId_example" // string | + scopeId := int32(56) // int32 | + contentType := "application/json" // string | (optional) (default to "application/json") + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.APIAuthScopesApi.DeleteScope(context.Background(), apiAuthId, scopeId).ContentType(contentType).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `APIAuthScopesApi.DeleteScope``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**apiAuthId** | **string** | | +**scopeId** | **int32** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteScopeRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **contentType** | **string** | | [default to "application/json"] + +### Return type + + (empty response body) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetScopes + +> []AuthScope GetScopes(ctx, apiAuthId).ContentType(contentType).Execute() + +Get Api Auth Server Scopes + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + apiAuthId := "apiAuthId_example" // string | + contentType := "application/json" // string | (optional) (default to "application/json") + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.APIAuthScopesApi.GetScopes(context.Background(), apiAuthId).ContentType(contentType).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `APIAuthScopesApi.GetScopes``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetScopes`: []AuthScope + fmt.Fprintf(os.Stdout, "Response from `APIAuthScopesApi.GetScopes`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**apiAuthId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetScopesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **contentType** | **string** | | [default to "application/json"] + +### Return type + +[**[]AuthScope**](AuthScope.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateScope + +> AuthId UpdateScope(ctx, apiAuthId, scopeId).ContentType(contentType).AuthScope(authScope).Execute() + +Update Api Auth Server Scope + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + apiAuthId := "apiAuthId_example" // string | + scopeId := int32(56) // int32 | + contentType := "application/json" // string | (optional) (default to "application/json") + authScope := *openapiclient.NewAuthScope() // AuthScope | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.APIAuthScopesApi.UpdateScope(context.Background(), apiAuthId, scopeId).ContentType(contentType).AuthScope(authScope).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `APIAuthScopesApi.UpdateScope``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateScope`: AuthId + fmt.Fprintf(os.Stdout, "Response from `APIAuthScopesApi.UpdateScope`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**apiAuthId** | **string** | | +**scopeId** | **int32** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateScopeRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **contentType** | **string** | | [default to "application/json"] + **authScope** | [**AuthScope**](AuthScope.md) | | + +### Return type + +[**AuthId**](AuthId.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/docs/APIAuthorizationServerApi.md b/docs/APIAuthorizationServerApi.md new file mode 100644 index 0000000..2e7ee7b --- /dev/null +++ b/docs/APIAuthorizationServerApi.md @@ -0,0 +1,358 @@ +# \APIAuthorizationServerApi + +All URIs are relative to *https://your-api-subdomain.onelogin.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateAuthServer**](APIAuthorizationServerApi.md#CreateAuthServer) | **Post** /api/2/api_authorizations | Create Api Auth Server +[**DeleteAuthServer**](APIAuthorizationServerApi.md#DeleteAuthServer) | **Delete** /api/2/api_authorizations/{api_auth_id} | Delete Api Auth Server +[**GetAuthServer**](APIAuthorizationServerApi.md#GetAuthServer) | **Get** /api/2/api_authorizations/{api_auth_id} | Get Api Auth Server +[**ListAuthServers**](APIAuthorizationServerApi.md#ListAuthServers) | **Get** /api/2/api_authorizations | List Api Auth Servers +[**UpdateAuthServer**](APIAuthorizationServerApi.md#UpdateAuthServer) | **Put** /api/2/api_authorizations/{api_auth_id} | Update Api Auth Server + + + +## CreateAuthServer + +> AuthServer CreateAuthServer(ctx).ContentType(contentType).AuthServer(authServer).Execute() + +Create Api Auth Server + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + contentType := "application/json" // string | (optional) (default to "application/json") + authServer := *openapiclient.NewAuthServer("Contacts API", "API manages contacts", *openapiclient.NewAuthServerConfiguration([]string{"Audiences_example"}, "https://example.com/contacts")) // AuthServer | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.APIAuthorizationServerApi.CreateAuthServer(context.Background()).ContentType(contentType).AuthServer(authServer).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `APIAuthorizationServerApi.CreateAuthServer``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateAuthServer`: AuthServer + fmt.Fprintf(os.Stdout, "Response from `APIAuthorizationServerApi.CreateAuthServer`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateAuthServerRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **contentType** | **string** | | [default to "application/json"] + **authServer** | [**AuthServer**](AuthServer.md) | | + +### Return type + +[**AuthServer**](AuthServer.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteAuthServer + +> DeleteAuthServer(ctx, apiAuthId).ContentType(contentType).Execute() + +Delete Api Auth Server + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + apiAuthId := "apiAuthId_example" // string | + contentType := "application/json" // string | (optional) (default to "application/json") + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.APIAuthorizationServerApi.DeleteAuthServer(context.Background(), apiAuthId).ContentType(contentType).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `APIAuthorizationServerApi.DeleteAuthServer``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**apiAuthId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteAuthServerRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **contentType** | **string** | | [default to "application/json"] + +### Return type + + (empty response body) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetAuthServer + +> AuthServer GetAuthServer(ctx, apiAuthId).ContentType(contentType).Execute() + +Get Api Auth Server + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + apiAuthId := "apiAuthId_example" // string | + contentType := "application/json" // string | (optional) (default to "application/json") + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.APIAuthorizationServerApi.GetAuthServer(context.Background(), apiAuthId).ContentType(contentType).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `APIAuthorizationServerApi.GetAuthServer``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetAuthServer`: AuthServer + fmt.Fprintf(os.Stdout, "Response from `APIAuthorizationServerApi.GetAuthServer`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**apiAuthId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetAuthServerRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **contentType** | **string** | | [default to "application/json"] + +### Return type + +[**AuthServer**](AuthServer.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListAuthServers + +> []AuthServer ListAuthServers(ctx).Execute() + +List Api Auth Servers + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.APIAuthorizationServerApi.ListAuthServers(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `APIAuthorizationServerApi.ListAuthServers``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListAuthServers`: []AuthServer + fmt.Fprintf(os.Stdout, "Response from `APIAuthorizationServerApi.ListAuthServers`: %v\n", resp) +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiListAuthServersRequest struct via the builder pattern + + +### Return type + +[**[]AuthServer**](AuthServer.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateAuthServer + +> AuthServer UpdateAuthServer(ctx, apiAuthId).ContentType(contentType).AuthServer(authServer).Execute() + +Update Api Auth Server + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + apiAuthId := "apiAuthId_example" // string | + contentType := "application/json" // string | (optional) (default to "application/json") + authServer := *openapiclient.NewAuthServer("Contacts API", "API manages contacts", *openapiclient.NewAuthServerConfiguration([]string{"Audiences_example"}, "https://example.com/contacts")) // AuthServer | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.APIAuthorizationServerApi.UpdateAuthServer(context.Background(), apiAuthId).ContentType(contentType).AuthServer(authServer).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `APIAuthorizationServerApi.UpdateAuthServer``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateAuthServer`: AuthServer + fmt.Fprintf(os.Stdout, "Response from `APIAuthorizationServerApi.UpdateAuthServer`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**apiAuthId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateAuthServerRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **contentType** | **string** | | [default to "application/json"] + **authServer** | [**AuthServer**](AuthServer.md) | | + +### Return type + +[**AuthServer**](AuthServer.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/docs/Action.md b/docs/Action.md deleted file mode 100644 index 03fd37b..0000000 --- a/docs/Action.md +++ /dev/null @@ -1,160 +0,0 @@ -# Action - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Action** | Pointer to **string** | The action to apply | [optional] -**Value** | Pointer to **[]string** | Only applicable to provisioned and set_* actions. Items in the array will be a plain text string or valid value for the selected action. | [optional] -**Expression** | Pointer to **string** | A regular expression to extract a value. Applies to provisionable, multi-selects, and string actions. | [optional] -**Scriplet** | Pointer to **string** | A hash containing scriptlet code that returns a value. | [optional] -**Macro** | Pointer to **string** | A template to construct a value. Applies to default, string, and list actions. | [optional] - -## Methods - -### NewAction - -`func NewAction() *Action` - -NewAction instantiates a new Action 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 - -### NewActionWithDefaults - -`func NewActionWithDefaults() *Action` - -NewActionWithDefaults instantiates a new Action 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 - -### GetAction - -`func (o *Action) GetAction() string` - -GetAction returns the Action field if non-nil, zero value otherwise. - -### GetActionOk - -`func (o *Action) GetActionOk() (*string, bool)` - -GetActionOk returns a tuple with the Action field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAction - -`func (o *Action) SetAction(v string)` - -SetAction sets Action field to given value. - -### HasAction - -`func (o *Action) HasAction() bool` - -HasAction returns a boolean if a field has been set. - -### GetValue - -`func (o *Action) GetValue() []string` - -GetValue returns the Value field if non-nil, zero value otherwise. - -### GetValueOk - -`func (o *Action) GetValueOk() (*[]string, bool)` - -GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetValue - -`func (o *Action) SetValue(v []string)` - -SetValue sets Value field to given value. - -### HasValue - -`func (o *Action) HasValue() bool` - -HasValue returns a boolean if a field has been set. - -### GetExpression - -`func (o *Action) GetExpression() string` - -GetExpression returns the Expression field if non-nil, zero value otherwise. - -### GetExpressionOk - -`func (o *Action) GetExpressionOk() (*string, bool)` - -GetExpressionOk returns a tuple with the Expression field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetExpression - -`func (o *Action) SetExpression(v string)` - -SetExpression sets Expression field to given value. - -### HasExpression - -`func (o *Action) HasExpression() bool` - -HasExpression returns a boolean if a field has been set. - -### GetScriplet - -`func (o *Action) GetScriplet() string` - -GetScriplet returns the Scriplet field if non-nil, zero value otherwise. - -### GetScripletOk - -`func (o *Action) GetScripletOk() (*string, bool)` - -GetScripletOk returns a tuple with the Scriplet field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetScriplet - -`func (o *Action) SetScriplet(v string)` - -SetScriplet sets Scriplet field to given value. - -### HasScriplet - -`func (o *Action) HasScriplet() bool` - -HasScriplet returns a boolean if a field has been set. - -### GetMacro - -`func (o *Action) GetMacro() string` - -GetMacro returns the Macro field if non-nil, zero value otherwise. - -### GetMacroOk - -`func (o *Action) GetMacroOk() (*string, bool)` - -GetMacroOk returns a tuple with the Macro field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMacro - -`func (o *Action) SetMacro(v string)` - -SetMacro sets Macro field to given value. - -### HasMacro - -`func (o *Action) HasMacro() bool` - -HasMacro 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/ActionObj.md b/docs/ActionObj.md new file mode 100644 index 0000000..cec1137 --- /dev/null +++ b/docs/ActionObj.md @@ -0,0 +1,82 @@ +# ActionObj + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Action** | Pointer to **string** | The action to apply | [optional] +**Value** | Pointer to **[]string** | Only applicable to provisioned and set_* actions. Items in the array will be a plain text string or valid value for the selected action. | [optional] + +## Methods + +### NewActionObj + +`func NewActionObj() *ActionObj` + +NewActionObj instantiates a new ActionObj 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 + +### NewActionObjWithDefaults + +`func NewActionObjWithDefaults() *ActionObj` + +NewActionObjWithDefaults instantiates a new ActionObj 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 + +### GetAction + +`func (o *ActionObj) GetAction() string` + +GetAction returns the Action field if non-nil, zero value otherwise. + +### GetActionOk + +`func (o *ActionObj) GetActionOk() (*string, bool)` + +GetActionOk returns a tuple with the Action field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAction + +`func (o *ActionObj) SetAction(v string)` + +SetAction sets Action field to given value. + +### HasAction + +`func (o *ActionObj) HasAction() bool` + +HasAction returns a boolean if a field has been set. + +### GetValue + +`func (o *ActionObj) GetValue() []string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *ActionObj) GetValueOk() (*[]string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *ActionObj) SetValue(v []string)` + +SetValue sets Value field to given value. + +### HasValue + +`func (o *ActionObj) HasValue() bool` + +HasValue 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/ActivateFactorRequest.md b/docs/ActivateFactorRequest.md deleted file mode 100644 index 16e1a7a..0000000 --- a/docs/ActivateFactorRequest.md +++ /dev/null @@ -1,134 +0,0 @@ -# ActivateFactorRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**DeviceId** | Pointer to **int32** | Required. Specifies the factor to be verified. | [optional] -**ExpiresIn** | Pointer to **int32** | Optional. Sets the window of time in seconds that the factor must be verified within. | [optional] -**RedirectTo** | Pointer to **string** | Optional. Only applies to Email MagicLink factor. | [optional] -**CustomMessage** | Pointer to **string** | Optional. Only applies to SMS factor. A message template that will be sent via SMS. | [optional] - -## Methods - -### NewActivateFactorRequest - -`func NewActivateFactorRequest() *ActivateFactorRequest` - -NewActivateFactorRequest instantiates a new ActivateFactorRequest 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 - -### NewActivateFactorRequestWithDefaults - -`func NewActivateFactorRequestWithDefaults() *ActivateFactorRequest` - -NewActivateFactorRequestWithDefaults instantiates a new ActivateFactorRequest 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 - -### GetDeviceId - -`func (o *ActivateFactorRequest) GetDeviceId() int32` - -GetDeviceId returns the DeviceId field if non-nil, zero value otherwise. - -### GetDeviceIdOk - -`func (o *ActivateFactorRequest) GetDeviceIdOk() (*int32, bool)` - -GetDeviceIdOk returns a tuple with the DeviceId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDeviceId - -`func (o *ActivateFactorRequest) SetDeviceId(v int32)` - -SetDeviceId sets DeviceId field to given value. - -### HasDeviceId - -`func (o *ActivateFactorRequest) HasDeviceId() bool` - -HasDeviceId returns a boolean if a field has been set. - -### GetExpiresIn - -`func (o *ActivateFactorRequest) GetExpiresIn() int32` - -GetExpiresIn returns the ExpiresIn field if non-nil, zero value otherwise. - -### GetExpiresInOk - -`func (o *ActivateFactorRequest) GetExpiresInOk() (*int32, bool)` - -GetExpiresInOk returns a tuple with the ExpiresIn field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetExpiresIn - -`func (o *ActivateFactorRequest) SetExpiresIn(v int32)` - -SetExpiresIn sets ExpiresIn field to given value. - -### HasExpiresIn - -`func (o *ActivateFactorRequest) HasExpiresIn() bool` - -HasExpiresIn returns a boolean if a field has been set. - -### GetRedirectTo - -`func (o *ActivateFactorRequest) GetRedirectTo() string` - -GetRedirectTo returns the RedirectTo field if non-nil, zero value otherwise. - -### GetRedirectToOk - -`func (o *ActivateFactorRequest) GetRedirectToOk() (*string, bool)` - -GetRedirectToOk returns a tuple with the RedirectTo field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRedirectTo - -`func (o *ActivateFactorRequest) SetRedirectTo(v string)` - -SetRedirectTo sets RedirectTo field to given value. - -### HasRedirectTo - -`func (o *ActivateFactorRequest) HasRedirectTo() bool` - -HasRedirectTo returns a boolean if a field has been set. - -### GetCustomMessage - -`func (o *ActivateFactorRequest) GetCustomMessage() string` - -GetCustomMessage returns the CustomMessage field if non-nil, zero value otherwise. - -### GetCustomMessageOk - -`func (o *ActivateFactorRequest) GetCustomMessageOk() (*string, bool)` - -GetCustomMessageOk returns a tuple with the CustomMessage field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCustomMessage - -`func (o *ActivateFactorRequest) SetCustomMessage(v string)` - -SetCustomMessage sets CustomMessage field to given value. - -### HasCustomMessage - -`func (o *ActivateFactorRequest) HasCustomMessage() bool` - -HasCustomMessage 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/ActivateMfaFactorsRequest.md b/docs/ActivateMfaFactorsRequest.md new file mode 100644 index 0000000..f594520 --- /dev/null +++ b/docs/ActivateMfaFactorsRequest.md @@ -0,0 +1,108 @@ +# ActivateMfaFactorsRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**StateTokenExpiresIn** | Pointer to **int32** | Optional. Sets the window of time in seconds that the factor must be verified within. Defaults to 120 seconds (2 minutes). Max 900 seconds (15 minutes). | [optional] +**NumericSmsOtp** | Pointer to **bool** | Optional. Defaults to false. Only applies to SMS factor. When set to `true` a 6 digit numeric code will be sent to the user instead of the standard code which is alphanumeric. | [optional] +**SmsMessage** | Pointer to **string** | Optional. Only applies to SMS factor. A message template that will be sent via SMS. Max length of the message after template items are inserted is 160 characters. The following template variables can be included in the message. - {{otp_code}} - The security code. - {{expiration}} - The number of minutes until the one time code expires. | [optional] + +## Methods + +### NewActivateMfaFactorsRequest + +`func NewActivateMfaFactorsRequest() *ActivateMfaFactorsRequest` + +NewActivateMfaFactorsRequest instantiates a new ActivateMfaFactorsRequest 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 + +### NewActivateMfaFactorsRequestWithDefaults + +`func NewActivateMfaFactorsRequestWithDefaults() *ActivateMfaFactorsRequest` + +NewActivateMfaFactorsRequestWithDefaults instantiates a new ActivateMfaFactorsRequest 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 + +### GetStateTokenExpiresIn + +`func (o *ActivateMfaFactorsRequest) GetStateTokenExpiresIn() int32` + +GetStateTokenExpiresIn returns the StateTokenExpiresIn field if non-nil, zero value otherwise. + +### GetStateTokenExpiresInOk + +`func (o *ActivateMfaFactorsRequest) GetStateTokenExpiresInOk() (*int32, bool)` + +GetStateTokenExpiresInOk returns a tuple with the StateTokenExpiresIn field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStateTokenExpiresIn + +`func (o *ActivateMfaFactorsRequest) SetStateTokenExpiresIn(v int32)` + +SetStateTokenExpiresIn sets StateTokenExpiresIn field to given value. + +### HasStateTokenExpiresIn + +`func (o *ActivateMfaFactorsRequest) HasStateTokenExpiresIn() bool` + +HasStateTokenExpiresIn returns a boolean if a field has been set. + +### GetNumericSmsOtp + +`func (o *ActivateMfaFactorsRequest) GetNumericSmsOtp() bool` + +GetNumericSmsOtp returns the NumericSmsOtp field if non-nil, zero value otherwise. + +### GetNumericSmsOtpOk + +`func (o *ActivateMfaFactorsRequest) GetNumericSmsOtpOk() (*bool, bool)` + +GetNumericSmsOtpOk returns a tuple with the NumericSmsOtp field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNumericSmsOtp + +`func (o *ActivateMfaFactorsRequest) SetNumericSmsOtp(v bool)` + +SetNumericSmsOtp sets NumericSmsOtp field to given value. + +### HasNumericSmsOtp + +`func (o *ActivateMfaFactorsRequest) HasNumericSmsOtp() bool` + +HasNumericSmsOtp returns a boolean if a field has been set. + +### GetSmsMessage + +`func (o *ActivateMfaFactorsRequest) GetSmsMessage() string` + +GetSmsMessage returns the SmsMessage field if non-nil, zero value otherwise. + +### GetSmsMessageOk + +`func (o *ActivateMfaFactorsRequest) GetSmsMessageOk() (*string, bool)` + +GetSmsMessageOk returns a tuple with the SmsMessage field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSmsMessage + +`func (o *ActivateMfaFactorsRequest) SetSmsMessage(v string)` + +SetSmsMessage sets SmsMessage field to given value. + +### HasSmsMessage + +`func (o *ActivateMfaFactorsRequest) HasSmsMessage() bool` + +HasSmsMessage 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/ClientApp.md b/docs/AddClientApp201Response.md similarity index 64% rename from docs/ClientApp.md rename to docs/AddClientApp201Response.md index 88d0163..a24bcd4 100644 --- a/docs/ClientApp.md +++ b/docs/AddClientApp201Response.md @@ -1,4 +1,4 @@ -# ClientApp +# AddClientApp201Response ## Properties @@ -9,70 +9,70 @@ Name | Type | Description | Notes ## Methods -### NewClientApp +### NewAddClientApp201Response -`func NewClientApp() *ClientApp` +`func NewAddClientApp201Response() *AddClientApp201Response` -NewClientApp instantiates a new ClientApp object +NewAddClientApp201Response instantiates a new AddClientApp201Response 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 -### NewClientAppWithDefaults +### NewAddClientApp201ResponseWithDefaults -`func NewClientAppWithDefaults() *ClientApp` +`func NewAddClientApp201ResponseWithDefaults() *AddClientApp201Response` -NewClientAppWithDefaults instantiates a new ClientApp object +NewAddClientApp201ResponseWithDefaults instantiates a new AddClientApp201Response 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 ### GetAppId -`func (o *ClientApp) GetAppId() int32` +`func (o *AddClientApp201Response) GetAppId() int32` GetAppId returns the AppId field if non-nil, zero value otherwise. ### GetAppIdOk -`func (o *ClientApp) GetAppIdOk() (*int32, bool)` +`func (o *AddClientApp201Response) GetAppIdOk() (*int32, bool)` GetAppIdOk returns a tuple with the AppId field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetAppId -`func (o *ClientApp) SetAppId(v int32)` +`func (o *AddClientApp201Response) SetAppId(v int32)` SetAppId sets AppId field to given value. ### HasAppId -`func (o *ClientApp) HasAppId() bool` +`func (o *AddClientApp201Response) HasAppId() bool` HasAppId returns a boolean if a field has been set. ### GetApiAuthId -`func (o *ClientApp) GetApiAuthId() int32` +`func (o *AddClientApp201Response) GetApiAuthId() int32` GetApiAuthId returns the ApiAuthId field if non-nil, zero value otherwise. ### GetApiAuthIdOk -`func (o *ClientApp) GetApiAuthIdOk() (*int32, bool)` +`func (o *AddClientApp201Response) GetApiAuthIdOk() (*int32, bool)` GetApiAuthIdOk returns a tuple with the ApiAuthId field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetApiAuthId -`func (o *ClientApp) SetApiAuthId(v int32)` +`func (o *AddClientApp201Response) SetApiAuthId(v int32)` SetApiAuthId sets ApiAuthId field to given value. ### HasApiAuthId -`func (o *ClientApp) HasApiAuthId() bool` +`func (o *AddClientApp201Response) HasApiAuthId() bool` HasApiAuthId returns a boolean if a field has been set. diff --git a/docs/AddClientAppRequest.md b/docs/AddClientAppRequest.md index 807589f..5dd85fb 100644 --- a/docs/AddClientAppRequest.md +++ b/docs/AddClientAppRequest.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**AppId** | Pointer to **int32** | | [optional] -**Scopes** | Pointer to **[]int32** | | [optional] +**AppId** | Pointer to **int32** | The ID of the OpenId Connect app to allow access through. | [optional] +**Scopes** | Pointer to **[]int32** | An array of Scope IDs that represent scopes the app can request | [optional] ## Methods diff --git a/docs/AddPrivilegeToRole201Response.md b/docs/AddPrivilegeToRole201Response.md new file mode 100644 index 0000000..e952172 --- /dev/null +++ b/docs/AddPrivilegeToRole201Response.md @@ -0,0 +1,56 @@ +# AddPrivilegeToRole201Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Success** | Pointer to **bool** | | [optional] + +## Methods + +### NewAddPrivilegeToRole201Response + +`func NewAddPrivilegeToRole201Response() *AddPrivilegeToRole201Response` + +NewAddPrivilegeToRole201Response instantiates a new AddPrivilegeToRole201Response 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 + +### NewAddPrivilegeToRole201ResponseWithDefaults + +`func NewAddPrivilegeToRole201ResponseWithDefaults() *AddPrivilegeToRole201Response` + +NewAddPrivilegeToRole201ResponseWithDefaults instantiates a new AddPrivilegeToRole201Response 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 + +### GetSuccess + +`func (o *AddPrivilegeToRole201Response) GetSuccess() bool` + +GetSuccess returns the Success field if non-nil, zero value otherwise. + +### GetSuccessOk + +`func (o *AddPrivilegeToRole201Response) GetSuccessOk() (*bool, bool)` + +GetSuccessOk returns a tuple with the Success field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSuccess + +`func (o *AddPrivilegeToRole201Response) SetSuccess(v bool)` + +SetSuccess sets Success field to given value. + +### HasSuccess + +`func (o *AddPrivilegeToRole201Response) HasSuccess() bool` + +HasSuccess 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/AddPrivilegeToRoleRequest.md b/docs/AddPrivilegeToRoleRequest.md new file mode 100644 index 0000000..b8cb6b4 --- /dev/null +++ b/docs/AddPrivilegeToRoleRequest.md @@ -0,0 +1,56 @@ +# AddPrivilegeToRoleRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Roles** | Pointer to **[]int32** | | [optional] + +## Methods + +### NewAddPrivilegeToRoleRequest + +`func NewAddPrivilegeToRoleRequest() *AddPrivilegeToRoleRequest` + +NewAddPrivilegeToRoleRequest instantiates a new AddPrivilegeToRoleRequest 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 + +### NewAddPrivilegeToRoleRequestWithDefaults + +`func NewAddPrivilegeToRoleRequestWithDefaults() *AddPrivilegeToRoleRequest` + +NewAddPrivilegeToRoleRequestWithDefaults instantiates a new AddPrivilegeToRoleRequest 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 + +### GetRoles + +`func (o *AddPrivilegeToRoleRequest) GetRoles() []int32` + +GetRoles returns the Roles field if non-nil, zero value otherwise. + +### GetRolesOk + +`func (o *AddPrivilegeToRoleRequest) GetRolesOk() (*[]int32, bool)` + +GetRolesOk returns a tuple with the Roles field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRoles + +`func (o *AddPrivilegeToRoleRequest) SetRoles(v []int32)` + +SetRoles sets Roles field to given value. + +### HasRoles + +`func (o *AddPrivilegeToRoleRequest) HasRoles() bool` + +HasRoles 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/AddRolesToUserRequest.md b/docs/AddRolesToUserRequest.md new file mode 100644 index 0000000..5ab4c04 --- /dev/null +++ b/docs/AddRolesToUserRequest.md @@ -0,0 +1,51 @@ +# AddRolesToUserRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**RoleIdArray** | **[]int32** | Set to an array of one or more role IDs. The IDs must be positive integers. | + +## Methods + +### NewAddRolesToUserRequest + +`func NewAddRolesToUserRequest(roleIdArray []int32, ) *AddRolesToUserRequest` + +NewAddRolesToUserRequest instantiates a new AddRolesToUserRequest 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 + +### NewAddRolesToUserRequestWithDefaults + +`func NewAddRolesToUserRequestWithDefaults() *AddRolesToUserRequest` + +NewAddRolesToUserRequestWithDefaults instantiates a new AddRolesToUserRequest 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 + +### GetRoleIdArray + +`func (o *AddRolesToUserRequest) GetRoleIdArray() []int32` + +GetRoleIdArray returns the RoleIdArray field if non-nil, zero value otherwise. + +### GetRoleIdArrayOk + +`func (o *AddRolesToUserRequest) GetRoleIdArrayOk() (*[]int32, bool)` + +GetRoleIdArrayOk returns a tuple with the RoleIdArray field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRoleIdArray + +`func (o *AddRolesToUserRequest) SetRoleIdArray(v []int32)` + +SetRoleIdArray sets RoleIdArray 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/Status1.md b/docs/AltErr.md similarity index 65% rename from docs/Status1.md rename to docs/AltErr.md index 58867c6..0d25019 100644 --- a/docs/Status1.md +++ b/docs/AltErr.md @@ -1,107 +1,107 @@ -# Status1 +# AltErr ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Message** | Pointer to **string** | | [optional] -**StatusCode** | Pointer to **int32** | | [optional] -**Name** | Pointer to **string** | | [optional] +**StatusCode** | Pointer to **int32** | HTTP error code https://developer.mozilla.org/en-US/docs/Web/HTTP/Status | [optional] +**Name** | Pointer to **string** | Error Code Name | [optional] +**Message** | Pointer to **string** | Description of Error | [optional] ## Methods -### NewStatus1 +### NewAltErr -`func NewStatus1() *Status1` +`func NewAltErr() *AltErr` -NewStatus1 instantiates a new Status1 object +NewAltErr instantiates a new AltErr 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 -### NewStatus1WithDefaults +### NewAltErrWithDefaults -`func NewStatus1WithDefaults() *Status1` +`func NewAltErrWithDefaults() *AltErr` -NewStatus1WithDefaults instantiates a new Status1 object +NewAltErrWithDefaults instantiates a new AltErr 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 -### GetMessage - -`func (o *Status1) GetMessage() string` - -GetMessage returns the Message field if non-nil, zero value otherwise. - -### GetMessageOk - -`func (o *Status1) GetMessageOk() (*string, bool)` - -GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMessage - -`func (o *Status1) SetMessage(v string)` - -SetMessage sets Message field to given value. - -### HasMessage - -`func (o *Status1) HasMessage() bool` - -HasMessage returns a boolean if a field has been set. - ### GetStatusCode -`func (o *Status1) GetStatusCode() int32` +`func (o *AltErr) GetStatusCode() int32` GetStatusCode returns the StatusCode field if non-nil, zero value otherwise. ### GetStatusCodeOk -`func (o *Status1) GetStatusCodeOk() (*int32, bool)` +`func (o *AltErr) GetStatusCodeOk() (*int32, bool)` GetStatusCodeOk returns a tuple with the StatusCode field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetStatusCode -`func (o *Status1) SetStatusCode(v int32)` +`func (o *AltErr) SetStatusCode(v int32)` SetStatusCode sets StatusCode field to given value. ### HasStatusCode -`func (o *Status1) HasStatusCode() bool` +`func (o *AltErr) HasStatusCode() bool` HasStatusCode returns a boolean if a field has been set. ### GetName -`func (o *Status1) GetName() string` +`func (o *AltErr) GetName() string` GetName returns the Name field if non-nil, zero value otherwise. ### GetNameOk -`func (o *Status1) GetNameOk() (*string, bool)` +`func (o *AltErr) 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 *Status1) SetName(v string)` +`func (o *AltErr) SetName(v string)` SetName sets Name field to given value. ### HasName -`func (o *Status1) HasName() bool` +`func (o *AltErr) HasName() bool` HasName returns a boolean if a field has been set. +### GetMessage + +`func (o *AltErr) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *AltErr) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *AltErr) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *AltErr) HasMessage() bool` + +HasMessage 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/AppParameters.md b/docs/AppParameters.md new file mode 100644 index 0000000..db048b9 --- /dev/null +++ b/docs/AppParameters.md @@ -0,0 +1,134 @@ +# AppParameters + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**UserAttributeMappings** | Pointer to **string** | A user attribute to map values from For custom attributes prefix the name of the attribute with `custom_attribute_`. e.g. To get the value for custom attribute `employee_id` use `custom_attribute_employee_id`. | [optional] +**UserAttributeMacros** | Pointer to **string** | When `user_attribute_mappings` is set to `_macro_` this macro will be used to assign the parameter value. | [optional] +**Label** | Pointer to **string** | The can only be set when creating a new parameter. It can not be updated. | [optional] +**IncludeInSamlAssertion** | Pointer to **bool** | When true, this parameter will be included in a SAML assertion payload. | [optional] + +## Methods + +### NewAppParameters + +`func NewAppParameters() *AppParameters` + +NewAppParameters instantiates a new AppParameters 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 + +### NewAppParametersWithDefaults + +`func NewAppParametersWithDefaults() *AppParameters` + +NewAppParametersWithDefaults instantiates a new AppParameters 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 + +### GetUserAttributeMappings + +`func (o *AppParameters) GetUserAttributeMappings() string` + +GetUserAttributeMappings returns the UserAttributeMappings field if non-nil, zero value otherwise. + +### GetUserAttributeMappingsOk + +`func (o *AppParameters) GetUserAttributeMappingsOk() (*string, bool)` + +GetUserAttributeMappingsOk returns a tuple with the UserAttributeMappings field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUserAttributeMappings + +`func (o *AppParameters) SetUserAttributeMappings(v string)` + +SetUserAttributeMappings sets UserAttributeMappings field to given value. + +### HasUserAttributeMappings + +`func (o *AppParameters) HasUserAttributeMappings() bool` + +HasUserAttributeMappings returns a boolean if a field has been set. + +### GetUserAttributeMacros + +`func (o *AppParameters) GetUserAttributeMacros() string` + +GetUserAttributeMacros returns the UserAttributeMacros field if non-nil, zero value otherwise. + +### GetUserAttributeMacrosOk + +`func (o *AppParameters) GetUserAttributeMacrosOk() (*string, bool)` + +GetUserAttributeMacrosOk returns a tuple with the UserAttributeMacros field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUserAttributeMacros + +`func (o *AppParameters) SetUserAttributeMacros(v string)` + +SetUserAttributeMacros sets UserAttributeMacros field to given value. + +### HasUserAttributeMacros + +`func (o *AppParameters) HasUserAttributeMacros() bool` + +HasUserAttributeMacros returns a boolean if a field has been set. + +### GetLabel + +`func (o *AppParameters) GetLabel() string` + +GetLabel returns the Label field if non-nil, zero value otherwise. + +### GetLabelOk + +`func (o *AppParameters) GetLabelOk() (*string, bool)` + +GetLabelOk returns a tuple with the Label field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLabel + +`func (o *AppParameters) SetLabel(v string)` + +SetLabel sets Label field to given value. + +### HasLabel + +`func (o *AppParameters) HasLabel() bool` + +HasLabel returns a boolean if a field has been set. + +### GetIncludeInSamlAssertion + +`func (o *AppParameters) GetIncludeInSamlAssertion() bool` + +GetIncludeInSamlAssertion returns the IncludeInSamlAssertion field if non-nil, zero value otherwise. + +### GetIncludeInSamlAssertionOk + +`func (o *AppParameters) GetIncludeInSamlAssertionOk() (*bool, bool)` + +GetIncludeInSamlAssertionOk returns a tuple with the IncludeInSamlAssertion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIncludeInSamlAssertion + +`func (o *AppParameters) SetIncludeInSamlAssertion(v bool)` + +SetIncludeInSamlAssertion sets IncludeInSamlAssertion field to given value. + +### HasIncludeInSamlAssertion + +`func (o *AppParameters) HasIncludeInSamlAssertion() bool` + +HasIncludeInSamlAssertion 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/Rule.md b/docs/AppRule.md similarity index 70% rename from docs/Rule.md rename to docs/AppRule.md index eff7265..3d8701d 100644 --- a/docs/Rule.md +++ b/docs/AppRule.md @@ -1,208 +1,208 @@ -# Rule +# AppRule ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | Pointer to **int32** | | [optional] -**Name** | Pointer to **string** | The name of the rule. | [optional] +**Id** | Pointer to **int32** | App Rule ID | [optional] +**Name** | Pointer to **string** | Rule Name | [optional] **Match** | Pointer to **string** | Indicates how conditions should be matched. | [optional] **Enabled** | Pointer to **bool** | Indicates if the rule is enabled or not. | [optional] **Position** | Pointer to **int32** | Indicates the order of the rule. When `null` this will default to last position. | [optional] **Conditions** | Pointer to [**[]Condition**](Condition.md) | An array of conditions that the user must meet in order for the rule to be applied. | [optional] -**Actions** | Pointer to [**[]Action**](Action.md) | An array of actions that will be applied to the users that are matched by the conditions. | [optional] +**Actions** | Pointer to [**[]ActionObj**](ActionObj.md) | | [optional] ## Methods -### NewRule +### NewAppRule -`func NewRule() *Rule` +`func NewAppRule() *AppRule` -NewRule instantiates a new Rule object +NewAppRule instantiates a new AppRule 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 -### NewRuleWithDefaults +### NewAppRuleWithDefaults -`func NewRuleWithDefaults() *Rule` +`func NewAppRuleWithDefaults() *AppRule` -NewRuleWithDefaults instantiates a new Rule object +NewAppRuleWithDefaults instantiates a new AppRule 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 ### GetId -`func (o *Rule) GetId() int32` +`func (o *AppRule) GetId() int32` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk -`func (o *Rule) GetIdOk() (*int32, bool)` +`func (o *AppRule) GetIdOk() (*int32, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId -`func (o *Rule) SetId(v int32)` +`func (o *AppRule) SetId(v int32)` SetId sets Id field to given value. ### HasId -`func (o *Rule) HasId() bool` +`func (o *AppRule) HasId() bool` HasId returns a boolean if a field has been set. ### GetName -`func (o *Rule) GetName() string` +`func (o *AppRule) GetName() string` GetName returns the Name field if non-nil, zero value otherwise. ### GetNameOk -`func (o *Rule) GetNameOk() (*string, bool)` +`func (o *AppRule) 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 *Rule) SetName(v string)` +`func (o *AppRule) SetName(v string)` SetName sets Name field to given value. ### HasName -`func (o *Rule) HasName() bool` +`func (o *AppRule) HasName() bool` HasName returns a boolean if a field has been set. ### GetMatch -`func (o *Rule) GetMatch() string` +`func (o *AppRule) GetMatch() string` GetMatch returns the Match field if non-nil, zero value otherwise. ### GetMatchOk -`func (o *Rule) GetMatchOk() (*string, bool)` +`func (o *AppRule) GetMatchOk() (*string, bool)` GetMatchOk returns a tuple with the Match field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetMatch -`func (o *Rule) SetMatch(v string)` +`func (o *AppRule) SetMatch(v string)` SetMatch sets Match field to given value. ### HasMatch -`func (o *Rule) HasMatch() bool` +`func (o *AppRule) HasMatch() bool` HasMatch returns a boolean if a field has been set. ### GetEnabled -`func (o *Rule) GetEnabled() bool` +`func (o *AppRule) GetEnabled() bool` GetEnabled returns the Enabled field if non-nil, zero value otherwise. ### GetEnabledOk -`func (o *Rule) GetEnabledOk() (*bool, bool)` +`func (o *AppRule) 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 *Rule) SetEnabled(v bool)` +`func (o *AppRule) SetEnabled(v bool)` SetEnabled sets Enabled field to given value. ### HasEnabled -`func (o *Rule) HasEnabled() bool` +`func (o *AppRule) HasEnabled() bool` HasEnabled returns a boolean if a field has been set. ### GetPosition -`func (o *Rule) GetPosition() int32` +`func (o *AppRule) GetPosition() int32` GetPosition returns the Position field if non-nil, zero value otherwise. ### GetPositionOk -`func (o *Rule) GetPositionOk() (*int32, bool)` +`func (o *AppRule) GetPositionOk() (*int32, bool)` GetPositionOk returns a tuple with the Position field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetPosition -`func (o *Rule) SetPosition(v int32)` +`func (o *AppRule) SetPosition(v int32)` SetPosition sets Position field to given value. ### HasPosition -`func (o *Rule) HasPosition() bool` +`func (o *AppRule) HasPosition() bool` HasPosition returns a boolean if a field has been set. ### GetConditions -`func (o *Rule) GetConditions() []Condition` +`func (o *AppRule) GetConditions() []Condition` GetConditions returns the Conditions field if non-nil, zero value otherwise. ### GetConditionsOk -`func (o *Rule) GetConditionsOk() (*[]Condition, bool)` +`func (o *AppRule) GetConditionsOk() (*[]Condition, bool)` GetConditionsOk returns a tuple with the Conditions field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetConditions -`func (o *Rule) SetConditions(v []Condition)` +`func (o *AppRule) SetConditions(v []Condition)` SetConditions sets Conditions field to given value. ### HasConditions -`func (o *Rule) HasConditions() bool` +`func (o *AppRule) HasConditions() bool` HasConditions returns a boolean if a field has been set. ### GetActions -`func (o *Rule) GetActions() []Action` +`func (o *AppRule) GetActions() []ActionObj` GetActions returns the Actions field if non-nil, zero value otherwise. ### GetActionsOk -`func (o *Rule) GetActionsOk() (*[]Action, bool)` +`func (o *AppRule) GetActionsOk() (*[]ActionObj, bool)` GetActionsOk returns a tuple with the Actions field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetActions -`func (o *Rule) SetActions(v []Action)` +`func (o *AppRule) SetActions(v []ActionObj)` SetActions sets Actions field to given value. ### HasActions -`func (o *Rule) HasActions() bool` +`func (o *AppRule) HasActions() bool` HasActions returns a boolean if a field has been set. diff --git a/docs/AppRulesApi.md b/docs/AppRulesApi.md new file mode 100644 index 0000000..dab9064 --- /dev/null +++ b/docs/AppRulesApi.md @@ -0,0 +1,821 @@ +# \AppRulesApi + +All URIs are relative to *https://your-api-subdomain.onelogin.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateAppRule**](AppRulesApi.md#CreateAppRule) | **Post** /api/2/apps/{app_id}/rules | +[**DeleteRule**](AppRulesApi.md#DeleteRule) | **Delete** /api/2/apps/{app_id}/rules/{rule_id} | Delete Rule +[**GetAppRule**](AppRulesApi.md#GetAppRule) | **Get** /api/2/apps/{app_id}/rules/{rule_id} | Get Rule +[**ListActionValies**](AppRulesApi.md#ListActionValies) | **Get** /api/2/apps/{app_id}/rules/actions/{rule_action_value}/values | List Actions Values +[**ListActions**](AppRulesApi.md#ListActions) | **Get** /api/2/apps/{app_id}/rules/actions | List Actions +[**ListAppRules**](AppRulesApi.md#ListAppRules) | **Get** /api/2/apps/{app_id}/rules | List Rules +[**ListConditionOperators**](AppRulesApi.md#ListConditionOperators) | **Get** /api/2/apps/{app_id}/rules/conditions/{rule_condition_value}/operators | List Conditions Operators +[**ListConditionValues**](AppRulesApi.md#ListConditionValues) | **Get** /api/2/apps/{app_id}/rules/conditions/{rule_condition_value}/values | List Conditions Values +[**ListConditions**](AppRulesApi.md#ListConditions) | **Get** /api/2/apps/{app_id}/rules/conditions | List Conditions +[**SortAppRules**](AppRulesApi.md#SortAppRules) | **Put** /api/2/apps/{app_id}/rules/sort | Bulk Sort +[**UpdateAppRule**](AppRulesApi.md#UpdateAppRule) | **Put** /api/2/apps/{app_id}/rules/{rule_id} | Update Rule + + + +## CreateAppRule + +> AppRule CreateAppRule(ctx, appId).AppRule(appRule).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + appId := int32(56) // int32 | + appRule := *openapiclient.NewAppRule() // AppRule | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AppRulesApi.CreateAppRule(context.Background(), appId).AppRule(appRule).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AppRulesApi.CreateAppRule``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateAppRule`: AppRule + fmt.Fprintf(os.Stdout, "Response from `AppRulesApi.CreateAppRule`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**appId** | **int32** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateAppRuleRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **appRule** | [**AppRule**](AppRule.md) | | + +### Return type + +[**AppRule**](AppRule.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteRule + +> DeleteRule(ctx, appId, ruleId).Execute() + +Delete Rule + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + appId := int32(56) // int32 | + ruleId := "ruleId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AppRulesApi.DeleteRule(context.Background(), appId, ruleId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AppRulesApi.DeleteRule``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**appId** | **int32** | | +**ruleId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteRuleRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + + (empty response body) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetAppRule + +> AppRule GetAppRule(ctx, appId, ruleId).Execute() + +Get Rule + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + appId := int32(56) // int32 | + ruleId := "ruleId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AppRulesApi.GetAppRule(context.Background(), appId, ruleId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AppRulesApi.GetAppRule``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetAppRule`: AppRule + fmt.Fprintf(os.Stdout, "Response from `AppRulesApi.GetAppRule`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**appId** | **int32** | | +**ruleId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetAppRuleRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**AppRule**](AppRule.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListActionValies + +> []RuleAction ListActionValies(ctx, appId, ruleActionValue).Execute() + +List Actions Values + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + appId := int32(56) // int32 | + ruleActionValue := "ruleActionValue_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AppRulesApi.ListActionValies(context.Background(), appId, ruleActionValue).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AppRulesApi.ListActionValies``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListActionValies`: []RuleAction + fmt.Fprintf(os.Stdout, "Response from `AppRulesApi.ListActionValies`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**appId** | **int32** | | +**ruleActionValue** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListActionValiesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**[]RuleAction**](RuleAction.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListActions + +> []RuleAction ListActions(ctx, appId).Execute() + +List Actions + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + appId := int32(56) // int32 | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AppRulesApi.ListActions(context.Background(), appId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AppRulesApi.ListActions``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListActions`: []RuleAction + fmt.Fprintf(os.Stdout, "Response from `AppRulesApi.ListActions`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**appId** | **int32** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListActionsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**[]RuleAction**](RuleAction.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListAppRules + +> []AppRule ListAppRules(ctx, appId).HasCondition(hasCondition).HasConditionType(hasConditionType).HasAction(hasAction).HasActionType(hasActionType).Enabled(enabled).Execute() + +List Rules + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + appId := int32(56) // int32 | + hasCondition := "has_condition=has_role:123456" // string | Filters Rules based on their Conditions. Values formatted as :, where name is the Condition to look for, and value is the value to find. Multiple filters can be declared by using a comma delimited list. Wildcards are supported in both the name and value fields. For example: Single filter. has_condition=has_role:123456 Multiple filters. has_condition=has_role:123456,status:1 Wildcard for conditions. has_condition=*:123456 Wildcard for condition values. has_condition=has_role:* (optional) + hasConditionType := "hasConditionType_example" // string | Filters Rules based on their Conditions. Values formatted as :, where name is the Condition to look for, and value is the value to find. Multiple filters can be declared by using a comma delimited list. Wildcards are supported in both the name and value fields. For example: Single filter. has_condition=has_role:123456 Multiple filters. has_condition=has_role:123456,status:1 Wildcard for conditions. has_condition=*:123456 Wildcard for condition values. has_condition=has_role:* (optional) + hasAction := "has_action=set_groups:123456,set_usertype:*" // string | Filters Rules based on their Actions. Values formatted as :, where name is the Action to look for, and value is the value to find. Multiple filters can be declared by using a comma delimited list. Wildcards are supported in both the name and value fields. For example: Single filter. has_action=set_licenses:123456 Multiple filters. has_action=set_groups:123456,set_usertype:* Wildcard for actions. has_action=*:123456 Wildcard for action values. has_action=set_userprincipalname:* (optional) + hasActionType := "hasActionType_example" // string | Filters Rules based on their action types. Allowed values are: builtin - actions that involve standard attributes custom - actions that involve custom attributes none - no actions are defined For example: Find Rules with no actions has_action_type=none (optional) + enabled := true // bool | Defaults to true. When set to `false` will return all disabled mappings. (optional) (default to true) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AppRulesApi.ListAppRules(context.Background(), appId).HasCondition(hasCondition).HasConditionType(hasConditionType).HasAction(hasAction).HasActionType(hasActionType).Enabled(enabled).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AppRulesApi.ListAppRules``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListAppRules`: []AppRule + fmt.Fprintf(os.Stdout, "Response from `AppRulesApi.ListAppRules`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**appId** | **int32** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListAppRulesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **hasCondition** | **string** | Filters Rules based on their Conditions. Values formatted as :, where name is the Condition to look for, and value is the value to find. Multiple filters can be declared by using a comma delimited list. Wildcards are supported in both the name and value fields. For example: Single filter. has_condition=has_role:123456 Multiple filters. has_condition=has_role:123456,status:1 Wildcard for conditions. has_condition=*:123456 Wildcard for condition values. has_condition=has_role:* | + **hasConditionType** | **string** | Filters Rules based on their Conditions. Values formatted as :, where name is the Condition to look for, and value is the value to find. Multiple filters can be declared by using a comma delimited list. Wildcards are supported in both the name and value fields. For example: Single filter. has_condition=has_role:123456 Multiple filters. has_condition=has_role:123456,status:1 Wildcard for conditions. has_condition=*:123456 Wildcard for condition values. has_condition=has_role:* | + **hasAction** | **string** | Filters Rules based on their Actions. Values formatted as :, where name is the Action to look for, and value is the value to find. Multiple filters can be declared by using a comma delimited list. Wildcards are supported in both the name and value fields. For example: Single filter. has_action=set_licenses:123456 Multiple filters. has_action=set_groups:123456,set_usertype:* Wildcard for actions. has_action=*:123456 Wildcard for action values. has_action=set_userprincipalname:* | + **hasActionType** | **string** | Filters Rules based on their action types. Allowed values are: builtin - actions that involve standard attributes custom - actions that involve custom attributes none - no actions are defined For example: Find Rules with no actions has_action_type=none | + **enabled** | **bool** | Defaults to true. When set to `false` will return all disabled mappings. | [default to true] + +### Return type + +[**[]AppRule**](AppRule.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListConditionOperators + +> []RuleCondition ListConditionOperators(ctx, appId, ruleConditionValue).Execute() + +List Conditions Operators + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + appId := int32(56) // int32 | + ruleConditionValue := "ruleConditionValue_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AppRulesApi.ListConditionOperators(context.Background(), appId, ruleConditionValue).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AppRulesApi.ListConditionOperators``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListConditionOperators`: []RuleCondition + fmt.Fprintf(os.Stdout, "Response from `AppRulesApi.ListConditionOperators`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**appId** | **int32** | | +**ruleConditionValue** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListConditionOperatorsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**[]RuleCondition**](RuleCondition.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListConditionValues + +> RuleCondition ListConditionValues(ctx, appId, ruleConditionValue).Execute() + +List Conditions Values + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + appId := int32(56) // int32 | + ruleConditionValue := "ruleConditionValue_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AppRulesApi.ListConditionValues(context.Background(), appId, ruleConditionValue).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AppRulesApi.ListConditionValues``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListConditionValues`: RuleCondition + fmt.Fprintf(os.Stdout, "Response from `AppRulesApi.ListConditionValues`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**appId** | **int32** | | +**ruleConditionValue** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListConditionValuesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**RuleCondition**](RuleCondition.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListConditions + +> []ListConditions200ResponseInner ListConditions(ctx, appId).Execute() + +List Conditions + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + appId := int32(56) // int32 | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AppRulesApi.ListConditions(context.Background(), appId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AppRulesApi.ListConditions``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListConditions`: []ListConditions200ResponseInner + fmt.Fprintf(os.Stdout, "Response from `AppRulesApi.ListConditions`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**appId** | **int32** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListConditionsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**[]ListConditions200ResponseInner**](ListConditions200ResponseInner.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SortAppRules + +> []int32 SortAppRules(ctx, appId).RequestBody(requestBody).Execute() + +Bulk Sort + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + appId := int32(56) // int32 | + requestBody := []int32{int32(123)} // []int32 | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AppRulesApi.SortAppRules(context.Background(), appId).RequestBody(requestBody).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AppRulesApi.SortAppRules``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SortAppRules`: []int32 + fmt.Fprintf(os.Stdout, "Response from `AppRulesApi.SortAppRules`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**appId** | **int32** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSortAppRulesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **requestBody** | **[]int32** | | + +### Return type + +**[]int32** + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateAppRule + +> AppRule UpdateAppRule(ctx, appId, ruleId).AppRule(appRule).Execute() + +Update Rule + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + appId := int32(56) // int32 | + ruleId := "ruleId_example" // string | + appRule := *openapiclient.NewAppRule() // AppRule | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AppRulesApi.UpdateAppRule(context.Background(), appId, ruleId).AppRule(appRule).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AppRulesApi.UpdateAppRule``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateAppRule`: AppRule + fmt.Fprintf(os.Stdout, "Response from `AppRulesApi.UpdateAppRule`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**appId** | **int32** | | +**ruleId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateAppRuleRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **appRule** | [**AppRule**](AppRule.md) | | + +### Return type + +[**AppRule**](AppRule.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/docs/AppsApi.md b/docs/AppsApi.md new file mode 100644 index 0000000..1f6bc6f --- /dev/null +++ b/docs/AppsApi.md @@ -0,0 +1,562 @@ +# \AppsApi + +All URIs are relative to *https://your-api-subdomain.onelogin.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateApp**](AppsApi.md#CreateApp) | **Post** /api/2/apps | Create App +[**DeleteApp**](AppsApi.md#DeleteApp) | **Delete** /api/2/apps/{app_id} | Delete App +[**DeleteAppParameter**](AppsApi.md#DeleteAppParameter) | **Delete** /api/2/apps/{app_id}/parameters/{parameter_id} | Delete Parameter from App +[**GetApp**](AppsApi.md#GetApp) | **Get** /api/2/apps/{app_id} | Get App +[**GetAppUsers**](AppsApi.md#GetAppUsers) | **Get** /api/2/apps/{app_id}/users | Get App Users +[**ListApps**](AppsApi.md#ListApps) | **Get** /api/2/apps | List Apps +[**ListConnectors**](AppsApi.md#ListConnectors) | **Get** /api/2/connectors | List Connectors +[**UpdateApp**](AppsApi.md#UpdateApp) | **Put** /api/2/apps/{app_id} | Update App + + + +## CreateApp + +> CreateApp200Response CreateApp(ctx).ContentType(contentType).CreateAppRequest(createAppRequest).Execute() + +Create App + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + contentType := "application/json" // string | (optional) (default to "application/json") + createAppRequest := openapiclient.createApp_request{GenericApp: openapiclient.NewGenericApp()} // CreateAppRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AppsApi.CreateApp(context.Background()).ContentType(contentType).CreateAppRequest(createAppRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AppsApi.CreateApp``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateApp`: CreateApp200Response + fmt.Fprintf(os.Stdout, "Response from `AppsApi.CreateApp`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateAppRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **contentType** | **string** | | [default to "application/json"] + **createAppRequest** | [**CreateAppRequest**](CreateAppRequest.md) | | + +### Return type + +[**CreateApp200Response**](CreateApp200Response.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteApp + +> DeleteApp(ctx, appId).Execute() + +Delete App + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + appId := int32(56) // int32 | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AppsApi.DeleteApp(context.Background(), appId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AppsApi.DeleteApp``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**appId** | **int32** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteAppRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + + (empty response body) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteAppParameter + +> DeleteAppParameter(ctx, appId, parameterId).Execute() + +Delete Parameter from App + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + appId := int32(56) // int32 | + parameterId := "parameterId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AppsApi.DeleteAppParameter(context.Background(), appId, parameterId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AppsApi.DeleteAppParameter``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**appId** | **int32** | | +**parameterId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteAppParameterRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + + (empty response body) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetApp + +> GenericApp GetApp(ctx, appId).Execute() + +Get App + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + appId := int32(56) // int32 | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AppsApi.GetApp(context.Background(), appId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AppsApi.GetApp``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetApp`: GenericApp + fmt.Fprintf(os.Stdout, "Response from `AppsApi.GetApp`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**appId** | **int32** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetAppRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**GenericApp**](GenericApp.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetAppUsers + +> []User GetAppUsers(ctx, appId).Execute() + +Get App Users + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + appId := int32(56) // int32 | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AppsApi.GetAppUsers(context.Background(), appId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AppsApi.GetAppUsers``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetAppUsers`: []User + fmt.Fprintf(os.Stdout, "Response from `AppsApi.GetAppUsers`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**appId** | **int32** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetAppUsersRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**[]User**](User.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListApps + +> []GenericApp ListApps(ctx).Execute() + +List Apps + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AppsApi.ListApps(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AppsApi.ListApps``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListApps`: []GenericApp + fmt.Fprintf(os.Stdout, "Response from `AppsApi.ListApps`: %v\n", resp) +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiListAppsRequest struct via the builder pattern + + +### Return type + +[**[]GenericApp**](GenericApp.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListConnectors + +> Connector ListConnectors(ctx).Name(name).Execute() + +List Connectors + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + name := "name_example" // string | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AppsApi.ListConnectors(context.Background()).Name(name).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AppsApi.ListConnectors``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListConnectors`: Connector + fmt.Fprintf(os.Stdout, "Response from `AppsApi.ListConnectors`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListConnectorsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **string** | | + +### Return type + +[**Connector**](Connector.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateApp + +> GenericApp UpdateApp(ctx, appId).RequestBody(requestBody).Execute() + +Update App + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + appId := int32(56) // int32 | + requestBody := map[string]interface{}{"key": interface{}(123)} // map[string]interface{} | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AppsApi.UpdateApp(context.Background(), appId).RequestBody(requestBody).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AppsApi.UpdateApp``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateApp`: GenericApp + fmt.Fprintf(os.Stdout, "Response from `AppsApi.UpdateApp`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**appId** | **int32** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateAppRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **requestBody** | **map[string]interface{}** | | + +### Return type + +[**GenericApp**](GenericApp.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/docs/AssignUsersToPrivilegeRequest.md b/docs/AssignUsersToPrivilegeRequest.md new file mode 100644 index 0000000..0d9c7f8 --- /dev/null +++ b/docs/AssignUsersToPrivilegeRequest.md @@ -0,0 +1,56 @@ +# AssignUsersToPrivilegeRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Users** | Pointer to **[]int32** | | [optional] + +## Methods + +### NewAssignUsersToPrivilegeRequest + +`func NewAssignUsersToPrivilegeRequest() *AssignUsersToPrivilegeRequest` + +NewAssignUsersToPrivilegeRequest instantiates a new AssignUsersToPrivilegeRequest 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 + +### NewAssignUsersToPrivilegeRequestWithDefaults + +`func NewAssignUsersToPrivilegeRequestWithDefaults() *AssignUsersToPrivilegeRequest` + +NewAssignUsersToPrivilegeRequestWithDefaults instantiates a new AssignUsersToPrivilegeRequest 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 + +### GetUsers + +`func (o *AssignUsersToPrivilegeRequest) GetUsers() []int32` + +GetUsers returns the Users field if non-nil, zero value otherwise. + +### GetUsersOk + +`func (o *AssignUsersToPrivilegeRequest) 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 *AssignUsersToPrivilegeRequest) SetUsers(v []int32)` + +SetUsers sets Users field to given value. + +### HasUsers + +`func (o *AssignUsersToPrivilegeRequest) HasUsers() bool` + +HasUsers 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/AddAccessTokenClaimRequest.md b/docs/AuthClaim.md similarity index 57% rename from docs/AddAccessTokenClaimRequest.md rename to docs/AuthClaim.md index ac8e4ba..09f7a16 100644 --- a/docs/AddAccessTokenClaimRequest.md +++ b/docs/AuthClaim.md @@ -1,104 +1,99 @@ -# AddAccessTokenClaimRequest +# AuthClaim ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Name** | Pointer to **string** | | [optional] -**UserAttributeMappings** | Pointer to **string** | | [optional] -**UserAttributeMacros** | Pointer to **string** | | [optional] +**Name** | **string** | The attribute name for the claim when its returned in an Access Token | +**UserAttributeMappings** | Pointer to **string** | A user attribute to map values from For custom attributes prefix the name of the attribute with `custom_attribute_`. e.g. To get the value for custom attribute `employee_id` use `custom_attribute_employee_id`. | [optional] +**UserAttributeMacros** | Pointer to **string** | When `user_attribute_mappings` is set to `_macro_` this macro will be used to assign the parameter value. | [optional] ## Methods -### NewAddAccessTokenClaimRequest +### NewAuthClaim -`func NewAddAccessTokenClaimRequest() *AddAccessTokenClaimRequest` +`func NewAuthClaim(name string, ) *AuthClaim` -NewAddAccessTokenClaimRequest instantiates a new AddAccessTokenClaimRequest object +NewAuthClaim instantiates a new AuthClaim 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 -### NewAddAccessTokenClaimRequestWithDefaults +### NewAuthClaimWithDefaults -`func NewAddAccessTokenClaimRequestWithDefaults() *AddAccessTokenClaimRequest` +`func NewAuthClaimWithDefaults() *AuthClaim` -NewAddAccessTokenClaimRequestWithDefaults instantiates a new AddAccessTokenClaimRequest object +NewAuthClaimWithDefaults instantiates a new AuthClaim 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 *AddAccessTokenClaimRequest) GetName() string` +`func (o *AuthClaim) GetName() string` GetName returns the Name field if non-nil, zero value otherwise. ### GetNameOk -`func (o *AddAccessTokenClaimRequest) GetNameOk() (*string, bool)` +`func (o *AuthClaim) 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 *AddAccessTokenClaimRequest) SetName(v string)` +`func (o *AuthClaim) SetName(v string)` SetName sets Name field to given value. -### HasName - -`func (o *AddAccessTokenClaimRequest) HasName() bool` - -HasName returns a boolean if a field has been set. ### GetUserAttributeMappings -`func (o *AddAccessTokenClaimRequest) GetUserAttributeMappings() string` +`func (o *AuthClaim) GetUserAttributeMappings() string` GetUserAttributeMappings returns the UserAttributeMappings field if non-nil, zero value otherwise. ### GetUserAttributeMappingsOk -`func (o *AddAccessTokenClaimRequest) GetUserAttributeMappingsOk() (*string, bool)` +`func (o *AuthClaim) GetUserAttributeMappingsOk() (*string, bool)` GetUserAttributeMappingsOk returns a tuple with the UserAttributeMappings field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetUserAttributeMappings -`func (o *AddAccessTokenClaimRequest) SetUserAttributeMappings(v string)` +`func (o *AuthClaim) SetUserAttributeMappings(v string)` SetUserAttributeMappings sets UserAttributeMappings field to given value. ### HasUserAttributeMappings -`func (o *AddAccessTokenClaimRequest) HasUserAttributeMappings() bool` +`func (o *AuthClaim) HasUserAttributeMappings() bool` HasUserAttributeMappings returns a boolean if a field has been set. ### GetUserAttributeMacros -`func (o *AddAccessTokenClaimRequest) GetUserAttributeMacros() string` +`func (o *AuthClaim) GetUserAttributeMacros() string` GetUserAttributeMacros returns the UserAttributeMacros field if non-nil, zero value otherwise. ### GetUserAttributeMacrosOk -`func (o *AddAccessTokenClaimRequest) GetUserAttributeMacrosOk() (*string, bool)` +`func (o *AuthClaim) GetUserAttributeMacrosOk() (*string, bool)` GetUserAttributeMacrosOk returns a tuple with the UserAttributeMacros field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetUserAttributeMacros -`func (o *AddAccessTokenClaimRequest) SetUserAttributeMacros(v string)` +`func (o *AuthClaim) SetUserAttributeMacros(v string)` SetUserAttributeMacros sets UserAttributeMacros field to given value. ### HasUserAttributeMacros -`func (o *AddAccessTokenClaimRequest) HasUserAttributeMacros() bool` +`func (o *AuthClaim) HasUserAttributeMacros() bool` HasUserAttributeMacros returns a boolean if a field has been set. diff --git a/docs/Id.md b/docs/AuthId.md similarity index 69% rename from docs/Id.md rename to docs/AuthId.md index e14411d..91598d1 100644 --- a/docs/Id.md +++ b/docs/AuthId.md @@ -1,52 +1,52 @@ -# Id +# AuthId ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | Pointer to **string** | | [optional] +**Id** | Pointer to **int32** | Unique ID for the Scope | [optional] ## Methods -### NewId +### NewAuthId -`func NewId() *Id` +`func NewAuthId() *AuthId` -NewId instantiates a new Id object +NewAuthId instantiates a new AuthId 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 -### NewIdWithDefaults +### NewAuthIdWithDefaults -`func NewIdWithDefaults() *Id` +`func NewAuthIdWithDefaults() *AuthId` -NewIdWithDefaults instantiates a new Id object +NewAuthIdWithDefaults instantiates a new AuthId 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 ### GetId -`func (o *Id) GetId() string` +`func (o *AuthId) GetId() int32` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk -`func (o *Id) GetIdOk() (*string, bool)` +`func (o *AuthId) GetIdOk() (*int32, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId -`func (o *Id) SetId(v string)` +`func (o *AuthId) SetId(v int32)` SetId sets Id field to given value. ### HasId -`func (o *Id) HasId() bool` +`func (o *AuthId) HasId() bool` HasId returns a boolean if a field has been set. diff --git a/docs/AuthMethod.md b/docs/AuthMethod.md index 2b9ea14..8b02bd1 100644 --- a/docs/AuthMethod.md +++ b/docs/AuthMethod.md @@ -13,6 +13,8 @@ * `_4` (value: `4`) +* `_5` (value: `5`) + * `_6` (value: `6`) * `_7` (value: `7`) diff --git a/docs/ListScopes200ResponseInner.md b/docs/AuthScope.md similarity index 57% rename from docs/ListScopes200ResponseInner.md rename to docs/AuthScope.md index 51fef92..aedc8b1 100644 --- a/docs/ListScopes200ResponseInner.md +++ b/docs/AuthScope.md @@ -1,104 +1,104 @@ -# ListScopes200ResponseInner +# AuthScope ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | Pointer to **int32** | | [optional] -**Value** | Pointer to **string** | | [optional] -**Description** | Pointer to **string** | | [optional] +**Id** | Pointer to **int32** | Unique ID for the Scope | [optional] [readonly] +**Value** | Pointer to **string** | A value representing the api scope that with be authorized | [optional] +**Description** | Pointer to **string** | A description of what access the scope enables | [optional] ## Methods -### NewListScopes200ResponseInner +### NewAuthScope -`func NewListScopes200ResponseInner() *ListScopes200ResponseInner` +`func NewAuthScope() *AuthScope` -NewListScopes200ResponseInner instantiates a new ListScopes200ResponseInner object +NewAuthScope instantiates a new AuthScope 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 -### NewListScopes200ResponseInnerWithDefaults +### NewAuthScopeWithDefaults -`func NewListScopes200ResponseInnerWithDefaults() *ListScopes200ResponseInner` +`func NewAuthScopeWithDefaults() *AuthScope` -NewListScopes200ResponseInnerWithDefaults instantiates a new ListScopes200ResponseInner object +NewAuthScopeWithDefaults instantiates a new AuthScope 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 ### GetId -`func (o *ListScopes200ResponseInner) GetId() int32` +`func (o *AuthScope) GetId() int32` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk -`func (o *ListScopes200ResponseInner) GetIdOk() (*int32, bool)` +`func (o *AuthScope) GetIdOk() (*int32, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId -`func (o *ListScopes200ResponseInner) SetId(v int32)` +`func (o *AuthScope) SetId(v int32)` SetId sets Id field to given value. ### HasId -`func (o *ListScopes200ResponseInner) HasId() bool` +`func (o *AuthScope) HasId() bool` HasId returns a boolean if a field has been set. ### GetValue -`func (o *ListScopes200ResponseInner) GetValue() string` +`func (o *AuthScope) GetValue() string` GetValue returns the Value field if non-nil, zero value otherwise. ### GetValueOk -`func (o *ListScopes200ResponseInner) GetValueOk() (*string, bool)` +`func (o *AuthScope) GetValueOk() (*string, bool)` GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetValue -`func (o *ListScopes200ResponseInner) SetValue(v string)` +`func (o *AuthScope) SetValue(v string)` SetValue sets Value field to given value. ### HasValue -`func (o *ListScopes200ResponseInner) HasValue() bool` +`func (o *AuthScope) HasValue() bool` HasValue returns a boolean if a field has been set. ### GetDescription -`func (o *ListScopes200ResponseInner) GetDescription() string` +`func (o *AuthScope) GetDescription() string` GetDescription returns the Description field if non-nil, zero value otherwise. ### GetDescriptionOk -`func (o *ListScopes200ResponseInner) GetDescriptionOk() (*string, bool)` +`func (o *AuthScope) GetDescriptionOk() (*string, bool)` GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetDescription -`func (o *ListScopes200ResponseInner) SetDescription(v string)` +`func (o *AuthScope) SetDescription(v string)` SetDescription sets Description field to given value. ### HasDescription -`func (o *ListScopes200ResponseInner) HasDescription() bool` +`func (o *AuthScope) HasDescription() bool` HasDescription returns a boolean if a field has been set. diff --git a/docs/AuthServer.md b/docs/AuthServer.md new file mode 100644 index 0000000..74c160b --- /dev/null +++ b/docs/AuthServer.md @@ -0,0 +1,119 @@ +# AuthServer + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **int32** | Auth server unique ID in Onelogin | [optional] [readonly] +**Name** | **string** | Name of the API. | +**Description** | **string** | Description of what the API does. | +**Configuration** | [**AuthServerConfiguration**](AuthServerConfiguration.md) | | + +## Methods + +### NewAuthServer + +`func NewAuthServer(name string, description string, configuration AuthServerConfiguration, ) *AuthServer` + +NewAuthServer instantiates a new AuthServer 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 + +### NewAuthServerWithDefaults + +`func NewAuthServerWithDefaults() *AuthServer` + +NewAuthServerWithDefaults instantiates a new AuthServer 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 + +### GetId + +`func (o *AuthServer) GetId() int32` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *AuthServer) GetIdOk() (*int32, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *AuthServer) SetId(v int32)` + +SetId sets Id field to given value. + +### HasId + +`func (o *AuthServer) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetName + +`func (o *AuthServer) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *AuthServer) 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 *AuthServer) SetName(v string)` + +SetName sets Name field to given value. + + +### GetDescription + +`func (o *AuthServer) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *AuthServer) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *AuthServer) SetDescription(v string)` + +SetDescription sets Description field to given value. + + +### GetConfiguration + +`func (o *AuthServer) GetConfiguration() AuthServerConfiguration` + +GetConfiguration returns the Configuration field if non-nil, zero value otherwise. + +### GetConfigurationOk + +`func (o *AuthServer) GetConfigurationOk() (*AuthServerConfiguration, bool)` + +GetConfigurationOk returns a tuple with the Configuration field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConfiguration + +`func (o *AuthServer) SetConfiguration(v AuthServerConfiguration)` + +SetConfiguration sets Configuration 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/AuthServerConfiguration.md b/docs/AuthServerConfiguration.md index f3c1b28..c512f49 100644 --- a/docs/AuthServerConfiguration.md +++ b/docs/AuthServerConfiguration.md @@ -4,16 +4,16 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Audiences** | Pointer to **[]string** | | [optional] -**RefreshTokenExpirationMinutes** | Pointer to **int32** | | [optional] -**ResourceIdentifier** | Pointer to **string** | | [optional] -**AccessTokenExpirationMinutes** | Pointer to **int32** | | [optional] +**Audiences** | **[]string** | List of API endpoints that will be returned in Access Tokens. | +**RefreshTokenExpirationMinutes** | Pointer to **int32** | The number of minutes until refresh token expires. There is no maximum expiry limit. | [optional] +**ResourceIdentifier** | **string** | Unique identifier for the API that the Authorization Server will issue Access Tokens for. | +**AccessTokenExpirationMinutes** | Pointer to **int32** | The number of minutes until access token expires. There is no maximum expiry limit. | [optional] ## Methods ### NewAuthServerConfiguration -`func NewAuthServerConfiguration() *AuthServerConfiguration` +`func NewAuthServerConfiguration(audiences []string, resourceIdentifier string, ) *AuthServerConfiguration` NewAuthServerConfiguration instantiates a new AuthServerConfiguration object This constructor will assign default values to properties that have it defined, @@ -47,11 +47,6 @@ and a boolean to check if the value has been set. SetAudiences sets Audiences field to given value. -### HasAudiences - -`func (o *AuthServerConfiguration) HasAudiences() bool` - -HasAudiences returns a boolean if a field has been set. ### GetRefreshTokenExpirationMinutes @@ -97,11 +92,6 @@ and a boolean to check if the value has been set. SetResourceIdentifier sets ResourceIdentifier field to given value. -### HasResourceIdentifier - -`func (o *AuthServerConfiguration) HasResourceIdentifier() bool` - -HasResourceIdentifier returns a boolean if a field has been set. ### GetAccessTokenExpirationMinutes diff --git a/docs/Brand.md b/docs/Brand.md new file mode 100644 index 0000000..d07572b --- /dev/null +++ b/docs/Brand.md @@ -0,0 +1,345 @@ +# Brand + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int32** | | +**Enabled** | **bool** | Indicates if the brand is enabled or not | [default to false] +**CustomSupportEnabled** | **bool** | Indicates if the custom support is enabled. If enabled, the login page includes the ability to submit a support request. | +**CustomColor** | **string** | Primary brand color | +**CustomAccentColor** | **string** | Secondary brand color | +**CustomMaskingColor** | **string** | Color for the masking layer above the background image of the branded login screen. | +**CustomMaskingOpacity** | **int32** | Opacity for the custom_masking_color. | +**MfaEnrollmentMessage** | **string** | Text that replaces the default text displayed on the initial screen of the MFA Registration. | +**EnableCustomLabelForLoginScreen** | **bool** | Indicates if the custom Username/Email field label is enabled or not | +**CustomLabelTextForLoginScreen** | **string** | Custom label for the Username/Email field on the login screen. See example here. | +**LoginInstruction** | **string** | Text for the login instruction screen, styled in Markdown. | +**LoginInstructionTitle** | **string** | Link text to show login instruction screen. | +**HideOneloginFooter** | **bool** | Indicates if the OneLogin footer will appear at the bottom of the login page. | +**Background** | [**BrandBackground**](BrandBackground.md) | | +**Logo** | [**BrandLogo**](BrandLogo.md) | | + +## Methods + +### NewBrand + +`func NewBrand(id int32, enabled bool, customSupportEnabled bool, customColor string, customAccentColor string, customMaskingColor string, customMaskingOpacity int32, mfaEnrollmentMessage string, enableCustomLabelForLoginScreen bool, customLabelTextForLoginScreen string, loginInstruction string, loginInstructionTitle string, hideOneloginFooter bool, background BrandBackground, logo BrandLogo, ) *Brand` + +NewBrand instantiates a new Brand 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 + +### NewBrandWithDefaults + +`func NewBrandWithDefaults() *Brand` + +NewBrandWithDefaults instantiates a new Brand 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 + +### GetId + +`func (o *Brand) GetId() int32` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Brand) GetIdOk() (*int32, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Brand) SetId(v int32)` + +SetId sets Id field to given value. + + +### GetEnabled + +`func (o *Brand) GetEnabled() bool` + +GetEnabled returns the Enabled field if non-nil, zero value otherwise. + +### GetEnabledOk + +`func (o *Brand) 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 *Brand) SetEnabled(v bool)` + +SetEnabled sets Enabled field to given value. + + +### GetCustomSupportEnabled + +`func (o *Brand) GetCustomSupportEnabled() bool` + +GetCustomSupportEnabled returns the CustomSupportEnabled field if non-nil, zero value otherwise. + +### GetCustomSupportEnabledOk + +`func (o *Brand) GetCustomSupportEnabledOk() (*bool, bool)` + +GetCustomSupportEnabledOk returns a tuple with the CustomSupportEnabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustomSupportEnabled + +`func (o *Brand) SetCustomSupportEnabled(v bool)` + +SetCustomSupportEnabled sets CustomSupportEnabled field to given value. + + +### GetCustomColor + +`func (o *Brand) GetCustomColor() string` + +GetCustomColor returns the CustomColor field if non-nil, zero value otherwise. + +### GetCustomColorOk + +`func (o *Brand) GetCustomColorOk() (*string, bool)` + +GetCustomColorOk returns a tuple with the CustomColor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustomColor + +`func (o *Brand) SetCustomColor(v string)` + +SetCustomColor sets CustomColor field to given value. + + +### GetCustomAccentColor + +`func (o *Brand) GetCustomAccentColor() string` + +GetCustomAccentColor returns the CustomAccentColor field if non-nil, zero value otherwise. + +### GetCustomAccentColorOk + +`func (o *Brand) GetCustomAccentColorOk() (*string, bool)` + +GetCustomAccentColorOk returns a tuple with the CustomAccentColor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustomAccentColor + +`func (o *Brand) SetCustomAccentColor(v string)` + +SetCustomAccentColor sets CustomAccentColor field to given value. + + +### GetCustomMaskingColor + +`func (o *Brand) GetCustomMaskingColor() string` + +GetCustomMaskingColor returns the CustomMaskingColor field if non-nil, zero value otherwise. + +### GetCustomMaskingColorOk + +`func (o *Brand) GetCustomMaskingColorOk() (*string, bool)` + +GetCustomMaskingColorOk returns a tuple with the CustomMaskingColor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustomMaskingColor + +`func (o *Brand) SetCustomMaskingColor(v string)` + +SetCustomMaskingColor sets CustomMaskingColor field to given value. + + +### GetCustomMaskingOpacity + +`func (o *Brand) GetCustomMaskingOpacity() int32` + +GetCustomMaskingOpacity returns the CustomMaskingOpacity field if non-nil, zero value otherwise. + +### GetCustomMaskingOpacityOk + +`func (o *Brand) GetCustomMaskingOpacityOk() (*int32, bool)` + +GetCustomMaskingOpacityOk returns a tuple with the CustomMaskingOpacity field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustomMaskingOpacity + +`func (o *Brand) SetCustomMaskingOpacity(v int32)` + +SetCustomMaskingOpacity sets CustomMaskingOpacity field to given value. + + +### GetMfaEnrollmentMessage + +`func (o *Brand) GetMfaEnrollmentMessage() string` + +GetMfaEnrollmentMessage returns the MfaEnrollmentMessage field if non-nil, zero value otherwise. + +### GetMfaEnrollmentMessageOk + +`func (o *Brand) GetMfaEnrollmentMessageOk() (*string, bool)` + +GetMfaEnrollmentMessageOk returns a tuple with the MfaEnrollmentMessage field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMfaEnrollmentMessage + +`func (o *Brand) SetMfaEnrollmentMessage(v string)` + +SetMfaEnrollmentMessage sets MfaEnrollmentMessage field to given value. + + +### GetEnableCustomLabelForLoginScreen + +`func (o *Brand) GetEnableCustomLabelForLoginScreen() bool` + +GetEnableCustomLabelForLoginScreen returns the EnableCustomLabelForLoginScreen field if non-nil, zero value otherwise. + +### GetEnableCustomLabelForLoginScreenOk + +`func (o *Brand) GetEnableCustomLabelForLoginScreenOk() (*bool, bool)` + +GetEnableCustomLabelForLoginScreenOk returns a tuple with the EnableCustomLabelForLoginScreen field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnableCustomLabelForLoginScreen + +`func (o *Brand) SetEnableCustomLabelForLoginScreen(v bool)` + +SetEnableCustomLabelForLoginScreen sets EnableCustomLabelForLoginScreen field to given value. + + +### GetCustomLabelTextForLoginScreen + +`func (o *Brand) GetCustomLabelTextForLoginScreen() string` + +GetCustomLabelTextForLoginScreen returns the CustomLabelTextForLoginScreen field if non-nil, zero value otherwise. + +### GetCustomLabelTextForLoginScreenOk + +`func (o *Brand) GetCustomLabelTextForLoginScreenOk() (*string, bool)` + +GetCustomLabelTextForLoginScreenOk returns a tuple with the CustomLabelTextForLoginScreen field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustomLabelTextForLoginScreen + +`func (o *Brand) SetCustomLabelTextForLoginScreen(v string)` + +SetCustomLabelTextForLoginScreen sets CustomLabelTextForLoginScreen field to given value. + + +### GetLoginInstruction + +`func (o *Brand) GetLoginInstruction() string` + +GetLoginInstruction returns the LoginInstruction field if non-nil, zero value otherwise. + +### GetLoginInstructionOk + +`func (o *Brand) GetLoginInstructionOk() (*string, bool)` + +GetLoginInstructionOk returns a tuple with the LoginInstruction field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLoginInstruction + +`func (o *Brand) SetLoginInstruction(v string)` + +SetLoginInstruction sets LoginInstruction field to given value. + + +### GetLoginInstructionTitle + +`func (o *Brand) GetLoginInstructionTitle() string` + +GetLoginInstructionTitle returns the LoginInstructionTitle field if non-nil, zero value otherwise. + +### GetLoginInstructionTitleOk + +`func (o *Brand) GetLoginInstructionTitleOk() (*string, bool)` + +GetLoginInstructionTitleOk returns a tuple with the LoginInstructionTitle field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLoginInstructionTitle + +`func (o *Brand) SetLoginInstructionTitle(v string)` + +SetLoginInstructionTitle sets LoginInstructionTitle field to given value. + + +### GetHideOneloginFooter + +`func (o *Brand) GetHideOneloginFooter() bool` + +GetHideOneloginFooter returns the HideOneloginFooter field if non-nil, zero value otherwise. + +### GetHideOneloginFooterOk + +`func (o *Brand) GetHideOneloginFooterOk() (*bool, bool)` + +GetHideOneloginFooterOk returns a tuple with the HideOneloginFooter field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHideOneloginFooter + +`func (o *Brand) SetHideOneloginFooter(v bool)` + +SetHideOneloginFooter sets HideOneloginFooter field to given value. + + +### GetBackground + +`func (o *Brand) GetBackground() BrandBackground` + +GetBackground returns the Background field if non-nil, zero value otherwise. + +### GetBackgroundOk + +`func (o *Brand) GetBackgroundOk() (*BrandBackground, 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 *Brand) SetBackground(v BrandBackground)` + +SetBackground sets Background field to given value. + + +### GetLogo + +`func (o *Brand) GetLogo() BrandLogo` + +GetLogo returns the Logo field if non-nil, zero value otherwise. + +### GetLogoOk + +`func (o *Brand) GetLogoOk() (*BrandLogo, bool)` + +GetLogoOk returns a tuple with the Logo field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLogo + +`func (o *Brand) SetLogo(v BrandLogo)` + +SetLogo sets Logo 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/BrandApp.md b/docs/BrandApp.md new file mode 100644 index 0000000..b2286a1 --- /dev/null +++ b/docs/BrandApp.md @@ -0,0 +1,219 @@ +# BrandApp + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int32** | | +**UpdatedAt** | **string** | | +**Name** | **string** | | +**ConnectorId** | **int32** | | +**AuthMethodDescription** | **string** | | +**Description** | **string** | | +**AuthMethod** | **int32** | | +**CreatedAt** | **string** | | +**Visible** | **bool** | | + +## Methods + +### NewBrandApp + +`func NewBrandApp(id int32, updatedAt string, name string, connectorId int32, authMethodDescription string, description string, authMethod int32, createdAt string, visible bool, ) *BrandApp` + +NewBrandApp instantiates a new BrandApp 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 + +### NewBrandAppWithDefaults + +`func NewBrandAppWithDefaults() *BrandApp` + +NewBrandAppWithDefaults instantiates a new BrandApp 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 + +### GetId + +`func (o *BrandApp) GetId() int32` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *BrandApp) GetIdOk() (*int32, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *BrandApp) SetId(v int32)` + +SetId sets Id field to given value. + + +### GetUpdatedAt + +`func (o *BrandApp) GetUpdatedAt() string` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *BrandApp) GetUpdatedAtOk() (*string, bool)` + +GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedAt + +`func (o *BrandApp) SetUpdatedAt(v string)` + +SetUpdatedAt sets UpdatedAt field to given value. + + +### GetName + +`func (o *BrandApp) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *BrandApp) 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 *BrandApp) SetName(v string)` + +SetName sets Name field to given value. + + +### GetConnectorId + +`func (o *BrandApp) GetConnectorId() int32` + +GetConnectorId returns the ConnectorId field if non-nil, zero value otherwise. + +### GetConnectorIdOk + +`func (o *BrandApp) GetConnectorIdOk() (*int32, bool)` + +GetConnectorIdOk returns a tuple with the ConnectorId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConnectorId + +`func (o *BrandApp) SetConnectorId(v int32)` + +SetConnectorId sets ConnectorId field to given value. + + +### GetAuthMethodDescription + +`func (o *BrandApp) GetAuthMethodDescription() string` + +GetAuthMethodDescription returns the AuthMethodDescription field if non-nil, zero value otherwise. + +### GetAuthMethodDescriptionOk + +`func (o *BrandApp) GetAuthMethodDescriptionOk() (*string, bool)` + +GetAuthMethodDescriptionOk returns a tuple with the AuthMethodDescription field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAuthMethodDescription + +`func (o *BrandApp) SetAuthMethodDescription(v string)` + +SetAuthMethodDescription sets AuthMethodDescription field to given value. + + +### GetDescription + +`func (o *BrandApp) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *BrandApp) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *BrandApp) SetDescription(v string)` + +SetDescription sets Description field to given value. + + +### GetAuthMethod + +`func (o *BrandApp) GetAuthMethod() int32` + +GetAuthMethod returns the AuthMethod field if non-nil, zero value otherwise. + +### GetAuthMethodOk + +`func (o *BrandApp) GetAuthMethodOk() (*int32, bool)` + +GetAuthMethodOk returns a tuple with the AuthMethod field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAuthMethod + +`func (o *BrandApp) SetAuthMethod(v int32)` + +SetAuthMethod sets AuthMethod field to given value. + + +### GetCreatedAt + +`func (o *BrandApp) GetCreatedAt() string` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *BrandApp) GetCreatedAtOk() (*string, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *BrandApp) SetCreatedAt(v string)` + +SetCreatedAt sets CreatedAt field to given value. + + +### GetVisible + +`func (o *BrandApp) GetVisible() bool` + +GetVisible returns the Visible field if non-nil, zero value otherwise. + +### GetVisibleOk + +`func (o *BrandApp) GetVisibleOk() (*bool, bool)` + +GetVisibleOk returns a tuple with the Visible field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVisible + +`func (o *BrandApp) SetVisible(v bool)` + +SetVisible sets Visible 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/BrandBackground.md b/docs/BrandBackground.md new file mode 100644 index 0000000..e5386d5 --- /dev/null +++ b/docs/BrandBackground.md @@ -0,0 +1,114 @@ +# BrandBackground + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Urls** | [**BrandBackgroundUrls**](BrandBackgroundUrls.md) | | +**FileSize** | **int32** | | +**UpdatedAt** | **string** | | +**ContentType** | **string** | | + +## Methods + +### NewBrandBackground + +`func NewBrandBackground(urls BrandBackgroundUrls, fileSize int32, updatedAt string, contentType string, ) *BrandBackground` + +NewBrandBackground instantiates a new BrandBackground 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 + +### NewBrandBackgroundWithDefaults + +`func NewBrandBackgroundWithDefaults() *BrandBackground` + +NewBrandBackgroundWithDefaults instantiates a new BrandBackground 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 + +### GetUrls + +`func (o *BrandBackground) GetUrls() BrandBackgroundUrls` + +GetUrls returns the Urls field if non-nil, zero value otherwise. + +### GetUrlsOk + +`func (o *BrandBackground) GetUrlsOk() (*BrandBackgroundUrls, bool)` + +GetUrlsOk returns a tuple with the Urls field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUrls + +`func (o *BrandBackground) SetUrls(v BrandBackgroundUrls)` + +SetUrls sets Urls field to given value. + + +### GetFileSize + +`func (o *BrandBackground) GetFileSize() int32` + +GetFileSize returns the FileSize field if non-nil, zero value otherwise. + +### GetFileSizeOk + +`func (o *BrandBackground) GetFileSizeOk() (*int32, bool)` + +GetFileSizeOk returns a tuple with the FileSize field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFileSize + +`func (o *BrandBackground) SetFileSize(v int32)` + +SetFileSize sets FileSize field to given value. + + +### GetUpdatedAt + +`func (o *BrandBackground) GetUpdatedAt() string` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *BrandBackground) GetUpdatedAtOk() (*string, bool)` + +GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedAt + +`func (o *BrandBackground) SetUpdatedAt(v string)` + +SetUpdatedAt sets UpdatedAt field to given value. + + +### GetContentType + +`func (o *BrandBackground) GetContentType() string` + +GetContentType returns the ContentType field if non-nil, zero value otherwise. + +### GetContentTypeOk + +`func (o *BrandBackground) GetContentTypeOk() (*string, bool)` + +GetContentTypeOk returns a tuple with the ContentType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContentType + +`func (o *BrandBackground) SetContentType(v string)` + +SetContentType sets ContentType 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/BrandBackgroundUrls.md b/docs/BrandBackgroundUrls.md new file mode 100644 index 0000000..f65675a --- /dev/null +++ b/docs/BrandBackgroundUrls.md @@ -0,0 +1,93 @@ +# BrandBackgroundUrls + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Original** | **string** | | +**Login** | **string** | | +**Branding** | **string** | | + +## Methods + +### NewBrandBackgroundUrls + +`func NewBrandBackgroundUrls(original string, login string, branding string, ) *BrandBackgroundUrls` + +NewBrandBackgroundUrls instantiates a new BrandBackgroundUrls 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 + +### NewBrandBackgroundUrlsWithDefaults + +`func NewBrandBackgroundUrlsWithDefaults() *BrandBackgroundUrls` + +NewBrandBackgroundUrlsWithDefaults instantiates a new BrandBackgroundUrls 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 + +### GetOriginal + +`func (o *BrandBackgroundUrls) GetOriginal() string` + +GetOriginal returns the Original field if non-nil, zero value otherwise. + +### GetOriginalOk + +`func (o *BrandBackgroundUrls) GetOriginalOk() (*string, bool)` + +GetOriginalOk returns a tuple with the Original field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOriginal + +`func (o *BrandBackgroundUrls) SetOriginal(v string)` + +SetOriginal sets Original field to given value. + + +### GetLogin + +`func (o *BrandBackgroundUrls) GetLogin() string` + +GetLogin returns the Login field if non-nil, zero value otherwise. + +### GetLoginOk + +`func (o *BrandBackgroundUrls) GetLoginOk() (*string, bool)` + +GetLoginOk returns a tuple with the Login field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLogin + +`func (o *BrandBackgroundUrls) SetLogin(v string)` + +SetLogin sets Login field to given value. + + +### GetBranding + +`func (o *BrandBackgroundUrls) GetBranding() string` + +GetBranding returns the Branding field if non-nil, zero value otherwise. + +### GetBrandingOk + +`func (o *BrandBackgroundUrls) GetBrandingOk() (*string, bool)` + +GetBrandingOk returns a tuple with the Branding field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBranding + +`func (o *BrandBackgroundUrls) SetBranding(v string)` + +SetBranding sets Branding 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/BrandLogo.md b/docs/BrandLogo.md new file mode 100644 index 0000000..4648907 --- /dev/null +++ b/docs/BrandLogo.md @@ -0,0 +1,114 @@ +# BrandLogo + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Urls** | [**BrandLogoUrls**](BrandLogoUrls.md) | | +**FileSize** | **int32** | | +**UpdatedAt** | **string** | | +**ContentType** | **string** | | + +## Methods + +### NewBrandLogo + +`func NewBrandLogo(urls BrandLogoUrls, fileSize int32, updatedAt string, contentType string, ) *BrandLogo` + +NewBrandLogo instantiates a new BrandLogo 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 + +### NewBrandLogoWithDefaults + +`func NewBrandLogoWithDefaults() *BrandLogo` + +NewBrandLogoWithDefaults instantiates a new BrandLogo 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 + +### GetUrls + +`func (o *BrandLogo) GetUrls() BrandLogoUrls` + +GetUrls returns the Urls field if non-nil, zero value otherwise. + +### GetUrlsOk + +`func (o *BrandLogo) GetUrlsOk() (*BrandLogoUrls, bool)` + +GetUrlsOk returns a tuple with the Urls field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUrls + +`func (o *BrandLogo) SetUrls(v BrandLogoUrls)` + +SetUrls sets Urls field to given value. + + +### GetFileSize + +`func (o *BrandLogo) GetFileSize() int32` + +GetFileSize returns the FileSize field if non-nil, zero value otherwise. + +### GetFileSizeOk + +`func (o *BrandLogo) GetFileSizeOk() (*int32, bool)` + +GetFileSizeOk returns a tuple with the FileSize field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFileSize + +`func (o *BrandLogo) SetFileSize(v int32)` + +SetFileSize sets FileSize field to given value. + + +### GetUpdatedAt + +`func (o *BrandLogo) GetUpdatedAt() string` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *BrandLogo) GetUpdatedAtOk() (*string, bool)` + +GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedAt + +`func (o *BrandLogo) SetUpdatedAt(v string)` + +SetUpdatedAt sets UpdatedAt field to given value. + + +### GetContentType + +`func (o *BrandLogo) GetContentType() string` + +GetContentType returns the ContentType field if non-nil, zero value otherwise. + +### GetContentTypeOk + +`func (o *BrandLogo) GetContentTypeOk() (*string, bool)` + +GetContentTypeOk returns a tuple with the ContentType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContentType + +`func (o *BrandLogo) SetContentType(v string)` + +SetContentType sets ContentType 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/BrandLogoUrls.md b/docs/BrandLogoUrls.md new file mode 100644 index 0000000..f17584a --- /dev/null +++ b/docs/BrandLogoUrls.md @@ -0,0 +1,93 @@ +# BrandLogoUrls + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Original** | **string** | | +**Login** | **string** | | +**Navigation** | **string** | | + +## Methods + +### NewBrandLogoUrls + +`func NewBrandLogoUrls(original string, login string, navigation string, ) *BrandLogoUrls` + +NewBrandLogoUrls instantiates a new BrandLogoUrls 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 + +### NewBrandLogoUrlsWithDefaults + +`func NewBrandLogoUrlsWithDefaults() *BrandLogoUrls` + +NewBrandLogoUrlsWithDefaults instantiates a new BrandLogoUrls 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 + +### GetOriginal + +`func (o *BrandLogoUrls) GetOriginal() string` + +GetOriginal returns the Original field if non-nil, zero value otherwise. + +### GetOriginalOk + +`func (o *BrandLogoUrls) GetOriginalOk() (*string, bool)` + +GetOriginalOk returns a tuple with the Original field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOriginal + +`func (o *BrandLogoUrls) SetOriginal(v string)` + +SetOriginal sets Original field to given value. + + +### GetLogin + +`func (o *BrandLogoUrls) GetLogin() string` + +GetLogin returns the Login field if non-nil, zero value otherwise. + +### GetLoginOk + +`func (o *BrandLogoUrls) GetLoginOk() (*string, bool)` + +GetLoginOk returns a tuple with the Login field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLogin + +`func (o *BrandLogoUrls) SetLogin(v string)` + +SetLogin sets Login field to given value. + + +### GetNavigation + +`func (o *BrandLogoUrls) GetNavigation() string` + +GetNavigation returns the Navigation field if non-nil, zero value otherwise. + +### GetNavigationOk + +`func (o *BrandLogoUrls) GetNavigationOk() (*string, bool)` + +GetNavigationOk returns a tuple with the Navigation field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNavigation + +`func (o *BrandLogoUrls) SetNavigation(v string)` + +SetNavigation sets Navigation 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/BrandReq.md b/docs/BrandReq.md new file mode 100644 index 0000000..aa32990 --- /dev/null +++ b/docs/BrandReq.md @@ -0,0 +1,108 @@ +# BrandReq + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **int32** | Brand’s unique ID in OneLogin. | [optional] +**Enabled** | Pointer to **bool** | Indicates if the brand is enabled or not. | [optional] +**Name** | Pointer to **string** | Brand name for humans. This isn’t related to subdomains. | [optional] + +## Methods + +### NewBrandReq + +`func NewBrandReq() *BrandReq` + +NewBrandReq instantiates a new BrandReq 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 + +### NewBrandReqWithDefaults + +`func NewBrandReqWithDefaults() *BrandReq` + +NewBrandReqWithDefaults instantiates a new BrandReq 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 + +### GetId + +`func (o *BrandReq) GetId() int32` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *BrandReq) GetIdOk() (*int32, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *BrandReq) SetId(v int32)` + +SetId sets Id field to given value. + +### HasId + +`func (o *BrandReq) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetEnabled + +`func (o *BrandReq) GetEnabled() bool` + +GetEnabled returns the Enabled field if non-nil, zero value otherwise. + +### GetEnabledOk + +`func (o *BrandReq) 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 *BrandReq) SetEnabled(v bool)` + +SetEnabled sets Enabled field to given value. + +### HasEnabled + +`func (o *BrandReq) HasEnabled() bool` + +HasEnabled returns a boolean if a field has been set. + +### GetName + +`func (o *BrandReq) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *BrandReq) 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 *BrandReq) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *BrandReq) HasName() bool` + +HasName 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/BrandingServiceApi.md b/docs/BrandingServiceApi.md new file mode 100644 index 0000000..5909e89 --- /dev/null +++ b/docs/BrandingServiceApi.md @@ -0,0 +1,421 @@ +# \BrandingServiceApi + +All URIs are relative to *https://your-api-subdomain.onelogin.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateBrand**](BrandingServiceApi.md#CreateBrand) | **Post** /api/2/branding/brands | Create Brand +[**DeleteBrand**](BrandingServiceApi.md#DeleteBrand) | **Delete** /api/2/branding/brands/{brand_id} | Delete Brand +[**GetBrand**](BrandingServiceApi.md#GetBrand) | **Get** /api/2/branding/brands/{brand_id} | Get Brand +[**GetBrandApps**](BrandingServiceApi.md#GetBrandApps) | **Get** /api/2/branding/brands/{brand_id}/apps | Get Brand Apps +[**ListBrands**](BrandingServiceApi.md#ListBrands) | **Get** /api/2/branding/brands | List Account Brands +[**UpdateBrand**](BrandingServiceApi.md#UpdateBrand) | **Put** /api/2/branding/brands/{brand_id} | Update Brand + + + +## CreateBrand + +> Brand CreateBrand(ctx).Brand(brand).Execute() + +Create Brand + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + brand := *openapiclient.NewBrand(int32(123), true, false, "#1298b4", "#b60012", "#beefed", int32(40), "You must register with the OneLogin Protect app in order to login", true, "ACME Username or Email", "To login, enter your ACME Username or Email. Reach out to help.desk@acme.org if you have trouble logging in.", "ACME Login Instructions", true, *openapiclient.NewBrandBackground(*openapiclient.NewBrandBackgroundUrls("Original_example", "Login_example", "Branding_example"), int32(123), "UpdatedAt_example", "ContentType_example"), *openapiclient.NewBrandLogo(*openapiclient.NewBrandLogoUrls("Original_example", "Login_example", "Navigation_example"), int32(123), "UpdatedAt_example", "ContentType_example")) // Brand | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.BrandingServiceApi.CreateBrand(context.Background()).Brand(brand).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `BrandingServiceApi.CreateBrand``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateBrand`: Brand + fmt.Fprintf(os.Stdout, "Response from `BrandingServiceApi.CreateBrand`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateBrandRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **brand** | [**Brand**](Brand.md) | | + +### Return type + +[**Brand**](Brand.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteBrand + +> DeleteBrand(ctx, brandId).Execute() + +Delete Brand + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + brandId := int32(9) // int32 | Unique identifier for the branding object. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.BrandingServiceApi.DeleteBrand(context.Background(), brandId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `BrandingServiceApi.DeleteBrand``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**brandId** | **int32** | Unique identifier for the branding object. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteBrandRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + + (empty response body) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetBrand + +> Brand GetBrand(ctx, brandId).Execute() + +Get Brand + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + brandId := int32(9) // int32 | Unique identifier for the branding object. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.BrandingServiceApi.GetBrand(context.Background(), brandId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `BrandingServiceApi.GetBrand``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetBrand`: Brand + fmt.Fprintf(os.Stdout, "Response from `BrandingServiceApi.GetBrand`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**brandId** | **int32** | Unique identifier for the branding object. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetBrandRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**Brand**](Brand.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetBrandApps + +> []BrandApp GetBrandApps(ctx, brandId).Execute() + +Get Brand Apps + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + brandId := int32(9) // int32 | Unique identifier for the branding object. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.BrandingServiceApi.GetBrandApps(context.Background(), brandId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `BrandingServiceApi.GetBrandApps``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetBrandApps`: []BrandApp + fmt.Fprintf(os.Stdout, "Response from `BrandingServiceApi.GetBrandApps`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**brandId** | **int32** | Unique identifier for the branding object. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetBrandAppsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**[]BrandApp**](BrandApp.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListBrands + +> []BrandReq ListBrands(ctx).Execute() + +List Account Brands + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.BrandingServiceApi.ListBrands(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `BrandingServiceApi.ListBrands``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListBrands`: []BrandReq + fmt.Fprintf(os.Stdout, "Response from `BrandingServiceApi.ListBrands`: %v\n", resp) +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiListBrandsRequest struct via the builder pattern + + +### Return type + +[**[]BrandReq**](BrandReq.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateBrand + +> Brand UpdateBrand(ctx, brandId).RequestBrand(requestBrand).Execute() + +Update Brand + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + brandId := int32(9) // int32 | Unique identifier for the branding object. + requestBrand := *openapiclient.NewRequestBrand("Acme Branding") // RequestBrand | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.BrandingServiceApi.UpdateBrand(context.Background(), brandId).RequestBrand(requestBrand).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `BrandingServiceApi.UpdateBrand``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateBrand`: Brand + fmt.Fprintf(os.Stdout, "Response from `BrandingServiceApi.UpdateBrand`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**brandId** | **int32** | Unique identifier for the branding object. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateBrandRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **requestBrand** | [**RequestBrand**](RequestBrand.md) | | + +### Return type + +[**Brand**](Brand.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/docs/BrandingServiceSMTPApi.md b/docs/BrandingServiceSMTPApi.md new file mode 100644 index 0000000..52cb358 --- /dev/null +++ b/docs/BrandingServiceSMTPApi.md @@ -0,0 +1,199 @@ +# \BrandingServiceSMTPApi + +All URIs are relative to *https://your-api-subdomain.onelogin.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteEmailSettings**](BrandingServiceSMTPApi.md#DeleteEmailSettings) | **Delete** /api/2/branding/email_settings | Delete Custom Email Settings +[**GetEmailSettings**](BrandingServiceSMTPApi.md#GetEmailSettings) | **Get** /api/2/branding/email_settings | Get Email Settings +[**UpdateEmailSettings**](BrandingServiceSMTPApi.md#UpdateEmailSettings) | **Put** /api/2/branding/email_settings | Update Email Settings + + + +## DeleteEmailSettings + +> AltErr DeleteEmailSettings(ctx).Execute() + +Delete Custom Email Settings + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.BrandingServiceSMTPApi.DeleteEmailSettings(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `BrandingServiceSMTPApi.DeleteEmailSettings``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DeleteEmailSettings`: AltErr + fmt.Fprintf(os.Stdout, "Response from `BrandingServiceSMTPApi.DeleteEmailSettings`: %v\n", resp) +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteEmailSettingsRequest struct via the builder pattern + + +### Return type + +[**AltErr**](AltErr.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetEmailSettings + +> GetEmailSettings200Response GetEmailSettings(ctx).Execute() + +Get Email Settings + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.BrandingServiceSMTPApi.GetEmailSettings(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `BrandingServiceSMTPApi.GetEmailSettings``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetEmailSettings`: GetEmailSettings200Response + fmt.Fprintf(os.Stdout, "Response from `BrandingServiceSMTPApi.GetEmailSettings`: %v\n", resp) +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetEmailSettingsRequest struct via the builder pattern + + +### Return type + +[**GetEmailSettings200Response**](GetEmailSettings200Response.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateEmailSettings + +> AltErr UpdateEmailSettings(ctx).EmailConfig(emailConfig).Execute() + +Update Email Settings + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + emailConfig := *openapiclient.NewEmailConfig("smtp.sendgrid.net", "email@example.com", "example.com") // EmailConfig | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.BrandingServiceSMTPApi.UpdateEmailSettings(context.Background()).EmailConfig(emailConfig).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `BrandingServiceSMTPApi.UpdateEmailSettings``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateEmailSettings`: AltErr + fmt.Fprintf(os.Stdout, "Response from `BrandingServiceSMTPApi.UpdateEmailSettings`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateEmailSettingsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **emailConfig** | [**EmailConfig**](EmailConfig.md) | | + +### Return type + +[**AltErr**](AltErr.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/docs/BrandingServiceTemplatesApi.md b/docs/BrandingServiceTemplatesApi.md new file mode 100644 index 0000000..f74485e --- /dev/null +++ b/docs/BrandingServiceTemplatesApi.md @@ -0,0 +1,601 @@ +# \BrandingServiceTemplatesApi + +All URIs are relative to *https://your-api-subdomain.onelogin.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateMessageTemplate**](BrandingServiceTemplatesApi.md#CreateMessageTemplate) | **Post** /api/2/branding/brands/{brand_id}/templates | Create Message Template +[**DeleteMessageTemplate**](BrandingServiceTemplatesApi.md#DeleteMessageTemplate) | **Delete** /api/2/branding/brands/{brand_id}/templates/{template_id} | Delete Message Template +[**GetMasterByType**](BrandingServiceTemplatesApi.md#GetMasterByType) | **Get** /api/2/branding/brands/master/templates/{template_type} | Get Master Template by Type +[**GetMessageTemplateById**](BrandingServiceTemplatesApi.md#GetMessageTemplateById) | **Get** /api/2/branding/brands/{brand_id}/templates/{template_id} | Get Message Template +[**GetTemplateByLocale**](BrandingServiceTemplatesApi.md#GetTemplateByLocale) | **Get** /api/2/branding/brands/{brand_id}/templates/{template_type}/{locale} | Get Template by Type & Locale +[**ListMessageTemplates**](BrandingServiceTemplatesApi.md#ListMessageTemplates) | **Get** /api/2/branding/brands/{brand_id}/templates | List Message Templates +[**UpdateMessageTemplateById**](BrandingServiceTemplatesApi.md#UpdateMessageTemplateById) | **Put** /api/2/branding/brands/{brand_id}/templates/{template_id} | Update Message Template +[**UpdateTemplateByLocale**](BrandingServiceTemplatesApi.md#UpdateTemplateByLocale) | **Put** /api/2/branding/brands/{brand_id}/templates/{template_type}/{locale} | Update Template by Type & Locale + + + +## CreateMessageTemplate + +> MessageTemplate CreateMessageTemplate(ctx, brandId).Locale(locale).MessageTemplate(messageTemplate).Execute() + +Create Message Template + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + brandId := int32(9) // int32 | Unique identifier for the branding object. + locale := "en" // string | The 2 character language locale for the template. e.g. en = English, es = Spanish (optional) + messageTemplate := *openapiclient.NewMessageTemplate("Type_example", "en", openapiclient.message_template_template{MessageTemplateTemplateOneOf: openapiclient.NewMessageTemplateTemplateOneOf("Email MFA App Verification Code", "

Here is the code: {{otp_code}}

", "Here is the code: {{otp_code}}")}) // MessageTemplate | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.BrandingServiceTemplatesApi.CreateMessageTemplate(context.Background(), brandId).Locale(locale).MessageTemplate(messageTemplate).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `BrandingServiceTemplatesApi.CreateMessageTemplate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateMessageTemplate`: MessageTemplate + fmt.Fprintf(os.Stdout, "Response from `BrandingServiceTemplatesApi.CreateMessageTemplate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**brandId** | **int32** | Unique identifier for the branding object. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateMessageTemplateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **locale** | **string** | The 2 character language locale for the template. e.g. en = English, es = Spanish | + **messageTemplate** | [**MessageTemplate**](MessageTemplate.md) | | + +### Return type + +[**MessageTemplate**](MessageTemplate.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteMessageTemplate + +> DeleteMessageTemplate(ctx, brandId, templateId).Execute() + +Delete Message Template + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + brandId := int32(9) // int32 | Unique identifier for the branding object. + templateId := int32(25) // int32 | Unique identifier for the template to return. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.BrandingServiceTemplatesApi.DeleteMessageTemplate(context.Background(), brandId, templateId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `BrandingServiceTemplatesApi.DeleteMessageTemplate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**brandId** | **int32** | Unique identifier for the branding object. | +**templateId** | **int32** | Unique identifier for the template to return. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteMessageTemplateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + + (empty response body) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetMasterByType + +> MessageTemplate GetMasterByType(ctx, templateType).Execute() + +Get Master Template by Type + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + templateType := "email_template" // string | The message template type to return. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.BrandingServiceTemplatesApi.GetMasterByType(context.Background(), templateType).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `BrandingServiceTemplatesApi.GetMasterByType``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetMasterByType`: MessageTemplate + fmt.Fprintf(os.Stdout, "Response from `BrandingServiceTemplatesApi.GetMasterByType`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**templateType** | **string** | The message template type to return. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetMasterByTypeRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**MessageTemplate**](MessageTemplate.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetMessageTemplateById + +> MessageTemplate GetMessageTemplateById(ctx, brandId, templateId).Execute() + +Get Message Template + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + brandId := int32(9) // int32 | Unique identifier for the branding object. + templateId := int32(25) // int32 | Unique identifier for the template to return. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.BrandingServiceTemplatesApi.GetMessageTemplateById(context.Background(), brandId, templateId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `BrandingServiceTemplatesApi.GetMessageTemplateById``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetMessageTemplateById`: MessageTemplate + fmt.Fprintf(os.Stdout, "Response from `BrandingServiceTemplatesApi.GetMessageTemplateById`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**brandId** | **int32** | Unique identifier for the branding object. | +**templateId** | **int32** | Unique identifier for the template to return. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetMessageTemplateByIdRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**MessageTemplate**](MessageTemplate.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetTemplateByLocale + +> MessageTemplate GetTemplateByLocale(ctx, brandId, templateType, locale).Execute() + +Get Template by Type & Locale + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + brandId := int32(9) // int32 | Unique identifier for the branding object. + templateType := "email_template" // string | The message template type to return. + locale := "en" // string | The 2 character language locale for the template. e.g. en = English, es = Spanish + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.BrandingServiceTemplatesApi.GetTemplateByLocale(context.Background(), brandId, templateType, locale).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `BrandingServiceTemplatesApi.GetTemplateByLocale``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetTemplateByLocale`: MessageTemplate + fmt.Fprintf(os.Stdout, "Response from `BrandingServiceTemplatesApi.GetTemplateByLocale`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**brandId** | **int32** | Unique identifier for the branding object. | +**templateType** | **string** | The message template type to return. | +**locale** | **string** | The 2 character language locale for the template. e.g. en = English, es = Spanish | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetTemplateByLocaleRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + +### Return type + +[**MessageTemplate**](MessageTemplate.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListMessageTemplates + +> []ListMessageTemplates200ResponseInner ListMessageTemplates(ctx, brandId).Locale(locale).Execute() + +List Message Templates + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + brandId := int32(9) // int32 | Unique identifier for the branding object. + locale := "en" // string | The 2 character language locale for the template. e.g. en = English, es = Spanish (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.BrandingServiceTemplatesApi.ListMessageTemplates(context.Background(), brandId).Locale(locale).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `BrandingServiceTemplatesApi.ListMessageTemplates``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListMessageTemplates`: []ListMessageTemplates200ResponseInner + fmt.Fprintf(os.Stdout, "Response from `BrandingServiceTemplatesApi.ListMessageTemplates`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**brandId** | **int32** | Unique identifier for the branding object. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListMessageTemplatesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **locale** | **string** | The 2 character language locale for the template. e.g. en = English, es = Spanish | + +### Return type + +[**[]ListMessageTemplates200ResponseInner**](ListMessageTemplates200ResponseInner.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateMessageTemplateById + +> MessageTemplate UpdateMessageTemplateById(ctx, brandId, templateId).Execute() + +Update Message Template + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + brandId := int32(9) // int32 | Unique identifier for the branding object. + templateId := int32(25) // int32 | Unique identifier for the template to return. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.BrandingServiceTemplatesApi.UpdateMessageTemplateById(context.Background(), brandId, templateId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `BrandingServiceTemplatesApi.UpdateMessageTemplateById``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateMessageTemplateById`: MessageTemplate + fmt.Fprintf(os.Stdout, "Response from `BrandingServiceTemplatesApi.UpdateMessageTemplateById`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**brandId** | **int32** | Unique identifier for the branding object. | +**templateId** | **int32** | Unique identifier for the template to return. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateMessageTemplateByIdRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**MessageTemplate**](MessageTemplate.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateTemplateByLocale + +> MessageTemplate UpdateTemplateByLocale(ctx, brandId, templateType, locale).Execute() + +Update Template by Type & Locale + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + brandId := int32(9) // int32 | Unique identifier for the branding object. + templateType := "email_template" // string | The message template type to return. + locale := "en" // string | The 2 character language locale for the template. e.g. en = English, es = Spanish + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.BrandingServiceTemplatesApi.UpdateTemplateByLocale(context.Background(), brandId, templateType, locale).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `BrandingServiceTemplatesApi.UpdateTemplateByLocale``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateTemplateByLocale`: MessageTemplate + fmt.Fprintf(os.Stdout, "Response from `BrandingServiceTemplatesApi.UpdateTemplateByLocale`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**brandId** | **int32** | Unique identifier for the branding object. | +**templateType** | **string** | The message template type to return. | +**locale** | **string** | The 2 character language locale for the template. e.g. en = English, es = Spanish | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateTemplateByLocaleRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + +### Return type + +[**MessageTemplate**](MessageTemplate.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/docs/GetClientApps200ResponseInner.md b/docs/ClientAppFull.md similarity index 54% rename from docs/GetClientApps200ResponseInner.md rename to docs/ClientAppFull.md index 68e4457..7f1b3e6 100644 --- a/docs/GetClientApps200ResponseInner.md +++ b/docs/ClientAppFull.md @@ -1,130 +1,130 @@ -# GetClientApps200ResponseInner +# ClientAppFull ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Scopes** | Pointer to [**[]GetClientApps200ResponseInnerScopesInner**](GetClientApps200ResponseInnerScopesInner.md) | | [optional] -**AppId** | Pointer to **int32** | | [optional] -**Name** | Pointer to **string** | | [optional] +**Scopes** | Pointer to [**[]Scope**](Scope.md) | List of All Scopes assigned to a client app | [optional] +**AppId** | Pointer to **int32** | Unique Client App ID | [optional] +**Name** | Pointer to **string** | Name of client app | [optional] **ApiAuthId** | Pointer to **int32** | | [optional] ## Methods -### NewGetClientApps200ResponseInner +### NewClientAppFull -`func NewGetClientApps200ResponseInner() *GetClientApps200ResponseInner` +`func NewClientAppFull() *ClientAppFull` -NewGetClientApps200ResponseInner instantiates a new GetClientApps200ResponseInner object +NewClientAppFull instantiates a new ClientAppFull 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 -### NewGetClientApps200ResponseInnerWithDefaults +### NewClientAppFullWithDefaults -`func NewGetClientApps200ResponseInnerWithDefaults() *GetClientApps200ResponseInner` +`func NewClientAppFullWithDefaults() *ClientAppFull` -NewGetClientApps200ResponseInnerWithDefaults instantiates a new GetClientApps200ResponseInner object +NewClientAppFullWithDefaults instantiates a new ClientAppFull 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 ### GetScopes -`func (o *GetClientApps200ResponseInner) GetScopes() []GetClientApps200ResponseInnerScopesInner` +`func (o *ClientAppFull) GetScopes() []Scope` GetScopes returns the Scopes field if non-nil, zero value otherwise. ### GetScopesOk -`func (o *GetClientApps200ResponseInner) GetScopesOk() (*[]GetClientApps200ResponseInnerScopesInner, bool)` +`func (o *ClientAppFull) GetScopesOk() (*[]Scope, bool)` GetScopesOk returns a tuple with the Scopes field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetScopes -`func (o *GetClientApps200ResponseInner) SetScopes(v []GetClientApps200ResponseInnerScopesInner)` +`func (o *ClientAppFull) SetScopes(v []Scope)` SetScopes sets Scopes field to given value. ### HasScopes -`func (o *GetClientApps200ResponseInner) HasScopes() bool` +`func (o *ClientAppFull) HasScopes() bool` HasScopes returns a boolean if a field has been set. ### GetAppId -`func (o *GetClientApps200ResponseInner) GetAppId() int32` +`func (o *ClientAppFull) GetAppId() int32` GetAppId returns the AppId field if non-nil, zero value otherwise. ### GetAppIdOk -`func (o *GetClientApps200ResponseInner) GetAppIdOk() (*int32, bool)` +`func (o *ClientAppFull) GetAppIdOk() (*int32, bool)` GetAppIdOk returns a tuple with the AppId field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetAppId -`func (o *GetClientApps200ResponseInner) SetAppId(v int32)` +`func (o *ClientAppFull) SetAppId(v int32)` SetAppId sets AppId field to given value. ### HasAppId -`func (o *GetClientApps200ResponseInner) HasAppId() bool` +`func (o *ClientAppFull) HasAppId() bool` HasAppId returns a boolean if a field has been set. ### GetName -`func (o *GetClientApps200ResponseInner) GetName() string` +`func (o *ClientAppFull) GetName() string` GetName returns the Name field if non-nil, zero value otherwise. ### GetNameOk -`func (o *GetClientApps200ResponseInner) GetNameOk() (*string, bool)` +`func (o *ClientAppFull) 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 *GetClientApps200ResponseInner) SetName(v string)` +`func (o *ClientAppFull) SetName(v string)` SetName sets Name field to given value. ### HasName -`func (o *GetClientApps200ResponseInner) HasName() bool` +`func (o *ClientAppFull) HasName() bool` HasName returns a boolean if a field has been set. ### GetApiAuthId -`func (o *GetClientApps200ResponseInner) GetApiAuthId() int32` +`func (o *ClientAppFull) GetApiAuthId() int32` GetApiAuthId returns the ApiAuthId field if non-nil, zero value otherwise. ### GetApiAuthIdOk -`func (o *GetClientApps200ResponseInner) GetApiAuthIdOk() (*int32, bool)` +`func (o *ClientAppFull) GetApiAuthIdOk() (*int32, bool)` GetApiAuthIdOk returns a tuple with the ApiAuthId field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetApiAuthId -`func (o *GetClientApps200ResponseInner) SetApiAuthId(v int32)` +`func (o *ClientAppFull) SetApiAuthId(v int32)` SetApiAuthId sets ApiAuthId field to given value. ### HasApiAuthId -`func (o *GetClientApps200ResponseInner) HasApiAuthId() bool` +`func (o *ClientAppFull) HasApiAuthId() bool` HasApiAuthId returns a boolean if a field has been set. diff --git a/docs/ClockCounter.md b/docs/ClockCounter.md new file mode 100644 index 0000000..fef39a5 --- /dev/null +++ b/docs/ClockCounter.md @@ -0,0 +1,82 @@ +# ClockCounter + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | Pointer to **int32** | | [optional] +**Unit** | Pointer to **int32** | | [optional] + +## Methods + +### NewClockCounter + +`func NewClockCounter() *ClockCounter` + +NewClockCounter instantiates a new ClockCounter 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 + +### NewClockCounterWithDefaults + +`func NewClockCounterWithDefaults() *ClockCounter` + +NewClockCounterWithDefaults instantiates a new ClockCounter 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 + +### GetValue + +`func (o *ClockCounter) GetValue() int32` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *ClockCounter) GetValueOk() (*int32, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *ClockCounter) SetValue(v int32)` + +SetValue sets Value field to given value. + +### HasValue + +`func (o *ClockCounter) HasValue() bool` + +HasValue returns a boolean if a field has been set. + +### GetUnit + +`func (o *ClockCounter) GetUnit() int32` + +GetUnit returns the Unit field if non-nil, zero value otherwise. + +### GetUnitOk + +`func (o *ClockCounter) GetUnitOk() (*int32, bool)` + +GetUnitOk returns a tuple with the Unit field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUnit + +`func (o *ClockCounter) SetUnit(v int32)` + +SetUnit sets Unit field to given value. + +### HasUnit + +`func (o *ClockCounter) HasUnit() bool` + +HasUnit 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/Condition.md b/docs/Condition.md index e918ca3..429dcab 100644 --- a/docs/Condition.md +++ b/docs/Condition.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Source** | Pointer to **string** | The source field to check. | [optional] +**Source** | Pointer to **string** | source field to check. | [optional] **Operator** | Pointer to **string** | A valid operator for the selected condition source | [optional] -**Value** | Pointer to **string** | A plain text string or valid value for the selected condition source. | [optional] +**Value** | Pointer to **string** | A plain text string or valid value for the selected condition source | [optional] ## Methods diff --git a/docs/ConfigurationOidc.md b/docs/ConfigurationOidc.md new file mode 100644 index 0000000..5a21b04 --- /dev/null +++ b/docs/ConfigurationOidc.md @@ -0,0 +1,156 @@ +# ConfigurationOidc + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**LoginUrl** | **string** | The OpenId Connect Client Id. Note that client_secret is only returned after Creating an App. | +**RedirectUri** | **string** | Comma or newline separated list of valid redirect uris for the OpenId Connect Authorization Code flow. | +**AccessTokenExpirationMinutes** | **int32** | Number of minutes the refresh token will be valid for. | +**RefreshTokenExpirationMinutes** | **int32** | Number of minutes the refresh token will be valid for. | +**TokenEndpointAuthMethod** | **int32** | - 0: Basic - 1: POST - 2: None / PKCE | +**OidcApplicationType** | **int32** | - 0 : Web - 1 : Native / Mobile | + +## Methods + +### NewConfigurationOidc + +`func NewConfigurationOidc(loginUrl string, redirectUri string, accessTokenExpirationMinutes int32, refreshTokenExpirationMinutes int32, tokenEndpointAuthMethod int32, oidcApplicationType int32, ) *ConfigurationOidc` + +NewConfigurationOidc instantiates a new ConfigurationOidc 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 + +### NewConfigurationOidcWithDefaults + +`func NewConfigurationOidcWithDefaults() *ConfigurationOidc` + +NewConfigurationOidcWithDefaults instantiates a new ConfigurationOidc 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 + +### GetLoginUrl + +`func (o *ConfigurationOidc) GetLoginUrl() string` + +GetLoginUrl returns the LoginUrl field if non-nil, zero value otherwise. + +### GetLoginUrlOk + +`func (o *ConfigurationOidc) GetLoginUrlOk() (*string, bool)` + +GetLoginUrlOk returns a tuple with the LoginUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLoginUrl + +`func (o *ConfigurationOidc) SetLoginUrl(v string)` + +SetLoginUrl sets LoginUrl field to given value. + + +### GetRedirectUri + +`func (o *ConfigurationOidc) GetRedirectUri() string` + +GetRedirectUri returns the RedirectUri field if non-nil, zero value otherwise. + +### GetRedirectUriOk + +`func (o *ConfigurationOidc) GetRedirectUriOk() (*string, bool)` + +GetRedirectUriOk returns a tuple with the RedirectUri field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRedirectUri + +`func (o *ConfigurationOidc) SetRedirectUri(v string)` + +SetRedirectUri sets RedirectUri field to given value. + + +### GetAccessTokenExpirationMinutes + +`func (o *ConfigurationOidc) GetAccessTokenExpirationMinutes() int32` + +GetAccessTokenExpirationMinutes returns the AccessTokenExpirationMinutes field if non-nil, zero value otherwise. + +### GetAccessTokenExpirationMinutesOk + +`func (o *ConfigurationOidc) GetAccessTokenExpirationMinutesOk() (*int32, bool)` + +GetAccessTokenExpirationMinutesOk returns a tuple with the AccessTokenExpirationMinutes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccessTokenExpirationMinutes + +`func (o *ConfigurationOidc) SetAccessTokenExpirationMinutes(v int32)` + +SetAccessTokenExpirationMinutes sets AccessTokenExpirationMinutes field to given value. + + +### GetRefreshTokenExpirationMinutes + +`func (o *ConfigurationOidc) GetRefreshTokenExpirationMinutes() int32` + +GetRefreshTokenExpirationMinutes returns the RefreshTokenExpirationMinutes field if non-nil, zero value otherwise. + +### GetRefreshTokenExpirationMinutesOk + +`func (o *ConfigurationOidc) GetRefreshTokenExpirationMinutesOk() (*int32, bool)` + +GetRefreshTokenExpirationMinutesOk returns a tuple with the RefreshTokenExpirationMinutes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRefreshTokenExpirationMinutes + +`func (o *ConfigurationOidc) SetRefreshTokenExpirationMinutes(v int32)` + +SetRefreshTokenExpirationMinutes sets RefreshTokenExpirationMinutes field to given value. + + +### GetTokenEndpointAuthMethod + +`func (o *ConfigurationOidc) GetTokenEndpointAuthMethod() int32` + +GetTokenEndpointAuthMethod returns the TokenEndpointAuthMethod field if non-nil, zero value otherwise. + +### GetTokenEndpointAuthMethodOk + +`func (o *ConfigurationOidc) GetTokenEndpointAuthMethodOk() (*int32, bool)` + +GetTokenEndpointAuthMethodOk returns a tuple with the TokenEndpointAuthMethod field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTokenEndpointAuthMethod + +`func (o *ConfigurationOidc) SetTokenEndpointAuthMethod(v int32)` + +SetTokenEndpointAuthMethod sets TokenEndpointAuthMethod field to given value. + + +### GetOidcApplicationType + +`func (o *ConfigurationOidc) GetOidcApplicationType() int32` + +GetOidcApplicationType returns the OidcApplicationType field if non-nil, zero value otherwise. + +### GetOidcApplicationTypeOk + +`func (o *ConfigurationOidc) GetOidcApplicationTypeOk() (*int32, bool)` + +GetOidcApplicationTypeOk returns a tuple with the OidcApplicationType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOidcApplicationType + +`func (o *ConfigurationOidc) SetOidcApplicationType(v int32)` + +SetOidcApplicationType sets OidcApplicationType 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/ConfigurationSaml.md b/docs/ConfigurationSaml.md new file mode 100644 index 0000000..271e8bd --- /dev/null +++ b/docs/ConfigurationSaml.md @@ -0,0 +1,72 @@ +# ConfigurationSaml + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SignatureAlgorithm** | **string** | One of the following: - SHA-1 - SHA-256 - SHA-348 - SHA-512 | +**CertificateId** | **int32** | When creating apps the default certificate will be used unless the `certificate_id` attribute is applied in the `configuration` object. | + +## Methods + +### NewConfigurationSaml + +`func NewConfigurationSaml(signatureAlgorithm string, certificateId int32, ) *ConfigurationSaml` + +NewConfigurationSaml instantiates a new ConfigurationSaml 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 + +### NewConfigurationSamlWithDefaults + +`func NewConfigurationSamlWithDefaults() *ConfigurationSaml` + +NewConfigurationSamlWithDefaults instantiates a new ConfigurationSaml 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 + +### GetSignatureAlgorithm + +`func (o *ConfigurationSaml) GetSignatureAlgorithm() string` + +GetSignatureAlgorithm returns the SignatureAlgorithm field if non-nil, zero value otherwise. + +### GetSignatureAlgorithmOk + +`func (o *ConfigurationSaml) GetSignatureAlgorithmOk() (*string, bool)` + +GetSignatureAlgorithmOk returns a tuple with the SignatureAlgorithm field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSignatureAlgorithm + +`func (o *ConfigurationSaml) SetSignatureAlgorithm(v string)` + +SetSignatureAlgorithm sets SignatureAlgorithm field to given value. + + +### GetCertificateId + +`func (o *ConfigurationSaml) GetCertificateId() int32` + +GetCertificateId returns the CertificateId field if non-nil, zero value otherwise. + +### GetCertificateIdOk + +`func (o *ConfigurationSaml) GetCertificateIdOk() (*int32, bool)` + +GetCertificateIdOk returns a tuple with the CertificateId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCertificateId + +`func (o *ConfigurationSaml) SetCertificateId(v int32)` + +SetCertificateId sets CertificateId 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/Connector.md b/docs/Connector.md index eff1d8f..62e4fc7 100644 --- a/docs/Connector.md +++ b/docs/Connector.md @@ -4,11 +4,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | Pointer to **int32** | The connectors unique ID in OneLogin. | [optional] -**Name** | Pointer to **string** | The name of the connector. | [optional] +**Id** | Pointer to **int32** | Connectors unique ID in OneLogin. | [optional] +**Name** | Pointer to **string** | Name of Connector | [optional] +**IconUrl** | Pointer to **string** | A link to the icon's url. | [optional] **AuthMethod** | Pointer to [**AuthMethod**](AuthMethod.md) | | [optional] **AllowsNewParameters** | Pointer to **bool** | Indicates if apps created using this connector will be allowed to create custom parameters. | [optional] -**IconUrl** | Pointer to **string** | A link to the apps icon url. | [optional] ## Methods @@ -79,6 +79,31 @@ SetName sets Name field to given value. HasName returns a boolean if a field has been set. +### GetIconUrl + +`func (o *Connector) GetIconUrl() string` + +GetIconUrl returns the IconUrl field if non-nil, zero value otherwise. + +### GetIconUrlOk + +`func (o *Connector) GetIconUrlOk() (*string, bool)` + +GetIconUrlOk returns a tuple with the IconUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIconUrl + +`func (o *Connector) SetIconUrl(v string)` + +SetIconUrl sets IconUrl field to given value. + +### HasIconUrl + +`func (o *Connector) HasIconUrl() bool` + +HasIconUrl returns a boolean if a field has been set. + ### GetAuthMethod `func (o *Connector) GetAuthMethod() AuthMethod` @@ -129,31 +154,6 @@ SetAllowsNewParameters sets AllowsNewParameters field to given value. HasAllowsNewParameters returns a boolean if a field has been set. -### GetIconUrl - -`func (o *Connector) GetIconUrl() string` - -GetIconUrl returns the IconUrl field if non-nil, zero value otherwise. - -### GetIconUrlOk - -`func (o *Connector) GetIconUrlOk() (*string, bool)` - -GetIconUrlOk returns a tuple with the IconUrl field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIconUrl - -`func (o *Connector) SetIconUrl(v string)` - -SetIconUrl sets IconUrl field to given value. - -### HasIconUrl - -`func (o *Connector) HasIconUrl() bool` - -HasIconUrl 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/CreateApp200Response.md b/docs/CreateApp200Response.md new file mode 100644 index 0000000..8b9ef77 --- /dev/null +++ b/docs/CreateApp200Response.md @@ -0,0 +1,489 @@ +# CreateApp200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **int32** | Apps unique ID in OneLogin. | [optional] [readonly] +**Name** | **string** | The name of the app. | +**Visible** | **bool** | Indicates if the app is visible in the OneLogin portal. | +**Description** | **string** | Freeform description of the app. | +**Notes** | Pointer to **string** | Freeform notes about the app. | [optional] +**IconUrl** | Pointer to **string** | A link to the apps icon url | [optional] +**AuthMethod** | Pointer to [**AuthMethod**](AuthMethod.md) | | [optional] +**PolicyId** | **int32** | The security policy assigned to the app. | +**AllowAssumedSignin** | Pointer to **bool** | Indicates whether or not administrators can access the app as a user that they have assumed control over. | [optional] +**TabId** | Pointer to **int32** | ID of the OneLogin portal tab that the app is assigned to. | [optional] +**ConnectorId** | **int32** | ID of the connector to base the app from. | +**CreatedAt** | Pointer to **string** | the date the app was created | [optional] +**UpdatedAt** | Pointer to **string** | the date the app was last updated | [optional] +**RoleIds** | Pointer to **[]int32** | List of Role IDs that are assigned to the app. On App Create or Update the entire array is replaced with the values provided. | [optional] +**Provisioning** | Pointer to [**GenericAppProvisioning**](GenericAppProvisioning.md) | | [optional] +**Parameters** | [**AppParameters**](AppParameters.md) | | +**EnforcementPoint** | Pointer to [**EnforcementPoint**](EnforcementPoint.md) | | [optional] +**Configuration** | [**ConfigurationSaml**](ConfigurationSaml.md) | | +**Sso** | Pointer to [**SsoSaml**](SsoSaml.md) | | [optional] + +## Methods + +### NewCreateApp200Response + +`func NewCreateApp200Response(name string, visible bool, description string, policyId int32, connectorId int32, parameters AppParameters, configuration ConfigurationSaml, ) *CreateApp200Response` + +NewCreateApp200Response instantiates a new CreateApp200Response 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 + +### NewCreateApp200ResponseWithDefaults + +`func NewCreateApp200ResponseWithDefaults() *CreateApp200Response` + +NewCreateApp200ResponseWithDefaults instantiates a new CreateApp200Response 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 + +### GetId + +`func (o *CreateApp200Response) GetId() int32` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *CreateApp200Response) GetIdOk() (*int32, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *CreateApp200Response) SetId(v int32)` + +SetId sets Id field to given value. + +### HasId + +`func (o *CreateApp200Response) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetName + +`func (o *CreateApp200Response) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *CreateApp200Response) 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 *CreateApp200Response) SetName(v string)` + +SetName sets Name field to given value. + + +### GetVisible + +`func (o *CreateApp200Response) GetVisible() bool` + +GetVisible returns the Visible field if non-nil, zero value otherwise. + +### GetVisibleOk + +`func (o *CreateApp200Response) GetVisibleOk() (*bool, bool)` + +GetVisibleOk returns a tuple with the Visible field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVisible + +`func (o *CreateApp200Response) SetVisible(v bool)` + +SetVisible sets Visible field to given value. + + +### GetDescription + +`func (o *CreateApp200Response) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *CreateApp200Response) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *CreateApp200Response) SetDescription(v string)` + +SetDescription sets Description field to given value. + + +### GetNotes + +`func (o *CreateApp200Response) GetNotes() string` + +GetNotes returns the Notes field if non-nil, zero value otherwise. + +### GetNotesOk + +`func (o *CreateApp200Response) GetNotesOk() (*string, bool)` + +GetNotesOk returns a tuple with the Notes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNotes + +`func (o *CreateApp200Response) SetNotes(v string)` + +SetNotes sets Notes field to given value. + +### HasNotes + +`func (o *CreateApp200Response) HasNotes() bool` + +HasNotes returns a boolean if a field has been set. + +### GetIconUrl + +`func (o *CreateApp200Response) GetIconUrl() string` + +GetIconUrl returns the IconUrl field if non-nil, zero value otherwise. + +### GetIconUrlOk + +`func (o *CreateApp200Response) GetIconUrlOk() (*string, bool)` + +GetIconUrlOk returns a tuple with the IconUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIconUrl + +`func (o *CreateApp200Response) SetIconUrl(v string)` + +SetIconUrl sets IconUrl field to given value. + +### HasIconUrl + +`func (o *CreateApp200Response) HasIconUrl() bool` + +HasIconUrl returns a boolean if a field has been set. + +### GetAuthMethod + +`func (o *CreateApp200Response) GetAuthMethod() AuthMethod` + +GetAuthMethod returns the AuthMethod field if non-nil, zero value otherwise. + +### GetAuthMethodOk + +`func (o *CreateApp200Response) GetAuthMethodOk() (*AuthMethod, bool)` + +GetAuthMethodOk returns a tuple with the AuthMethod field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAuthMethod + +`func (o *CreateApp200Response) SetAuthMethod(v AuthMethod)` + +SetAuthMethod sets AuthMethod field to given value. + +### HasAuthMethod + +`func (o *CreateApp200Response) HasAuthMethod() bool` + +HasAuthMethod returns a boolean if a field has been set. + +### GetPolicyId + +`func (o *CreateApp200Response) GetPolicyId() int32` + +GetPolicyId returns the PolicyId field if non-nil, zero value otherwise. + +### GetPolicyIdOk + +`func (o *CreateApp200Response) GetPolicyIdOk() (*int32, bool)` + +GetPolicyIdOk returns a tuple with the PolicyId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPolicyId + +`func (o *CreateApp200Response) SetPolicyId(v int32)` + +SetPolicyId sets PolicyId field to given value. + + +### GetAllowAssumedSignin + +`func (o *CreateApp200Response) GetAllowAssumedSignin() bool` + +GetAllowAssumedSignin returns the AllowAssumedSignin field if non-nil, zero value otherwise. + +### GetAllowAssumedSigninOk + +`func (o *CreateApp200Response) GetAllowAssumedSigninOk() (*bool, bool)` + +GetAllowAssumedSigninOk returns a tuple with the AllowAssumedSignin field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAllowAssumedSignin + +`func (o *CreateApp200Response) SetAllowAssumedSignin(v bool)` + +SetAllowAssumedSignin sets AllowAssumedSignin field to given value. + +### HasAllowAssumedSignin + +`func (o *CreateApp200Response) HasAllowAssumedSignin() bool` + +HasAllowAssumedSignin returns a boolean if a field has been set. + +### GetTabId + +`func (o *CreateApp200Response) GetTabId() int32` + +GetTabId returns the TabId field if non-nil, zero value otherwise. + +### GetTabIdOk + +`func (o *CreateApp200Response) GetTabIdOk() (*int32, bool)` + +GetTabIdOk returns a tuple with the TabId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTabId + +`func (o *CreateApp200Response) SetTabId(v int32)` + +SetTabId sets TabId field to given value. + +### HasTabId + +`func (o *CreateApp200Response) HasTabId() bool` + +HasTabId returns a boolean if a field has been set. + +### GetConnectorId + +`func (o *CreateApp200Response) GetConnectorId() int32` + +GetConnectorId returns the ConnectorId field if non-nil, zero value otherwise. + +### GetConnectorIdOk + +`func (o *CreateApp200Response) GetConnectorIdOk() (*int32, bool)` + +GetConnectorIdOk returns a tuple with the ConnectorId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConnectorId + +`func (o *CreateApp200Response) SetConnectorId(v int32)` + +SetConnectorId sets ConnectorId field to given value. + + +### GetCreatedAt + +`func (o *CreateApp200Response) GetCreatedAt() string` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *CreateApp200Response) GetCreatedAtOk() (*string, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *CreateApp200Response) SetCreatedAt(v string)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *CreateApp200Response) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### GetUpdatedAt + +`func (o *CreateApp200Response) GetUpdatedAt() string` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *CreateApp200Response) GetUpdatedAtOk() (*string, bool)` + +GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedAt + +`func (o *CreateApp200Response) SetUpdatedAt(v string)` + +SetUpdatedAt sets UpdatedAt field to given value. + +### HasUpdatedAt + +`func (o *CreateApp200Response) HasUpdatedAt() bool` + +HasUpdatedAt returns a boolean if a field has been set. + +### GetRoleIds + +`func (o *CreateApp200Response) GetRoleIds() []int32` + +GetRoleIds returns the RoleIds field if non-nil, zero value otherwise. + +### GetRoleIdsOk + +`func (o *CreateApp200Response) GetRoleIdsOk() (*[]int32, bool)` + +GetRoleIdsOk returns a tuple with the RoleIds field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRoleIds + +`func (o *CreateApp200Response) SetRoleIds(v []int32)` + +SetRoleIds sets RoleIds field to given value. + +### HasRoleIds + +`func (o *CreateApp200Response) HasRoleIds() bool` + +HasRoleIds returns a boolean if a field has been set. + +### GetProvisioning + +`func (o *CreateApp200Response) GetProvisioning() GenericAppProvisioning` + +GetProvisioning returns the Provisioning field if non-nil, zero value otherwise. + +### GetProvisioningOk + +`func (o *CreateApp200Response) GetProvisioningOk() (*GenericAppProvisioning, bool)` + +GetProvisioningOk returns a tuple with the Provisioning field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProvisioning + +`func (o *CreateApp200Response) SetProvisioning(v GenericAppProvisioning)` + +SetProvisioning sets Provisioning field to given value. + +### HasProvisioning + +`func (o *CreateApp200Response) HasProvisioning() bool` + +HasProvisioning returns a boolean if a field has been set. + +### GetParameters + +`func (o *CreateApp200Response) GetParameters() AppParameters` + +GetParameters returns the Parameters field if non-nil, zero value otherwise. + +### GetParametersOk + +`func (o *CreateApp200Response) GetParametersOk() (*AppParameters, bool)` + +GetParametersOk returns a tuple with the Parameters field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetParameters + +`func (o *CreateApp200Response) SetParameters(v AppParameters)` + +SetParameters sets Parameters field to given value. + + +### GetEnforcementPoint + +`func (o *CreateApp200Response) GetEnforcementPoint() EnforcementPoint` + +GetEnforcementPoint returns the EnforcementPoint field if non-nil, zero value otherwise. + +### GetEnforcementPointOk + +`func (o *CreateApp200Response) GetEnforcementPointOk() (*EnforcementPoint, bool)` + +GetEnforcementPointOk returns a tuple with the EnforcementPoint field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnforcementPoint + +`func (o *CreateApp200Response) SetEnforcementPoint(v EnforcementPoint)` + +SetEnforcementPoint sets EnforcementPoint field to given value. + +### HasEnforcementPoint + +`func (o *CreateApp200Response) HasEnforcementPoint() bool` + +HasEnforcementPoint returns a boolean if a field has been set. + +### GetConfiguration + +`func (o *CreateApp200Response) GetConfiguration() ConfigurationSaml` + +GetConfiguration returns the Configuration field if non-nil, zero value otherwise. + +### GetConfigurationOk + +`func (o *CreateApp200Response) GetConfigurationOk() (*ConfigurationSaml, bool)` + +GetConfigurationOk returns a tuple with the Configuration field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConfiguration + +`func (o *CreateApp200Response) SetConfiguration(v ConfigurationSaml)` + +SetConfiguration sets Configuration field to given value. + + +### GetSso + +`func (o *CreateApp200Response) GetSso() SsoSaml` + +GetSso returns the Sso field if non-nil, zero value otherwise. + +### GetSsoOk + +`func (o *CreateApp200Response) GetSsoOk() (*SsoSaml, bool)` + +GetSsoOk returns a tuple with the Sso field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSso + +`func (o *CreateApp200Response) SetSso(v SsoSaml)` + +SetSso sets Sso field to given value. + +### HasSso + +`func (o *CreateApp200Response) HasSso() bool` + +HasSso 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/CreateAppRequest.md b/docs/CreateAppRequest.md new file mode 100644 index 0000000..90eb1d6 --- /dev/null +++ b/docs/CreateAppRequest.md @@ -0,0 +1,489 @@ +# CreateAppRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **int32** | Apps unique ID in OneLogin. | [optional] [readonly] +**Name** | **string** | The name of the app. | +**Visible** | **bool** | Indicates if the app is visible in the OneLogin portal. | +**Description** | **string** | Freeform description of the app. | +**Notes** | Pointer to **string** | Freeform notes about the app. | [optional] +**IconUrl** | Pointer to **string** | A link to the apps icon url | [optional] +**AuthMethod** | Pointer to [**AuthMethod**](AuthMethod.md) | | [optional] +**PolicyId** | **int32** | The security policy assigned to the app. | +**AllowAssumedSignin** | Pointer to **bool** | Indicates whether or not administrators can access the app as a user that they have assumed control over. | [optional] +**TabId** | Pointer to **int32** | ID of the OneLogin portal tab that the app is assigned to. | [optional] +**ConnectorId** | **int32** | ID of the connector to base the app from. | +**CreatedAt** | Pointer to **string** | the date the app was created | [optional] +**UpdatedAt** | Pointer to **string** | the date the app was last updated | [optional] +**RoleIds** | Pointer to **[]int32** | List of Role IDs that are assigned to the app. On App Create or Update the entire array is replaced with the values provided. | [optional] +**Provisioning** | Pointer to [**GenericAppProvisioning**](GenericAppProvisioning.md) | | [optional] +**Parameters** | [**AppParameters**](AppParameters.md) | | +**EnforcementPoint** | Pointer to [**EnforcementPoint**](EnforcementPoint.md) | | [optional] +**Configuration** | [**ConfigurationSaml**](ConfigurationSaml.md) | | +**Sso** | Pointer to [**SsoSaml**](SsoSaml.md) | | [optional] + +## Methods + +### NewCreateAppRequest + +`func NewCreateAppRequest(name string, visible bool, description string, policyId int32, connectorId int32, parameters AppParameters, configuration ConfigurationSaml, ) *CreateAppRequest` + +NewCreateAppRequest instantiates a new CreateAppRequest 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 + +### NewCreateAppRequestWithDefaults + +`func NewCreateAppRequestWithDefaults() *CreateAppRequest` + +NewCreateAppRequestWithDefaults instantiates a new CreateAppRequest 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 + +### GetId + +`func (o *CreateAppRequest) GetId() int32` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *CreateAppRequest) GetIdOk() (*int32, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *CreateAppRequest) SetId(v int32)` + +SetId sets Id field to given value. + +### HasId + +`func (o *CreateAppRequest) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetName + +`func (o *CreateAppRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *CreateAppRequest) 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 *CreateAppRequest) SetName(v string)` + +SetName sets Name field to given value. + + +### GetVisible + +`func (o *CreateAppRequest) GetVisible() bool` + +GetVisible returns the Visible field if non-nil, zero value otherwise. + +### GetVisibleOk + +`func (o *CreateAppRequest) GetVisibleOk() (*bool, bool)` + +GetVisibleOk returns a tuple with the Visible field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVisible + +`func (o *CreateAppRequest) SetVisible(v bool)` + +SetVisible sets Visible field to given value. + + +### GetDescription + +`func (o *CreateAppRequest) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *CreateAppRequest) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *CreateAppRequest) SetDescription(v string)` + +SetDescription sets Description field to given value. + + +### GetNotes + +`func (o *CreateAppRequest) GetNotes() string` + +GetNotes returns the Notes field if non-nil, zero value otherwise. + +### GetNotesOk + +`func (o *CreateAppRequest) GetNotesOk() (*string, bool)` + +GetNotesOk returns a tuple with the Notes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNotes + +`func (o *CreateAppRequest) SetNotes(v string)` + +SetNotes sets Notes field to given value. + +### HasNotes + +`func (o *CreateAppRequest) HasNotes() bool` + +HasNotes returns a boolean if a field has been set. + +### GetIconUrl + +`func (o *CreateAppRequest) GetIconUrl() string` + +GetIconUrl returns the IconUrl field if non-nil, zero value otherwise. + +### GetIconUrlOk + +`func (o *CreateAppRequest) GetIconUrlOk() (*string, bool)` + +GetIconUrlOk returns a tuple with the IconUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIconUrl + +`func (o *CreateAppRequest) SetIconUrl(v string)` + +SetIconUrl sets IconUrl field to given value. + +### HasIconUrl + +`func (o *CreateAppRequest) HasIconUrl() bool` + +HasIconUrl returns a boolean if a field has been set. + +### GetAuthMethod + +`func (o *CreateAppRequest) GetAuthMethod() AuthMethod` + +GetAuthMethod returns the AuthMethod field if non-nil, zero value otherwise. + +### GetAuthMethodOk + +`func (o *CreateAppRequest) GetAuthMethodOk() (*AuthMethod, bool)` + +GetAuthMethodOk returns a tuple with the AuthMethod field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAuthMethod + +`func (o *CreateAppRequest) SetAuthMethod(v AuthMethod)` + +SetAuthMethod sets AuthMethod field to given value. + +### HasAuthMethod + +`func (o *CreateAppRequest) HasAuthMethod() bool` + +HasAuthMethod returns a boolean if a field has been set. + +### GetPolicyId + +`func (o *CreateAppRequest) GetPolicyId() int32` + +GetPolicyId returns the PolicyId field if non-nil, zero value otherwise. + +### GetPolicyIdOk + +`func (o *CreateAppRequest) GetPolicyIdOk() (*int32, bool)` + +GetPolicyIdOk returns a tuple with the PolicyId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPolicyId + +`func (o *CreateAppRequest) SetPolicyId(v int32)` + +SetPolicyId sets PolicyId field to given value. + + +### GetAllowAssumedSignin + +`func (o *CreateAppRequest) GetAllowAssumedSignin() bool` + +GetAllowAssumedSignin returns the AllowAssumedSignin field if non-nil, zero value otherwise. + +### GetAllowAssumedSigninOk + +`func (o *CreateAppRequest) GetAllowAssumedSigninOk() (*bool, bool)` + +GetAllowAssumedSigninOk returns a tuple with the AllowAssumedSignin field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAllowAssumedSignin + +`func (o *CreateAppRequest) SetAllowAssumedSignin(v bool)` + +SetAllowAssumedSignin sets AllowAssumedSignin field to given value. + +### HasAllowAssumedSignin + +`func (o *CreateAppRequest) HasAllowAssumedSignin() bool` + +HasAllowAssumedSignin returns a boolean if a field has been set. + +### GetTabId + +`func (o *CreateAppRequest) GetTabId() int32` + +GetTabId returns the TabId field if non-nil, zero value otherwise. + +### GetTabIdOk + +`func (o *CreateAppRequest) GetTabIdOk() (*int32, bool)` + +GetTabIdOk returns a tuple with the TabId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTabId + +`func (o *CreateAppRequest) SetTabId(v int32)` + +SetTabId sets TabId field to given value. + +### HasTabId + +`func (o *CreateAppRequest) HasTabId() bool` + +HasTabId returns a boolean if a field has been set. + +### GetConnectorId + +`func (o *CreateAppRequest) GetConnectorId() int32` + +GetConnectorId returns the ConnectorId field if non-nil, zero value otherwise. + +### GetConnectorIdOk + +`func (o *CreateAppRequest) GetConnectorIdOk() (*int32, bool)` + +GetConnectorIdOk returns a tuple with the ConnectorId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConnectorId + +`func (o *CreateAppRequest) SetConnectorId(v int32)` + +SetConnectorId sets ConnectorId field to given value. + + +### GetCreatedAt + +`func (o *CreateAppRequest) GetCreatedAt() string` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *CreateAppRequest) GetCreatedAtOk() (*string, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *CreateAppRequest) SetCreatedAt(v string)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *CreateAppRequest) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### GetUpdatedAt + +`func (o *CreateAppRequest) GetUpdatedAt() string` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *CreateAppRequest) GetUpdatedAtOk() (*string, bool)` + +GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedAt + +`func (o *CreateAppRequest) SetUpdatedAt(v string)` + +SetUpdatedAt sets UpdatedAt field to given value. + +### HasUpdatedAt + +`func (o *CreateAppRequest) HasUpdatedAt() bool` + +HasUpdatedAt returns a boolean if a field has been set. + +### GetRoleIds + +`func (o *CreateAppRequest) GetRoleIds() []int32` + +GetRoleIds returns the RoleIds field if non-nil, zero value otherwise. + +### GetRoleIdsOk + +`func (o *CreateAppRequest) GetRoleIdsOk() (*[]int32, bool)` + +GetRoleIdsOk returns a tuple with the RoleIds field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRoleIds + +`func (o *CreateAppRequest) SetRoleIds(v []int32)` + +SetRoleIds sets RoleIds field to given value. + +### HasRoleIds + +`func (o *CreateAppRequest) HasRoleIds() bool` + +HasRoleIds returns a boolean if a field has been set. + +### GetProvisioning + +`func (o *CreateAppRequest) GetProvisioning() GenericAppProvisioning` + +GetProvisioning returns the Provisioning field if non-nil, zero value otherwise. + +### GetProvisioningOk + +`func (o *CreateAppRequest) GetProvisioningOk() (*GenericAppProvisioning, bool)` + +GetProvisioningOk returns a tuple with the Provisioning field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProvisioning + +`func (o *CreateAppRequest) SetProvisioning(v GenericAppProvisioning)` + +SetProvisioning sets Provisioning field to given value. + +### HasProvisioning + +`func (o *CreateAppRequest) HasProvisioning() bool` + +HasProvisioning returns a boolean if a field has been set. + +### GetParameters + +`func (o *CreateAppRequest) GetParameters() AppParameters` + +GetParameters returns the Parameters field if non-nil, zero value otherwise. + +### GetParametersOk + +`func (o *CreateAppRequest) GetParametersOk() (*AppParameters, bool)` + +GetParametersOk returns a tuple with the Parameters field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetParameters + +`func (o *CreateAppRequest) SetParameters(v AppParameters)` + +SetParameters sets Parameters field to given value. + + +### GetEnforcementPoint + +`func (o *CreateAppRequest) GetEnforcementPoint() EnforcementPoint` + +GetEnforcementPoint returns the EnforcementPoint field if non-nil, zero value otherwise. + +### GetEnforcementPointOk + +`func (o *CreateAppRequest) GetEnforcementPointOk() (*EnforcementPoint, bool)` + +GetEnforcementPointOk returns a tuple with the EnforcementPoint field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnforcementPoint + +`func (o *CreateAppRequest) SetEnforcementPoint(v EnforcementPoint)` + +SetEnforcementPoint sets EnforcementPoint field to given value. + +### HasEnforcementPoint + +`func (o *CreateAppRequest) HasEnforcementPoint() bool` + +HasEnforcementPoint returns a boolean if a field has been set. + +### GetConfiguration + +`func (o *CreateAppRequest) GetConfiguration() ConfigurationSaml` + +GetConfiguration returns the Configuration field if non-nil, zero value otherwise. + +### GetConfigurationOk + +`func (o *CreateAppRequest) GetConfigurationOk() (*ConfigurationSaml, bool)` + +GetConfigurationOk returns a tuple with the Configuration field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConfiguration + +`func (o *CreateAppRequest) SetConfiguration(v ConfigurationSaml)` + +SetConfiguration sets Configuration field to given value. + + +### GetSso + +`func (o *CreateAppRequest) GetSso() SsoSaml` + +GetSso returns the Sso field if non-nil, zero value otherwise. + +### GetSsoOk + +`func (o *CreateAppRequest) GetSsoOk() (*SsoSaml, bool)` + +GetSsoOk returns a tuple with the Sso field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSso + +`func (o *CreateAppRequest) SetSso(v SsoSaml)` + +SetSso sets Sso field to given value. + +### HasSso + +`func (o *CreateAppRequest) HasSso() bool` + +HasSso 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/CreateAuthorizationServerRequest.md b/docs/CreateAuthorizationServerRequest.md deleted file mode 100644 index 9a089e4..0000000 --- a/docs/CreateAuthorizationServerRequest.md +++ /dev/null @@ -1,108 +0,0 @@ -# CreateAuthorizationServerRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | Pointer to **string** | | [optional] -**Description** | Pointer to **string** | | [optional] -**Configuration** | Pointer to [**AuthServerConfiguration**](AuthServerConfiguration.md) | | [optional] - -## Methods - -### NewCreateAuthorizationServerRequest - -`func NewCreateAuthorizationServerRequest() *CreateAuthorizationServerRequest` - -NewCreateAuthorizationServerRequest instantiates a new CreateAuthorizationServerRequest 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 - -### NewCreateAuthorizationServerRequestWithDefaults - -`func NewCreateAuthorizationServerRequestWithDefaults() *CreateAuthorizationServerRequest` - -NewCreateAuthorizationServerRequestWithDefaults instantiates a new CreateAuthorizationServerRequest 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 *CreateAuthorizationServerRequest) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *CreateAuthorizationServerRequest) 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 *CreateAuthorizationServerRequest) SetName(v string)` - -SetName sets Name field to given value. - -### HasName - -`func (o *CreateAuthorizationServerRequest) HasName() bool` - -HasName returns a boolean if a field has been set. - -### GetDescription - -`func (o *CreateAuthorizationServerRequest) GetDescription() string` - -GetDescription returns the Description field if non-nil, zero value otherwise. - -### GetDescriptionOk - -`func (o *CreateAuthorizationServerRequest) GetDescriptionOk() (*string, bool)` - -GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDescription - -`func (o *CreateAuthorizationServerRequest) SetDescription(v string)` - -SetDescription sets Description field to given value. - -### HasDescription - -`func (o *CreateAuthorizationServerRequest) HasDescription() bool` - -HasDescription returns a boolean if a field has been set. - -### GetConfiguration - -`func (o *CreateAuthorizationServerRequest) GetConfiguration() AuthServerConfiguration` - -GetConfiguration returns the Configuration field if non-nil, zero value otherwise. - -### GetConfigurationOk - -`func (o *CreateAuthorizationServerRequest) GetConfigurationOk() (*AuthServerConfiguration, bool)` - -GetConfigurationOk returns a tuple with the Configuration field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConfiguration - -`func (o *CreateAuthorizationServerRequest) SetConfiguration(v AuthServerConfiguration)` - -SetConfiguration sets Configuration field to given value. - -### HasConfiguration - -`func (o *CreateAuthorizationServerRequest) HasConfiguration() bool` - -HasConfiguration 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/CreateDeviceVerification201Response.md b/docs/CreateDeviceVerification201Response.md new file mode 100644 index 0000000..07dc46a --- /dev/null +++ b/docs/CreateDeviceVerification201Response.md @@ -0,0 +1,238 @@ +# CreateDeviceVerification201Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DeviceId** | Pointer to **int32** | Specifies the factor to be verified. | [optional] +**DisplayName** | Pointer to **string** | A name for the users device | [optional] +**ExpiresAt** | Pointer to **string** | A short lived token that is required to Verify the Factor. This token expires based on the expires_in parameter passed in. | [optional] +**RedirectTo** | Pointer to **string** | Only applies to Email MagicLink factor. Redirects MagicLink success page to specified URL after 2 seconds. Email must already be configured by the user. | [optional] +**UserDisplayName** | Pointer to **string** | Authentication factor display name assigned by users when they register the device. | [optional] +**Id** | Pointer to **string** | Registration identifier. | [optional] +**TypeDisplayName** | Pointer to **string** | Authentication factor display name as it appears to users upon initial registration, as defined by admins at Settings > Authentication Factors. | [optional] +**AuthFactorName** | Pointer to **string** | Authentication factor name, as it appears to administrators in OneLogin. | [optional] + +## Methods + +### NewCreateDeviceVerification201Response + +`func NewCreateDeviceVerification201Response() *CreateDeviceVerification201Response` + +NewCreateDeviceVerification201Response instantiates a new CreateDeviceVerification201Response 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 + +### NewCreateDeviceVerification201ResponseWithDefaults + +`func NewCreateDeviceVerification201ResponseWithDefaults() *CreateDeviceVerification201Response` + +NewCreateDeviceVerification201ResponseWithDefaults instantiates a new CreateDeviceVerification201Response 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 + +### GetDeviceId + +`func (o *CreateDeviceVerification201Response) GetDeviceId() int32` + +GetDeviceId returns the DeviceId field if non-nil, zero value otherwise. + +### GetDeviceIdOk + +`func (o *CreateDeviceVerification201Response) GetDeviceIdOk() (*int32, bool)` + +GetDeviceIdOk returns a tuple with the DeviceId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDeviceId + +`func (o *CreateDeviceVerification201Response) SetDeviceId(v int32)` + +SetDeviceId sets DeviceId field to given value. + +### HasDeviceId + +`func (o *CreateDeviceVerification201Response) HasDeviceId() bool` + +HasDeviceId returns a boolean if a field has been set. + +### GetDisplayName + +`func (o *CreateDeviceVerification201Response) GetDisplayName() string` + +GetDisplayName returns the DisplayName field if non-nil, zero value otherwise. + +### GetDisplayNameOk + +`func (o *CreateDeviceVerification201Response) GetDisplayNameOk() (*string, bool)` + +GetDisplayNameOk returns a tuple with the DisplayName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDisplayName + +`func (o *CreateDeviceVerification201Response) SetDisplayName(v string)` + +SetDisplayName sets DisplayName field to given value. + +### HasDisplayName + +`func (o *CreateDeviceVerification201Response) HasDisplayName() bool` + +HasDisplayName returns a boolean if a field has been set. + +### GetExpiresAt + +`func (o *CreateDeviceVerification201Response) GetExpiresAt() string` + +GetExpiresAt returns the ExpiresAt field if non-nil, zero value otherwise. + +### GetExpiresAtOk + +`func (o *CreateDeviceVerification201Response) GetExpiresAtOk() (*string, bool)` + +GetExpiresAtOk returns a tuple with the ExpiresAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExpiresAt + +`func (o *CreateDeviceVerification201Response) SetExpiresAt(v string)` + +SetExpiresAt sets ExpiresAt field to given value. + +### HasExpiresAt + +`func (o *CreateDeviceVerification201Response) HasExpiresAt() bool` + +HasExpiresAt returns a boolean if a field has been set. + +### GetRedirectTo + +`func (o *CreateDeviceVerification201Response) GetRedirectTo() string` + +GetRedirectTo returns the RedirectTo field if non-nil, zero value otherwise. + +### GetRedirectToOk + +`func (o *CreateDeviceVerification201Response) GetRedirectToOk() (*string, bool)` + +GetRedirectToOk returns a tuple with the RedirectTo field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRedirectTo + +`func (o *CreateDeviceVerification201Response) SetRedirectTo(v string)` + +SetRedirectTo sets RedirectTo field to given value. + +### HasRedirectTo + +`func (o *CreateDeviceVerification201Response) HasRedirectTo() bool` + +HasRedirectTo returns a boolean if a field has been set. + +### GetUserDisplayName + +`func (o *CreateDeviceVerification201Response) GetUserDisplayName() string` + +GetUserDisplayName returns the UserDisplayName field if non-nil, zero value otherwise. + +### GetUserDisplayNameOk + +`func (o *CreateDeviceVerification201Response) GetUserDisplayNameOk() (*string, bool)` + +GetUserDisplayNameOk returns a tuple with the UserDisplayName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUserDisplayName + +`func (o *CreateDeviceVerification201Response) SetUserDisplayName(v string)` + +SetUserDisplayName sets UserDisplayName field to given value. + +### HasUserDisplayName + +`func (o *CreateDeviceVerification201Response) HasUserDisplayName() bool` + +HasUserDisplayName returns a boolean if a field has been set. + +### GetId + +`func (o *CreateDeviceVerification201Response) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *CreateDeviceVerification201Response) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *CreateDeviceVerification201Response) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *CreateDeviceVerification201Response) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetTypeDisplayName + +`func (o *CreateDeviceVerification201Response) GetTypeDisplayName() string` + +GetTypeDisplayName returns the TypeDisplayName field if non-nil, zero value otherwise. + +### GetTypeDisplayNameOk + +`func (o *CreateDeviceVerification201Response) GetTypeDisplayNameOk() (*string, bool)` + +GetTypeDisplayNameOk returns a tuple with the TypeDisplayName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTypeDisplayName + +`func (o *CreateDeviceVerification201Response) SetTypeDisplayName(v string)` + +SetTypeDisplayName sets TypeDisplayName field to given value. + +### HasTypeDisplayName + +`func (o *CreateDeviceVerification201Response) HasTypeDisplayName() bool` + +HasTypeDisplayName returns a boolean if a field has been set. + +### GetAuthFactorName + +`func (o *CreateDeviceVerification201Response) GetAuthFactorName() string` + +GetAuthFactorName returns the AuthFactorName field if non-nil, zero value otherwise. + +### GetAuthFactorNameOk + +`func (o *CreateDeviceVerification201Response) GetAuthFactorNameOk() (*string, bool)` + +GetAuthFactorNameOk returns a tuple with the AuthFactorName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAuthFactorName + +`func (o *CreateDeviceVerification201Response) SetAuthFactorName(v string)` + +SetAuthFactorName sets AuthFactorName field to given value. + +### HasAuthFactorName + +`func (o *CreateDeviceVerification201Response) HasAuthFactorName() bool` + +HasAuthFactorName 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/CreateDeviceVerificationRequest.md b/docs/CreateDeviceVerificationRequest.md new file mode 100644 index 0000000..d1a406f --- /dev/null +++ b/docs/CreateDeviceVerificationRequest.md @@ -0,0 +1,155 @@ +# CreateDeviceVerificationRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DeviceId** | **int32** | Specifies the factor to be verified. | +**DisplayName** | Pointer to **string** | A name for the users device | [optional] +**ExpiresIn** | Pointer to **string** | Defaults to 120. Valid values are: 120-900 seconds. | [optional] +**RedirectTo** | Pointer to **string** | Only applies to Email MagicLink factor. Redirects MagicLink success page to specified URL after 2 seconds. Email must already be configured by the user. | [optional] +**CustomMessage** | Pointer to **string** | Only applies to SMS factor. A message template that will be sent via SMS. Max length of the message after template items are inserted is 160 characters including the OTP code. SMS must already be configured by the user. The following template variables can be included in the message. - {{otp_code}} - The security code. - {{otp_expiry}} - The number of minutes until the one time code expires. | [optional] + +## Methods + +### NewCreateDeviceVerificationRequest + +`func NewCreateDeviceVerificationRequest(deviceId int32, ) *CreateDeviceVerificationRequest` + +NewCreateDeviceVerificationRequest instantiates a new CreateDeviceVerificationRequest 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 + +### NewCreateDeviceVerificationRequestWithDefaults + +`func NewCreateDeviceVerificationRequestWithDefaults() *CreateDeviceVerificationRequest` + +NewCreateDeviceVerificationRequestWithDefaults instantiates a new CreateDeviceVerificationRequest 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 + +### GetDeviceId + +`func (o *CreateDeviceVerificationRequest) GetDeviceId() int32` + +GetDeviceId returns the DeviceId field if non-nil, zero value otherwise. + +### GetDeviceIdOk + +`func (o *CreateDeviceVerificationRequest) GetDeviceIdOk() (*int32, bool)` + +GetDeviceIdOk returns a tuple with the DeviceId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDeviceId + +`func (o *CreateDeviceVerificationRequest) SetDeviceId(v int32)` + +SetDeviceId sets DeviceId field to given value. + + +### GetDisplayName + +`func (o *CreateDeviceVerificationRequest) GetDisplayName() string` + +GetDisplayName returns the DisplayName field if non-nil, zero value otherwise. + +### GetDisplayNameOk + +`func (o *CreateDeviceVerificationRequest) GetDisplayNameOk() (*string, bool)` + +GetDisplayNameOk returns a tuple with the DisplayName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDisplayName + +`func (o *CreateDeviceVerificationRequest) SetDisplayName(v string)` + +SetDisplayName sets DisplayName field to given value. + +### HasDisplayName + +`func (o *CreateDeviceVerificationRequest) HasDisplayName() bool` + +HasDisplayName returns a boolean if a field has been set. + +### GetExpiresIn + +`func (o *CreateDeviceVerificationRequest) GetExpiresIn() string` + +GetExpiresIn returns the ExpiresIn field if non-nil, zero value otherwise. + +### GetExpiresInOk + +`func (o *CreateDeviceVerificationRequest) GetExpiresInOk() (*string, bool)` + +GetExpiresInOk returns a tuple with the ExpiresIn field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExpiresIn + +`func (o *CreateDeviceVerificationRequest) SetExpiresIn(v string)` + +SetExpiresIn sets ExpiresIn field to given value. + +### HasExpiresIn + +`func (o *CreateDeviceVerificationRequest) HasExpiresIn() bool` + +HasExpiresIn returns a boolean if a field has been set. + +### GetRedirectTo + +`func (o *CreateDeviceVerificationRequest) GetRedirectTo() string` + +GetRedirectTo returns the RedirectTo field if non-nil, zero value otherwise. + +### GetRedirectToOk + +`func (o *CreateDeviceVerificationRequest) GetRedirectToOk() (*string, bool)` + +GetRedirectToOk returns a tuple with the RedirectTo field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRedirectTo + +`func (o *CreateDeviceVerificationRequest) SetRedirectTo(v string)` + +SetRedirectTo sets RedirectTo field to given value. + +### HasRedirectTo + +`func (o *CreateDeviceVerificationRequest) HasRedirectTo() bool` + +HasRedirectTo returns a boolean if a field has been set. + +### GetCustomMessage + +`func (o *CreateDeviceVerificationRequest) GetCustomMessage() string` + +GetCustomMessage returns the CustomMessage field if non-nil, zero value otherwise. + +### GetCustomMessageOk + +`func (o *CreateDeviceVerificationRequest) GetCustomMessageOk() (*string, bool)` + +GetCustomMessageOk returns a tuple with the CustomMessage field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustomMessage + +`func (o *CreateDeviceVerificationRequest) SetCustomMessage(v string)` + +SetCustomMessage sets CustomMessage field to given value. + +### HasCustomMessage + +`func (o *CreateDeviceVerificationRequest) HasCustomMessage() bool` + +HasCustomMessage 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/CreateEnvironmentVariableRequest.md b/docs/CreateEnvironmentVariableRequest.md deleted file mode 100644 index 5035ab4..0000000 --- a/docs/CreateEnvironmentVariableRequest.md +++ /dev/null @@ -1,72 +0,0 @@ -# CreateEnvironmentVariableRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | The name for the environment variable that will be used to retrieve the value from a hook function. | -**Value** | **string** | The secret value that will be encrypted at rest and injected in applicable hook functions at run time. | - -## Methods - -### NewCreateEnvironmentVariableRequest - -`func NewCreateEnvironmentVariableRequest(name string, value string, ) *CreateEnvironmentVariableRequest` - -NewCreateEnvironmentVariableRequest instantiates a new CreateEnvironmentVariableRequest 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 - -### NewCreateEnvironmentVariableRequestWithDefaults - -`func NewCreateEnvironmentVariableRequestWithDefaults() *CreateEnvironmentVariableRequest` - -NewCreateEnvironmentVariableRequestWithDefaults instantiates a new CreateEnvironmentVariableRequest 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 *CreateEnvironmentVariableRequest) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *CreateEnvironmentVariableRequest) 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 *CreateEnvironmentVariableRequest) SetName(v string)` - -SetName sets Name field to given value. - - -### GetValue - -`func (o *CreateEnvironmentVariableRequest) GetValue() string` - -GetValue returns the Value field if non-nil, zero value otherwise. - -### GetValueOk - -`func (o *CreateEnvironmentVariableRequest) GetValueOk() (*string, bool)` - -GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetValue - -`func (o *CreateEnvironmentVariableRequest) SetValue(v string)` - -SetValue sets Value 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/CreateFactorRegistration201Response.md b/docs/CreateFactorRegistration201Response.md new file mode 100644 index 0000000..90aa328 --- /dev/null +++ b/docs/CreateFactorRegistration201Response.md @@ -0,0 +1,186 @@ +# CreateFactorRegistration201Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DeviceId** | Pointer to **string** | MFA device identifier. | [optional] +**UserDisplayName** | Pointer to **string** | Authentication factor display name assigned by users when they register the device. | [optional] +**TypeDisplayName** | Pointer to **string** | Authentication factor display name as it appears to users upon initial registration, as defined by admins at Settings > Authentication Factors. | [optional] +**AuthFactorName** | Pointer to **string** | Authentication factor name, as it appears to administrators in OneLogin. | [optional] +**Id** | Pointer to **string** | Verification identifier used in subsequent verification step. | [optional] +**UserId** | Pointer to **string** | User identifier | [optional] + +## Methods + +### NewCreateFactorRegistration201Response + +`func NewCreateFactorRegistration201Response() *CreateFactorRegistration201Response` + +NewCreateFactorRegistration201Response instantiates a new CreateFactorRegistration201Response 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 + +### NewCreateFactorRegistration201ResponseWithDefaults + +`func NewCreateFactorRegistration201ResponseWithDefaults() *CreateFactorRegistration201Response` + +NewCreateFactorRegistration201ResponseWithDefaults instantiates a new CreateFactorRegistration201Response 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 + +### GetDeviceId + +`func (o *CreateFactorRegistration201Response) GetDeviceId() string` + +GetDeviceId returns the DeviceId field if non-nil, zero value otherwise. + +### GetDeviceIdOk + +`func (o *CreateFactorRegistration201Response) GetDeviceIdOk() (*string, bool)` + +GetDeviceIdOk returns a tuple with the DeviceId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDeviceId + +`func (o *CreateFactorRegistration201Response) SetDeviceId(v string)` + +SetDeviceId sets DeviceId field to given value. + +### HasDeviceId + +`func (o *CreateFactorRegistration201Response) HasDeviceId() bool` + +HasDeviceId returns a boolean if a field has been set. + +### GetUserDisplayName + +`func (o *CreateFactorRegistration201Response) GetUserDisplayName() string` + +GetUserDisplayName returns the UserDisplayName field if non-nil, zero value otherwise. + +### GetUserDisplayNameOk + +`func (o *CreateFactorRegistration201Response) GetUserDisplayNameOk() (*string, bool)` + +GetUserDisplayNameOk returns a tuple with the UserDisplayName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUserDisplayName + +`func (o *CreateFactorRegistration201Response) SetUserDisplayName(v string)` + +SetUserDisplayName sets UserDisplayName field to given value. + +### HasUserDisplayName + +`func (o *CreateFactorRegistration201Response) HasUserDisplayName() bool` + +HasUserDisplayName returns a boolean if a field has been set. + +### GetTypeDisplayName + +`func (o *CreateFactorRegistration201Response) GetTypeDisplayName() string` + +GetTypeDisplayName returns the TypeDisplayName field if non-nil, zero value otherwise. + +### GetTypeDisplayNameOk + +`func (o *CreateFactorRegistration201Response) GetTypeDisplayNameOk() (*string, bool)` + +GetTypeDisplayNameOk returns a tuple with the TypeDisplayName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTypeDisplayName + +`func (o *CreateFactorRegistration201Response) SetTypeDisplayName(v string)` + +SetTypeDisplayName sets TypeDisplayName field to given value. + +### HasTypeDisplayName + +`func (o *CreateFactorRegistration201Response) HasTypeDisplayName() bool` + +HasTypeDisplayName returns a boolean if a field has been set. + +### GetAuthFactorName + +`func (o *CreateFactorRegistration201Response) GetAuthFactorName() string` + +GetAuthFactorName returns the AuthFactorName field if non-nil, zero value otherwise. + +### GetAuthFactorNameOk + +`func (o *CreateFactorRegistration201Response) GetAuthFactorNameOk() (*string, bool)` + +GetAuthFactorNameOk returns a tuple with the AuthFactorName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAuthFactorName + +`func (o *CreateFactorRegistration201Response) SetAuthFactorName(v string)` + +SetAuthFactorName sets AuthFactorName field to given value. + +### HasAuthFactorName + +`func (o *CreateFactorRegistration201Response) HasAuthFactorName() bool` + +HasAuthFactorName returns a boolean if a field has been set. + +### GetId + +`func (o *CreateFactorRegistration201Response) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *CreateFactorRegistration201Response) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *CreateFactorRegistration201Response) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *CreateFactorRegistration201Response) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetUserId + +`func (o *CreateFactorRegistration201Response) GetUserId() string` + +GetUserId returns the UserId field if non-nil, zero value otherwise. + +### GetUserIdOk + +`func (o *CreateFactorRegistration201Response) GetUserIdOk() (*string, bool)` + +GetUserIdOk returns a tuple with the UserId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUserId + +`func (o *CreateFactorRegistration201Response) SetUserId(v string)` + +SetUserId sets UserId field to given value. + +### HasUserId + +`func (o *CreateFactorRegistration201Response) HasUserId() bool` + +HasUserId 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/CreateFactorRegistrationRequest.md b/docs/CreateFactorRegistrationRequest.md new file mode 100644 index 0000000..104a4f6 --- /dev/null +++ b/docs/CreateFactorRegistrationRequest.md @@ -0,0 +1,176 @@ +# CreateFactorRegistrationRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FactorId** | **int32** | The identifier of the factor to enroll the user with. See Get Available Factors for a list of possible id values. | +**DisplayName** | **string** | A name for the users device | +**ExpiresIn** | Pointer to **string** | Defaults to 120. Valid values are: 120-900 seconds. | [optional] +**Verified** | Pointer to **bool** | Defaults to false. The following factors support verified = true as part of the initial registration request: OneLogin SMS, OneLogin Voice, OneLogin Email. When using verified = true it is critical that the supported factors have pre-verified values, most likely imported from an existing directory or by the users themselvdes. Factors such as Authenticator and OneLogin Protect do not support verification = true as the user interaction is required to verify the factor. | [optional] +**RedirectTo** | Pointer to **string** | Only applies to Email MagicLink factor. Redirects MagicLink success page to specified URL after 2 seconds. Email must already be configured by the user. | [optional] +**CustomMessage** | Pointer to **string** | Only applies to SMS factor. A message template that will be sent via SMS. Max length of the message after template items are inserted is 160 characters including the OTP code. SMS must already be configured by the user. The following template variables can be included in the message. - {{otp_code}} - The security code. - {{otp_expiry}} - The number of minutes until the one time code expires. | [optional] + +## Methods + +### NewCreateFactorRegistrationRequest + +`func NewCreateFactorRegistrationRequest(factorId int32, displayName string, ) *CreateFactorRegistrationRequest` + +NewCreateFactorRegistrationRequest instantiates a new CreateFactorRegistrationRequest 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 + +### NewCreateFactorRegistrationRequestWithDefaults + +`func NewCreateFactorRegistrationRequestWithDefaults() *CreateFactorRegistrationRequest` + +NewCreateFactorRegistrationRequestWithDefaults instantiates a new CreateFactorRegistrationRequest 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 + +### GetFactorId + +`func (o *CreateFactorRegistrationRequest) GetFactorId() int32` + +GetFactorId returns the FactorId field if non-nil, zero value otherwise. + +### GetFactorIdOk + +`func (o *CreateFactorRegistrationRequest) GetFactorIdOk() (*int32, bool)` + +GetFactorIdOk returns a tuple with the FactorId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFactorId + +`func (o *CreateFactorRegistrationRequest) SetFactorId(v int32)` + +SetFactorId sets FactorId field to given value. + + +### GetDisplayName + +`func (o *CreateFactorRegistrationRequest) GetDisplayName() string` + +GetDisplayName returns the DisplayName field if non-nil, zero value otherwise. + +### GetDisplayNameOk + +`func (o *CreateFactorRegistrationRequest) GetDisplayNameOk() (*string, bool)` + +GetDisplayNameOk returns a tuple with the DisplayName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDisplayName + +`func (o *CreateFactorRegistrationRequest) SetDisplayName(v string)` + +SetDisplayName sets DisplayName field to given value. + + +### GetExpiresIn + +`func (o *CreateFactorRegistrationRequest) GetExpiresIn() string` + +GetExpiresIn returns the ExpiresIn field if non-nil, zero value otherwise. + +### GetExpiresInOk + +`func (o *CreateFactorRegistrationRequest) GetExpiresInOk() (*string, bool)` + +GetExpiresInOk returns a tuple with the ExpiresIn field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExpiresIn + +`func (o *CreateFactorRegistrationRequest) SetExpiresIn(v string)` + +SetExpiresIn sets ExpiresIn field to given value. + +### HasExpiresIn + +`func (o *CreateFactorRegistrationRequest) HasExpiresIn() bool` + +HasExpiresIn returns a boolean if a field has been set. + +### GetVerified + +`func (o *CreateFactorRegistrationRequest) GetVerified() bool` + +GetVerified returns the Verified field if non-nil, zero value otherwise. + +### GetVerifiedOk + +`func (o *CreateFactorRegistrationRequest) GetVerifiedOk() (*bool, bool)` + +GetVerifiedOk returns a tuple with the Verified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVerified + +`func (o *CreateFactorRegistrationRequest) SetVerified(v bool)` + +SetVerified sets Verified field to given value. + +### HasVerified + +`func (o *CreateFactorRegistrationRequest) HasVerified() bool` + +HasVerified returns a boolean if a field has been set. + +### GetRedirectTo + +`func (o *CreateFactorRegistrationRequest) GetRedirectTo() string` + +GetRedirectTo returns the RedirectTo field if non-nil, zero value otherwise. + +### GetRedirectToOk + +`func (o *CreateFactorRegistrationRequest) GetRedirectToOk() (*string, bool)` + +GetRedirectToOk returns a tuple with the RedirectTo field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRedirectTo + +`func (o *CreateFactorRegistrationRequest) SetRedirectTo(v string)` + +SetRedirectTo sets RedirectTo field to given value. + +### HasRedirectTo + +`func (o *CreateFactorRegistrationRequest) HasRedirectTo() bool` + +HasRedirectTo returns a boolean if a field has been set. + +### GetCustomMessage + +`func (o *CreateFactorRegistrationRequest) GetCustomMessage() string` + +GetCustomMessage returns the CustomMessage field if non-nil, zero value otherwise. + +### GetCustomMessageOk + +`func (o *CreateFactorRegistrationRequest) GetCustomMessageOk() (*string, bool)` + +GetCustomMessageOk returns a tuple with the CustomMessage field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustomMessage + +`func (o *CreateFactorRegistrationRequest) SetCustomMessage(v string)` + +SetCustomMessage sets CustomMessage field to given value. + +### HasCustomMessage + +`func (o *CreateFactorRegistrationRequest) HasCustomMessage() bool` + +HasCustomMessage 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/CreateRoles201ResponseInner.md b/docs/CreatePrivilege200Response.md similarity index 57% rename from docs/CreateRoles201ResponseInner.md rename to docs/CreatePrivilege200Response.md index c78fc7e..62fb6dc 100644 --- a/docs/CreateRoles201ResponseInner.md +++ b/docs/CreatePrivilege200Response.md @@ -1,52 +1,52 @@ -# CreateRoles201ResponseInner +# CreatePrivilege200Response ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | Pointer to **int32** | | [optional] +**Id** | Pointer to **string** | Privilege Id | [optional] ## Methods -### NewCreateRoles201ResponseInner +### NewCreatePrivilege200Response -`func NewCreateRoles201ResponseInner() *CreateRoles201ResponseInner` +`func NewCreatePrivilege200Response() *CreatePrivilege200Response` -NewCreateRoles201ResponseInner instantiates a new CreateRoles201ResponseInner object +NewCreatePrivilege200Response instantiates a new CreatePrivilege200Response 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 -### NewCreateRoles201ResponseInnerWithDefaults +### NewCreatePrivilege200ResponseWithDefaults -`func NewCreateRoles201ResponseInnerWithDefaults() *CreateRoles201ResponseInner` +`func NewCreatePrivilege200ResponseWithDefaults() *CreatePrivilege200Response` -NewCreateRoles201ResponseInnerWithDefaults instantiates a new CreateRoles201ResponseInner object +NewCreatePrivilege200ResponseWithDefaults instantiates a new CreatePrivilege200Response 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 ### GetId -`func (o *CreateRoles201ResponseInner) GetId() int32` +`func (o *CreatePrivilege200Response) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk -`func (o *CreateRoles201ResponseInner) GetIdOk() (*int32, bool)` +`func (o *CreatePrivilege200Response) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId -`func (o *CreateRoles201ResponseInner) SetId(v int32)` +`func (o *CreatePrivilege200Response) SetId(v string)` SetId sets Id field to given value. ### HasId -`func (o *CreateRoles201ResponseInner) HasId() bool` +`func (o *CreatePrivilege200Response) HasId() bool` HasId returns a boolean if a field has been set. diff --git a/docs/RuleId.md b/docs/CreateRole201ResponseInner.md similarity index 61% rename from docs/RuleId.md rename to docs/CreateRole201ResponseInner.md index b81292a..5b1d759 100644 --- a/docs/RuleId.md +++ b/docs/CreateRole201ResponseInner.md @@ -1,4 +1,4 @@ -# RuleId +# CreateRole201ResponseInner ## Properties @@ -8,45 +8,45 @@ Name | Type | Description | Notes ## Methods -### NewRuleId +### NewCreateRole201ResponseInner -`func NewRuleId() *RuleId` +`func NewCreateRole201ResponseInner() *CreateRole201ResponseInner` -NewRuleId instantiates a new RuleId object +NewCreateRole201ResponseInner instantiates a new CreateRole201ResponseInner 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 -### NewRuleIdWithDefaults +### NewCreateRole201ResponseInnerWithDefaults -`func NewRuleIdWithDefaults() *RuleId` +`func NewCreateRole201ResponseInnerWithDefaults() *CreateRole201ResponseInner` -NewRuleIdWithDefaults instantiates a new RuleId object +NewCreateRole201ResponseInnerWithDefaults instantiates a new CreateRole201ResponseInner 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 ### GetId -`func (o *RuleId) GetId() int32` +`func (o *CreateRole201ResponseInner) GetId() int32` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk -`func (o *RuleId) GetIdOk() (*int32, bool)` +`func (o *CreateRole201ResponseInner) GetIdOk() (*int32, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId -`func (o *RuleId) SetId(v int32)` +`func (o *CreateRole201ResponseInner) SetId(v int32)` SetId sets Id field to given value. ### HasId -`func (o *RuleId) HasId() bool` +`func (o *CreateRole201ResponseInner) HasId() bool` HasId returns a boolean if a field has been set. diff --git a/docs/DefaultApi.md b/docs/DefaultApi.md deleted file mode 100644 index ca98089..0000000 --- a/docs/DefaultApi.md +++ /dev/null @@ -1,7263 +0,0 @@ -# \DefaultApi - -All URIs are relative to *https://onelogininc.onelogin.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ActivateFactor**](DefaultApi.md#ActivateFactor) | **Post** /api/2/mfa/users/{user_id}/verifications | -[**AddAccessTokenClaim**](DefaultApi.md#AddAccessTokenClaim) | **Post** /api/2/api_authorizations/{id}/claims | -[**AddClientApp**](DefaultApi.md#AddClientApp) | **Post** /api/2/api_authorizations/{id}/clients | -[**AddRoleAdmins**](DefaultApi.md#AddRoleAdmins) | **Post** /api/2/roles/{role_id}/admins | -[**AddRoleUsers**](DefaultApi.md#AddRoleUsers) | **Post** /api/2/roles/{role_id}/users | -[**AddScope**](DefaultApi.md#AddScope) | **Post** /api/2/api_authorizations/{id}/scopes | -[**BulkMappingSort**](DefaultApi.md#BulkMappingSort) | **Put** /api/2/apps/mappings/sort | -[**BulkSort**](DefaultApi.md#BulkSort) | **Put** /api/2/apps/{app_id}/rules/sort | -[**CreateApp**](DefaultApi.md#CreateApp) | **Post** /api/2/apps | -[**CreateAuthorizationServer**](DefaultApi.md#CreateAuthorizationServer) | **Post** /api/2/api_authorizations | -[**CreateEnvironmentVariable**](DefaultApi.md#CreateEnvironmentVariable) | **Post** /api/2/hooks/envs | -[**CreateHook**](DefaultApi.md#CreateHook) | **Post** /api/2/hooks | -[**CreateMapping**](DefaultApi.md#CreateMapping) | **Post** /api/2/mappings | -[**CreateRiskRule**](DefaultApi.md#CreateRiskRule) | **Post** /api/2/risk/rules | -[**CreateRoles**](DefaultApi.md#CreateRoles) | **Post** /api/2/roles | -[**CreateRule**](DefaultApi.md#CreateRule) | **Post** /api/2/apps/{app_id}/rules | -[**CreateUser**](DefaultApi.md#CreateUser) | **Post** /api/2/users | -[**DeleteAccessTokenClaim**](DefaultApi.md#DeleteAccessTokenClaim) | **Delete** /api/2/api_authorizations/{id}/claims/{claim_id} | -[**DeleteApp**](DefaultApi.md#DeleteApp) | **Delete** /api/2/apps/{app_id} | -[**DeleteAppParameter**](DefaultApi.md#DeleteAppParameter) | **Delete** /api/2/apps/{app_id}/parameters/{parameter_id} | -[**DeleteAuthorizationServer**](DefaultApi.md#DeleteAuthorizationServer) | **Delete** /api/2/api_authorizations/{id} | -[**DeleteEnvironmentVariable**](DefaultApi.md#DeleteEnvironmentVariable) | **Delete** /api/2/hooks/envs/{envvar_id} | -[**DeleteFactor**](DefaultApi.md#DeleteFactor) | **Delete** /api/2/mfa/users/{user_id}/devices/{device_id} | -[**DeleteHook**](DefaultApi.md#DeleteHook) | **Delete** /api/2/hooks/{hook_id} | -[**DeleteMapping**](DefaultApi.md#DeleteMapping) | **Delete** /api/2/mappings/{mapping_id} | -[**DeleteRiskRule**](DefaultApi.md#DeleteRiskRule) | **Delete** /api/2/risk/rules/{risk_rule_id} | -[**DeleteRole**](DefaultApi.md#DeleteRole) | **Delete** /api/2/roles/{role_id} | -[**DeleteRule**](DefaultApi.md#DeleteRule) | **Delete** /api/2/apps/{app_id}/rules/{rule_id} | -[**DeleteScope**](DefaultApi.md#DeleteScope) | **Delete** /api/2/api_authorizations/{id}/scopes/{scope_id} | -[**DeleteUser**](DefaultApi.md#DeleteUser) | **Delete** /api/2/users/{user_id} | -[**DryRunMapping**](DefaultApi.md#DryRunMapping) | **Post** /api/2/mappings/{mapping_id}/dryrun | -[**EnrollFactor**](DefaultApi.md#EnrollFactor) | **Post** /api/2/mfa/users/{user_id}/registrations | -[**GenerateMfaToken**](DefaultApi.md#GenerateMfaToken) | **Post** /api/2/mfs/users/{user_id}/mfa_token | -[**GenerateSamlAssertion**](DefaultApi.md#GenerateSamlAssertion) | **Post** /api/2/saml_assertion | -[**GenerateToken**](DefaultApi.md#GenerateToken) | **Post** /auth/oauth2/v2/token | -[**GetApp**](DefaultApi.md#GetApp) | **Get** /api/2/apps/{app_id} | -[**GetAuthorizationServer**](DefaultApi.md#GetAuthorizationServer) | **Get** /api/2/api_authorizations/{id} | -[**GetAvailableFactors**](DefaultApi.md#GetAvailableFactors) | **Get** /api/2/mfa/users/{user_id}/factors | -[**GetClientApps**](DefaultApi.md#GetClientApps) | **Get** /api/2/api_authorizations/{id}/clients | -[**GetEnrolledFactors**](DefaultApi.md#GetEnrolledFactors) | **Get** /api/2/mfa/users/{user_id}/devices | -[**GetEnvironmentVariable**](DefaultApi.md#GetEnvironmentVariable) | **Get** /api/2/hooks/envs/{envvar_id} | -[**GetHook**](DefaultApi.md#GetHook) | **Get** /api/2/hooks/{hook_id} | -[**GetLogs**](DefaultApi.md#GetLogs) | **Get** /api/2/hooks/{hook_id}/logs | -[**GetMapping**](DefaultApi.md#GetMapping) | **Get** /api/2/mappings/{mapping_id} | -[**GetRateLimit**](DefaultApi.md#GetRateLimit) | **Get** /auth/rate_limit | -[**GetRiskRule**](DefaultApi.md#GetRiskRule) | **Get** /api/2/risk/rules/{risk_rule_id} | -[**GetRiskScore**](DefaultApi.md#GetRiskScore) | **Post** /api/2/risk/verify | -[**GetRole**](DefaultApi.md#GetRole) | **Get** /api/2/roles/{role_id} | -[**GetRoleAdmins**](DefaultApi.md#GetRoleAdmins) | **Get** /api/2/roles/{role_id}/admins | -[**GetRoleApps**](DefaultApi.md#GetRoleApps) | **Get** /api/2/roles/{role_id}/apps | -[**GetRoleUsers**](DefaultApi.md#GetRoleUsers) | **Get** /api/2/roles/{role_id}/users | -[**GetRule**](DefaultApi.md#GetRule) | **Get** /api/2/apps/{app_id}/rules/{rule_id} | -[**GetScoreInsights**](DefaultApi.md#GetScoreInsights) | **Get** /api/2/risk/scores | -[**GetUser**](DefaultApi.md#GetUser) | **Get** /api/2/users/{user_id} | -[**GetUserApps**](DefaultApi.md#GetUserApps) | **Get** /api/2/users/{user_id}/apps | -[**ListAccessTokenClaims**](DefaultApi.md#ListAccessTokenClaims) | **Get** /api/2/api_authorizations/{id}/claims | -[**ListActionValues**](DefaultApi.md#ListActionValues) | **Get** /api/2/apps/{app_id}/rules/actions/{actuion_value}/values | -[**ListActions**](DefaultApi.md#ListActions) | **Get** /api/2/apps/{app_id}/rules/actions | -[**ListAppUsers**](DefaultApi.md#ListAppUsers) | **Get** /api/2/apps/{app_id}/users | -[**ListApps**](DefaultApi.md#ListApps) | **Get** /api/2/apps | -[**ListAuthorizationServers**](DefaultApi.md#ListAuthorizationServers) | **Get** /api/2/api_authorizations | -[**ListConditionOperators**](DefaultApi.md#ListConditionOperators) | **Get** /api/2/apps/{app_id}/rules/conditions/{condition_value}/operators | -[**ListConditionValues**](DefaultApi.md#ListConditionValues) | **Get** /api/2/apps/{app_id}/rules/conditions/{condition_value}/values | -[**ListConditions**](DefaultApi.md#ListConditions) | **Get** /api/2/apps/{app_id}/rules/conditions | -[**ListConnectors**](DefaultApi.md#ListConnectors) | **Get** /api/2/connectors | -[**ListEnvironmentVariables**](DefaultApi.md#ListEnvironmentVariables) | **Get** /api/2/hooks/envs | -[**ListHooks**](DefaultApi.md#ListHooks) | **Get** /api/2/hooks | -[**ListMappingActionValues**](DefaultApi.md#ListMappingActionValues) | **Get** /api/2/apps/mappings/actions/{actuion_value}/values | -[**ListMappingActions**](DefaultApi.md#ListMappingActions) | **Get** /api/2/apps/mappings/actions | -[**ListMappingConditionOperators**](DefaultApi.md#ListMappingConditionOperators) | **Get** /api/2/apps/mappings/conditions/{condition_value}/operators | -[**ListMappingConditionValues**](DefaultApi.md#ListMappingConditionValues) | **Get** /api/2/apps/mappings/conditions/{condition_value}/values | -[**ListMappingConditions**](DefaultApi.md#ListMappingConditions) | **Get** /api/2/apps/mappings/conditions | -[**ListMappings**](DefaultApi.md#ListMappings) | **Get** /api/2/mappings | -[**ListRiskRules**](DefaultApi.md#ListRiskRules) | **Get** /api/2/risk/rules | -[**ListRoles**](DefaultApi.md#ListRoles) | **Get** /api/2/roles | -[**ListRules**](DefaultApi.md#ListRules) | **Get** /api/2/apps/{app_id}/rules | -[**ListScopes**](DefaultApi.md#ListScopes) | **Get** /api/2/api_authorizations/{id}/scopes | -[**ListUsers**](DefaultApi.md#ListUsers) | **Get** /api/2/users | -[**RemoveClientApp**](DefaultApi.md#RemoveClientApp) | **Delete** /api/2/api_authorizations/{id}/clients/{client_app_id} | -[**RemoveRoleAdmins**](DefaultApi.md#RemoveRoleAdmins) | **Delete** /api/2/roles/{role_id}/admins | -[**RemoveRoleUsers**](DefaultApi.md#RemoveRoleUsers) | **Delete** /api/2/roles/{role_id}/users | -[**RevokeToken**](DefaultApi.md#RevokeToken) | **Post** /auth/oauth2/revoke | -[**SetRoleApps**](DefaultApi.md#SetRoleApps) | **Put** /api/2/roles/{role_id}/apps | -[**TrackEvent**](DefaultApi.md#TrackEvent) | **Post** /api/2/risk/events | -[**UpdateAccessTokenClaim**](DefaultApi.md#UpdateAccessTokenClaim) | **Put** /api/2/api_authorizations/{id}/claims/{claim_id} | -[**UpdateApp**](DefaultApi.md#UpdateApp) | **Put** /api/2/apps/{app_id} | -[**UpdateAuthorizationServer**](DefaultApi.md#UpdateAuthorizationServer) | **Put** /api/2/api_authorizations/{id} | -[**UpdateClientApp**](DefaultApi.md#UpdateClientApp) | **Put** /api/2/api_authorizations/{id}/clients/{client_app_id} | -[**UpdateEnvironmentVariable**](DefaultApi.md#UpdateEnvironmentVariable) | **Put** /api/2/hooks/envs/{envvar_id} | -[**UpdateHook**](DefaultApi.md#UpdateHook) | **Put** /api/2/hooks/{hook_id} | -[**UpdateMapping**](DefaultApi.md#UpdateMapping) | **Put** /api/2/mappings/{mapping_id} | -[**UpdateRiskRule**](DefaultApi.md#UpdateRiskRule) | **Put** /api/2/risk/rules/{risk_rule_id} | -[**UpdateRole**](DefaultApi.md#UpdateRole) | **Put** /api/2/roles/{role_id} | -[**UpdateRule**](DefaultApi.md#UpdateRule) | **Put** /api/2/apps/{app_id}/rules/{rule_id} | -[**UpdateScope**](DefaultApi.md#UpdateScope) | **Put** /api/2/api_authorizations/{id}/scopes/{scope_id} | -[**UpdateUser**](DefaultApi.md#UpdateUser) | **Put** /api/2/users/{user_id} | -[**VerifyEnrollment**](DefaultApi.md#VerifyEnrollment) | **Put** /api/2/mfa/users/{user_id}/registrations/{registration_id} | -[**VerifyEnrollmentVoiceProtect**](DefaultApi.md#VerifyEnrollmentVoiceProtect) | **Get** /api/2/mfa/users/{user_id}/registrations/{registration_id} | -[**VerifyFactor**](DefaultApi.md#VerifyFactor) | **Put** /api/2/mfa/users/{user_id}/verifications/{verification_id} | -[**VerifyFactorSaml**](DefaultApi.md#VerifyFactorSaml) | **Post** /api/2/saml_assertion/verify_factor | -[**VerifyFactorVoice**](DefaultApi.md#VerifyFactorVoice) | **Get** /api/2/mfa/users/{user_id}/verifications/{verification_id} | - - - -## ActivateFactor - -> ActivateFactor(ctx, userId).Authorization(authorization).ActivateFactorRequest(activateFactorRequest).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - userId := int32(56) // int32 | Set to the id of the user. - activateFactorRequest := *openapiclient.NewActivateFactorRequest() // ActivateFactorRequest | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.ActivateFactor(context.Background(), userId).Authorization(authorization).ActivateFactorRequest(activateFactorRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.ActivateFactor``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**userId** | **int32** | Set to the id of the user. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiActivateFactorRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - - **activateFactorRequest** | [**ActivateFactorRequest**](ActivateFactorRequest.md) | | - -### Return type - - (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## AddAccessTokenClaim - -> Id AddAccessTokenClaim(ctx, id).Authorization(authorization).AddAccessTokenClaimRequest(addAccessTokenClaimRequest).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - id := int32(56) // int32 | - addAccessTokenClaimRequest := *openapiclient.NewAddAccessTokenClaimRequest() // AddAccessTokenClaimRequest | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.AddAccessTokenClaim(context.Background(), id).Authorization(authorization).AddAccessTokenClaimRequest(addAccessTokenClaimRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.AddAccessTokenClaim``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AddAccessTokenClaim`: Id - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.AddAccessTokenClaim`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**id** | **int32** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiAddAccessTokenClaimRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - - **addAccessTokenClaimRequest** | [**AddAccessTokenClaimRequest**](AddAccessTokenClaimRequest.md) | | - -### Return type - -[**Id**](Id.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## AddClientApp - -> ClientApp AddClientApp(ctx, id).Authorization(authorization).AddClientAppRequest(addClientAppRequest).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - id := int32(56) // int32 | - addClientAppRequest := *openapiclient.NewAddClientAppRequest() // AddClientAppRequest | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.AddClientApp(context.Background(), id).Authorization(authorization).AddClientAppRequest(addClientAppRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.AddClientApp``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AddClientApp`: ClientApp - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.AddClientApp`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**id** | **int32** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiAddClientAppRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - - **addClientAppRequest** | [**AddClientAppRequest**](AddClientAppRequest.md) | | - -### Return type - -[**ClientApp**](ClientApp.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## AddRoleAdmins - -> []AddRoleUsers200ResponseInner AddRoleAdmins(ctx, roleId).Authorization(authorization).RequestBody(requestBody).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - roleId := int32(56) // int32 | Set to the id of the role you want to return. - requestBody := []int32{int32(123)} // []int32 | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.AddRoleAdmins(context.Background(), roleId).Authorization(authorization).RequestBody(requestBody).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.AddRoleAdmins``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AddRoleAdmins`: []AddRoleUsers200ResponseInner - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.AddRoleAdmins`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**roleId** | **int32** | Set to the id of the role you want to return. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiAddRoleAdminsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - - **requestBody** | **[]int32** | | - -### Return type - -[**[]AddRoleUsers200ResponseInner**](AddRoleUsers200ResponseInner.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## AddRoleUsers - -> []AddRoleUsers200ResponseInner AddRoleUsers(ctx, roleId).Authorization(authorization).RequestBody(requestBody).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - roleId := int32(56) // int32 | Set to the id of the role you want to return. - requestBody := []int32{int32(123)} // []int32 | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.AddRoleUsers(context.Background(), roleId).Authorization(authorization).RequestBody(requestBody).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.AddRoleUsers``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AddRoleUsers`: []AddRoleUsers200ResponseInner - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.AddRoleUsers`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**roleId** | **int32** | Set to the id of the role you want to return. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiAddRoleUsersRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - - **requestBody** | **[]int32** | | - -### Return type - -[**[]AddRoleUsers200ResponseInner**](AddRoleUsers200ResponseInner.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## AddScope - -> Id AddScope(ctx, id).Authorization(authorization).AddScopeRequest(addScopeRequest).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - id := int32(56) // int32 | - addScopeRequest := *openapiclient.NewAddScopeRequest() // AddScopeRequest | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.AddScope(context.Background(), id).Authorization(authorization).AddScopeRequest(addScopeRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.AddScope``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AddScope`: Id - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.AddScope`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**id** | **int32** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiAddScopeRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - - **addScopeRequest** | [**AddScopeRequest**](AddScopeRequest.md) | | - -### Return type - -[**Id**](Id.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## BulkMappingSort - -> []int32 BulkMappingSort(ctx).Authorization(authorization).RequestBody(requestBody).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - requestBody := []int32{int32(123)} // []int32 | The request body must contain an array of User Mapping IDs in the desired order. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.BulkMappingSort(context.Background()).Authorization(authorization).RequestBody(requestBody).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.BulkMappingSort``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `BulkMappingSort`: []int32 - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.BulkMappingSort`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiBulkMappingSortRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - **requestBody** | **[]int32** | The request body must contain an array of User Mapping IDs in the desired order. | - -### Return type - -**[]int32** - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## BulkSort - -> []int32 BulkSort(ctx, appId).Authorization(authorization).RequestBody(requestBody).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - appId := int32(56) // int32 | - requestBody := []int32{int32(123)} // []int32 | The request body must contain an array of App Rule IDs in the desired order. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.BulkSort(context.Background(), appId).Authorization(authorization).RequestBody(requestBody).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.BulkSort``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `BulkSort`: []int32 - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.BulkSort`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**appId** | **int32** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiBulkSortRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - - **requestBody** | **[]int32** | The request body must contain an array of App Rule IDs in the desired order. | - -### Return type - -**[]int32** - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## CreateApp - -> Schema CreateApp(ctx).Authorization(authorization).Schema(schema).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - schema := *openapiclient.NewSchema() // Schema | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.CreateApp(context.Background()).Authorization(authorization).Schema(schema).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.CreateApp``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `CreateApp`: Schema - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.CreateApp`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiCreateAppRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - **schema** | [**Schema**](Schema.md) | | - -### Return type - -[**Schema**](Schema.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## CreateAuthorizationServer - -> Id CreateAuthorizationServer(ctx).Authorization(authorization).CreateAuthorizationServerRequest(createAuthorizationServerRequest).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - createAuthorizationServerRequest := *openapiclient.NewCreateAuthorizationServerRequest() // CreateAuthorizationServerRequest | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.CreateAuthorizationServer(context.Background()).Authorization(authorization).CreateAuthorizationServerRequest(createAuthorizationServerRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.CreateAuthorizationServer``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `CreateAuthorizationServer`: Id - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.CreateAuthorizationServer`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiCreateAuthorizationServerRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - **createAuthorizationServerRequest** | [**CreateAuthorizationServerRequest**](CreateAuthorizationServerRequest.md) | | - -### Return type - -[**Id**](Id.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## CreateEnvironmentVariable - -> Envvar CreateEnvironmentVariable(ctx).Authorization(authorization).CreateEnvironmentVariableRequest(createEnvironmentVariableRequest).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - createEnvironmentVariableRequest := *openapiclient.NewCreateEnvironmentVariableRequest("Name_example", "Value_example") // CreateEnvironmentVariableRequest | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.CreateEnvironmentVariable(context.Background()).Authorization(authorization).CreateEnvironmentVariableRequest(createEnvironmentVariableRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.CreateEnvironmentVariable``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `CreateEnvironmentVariable`: Envvar - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.CreateEnvironmentVariable`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiCreateEnvironmentVariableRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - **createEnvironmentVariableRequest** | [**CreateEnvironmentVariableRequest**](CreateEnvironmentVariableRequest.md) | | - -### Return type - -[**Envvar**](Envvar.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## CreateHook - -> CreateHook(ctx).Authorization(authorization).Hook(hook).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - hook := *openapiclient.NewHook("Type_example", false, int32(123), []string{"EnvVars_example"}, "Runtime_example", int32(123), map[string]interface{}(123), "Function_example") // Hook | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.CreateHook(context.Background()).Authorization(authorization).Hook(hook).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.CreateHook``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiCreateHookRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - **hook** | [**Hook**](Hook.md) | | - -### Return type - - (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## CreateMapping - -> int32 CreateMapping(ctx).Authorization(authorization).Mapping(mapping).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - mapping := *openapiclient.NewMapping("Name_example", false, "Match_example", int32(123), []openapiclient.Action{*openapiclient.NewAction()}) // Mapping | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.CreateMapping(context.Background()).Authorization(authorization).Mapping(mapping).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.CreateMapping``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `CreateMapping`: int32 - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.CreateMapping`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiCreateMappingRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - **mapping** | [**Mapping**](Mapping.md) | | - -### Return type - -**int32** - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## CreateRiskRule - -> CreateRiskRule(ctx).Authorization(authorization).RiskRule(riskRule).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - riskRule := *openapiclient.NewRiskRule() // RiskRule | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.CreateRiskRule(context.Background()).Authorization(authorization).RiskRule(riskRule).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.CreateRiskRule``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiCreateRiskRuleRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - **riskRule** | [**RiskRule**](RiskRule.md) | | - -### Return type - - (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## CreateRoles - -> []CreateRoles201ResponseInner CreateRoles(ctx).Authorization(authorization).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.CreateRoles(context.Background()).Authorization(authorization).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.CreateRoles``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `CreateRoles`: []CreateRoles201ResponseInner - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.CreateRoles`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiCreateRolesRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - -### Return type - -[**[]CreateRoles201ResponseInner**](CreateRoles201ResponseInner.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## CreateRule - -> RuleId CreateRule(ctx, appId).Authorization(authorization).Rule(rule).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - appId := int32(56) // int32 | - rule := *openapiclient.NewRule() // Rule | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.CreateRule(context.Background(), appId).Authorization(authorization).Rule(rule).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.CreateRule``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `CreateRule`: RuleId - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.CreateRule`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**appId** | **int32** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiCreateRuleRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - - **rule** | [**Rule**](Rule.md) | | - -### Return type - -[**RuleId**](RuleId.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## CreateUser - -> User CreateUser(ctx).Authorization(authorization).User(user).Mappings(mappings).ValidatePolicy(validatePolicy).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - user := *openapiclient.NewUser() // User | - mappings := "mappings_example" // string | Controls how mappings will be applied to the user on creation. Defaults to async. (optional) - validatePolicy := true // bool | Will passwords validate against the User Policy? Defaults to true. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.CreateUser(context.Background()).Authorization(authorization).User(user).Mappings(mappings).ValidatePolicy(validatePolicy).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.CreateUser``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `CreateUser`: User - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.CreateUser`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiCreateUserRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - **user** | [**User**](User.md) | | - **mappings** | **string** | Controls how mappings will be applied to the user on creation. Defaults to async. | - **validatePolicy** | **bool** | Will passwords validate against the User Policy? Defaults to true. | - -### Return type - -[**User**](User.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## DeleteAccessTokenClaim - -> DeleteAccessTokenClaim(ctx, id, claimId).Authorization(authorization).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - id := int32(56) // int32 | - claimId := int32(56) // int32 | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.DeleteAccessTokenClaim(context.Background(), id, claimId).Authorization(authorization).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.DeleteAccessTokenClaim``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**id** | **int32** | | -**claimId** | **int32** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiDeleteAccessTokenClaimRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - - - -### Return type - - (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## DeleteApp - -> DeleteApp(ctx, appId).Authorization(authorization).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - appId := int32(56) // int32 | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.DeleteApp(context.Background(), appId).Authorization(authorization).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.DeleteApp``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**appId** | **int32** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiDeleteAppRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - - -### Return type - - (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## DeleteAppParameter - -> DeleteAppParameter(ctx, appId, parameterId).Authorization(authorization).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - appId := int32(56) // int32 | - parameterId := int32(56) // int32 | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.DeleteAppParameter(context.Background(), appId, parameterId).Authorization(authorization).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.DeleteAppParameter``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**appId** | **int32** | | -**parameterId** | **int32** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiDeleteAppParameterRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - - - -### Return type - - (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## DeleteAuthorizationServer - -> DeleteAuthorizationServer(ctx, id).Authorization(authorization).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - id := int32(56) // int32 | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.DeleteAuthorizationServer(context.Background(), id).Authorization(authorization).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.DeleteAuthorizationServer``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**id** | **int32** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiDeleteAuthorizationServerRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - - -### Return type - - (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## DeleteEnvironmentVariable - -> DeleteEnvironmentVariable(ctx, envvarId).Authorization(authorization).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - envvarId := "envvarId_example" // string | Set to the id of the Hook Environment Variable that you want to fetch. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.DeleteEnvironmentVariable(context.Background(), envvarId).Authorization(authorization).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.DeleteEnvironmentVariable``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**envvarId** | **string** | Set to the id of the Hook Environment Variable that you want to fetch. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiDeleteEnvironmentVariableRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - - -### Return type - - (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## DeleteFactor - -> DeleteFactor(ctx, userId, deviceId).Authorization(authorization).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - userId := int32(56) // int32 | Set to the id of the user. - deviceId := int32(56) // int32 | Set to the device_id of the MFA device. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.DeleteFactor(context.Background(), userId, deviceId).Authorization(authorization).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.DeleteFactor``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**userId** | **int32** | Set to the id of the user. | -**deviceId** | **int32** | Set to the device_id of the MFA device. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiDeleteFactorRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - - - -### Return type - - (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## DeleteHook - -> DeleteHook(ctx, hookId).Authorization(authorization).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - hookId := "hookId_example" // string | Set to the id of the Hook that you want to return. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.DeleteHook(context.Background(), hookId).Authorization(authorization).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.DeleteHook``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**hookId** | **string** | Set to the id of the Hook that you want to return. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiDeleteHookRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - - -### Return type - - (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## DeleteMapping - -> DeleteMapping(ctx, mappingId).Authorization(authorization).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - mappingId := int32(56) // int32 | The id of the user mapping to locate. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.DeleteMapping(context.Background(), mappingId).Authorization(authorization).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.DeleteMapping``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**mappingId** | **int32** | The id of the user mapping to locate. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiDeleteMappingRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - - -### Return type - - (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## DeleteRiskRule - -> RiskRule DeleteRiskRule(ctx, riskRuleId).Authorization(authorization).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - riskRuleId := "riskRuleId_example" // string | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.DeleteRiskRule(context.Background(), riskRuleId).Authorization(authorization).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.DeleteRiskRule``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `DeleteRiskRule`: RiskRule - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.DeleteRiskRule`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**riskRuleId** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiDeleteRiskRuleRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - - -### Return type - -[**RiskRule**](RiskRule.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## DeleteRole - -> DeleteRole(ctx, roleId).Authorization(authorization).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - roleId := int32(56) // int32 | Set to the id of the role you want to return. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.DeleteRole(context.Background(), roleId).Authorization(authorization).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.DeleteRole``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**roleId** | **int32** | Set to the id of the role you want to return. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiDeleteRoleRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - - -### Return type - - (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## DeleteRule - -> DeleteRule(ctx, appId, ruleId).Authorization(authorization).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - appId := int32(56) // int32 | - ruleId := int32(56) // int32 | The id of the app rule to locate. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.DeleteRule(context.Background(), appId, ruleId).Authorization(authorization).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.DeleteRule``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**appId** | **int32** | | -**ruleId** | **int32** | The id of the app rule to locate. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiDeleteRuleRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - - - -### Return type - - (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## DeleteScope - -> DeleteScope(ctx, id, scopeId).Authorization(authorization).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - id := int32(56) // int32 | - scopeId := int32(56) // int32 | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.DeleteScope(context.Background(), id, scopeId).Authorization(authorization).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.DeleteScope``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**id** | **int32** | | -**scopeId** | **int32** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiDeleteScopeRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - - - -### Return type - - (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## DeleteUser - -> DeleteUser(ctx, userId).Authorization(authorization).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - userId := int32(56) // int32 | Set to the id of the user that you want to return. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.DeleteUser(context.Background(), userId).Authorization(authorization).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.DeleteUser``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**userId** | **int32** | Set to the id of the user that you want to return. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiDeleteUserRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - - -### Return type - - (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## DryRunMapping - -> []map[string]interface{} DryRunMapping(ctx, mappingId).Authorization(authorization).RequestBody(requestBody).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - mappingId := int32(56) // int32 | The id of the user mapping to locate. - requestBody := []int32{int32(123)} // []int32 | Request body is a list of user IDs tested against the mapping conditions to verify that the mapping would be applied - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.DryRunMapping(context.Background(), mappingId).Authorization(authorization).RequestBody(requestBody).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.DryRunMapping``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `DryRunMapping`: []map[string]interface{} - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.DryRunMapping`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**mappingId** | **int32** | The id of the user mapping to locate. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiDryRunMappingRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - - **requestBody** | **[]int32** | Request body is a list of user IDs tested against the mapping conditions to verify that the mapping would be applied | - -### Return type - -**[]map[string]interface{}** - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## EnrollFactor - -> [][]FactorInner EnrollFactor(ctx, userId).Authorization(authorization).EnrollFactorRequest(enrollFactorRequest).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - userId := int32(56) // int32 | Set to the id of the user. - enrollFactorRequest := *openapiclient.NewEnrollFactorRequest(int32(123), "DisplayName_example") // EnrollFactorRequest | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.EnrollFactor(context.Background(), userId).Authorization(authorization).EnrollFactorRequest(enrollFactorRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.EnrollFactor``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `EnrollFactor`: [][]FactorInner - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.EnrollFactor`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**userId** | **int32** | Set to the id of the user. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiEnrollFactorRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - - **enrollFactorRequest** | [**EnrollFactorRequest**](EnrollFactorRequest.md) | | - -### Return type - -[**[][]FactorInner**](array.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GenerateMfaToken - -> GenerateMfaToken200Response GenerateMfaToken(ctx).Authorization(authorization).GenerateMfaTokenRequest(generateMfaTokenRequest).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - generateMfaTokenRequest := *openapiclient.NewGenerateMfaTokenRequest() // GenerateMfaTokenRequest | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.GenerateMfaToken(context.Background()).Authorization(authorization).GenerateMfaTokenRequest(generateMfaTokenRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GenerateMfaToken``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GenerateMfaToken`: GenerateMfaToken200Response - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.GenerateMfaToken`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiGenerateMfaTokenRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - **generateMfaTokenRequest** | [**GenerateMfaTokenRequest**](GenerateMfaTokenRequest.md) | | - -### Return type - -[**GenerateMfaToken200Response**](GenerateMfaToken200Response.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GenerateSamlAssertion - -> GenerateSamlAssertion(ctx).Authorization(authorization).GenerateSamlAssertionRequest(generateSamlAssertionRequest).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - generateSamlAssertionRequest := *openapiclient.NewGenerateSamlAssertionRequest("UsernameOrEmail_example", "Password_example", "AppId_example", "Subdomain_example") // GenerateSamlAssertionRequest | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.GenerateSamlAssertion(context.Background()).Authorization(authorization).GenerateSamlAssertionRequest(generateSamlAssertionRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GenerateSamlAssertion``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiGenerateSamlAssertionRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - **generateSamlAssertionRequest** | [**GenerateSamlAssertionRequest**](GenerateSamlAssertionRequest.md) | | - -### Return type - - (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GenerateToken - -> GenerateToken200Response GenerateToken(ctx).Authorization(authorization).GenerateTokenRequest(generateTokenRequest).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - generateTokenRequest := *openapiclient.NewGenerateTokenRequest() // GenerateTokenRequest | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.GenerateToken(context.Background()).Authorization(authorization).GenerateTokenRequest(generateTokenRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GenerateToken``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GenerateToken`: GenerateToken200Response - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.GenerateToken`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiGenerateTokenRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - **generateTokenRequest** | [**GenerateTokenRequest**](GenerateTokenRequest.md) | | - -### Return type - -[**GenerateToken200Response**](GenerateToken200Response.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetApp - -> Schema GetApp(ctx, appId).Authorization(authorization).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - appId := int32(56) // int32 | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.GetApp(context.Background(), appId).Authorization(authorization).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GetApp``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetApp`: Schema - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.GetApp`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**appId** | **int32** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetAppRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - - -### Return type - -[**Schema**](Schema.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetAuthorizationServer - -> GetAuthorizationServer200Response GetAuthorizationServer(ctx, id).Authorization(authorization).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - id := int32(56) // int32 | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.GetAuthorizationServer(context.Background(), id).Authorization(authorization).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GetAuthorizationServer``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetAuthorizationServer`: GetAuthorizationServer200Response - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.GetAuthorizationServer`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**id** | **int32** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetAuthorizationServerRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - - -### Return type - -[**GetAuthorizationServer200Response**](GetAuthorizationServer200Response.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetAvailableFactors - -> []GetAvailableFactors200ResponseInner GetAvailableFactors(ctx, userId).Authorization(authorization).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - userId := int32(56) // int32 | Set to the id of the user. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.GetAvailableFactors(context.Background(), userId).Authorization(authorization).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GetAvailableFactors``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetAvailableFactors`: []GetAvailableFactors200ResponseInner - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.GetAvailableFactors`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**userId** | **int32** | Set to the id of the user. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetAvailableFactorsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - - -### Return type - -[**[]GetAvailableFactors200ResponseInner**](GetAvailableFactors200ResponseInner.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetClientApps - -> []GetClientApps200ResponseInner GetClientApps(ctx, id).Authorization(authorization).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - id := int32(56) // int32 | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.GetClientApps(context.Background(), id).Authorization(authorization).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GetClientApps``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetClientApps`: []GetClientApps200ResponseInner - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.GetClientApps`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**id** | **int32** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetClientAppsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - - -### Return type - -[**[]GetClientApps200ResponseInner**](GetClientApps200ResponseInner.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetEnrolledFactors - -> []Device GetEnrolledFactors(ctx, userId).Authorization(authorization).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - userId := int32(56) // int32 | Set to the id of the user. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.GetEnrolledFactors(context.Background(), userId).Authorization(authorization).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GetEnrolledFactors``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetEnrolledFactors`: []Device - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.GetEnrolledFactors`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**userId** | **int32** | Set to the id of the user. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetEnrolledFactorsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - - -### Return type - -[**[]Device**](Device.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetEnvironmentVariable - -> Envvar GetEnvironmentVariable(ctx, envvarId).Authorization(authorization).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - envvarId := "envvarId_example" // string | Set to the id of the Hook Environment Variable that you want to fetch. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.GetEnvironmentVariable(context.Background(), envvarId).Authorization(authorization).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GetEnvironmentVariable``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetEnvironmentVariable`: Envvar - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.GetEnvironmentVariable`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**envvarId** | **string** | Set to the id of the Hook Environment Variable that you want to fetch. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetEnvironmentVariableRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - - -### Return type - -[**Envvar**](Envvar.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetHook - -> Hook GetHook(ctx, hookId).Authorization(authorization).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - hookId := "hookId_example" // string | Set to the id of the Hook that you want to return. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.GetHook(context.Background(), hookId).Authorization(authorization).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GetHook``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetHook`: Hook - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.GetHook`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**hookId** | **string** | Set to the id of the Hook that you want to return. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetHookRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - - -### Return type - -[**Hook**](Hook.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetLogs - -> []Log GetLogs(ctx, hookId).Authorization(authorization).Limit(limit).Page(page).Cursor(cursor).RequestId(requestId).CorrelationId(correlationId).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - hookId := "hookId_example" // string | Set to the id of the Hook that you want to return. - limit := int32(56) // int32 | The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. (optional) - page := int32(56) // int32 | The page number of results to return. (optional) - cursor := "cursor_example" // string | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. (optional) - requestId := "requestId_example" // string | Returns logs that contain this request_id. (optional) - correlationId := "correlationId_example" // string | Returns logs that contain this correlation_id. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.GetLogs(context.Background(), hookId).Authorization(authorization).Limit(limit).Page(page).Cursor(cursor).RequestId(requestId).CorrelationId(correlationId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GetLogs``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetLogs`: []Log - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.GetLogs`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**hookId** | **string** | Set to the id of the Hook that you want to return. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetLogsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - - **limit** | **int32** | The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. | - **page** | **int32** | The page number of results to return. | - **cursor** | **string** | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. | - **requestId** | **string** | Returns logs that contain this request_id. | - **correlationId** | **string** | Returns logs that contain this correlation_id. | - -### Return type - -[**[]Log**](Log.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetMapping - -> Mapping GetMapping(ctx, mappingId).Authorization(authorization).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - mappingId := int32(56) // int32 | The id of the user mapping to locate. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.GetMapping(context.Background(), mappingId).Authorization(authorization).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GetMapping``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetMapping`: Mapping - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.GetMapping`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**mappingId** | **int32** | The id of the user mapping to locate. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetMappingRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - - -### Return type - -[**Mapping**](Mapping.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetRateLimit - -> GetRateLimit200Response GetRateLimit(ctx).Authorization(authorization).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.GetRateLimit(context.Background()).Authorization(authorization).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GetRateLimit``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetRateLimit`: GetRateLimit200Response - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.GetRateLimit`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetRateLimitRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - -### Return type - -[**GetRateLimit200Response**](GetRateLimit200Response.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetRiskRule - -> GetRiskRule(ctx, riskRuleId).Authorization(authorization).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - riskRuleId := "riskRuleId_example" // string | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.GetRiskRule(context.Background(), riskRuleId).Authorization(authorization).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GetRiskRule``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**riskRuleId** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetRiskRuleRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - - -### Return type - - (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetRiskScore - -> GetRiskScore200Response GetRiskScore(ctx).Authorization(authorization).GetRiskScoreRequest(getRiskScoreRequest).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - getRiskScoreRequest := *openapiclient.NewGetRiskScoreRequest("Ip_example", "UserAgent_example", *openapiclient.NewRiskUser("Id_example")) // GetRiskScoreRequest | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.GetRiskScore(context.Background()).Authorization(authorization).GetRiskScoreRequest(getRiskScoreRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GetRiskScore``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetRiskScore`: GetRiskScore200Response - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.GetRiskScore`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetRiskScoreRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - **getRiskScoreRequest** | [**GetRiskScoreRequest**](GetRiskScoreRequest.md) | | - -### Return type - -[**GetRiskScore200Response**](GetRiskScore200Response.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetRole - -> Role GetRole(ctx, roleId).Authorization(authorization).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - roleId := int32(56) // int32 | Set to the id of the role you want to return. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.GetRole(context.Background(), roleId).Authorization(authorization).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GetRole``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetRole`: Role - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.GetRole`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**roleId** | **int32** | Set to the id of the role you want to return. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetRoleRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - - -### Return type - -[**Role**](Role.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetRoleAdmins - -> []Schema1 GetRoleAdmins(ctx, roleId).Authorization(authorization).Limit(limit).Page(page).Cursor(cursor).Name(name).IncludeUnassigned(includeUnassigned).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - roleId := int32(56) // int32 | Set to the id of the role you want to return. - limit := int32(56) // int32 | The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. (optional) - page := int32(56) // int32 | The page number of results to return. (optional) - cursor := "cursor_example" // string | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. (optional) - name := "name_example" // string | Allows you to filter on first name, last name, username, and email address. (optional) - includeUnassigned := true // bool | Optional. Defaults to false. Include users that aren’t assigned to the role. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.GetRoleAdmins(context.Background(), roleId).Authorization(authorization).Limit(limit).Page(page).Cursor(cursor).Name(name).IncludeUnassigned(includeUnassigned).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GetRoleAdmins``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetRoleAdmins`: []Schema1 - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.GetRoleAdmins`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**roleId** | **int32** | Set to the id of the role you want to return. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetRoleAdminsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - - **limit** | **int32** | The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. | - **page** | **int32** | The page number of results to return. | - **cursor** | **string** | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. | - **name** | **string** | Allows you to filter on first name, last name, username, and email address. | - **includeUnassigned** | **bool** | Optional. Defaults to false. Include users that aren’t assigned to the role. | - -### Return type - -[**[]Schema1**](Schema1.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: applcation/json, application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetRoleApps - -> []Schema GetRoleApps(ctx, roleId).Authorization(authorization).Limit(limit).Page(page).Cursor(cursor).Assigned(assigned).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - roleId := int32(56) // int32 | Set to the id of the role you want to return. - limit := int32(56) // int32 | The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. (optional) - page := int32(56) // int32 | The page number of results to return. (optional) - cursor := "cursor_example" // string | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. (optional) - assigned := true // bool | Optional. Defaults to true. Returns all apps not yet assigned to the role. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.GetRoleApps(context.Background(), roleId).Authorization(authorization).Limit(limit).Page(page).Cursor(cursor).Assigned(assigned).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GetRoleApps``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetRoleApps`: []Schema - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.GetRoleApps`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**roleId** | **int32** | Set to the id of the role you want to return. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetRoleAppsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - - **limit** | **int32** | The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. | - **page** | **int32** | The page number of results to return. | - **cursor** | **string** | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. | - **assigned** | **bool** | Optional. Defaults to true. Returns all apps not yet assigned to the role. | - -### Return type - -[**[]Schema**](Schema.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: applcation/json, application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetRoleUsers - -> []Schema1 GetRoleUsers(ctx, roleId).Authorization(authorization).Limit(limit).Page(page).Cursor(cursor).Name(name).IncludeUnassigned(includeUnassigned).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - roleId := int32(56) // int32 | Set to the id of the role you want to return. - limit := int32(56) // int32 | The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. (optional) - page := int32(56) // int32 | The page number of results to return. (optional) - cursor := "cursor_example" // string | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. (optional) - name := "name_example" // string | Allows you to filter on first name, last name, username, and email address. (optional) - includeUnassigned := true // bool | Optional. Defaults to false. Include users that aren’t assigned to the role. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.GetRoleUsers(context.Background(), roleId).Authorization(authorization).Limit(limit).Page(page).Cursor(cursor).Name(name).IncludeUnassigned(includeUnassigned).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GetRoleUsers``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetRoleUsers`: []Schema1 - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.GetRoleUsers`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**roleId** | **int32** | Set to the id of the role you want to return. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetRoleUsersRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - - **limit** | **int32** | The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. | - **page** | **int32** | The page number of results to return. | - **cursor** | **string** | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. | - **name** | **string** | Allows you to filter on first name, last name, username, and email address. | - **includeUnassigned** | **bool** | Optional. Defaults to false. Include users that aren’t assigned to the role. | - -### Return type - -[**[]Schema1**](Schema1.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: applcation/json, application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetRule - -> Rule GetRule(ctx, appId, ruleId).Authorization(authorization).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - appId := int32(56) // int32 | - ruleId := int32(56) // int32 | The id of the app rule to locate. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.GetRule(context.Background(), appId, ruleId).Authorization(authorization).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GetRule``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetRule`: Rule - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.GetRule`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**appId** | **int32** | | -**ruleId** | **int32** | The id of the app rule to locate. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetRuleRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - - - -### Return type - -[**Rule**](Rule.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetScoreInsights - -> GetScoreInsights200Response GetScoreInsights(ctx).Authorization(authorization).Before(before).After(after).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - before := "before_example" // string | Optional ISO8601 formatted date string. Defaults to current date. Maximum date is 90 days ago. (optional) - after := "after_example" // string | Optional ISO8601 formatted date string. Defaults to 30 days ago. Maximum date is 90 days ago. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.GetScoreInsights(context.Background()).Authorization(authorization).Before(before).After(after).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GetScoreInsights``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetScoreInsights`: GetScoreInsights200Response - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.GetScoreInsights`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetScoreInsightsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - **before** | **string** | Optional ISO8601 formatted date string. Defaults to current date. Maximum date is 90 days ago. | - **after** | **string** | Optional ISO8601 formatted date string. Defaults to 30 days ago. Maximum date is 90 days ago. | - -### Return type - -[**GetScoreInsights200Response**](GetScoreInsights200Response.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetUser - -> User GetUser(ctx, userId).Authorization(authorization).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - userId := int32(56) // int32 | Set to the id of the user that you want to return. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.GetUser(context.Background(), userId).Authorization(authorization).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GetUser``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetUser`: User - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.GetUser`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**userId** | **int32** | Set to the id of the user that you want to return. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetUserRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - - -### Return type - -[**User**](User.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetUserApps - -> []GetUserApps200ResponseInner GetUserApps(ctx, userId).Authorization(authorization).IgnoreVisibility(ignoreVisibility).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - userId := int32(56) // int32 | Set to the id of the user that you want to return. - ignoreVisibility := true // bool | Defaults to `false`. When `true` will show all apps that are assigned to a user regardless of their portal visibility setting. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.GetUserApps(context.Background(), userId).Authorization(authorization).IgnoreVisibility(ignoreVisibility).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GetUserApps``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetUserApps`: []GetUserApps200ResponseInner - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.GetUserApps`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**userId** | **int32** | Set to the id of the user that you want to return. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetUserAppsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - - **ignoreVisibility** | **bool** | Defaults to `false`. When `true` will show all apps that are assigned to a user regardless of their portal visibility setting. | - -### Return type - -[**[]GetUserApps200ResponseInner**](GetUserApps200ResponseInner.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## ListAccessTokenClaims - -> []ListAccessTokenClaims200ResponseInner ListAccessTokenClaims(ctx, id).Authorization(authorization).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - id := int32(56) // int32 | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.ListAccessTokenClaims(context.Background(), id).Authorization(authorization).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.ListAccessTokenClaims``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ListAccessTokenClaims`: []ListAccessTokenClaims200ResponseInner - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.ListAccessTokenClaims`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**id** | **int32** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiListAccessTokenClaimsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - - -### Return type - -[**[]ListAccessTokenClaims200ResponseInner**](ListAccessTokenClaims200ResponseInner.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## ListActionValues - -> []ListConditionValues200ResponseInner ListActionValues(ctx, appId, actionValue).Authorization(authorization).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - appId := int32(56) // int32 | - actionValue := "actionValue_example" // string | The value for the selected action. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.ListActionValues(context.Background(), appId, actionValue).Authorization(authorization).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.ListActionValues``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ListActionValues`: []ListConditionValues200ResponseInner - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.ListActionValues`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**appId** | **int32** | | -**actionValue** | **string** | The value for the selected action. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiListActionValuesRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - - - -### Return type - -[**[]ListConditionValues200ResponseInner**](ListConditionValues200ResponseInner.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## ListActions - -> []ListActions200ResponseInner ListActions(ctx, appId).Authorization(authorization).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - appId := int32(56) // int32 | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.ListActions(context.Background(), appId).Authorization(authorization).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.ListActions``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ListActions`: []ListActions200ResponseInner - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.ListActions`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**appId** | **int32** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiListActionsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - - -### Return type - -[**[]ListActions200ResponseInner**](ListActions200ResponseInner.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## ListAppUsers - -> []ListAppUsers200ResponseInner ListAppUsers(ctx, appId).Authorization(authorization).Limit(limit).Page(page).Cursor(cursor).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - appId := int32(56) // int32 | - limit := int32(56) // int32 | The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. (optional) - page := int32(56) // int32 | The page number of results to return. (optional) - cursor := "cursor_example" // string | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.ListAppUsers(context.Background(), appId).Authorization(authorization).Limit(limit).Page(page).Cursor(cursor).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.ListAppUsers``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ListAppUsers`: []ListAppUsers200ResponseInner - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.ListAppUsers`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**appId** | **int32** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiListAppUsersRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - - **limit** | **int32** | The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. | - **page** | **int32** | The page number of results to return. | - **cursor** | **string** | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. | - -### Return type - -[**[]ListAppUsers200ResponseInner**](ListAppUsers200ResponseInner.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## ListApps - -> []Schema ListApps(ctx).Authorization(authorization).Limit(limit).Page(page).Cursor(cursor).Name(name).ConnectorId(connectorId).AuthMethod(authMethod).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - limit := int32(56) // int32 | The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. (optional) - page := int32(56) // int32 | The page number of results to return. (optional) - cursor := "cursor_example" // string | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. (optional) - name := "name_example" // string | The name or partial name of the app to search for. When using a partial name you must append a wildcard `*` (optional) - connectorId := int32(56) // int32 | Returns all apps based off a specific connector. See List Connectors for a complete list of Connector IDs. (optional) - authMethod := openapiclient.auth_method(0) // AuthMethod | Returns all apps based of a given type. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.ListApps(context.Background()).Authorization(authorization).Limit(limit).Page(page).Cursor(cursor).Name(name).ConnectorId(connectorId).AuthMethod(authMethod).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.ListApps``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ListApps`: []Schema - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.ListApps`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiListAppsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - **limit** | **int32** | The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. | - **page** | **int32** | The page number of results to return. | - **cursor** | **string** | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. | - **name** | **string** | The name or partial name of the app to search for. When using a partial name you must append a wildcard `*` | - **connectorId** | **int32** | Returns all apps based off a specific connector. See List Connectors for a complete list of Connector IDs. | - **authMethod** | [**AuthMethod**](AuthMethod.md) | Returns all apps based of a given type. | - -### Return type - -[**[]Schema**](Schema.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## ListAuthorizationServers - -> []ListAuthorizationServers200ResponseInner ListAuthorizationServers(ctx).Authorization(authorization).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.ListAuthorizationServers(context.Background()).Authorization(authorization).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.ListAuthorizationServers``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ListAuthorizationServers`: []ListAuthorizationServers200ResponseInner - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.ListAuthorizationServers`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiListAuthorizationServersRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - -### Return type - -[**[]ListAuthorizationServers200ResponseInner**](ListAuthorizationServers200ResponseInner.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## ListConditionOperators - -> []ListConditionOperators200ResponseInner ListConditionOperators(ctx, appId, conditionValue).Authorization(authorization).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - appId := int32(56) // int32 | - conditionValue := "conditionValue_example" // string | The value for the selected condition. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.ListConditionOperators(context.Background(), appId, conditionValue).Authorization(authorization).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.ListConditionOperators``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ListConditionOperators`: []ListConditionOperators200ResponseInner - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.ListConditionOperators`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**appId** | **int32** | | -**conditionValue** | **string** | The value for the selected condition. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiListConditionOperatorsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - - - -### Return type - -[**[]ListConditionOperators200ResponseInner**](ListConditionOperators200ResponseInner.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## ListConditionValues - -> []ListConditionValues200ResponseInner ListConditionValues(ctx, appId, conditionValue).Authorization(authorization).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - appId := int32(56) // int32 | - conditionValue := "conditionValue_example" // string | The value for the selected condition. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.ListConditionValues(context.Background(), appId, conditionValue).Authorization(authorization).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.ListConditionValues``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ListConditionValues`: []ListConditionValues200ResponseInner - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.ListConditionValues`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**appId** | **int32** | | -**conditionValue** | **string** | The value for the selected condition. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiListConditionValuesRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - - - -### Return type - -[**[]ListConditionValues200ResponseInner**](ListConditionValues200ResponseInner.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## ListConditions - -> []ListConditions200ResponseInner ListConditions(ctx, appId).Authorization(authorization).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - appId := int32(56) // int32 | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.ListConditions(context.Background(), appId).Authorization(authorization).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.ListConditions``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ListConditions`: []ListConditions200ResponseInner - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.ListConditions`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**appId** | **int32** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiListConditionsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - - -### Return type - -[**[]ListConditions200ResponseInner**](ListConditions200ResponseInner.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## ListConnectors - -> []Connector ListConnectors(ctx).Authorization(authorization).Limit(limit).Page(page).Cursor(cursor).Name(name).AuthMethod(authMethod).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - limit := int32(56) // int32 | The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. (optional) - page := int32(56) // int32 | The page number of results to return. (optional) - cursor := "cursor_example" // string | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. (optional) - name := "name_example" // string | The name or partial name of the connector to search for. When using a partial name you must append a wildcard `*` (optional) - authMethod := openapiclient.auth_method(0) // AuthMethod | Returns all connectors of a given type. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.ListConnectors(context.Background()).Authorization(authorization).Limit(limit).Page(page).Cursor(cursor).Name(name).AuthMethod(authMethod).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.ListConnectors``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ListConnectors`: []Connector - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.ListConnectors`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiListConnectorsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - **limit** | **int32** | The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. | - **page** | **int32** | The page number of results to return. | - **cursor** | **string** | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. | - **name** | **string** | The name or partial name of the connector to search for. When using a partial name you must append a wildcard `*` | - **authMethod** | [**AuthMethod**](AuthMethod.md) | Returns all connectors of a given type. | - -### Return type - -[**[]Connector**](Connector.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## ListEnvironmentVariables - -> []Envvar ListEnvironmentVariables(ctx).Authorization(authorization).Limit(limit).Page(page).Cursor(cursor).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - limit := int32(56) // int32 | The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. (optional) - page := int32(56) // int32 | The page number of results to return. (optional) - cursor := "cursor_example" // string | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.ListEnvironmentVariables(context.Background()).Authorization(authorization).Limit(limit).Page(page).Cursor(cursor).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.ListEnvironmentVariables``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ListEnvironmentVariables`: []Envvar - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.ListEnvironmentVariables`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiListEnvironmentVariablesRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - **limit** | **int32** | The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. | - **page** | **int32** | The page number of results to return. | - **cursor** | **string** | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. | - -### Return type - -[**[]Envvar**](Envvar.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## ListHooks - -> []Hook ListHooks(ctx).Authorization(authorization).Limit(limit).Page(page).Cursor(cursor).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - limit := int32(56) // int32 | The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. (optional) - page := int32(56) // int32 | The page number of results to return. (optional) - cursor := "cursor_example" // string | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.ListHooks(context.Background()).Authorization(authorization).Limit(limit).Page(page).Cursor(cursor).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.ListHooks``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ListHooks`: []Hook - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.ListHooks`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiListHooksRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - **limit** | **int32** | The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. | - **page** | **int32** | The page number of results to return. | - **cursor** | **string** | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. | - -### Return type - -[**[]Hook**](Hook.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## ListMappingActionValues - -> []ListConditionValues200ResponseInner ListMappingActionValues(ctx, actionValue).Authorization(authorization).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - actionValue := "actionValue_example" // string | The value for the selected action. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.ListMappingActionValues(context.Background(), actionValue).Authorization(authorization).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.ListMappingActionValues``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ListMappingActionValues`: []ListConditionValues200ResponseInner - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.ListMappingActionValues`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**actionValue** | **string** | The value for the selected action. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiListMappingActionValuesRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - - -### Return type - -[**[]ListConditionValues200ResponseInner**](ListConditionValues200ResponseInner.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## ListMappingActions - -> []ListActions200ResponseInner ListMappingActions(ctx).Authorization(authorization).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.ListMappingActions(context.Background()).Authorization(authorization).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.ListMappingActions``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ListMappingActions`: []ListActions200ResponseInner - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.ListMappingActions`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiListMappingActionsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - -### Return type - -[**[]ListActions200ResponseInner**](ListActions200ResponseInner.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## ListMappingConditionOperators - -> []ListMappingConditionOperators200ResponseInner ListMappingConditionOperators(ctx, conditionValue).Authorization(authorization).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - conditionValue := "conditionValue_example" // string | The value for the selected condition. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.ListMappingConditionOperators(context.Background(), conditionValue).Authorization(authorization).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.ListMappingConditionOperators``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ListMappingConditionOperators`: []ListMappingConditionOperators200ResponseInner - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.ListMappingConditionOperators`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**conditionValue** | **string** | The value for the selected condition. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiListMappingConditionOperatorsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - - -### Return type - -[**[]ListMappingConditionOperators200ResponseInner**](ListMappingConditionOperators200ResponseInner.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## ListMappingConditionValues - -> []ListConditionValues200ResponseInner ListMappingConditionValues(ctx, conditionValue).Authorization(authorization).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - conditionValue := "conditionValue_example" // string | The value for the selected condition. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.ListMappingConditionValues(context.Background(), conditionValue).Authorization(authorization).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.ListMappingConditionValues``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ListMappingConditionValues`: []ListConditionValues200ResponseInner - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.ListMappingConditionValues`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**conditionValue** | **string** | The value for the selected condition. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiListMappingConditionValuesRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - - -### Return type - -[**[]ListConditionValues200ResponseInner**](ListConditionValues200ResponseInner.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## ListMappingConditions - -> []ListMappingConditions200ResponseInner ListMappingConditions(ctx).Authorization(authorization).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.ListMappingConditions(context.Background()).Authorization(authorization).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.ListMappingConditions``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ListMappingConditions`: []ListMappingConditions200ResponseInner - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.ListMappingConditions`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiListMappingConditionsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - -### Return type - -[**[]ListMappingConditions200ResponseInner**](ListMappingConditions200ResponseInner.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## ListMappings - -> []Mapping ListMappings(ctx).Authorization(authorization).Enabled(enabled).HasCondition(hasCondition).HasConditionType(hasConditionType).HasAction(hasAction).HasActionType(hasActionType).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - enabled := true // bool | Defaults to true. When set to `false` will return all disabled mappings. (optional) (default to true) - hasCondition := "has_condition=has_role:123456,status:1" // string | Filters Mappings based on their Conditions. (optional) - hasConditionType := "hasConditionType_example" // string | Filters Mappings based on their condition types. (optional) - hasAction := "has_action=set_groups:123456,set_usertype:*" // string | Filters Mappings based on their Actions. (optional) - hasActionType := "hasActionType_example" // string | Filters Mappings based on their action types. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.ListMappings(context.Background()).Authorization(authorization).Enabled(enabled).HasCondition(hasCondition).HasConditionType(hasConditionType).HasAction(hasAction).HasActionType(hasActionType).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.ListMappings``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ListMappings`: []Mapping - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.ListMappings`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiListMappingsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - **enabled** | **bool** | Defaults to true. When set to `false` will return all disabled mappings. | [default to true] - **hasCondition** | **string** | Filters Mappings based on their Conditions. | - **hasConditionType** | **string** | Filters Mappings based on their condition types. | - **hasAction** | **string** | Filters Mappings based on their Actions. | - **hasActionType** | **string** | Filters Mappings based on their action types. | - -### Return type - -[**[]Mapping**](Mapping.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## ListRiskRules - -> ListRiskRules(ctx).Authorization(authorization).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.ListRiskRules(context.Background()).Authorization(authorization).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.ListRiskRules``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiListRiskRulesRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - -### Return type - - (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## ListRoles - -> []Role ListRoles(ctx).Authorization(authorization).Limit(limit).Page(page).Cursor(cursor).Name(name).AppId(appId).Fields(fields).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - limit := int32(56) // int32 | The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. (optional) - page := int32(56) // int32 | The page number of results to return. (optional) - cursor := "cursor_example" // string | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. (optional) - name := "name_example" // string | Optional. Filters by role name. (optional) - appId := "appId_example" // string | Optional. Returns roles that contain this app name. (optional) - fields := "fields_example" // string | Optional. Comma delimited list of fields to return. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.ListRoles(context.Background()).Authorization(authorization).Limit(limit).Page(page).Cursor(cursor).Name(name).AppId(appId).Fields(fields).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.ListRoles``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ListRoles`: []Role - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.ListRoles`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiListRolesRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - **limit** | **int32** | The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. | - **page** | **int32** | The page number of results to return. | - **cursor** | **string** | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. | - **name** | **string** | Optional. Filters by role name. | - **appId** | **string** | Optional. Returns roles that contain this app name. | - **fields** | **string** | Optional. Comma delimited list of fields to return. | - -### Return type - -[**[]Role**](Role.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## ListRules - -> []Rule ListRules(ctx, appId).Authorization(authorization).Enabled(enabled).HasCondition(hasCondition).HasConditionType(hasConditionType).HasAction(hasAction).HasActionType(hasActionType).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - appId := int32(56) // int32 | - enabled := true // bool | Defaults to true. When set to `false` will return all disabled rules. (optional) - hasCondition := "hasCondition_example" // string | Filters Rules based on their Conditions. (optional) - hasConditionType := "hasConditionType_example" // string | Filters Rules based on their condition types. (optional) - hasAction := "hasAction_example" // string | Filters Rules based on their Actions. (optional) - hasActionType := "hasActionType_example" // string | Filters Rules based on their action types. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.ListRules(context.Background(), appId).Authorization(authorization).Enabled(enabled).HasCondition(hasCondition).HasConditionType(hasConditionType).HasAction(hasAction).HasActionType(hasActionType).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.ListRules``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ListRules`: []Rule - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.ListRules`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**appId** | **int32** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiListRulesRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - - **enabled** | **bool** | Defaults to true. When set to `false` will return all disabled rules. | - **hasCondition** | **string** | Filters Rules based on their Conditions. | - **hasConditionType** | **string** | Filters Rules based on their condition types. | - **hasAction** | **string** | Filters Rules based on their Actions. | - **hasActionType** | **string** | Filters Rules based on their action types. | - -### Return type - -[**[]Rule**](Rule.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## ListScopes - -> []ListScopes200ResponseInner ListScopes(ctx, id).Authorization(authorization).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - id := int32(56) // int32 | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.ListScopes(context.Background(), id).Authorization(authorization).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.ListScopes``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ListScopes`: []ListScopes200ResponseInner - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.ListScopes`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**id** | **int32** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiListScopesRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - - -### Return type - -[**[]ListScopes200ResponseInner**](ListScopes200ResponseInner.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## ListUsers - -> []User ListUsers(ctx).Authorization(authorization).Limit(limit).Page(page).Cursor(cursor).CreatedSince(createdSince).CreatedUntil(createdUntil).UpdatedSince(updatedSince).UpdatedUntil(updatedUntil).LastLoginSince(lastLoginSince).LastLoginUntil(lastLoginUntil).Firstname(firstname).Lastname(lastname).Email(email).Username(username).Samaccountname(samaccountname).DirectoryId(directoryId).ExternalId(externalId).AppId(appId).UserIds(userIds).CustomAttributesAttributeName(customAttributesAttributeName).Fields(fields).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - limit := int32(56) // int32 | The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. (optional) - page := int32(56) // int32 | The page number of results to return. (optional) - cursor := "cursor_example" // string | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. (optional) - createdSince := "createdSince_example" // string | An ISO8601 timestamp value that returns all users created after a given date & time. (optional) - createdUntil := "createdUntil_example" // string | An ISO8601 timestamp value that returns all users created before a given date & time. (optional) - updatedSince := "updatedSince_example" // string | An ISO8601 timestamp value that returns all users updated after a given date & time. (optional) - updatedUntil := "updatedUntil_example" // string | An ISO8601 timestamp value that returns all users updated before a given date & time. (optional) - lastLoginSince := "lastLoginSince_example" // string | An ISO8601 timestamp value that returns all users that logged in after a given date & time. (optional) - lastLoginUntil := "lastLoginUntil_example" // string | (optional) - firstname := "firstname_example" // string | The first name of the user (optional) - lastname := "lastname_example" // string | The last name of the user (optional) - email := "email_example" // string | The email address of the user (optional) - username := "username_example" // string | The username for the user (optional) - samaccountname := "samaccountname_example" // string | The AD login name for the user (optional) - directoryId := "directoryId_example" // string | The ID in OneLogin of the Directory that the user belongs to (optional) - externalId := "externalId_example" // string | An external identifier that has been set on the user (optional) - appId := "appId_example" // string | The ID of a OneLogin Application (optional) - userIds := "userIds_example" // string | A comma separated list of OneLogin User IDs (optional) - customAttributesAttributeName := "customAttributesAttributeName_example" // string | The short name of a custom attribute. Note that the attribute name is prefixed with custom_attributes. (optional) - fields := "fields_example" // string | A comma separated list user attributes to return. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.ListUsers(context.Background()).Authorization(authorization).Limit(limit).Page(page).Cursor(cursor).CreatedSince(createdSince).CreatedUntil(createdUntil).UpdatedSince(updatedSince).UpdatedUntil(updatedUntil).LastLoginSince(lastLoginSince).LastLoginUntil(lastLoginUntil).Firstname(firstname).Lastname(lastname).Email(email).Username(username).Samaccountname(samaccountname).DirectoryId(directoryId).ExternalId(externalId).AppId(appId).UserIds(userIds).CustomAttributesAttributeName(customAttributesAttributeName).Fields(fields).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.ListUsers``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ListUsers`: []User - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.ListUsers`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiListUsersRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - **limit** | **int32** | The total number of items returned per page. The maximum limit varies between endpoints, see the relevant endpoint documentation for the specific limit. | - **page** | **int32** | The page number of results to return. | - **cursor** | **string** | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. | - **createdSince** | **string** | An ISO8601 timestamp value that returns all users created after a given date & time. | - **createdUntil** | **string** | An ISO8601 timestamp value that returns all users created before a given date & time. | - **updatedSince** | **string** | An ISO8601 timestamp value that returns all users updated after a given date & time. | - **updatedUntil** | **string** | An ISO8601 timestamp value that returns all users updated before a given date & time. | - **lastLoginSince** | **string** | An ISO8601 timestamp value that returns all users that logged in after a given date & time. | - **lastLoginUntil** | **string** | | - **firstname** | **string** | The first name of the user | - **lastname** | **string** | The last name of the user | - **email** | **string** | The email address of the user | - **username** | **string** | The username for the user | - **samaccountname** | **string** | The AD login name for the user | - **directoryId** | **string** | The ID in OneLogin of the Directory that the user belongs to | - **externalId** | **string** | An external identifier that has been set on the user | - **appId** | **string** | The ID of a OneLogin Application | - **userIds** | **string** | A comma separated list of OneLogin User IDs | - **customAttributesAttributeName** | **string** | The short name of a custom attribute. Note that the attribute name is prefixed with custom_attributes. | - **fields** | **string** | A comma separated list user attributes to return. | - -### Return type - -[**[]User**](User.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## RemoveClientApp - -> RemoveClientApp(ctx, id, clientAppId).Authorization(authorization).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - id := int32(56) // int32 | - clientAppId := int32(56) // int32 | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.RemoveClientApp(context.Background(), id, clientAppId).Authorization(authorization).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.RemoveClientApp``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**id** | **int32** | | -**clientAppId** | **int32** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiRemoveClientAppRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - - - -### Return type - - (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## RemoveRoleAdmins - -> RemoveRoleAdmins(ctx, roleId).Authorization(authorization).RemoveRoleUsersRequest(removeRoleUsersRequest).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - roleId := int32(56) // int32 | Set to the id of the role you want to return. - removeRoleUsersRequest := *openapiclient.NewRemoveRoleUsersRequest() // RemoveRoleUsersRequest | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.RemoveRoleAdmins(context.Background(), roleId).Authorization(authorization).RemoveRoleUsersRequest(removeRoleUsersRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.RemoveRoleAdmins``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**roleId** | **int32** | Set to the id of the role you want to return. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiRemoveRoleAdminsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - - **removeRoleUsersRequest** | [**RemoveRoleUsersRequest**](RemoveRoleUsersRequest.md) | | - -### Return type - - (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## RemoveRoleUsers - -> RemoveRoleUsers(ctx, roleId).Authorization(authorization).RemoveRoleUsersRequest(removeRoleUsersRequest).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - roleId := int32(56) // int32 | Set to the id of the role you want to return. - removeRoleUsersRequest := *openapiclient.NewRemoveRoleUsersRequest() // RemoveRoleUsersRequest | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.RemoveRoleUsers(context.Background(), roleId).Authorization(authorization).RemoveRoleUsersRequest(removeRoleUsersRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.RemoveRoleUsers``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**roleId** | **int32** | Set to the id of the role you want to return. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiRemoveRoleUsersRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - - **removeRoleUsersRequest** | [**RemoveRoleUsersRequest**](RemoveRoleUsersRequest.md) | | - -### Return type - - (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## RevokeToken - -> GenerateToken400Response RevokeToken(ctx).Authorization(authorization).RevokeTokenRequest(revokeTokenRequest).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - revokeTokenRequest := *openapiclient.NewRevokeTokenRequest() // RevokeTokenRequest | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.RevokeToken(context.Background()).Authorization(authorization).RevokeTokenRequest(revokeTokenRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.RevokeToken``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `RevokeToken`: GenerateToken400Response - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.RevokeToken`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiRevokeTokenRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - **revokeTokenRequest** | [**RevokeTokenRequest**](RevokeTokenRequest.md) | | - -### Return type - -[**GenerateToken400Response**](GenerateToken400Response.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## SetRoleApps - -> []SetRoleApps200ResponseInner SetRoleApps(ctx, roleId).Authorization(authorization).RequestBody(requestBody).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - roleId := int32(56) // int32 | Set to the id of the role you want to return. - requestBody := []int32{int32(123)} // []int32 | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.SetRoleApps(context.Background(), roleId).Authorization(authorization).RequestBody(requestBody).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.SetRoleApps``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `SetRoleApps`: []SetRoleApps200ResponseInner - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.SetRoleApps`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**roleId** | **int32** | Set to the id of the role you want to return. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiSetRoleAppsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - - **requestBody** | **[]int32** | | - -### Return type - -[**[]SetRoleApps200ResponseInner**](SetRoleApps200ResponseInner.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## TrackEvent - -> TrackEvent(ctx).Authorization(authorization).TrackEventRequest(trackEventRequest).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - trackEventRequest := *openapiclient.NewTrackEventRequest("Verb_example", "Ip_example", "UserAgent_example", *openapiclient.NewRiskUser("Id_example")) // TrackEventRequest | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.TrackEvent(context.Background()).Authorization(authorization).TrackEventRequest(trackEventRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.TrackEvent``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiTrackEventRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - **trackEventRequest** | [**TrackEventRequest**](TrackEventRequest.md) | | - -### Return type - - (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## UpdateAccessTokenClaim - -> Id UpdateAccessTokenClaim(ctx, id, claimId).Authorization(authorization).AddAccessTokenClaimRequest(addAccessTokenClaimRequest).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - id := int32(56) // int32 | - claimId := int32(56) // int32 | - addAccessTokenClaimRequest := *openapiclient.NewAddAccessTokenClaimRequest() // AddAccessTokenClaimRequest | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.UpdateAccessTokenClaim(context.Background(), id, claimId).Authorization(authorization).AddAccessTokenClaimRequest(addAccessTokenClaimRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.UpdateAccessTokenClaim``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `UpdateAccessTokenClaim`: Id - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.UpdateAccessTokenClaim`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**id** | **int32** | | -**claimId** | **int32** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiUpdateAccessTokenClaimRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - - - **addAccessTokenClaimRequest** | [**AddAccessTokenClaimRequest**](AddAccessTokenClaimRequest.md) | | - -### Return type - -[**Id**](Id.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## UpdateApp - -> Schema UpdateApp(ctx, appId).Authorization(authorization).Schema(schema).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - appId := int32(56) // int32 | - schema := *openapiclient.NewSchema() // Schema | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.UpdateApp(context.Background(), appId).Authorization(authorization).Schema(schema).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.UpdateApp``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `UpdateApp`: Schema - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.UpdateApp`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**appId** | **int32** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiUpdateAppRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - - **schema** | [**Schema**](Schema.md) | | - -### Return type - -[**Schema**](Schema.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## UpdateAuthorizationServer - -> Id UpdateAuthorizationServer(ctx, id).Authorization(authorization).CreateAuthorizationServerRequest(createAuthorizationServerRequest).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - id := int32(56) // int32 | - createAuthorizationServerRequest := *openapiclient.NewCreateAuthorizationServerRequest() // CreateAuthorizationServerRequest | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.UpdateAuthorizationServer(context.Background(), id).Authorization(authorization).CreateAuthorizationServerRequest(createAuthorizationServerRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.UpdateAuthorizationServer``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `UpdateAuthorizationServer`: Id - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.UpdateAuthorizationServer`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**id** | **int32** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiUpdateAuthorizationServerRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - - **createAuthorizationServerRequest** | [**CreateAuthorizationServerRequest**](CreateAuthorizationServerRequest.md) | | - -### Return type - -[**Id**](Id.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## UpdateClientApp - -> ClientApp UpdateClientApp(ctx, id, clientAppId).Authorization(authorization).UpdateClientAppRequest(updateClientAppRequest).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - id := int32(56) // int32 | - clientAppId := int32(56) // int32 | - updateClientAppRequest := *openapiclient.NewUpdateClientAppRequest() // UpdateClientAppRequest | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.UpdateClientApp(context.Background(), id, clientAppId).Authorization(authorization).UpdateClientAppRequest(updateClientAppRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.UpdateClientApp``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `UpdateClientApp`: ClientApp - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.UpdateClientApp`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**id** | **int32** | | -**clientAppId** | **int32** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiUpdateClientAppRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - - - **updateClientAppRequest** | [**UpdateClientAppRequest**](UpdateClientAppRequest.md) | | - -### Return type - -[**ClientApp**](ClientApp.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## UpdateEnvironmentVariable - -> Envvar UpdateEnvironmentVariable(ctx, envvarId).Authorization(authorization).UpdateEnvironmentVariableRequest(updateEnvironmentVariableRequest).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - envvarId := "envvarId_example" // string | Set to the id of the Hook Environment Variable that you want to fetch. - updateEnvironmentVariableRequest := *openapiclient.NewUpdateEnvironmentVariableRequest("Value_example") // UpdateEnvironmentVariableRequest | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.UpdateEnvironmentVariable(context.Background(), envvarId).Authorization(authorization).UpdateEnvironmentVariableRequest(updateEnvironmentVariableRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.UpdateEnvironmentVariable``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `UpdateEnvironmentVariable`: Envvar - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.UpdateEnvironmentVariable`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**envvarId** | **string** | Set to the id of the Hook Environment Variable that you want to fetch. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiUpdateEnvironmentVariableRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - - **updateEnvironmentVariableRequest** | [**UpdateEnvironmentVariableRequest**](UpdateEnvironmentVariableRequest.md) | | - -### Return type - -[**Envvar**](Envvar.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## UpdateHook - -> Hook UpdateHook(ctx, hookId).Authorization(authorization).Hook(hook).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - hookId := "hookId_example" // string | Set to the id of the Hook that you want to return. - hook := *openapiclient.NewHook("Type_example", false, int32(123), []string{"EnvVars_example"}, "Runtime_example", int32(123), map[string]interface{}(123), "Function_example") // Hook | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.UpdateHook(context.Background(), hookId).Authorization(authorization).Hook(hook).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.UpdateHook``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `UpdateHook`: Hook - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.UpdateHook`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**hookId** | **string** | Set to the id of the Hook that you want to return. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiUpdateHookRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - - **hook** | [**Hook**](Hook.md) | | - -### Return type - -[**Hook**](Hook.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## UpdateMapping - -> int32 UpdateMapping(ctx, mappingId).Authorization(authorization).Mapping(mapping).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - mappingId := int32(56) // int32 | The id of the user mapping to locate. - mapping := *openapiclient.NewMapping("Name_example", false, "Match_example", int32(123), []openapiclient.Action{*openapiclient.NewAction()}) // Mapping | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.UpdateMapping(context.Background(), mappingId).Authorization(authorization).Mapping(mapping).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.UpdateMapping``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `UpdateMapping`: int32 - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.UpdateMapping`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**mappingId** | **int32** | The id of the user mapping to locate. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiUpdateMappingRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - - **mapping** | [**Mapping**](Mapping.md) | | - -### Return type - -**int32** - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## UpdateRiskRule - -> RiskRule UpdateRiskRule(ctx, riskRuleId).Authorization(authorization).RiskRule(riskRule).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - riskRuleId := "riskRuleId_example" // string | - riskRule := *openapiclient.NewRiskRule() // RiskRule | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.UpdateRiskRule(context.Background(), riskRuleId).Authorization(authorization).RiskRule(riskRule).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.UpdateRiskRule``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `UpdateRiskRule`: RiskRule - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.UpdateRiskRule`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**riskRuleId** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiUpdateRiskRuleRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - - **riskRule** | [**RiskRule**](RiskRule.md) | | - -### Return type - -[**RiskRule**](RiskRule.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## UpdateRole - -> UpdateRole200Response UpdateRole(ctx, roleId).Authorization(authorization).Role(role).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - roleId := int32(56) // int32 | Set to the id of the role you want to return. - role := *openapiclient.NewRole("Name_example") // Role | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.UpdateRole(context.Background(), roleId).Authorization(authorization).Role(role).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.UpdateRole``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `UpdateRole`: UpdateRole200Response - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.UpdateRole`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**roleId** | **int32** | Set to the id of the role you want to return. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiUpdateRoleRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - - **role** | [**Role**](Role.md) | | - -### Return type - -[**UpdateRole200Response**](UpdateRole200Response.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## UpdateRule - -> RuleId UpdateRule(ctx, appId, ruleId).Authorization(authorization).Rule(rule).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - appId := int32(56) // int32 | - ruleId := int32(56) // int32 | The id of the app rule to locate. - rule := *openapiclient.NewRule() // Rule | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.UpdateRule(context.Background(), appId, ruleId).Authorization(authorization).Rule(rule).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.UpdateRule``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `UpdateRule`: RuleId - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.UpdateRule`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**appId** | **int32** | | -**ruleId** | **int32** | The id of the app rule to locate. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiUpdateRuleRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - - - **rule** | [**Rule**](Rule.md) | | - -### Return type - -[**RuleId**](RuleId.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## UpdateScope - -> Id UpdateScope(ctx, id, scopeId).Authorization(authorization).AddScopeRequest(addScopeRequest).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - id := int32(56) // int32 | - scopeId := int32(56) // int32 | - addScopeRequest := *openapiclient.NewAddScopeRequest() // AddScopeRequest | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.UpdateScope(context.Background(), id, scopeId).Authorization(authorization).AddScopeRequest(addScopeRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.UpdateScope``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `UpdateScope`: Id - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.UpdateScope`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**id** | **int32** | | -**scopeId** | **int32** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiUpdateScopeRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - - - **addScopeRequest** | [**AddScopeRequest**](AddScopeRequest.md) | | - -### Return type - -[**Id**](Id.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## UpdateUser - -> User UpdateUser(ctx, userId).Authorization(authorization).User(user).Mappings(mappings).ValidatePolicy(validatePolicy).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - userId := int32(56) // int32 | Set to the id of the user that you want to return. - user := *openapiclient.NewUser() // User | - mappings := "mappings_example" // string | Controls how mappings will be applied to the user on creation. Defaults to async. (optional) - validatePolicy := true // bool | Will passwords validate against the User Policy? Defaults to true. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.UpdateUser(context.Background(), userId).Authorization(authorization).User(user).Mappings(mappings).ValidatePolicy(validatePolicy).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.UpdateUser``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `UpdateUser`: User - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.UpdateUser`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**userId** | **int32** | Set to the id of the user that you want to return. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiUpdateUserRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - - **user** | [**User**](User.md) | | - **mappings** | **string** | Controls how mappings will be applied to the user on creation. Defaults to async. | - **validatePolicy** | **bool** | Will passwords validate against the User Policy? Defaults to true. | - -### Return type - -[**User**](User.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## VerifyEnrollment - -> []Registration VerifyEnrollment(ctx, userId, registrationId).Authorization(authorization).VerifyEnrollmentRequest(verifyEnrollmentRequest).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - userId := int32(56) // int32 | Set to the id of the user. - registrationId := int32(56) // int32 | Set to the uuid of the registration. This was included in the response as part of the initial request in Enroll Factor. - verifyEnrollmentRequest := *openapiclient.NewVerifyEnrollmentRequest() // VerifyEnrollmentRequest | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.VerifyEnrollment(context.Background(), userId, registrationId).Authorization(authorization).VerifyEnrollmentRequest(verifyEnrollmentRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.VerifyEnrollment``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `VerifyEnrollment`: []Registration - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.VerifyEnrollment`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**userId** | **int32** | Set to the id of the user. | -**registrationId** | **int32** | Set to the uuid of the registration. This was included in the response as part of the initial request in Enroll Factor. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiVerifyEnrollmentRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - - - **verifyEnrollmentRequest** | [**VerifyEnrollmentRequest**](VerifyEnrollmentRequest.md) | | - -### Return type - -[**[]Registration**](Registration.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## VerifyEnrollmentVoiceProtect - -> []Registration VerifyEnrollmentVoiceProtect(ctx, userId, registrationId).Authorization(authorization).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - userId := int32(56) // int32 | Set to the id of the user. - registrationId := int32(56) // int32 | Set to the uuid of the registration. This was included in the response as part of the initial request in Enroll Factor. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.VerifyEnrollmentVoiceProtect(context.Background(), userId, registrationId).Authorization(authorization).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.VerifyEnrollmentVoiceProtect``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `VerifyEnrollmentVoiceProtect`: []Registration - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.VerifyEnrollmentVoiceProtect`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**userId** | **int32** | Set to the id of the user. | -**registrationId** | **int32** | Set to the uuid of the registration. This was included in the response as part of the initial request in Enroll Factor. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiVerifyEnrollmentVoiceProtectRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - - - -### Return type - -[**[]Registration**](Registration.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## VerifyFactor - -> Status2 VerifyFactor(ctx, userId, verificationId).Authorization(authorization).VerifyFactorRequest(verifyFactorRequest).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - userId := int32(56) // int32 | Set to the id of the user. - verificationId := int32(56) // int32 | The verification_id is returned on activation of the factor or you can get the device_id using the Activate Factor API call. - verifyFactorRequest := *openapiclient.NewVerifyFactorRequest() // VerifyFactorRequest | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.VerifyFactor(context.Background(), userId, verificationId).Authorization(authorization).VerifyFactorRequest(verifyFactorRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.VerifyFactor``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `VerifyFactor`: Status2 - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.VerifyFactor`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**userId** | **int32** | Set to the id of the user. | -**verificationId** | **int32** | The verification_id is returned on activation of the factor or you can get the device_id using the Activate Factor API call. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiVerifyFactorRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - - - **verifyFactorRequest** | [**VerifyFactorRequest**](VerifyFactorRequest.md) | | - -### Return type - -[**Status2**](Status2.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## VerifyFactorSaml - -> VerifyFactorSaml200Response VerifyFactorSaml(ctx).Authorization(authorization).VerifyFactorSamlRequest(verifyFactorSamlRequest).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - verifyFactorSamlRequest := *openapiclient.NewVerifyFactorSamlRequest("AppId_example", "DeviceId_example", "StateToken_example") // VerifyFactorSamlRequest | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.VerifyFactorSaml(context.Background()).Authorization(authorization).VerifyFactorSamlRequest(verifyFactorSamlRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.VerifyFactorSaml``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `VerifyFactorSaml`: VerifyFactorSaml200Response - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.VerifyFactorSaml`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiVerifyFactorSamlRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - **verifyFactorSamlRequest** | [**VerifyFactorSamlRequest**](VerifyFactorSamlRequest.md) | | - -### Return type - -[**VerifyFactorSaml200Response**](VerifyFactorSaml200Response.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## VerifyFactorVoice - -> []VerifyFactorVoice200ResponseInner VerifyFactorVoice(ctx, userId, verificationId).Authorization(authorization).Execute() - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorization := "authorization_example" // string | - userId := int32(56) // int32 | Set to the id of the user. - verificationId := int32(56) // int32 | The verification_id is returned on activation of the factor or you can get the device_id using the Activate Factor API call. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultApi.VerifyFactorVoice(context.Background(), userId, verificationId).Authorization(authorization).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.VerifyFactorVoice``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `VerifyFactorVoice`: []VerifyFactorVoice200ResponseInner - fmt.Fprintf(os.Stdout, "Response from `DefaultApi.VerifyFactorVoice`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**userId** | **int32** | Set to the id of the user. | -**verificationId** | **int32** | The verification_id is returned on activation of the factor or you can get the device_id using the Activate Factor API call. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiVerifyFactorVoiceRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorization** | **string** | | - - - -### Return type - -[**[]VerifyFactorVoice200ResponseInner**](VerifyFactorVoice200ResponseInner.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/docs/Device.md b/docs/Device.md index 59e6b58..026b83b 100644 --- a/docs/Device.md +++ b/docs/Device.md @@ -4,11 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**DeviceId** | Pointer to **string** | | [optional] -**UserDisplayName** | Pointer to **string** | | [optional] -**TypeDisplayName** | Pointer to **string** | | [optional] -**AuthFactorName** | Pointer to **string** | | [optional] -**Default** | Pointer to **bool** | | [optional] +**DeviceId** | Pointer to **int32** | an ID for the device type that must be submitted with the Verify Factor API call. | [optional] +**DeviceType** | Pointer to **string** | Lists an available MFA device type, such as OneLogin OTP SMS or Google Authenticator. | [optional] ## Methods @@ -31,20 +28,20 @@ but it doesn't guarantee that properties required by API are set ### GetDeviceId -`func (o *Device) GetDeviceId() string` +`func (o *Device) GetDeviceId() int32` GetDeviceId returns the DeviceId field if non-nil, zero value otherwise. ### GetDeviceIdOk -`func (o *Device) GetDeviceIdOk() (*string, bool)` +`func (o *Device) GetDeviceIdOk() (*int32, bool)` GetDeviceIdOk returns a tuple with the DeviceId field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetDeviceId -`func (o *Device) SetDeviceId(v string)` +`func (o *Device) SetDeviceId(v int32)` SetDeviceId sets DeviceId field to given value. @@ -54,105 +51,30 @@ SetDeviceId sets DeviceId field to given value. HasDeviceId returns a boolean if a field has been set. -### GetUserDisplayName +### GetDeviceType -`func (o *Device) GetUserDisplayName() string` +`func (o *Device) GetDeviceType() string` -GetUserDisplayName returns the UserDisplayName field if non-nil, zero value otherwise. +GetDeviceType returns the DeviceType field if non-nil, zero value otherwise. -### GetUserDisplayNameOk +### GetDeviceTypeOk -`func (o *Device) GetUserDisplayNameOk() (*string, bool)` +`func (o *Device) GetDeviceTypeOk() (*string, bool)` -GetUserDisplayNameOk returns a tuple with the UserDisplayName field if it's non-nil, zero value otherwise +GetDeviceTypeOk returns a tuple with the DeviceType field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetUserDisplayName +### SetDeviceType -`func (o *Device) SetUserDisplayName(v string)` +`func (o *Device) SetDeviceType(v string)` -SetUserDisplayName sets UserDisplayName field to given value. +SetDeviceType sets DeviceType field to given value. -### HasUserDisplayName +### HasDeviceType -`func (o *Device) HasUserDisplayName() bool` +`func (o *Device) HasDeviceType() bool` -HasUserDisplayName returns a boolean if a field has been set. - -### GetTypeDisplayName - -`func (o *Device) GetTypeDisplayName() string` - -GetTypeDisplayName returns the TypeDisplayName field if non-nil, zero value otherwise. - -### GetTypeDisplayNameOk - -`func (o *Device) GetTypeDisplayNameOk() (*string, bool)` - -GetTypeDisplayNameOk returns a tuple with the TypeDisplayName field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTypeDisplayName - -`func (o *Device) SetTypeDisplayName(v string)` - -SetTypeDisplayName sets TypeDisplayName field to given value. - -### HasTypeDisplayName - -`func (o *Device) HasTypeDisplayName() bool` - -HasTypeDisplayName returns a boolean if a field has been set. - -### GetAuthFactorName - -`func (o *Device) GetAuthFactorName() string` - -GetAuthFactorName returns the AuthFactorName field if non-nil, zero value otherwise. - -### GetAuthFactorNameOk - -`func (o *Device) GetAuthFactorNameOk() (*string, bool)` - -GetAuthFactorNameOk returns a tuple with the AuthFactorName field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAuthFactorName - -`func (o *Device) SetAuthFactorName(v string)` - -SetAuthFactorName sets AuthFactorName field to given value. - -### HasAuthFactorName - -`func (o *Device) HasAuthFactorName() bool` - -HasAuthFactorName returns a boolean if a field has been set. - -### GetDefault - -`func (o *Device) GetDefault() bool` - -GetDefault returns the Default field if non-nil, zero value otherwise. - -### GetDefaultOk - -`func (o *Device) GetDefaultOk() (*bool, bool)` - -GetDefaultOk returns a tuple with the Default field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDefault - -`func (o *Device) SetDefault(v bool)` - -SetDefault sets Default field to given value. - -### HasDefault - -`func (o *Device) HasDefault() bool` - -HasDefault returns a boolean if a field has been set. +HasDeviceType 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/EmailConfig.md b/docs/EmailConfig.md new file mode 100644 index 0000000..c1152c9 --- /dev/null +++ b/docs/EmailConfig.md @@ -0,0 +1,197 @@ +# EmailConfig + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Address** | **string** | Email Settings server address | +**UseTls** | Pointer to **bool** | Use TLS | [optional] [default to true] +**From** | **string** | The From email address in the message. | +**Domain** | **string** | Domain of the From address. | +**UserName** | Pointer to **string** | The user name of the account to authenticate with the Email Settings server. | [optional] +**Password** | Pointer to **string** | The password of the account to authenticate with the Email Settings server. | [optional] +**Port** | Pointer to **int32** | Defaults to 25. | [optional] [default to 25] + +## Methods + +### NewEmailConfig + +`func NewEmailConfig(address string, from string, domain string, ) *EmailConfig` + +NewEmailConfig instantiates a new EmailConfig 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 + +### NewEmailConfigWithDefaults + +`func NewEmailConfigWithDefaults() *EmailConfig` + +NewEmailConfigWithDefaults instantiates a new EmailConfig 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 + +### GetAddress + +`func (o *EmailConfig) GetAddress() string` + +GetAddress returns the Address field if non-nil, zero value otherwise. + +### GetAddressOk + +`func (o *EmailConfig) GetAddressOk() (*string, bool)` + +GetAddressOk returns a tuple with the Address field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAddress + +`func (o *EmailConfig) SetAddress(v string)` + +SetAddress sets Address field to given value. + + +### GetUseTls + +`func (o *EmailConfig) GetUseTls() bool` + +GetUseTls returns the UseTls field if non-nil, zero value otherwise. + +### GetUseTlsOk + +`func (o *EmailConfig) GetUseTlsOk() (*bool, bool)` + +GetUseTlsOk returns a tuple with the UseTls field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUseTls + +`func (o *EmailConfig) SetUseTls(v bool)` + +SetUseTls sets UseTls field to given value. + +### HasUseTls + +`func (o *EmailConfig) HasUseTls() bool` + +HasUseTls returns a boolean if a field has been set. + +### GetFrom + +`func (o *EmailConfig) GetFrom() string` + +GetFrom returns the From field if non-nil, zero value otherwise. + +### GetFromOk + +`func (o *EmailConfig) GetFromOk() (*string, bool)` + +GetFromOk returns a tuple with the From field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFrom + +`func (o *EmailConfig) SetFrom(v string)` + +SetFrom sets From field to given value. + + +### GetDomain + +`func (o *EmailConfig) GetDomain() string` + +GetDomain returns the Domain field if non-nil, zero value otherwise. + +### GetDomainOk + +`func (o *EmailConfig) GetDomainOk() (*string, bool)` + +GetDomainOk returns a tuple with the Domain field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDomain + +`func (o *EmailConfig) SetDomain(v string)` + +SetDomain sets Domain field to given value. + + +### GetUserName + +`func (o *EmailConfig) GetUserName() string` + +GetUserName returns the UserName field if non-nil, zero value otherwise. + +### GetUserNameOk + +`func (o *EmailConfig) 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 *EmailConfig) SetUserName(v string)` + +SetUserName sets UserName field to given value. + +### HasUserName + +`func (o *EmailConfig) HasUserName() bool` + +HasUserName returns a boolean if a field has been set. + +### GetPassword + +`func (o *EmailConfig) GetPassword() string` + +GetPassword returns the Password field if non-nil, zero value otherwise. + +### GetPasswordOk + +`func (o *EmailConfig) GetPasswordOk() (*string, bool)` + +GetPasswordOk returns a tuple with the Password field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPassword + +`func (o *EmailConfig) SetPassword(v string)` + +SetPassword sets Password field to given value. + +### HasPassword + +`func (o *EmailConfig) HasPassword() bool` + +HasPassword returns a boolean if a field has been set. + +### GetPort + +`func (o *EmailConfig) GetPort() int32` + +GetPort returns the Port field if non-nil, zero value otherwise. + +### GetPortOk + +`func (o *EmailConfig) GetPortOk() (*int32, bool)` + +GetPortOk returns a tuple with the Port field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPort + +`func (o *EmailConfig) SetPort(v int32)` + +SetPort sets Port field to given value. + +### HasPort + +`func (o *EmailConfig) HasPort() bool` + +HasPort 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/EnforcementPoint.md b/docs/EnforcementPoint.md new file mode 100644 index 0000000..03cc94e --- /dev/null +++ b/docs/EnforcementPoint.md @@ -0,0 +1,398 @@ +# EnforcementPoint + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**RequireSitewideAuthentication** | Pointer to **bool** | Require user authentication to access any resource protected by this enforcement point. | [optional] +**Conditions** | Pointer to **string** | If access is conditional, the conditions that must evaluate to true to allow access to a resource. For example, to require the user must be authenticated and have either the role Admin or User | [optional] +**SessionExpiryFixed** | Pointer to [**ClockCounter**](ClockCounter.md) | | [optional] +**SessionExpiryInactivity** | Pointer to [**ClockCounter**](ClockCounter.md) | | [optional] +**Permissions** | Pointer to **string** | Specify to always `allow`, `deny` access to resources, of if access is `conditional`. | [optional] +**Token** | Pointer to **string** | Can only be set on create. Access Gateway Token. | [optional] [readonly] +**Target** | Pointer to **NullableString** | A fully-qualified URL to the internal application including scheme, authority and path. The target host authority must be an IP address, not a hostname. | [optional] +**Resources** | Pointer to [**[]EnforcementPointResourcesInner**](EnforcementPointResourcesInner.md) | Array of resource objects | [optional] +**ContextRoot** | Pointer to **string** | The root path to the application, often the name of the application. Can be any name, path or just a slash (“/”). The context root uniquely identifies the application within the enforcement point. | [optional] +**UseTargetHostHeader** | Pointer to **bool** | Use the target host header as opposed to the original gateway or upstream host header. | [optional] +**Vhost** | Pointer to **NullableString** | A comma-delimited list of one or more virtual hosts that map to applications assigned to the enforcement point. A VHOST may be a host name or an IP address. VHOST distinguish between applications that are at the same context root. | [optional] +**LandingPage** | Pointer to **NullableString** | The location within the context root to which the browser will be redirected for IdP-initiated single sign-on. For example, the landing page might be an index page in the context root such as index.html or default.aspx. The landing page cannot begin with a slash and must use valid URL characters. | [optional] +**CaseSensitive** | Pointer to **bool** | The URL path evaluation is case insensitive by default. Resources hosted on web servers such as Apache, NGINX and Java EE are case sensitive paths. Web servers such as Microsoft IIS are not case-sensitive. | [optional] + +## Methods + +### NewEnforcementPoint + +`func NewEnforcementPoint() *EnforcementPoint` + +NewEnforcementPoint instantiates a new EnforcementPoint 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 + +### NewEnforcementPointWithDefaults + +`func NewEnforcementPointWithDefaults() *EnforcementPoint` + +NewEnforcementPointWithDefaults instantiates a new EnforcementPoint 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 + +### GetRequireSitewideAuthentication + +`func (o *EnforcementPoint) GetRequireSitewideAuthentication() bool` + +GetRequireSitewideAuthentication returns the RequireSitewideAuthentication field if non-nil, zero value otherwise. + +### GetRequireSitewideAuthenticationOk + +`func (o *EnforcementPoint) GetRequireSitewideAuthenticationOk() (*bool, bool)` + +GetRequireSitewideAuthenticationOk returns a tuple with the RequireSitewideAuthentication field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRequireSitewideAuthentication + +`func (o *EnforcementPoint) SetRequireSitewideAuthentication(v bool)` + +SetRequireSitewideAuthentication sets RequireSitewideAuthentication field to given value. + +### HasRequireSitewideAuthentication + +`func (o *EnforcementPoint) HasRequireSitewideAuthentication() bool` + +HasRequireSitewideAuthentication returns a boolean if a field has been set. + +### GetConditions + +`func (o *EnforcementPoint) GetConditions() string` + +GetConditions returns the Conditions field if non-nil, zero value otherwise. + +### GetConditionsOk + +`func (o *EnforcementPoint) GetConditionsOk() (*string, bool)` + +GetConditionsOk returns a tuple with the Conditions field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConditions + +`func (o *EnforcementPoint) SetConditions(v string)` + +SetConditions sets Conditions field to given value. + +### HasConditions + +`func (o *EnforcementPoint) HasConditions() bool` + +HasConditions returns a boolean if a field has been set. + +### GetSessionExpiryFixed + +`func (o *EnforcementPoint) GetSessionExpiryFixed() ClockCounter` + +GetSessionExpiryFixed returns the SessionExpiryFixed field if non-nil, zero value otherwise. + +### GetSessionExpiryFixedOk + +`func (o *EnforcementPoint) GetSessionExpiryFixedOk() (*ClockCounter, bool)` + +GetSessionExpiryFixedOk returns a tuple with the SessionExpiryFixed field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSessionExpiryFixed + +`func (o *EnforcementPoint) SetSessionExpiryFixed(v ClockCounter)` + +SetSessionExpiryFixed sets SessionExpiryFixed field to given value. + +### HasSessionExpiryFixed + +`func (o *EnforcementPoint) HasSessionExpiryFixed() bool` + +HasSessionExpiryFixed returns a boolean if a field has been set. + +### GetSessionExpiryInactivity + +`func (o *EnforcementPoint) GetSessionExpiryInactivity() ClockCounter` + +GetSessionExpiryInactivity returns the SessionExpiryInactivity field if non-nil, zero value otherwise. + +### GetSessionExpiryInactivityOk + +`func (o *EnforcementPoint) GetSessionExpiryInactivityOk() (*ClockCounter, bool)` + +GetSessionExpiryInactivityOk returns a tuple with the SessionExpiryInactivity field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSessionExpiryInactivity + +`func (o *EnforcementPoint) SetSessionExpiryInactivity(v ClockCounter)` + +SetSessionExpiryInactivity sets SessionExpiryInactivity field to given value. + +### HasSessionExpiryInactivity + +`func (o *EnforcementPoint) HasSessionExpiryInactivity() bool` + +HasSessionExpiryInactivity returns a boolean if a field has been set. + +### GetPermissions + +`func (o *EnforcementPoint) GetPermissions() string` + +GetPermissions returns the Permissions field if non-nil, zero value otherwise. + +### GetPermissionsOk + +`func (o *EnforcementPoint) GetPermissionsOk() (*string, bool)` + +GetPermissionsOk returns a tuple with the Permissions field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPermissions + +`func (o *EnforcementPoint) SetPermissions(v string)` + +SetPermissions sets Permissions field to given value. + +### HasPermissions + +`func (o *EnforcementPoint) HasPermissions() bool` + +HasPermissions returns a boolean if a field has been set. + +### GetToken + +`func (o *EnforcementPoint) GetToken() string` + +GetToken returns the Token field if non-nil, zero value otherwise. + +### GetTokenOk + +`func (o *EnforcementPoint) GetTokenOk() (*string, bool)` + +GetTokenOk returns a tuple with the Token field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetToken + +`func (o *EnforcementPoint) SetToken(v string)` + +SetToken sets Token field to given value. + +### HasToken + +`func (o *EnforcementPoint) HasToken() bool` + +HasToken returns a boolean if a field has been set. + +### GetTarget + +`func (o *EnforcementPoint) GetTarget() string` + +GetTarget returns the Target field if non-nil, zero value otherwise. + +### GetTargetOk + +`func (o *EnforcementPoint) 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 *EnforcementPoint) SetTarget(v string)` + +SetTarget sets Target field to given value. + +### HasTarget + +`func (o *EnforcementPoint) HasTarget() bool` + +HasTarget returns a boolean if a field has been set. + +### SetTargetNil + +`func (o *EnforcementPoint) SetTargetNil(b bool)` + + SetTargetNil sets the value for Target to be an explicit nil + +### UnsetTarget +`func (o *EnforcementPoint) UnsetTarget()` + +UnsetTarget ensures that no value is present for Target, not even an explicit nil +### GetResources + +`func (o *EnforcementPoint) GetResources() []EnforcementPointResourcesInner` + +GetResources returns the Resources field if non-nil, zero value otherwise. + +### GetResourcesOk + +`func (o *EnforcementPoint) GetResourcesOk() (*[]EnforcementPointResourcesInner, bool)` + +GetResourcesOk returns a tuple with the Resources field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResources + +`func (o *EnforcementPoint) SetResources(v []EnforcementPointResourcesInner)` + +SetResources sets Resources field to given value. + +### HasResources + +`func (o *EnforcementPoint) HasResources() bool` + +HasResources returns a boolean if a field has been set. + +### GetContextRoot + +`func (o *EnforcementPoint) GetContextRoot() string` + +GetContextRoot returns the ContextRoot field if non-nil, zero value otherwise. + +### GetContextRootOk + +`func (o *EnforcementPoint) GetContextRootOk() (*string, bool)` + +GetContextRootOk returns a tuple with the ContextRoot field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContextRoot + +`func (o *EnforcementPoint) SetContextRoot(v string)` + +SetContextRoot sets ContextRoot field to given value. + +### HasContextRoot + +`func (o *EnforcementPoint) HasContextRoot() bool` + +HasContextRoot returns a boolean if a field has been set. + +### GetUseTargetHostHeader + +`func (o *EnforcementPoint) GetUseTargetHostHeader() bool` + +GetUseTargetHostHeader returns the UseTargetHostHeader field if non-nil, zero value otherwise. + +### GetUseTargetHostHeaderOk + +`func (o *EnforcementPoint) GetUseTargetHostHeaderOk() (*bool, bool)` + +GetUseTargetHostHeaderOk returns a tuple with the UseTargetHostHeader field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUseTargetHostHeader + +`func (o *EnforcementPoint) SetUseTargetHostHeader(v bool)` + +SetUseTargetHostHeader sets UseTargetHostHeader field to given value. + +### HasUseTargetHostHeader + +`func (o *EnforcementPoint) HasUseTargetHostHeader() bool` + +HasUseTargetHostHeader returns a boolean if a field has been set. + +### GetVhost + +`func (o *EnforcementPoint) GetVhost() string` + +GetVhost returns the Vhost field if non-nil, zero value otherwise. + +### GetVhostOk + +`func (o *EnforcementPoint) GetVhostOk() (*string, bool)` + +GetVhostOk returns a tuple with the Vhost field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVhost + +`func (o *EnforcementPoint) SetVhost(v string)` + +SetVhost sets Vhost field to given value. + +### HasVhost + +`func (o *EnforcementPoint) HasVhost() bool` + +HasVhost returns a boolean if a field has been set. + +### SetVhostNil + +`func (o *EnforcementPoint) SetVhostNil(b bool)` + + SetVhostNil sets the value for Vhost to be an explicit nil + +### UnsetVhost +`func (o *EnforcementPoint) UnsetVhost()` + +UnsetVhost ensures that no value is present for Vhost, not even an explicit nil +### GetLandingPage + +`func (o *EnforcementPoint) GetLandingPage() string` + +GetLandingPage returns the LandingPage field if non-nil, zero value otherwise. + +### GetLandingPageOk + +`func (o *EnforcementPoint) GetLandingPageOk() (*string, bool)` + +GetLandingPageOk returns a tuple with the LandingPage field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLandingPage + +`func (o *EnforcementPoint) SetLandingPage(v string)` + +SetLandingPage sets LandingPage field to given value. + +### HasLandingPage + +`func (o *EnforcementPoint) HasLandingPage() bool` + +HasLandingPage returns a boolean if a field has been set. + +### SetLandingPageNil + +`func (o *EnforcementPoint) SetLandingPageNil(b bool)` + + SetLandingPageNil sets the value for LandingPage to be an explicit nil + +### UnsetLandingPage +`func (o *EnforcementPoint) UnsetLandingPage()` + +UnsetLandingPage ensures that no value is present for LandingPage, not even an explicit nil +### GetCaseSensitive + +`func (o *EnforcementPoint) GetCaseSensitive() bool` + +GetCaseSensitive returns the CaseSensitive field if non-nil, zero value otherwise. + +### GetCaseSensitiveOk + +`func (o *EnforcementPoint) GetCaseSensitiveOk() (*bool, bool)` + +GetCaseSensitiveOk returns a tuple with the CaseSensitive field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCaseSensitive + +`func (o *EnforcementPoint) SetCaseSensitive(v bool)` + +SetCaseSensitive sets CaseSensitive field to given value. + +### HasCaseSensitive + +`func (o *EnforcementPoint) HasCaseSensitive() bool` + +HasCaseSensitive 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/EnforcementPointResourcesInner.md b/docs/EnforcementPointResourcesInner.md new file mode 100644 index 0000000..404d87e --- /dev/null +++ b/docs/EnforcementPointResourcesInner.md @@ -0,0 +1,170 @@ +# EnforcementPointResourcesInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Path** | Pointer to **string** | | [optional] +**IsPathRegex** | Pointer to **NullableBool** | | [optional] +**RequireAuth** | Pointer to **bool** | | [optional] +**Permission** | Pointer to **string** | | [optional] +**Conditions** | Pointer to **string** | required if permission == \"conditions\" | [optional] + +## Methods + +### NewEnforcementPointResourcesInner + +`func NewEnforcementPointResourcesInner() *EnforcementPointResourcesInner` + +NewEnforcementPointResourcesInner instantiates a new EnforcementPointResourcesInner 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 + +### NewEnforcementPointResourcesInnerWithDefaults + +`func NewEnforcementPointResourcesInnerWithDefaults() *EnforcementPointResourcesInner` + +NewEnforcementPointResourcesInnerWithDefaults instantiates a new EnforcementPointResourcesInner 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 + +### GetPath + +`func (o *EnforcementPointResourcesInner) GetPath() string` + +GetPath returns the Path field if non-nil, zero value otherwise. + +### GetPathOk + +`func (o *EnforcementPointResourcesInner) 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 *EnforcementPointResourcesInner) SetPath(v string)` + +SetPath sets Path field to given value. + +### HasPath + +`func (o *EnforcementPointResourcesInner) HasPath() bool` + +HasPath returns a boolean if a field has been set. + +### GetIsPathRegex + +`func (o *EnforcementPointResourcesInner) GetIsPathRegex() bool` + +GetIsPathRegex returns the IsPathRegex field if non-nil, zero value otherwise. + +### GetIsPathRegexOk + +`func (o *EnforcementPointResourcesInner) GetIsPathRegexOk() (*bool, bool)` + +GetIsPathRegexOk returns a tuple with the IsPathRegex field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsPathRegex + +`func (o *EnforcementPointResourcesInner) SetIsPathRegex(v bool)` + +SetIsPathRegex sets IsPathRegex field to given value. + +### HasIsPathRegex + +`func (o *EnforcementPointResourcesInner) HasIsPathRegex() bool` + +HasIsPathRegex returns a boolean if a field has been set. + +### SetIsPathRegexNil + +`func (o *EnforcementPointResourcesInner) SetIsPathRegexNil(b bool)` + + SetIsPathRegexNil sets the value for IsPathRegex to be an explicit nil + +### UnsetIsPathRegex +`func (o *EnforcementPointResourcesInner) UnsetIsPathRegex()` + +UnsetIsPathRegex ensures that no value is present for IsPathRegex, not even an explicit nil +### GetRequireAuth + +`func (o *EnforcementPointResourcesInner) GetRequireAuth() bool` + +GetRequireAuth returns the RequireAuth field if non-nil, zero value otherwise. + +### GetRequireAuthOk + +`func (o *EnforcementPointResourcesInner) GetRequireAuthOk() (*bool, bool)` + +GetRequireAuthOk returns a tuple with the RequireAuth field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRequireAuth + +`func (o *EnforcementPointResourcesInner) SetRequireAuth(v bool)` + +SetRequireAuth sets RequireAuth field to given value. + +### HasRequireAuth + +`func (o *EnforcementPointResourcesInner) HasRequireAuth() bool` + +HasRequireAuth returns a boolean if a field has been set. + +### GetPermission + +`func (o *EnforcementPointResourcesInner) GetPermission() string` + +GetPermission returns the Permission field if non-nil, zero value otherwise. + +### GetPermissionOk + +`func (o *EnforcementPointResourcesInner) GetPermissionOk() (*string, bool)` + +GetPermissionOk returns a tuple with the Permission field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPermission + +`func (o *EnforcementPointResourcesInner) SetPermission(v string)` + +SetPermission sets Permission field to given value. + +### HasPermission + +`func (o *EnforcementPointResourcesInner) HasPermission() bool` + +HasPermission returns a boolean if a field has been set. + +### GetConditions + +`func (o *EnforcementPointResourcesInner) GetConditions() string` + +GetConditions returns the Conditions field if non-nil, zero value otherwise. + +### GetConditionsOk + +`func (o *EnforcementPointResourcesInner) GetConditionsOk() (*string, bool)` + +GetConditionsOk returns a tuple with the Conditions field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConditions + +`func (o *EnforcementPointResourcesInner) SetConditions(v string)` + +SetConditions sets Conditions field to given value. + +### HasConditions + +`func (o *EnforcementPointResourcesInner) HasConditions() bool` + +HasConditions 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/EnrollFactorRequest.md b/docs/EnrollFactorRequest.md deleted file mode 100644 index df3aad1..0000000 --- a/docs/EnrollFactorRequest.md +++ /dev/null @@ -1,176 +0,0 @@ -# EnrollFactorRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**FactorId** | **int32** | The identifier of the factor to enroll the user with. | -**DisplayName** | **string** | A name for the users device. | -**ExpiresIn** | Pointer to **string** | Defaults to 120. Valid values are: 120-900 seconds. | [optional] -**Verified** | Pointer to **bool** | Defaults to false. | [optional] -**RedirectTo** | Pointer to **string** | Redirects MagicLink success page to specified URL after 2 seconds. | [optional] -**CustomMessage** | Pointer to **string** | A message template that will be sent via SMS. Max length of the message after template items are inserted is 160 characters including the OTP code. | [optional] - -## Methods - -### NewEnrollFactorRequest - -`func NewEnrollFactorRequest(factorId int32, displayName string, ) *EnrollFactorRequest` - -NewEnrollFactorRequest instantiates a new EnrollFactorRequest 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 - -### NewEnrollFactorRequestWithDefaults - -`func NewEnrollFactorRequestWithDefaults() *EnrollFactorRequest` - -NewEnrollFactorRequestWithDefaults instantiates a new EnrollFactorRequest 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 - -### GetFactorId - -`func (o *EnrollFactorRequest) GetFactorId() int32` - -GetFactorId returns the FactorId field if non-nil, zero value otherwise. - -### GetFactorIdOk - -`func (o *EnrollFactorRequest) GetFactorIdOk() (*int32, bool)` - -GetFactorIdOk returns a tuple with the FactorId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetFactorId - -`func (o *EnrollFactorRequest) SetFactorId(v int32)` - -SetFactorId sets FactorId field to given value. - - -### GetDisplayName - -`func (o *EnrollFactorRequest) GetDisplayName() string` - -GetDisplayName returns the DisplayName field if non-nil, zero value otherwise. - -### GetDisplayNameOk - -`func (o *EnrollFactorRequest) GetDisplayNameOk() (*string, bool)` - -GetDisplayNameOk returns a tuple with the DisplayName field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDisplayName - -`func (o *EnrollFactorRequest) SetDisplayName(v string)` - -SetDisplayName sets DisplayName field to given value. - - -### GetExpiresIn - -`func (o *EnrollFactorRequest) GetExpiresIn() string` - -GetExpiresIn returns the ExpiresIn field if non-nil, zero value otherwise. - -### GetExpiresInOk - -`func (o *EnrollFactorRequest) GetExpiresInOk() (*string, bool)` - -GetExpiresInOk returns a tuple with the ExpiresIn field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetExpiresIn - -`func (o *EnrollFactorRequest) SetExpiresIn(v string)` - -SetExpiresIn sets ExpiresIn field to given value. - -### HasExpiresIn - -`func (o *EnrollFactorRequest) HasExpiresIn() bool` - -HasExpiresIn returns a boolean if a field has been set. - -### GetVerified - -`func (o *EnrollFactorRequest) GetVerified() bool` - -GetVerified returns the Verified field if non-nil, zero value otherwise. - -### GetVerifiedOk - -`func (o *EnrollFactorRequest) GetVerifiedOk() (*bool, bool)` - -GetVerifiedOk returns a tuple with the Verified field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetVerified - -`func (o *EnrollFactorRequest) SetVerified(v bool)` - -SetVerified sets Verified field to given value. - -### HasVerified - -`func (o *EnrollFactorRequest) HasVerified() bool` - -HasVerified returns a boolean if a field has been set. - -### GetRedirectTo - -`func (o *EnrollFactorRequest) GetRedirectTo() string` - -GetRedirectTo returns the RedirectTo field if non-nil, zero value otherwise. - -### GetRedirectToOk - -`func (o *EnrollFactorRequest) GetRedirectToOk() (*string, bool)` - -GetRedirectToOk returns a tuple with the RedirectTo field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRedirectTo - -`func (o *EnrollFactorRequest) SetRedirectTo(v string)` - -SetRedirectTo sets RedirectTo field to given value. - -### HasRedirectTo - -`func (o *EnrollFactorRequest) HasRedirectTo() bool` - -HasRedirectTo returns a boolean if a field has been set. - -### GetCustomMessage - -`func (o *EnrollFactorRequest) GetCustomMessage() string` - -GetCustomMessage returns the CustomMessage field if non-nil, zero value otherwise. - -### GetCustomMessageOk - -`func (o *EnrollFactorRequest) GetCustomMessageOk() (*string, bool)` - -GetCustomMessageOk returns a tuple with the CustomMessage field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCustomMessage - -`func (o *EnrollFactorRequest) SetCustomMessage(v string)` - -SetCustomMessage sets CustomMessage field to given value. - -### HasCustomMessage - -`func (o *EnrollFactorRequest) HasCustomMessage() bool` - -HasCustomMessage 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/EnrollMfaFactor200Response.md b/docs/EnrollMfaFactor200Response.md new file mode 100644 index 0000000..6c4c5ae --- /dev/null +++ b/docs/EnrollMfaFactor200Response.md @@ -0,0 +1,82 @@ +# EnrollMfaFactor200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Status** | Pointer to [**Error**](Error.md) | | [optional] +**Data** | Pointer to [**[]GetEnrolledFactors200ResponseDataOtpDevicesInner**](GetEnrolledFactors200ResponseDataOtpDevicesInner.md) | | [optional] + +## Methods + +### NewEnrollMfaFactor200Response + +`func NewEnrollMfaFactor200Response() *EnrollMfaFactor200Response` + +NewEnrollMfaFactor200Response instantiates a new EnrollMfaFactor200Response 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 + +### NewEnrollMfaFactor200ResponseWithDefaults + +`func NewEnrollMfaFactor200ResponseWithDefaults() *EnrollMfaFactor200Response` + +NewEnrollMfaFactor200ResponseWithDefaults instantiates a new EnrollMfaFactor200Response 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 + +### GetStatus + +`func (o *EnrollMfaFactor200Response) GetStatus() Error` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *EnrollMfaFactor200Response) GetStatusOk() (*Error, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *EnrollMfaFactor200Response) SetStatus(v Error)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *EnrollMfaFactor200Response) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### GetData + +`func (o *EnrollMfaFactor200Response) GetData() []GetEnrolledFactors200ResponseDataOtpDevicesInner` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *EnrollMfaFactor200Response) GetDataOk() (*[]GetEnrolledFactors200ResponseDataOtpDevicesInner, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *EnrollMfaFactor200Response) SetData(v []GetEnrolledFactors200ResponseDataOtpDevicesInner)` + +SetData sets Data field to given value. + +### HasData + +`func (o *EnrollMfaFactor200Response) HasData() bool` + +HasData 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/Status.md b/docs/Error.md similarity index 65% rename from docs/Status.md rename to docs/Error.md index 205b3f2..b878e7c 100644 --- a/docs/Status.md +++ b/docs/Error.md @@ -1,132 +1,122 @@ -# Status +# Error ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Error** | Pointer to **bool** | | [optional] -**Code** | Pointer to **int32** | | [optional] +**Code** | **int32** | | **Type** | Pointer to **string** | | [optional] -**Message** | Pointer to **string** | | [optional] +**Message** | **string** | | ## Methods -### NewStatus +### NewError -`func NewStatus() *Status` +`func NewError(code int32, message string, ) *Error` -NewStatus instantiates a new Status object +NewError instantiates a new Error 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 -### NewStatusWithDefaults +### NewErrorWithDefaults -`func NewStatusWithDefaults() *Status` +`func NewErrorWithDefaults() *Error` -NewStatusWithDefaults instantiates a new Status object +NewErrorWithDefaults instantiates a new Error 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 ### GetError -`func (o *Status) GetError() bool` +`func (o *Error) GetError() bool` GetError returns the Error field if non-nil, zero value otherwise. ### GetErrorOk -`func (o *Status) GetErrorOk() (*bool, bool)` +`func (o *Error) GetErrorOk() (*bool, bool)` GetErrorOk returns a tuple with the Error field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetError -`func (o *Status) SetError(v bool)` +`func (o *Error) SetError(v bool)` SetError sets Error field to given value. ### HasError -`func (o *Status) HasError() bool` +`func (o *Error) HasError() bool` HasError returns a boolean if a field has been set. ### GetCode -`func (o *Status) GetCode() int32` +`func (o *Error) GetCode() int32` GetCode returns the Code field if non-nil, zero value otherwise. ### GetCodeOk -`func (o *Status) GetCodeOk() (*int32, bool)` +`func (o *Error) GetCodeOk() (*int32, bool)` GetCodeOk returns a tuple with the Code field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetCode -`func (o *Status) SetCode(v int32)` +`func (o *Error) SetCode(v int32)` SetCode sets Code field to given value. -### HasCode - -`func (o *Status) HasCode() bool` - -HasCode returns a boolean if a field has been set. ### GetType -`func (o *Status) GetType() string` +`func (o *Error) GetType() string` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk -`func (o *Status) GetTypeOk() (*string, bool)` +`func (o *Error) GetTypeOk() (*string, 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 *Status) SetType(v string)` +`func (o *Error) SetType(v string)` SetType sets Type field to given value. ### HasType -`func (o *Status) HasType() bool` +`func (o *Error) HasType() bool` HasType returns a boolean if a field has been set. ### GetMessage -`func (o *Status) GetMessage() string` +`func (o *Error) GetMessage() string` GetMessage returns the Message field if non-nil, zero value otherwise. ### GetMessageOk -`func (o *Status) GetMessageOk() (*string, bool)` +`func (o *Error) GetMessageOk() (*string, bool)` GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetMessage -`func (o *Status) SetMessage(v string)` +`func (o *Error) SetMessage(v string)` SetMessage sets Message field to given value. -### HasMessage - -`func (o *Status) HasMessage() bool` - -HasMessage 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/ErrorStatus.md b/docs/ErrorStatus.md deleted file mode 100644 index bba16ba..0000000 --- a/docs/ErrorStatus.md +++ /dev/null @@ -1,108 +0,0 @@ -# ErrorStatus - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Code** | Pointer to **int32** | | [optional] -**Message** | Pointer to **string** | | [optional] -**Errors** | Pointer to [**[]ErrorStatusErrorsInner**](ErrorStatusErrorsInner.md) | | [optional] - -## Methods - -### NewErrorStatus - -`func NewErrorStatus() *ErrorStatus` - -NewErrorStatus instantiates a new ErrorStatus 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 - -### NewErrorStatusWithDefaults - -`func NewErrorStatusWithDefaults() *ErrorStatus` - -NewErrorStatusWithDefaults instantiates a new ErrorStatus 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 - -### GetCode - -`func (o *ErrorStatus) GetCode() int32` - -GetCode returns the Code field if non-nil, zero value otherwise. - -### GetCodeOk - -`func (o *ErrorStatus) GetCodeOk() (*int32, bool)` - -GetCodeOk returns a tuple with the Code field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCode - -`func (o *ErrorStatus) SetCode(v int32)` - -SetCode sets Code field to given value. - -### HasCode - -`func (o *ErrorStatus) HasCode() bool` - -HasCode returns a boolean if a field has been set. - -### GetMessage - -`func (o *ErrorStatus) GetMessage() string` - -GetMessage returns the Message field if non-nil, zero value otherwise. - -### GetMessageOk - -`func (o *ErrorStatus) GetMessageOk() (*string, bool)` - -GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMessage - -`func (o *ErrorStatus) SetMessage(v string)` - -SetMessage sets Message field to given value. - -### HasMessage - -`func (o *ErrorStatus) HasMessage() bool` - -HasMessage returns a boolean if a field has been set. - -### GetErrors - -`func (o *ErrorStatus) GetErrors() []ErrorStatusErrorsInner` - -GetErrors returns the Errors field if non-nil, zero value otherwise. - -### GetErrorsOk - -`func (o *ErrorStatus) GetErrorsOk() (*[]ErrorStatusErrorsInner, bool)` - -GetErrorsOk returns a tuple with the Errors field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetErrors - -`func (o *ErrorStatus) SetErrors(v []ErrorStatusErrorsInner)` - -SetErrors sets Errors field to given value. - -### HasErrors - -`func (o *ErrorStatus) HasErrors() bool` - -HasErrors 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/ErrorStatusErrorsInner.md b/docs/ErrorStatusErrorsInner.md deleted file mode 100644 index 702315e..0000000 --- a/docs/ErrorStatusErrorsInner.md +++ /dev/null @@ -1,82 +0,0 @@ -# ErrorStatusErrorsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Field** | Pointer to **string** | | [optional] -**Message** | Pointer to **[]string** | | [optional] - -## Methods - -### NewErrorStatusErrorsInner - -`func NewErrorStatusErrorsInner() *ErrorStatusErrorsInner` - -NewErrorStatusErrorsInner instantiates a new ErrorStatusErrorsInner 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 - -### NewErrorStatusErrorsInnerWithDefaults - -`func NewErrorStatusErrorsInnerWithDefaults() *ErrorStatusErrorsInner` - -NewErrorStatusErrorsInnerWithDefaults instantiates a new ErrorStatusErrorsInner 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 - -### GetField - -`func (o *ErrorStatusErrorsInner) GetField() string` - -GetField returns the Field field if non-nil, zero value otherwise. - -### GetFieldOk - -`func (o *ErrorStatusErrorsInner) GetFieldOk() (*string, bool)` - -GetFieldOk returns a tuple with the Field field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetField - -`func (o *ErrorStatusErrorsInner) SetField(v string)` - -SetField sets Field field to given value. - -### HasField - -`func (o *ErrorStatusErrorsInner) HasField() bool` - -HasField returns a boolean if a field has been set. - -### GetMessage - -`func (o *ErrorStatusErrorsInner) GetMessage() []string` - -GetMessage returns the Message field if non-nil, zero value otherwise. - -### GetMessageOk - -`func (o *ErrorStatusErrorsInner) GetMessageOk() (*[]string, bool)` - -GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMessage - -`func (o *ErrorStatusErrorsInner) SetMessage(v []string)` - -SetMessage sets Message field to given value. - -### HasMessage - -`func (o *ErrorStatusErrorsInner) HasMessage() bool` - -HasMessage 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/Event.md b/docs/Event.md new file mode 100644 index 0000000..8a3cebf --- /dev/null +++ b/docs/Event.md @@ -0,0 +1,1200 @@ +# Event + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountId** | Pointer to **int32** | Account that triggered the event. | [optional] +**ActorSystem** | Pointer to **string** | Acting system that triggered the event when the actor is not a user. | [optional] +**ActorUserId** | Pointer to **int32** | ID of the user whose action triggered the event. | [optional] +**ActorUserName** | Pointer to **string** | First and last name of the user whose action triggered the event. | [optional] +**AdcId** | Pointer to **int32** | | [optional] +**AppName** | Pointer to **string** | Name of the app involved in the event, if applicable. | [optional] +**AppId** | Pointer to **int32** | ID of the app involved in the event, if applicable. | [optional] +**AssumedBySuperadminOrReseller** | Pointer to **int32** | | [optional] +**AssumingActingUserId** | Pointer to **int32** | ID of the user who assumed the role of the acting user to trigger the event, if applicable. | [optional] +**CertificateId** | Pointer to **int32** | | [optional] +**ClientId** | Pointer to **string** | Client ID used to generate the access token that made the API call that generated the event. | [optional] +**CreatedAt** | Pointer to **string** | ISO8601 Time and date at which the event was created. This value is autogenerated by OneLogin. | [optional] +**CustomMessage** | Pointer to **string** | More details about the event. | [optional] +**DirectorySyncRunId** | Pointer to **int32** | Directory sync run ID. | [optional] +**ErrorDescription** | Pointer to **string** | Provisioning error details, if applicable. | [optional] +**EventTypeId** | Pointer to **int32** | Type of event triggered. | [optional] +**GroupName** | Pointer to **string** | Name of a group involved in the event. | [optional] +**GroupId** | Pointer to **int32** | ID of a group involved in the event. | [optional] +**Id** | Pointer to **int32** | Event's unique ID in OneLogin. Autogenerated by OneLogin. | [optional] +**Ipaddr** | Pointer to **string** | IP address of the machine used to trigger the event. | [optional] +**MappingId** | Pointer to **int32** | | [optional] +**Notes** | Pointer to **string** | More details about the event. | [optional] +**ObjectId** | Pointer to **int32** | | [optional] +**OtpDeviceId** | Pointer to **int32** | ID of a device involved in the event. | [optional] +**OtpDeviceName** | Pointer to **string** | Name of a device involved in the event. | [optional] +**Param** | Pointer to **string** | | [optional] +**PolicyId** | Pointer to **int32** | ID of the policy involved in the event. | [optional] +**PolicyName** | Pointer to **string** | Name of the policy involved in the event. | [optional] +**PolicyType** | Pointer to **string** | | [optional] +**PrivilegeId** | Pointer to **int32** | | [optional] +**ProxyIp** | Pointer to **string** | | [optional] +**RadiusConfigId** | Pointer to **int32** | | [optional] +**ResolvedAt** | Pointer to **string** | | [optional] +**ResourceTypeId** | Pointer to **int32** | ID of the resource (user, role, group, and so forth) associated with the event. | [optional] +**RiskCookieId** | Pointer to **string** | Identifier for risk cookie | [optional] +**RiskReasons** | Pointer to **string** | | [optional] +**RiskScore** | Pointer to **int32** | | [optional] +**RoleId** | Pointer to **int32** | ID of a role involved in the event. | [optional] +**RoleName** | Pointer to **string** | Name of a role involved in the event. | [optional] +**ServiceDirectoryId** | Pointer to **int32** | | [optional] +**Solved** | Pointer to **bool** | | [optional] +**TrustedIdpId** | Pointer to **int32** | | [optional] +**UserFieldId** | Pointer to **int32** | | [optional] +**UserId** | Pointer to **int32** | ID of the user that was acted upon to trigger the event. | [optional] +**UserName** | Pointer to **string** | Name of the user that was acted upon to trigger the event. | [optional] + +## Methods + +### NewEvent + +`func NewEvent() *Event` + +NewEvent instantiates a new Event 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 + +### NewEventWithDefaults + +`func NewEventWithDefaults() *Event` + +NewEventWithDefaults instantiates a new Event 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 + +### GetAccountId + +`func (o *Event) GetAccountId() int32` + +GetAccountId returns the AccountId field if non-nil, zero value otherwise. + +### GetAccountIdOk + +`func (o *Event) GetAccountIdOk() (*int32, bool)` + +GetAccountIdOk returns a tuple with the AccountId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountId + +`func (o *Event) SetAccountId(v int32)` + +SetAccountId sets AccountId field to given value. + +### HasAccountId + +`func (o *Event) HasAccountId() bool` + +HasAccountId returns a boolean if a field has been set. + +### GetActorSystem + +`func (o *Event) GetActorSystem() string` + +GetActorSystem returns the ActorSystem field if non-nil, zero value otherwise. + +### GetActorSystemOk + +`func (o *Event) GetActorSystemOk() (*string, bool)` + +GetActorSystemOk returns a tuple with the ActorSystem field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActorSystem + +`func (o *Event) SetActorSystem(v string)` + +SetActorSystem sets ActorSystem field to given value. + +### HasActorSystem + +`func (o *Event) HasActorSystem() bool` + +HasActorSystem returns a boolean if a field has been set. + +### GetActorUserId + +`func (o *Event) GetActorUserId() int32` + +GetActorUserId returns the ActorUserId field if non-nil, zero value otherwise. + +### GetActorUserIdOk + +`func (o *Event) GetActorUserIdOk() (*int32, bool)` + +GetActorUserIdOk returns a tuple with the ActorUserId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActorUserId + +`func (o *Event) SetActorUserId(v int32)` + +SetActorUserId sets ActorUserId field to given value. + +### HasActorUserId + +`func (o *Event) HasActorUserId() bool` + +HasActorUserId returns a boolean if a field has been set. + +### GetActorUserName + +`func (o *Event) GetActorUserName() string` + +GetActorUserName returns the ActorUserName field if non-nil, zero value otherwise. + +### GetActorUserNameOk + +`func (o *Event) GetActorUserNameOk() (*string, bool)` + +GetActorUserNameOk returns a tuple with the ActorUserName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActorUserName + +`func (o *Event) SetActorUserName(v string)` + +SetActorUserName sets ActorUserName field to given value. + +### HasActorUserName + +`func (o *Event) HasActorUserName() bool` + +HasActorUserName returns a boolean if a field has been set. + +### GetAdcId + +`func (o *Event) GetAdcId() int32` + +GetAdcId returns the AdcId field if non-nil, zero value otherwise. + +### GetAdcIdOk + +`func (o *Event) GetAdcIdOk() (*int32, bool)` + +GetAdcIdOk returns a tuple with the AdcId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAdcId + +`func (o *Event) SetAdcId(v int32)` + +SetAdcId sets AdcId field to given value. + +### HasAdcId + +`func (o *Event) HasAdcId() bool` + +HasAdcId returns a boolean if a field has been set. + +### GetAppName + +`func (o *Event) GetAppName() string` + +GetAppName returns the AppName field if non-nil, zero value otherwise. + +### GetAppNameOk + +`func (o *Event) GetAppNameOk() (*string, bool)` + +GetAppNameOk returns a tuple with the AppName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAppName + +`func (o *Event) SetAppName(v string)` + +SetAppName sets AppName field to given value. + +### HasAppName + +`func (o *Event) HasAppName() bool` + +HasAppName returns a boolean if a field has been set. + +### GetAppId + +`func (o *Event) GetAppId() int32` + +GetAppId returns the AppId field if non-nil, zero value otherwise. + +### GetAppIdOk + +`func (o *Event) GetAppIdOk() (*int32, bool)` + +GetAppIdOk returns a tuple with the AppId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAppId + +`func (o *Event) SetAppId(v int32)` + +SetAppId sets AppId field to given value. + +### HasAppId + +`func (o *Event) HasAppId() bool` + +HasAppId returns a boolean if a field has been set. + +### GetAssumedBySuperadminOrReseller + +`func (o *Event) GetAssumedBySuperadminOrReseller() int32` + +GetAssumedBySuperadminOrReseller returns the AssumedBySuperadminOrReseller field if non-nil, zero value otherwise. + +### GetAssumedBySuperadminOrResellerOk + +`func (o *Event) GetAssumedBySuperadminOrResellerOk() (*int32, bool)` + +GetAssumedBySuperadminOrResellerOk returns a tuple with the AssumedBySuperadminOrReseller field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAssumedBySuperadminOrReseller + +`func (o *Event) SetAssumedBySuperadminOrReseller(v int32)` + +SetAssumedBySuperadminOrReseller sets AssumedBySuperadminOrReseller field to given value. + +### HasAssumedBySuperadminOrReseller + +`func (o *Event) HasAssumedBySuperadminOrReseller() bool` + +HasAssumedBySuperadminOrReseller returns a boolean if a field has been set. + +### GetAssumingActingUserId + +`func (o *Event) GetAssumingActingUserId() int32` + +GetAssumingActingUserId returns the AssumingActingUserId field if non-nil, zero value otherwise. + +### GetAssumingActingUserIdOk + +`func (o *Event) GetAssumingActingUserIdOk() (*int32, bool)` + +GetAssumingActingUserIdOk returns a tuple with the AssumingActingUserId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAssumingActingUserId + +`func (o *Event) SetAssumingActingUserId(v int32)` + +SetAssumingActingUserId sets AssumingActingUserId field to given value. + +### HasAssumingActingUserId + +`func (o *Event) HasAssumingActingUserId() bool` + +HasAssumingActingUserId returns a boolean if a field has been set. + +### GetCertificateId + +`func (o *Event) GetCertificateId() int32` + +GetCertificateId returns the CertificateId field if non-nil, zero value otherwise. + +### GetCertificateIdOk + +`func (o *Event) GetCertificateIdOk() (*int32, bool)` + +GetCertificateIdOk returns a tuple with the CertificateId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCertificateId + +`func (o *Event) SetCertificateId(v int32)` + +SetCertificateId sets CertificateId field to given value. + +### HasCertificateId + +`func (o *Event) HasCertificateId() bool` + +HasCertificateId returns a boolean if a field has been set. + +### GetClientId + +`func (o *Event) GetClientId() string` + +GetClientId returns the ClientId field if non-nil, zero value otherwise. + +### GetClientIdOk + +`func (o *Event) GetClientIdOk() (*string, bool)` + +GetClientIdOk returns a tuple with the ClientId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetClientId + +`func (o *Event) SetClientId(v string)` + +SetClientId sets ClientId field to given value. + +### HasClientId + +`func (o *Event) HasClientId() bool` + +HasClientId returns a boolean if a field has been set. + +### GetCreatedAt + +`func (o *Event) GetCreatedAt() string` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *Event) GetCreatedAtOk() (*string, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *Event) SetCreatedAt(v string)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *Event) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### GetCustomMessage + +`func (o *Event) GetCustomMessage() string` + +GetCustomMessage returns the CustomMessage field if non-nil, zero value otherwise. + +### GetCustomMessageOk + +`func (o *Event) GetCustomMessageOk() (*string, bool)` + +GetCustomMessageOk returns a tuple with the CustomMessage field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustomMessage + +`func (o *Event) SetCustomMessage(v string)` + +SetCustomMessage sets CustomMessage field to given value. + +### HasCustomMessage + +`func (o *Event) HasCustomMessage() bool` + +HasCustomMessage returns a boolean if a field has been set. + +### GetDirectorySyncRunId + +`func (o *Event) GetDirectorySyncRunId() int32` + +GetDirectorySyncRunId returns the DirectorySyncRunId field if non-nil, zero value otherwise. + +### GetDirectorySyncRunIdOk + +`func (o *Event) GetDirectorySyncRunIdOk() (*int32, bool)` + +GetDirectorySyncRunIdOk returns a tuple with the DirectorySyncRunId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDirectorySyncRunId + +`func (o *Event) SetDirectorySyncRunId(v int32)` + +SetDirectorySyncRunId sets DirectorySyncRunId field to given value. + +### HasDirectorySyncRunId + +`func (o *Event) HasDirectorySyncRunId() bool` + +HasDirectorySyncRunId returns a boolean if a field has been set. + +### GetErrorDescription + +`func (o *Event) GetErrorDescription() string` + +GetErrorDescription returns the ErrorDescription field if non-nil, zero value otherwise. + +### GetErrorDescriptionOk + +`func (o *Event) GetErrorDescriptionOk() (*string, bool)` + +GetErrorDescriptionOk returns a tuple with the ErrorDescription field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetErrorDescription + +`func (o *Event) SetErrorDescription(v string)` + +SetErrorDescription sets ErrorDescription field to given value. + +### HasErrorDescription + +`func (o *Event) HasErrorDescription() bool` + +HasErrorDescription returns a boolean if a field has been set. + +### GetEventTypeId + +`func (o *Event) GetEventTypeId() int32` + +GetEventTypeId returns the EventTypeId field if non-nil, zero value otherwise. + +### GetEventTypeIdOk + +`func (o *Event) GetEventTypeIdOk() (*int32, bool)` + +GetEventTypeIdOk returns a tuple with the EventTypeId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEventTypeId + +`func (o *Event) SetEventTypeId(v int32)` + +SetEventTypeId sets EventTypeId field to given value. + +### HasEventTypeId + +`func (o *Event) HasEventTypeId() bool` + +HasEventTypeId returns a boolean if a field has been set. + +### GetGroupName + +`func (o *Event) GetGroupName() string` + +GetGroupName returns the GroupName field if non-nil, zero value otherwise. + +### GetGroupNameOk + +`func (o *Event) GetGroupNameOk() (*string, bool)` + +GetGroupNameOk returns a tuple with the GroupName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetGroupName + +`func (o *Event) SetGroupName(v string)` + +SetGroupName sets GroupName field to given value. + +### HasGroupName + +`func (o *Event) HasGroupName() bool` + +HasGroupName returns a boolean if a field has been set. + +### GetGroupId + +`func (o *Event) GetGroupId() int32` + +GetGroupId returns the GroupId field if non-nil, zero value otherwise. + +### GetGroupIdOk + +`func (o *Event) GetGroupIdOk() (*int32, bool)` + +GetGroupIdOk returns a tuple with the GroupId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetGroupId + +`func (o *Event) SetGroupId(v int32)` + +SetGroupId sets GroupId field to given value. + +### HasGroupId + +`func (o *Event) HasGroupId() bool` + +HasGroupId returns a boolean if a field has been set. + +### GetId + +`func (o *Event) GetId() int32` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Event) GetIdOk() (*int32, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Event) SetId(v int32)` + +SetId sets Id field to given value. + +### HasId + +`func (o *Event) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetIpaddr + +`func (o *Event) GetIpaddr() string` + +GetIpaddr returns the Ipaddr field if non-nil, zero value otherwise. + +### GetIpaddrOk + +`func (o *Event) GetIpaddrOk() (*string, bool)` + +GetIpaddrOk returns a tuple with the Ipaddr field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIpaddr + +`func (o *Event) SetIpaddr(v string)` + +SetIpaddr sets Ipaddr field to given value. + +### HasIpaddr + +`func (o *Event) HasIpaddr() bool` + +HasIpaddr returns a boolean if a field has been set. + +### GetMappingId + +`func (o *Event) GetMappingId() int32` + +GetMappingId returns the MappingId field if non-nil, zero value otherwise. + +### GetMappingIdOk + +`func (o *Event) GetMappingIdOk() (*int32, bool)` + +GetMappingIdOk returns a tuple with the MappingId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMappingId + +`func (o *Event) SetMappingId(v int32)` + +SetMappingId sets MappingId field to given value. + +### HasMappingId + +`func (o *Event) HasMappingId() bool` + +HasMappingId returns a boolean if a field has been set. + +### GetNotes + +`func (o *Event) GetNotes() string` + +GetNotes returns the Notes field if non-nil, zero value otherwise. + +### GetNotesOk + +`func (o *Event) GetNotesOk() (*string, bool)` + +GetNotesOk returns a tuple with the Notes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNotes + +`func (o *Event) SetNotes(v string)` + +SetNotes sets Notes field to given value. + +### HasNotes + +`func (o *Event) HasNotes() bool` + +HasNotes returns a boolean if a field has been set. + +### GetObjectId + +`func (o *Event) GetObjectId() int32` + +GetObjectId returns the ObjectId field if non-nil, zero value otherwise. + +### GetObjectIdOk + +`func (o *Event) GetObjectIdOk() (*int32, bool)` + +GetObjectIdOk returns a tuple with the ObjectId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetObjectId + +`func (o *Event) SetObjectId(v int32)` + +SetObjectId sets ObjectId field to given value. + +### HasObjectId + +`func (o *Event) HasObjectId() bool` + +HasObjectId returns a boolean if a field has been set. + +### GetOtpDeviceId + +`func (o *Event) GetOtpDeviceId() int32` + +GetOtpDeviceId returns the OtpDeviceId field if non-nil, zero value otherwise. + +### GetOtpDeviceIdOk + +`func (o *Event) GetOtpDeviceIdOk() (*int32, bool)` + +GetOtpDeviceIdOk returns a tuple with the OtpDeviceId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOtpDeviceId + +`func (o *Event) SetOtpDeviceId(v int32)` + +SetOtpDeviceId sets OtpDeviceId field to given value. + +### HasOtpDeviceId + +`func (o *Event) HasOtpDeviceId() bool` + +HasOtpDeviceId returns a boolean if a field has been set. + +### GetOtpDeviceName + +`func (o *Event) GetOtpDeviceName() string` + +GetOtpDeviceName returns the OtpDeviceName field if non-nil, zero value otherwise. + +### GetOtpDeviceNameOk + +`func (o *Event) GetOtpDeviceNameOk() (*string, bool)` + +GetOtpDeviceNameOk returns a tuple with the OtpDeviceName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOtpDeviceName + +`func (o *Event) SetOtpDeviceName(v string)` + +SetOtpDeviceName sets OtpDeviceName field to given value. + +### HasOtpDeviceName + +`func (o *Event) HasOtpDeviceName() bool` + +HasOtpDeviceName returns a boolean if a field has been set. + +### GetParam + +`func (o *Event) GetParam() string` + +GetParam returns the Param field if non-nil, zero value otherwise. + +### GetParamOk + +`func (o *Event) GetParamOk() (*string, bool)` + +GetParamOk returns a tuple with the Param field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetParam + +`func (o *Event) SetParam(v string)` + +SetParam sets Param field to given value. + +### HasParam + +`func (o *Event) HasParam() bool` + +HasParam returns a boolean if a field has been set. + +### GetPolicyId + +`func (o *Event) GetPolicyId() int32` + +GetPolicyId returns the PolicyId field if non-nil, zero value otherwise. + +### GetPolicyIdOk + +`func (o *Event) GetPolicyIdOk() (*int32, bool)` + +GetPolicyIdOk returns a tuple with the PolicyId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPolicyId + +`func (o *Event) SetPolicyId(v int32)` + +SetPolicyId sets PolicyId field to given value. + +### HasPolicyId + +`func (o *Event) HasPolicyId() bool` + +HasPolicyId returns a boolean if a field has been set. + +### GetPolicyName + +`func (o *Event) GetPolicyName() string` + +GetPolicyName returns the PolicyName field if non-nil, zero value otherwise. + +### GetPolicyNameOk + +`func (o *Event) GetPolicyNameOk() (*string, bool)` + +GetPolicyNameOk returns a tuple with the PolicyName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPolicyName + +`func (o *Event) SetPolicyName(v string)` + +SetPolicyName sets PolicyName field to given value. + +### HasPolicyName + +`func (o *Event) HasPolicyName() bool` + +HasPolicyName returns a boolean if a field has been set. + +### GetPolicyType + +`func (o *Event) GetPolicyType() string` + +GetPolicyType returns the PolicyType field if non-nil, zero value otherwise. + +### GetPolicyTypeOk + +`func (o *Event) GetPolicyTypeOk() (*string, bool)` + +GetPolicyTypeOk returns a tuple with the PolicyType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPolicyType + +`func (o *Event) SetPolicyType(v string)` + +SetPolicyType sets PolicyType field to given value. + +### HasPolicyType + +`func (o *Event) HasPolicyType() bool` + +HasPolicyType returns a boolean if a field has been set. + +### GetPrivilegeId + +`func (o *Event) GetPrivilegeId() int32` + +GetPrivilegeId returns the PrivilegeId field if non-nil, zero value otherwise. + +### GetPrivilegeIdOk + +`func (o *Event) GetPrivilegeIdOk() (*int32, bool)` + +GetPrivilegeIdOk returns a tuple with the PrivilegeId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPrivilegeId + +`func (o *Event) SetPrivilegeId(v int32)` + +SetPrivilegeId sets PrivilegeId field to given value. + +### HasPrivilegeId + +`func (o *Event) HasPrivilegeId() bool` + +HasPrivilegeId returns a boolean if a field has been set. + +### GetProxyIp + +`func (o *Event) GetProxyIp() string` + +GetProxyIp returns the ProxyIp field if non-nil, zero value otherwise. + +### GetProxyIpOk + +`func (o *Event) GetProxyIpOk() (*string, bool)` + +GetProxyIpOk returns a tuple with the ProxyIp field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProxyIp + +`func (o *Event) SetProxyIp(v string)` + +SetProxyIp sets ProxyIp field to given value. + +### HasProxyIp + +`func (o *Event) HasProxyIp() bool` + +HasProxyIp returns a boolean if a field has been set. + +### GetRadiusConfigId + +`func (o *Event) GetRadiusConfigId() int32` + +GetRadiusConfigId returns the RadiusConfigId field if non-nil, zero value otherwise. + +### GetRadiusConfigIdOk + +`func (o *Event) GetRadiusConfigIdOk() (*int32, bool)` + +GetRadiusConfigIdOk returns a tuple with the RadiusConfigId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRadiusConfigId + +`func (o *Event) SetRadiusConfigId(v int32)` + +SetRadiusConfigId sets RadiusConfigId field to given value. + +### HasRadiusConfigId + +`func (o *Event) HasRadiusConfigId() bool` + +HasRadiusConfigId returns a boolean if a field has been set. + +### GetResolvedAt + +`func (o *Event) GetResolvedAt() string` + +GetResolvedAt returns the ResolvedAt field if non-nil, zero value otherwise. + +### GetResolvedAtOk + +`func (o *Event) GetResolvedAtOk() (*string, bool)` + +GetResolvedAtOk returns a tuple with the ResolvedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResolvedAt + +`func (o *Event) SetResolvedAt(v string)` + +SetResolvedAt sets ResolvedAt field to given value. + +### HasResolvedAt + +`func (o *Event) HasResolvedAt() bool` + +HasResolvedAt returns a boolean if a field has been set. + +### GetResourceTypeId + +`func (o *Event) GetResourceTypeId() int32` + +GetResourceTypeId returns the ResourceTypeId field if non-nil, zero value otherwise. + +### GetResourceTypeIdOk + +`func (o *Event) GetResourceTypeIdOk() (*int32, bool)` + +GetResourceTypeIdOk returns a tuple with the ResourceTypeId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResourceTypeId + +`func (o *Event) SetResourceTypeId(v int32)` + +SetResourceTypeId sets ResourceTypeId field to given value. + +### HasResourceTypeId + +`func (o *Event) HasResourceTypeId() bool` + +HasResourceTypeId returns a boolean if a field has been set. + +### GetRiskCookieId + +`func (o *Event) GetRiskCookieId() string` + +GetRiskCookieId returns the RiskCookieId field if non-nil, zero value otherwise. + +### GetRiskCookieIdOk + +`func (o *Event) GetRiskCookieIdOk() (*string, bool)` + +GetRiskCookieIdOk returns a tuple with the RiskCookieId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRiskCookieId + +`func (o *Event) SetRiskCookieId(v string)` + +SetRiskCookieId sets RiskCookieId field to given value. + +### HasRiskCookieId + +`func (o *Event) HasRiskCookieId() bool` + +HasRiskCookieId returns a boolean if a field has been set. + +### GetRiskReasons + +`func (o *Event) GetRiskReasons() string` + +GetRiskReasons returns the RiskReasons field if non-nil, zero value otherwise. + +### GetRiskReasonsOk + +`func (o *Event) GetRiskReasonsOk() (*string, bool)` + +GetRiskReasonsOk returns a tuple with the RiskReasons field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRiskReasons + +`func (o *Event) SetRiskReasons(v string)` + +SetRiskReasons sets RiskReasons field to given value. + +### HasRiskReasons + +`func (o *Event) HasRiskReasons() bool` + +HasRiskReasons returns a boolean if a field has been set. + +### GetRiskScore + +`func (o *Event) GetRiskScore() int32` + +GetRiskScore returns the RiskScore field if non-nil, zero value otherwise. + +### GetRiskScoreOk + +`func (o *Event) GetRiskScoreOk() (*int32, bool)` + +GetRiskScoreOk returns a tuple with the RiskScore field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRiskScore + +`func (o *Event) SetRiskScore(v int32)` + +SetRiskScore sets RiskScore field to given value. + +### HasRiskScore + +`func (o *Event) HasRiskScore() bool` + +HasRiskScore returns a boolean if a field has been set. + +### GetRoleId + +`func (o *Event) GetRoleId() int32` + +GetRoleId returns the RoleId field if non-nil, zero value otherwise. + +### GetRoleIdOk + +`func (o *Event) GetRoleIdOk() (*int32, bool)` + +GetRoleIdOk returns a tuple with the RoleId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRoleId + +`func (o *Event) SetRoleId(v int32)` + +SetRoleId sets RoleId field to given value. + +### HasRoleId + +`func (o *Event) HasRoleId() bool` + +HasRoleId returns a boolean if a field has been set. + +### GetRoleName + +`func (o *Event) GetRoleName() string` + +GetRoleName returns the RoleName field if non-nil, zero value otherwise. + +### GetRoleNameOk + +`func (o *Event) GetRoleNameOk() (*string, bool)` + +GetRoleNameOk returns a tuple with the RoleName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRoleName + +`func (o *Event) SetRoleName(v string)` + +SetRoleName sets RoleName field to given value. + +### HasRoleName + +`func (o *Event) HasRoleName() bool` + +HasRoleName returns a boolean if a field has been set. + +### GetServiceDirectoryId + +`func (o *Event) GetServiceDirectoryId() int32` + +GetServiceDirectoryId returns the ServiceDirectoryId field if non-nil, zero value otherwise. + +### GetServiceDirectoryIdOk + +`func (o *Event) GetServiceDirectoryIdOk() (*int32, bool)` + +GetServiceDirectoryIdOk returns a tuple with the ServiceDirectoryId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetServiceDirectoryId + +`func (o *Event) SetServiceDirectoryId(v int32)` + +SetServiceDirectoryId sets ServiceDirectoryId field to given value. + +### HasServiceDirectoryId + +`func (o *Event) HasServiceDirectoryId() bool` + +HasServiceDirectoryId returns a boolean if a field has been set. + +### GetSolved + +`func (o *Event) GetSolved() bool` + +GetSolved returns the Solved field if non-nil, zero value otherwise. + +### GetSolvedOk + +`func (o *Event) GetSolvedOk() (*bool, bool)` + +GetSolvedOk returns a tuple with the Solved field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSolved + +`func (o *Event) SetSolved(v bool)` + +SetSolved sets Solved field to given value. + +### HasSolved + +`func (o *Event) HasSolved() bool` + +HasSolved returns a boolean if a field has been set. + +### GetTrustedIdpId + +`func (o *Event) GetTrustedIdpId() int32` + +GetTrustedIdpId returns the TrustedIdpId field if non-nil, zero value otherwise. + +### GetTrustedIdpIdOk + +`func (o *Event) GetTrustedIdpIdOk() (*int32, bool)` + +GetTrustedIdpIdOk returns a tuple with the TrustedIdpId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTrustedIdpId + +`func (o *Event) SetTrustedIdpId(v int32)` + +SetTrustedIdpId sets TrustedIdpId field to given value. + +### HasTrustedIdpId + +`func (o *Event) HasTrustedIdpId() bool` + +HasTrustedIdpId returns a boolean if a field has been set. + +### GetUserFieldId + +`func (o *Event) GetUserFieldId() int32` + +GetUserFieldId returns the UserFieldId field if non-nil, zero value otherwise. + +### GetUserFieldIdOk + +`func (o *Event) GetUserFieldIdOk() (*int32, bool)` + +GetUserFieldIdOk returns a tuple with the UserFieldId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUserFieldId + +`func (o *Event) SetUserFieldId(v int32)` + +SetUserFieldId sets UserFieldId field to given value. + +### HasUserFieldId + +`func (o *Event) HasUserFieldId() bool` + +HasUserFieldId returns a boolean if a field has been set. + +### GetUserId + +`func (o *Event) GetUserId() int32` + +GetUserId returns the UserId field if non-nil, zero value otherwise. + +### GetUserIdOk + +`func (o *Event) GetUserIdOk() (*int32, bool)` + +GetUserIdOk returns a tuple with the UserId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUserId + +`func (o *Event) SetUserId(v int32)` + +SetUserId sets UserId field to given value. + +### HasUserId + +`func (o *Event) HasUserId() bool` + +HasUserId returns a boolean if a field has been set. + +### GetUserName + +`func (o *Event) GetUserName() string` + +GetUserName returns the UserName field if non-nil, zero value otherwise. + +### GetUserNameOk + +`func (o *Event) 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 *Event) SetUserName(v string)` + +SetUserName sets UserName field to given value. + +### HasUserName + +`func (o *Event) HasUserName() bool` + +HasUserName 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/EventsApi.md b/docs/EventsApi.md new file mode 100644 index 0000000..fddb744 --- /dev/null +++ b/docs/EventsApi.md @@ -0,0 +1,229 @@ +# \EventsApi + +All URIs are relative to *https://your-api-subdomain.onelogin.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetEventById**](EventsApi.md#GetEventById) | **Get** /api/1/events/{event_id} | Get Event by ID +[**GetEventTypes**](EventsApi.md#GetEventTypes) | **Get** /api/1/events/types | Get Event Types +[**GetEvents**](EventsApi.md#GetEvents) | **Get** /api/1/events | Get Events + + + +## GetEventById + +> GetEventById200Response GetEventById(ctx, eventId).Execute() + +Get Event by ID + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + eventId := int32(56) // int32 | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.EventsApi.GetEventById(context.Background(), eventId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `EventsApi.GetEventById``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetEventById`: GetEventById200Response + fmt.Fprintf(os.Stdout, "Response from `EventsApi.GetEventById`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**eventId** | **int32** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetEventByIdRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**GetEventById200Response**](GetEventById200Response.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetEventTypes + +> GetEventTypes200Response GetEventTypes(ctx).ContentType(contentType).Execute() + +Get Event Types + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + contentType := "application/json" // string | (optional) (default to "application/json") + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.EventsApi.GetEventTypes(context.Background()).ContentType(contentType).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `EventsApi.GetEventTypes``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetEventTypes`: GetEventTypes200Response + fmt.Fprintf(os.Stdout, "Response from `EventsApi.GetEventTypes`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetEventTypesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **contentType** | **string** | | [default to "application/json"] + +### Return type + +[**GetEventTypes200Response**](GetEventTypes200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetEvents + +> GetEvents200Response GetEvents(ctx).EventTypeId(eventTypeId).ClientId(clientId).DirectoryId(directoryId).Id(id).CreatedAt(createdAt).Resolution(resolution).Since(since).Until(until).UserId(userId).Execute() + +Get Events + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + eventTypeId := []int32{int32(123)} // []int32 | (optional) + clientId := int32(56) // int32 | (optional) + directoryId := int32(56) // int32 | (optional) + id := int32(56) // int32 | (optional) + createdAt := "createdAt_example" // string | (optional) + resolution := "resolution_example" // string | (optional) + since := "since_example" // string | (optional) + until := "until_example" // string | (optional) + userId := int32(56) // int32 | Set to the id of the user that you want to return. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.EventsApi.GetEvents(context.Background()).EventTypeId(eventTypeId).ClientId(clientId).DirectoryId(directoryId).Id(id).CreatedAt(createdAt).Resolution(resolution).Since(since).Until(until).UserId(userId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `EventsApi.GetEvents``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetEvents`: GetEvents200Response + fmt.Fprintf(os.Stdout, "Response from `EventsApi.GetEvents`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetEventsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **eventTypeId** | **[]int32** | | + **clientId** | **int32** | | + **directoryId** | **int32** | | + **id** | **int32** | | + **createdAt** | **string** | | + **resolution** | **string** | | + **since** | **string** | | + **until** | **string** | | + **userId** | **int32** | Set to the id of the user that you want to return. | + +### Return type + +[**GetEvents200Response**](GetEvents200Response.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/docs/FactorInner.md b/docs/FactorInner.md deleted file mode 100644 index 4a0ffde..0000000 --- a/docs/FactorInner.md +++ /dev/null @@ -1,238 +0,0 @@ -# FactorInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | Pointer to **string** | MFA device identifier. | [optional] -**Status** | Pointer to **string** | accepted : factor has been verified. pending: registered but has not been verified. | [optional] -**Default** | Pointer to **bool** | True = is user's default MFA device for OneLogin. | [optional] -**AuthFactorName** | Pointer to **string** | \"Official\" authentication factor name, as it appears to administrators in OneLogin. | [optional] -**TypeDisplayName** | Pointer to **string** | Authentication factor display name as it appears to users upon initial registration, as defined by admins at Settings > Authentication Factors. | [optional] -**UserDisplayName** | Pointer to **string** | Authentication factor display name assigned by users when they enroll the device. | [optional] -**ExpiresAt** | Pointer to **string** | A short lived token that is required to Verify the Factor. This token expires based on the expires_in parameter passed in. | [optional] -**FactorData** | Pointer to [**FactorInnerFactorData**](FactorInnerFactorData.md) | | [optional] - -## Methods - -### NewFactorInner - -`func NewFactorInner() *FactorInner` - -NewFactorInner instantiates a new FactorInner 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 - -### NewFactorInnerWithDefaults - -`func NewFactorInnerWithDefaults() *FactorInner` - -NewFactorInnerWithDefaults instantiates a new FactorInner 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 - -### GetId - -`func (o *FactorInner) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *FactorInner) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *FactorInner) SetId(v string)` - -SetId sets Id field to given value. - -### HasId - -`func (o *FactorInner) HasId() bool` - -HasId returns a boolean if a field has been set. - -### GetStatus - -`func (o *FactorInner) GetStatus() string` - -GetStatus returns the Status field if non-nil, zero value otherwise. - -### GetStatusOk - -`func (o *FactorInner) GetStatusOk() (*string, bool)` - -GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStatus - -`func (o *FactorInner) SetStatus(v string)` - -SetStatus sets Status field to given value. - -### HasStatus - -`func (o *FactorInner) HasStatus() bool` - -HasStatus returns a boolean if a field has been set. - -### GetDefault - -`func (o *FactorInner) GetDefault() bool` - -GetDefault returns the Default field if non-nil, zero value otherwise. - -### GetDefaultOk - -`func (o *FactorInner) GetDefaultOk() (*bool, bool)` - -GetDefaultOk returns a tuple with the Default field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDefault - -`func (o *FactorInner) SetDefault(v bool)` - -SetDefault sets Default field to given value. - -### HasDefault - -`func (o *FactorInner) HasDefault() bool` - -HasDefault returns a boolean if a field has been set. - -### GetAuthFactorName - -`func (o *FactorInner) GetAuthFactorName() string` - -GetAuthFactorName returns the AuthFactorName field if non-nil, zero value otherwise. - -### GetAuthFactorNameOk - -`func (o *FactorInner) GetAuthFactorNameOk() (*string, bool)` - -GetAuthFactorNameOk returns a tuple with the AuthFactorName field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAuthFactorName - -`func (o *FactorInner) SetAuthFactorName(v string)` - -SetAuthFactorName sets AuthFactorName field to given value. - -### HasAuthFactorName - -`func (o *FactorInner) HasAuthFactorName() bool` - -HasAuthFactorName returns a boolean if a field has been set. - -### GetTypeDisplayName - -`func (o *FactorInner) GetTypeDisplayName() string` - -GetTypeDisplayName returns the TypeDisplayName field if non-nil, zero value otherwise. - -### GetTypeDisplayNameOk - -`func (o *FactorInner) GetTypeDisplayNameOk() (*string, bool)` - -GetTypeDisplayNameOk returns a tuple with the TypeDisplayName field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTypeDisplayName - -`func (o *FactorInner) SetTypeDisplayName(v string)` - -SetTypeDisplayName sets TypeDisplayName field to given value. - -### HasTypeDisplayName - -`func (o *FactorInner) HasTypeDisplayName() bool` - -HasTypeDisplayName returns a boolean if a field has been set. - -### GetUserDisplayName - -`func (o *FactorInner) GetUserDisplayName() string` - -GetUserDisplayName returns the UserDisplayName field if non-nil, zero value otherwise. - -### GetUserDisplayNameOk - -`func (o *FactorInner) GetUserDisplayNameOk() (*string, bool)` - -GetUserDisplayNameOk returns a tuple with the UserDisplayName field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUserDisplayName - -`func (o *FactorInner) SetUserDisplayName(v string)` - -SetUserDisplayName sets UserDisplayName field to given value. - -### HasUserDisplayName - -`func (o *FactorInner) HasUserDisplayName() bool` - -HasUserDisplayName returns a boolean if a field has been set. - -### GetExpiresAt - -`func (o *FactorInner) GetExpiresAt() string` - -GetExpiresAt returns the ExpiresAt field if non-nil, zero value otherwise. - -### GetExpiresAtOk - -`func (o *FactorInner) GetExpiresAtOk() (*string, bool)` - -GetExpiresAtOk returns a tuple with the ExpiresAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetExpiresAt - -`func (o *FactorInner) SetExpiresAt(v string)` - -SetExpiresAt sets ExpiresAt field to given value. - -### HasExpiresAt - -`func (o *FactorInner) HasExpiresAt() bool` - -HasExpiresAt returns a boolean if a field has been set. - -### GetFactorData - -`func (o *FactorInner) GetFactorData() FactorInnerFactorData` - -GetFactorData returns the FactorData field if non-nil, zero value otherwise. - -### GetFactorDataOk - -`func (o *FactorInner) GetFactorDataOk() (*FactorInnerFactorData, bool)` - -GetFactorDataOk returns a tuple with the FactorData field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetFactorData - -`func (o *FactorInner) SetFactorData(v FactorInnerFactorData)` - -SetFactorData sets FactorData field to given value. - -### HasFactorData - -`func (o *FactorInner) HasFactorData() bool` - -HasFactorData 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/FactorInnerFactorData.md b/docs/FactorInnerFactorData.md deleted file mode 100644 index 191fb43..0000000 --- a/docs/FactorInnerFactorData.md +++ /dev/null @@ -1,82 +0,0 @@ -# FactorInnerFactorData - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**VerificationToken** | Pointer to **string** | The token which can be used to verify the factor registration. | [optional] -**TotpUrl** | Pointer to **string** | OTP Url that can be leveraged for any authenticator that supports the key uri format. | [optional] - -## Methods - -### NewFactorInnerFactorData - -`func NewFactorInnerFactorData() *FactorInnerFactorData` - -NewFactorInnerFactorData instantiates a new FactorInnerFactorData 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 - -### NewFactorInnerFactorDataWithDefaults - -`func NewFactorInnerFactorDataWithDefaults() *FactorInnerFactorData` - -NewFactorInnerFactorDataWithDefaults instantiates a new FactorInnerFactorData 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 - -### GetVerificationToken - -`func (o *FactorInnerFactorData) GetVerificationToken() string` - -GetVerificationToken returns the VerificationToken field if non-nil, zero value otherwise. - -### GetVerificationTokenOk - -`func (o *FactorInnerFactorData) GetVerificationTokenOk() (*string, bool)` - -GetVerificationTokenOk returns a tuple with the VerificationToken field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetVerificationToken - -`func (o *FactorInnerFactorData) SetVerificationToken(v string)` - -SetVerificationToken sets VerificationToken field to given value. - -### HasVerificationToken - -`func (o *FactorInnerFactorData) HasVerificationToken() bool` - -HasVerificationToken returns a boolean if a field has been set. - -### GetTotpUrl - -`func (o *FactorInnerFactorData) GetTotpUrl() string` - -GetTotpUrl returns the TotpUrl field if non-nil, zero value otherwise. - -### GetTotpUrlOk - -`func (o *FactorInnerFactorData) GetTotpUrlOk() (*string, bool)` - -GetTotpUrlOk returns a tuple with the TotpUrl field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTotpUrl - -`func (o *FactorInnerFactorData) SetTotpUrl(v string)` - -SetTotpUrl sets TotpUrl field to given value. - -### HasTotpUrl - -`func (o *FactorInnerFactorData) HasTotpUrl() bool` - -HasTotpUrl 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/GenerateMfaToken200Response.md b/docs/GenerateMfaToken200Response.md index b93fcf2..6d26f97 100644 --- a/docs/GenerateMfaToken200Response.md +++ b/docs/GenerateMfaToken200Response.md @@ -1,133 +1,107 @@ -# GenerateMfaToken200Response +# GenerateMFAtoken200Response ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **MfaToken** | Pointer to **string** | Token can function as a temporary MFA token. It can be used to authenticate for any app when valid. | [optional] -**Reusable** | Pointer to **bool** | true indcates the token can be used multiple times. false indicates the token is invalid after a single use | [optional] +**Resuable** | Pointer to **bool** | true indcates the token can be used multiple times, until it expires. false indicates the token is invalid after a single use or once it expires. Defaults to false. | [optional] **ExpiresAt** | Pointer to **string** | Defines the expiration time and date for the token. Format is UTC time. | [optional] -**DeviceId** | Pointer to **string** | Defines the expiration time and date for the token. Format is UTC time. | [optional] ## Methods -### NewGenerateMfaToken200Response +### NewGenerateMFAtoken200Response -`func NewGenerateMfaToken200Response() *GenerateMfaToken200Response` +`func NewGenerateMFAtoken200Response() *GenerateMFAtoken200Response` -NewGenerateMfaToken200Response instantiates a new GenerateMfaToken200Response object +NewGenerateMFAtoken200Response instantiates a new GenerateMFAtoken200Response 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 -### NewGenerateMfaToken200ResponseWithDefaults +### NewGenerateMFAtoken200ResponseWithDefaults -`func NewGenerateMfaToken200ResponseWithDefaults() *GenerateMfaToken200Response` +`func NewGenerateMFAtoken200ResponseWithDefaults() *GenerateMFAtoken200Response` -NewGenerateMfaToken200ResponseWithDefaults instantiates a new GenerateMfaToken200Response object +NewGenerateMFAtoken200ResponseWithDefaults instantiates a new GenerateMFAtoken200Response 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 ### GetMfaToken -`func (o *GenerateMfaToken200Response) GetMfaToken() string` +`func (o *GenerateMFAtoken200Response) GetMfaToken() string` GetMfaToken returns the MfaToken field if non-nil, zero value otherwise. ### GetMfaTokenOk -`func (o *GenerateMfaToken200Response) GetMfaTokenOk() (*string, bool)` +`func (o *GenerateMFAtoken200Response) GetMfaTokenOk() (*string, bool)` GetMfaTokenOk returns a tuple with the MfaToken field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetMfaToken -`func (o *GenerateMfaToken200Response) SetMfaToken(v string)` +`func (o *GenerateMFAtoken200Response) SetMfaToken(v string)` SetMfaToken sets MfaToken field to given value. ### HasMfaToken -`func (o *GenerateMfaToken200Response) HasMfaToken() bool` +`func (o *GenerateMFAtoken200Response) HasMfaToken() bool` HasMfaToken returns a boolean if a field has been set. -### GetReusable +### GetResuable -`func (o *GenerateMfaToken200Response) GetReusable() bool` +`func (o *GenerateMFAtoken200Response) GetResuable() bool` -GetReusable returns the Reusable field if non-nil, zero value otherwise. +GetResuable returns the Resuable field if non-nil, zero value otherwise. -### GetReusableOk +### GetResuableOk -`func (o *GenerateMfaToken200Response) GetReusableOk() (*bool, bool)` +`func (o *GenerateMFAtoken200Response) GetResuableOk() (*bool, bool)` -GetReusableOk returns a tuple with the Reusable field if it's non-nil, zero value otherwise +GetResuableOk returns a tuple with the Resuable field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetReusable +### SetResuable -`func (o *GenerateMfaToken200Response) SetReusable(v bool)` +`func (o *GenerateMFAtoken200Response) SetResuable(v bool)` -SetReusable sets Reusable field to given value. +SetResuable sets Resuable field to given value. -### HasReusable +### HasResuable -`func (o *GenerateMfaToken200Response) HasReusable() bool` +`func (o *GenerateMFAtoken200Response) HasResuable() bool` -HasReusable returns a boolean if a field has been set. +HasResuable returns a boolean if a field has been set. ### GetExpiresAt -`func (o *GenerateMfaToken200Response) GetExpiresAt() string` +`func (o *GenerateMFAtoken200Response) GetExpiresAt() string` GetExpiresAt returns the ExpiresAt field if non-nil, zero value otherwise. ### GetExpiresAtOk -`func (o *GenerateMfaToken200Response) GetExpiresAtOk() (*string, bool)` +`func (o *GenerateMFAtoken200Response) GetExpiresAtOk() (*string, bool)` GetExpiresAtOk returns a tuple with the ExpiresAt field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetExpiresAt -`func (o *GenerateMfaToken200Response) SetExpiresAt(v string)` +`func (o *GenerateMFAtoken200Response) SetExpiresAt(v string)` SetExpiresAt sets ExpiresAt field to given value. ### HasExpiresAt -`func (o *GenerateMfaToken200Response) HasExpiresAt() bool` +`func (o *GenerateMFAtoken200Response) HasExpiresAt() bool` HasExpiresAt returns a boolean if a field has been set. -### GetDeviceId - -`func (o *GenerateMfaToken200Response) GetDeviceId() string` - -GetDeviceId returns the DeviceId field if non-nil, zero value otherwise. - -### GetDeviceIdOk - -`func (o *GenerateMfaToken200Response) GetDeviceIdOk() (*string, bool)` - -GetDeviceIdOk returns a tuple with the DeviceId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDeviceId - -`func (o *GenerateMfaToken200Response) SetDeviceId(v string)` - -SetDeviceId sets DeviceId field to given value. - -### HasDeviceId - -`func (o *GenerateMfaToken200Response) HasDeviceId() bool` - -HasDeviceId 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/GenerateMfaToken422Response.md b/docs/GenerateMfaToken422Response.md deleted file mode 100644 index 630a531..0000000 --- a/docs/GenerateMfaToken422Response.md +++ /dev/null @@ -1,134 +0,0 @@ -# GenerateMfaToken422Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**StatusCode** | Pointer to **int32** | | [optional] -**Name** | Pointer to **string** | | [optional] -**Message** | Pointer to **string** | | [optional] -**Details** | Pointer to [**GenerateMfaToken422ResponseDetails**](GenerateMfaToken422ResponseDetails.md) | | [optional] - -## Methods - -### NewGenerateMfaToken422Response - -`func NewGenerateMfaToken422Response() *GenerateMfaToken422Response` - -NewGenerateMfaToken422Response instantiates a new GenerateMfaToken422Response 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 - -### NewGenerateMfaToken422ResponseWithDefaults - -`func NewGenerateMfaToken422ResponseWithDefaults() *GenerateMfaToken422Response` - -NewGenerateMfaToken422ResponseWithDefaults instantiates a new GenerateMfaToken422Response 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 - -### GetStatusCode - -`func (o *GenerateMfaToken422Response) GetStatusCode() int32` - -GetStatusCode returns the StatusCode field if non-nil, zero value otherwise. - -### GetStatusCodeOk - -`func (o *GenerateMfaToken422Response) GetStatusCodeOk() (*int32, bool)` - -GetStatusCodeOk returns a tuple with the StatusCode field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStatusCode - -`func (o *GenerateMfaToken422Response) SetStatusCode(v int32)` - -SetStatusCode sets StatusCode field to given value. - -### HasStatusCode - -`func (o *GenerateMfaToken422Response) HasStatusCode() bool` - -HasStatusCode returns a boolean if a field has been set. - -### GetName - -`func (o *GenerateMfaToken422Response) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *GenerateMfaToken422Response) 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 *GenerateMfaToken422Response) SetName(v string)` - -SetName sets Name field to given value. - -### HasName - -`func (o *GenerateMfaToken422Response) HasName() bool` - -HasName returns a boolean if a field has been set. - -### GetMessage - -`func (o *GenerateMfaToken422Response) GetMessage() string` - -GetMessage returns the Message field if non-nil, zero value otherwise. - -### GetMessageOk - -`func (o *GenerateMfaToken422Response) GetMessageOk() (*string, bool)` - -GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMessage - -`func (o *GenerateMfaToken422Response) SetMessage(v string)` - -SetMessage sets Message field to given value. - -### HasMessage - -`func (o *GenerateMfaToken422Response) HasMessage() bool` - -HasMessage returns a boolean if a field has been set. - -### GetDetails - -`func (o *GenerateMfaToken422Response) GetDetails() GenerateMfaToken422ResponseDetails` - -GetDetails returns the Details field if non-nil, zero value otherwise. - -### GetDetailsOk - -`func (o *GenerateMfaToken422Response) GetDetailsOk() (*GenerateMfaToken422ResponseDetails, bool)` - -GetDetailsOk returns a tuple with the Details field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDetails - -`func (o *GenerateMfaToken422Response) SetDetails(v GenerateMfaToken422ResponseDetails)` - -SetDetails sets Details field to given value. - -### HasDetails - -`func (o *GenerateMfaToken422Response) HasDetails() bool` - -HasDetails 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/GenerateMfaToken422ResponseDetails.md b/docs/GenerateMfaToken422ResponseDetails.md deleted file mode 100644 index 687352f..0000000 --- a/docs/GenerateMfaToken422ResponseDetails.md +++ /dev/null @@ -1,56 +0,0 @@ -# GenerateMfaToken422ResponseDetails - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Parameters** | Pointer to **[]string** | | [optional] - -## Methods - -### NewGenerateMfaToken422ResponseDetails - -`func NewGenerateMfaToken422ResponseDetails() *GenerateMfaToken422ResponseDetails` - -NewGenerateMfaToken422ResponseDetails instantiates a new GenerateMfaToken422ResponseDetails 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 - -### NewGenerateMfaToken422ResponseDetailsWithDefaults - -`func NewGenerateMfaToken422ResponseDetailsWithDefaults() *GenerateMfaToken422ResponseDetails` - -NewGenerateMfaToken422ResponseDetailsWithDefaults instantiates a new GenerateMfaToken422ResponseDetails 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 - -### GetParameters - -`func (o *GenerateMfaToken422ResponseDetails) GetParameters() []string` - -GetParameters returns the Parameters field if non-nil, zero value otherwise. - -### GetParametersOk - -`func (o *GenerateMfaToken422ResponseDetails) GetParametersOk() (*[]string, bool)` - -GetParametersOk returns a tuple with the Parameters field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetParameters - -`func (o *GenerateMfaToken422ResponseDetails) SetParameters(v []string)` - -SetParameters sets Parameters field to given value. - -### HasParameters - -`func (o *GenerateMfaToken422ResponseDetails) HasParameters() bool` - -HasParameters 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/GenerateMfaTokenRequest.md b/docs/GenerateMfaTokenRequest.md index 22784cb..a4c7c98 100644 --- a/docs/GenerateMfaTokenRequest.md +++ b/docs/GenerateMfaTokenRequest.md @@ -1,78 +1,78 @@ -# GenerateMfaTokenRequest +# GenerateMFAtokenRequest ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ExpiresIn** | Pointer to **string** | Set the duration of the token in seconds. | [optional] -**Reusable** | Pointer to **bool** | Defines if the token is reusable multiple times within the expiry window. | [optional] +**ExpiresIn** | Pointer to **int32** | Set the duration of the token in seconds. Token expiration defaults to 259200 seconds = 72 hours. 72 hours is the max value. | [optional] +**Reusable** | Pointer to **bool** | Defines if the token is reusable multiple times within the expiry window. Value defaults to false. If set to true, token can be used multiple times, until it expires. | [optional] [default to false] ## Methods -### NewGenerateMfaTokenRequest +### NewGenerateMFAtokenRequest -`func NewGenerateMfaTokenRequest() *GenerateMfaTokenRequest` +`func NewGenerateMFAtokenRequest() *GenerateMFAtokenRequest` -NewGenerateMfaTokenRequest instantiates a new GenerateMfaTokenRequest object +NewGenerateMFAtokenRequest instantiates a new GenerateMFAtokenRequest 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 -### NewGenerateMfaTokenRequestWithDefaults +### NewGenerateMFAtokenRequestWithDefaults -`func NewGenerateMfaTokenRequestWithDefaults() *GenerateMfaTokenRequest` +`func NewGenerateMFAtokenRequestWithDefaults() *GenerateMFAtokenRequest` -NewGenerateMfaTokenRequestWithDefaults instantiates a new GenerateMfaTokenRequest object +NewGenerateMFAtokenRequestWithDefaults instantiates a new GenerateMFAtokenRequest 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 ### GetExpiresIn -`func (o *GenerateMfaTokenRequest) GetExpiresIn() string` +`func (o *GenerateMFAtokenRequest) GetExpiresIn() int32` GetExpiresIn returns the ExpiresIn field if non-nil, zero value otherwise. ### GetExpiresInOk -`func (o *GenerateMfaTokenRequest) GetExpiresInOk() (*string, bool)` +`func (o *GenerateMFAtokenRequest) GetExpiresInOk() (*int32, bool)` GetExpiresInOk returns a tuple with the ExpiresIn field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetExpiresIn -`func (o *GenerateMfaTokenRequest) SetExpiresIn(v string)` +`func (o *GenerateMFAtokenRequest) SetExpiresIn(v int32)` SetExpiresIn sets ExpiresIn field to given value. ### HasExpiresIn -`func (o *GenerateMfaTokenRequest) HasExpiresIn() bool` +`func (o *GenerateMFAtokenRequest) HasExpiresIn() bool` HasExpiresIn returns a boolean if a field has been set. ### GetReusable -`func (o *GenerateMfaTokenRequest) GetReusable() bool` +`func (o *GenerateMFAtokenRequest) GetReusable() bool` GetReusable returns the Reusable field if non-nil, zero value otherwise. ### GetReusableOk -`func (o *GenerateMfaTokenRequest) GetReusableOk() (*bool, bool)` +`func (o *GenerateMFAtokenRequest) GetReusableOk() (*bool, bool)` GetReusableOk returns a tuple with the Reusable field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetReusable -`func (o *GenerateMfaTokenRequest) SetReusable(v bool)` +`func (o *GenerateMFAtokenRequest) SetReusable(v bool)` SetReusable sets Reusable field to given value. ### HasReusable -`func (o *GenerateMfaTokenRequest) HasReusable() bool` +`func (o *GenerateMFAtokenRequest) HasReusable() bool` HasReusable returns a boolean if a field has been set. diff --git a/docs/GenerateOTP201Response.md b/docs/GenerateOTP201Response.md new file mode 100644 index 0000000..7c2b1f8 --- /dev/null +++ b/docs/GenerateOTP201Response.md @@ -0,0 +1,134 @@ +# GenerateOTP201Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**MfaToken** | Pointer to **string** | Token can function as a temporary MFA token. It can be used to authenticate for any app when valid. | [optional] +**Reusable** | Pointer to **bool** | true indcates the token can be used multiple times, until it expires. false indicates the token is invalid after a single use or once it expires. Defaults to false. | [optional] [default to false] +**ExpiresAt** | Pointer to **string** | Defines the expiration time and date for the token. Format is UTC time. | [optional] +**DeviceId** | Pointer to **string** | A unique identifier for the temp otp device that has been created for this token. | [optional] + +## Methods + +### NewGenerateOTP201Response + +`func NewGenerateOTP201Response() *GenerateOTP201Response` + +NewGenerateOTP201Response instantiates a new GenerateOTP201Response 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 + +### NewGenerateOTP201ResponseWithDefaults + +`func NewGenerateOTP201ResponseWithDefaults() *GenerateOTP201Response` + +NewGenerateOTP201ResponseWithDefaults instantiates a new GenerateOTP201Response 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 + +### GetMfaToken + +`func (o *GenerateOTP201Response) GetMfaToken() string` + +GetMfaToken returns the MfaToken field if non-nil, zero value otherwise. + +### GetMfaTokenOk + +`func (o *GenerateOTP201Response) GetMfaTokenOk() (*string, bool)` + +GetMfaTokenOk returns a tuple with the MfaToken field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMfaToken + +`func (o *GenerateOTP201Response) SetMfaToken(v string)` + +SetMfaToken sets MfaToken field to given value. + +### HasMfaToken + +`func (o *GenerateOTP201Response) HasMfaToken() bool` + +HasMfaToken returns a boolean if a field has been set. + +### GetReusable + +`func (o *GenerateOTP201Response) GetReusable() bool` + +GetReusable returns the Reusable field if non-nil, zero value otherwise. + +### GetReusableOk + +`func (o *GenerateOTP201Response) GetReusableOk() (*bool, bool)` + +GetReusableOk returns a tuple with the Reusable field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReusable + +`func (o *GenerateOTP201Response) SetReusable(v bool)` + +SetReusable sets Reusable field to given value. + +### HasReusable + +`func (o *GenerateOTP201Response) HasReusable() bool` + +HasReusable returns a boolean if a field has been set. + +### GetExpiresAt + +`func (o *GenerateOTP201Response) GetExpiresAt() string` + +GetExpiresAt returns the ExpiresAt field if non-nil, zero value otherwise. + +### GetExpiresAtOk + +`func (o *GenerateOTP201Response) GetExpiresAtOk() (*string, bool)` + +GetExpiresAtOk returns a tuple with the ExpiresAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExpiresAt + +`func (o *GenerateOTP201Response) SetExpiresAt(v string)` + +SetExpiresAt sets ExpiresAt field to given value. + +### HasExpiresAt + +`func (o *GenerateOTP201Response) HasExpiresAt() bool` + +HasExpiresAt returns a boolean if a field has been set. + +### GetDeviceId + +`func (o *GenerateOTP201Response) GetDeviceId() string` + +GetDeviceId returns the DeviceId field if non-nil, zero value otherwise. + +### GetDeviceIdOk + +`func (o *GenerateOTP201Response) GetDeviceIdOk() (*string, bool)` + +GetDeviceIdOk returns a tuple with the DeviceId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDeviceId + +`func (o *GenerateOTP201Response) SetDeviceId(v string)` + +SetDeviceId sets DeviceId field to given value. + +### HasDeviceId + +`func (o *GenerateOTP201Response) HasDeviceId() bool` + +HasDeviceId 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/GenerateOTPRequest.md b/docs/GenerateOTPRequest.md new file mode 100644 index 0000000..a1c2cdb --- /dev/null +++ b/docs/GenerateOTPRequest.md @@ -0,0 +1,82 @@ +# GenerateOTPRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ExpiresIn** | Pointer to **int32** | Set the duration of the token in seconds. Token expiration defaults to 259200 seconds = 72 hours. 72 hours is the max value. | [optional] +**Reusable** | Pointer to **bool** | Defines if the token is reusable multiple times within the expiry window. Value defaults to false. If set to true, token can be used multiple times, until it expires. | [optional] [default to false] + +## Methods + +### NewGenerateOTPRequest + +`func NewGenerateOTPRequest() *GenerateOTPRequest` + +NewGenerateOTPRequest instantiates a new GenerateOTPRequest 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 + +### NewGenerateOTPRequestWithDefaults + +`func NewGenerateOTPRequestWithDefaults() *GenerateOTPRequest` + +NewGenerateOTPRequestWithDefaults instantiates a new GenerateOTPRequest 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 + +### GetExpiresIn + +`func (o *GenerateOTPRequest) GetExpiresIn() int32` + +GetExpiresIn returns the ExpiresIn field if non-nil, zero value otherwise. + +### GetExpiresInOk + +`func (o *GenerateOTPRequest) GetExpiresInOk() (*int32, bool)` + +GetExpiresInOk returns a tuple with the ExpiresIn field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExpiresIn + +`func (o *GenerateOTPRequest) SetExpiresIn(v int32)` + +SetExpiresIn sets ExpiresIn field to given value. + +### HasExpiresIn + +`func (o *GenerateOTPRequest) HasExpiresIn() bool` + +HasExpiresIn returns a boolean if a field has been set. + +### GetReusable + +`func (o *GenerateOTPRequest) GetReusable() bool` + +GetReusable returns the Reusable field if non-nil, zero value otherwise. + +### GetReusableOk + +`func (o *GenerateOTPRequest) GetReusableOk() (*bool, bool)` + +GetReusableOk returns a tuple with the Reusable field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReusable + +`func (o *GenerateOTPRequest) SetReusable(v bool)` + +SetReusable sets Reusable field to given value. + +### HasReusable + +`func (o *GenerateOTPRequest) HasReusable() bool` + +HasReusable 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/GenerateSamlAssert200Response.md b/docs/GenerateSamlAssert200Response.md new file mode 100644 index 0000000..f410752 --- /dev/null +++ b/docs/GenerateSamlAssert200Response.md @@ -0,0 +1,82 @@ +# GenerateSamlAssert200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Status** | Pointer to [**Error**](Error.md) | | [optional] +**Data** | Pointer to **[]map[string]interface{}** | | [optional] + +## Methods + +### NewGenerateSamlAssert200Response + +`func NewGenerateSamlAssert200Response() *GenerateSamlAssert200Response` + +NewGenerateSamlAssert200Response instantiates a new GenerateSamlAssert200Response 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 + +### NewGenerateSamlAssert200ResponseWithDefaults + +`func NewGenerateSamlAssert200ResponseWithDefaults() *GenerateSamlAssert200Response` + +NewGenerateSamlAssert200ResponseWithDefaults instantiates a new GenerateSamlAssert200Response 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 + +### GetStatus + +`func (o *GenerateSamlAssert200Response) GetStatus() Error` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *GenerateSamlAssert200Response) GetStatusOk() (*Error, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *GenerateSamlAssert200Response) SetStatus(v Error)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *GenerateSamlAssert200Response) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### GetData + +`func (o *GenerateSamlAssert200Response) GetData() []map[string]interface{}` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *GenerateSamlAssert200Response) GetDataOk() (*[]map[string]interface{}, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *GenerateSamlAssert200Response) SetData(v []map[string]interface{})` + +SetData sets Data field to given value. + +### HasData + +`func (o *GenerateSamlAssert200Response) HasData() bool` + +HasData 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/GenerateTokenRequest.md b/docs/GenerateTokenRequest.md index 076c46b..9facda4 100644 --- a/docs/GenerateTokenRequest.md +++ b/docs/GenerateTokenRequest.md @@ -4,13 +4,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**GrantType** | Pointer to **string** | | [optional] +**GrantType** | **string** | Set to client_credentials. | [default to "client_credentials"] ## Methods ### NewGenerateTokenRequest -`func NewGenerateTokenRequest() *GenerateTokenRequest` +`func NewGenerateTokenRequest(grantType string, ) *GenerateTokenRequest` NewGenerateTokenRequest instantiates a new GenerateTokenRequest object This constructor will assign default values to properties that have it defined, @@ -44,11 +44,6 @@ and a boolean to check if the value has been set. SetGrantType sets GrantType field to given value. -### HasGrantType - -`func (o *GenerateTokenRequest) HasGrantType() bool` - -HasGrantType 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/GenericApp.md b/docs/GenericApp.md new file mode 100644 index 0000000..05bf94e --- /dev/null +++ b/docs/GenericApp.md @@ -0,0 +1,472 @@ +# GenericApp + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **int32** | Apps unique ID in OneLogin. | [optional] [readonly] +**Name** | Pointer to **string** | The name of the app. | [optional] +**Visible** | Pointer to **bool** | Indicates if the app is visible in the OneLogin portal. | [optional] +**Description** | Pointer to **string** | Freeform description of the app. | [optional] +**Notes** | Pointer to **string** | Freeform notes about the app. | [optional] +**IconUrl** | Pointer to **string** | A link to the apps icon url | [optional] +**AuthMethod** | Pointer to [**AuthMethod**](AuthMethod.md) | | [optional] +**PolicyId** | Pointer to **int32** | The security policy assigned to the app. | [optional] +**AllowAssumedSignin** | Pointer to **bool** | Indicates whether or not administrators can access the app as a user that they have assumed control over. | [optional] +**TabId** | Pointer to **int32** | ID of the OneLogin portal tab that the app is assigned to. | [optional] +**ConnectorId** | Pointer to **int32** | ID of the connector to base the app from. | [optional] +**CreatedAt** | Pointer to **string** | the date the app was created | [optional] +**UpdatedAt** | Pointer to **string** | the date the app was last updated | [optional] +**RoleIds** | Pointer to **[]int32** | List of Role IDs that are assigned to the app. On App Create or Update the entire array is replaced with the values provided. | [optional] +**Provisioning** | Pointer to [**GenericAppProvisioning**](GenericAppProvisioning.md) | | [optional] +**Parameters** | Pointer to [**AppParameters**](AppParameters.md) | | [optional] +**EnforcementPoint** | Pointer to [**EnforcementPoint**](EnforcementPoint.md) | | [optional] + +## Methods + +### NewGenericApp + +`func NewGenericApp() *GenericApp` + +NewGenericApp instantiates a new GenericApp 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 + +### NewGenericAppWithDefaults + +`func NewGenericAppWithDefaults() *GenericApp` + +NewGenericAppWithDefaults instantiates a new GenericApp 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 + +### GetId + +`func (o *GenericApp) GetId() int32` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *GenericApp) GetIdOk() (*int32, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *GenericApp) SetId(v int32)` + +SetId sets Id field to given value. + +### HasId + +`func (o *GenericApp) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetName + +`func (o *GenericApp) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *GenericApp) 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 *GenericApp) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *GenericApp) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetVisible + +`func (o *GenericApp) GetVisible() bool` + +GetVisible returns the Visible field if non-nil, zero value otherwise. + +### GetVisibleOk + +`func (o *GenericApp) GetVisibleOk() (*bool, bool)` + +GetVisibleOk returns a tuple with the Visible field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVisible + +`func (o *GenericApp) SetVisible(v bool)` + +SetVisible sets Visible field to given value. + +### HasVisible + +`func (o *GenericApp) HasVisible() bool` + +HasVisible returns a boolean if a field has been set. + +### GetDescription + +`func (o *GenericApp) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *GenericApp) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *GenericApp) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *GenericApp) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetNotes + +`func (o *GenericApp) GetNotes() string` + +GetNotes returns the Notes field if non-nil, zero value otherwise. + +### GetNotesOk + +`func (o *GenericApp) GetNotesOk() (*string, bool)` + +GetNotesOk returns a tuple with the Notes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNotes + +`func (o *GenericApp) SetNotes(v string)` + +SetNotes sets Notes field to given value. + +### HasNotes + +`func (o *GenericApp) HasNotes() bool` + +HasNotes returns a boolean if a field has been set. + +### GetIconUrl + +`func (o *GenericApp) GetIconUrl() string` + +GetIconUrl returns the IconUrl field if non-nil, zero value otherwise. + +### GetIconUrlOk + +`func (o *GenericApp) GetIconUrlOk() (*string, bool)` + +GetIconUrlOk returns a tuple with the IconUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIconUrl + +`func (o *GenericApp) SetIconUrl(v string)` + +SetIconUrl sets IconUrl field to given value. + +### HasIconUrl + +`func (o *GenericApp) HasIconUrl() bool` + +HasIconUrl returns a boolean if a field has been set. + +### GetAuthMethod + +`func (o *GenericApp) GetAuthMethod() AuthMethod` + +GetAuthMethod returns the AuthMethod field if non-nil, zero value otherwise. + +### GetAuthMethodOk + +`func (o *GenericApp) GetAuthMethodOk() (*AuthMethod, bool)` + +GetAuthMethodOk returns a tuple with the AuthMethod field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAuthMethod + +`func (o *GenericApp) SetAuthMethod(v AuthMethod)` + +SetAuthMethod sets AuthMethod field to given value. + +### HasAuthMethod + +`func (o *GenericApp) HasAuthMethod() bool` + +HasAuthMethod returns a boolean if a field has been set. + +### GetPolicyId + +`func (o *GenericApp) GetPolicyId() int32` + +GetPolicyId returns the PolicyId field if non-nil, zero value otherwise. + +### GetPolicyIdOk + +`func (o *GenericApp) GetPolicyIdOk() (*int32, bool)` + +GetPolicyIdOk returns a tuple with the PolicyId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPolicyId + +`func (o *GenericApp) SetPolicyId(v int32)` + +SetPolicyId sets PolicyId field to given value. + +### HasPolicyId + +`func (o *GenericApp) HasPolicyId() bool` + +HasPolicyId returns a boolean if a field has been set. + +### GetAllowAssumedSignin + +`func (o *GenericApp) GetAllowAssumedSignin() bool` + +GetAllowAssumedSignin returns the AllowAssumedSignin field if non-nil, zero value otherwise. + +### GetAllowAssumedSigninOk + +`func (o *GenericApp) GetAllowAssumedSigninOk() (*bool, bool)` + +GetAllowAssumedSigninOk returns a tuple with the AllowAssumedSignin field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAllowAssumedSignin + +`func (o *GenericApp) SetAllowAssumedSignin(v bool)` + +SetAllowAssumedSignin sets AllowAssumedSignin field to given value. + +### HasAllowAssumedSignin + +`func (o *GenericApp) HasAllowAssumedSignin() bool` + +HasAllowAssumedSignin returns a boolean if a field has been set. + +### GetTabId + +`func (o *GenericApp) GetTabId() int32` + +GetTabId returns the TabId field if non-nil, zero value otherwise. + +### GetTabIdOk + +`func (o *GenericApp) GetTabIdOk() (*int32, bool)` + +GetTabIdOk returns a tuple with the TabId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTabId + +`func (o *GenericApp) SetTabId(v int32)` + +SetTabId sets TabId field to given value. + +### HasTabId + +`func (o *GenericApp) HasTabId() bool` + +HasTabId returns a boolean if a field has been set. + +### GetConnectorId + +`func (o *GenericApp) GetConnectorId() int32` + +GetConnectorId returns the ConnectorId field if non-nil, zero value otherwise. + +### GetConnectorIdOk + +`func (o *GenericApp) GetConnectorIdOk() (*int32, bool)` + +GetConnectorIdOk returns a tuple with the ConnectorId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConnectorId + +`func (o *GenericApp) SetConnectorId(v int32)` + +SetConnectorId sets ConnectorId field to given value. + +### HasConnectorId + +`func (o *GenericApp) HasConnectorId() bool` + +HasConnectorId returns a boolean if a field has been set. + +### GetCreatedAt + +`func (o *GenericApp) GetCreatedAt() string` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *GenericApp) GetCreatedAtOk() (*string, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *GenericApp) SetCreatedAt(v string)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *GenericApp) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### GetUpdatedAt + +`func (o *GenericApp) GetUpdatedAt() string` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *GenericApp) GetUpdatedAtOk() (*string, bool)` + +GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedAt + +`func (o *GenericApp) SetUpdatedAt(v string)` + +SetUpdatedAt sets UpdatedAt field to given value. + +### HasUpdatedAt + +`func (o *GenericApp) HasUpdatedAt() bool` + +HasUpdatedAt returns a boolean if a field has been set. + +### GetRoleIds + +`func (o *GenericApp) GetRoleIds() []int32` + +GetRoleIds returns the RoleIds field if non-nil, zero value otherwise. + +### GetRoleIdsOk + +`func (o *GenericApp) GetRoleIdsOk() (*[]int32, bool)` + +GetRoleIdsOk returns a tuple with the RoleIds field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRoleIds + +`func (o *GenericApp) SetRoleIds(v []int32)` + +SetRoleIds sets RoleIds field to given value. + +### HasRoleIds + +`func (o *GenericApp) HasRoleIds() bool` + +HasRoleIds returns a boolean if a field has been set. + +### GetProvisioning + +`func (o *GenericApp) GetProvisioning() GenericAppProvisioning` + +GetProvisioning returns the Provisioning field if non-nil, zero value otherwise. + +### GetProvisioningOk + +`func (o *GenericApp) GetProvisioningOk() (*GenericAppProvisioning, bool)` + +GetProvisioningOk returns a tuple with the Provisioning field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProvisioning + +`func (o *GenericApp) SetProvisioning(v GenericAppProvisioning)` + +SetProvisioning sets Provisioning field to given value. + +### HasProvisioning + +`func (o *GenericApp) HasProvisioning() bool` + +HasProvisioning returns a boolean if a field has been set. + +### GetParameters + +`func (o *GenericApp) GetParameters() AppParameters` + +GetParameters returns the Parameters field if non-nil, zero value otherwise. + +### GetParametersOk + +`func (o *GenericApp) GetParametersOk() (*AppParameters, bool)` + +GetParametersOk returns a tuple with the Parameters field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetParameters + +`func (o *GenericApp) SetParameters(v AppParameters)` + +SetParameters sets Parameters field to given value. + +### HasParameters + +`func (o *GenericApp) HasParameters() bool` + +HasParameters returns a boolean if a field has been set. + +### GetEnforcementPoint + +`func (o *GenericApp) GetEnforcementPoint() EnforcementPoint` + +GetEnforcementPoint returns the EnforcementPoint field if non-nil, zero value otherwise. + +### GetEnforcementPointOk + +`func (o *GenericApp) GetEnforcementPointOk() (*EnforcementPoint, bool)` + +GetEnforcementPointOk returns a tuple with the EnforcementPoint field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnforcementPoint + +`func (o *GenericApp) SetEnforcementPoint(v EnforcementPoint)` + +SetEnforcementPoint sets EnforcementPoint field to given value. + +### HasEnforcementPoint + +`func (o *GenericApp) HasEnforcementPoint() bool` + +HasEnforcementPoint 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/SchemaProvisioning.md b/docs/GenericAppProvisioning.md similarity index 61% rename from docs/SchemaProvisioning.md rename to docs/GenericAppProvisioning.md index 5b8a65e..2e704d9 100644 --- a/docs/SchemaProvisioning.md +++ b/docs/GenericAppProvisioning.md @@ -1,52 +1,52 @@ -# SchemaProvisioning +# GenericAppProvisioning ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Enabled** | Pointer to **bool** | Indicates if provisioning is enabled for this app. | [optional] +**Enabled** | Pointer to **bool** | | [optional] ## Methods -### NewSchemaProvisioning +### NewGenericAppProvisioning -`func NewSchemaProvisioning() *SchemaProvisioning` +`func NewGenericAppProvisioning() *GenericAppProvisioning` -NewSchemaProvisioning instantiates a new SchemaProvisioning object +NewGenericAppProvisioning instantiates a new GenericAppProvisioning 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 -### NewSchemaProvisioningWithDefaults +### NewGenericAppProvisioningWithDefaults -`func NewSchemaProvisioningWithDefaults() *SchemaProvisioning` +`func NewGenericAppProvisioningWithDefaults() *GenericAppProvisioning` -NewSchemaProvisioningWithDefaults instantiates a new SchemaProvisioning object +NewGenericAppProvisioningWithDefaults instantiates a new GenericAppProvisioning 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 ### GetEnabled -`func (o *SchemaProvisioning) GetEnabled() bool` +`func (o *GenericAppProvisioning) GetEnabled() bool` GetEnabled returns the Enabled field if non-nil, zero value otherwise. ### GetEnabledOk -`func (o *SchemaProvisioning) GetEnabledOk() (*bool, bool)` +`func (o *GenericAppProvisioning) 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 *SchemaProvisioning) SetEnabled(v bool)` +`func (o *GenericAppProvisioning) SetEnabled(v bool)` SetEnabled sets Enabled field to given value. ### HasEnabled -`func (o *SchemaProvisioning) HasEnabled() bool` +`func (o *GenericAppProvisioning) HasEnabled() bool` HasEnabled returns a boolean if a field has been set. diff --git a/docs/GetAssignedUser200Response.md b/docs/GetAssignedUser200Response.md new file mode 100644 index 0000000..a79fac2 --- /dev/null +++ b/docs/GetAssignedUser200Response.md @@ -0,0 +1,226 @@ +# GetAssignedUser200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Total** | Pointer to **int32** | | [optional] +**Users** | Pointer to **[]int32** | | [optional] +**BeforeCursor** | Pointer to **NullableInt32** | | [optional] +**PreviousLink** | Pointer to **NullableString** | | [optional] +**AfterCursor** | Pointer to **NullableInt32** | | [optional] +**NextLink** | Pointer to **NullableString** | | [optional] + +## Methods + +### NewGetAssignedUser200Response + +`func NewGetAssignedUser200Response() *GetAssignedUser200Response` + +NewGetAssignedUser200Response instantiates a new GetAssignedUser200Response 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 + +### NewGetAssignedUser200ResponseWithDefaults + +`func NewGetAssignedUser200ResponseWithDefaults() *GetAssignedUser200Response` + +NewGetAssignedUser200ResponseWithDefaults instantiates a new GetAssignedUser200Response 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 + +### GetTotal + +`func (o *GetAssignedUser200Response) GetTotal() int32` + +GetTotal returns the Total field if non-nil, zero value otherwise. + +### GetTotalOk + +`func (o *GetAssignedUser200Response) GetTotalOk() (*int32, bool)` + +GetTotalOk returns a tuple with the Total field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotal + +`func (o *GetAssignedUser200Response) SetTotal(v int32)` + +SetTotal sets Total field to given value. + +### HasTotal + +`func (o *GetAssignedUser200Response) HasTotal() bool` + +HasTotal returns a boolean if a field has been set. + +### GetUsers + +`func (o *GetAssignedUser200Response) GetUsers() []int32` + +GetUsers returns the Users field if non-nil, zero value otherwise. + +### GetUsersOk + +`func (o *GetAssignedUser200Response) 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 *GetAssignedUser200Response) SetUsers(v []int32)` + +SetUsers sets Users field to given value. + +### HasUsers + +`func (o *GetAssignedUser200Response) HasUsers() bool` + +HasUsers returns a boolean if a field has been set. + +### GetBeforeCursor + +`func (o *GetAssignedUser200Response) GetBeforeCursor() int32` + +GetBeforeCursor returns the BeforeCursor field if non-nil, zero value otherwise. + +### GetBeforeCursorOk + +`func (o *GetAssignedUser200Response) GetBeforeCursorOk() (*int32, bool)` + +GetBeforeCursorOk returns a tuple with the BeforeCursor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBeforeCursor + +`func (o *GetAssignedUser200Response) SetBeforeCursor(v int32)` + +SetBeforeCursor sets BeforeCursor field to given value. + +### HasBeforeCursor + +`func (o *GetAssignedUser200Response) HasBeforeCursor() bool` + +HasBeforeCursor returns a boolean if a field has been set. + +### SetBeforeCursorNil + +`func (o *GetAssignedUser200Response) SetBeforeCursorNil(b bool)` + + SetBeforeCursorNil sets the value for BeforeCursor to be an explicit nil + +### UnsetBeforeCursor +`func (o *GetAssignedUser200Response) UnsetBeforeCursor()` + +UnsetBeforeCursor ensures that no value is present for BeforeCursor, not even an explicit nil +### GetPreviousLink + +`func (o *GetAssignedUser200Response) GetPreviousLink() string` + +GetPreviousLink returns the PreviousLink field if non-nil, zero value otherwise. + +### GetPreviousLinkOk + +`func (o *GetAssignedUser200Response) GetPreviousLinkOk() (*string, bool)` + +GetPreviousLinkOk returns a tuple with the PreviousLink field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPreviousLink + +`func (o *GetAssignedUser200Response) SetPreviousLink(v string)` + +SetPreviousLink sets PreviousLink field to given value. + +### HasPreviousLink + +`func (o *GetAssignedUser200Response) HasPreviousLink() bool` + +HasPreviousLink returns a boolean if a field has been set. + +### SetPreviousLinkNil + +`func (o *GetAssignedUser200Response) SetPreviousLinkNil(b bool)` + + SetPreviousLinkNil sets the value for PreviousLink to be an explicit nil + +### UnsetPreviousLink +`func (o *GetAssignedUser200Response) UnsetPreviousLink()` + +UnsetPreviousLink ensures that no value is present for PreviousLink, not even an explicit nil +### GetAfterCursor + +`func (o *GetAssignedUser200Response) GetAfterCursor() int32` + +GetAfterCursor returns the AfterCursor field if non-nil, zero value otherwise. + +### GetAfterCursorOk + +`func (o *GetAssignedUser200Response) GetAfterCursorOk() (*int32, bool)` + +GetAfterCursorOk returns a tuple with the AfterCursor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAfterCursor + +`func (o *GetAssignedUser200Response) SetAfterCursor(v int32)` + +SetAfterCursor sets AfterCursor field to given value. + +### HasAfterCursor + +`func (o *GetAssignedUser200Response) HasAfterCursor() bool` + +HasAfterCursor returns a boolean if a field has been set. + +### SetAfterCursorNil + +`func (o *GetAssignedUser200Response) SetAfterCursorNil(b bool)` + + SetAfterCursorNil sets the value for AfterCursor to be an explicit nil + +### UnsetAfterCursor +`func (o *GetAssignedUser200Response) UnsetAfterCursor()` + +UnsetAfterCursor ensures that no value is present for AfterCursor, not even an explicit nil +### GetNextLink + +`func (o *GetAssignedUser200Response) GetNextLink() string` + +GetNextLink returns the NextLink field if non-nil, zero value otherwise. + +### GetNextLinkOk + +`func (o *GetAssignedUser200Response) GetNextLinkOk() (*string, bool)` + +GetNextLinkOk returns a tuple with the NextLink field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNextLink + +`func (o *GetAssignedUser200Response) SetNextLink(v string)` + +SetNextLink sets NextLink field to given value. + +### HasNextLink + +`func (o *GetAssignedUser200Response) HasNextLink() bool` + +HasNextLink returns a boolean if a field has been set. + +### SetNextLinkNil + +`func (o *GetAssignedUser200Response) SetNextLinkNil(b bool)` + + SetNextLinkNil sets the value for NextLink to be an explicit nil + +### UnsetNextLink +`func (o *GetAssignedUser200Response) UnsetNextLink()` + +UnsetNextLink ensures that no value is present for NextLink, 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/GetAvailableFactors200ResponseInner.md b/docs/GetAuthFactors200Response.md similarity index 61% rename from docs/GetAvailableFactors200ResponseInner.md rename to docs/GetAuthFactors200Response.md index 3111d25..8023c4e 100644 --- a/docs/GetAvailableFactors200ResponseInner.md +++ b/docs/GetAuthFactors200Response.md @@ -1,4 +1,4 @@ -# GetAvailableFactors200ResponseInner +# GetAuthFactors200Response ## Properties @@ -10,95 +10,95 @@ Name | Type | Description | Notes ## Methods -### NewGetAvailableFactors200ResponseInner +### NewGetAuthFactors200Response -`func NewGetAvailableFactors200ResponseInner() *GetAvailableFactors200ResponseInner` +`func NewGetAuthFactors200Response() *GetAuthFactors200Response` -NewGetAvailableFactors200ResponseInner instantiates a new GetAvailableFactors200ResponseInner object +NewGetAuthFactors200Response instantiates a new GetAuthFactors200Response 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 -### NewGetAvailableFactors200ResponseInnerWithDefaults +### NewGetAuthFactors200ResponseWithDefaults -`func NewGetAvailableFactors200ResponseInnerWithDefaults() *GetAvailableFactors200ResponseInner` +`func NewGetAuthFactors200ResponseWithDefaults() *GetAuthFactors200Response` -NewGetAvailableFactors200ResponseInnerWithDefaults instantiates a new GetAvailableFactors200ResponseInner object +NewGetAuthFactors200ResponseWithDefaults instantiates a new GetAuthFactors200Response 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 ### GetFactorId -`func (o *GetAvailableFactors200ResponseInner) GetFactorId() int32` +`func (o *GetAuthFactors200Response) GetFactorId() int32` GetFactorId returns the FactorId field if non-nil, zero value otherwise. ### GetFactorIdOk -`func (o *GetAvailableFactors200ResponseInner) GetFactorIdOk() (*int32, bool)` +`func (o *GetAuthFactors200Response) GetFactorIdOk() (*int32, bool)` GetFactorIdOk returns a tuple with the FactorId field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetFactorId -`func (o *GetAvailableFactors200ResponseInner) SetFactorId(v int32)` +`func (o *GetAuthFactors200Response) SetFactorId(v int32)` SetFactorId sets FactorId field to given value. ### HasFactorId -`func (o *GetAvailableFactors200ResponseInner) HasFactorId() bool` +`func (o *GetAuthFactors200Response) HasFactorId() bool` HasFactorId returns a boolean if a field has been set. ### GetName -`func (o *GetAvailableFactors200ResponseInner) GetName() string` +`func (o *GetAuthFactors200Response) GetName() string` GetName returns the Name field if non-nil, zero value otherwise. ### GetNameOk -`func (o *GetAvailableFactors200ResponseInner) GetNameOk() (*string, bool)` +`func (o *GetAuthFactors200Response) 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 *GetAvailableFactors200ResponseInner) SetName(v string)` +`func (o *GetAuthFactors200Response) SetName(v string)` SetName sets Name field to given value. ### HasName -`func (o *GetAvailableFactors200ResponseInner) HasName() bool` +`func (o *GetAuthFactors200Response) HasName() bool` HasName returns a boolean if a field has been set. ### GetAuthFactorName -`func (o *GetAvailableFactors200ResponseInner) GetAuthFactorName() string` +`func (o *GetAuthFactors200Response) GetAuthFactorName() string` GetAuthFactorName returns the AuthFactorName field if non-nil, zero value otherwise. ### GetAuthFactorNameOk -`func (o *GetAvailableFactors200ResponseInner) GetAuthFactorNameOk() (*string, bool)` +`func (o *GetAuthFactors200Response) GetAuthFactorNameOk() (*string, bool)` GetAuthFactorNameOk returns a tuple with the AuthFactorName field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetAuthFactorName -`func (o *GetAvailableFactors200ResponseInner) SetAuthFactorName(v string)` +`func (o *GetAuthFactors200Response) SetAuthFactorName(v string)` SetAuthFactorName sets AuthFactorName field to given value. ### HasAuthFactorName -`func (o *GetAvailableFactors200ResponseInner) HasAuthFactorName() bool` +`func (o *GetAuthFactors200Response) HasAuthFactorName() bool` HasAuthFactorName returns a boolean if a field has been set. diff --git a/docs/GetAuthenticationDevices200ResponseInner.md b/docs/GetAuthenticationDevices200ResponseInner.md new file mode 100644 index 0000000..c9142b5 --- /dev/null +++ b/docs/GetAuthenticationDevices200ResponseInner.md @@ -0,0 +1,160 @@ +# GetAuthenticationDevices200ResponseInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DeviceId** | Pointer to **string** | MFA device identifier. | [optional] +**UserDisplayName** | Pointer to **string** | Authentication factor display name assigned by users when they register the device. | [optional] +**TypeDisplayName** | Pointer to **string** | Authentication factor display name as it appears to users upon initial registration, as defined by admins at Settings > Authentication Factors. | [optional] +**AuthFactorName** | Pointer to **string** | Authentication factor name, as it appears to administrators in OneLogin. | [optional] +**Default** | Pointer to **bool** | true = is user’s default MFA device for OneLogin. | [optional] [default to false] + +## Methods + +### NewGetAuthenticationDevices200ResponseInner + +`func NewGetAuthenticationDevices200ResponseInner() *GetAuthenticationDevices200ResponseInner` + +NewGetAuthenticationDevices200ResponseInner instantiates a new GetAuthenticationDevices200ResponseInner 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 + +### NewGetAuthenticationDevices200ResponseInnerWithDefaults + +`func NewGetAuthenticationDevices200ResponseInnerWithDefaults() *GetAuthenticationDevices200ResponseInner` + +NewGetAuthenticationDevices200ResponseInnerWithDefaults instantiates a new GetAuthenticationDevices200ResponseInner 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 + +### GetDeviceId + +`func (o *GetAuthenticationDevices200ResponseInner) GetDeviceId() string` + +GetDeviceId returns the DeviceId field if non-nil, zero value otherwise. + +### GetDeviceIdOk + +`func (o *GetAuthenticationDevices200ResponseInner) GetDeviceIdOk() (*string, bool)` + +GetDeviceIdOk returns a tuple with the DeviceId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDeviceId + +`func (o *GetAuthenticationDevices200ResponseInner) SetDeviceId(v string)` + +SetDeviceId sets DeviceId field to given value. + +### HasDeviceId + +`func (o *GetAuthenticationDevices200ResponseInner) HasDeviceId() bool` + +HasDeviceId returns a boolean if a field has been set. + +### GetUserDisplayName + +`func (o *GetAuthenticationDevices200ResponseInner) GetUserDisplayName() string` + +GetUserDisplayName returns the UserDisplayName field if non-nil, zero value otherwise. + +### GetUserDisplayNameOk + +`func (o *GetAuthenticationDevices200ResponseInner) GetUserDisplayNameOk() (*string, bool)` + +GetUserDisplayNameOk returns a tuple with the UserDisplayName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUserDisplayName + +`func (o *GetAuthenticationDevices200ResponseInner) SetUserDisplayName(v string)` + +SetUserDisplayName sets UserDisplayName field to given value. + +### HasUserDisplayName + +`func (o *GetAuthenticationDevices200ResponseInner) HasUserDisplayName() bool` + +HasUserDisplayName returns a boolean if a field has been set. + +### GetTypeDisplayName + +`func (o *GetAuthenticationDevices200ResponseInner) GetTypeDisplayName() string` + +GetTypeDisplayName returns the TypeDisplayName field if non-nil, zero value otherwise. + +### GetTypeDisplayNameOk + +`func (o *GetAuthenticationDevices200ResponseInner) GetTypeDisplayNameOk() (*string, bool)` + +GetTypeDisplayNameOk returns a tuple with the TypeDisplayName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTypeDisplayName + +`func (o *GetAuthenticationDevices200ResponseInner) SetTypeDisplayName(v string)` + +SetTypeDisplayName sets TypeDisplayName field to given value. + +### HasTypeDisplayName + +`func (o *GetAuthenticationDevices200ResponseInner) HasTypeDisplayName() bool` + +HasTypeDisplayName returns a boolean if a field has been set. + +### GetAuthFactorName + +`func (o *GetAuthenticationDevices200ResponseInner) GetAuthFactorName() string` + +GetAuthFactorName returns the AuthFactorName field if non-nil, zero value otherwise. + +### GetAuthFactorNameOk + +`func (o *GetAuthenticationDevices200ResponseInner) GetAuthFactorNameOk() (*string, bool)` + +GetAuthFactorNameOk returns a tuple with the AuthFactorName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAuthFactorName + +`func (o *GetAuthenticationDevices200ResponseInner) SetAuthFactorName(v string)` + +SetAuthFactorName sets AuthFactorName field to given value. + +### HasAuthFactorName + +`func (o *GetAuthenticationDevices200ResponseInner) HasAuthFactorName() bool` + +HasAuthFactorName returns a boolean if a field has been set. + +### GetDefault + +`func (o *GetAuthenticationDevices200ResponseInner) GetDefault() bool` + +GetDefault returns the Default field if non-nil, zero value otherwise. + +### GetDefaultOk + +`func (o *GetAuthenticationDevices200ResponseInner) GetDefaultOk() (*bool, bool)` + +GetDefaultOk returns a tuple with the Default field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDefault + +`func (o *GetAuthenticationDevices200ResponseInner) SetDefault(v bool)` + +SetDefault sets Default field to given value. + +### HasDefault + +`func (o *GetAuthenticationDevices200ResponseInner) HasDefault() bool` + +HasDefault 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/GetAuthorizationServer200Response.md b/docs/GetAuthorizationServer200Response.md deleted file mode 100644 index ad4ef83..0000000 --- a/docs/GetAuthorizationServer200Response.md +++ /dev/null @@ -1,134 +0,0 @@ -# GetAuthorizationServer200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Configuration** | Pointer to [**AuthServerConfiguration**](AuthServerConfiguration.md) | | [optional] -**Id** | Pointer to **int32** | | [optional] -**Description** | Pointer to **string** | | [optional] -**Name** | Pointer to **string** | | [optional] - -## Methods - -### NewGetAuthorizationServer200Response - -`func NewGetAuthorizationServer200Response() *GetAuthorizationServer200Response` - -NewGetAuthorizationServer200Response instantiates a new GetAuthorizationServer200Response 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 - -### NewGetAuthorizationServer200ResponseWithDefaults - -`func NewGetAuthorizationServer200ResponseWithDefaults() *GetAuthorizationServer200Response` - -NewGetAuthorizationServer200ResponseWithDefaults instantiates a new GetAuthorizationServer200Response 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 - -### GetConfiguration - -`func (o *GetAuthorizationServer200Response) GetConfiguration() AuthServerConfiguration` - -GetConfiguration returns the Configuration field if non-nil, zero value otherwise. - -### GetConfigurationOk - -`func (o *GetAuthorizationServer200Response) GetConfigurationOk() (*AuthServerConfiguration, bool)` - -GetConfigurationOk returns a tuple with the Configuration field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConfiguration - -`func (o *GetAuthorizationServer200Response) SetConfiguration(v AuthServerConfiguration)` - -SetConfiguration sets Configuration field to given value. - -### HasConfiguration - -`func (o *GetAuthorizationServer200Response) HasConfiguration() bool` - -HasConfiguration returns a boolean if a field has been set. - -### GetId - -`func (o *GetAuthorizationServer200Response) GetId() int32` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *GetAuthorizationServer200Response) GetIdOk() (*int32, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *GetAuthorizationServer200Response) SetId(v int32)` - -SetId sets Id field to given value. - -### HasId - -`func (o *GetAuthorizationServer200Response) HasId() bool` - -HasId returns a boolean if a field has been set. - -### GetDescription - -`func (o *GetAuthorizationServer200Response) GetDescription() string` - -GetDescription returns the Description field if non-nil, zero value otherwise. - -### GetDescriptionOk - -`func (o *GetAuthorizationServer200Response) GetDescriptionOk() (*string, bool)` - -GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDescription - -`func (o *GetAuthorizationServer200Response) SetDescription(v string)` - -SetDescription sets Description field to given value. - -### HasDescription - -`func (o *GetAuthorizationServer200Response) HasDescription() bool` - -HasDescription returns a boolean if a field has been set. - -### GetName - -`func (o *GetAuthorizationServer200Response) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *GetAuthorizationServer200Response) 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 *GetAuthorizationServer200Response) SetName(v string)` - -SetName sets Name field to given value. - -### HasName - -`func (o *GetAuthorizationServer200Response) HasName() bool` - -HasName 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/GetClientApps200ResponseInnerScopesInner.md b/docs/GetClientApps200ResponseInnerScopesInner.md deleted file mode 100644 index bad8019..0000000 --- a/docs/GetClientApps200ResponseInnerScopesInner.md +++ /dev/null @@ -1,108 +0,0 @@ -# GetClientApps200ResponseInnerScopesInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Description** | Pointer to **string** | | [optional] -**Value** | Pointer to **string** | | [optional] -**Id** | Pointer to **int32** | | [optional] - -## Methods - -### NewGetClientApps200ResponseInnerScopesInner - -`func NewGetClientApps200ResponseInnerScopesInner() *GetClientApps200ResponseInnerScopesInner` - -NewGetClientApps200ResponseInnerScopesInner instantiates a new GetClientApps200ResponseInnerScopesInner 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 - -### NewGetClientApps200ResponseInnerScopesInnerWithDefaults - -`func NewGetClientApps200ResponseInnerScopesInnerWithDefaults() *GetClientApps200ResponseInnerScopesInner` - -NewGetClientApps200ResponseInnerScopesInnerWithDefaults instantiates a new GetClientApps200ResponseInnerScopesInner 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 - -### GetDescription - -`func (o *GetClientApps200ResponseInnerScopesInner) GetDescription() string` - -GetDescription returns the Description field if non-nil, zero value otherwise. - -### GetDescriptionOk - -`func (o *GetClientApps200ResponseInnerScopesInner) GetDescriptionOk() (*string, bool)` - -GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDescription - -`func (o *GetClientApps200ResponseInnerScopesInner) SetDescription(v string)` - -SetDescription sets Description field to given value. - -### HasDescription - -`func (o *GetClientApps200ResponseInnerScopesInner) HasDescription() bool` - -HasDescription returns a boolean if a field has been set. - -### GetValue - -`func (o *GetClientApps200ResponseInnerScopesInner) GetValue() string` - -GetValue returns the Value field if non-nil, zero value otherwise. - -### GetValueOk - -`func (o *GetClientApps200ResponseInnerScopesInner) GetValueOk() (*string, bool)` - -GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetValue - -`func (o *GetClientApps200ResponseInnerScopesInner) SetValue(v string)` - -SetValue sets Value field to given value. - -### HasValue - -`func (o *GetClientApps200ResponseInnerScopesInner) HasValue() bool` - -HasValue returns a boolean if a field has been set. - -### GetId - -`func (o *GetClientApps200ResponseInnerScopesInner) GetId() int32` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *GetClientApps200ResponseInnerScopesInner) GetIdOk() (*int32, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *GetClientApps200ResponseInnerScopesInner) SetId(v int32)` - -SetId sets Id field to given value. - -### HasId - -`func (o *GetClientApps200ResponseInnerScopesInner) HasId() bool` - -HasId 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/GetCustomAttributes200Response.md b/docs/GetCustomAttributes200Response.md new file mode 100644 index 0000000..58fbc26 --- /dev/null +++ b/docs/GetCustomAttributes200Response.md @@ -0,0 +1,82 @@ +# GetCustomAttributes200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Status** | Pointer to [**Error**](Error.md) | | [optional] +**Data** | Pointer to **[][]string** | Provides a list of custom attribute fields (also known as custom user fields) that are available for your account. The values returned correspond to the values you provided in the Shortname field when you defined the custom user field. For details about defining custom user fields, see Custom User Fields. | [optional] + +## Methods + +### NewGetCustomAttributes200Response + +`func NewGetCustomAttributes200Response() *GetCustomAttributes200Response` + +NewGetCustomAttributes200Response instantiates a new GetCustomAttributes200Response 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 + +### NewGetCustomAttributes200ResponseWithDefaults + +`func NewGetCustomAttributes200ResponseWithDefaults() *GetCustomAttributes200Response` + +NewGetCustomAttributes200ResponseWithDefaults instantiates a new GetCustomAttributes200Response 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 + +### GetStatus + +`func (o *GetCustomAttributes200Response) GetStatus() Error` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *GetCustomAttributes200Response) GetStatusOk() (*Error, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *GetCustomAttributes200Response) SetStatus(v Error)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *GetCustomAttributes200Response) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### GetData + +`func (o *GetCustomAttributes200Response) GetData() [][]string` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *GetCustomAttributes200Response) GetDataOk() (*[][]string, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *GetCustomAttributes200Response) SetData(v [][]string)` + +SetData sets Data field to given value. + +### HasData + +`func (o *GetCustomAttributes200Response) HasData() bool` + +HasData 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/GetEmailSettings200Response.md b/docs/GetEmailSettings200Response.md new file mode 100644 index 0000000..c597dd0 --- /dev/null +++ b/docs/GetEmailSettings200Response.md @@ -0,0 +1,223 @@ +# GetEmailSettings200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Mode** | Pointer to **string** | | [optional] +**Address** | **string** | Email Settings server address | +**UseTls** | Pointer to **bool** | Use TLS | [optional] [default to true] +**From** | **string** | The From email address in the message. | +**Domain** | **string** | Domain of the From address. | +**UserName** | Pointer to **string** | The user name of the account to authenticate with the Email Settings server. | [optional] +**Password** | Pointer to **string** | The password of the account to authenticate with the Email Settings server. | [optional] +**Port** | Pointer to **int32** | Defaults to 25. | [optional] [default to 25] + +## Methods + +### NewGetEmailSettings200Response + +`func NewGetEmailSettings200Response(address string, from string, domain string, ) *GetEmailSettings200Response` + +NewGetEmailSettings200Response instantiates a new GetEmailSettings200Response 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 + +### NewGetEmailSettings200ResponseWithDefaults + +`func NewGetEmailSettings200ResponseWithDefaults() *GetEmailSettings200Response` + +NewGetEmailSettings200ResponseWithDefaults instantiates a new GetEmailSettings200Response 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 + +### GetMode + +`func (o *GetEmailSettings200Response) GetMode() string` + +GetMode returns the Mode field if non-nil, zero value otherwise. + +### GetModeOk + +`func (o *GetEmailSettings200Response) GetModeOk() (*string, bool)` + +GetModeOk returns a tuple with the Mode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMode + +`func (o *GetEmailSettings200Response) SetMode(v string)` + +SetMode sets Mode field to given value. + +### HasMode + +`func (o *GetEmailSettings200Response) HasMode() bool` + +HasMode returns a boolean if a field has been set. + +### GetAddress + +`func (o *GetEmailSettings200Response) GetAddress() string` + +GetAddress returns the Address field if non-nil, zero value otherwise. + +### GetAddressOk + +`func (o *GetEmailSettings200Response) GetAddressOk() (*string, bool)` + +GetAddressOk returns a tuple with the Address field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAddress + +`func (o *GetEmailSettings200Response) SetAddress(v string)` + +SetAddress sets Address field to given value. + + +### GetUseTls + +`func (o *GetEmailSettings200Response) GetUseTls() bool` + +GetUseTls returns the UseTls field if non-nil, zero value otherwise. + +### GetUseTlsOk + +`func (o *GetEmailSettings200Response) GetUseTlsOk() (*bool, bool)` + +GetUseTlsOk returns a tuple with the UseTls field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUseTls + +`func (o *GetEmailSettings200Response) SetUseTls(v bool)` + +SetUseTls sets UseTls field to given value. + +### HasUseTls + +`func (o *GetEmailSettings200Response) HasUseTls() bool` + +HasUseTls returns a boolean if a field has been set. + +### GetFrom + +`func (o *GetEmailSettings200Response) GetFrom() string` + +GetFrom returns the From field if non-nil, zero value otherwise. + +### GetFromOk + +`func (o *GetEmailSettings200Response) GetFromOk() (*string, bool)` + +GetFromOk returns a tuple with the From field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFrom + +`func (o *GetEmailSettings200Response) SetFrom(v string)` + +SetFrom sets From field to given value. + + +### GetDomain + +`func (o *GetEmailSettings200Response) GetDomain() string` + +GetDomain returns the Domain field if non-nil, zero value otherwise. + +### GetDomainOk + +`func (o *GetEmailSettings200Response) GetDomainOk() (*string, bool)` + +GetDomainOk returns a tuple with the Domain field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDomain + +`func (o *GetEmailSettings200Response) SetDomain(v string)` + +SetDomain sets Domain field to given value. + + +### GetUserName + +`func (o *GetEmailSettings200Response) GetUserName() string` + +GetUserName returns the UserName field if non-nil, zero value otherwise. + +### GetUserNameOk + +`func (o *GetEmailSettings200Response) 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 *GetEmailSettings200Response) SetUserName(v string)` + +SetUserName sets UserName field to given value. + +### HasUserName + +`func (o *GetEmailSettings200Response) HasUserName() bool` + +HasUserName returns a boolean if a field has been set. + +### GetPassword + +`func (o *GetEmailSettings200Response) GetPassword() string` + +GetPassword returns the Password field if non-nil, zero value otherwise. + +### GetPasswordOk + +`func (o *GetEmailSettings200Response) GetPasswordOk() (*string, bool)` + +GetPasswordOk returns a tuple with the Password field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPassword + +`func (o *GetEmailSettings200Response) SetPassword(v string)` + +SetPassword sets Password field to given value. + +### HasPassword + +`func (o *GetEmailSettings200Response) HasPassword() bool` + +HasPassword returns a boolean if a field has been set. + +### GetPort + +`func (o *GetEmailSettings200Response) GetPort() int32` + +GetPort returns the Port field if non-nil, zero value otherwise. + +### GetPortOk + +`func (o *GetEmailSettings200Response) GetPortOk() (*int32, bool)` + +GetPortOk returns a tuple with the Port field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPort + +`func (o *GetEmailSettings200Response) SetPort(v int32)` + +SetPort sets Port field to given value. + +### HasPort + +`func (o *GetEmailSettings200Response) HasPort() bool` + +HasPort 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/GetEmailSettings200ResponseOneOf.md b/docs/GetEmailSettings200ResponseOneOf.md new file mode 100644 index 0000000..28f9a40 --- /dev/null +++ b/docs/GetEmailSettings200ResponseOneOf.md @@ -0,0 +1,56 @@ +# GetEmailSettings200ResponseOneOf + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Mode** | Pointer to **string** | | [optional] + +## Methods + +### NewGetEmailSettings200ResponseOneOf + +`func NewGetEmailSettings200ResponseOneOf() *GetEmailSettings200ResponseOneOf` + +NewGetEmailSettings200ResponseOneOf instantiates a new GetEmailSettings200ResponseOneOf 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 + +### NewGetEmailSettings200ResponseOneOfWithDefaults + +`func NewGetEmailSettings200ResponseOneOfWithDefaults() *GetEmailSettings200ResponseOneOf` + +NewGetEmailSettings200ResponseOneOfWithDefaults instantiates a new GetEmailSettings200ResponseOneOf 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 + +### GetMode + +`func (o *GetEmailSettings200ResponseOneOf) GetMode() string` + +GetMode returns the Mode field if non-nil, zero value otherwise. + +### GetModeOk + +`func (o *GetEmailSettings200ResponseOneOf) GetModeOk() (*string, bool)` + +GetModeOk returns a tuple with the Mode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMode + +`func (o *GetEmailSettings200ResponseOneOf) SetMode(v string)` + +SetMode sets Mode field to given value. + +### HasMode + +`func (o *GetEmailSettings200ResponseOneOf) HasMode() bool` + +HasMode 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/GetEnrolledFactors200Response.md b/docs/GetEnrolledFactors200Response.md new file mode 100644 index 0000000..ec22820 --- /dev/null +++ b/docs/GetEnrolledFactors200Response.md @@ -0,0 +1,82 @@ +# GetEnrolledFactors200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Status** | Pointer to [**Error**](Error.md) | | [optional] +**Data** | Pointer to [**GetEnrolledFactors200ResponseData**](GetEnrolledFactors200ResponseData.md) | | [optional] + +## Methods + +### NewGetEnrolledFactors200Response + +`func NewGetEnrolledFactors200Response() *GetEnrolledFactors200Response` + +NewGetEnrolledFactors200Response instantiates a new GetEnrolledFactors200Response 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 + +### NewGetEnrolledFactors200ResponseWithDefaults + +`func NewGetEnrolledFactors200ResponseWithDefaults() *GetEnrolledFactors200Response` + +NewGetEnrolledFactors200ResponseWithDefaults instantiates a new GetEnrolledFactors200Response 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 + +### GetStatus + +`func (o *GetEnrolledFactors200Response) GetStatus() Error` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *GetEnrolledFactors200Response) GetStatusOk() (*Error, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *GetEnrolledFactors200Response) SetStatus(v Error)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *GetEnrolledFactors200Response) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### GetData + +`func (o *GetEnrolledFactors200Response) GetData() GetEnrolledFactors200ResponseData` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *GetEnrolledFactors200Response) GetDataOk() (*GetEnrolledFactors200ResponseData, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *GetEnrolledFactors200Response) SetData(v GetEnrolledFactors200ResponseData)` + +SetData sets Data field to given value. + +### HasData + +`func (o *GetEnrolledFactors200Response) HasData() bool` + +HasData 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/GetEnrolledFactors200ResponseData.md b/docs/GetEnrolledFactors200ResponseData.md new file mode 100644 index 0000000..219918a --- /dev/null +++ b/docs/GetEnrolledFactors200ResponseData.md @@ -0,0 +1,56 @@ +# GetEnrolledFactors200ResponseData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**OtpDevices** | Pointer to [**[]GetEnrolledFactors200ResponseDataOtpDevicesInner**](GetEnrolledFactors200ResponseDataOtpDevicesInner.md) | | [optional] + +## Methods + +### NewGetEnrolledFactors200ResponseData + +`func NewGetEnrolledFactors200ResponseData() *GetEnrolledFactors200ResponseData` + +NewGetEnrolledFactors200ResponseData instantiates a new GetEnrolledFactors200ResponseData 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 + +### NewGetEnrolledFactors200ResponseDataWithDefaults + +`func NewGetEnrolledFactors200ResponseDataWithDefaults() *GetEnrolledFactors200ResponseData` + +NewGetEnrolledFactors200ResponseDataWithDefaults instantiates a new GetEnrolledFactors200ResponseData 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 + +### GetOtpDevices + +`func (o *GetEnrolledFactors200ResponseData) GetOtpDevices() []GetEnrolledFactors200ResponseDataOtpDevicesInner` + +GetOtpDevices returns the OtpDevices field if non-nil, zero value otherwise. + +### GetOtpDevicesOk + +`func (o *GetEnrolledFactors200ResponseData) GetOtpDevicesOk() (*[]GetEnrolledFactors200ResponseDataOtpDevicesInner, bool)` + +GetOtpDevicesOk returns a tuple with the OtpDevices field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOtpDevices + +`func (o *GetEnrolledFactors200ResponseData) SetOtpDevices(v []GetEnrolledFactors200ResponseDataOtpDevicesInner)` + +SetOtpDevices sets OtpDevices field to given value. + +### HasOtpDevices + +`func (o *GetEnrolledFactors200ResponseData) HasOtpDevices() bool` + +HasOtpDevices 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/GetEnrolledFactors200ResponseDataOtpDevicesInner.md b/docs/GetEnrolledFactors200ResponseDataOtpDevicesInner.md new file mode 100644 index 0000000..9c340f7 --- /dev/null +++ b/docs/GetEnrolledFactors200ResponseDataOtpDevicesInner.md @@ -0,0 +1,264 @@ +# GetEnrolledFactors200ResponseDataOtpDevicesInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Active** | Pointer to **bool** | True = enabled (used successfully for authentication at least once). False = pending (registered but never used). | [optional] +**Default** | Pointer to **bool** | True = is user’s default MFA device for OneLogin. | [optional] +**StateToken** | Pointer to **string** | A short lived token that is required to Verify the Factor. This token expires in 120 seconds. | [optional] +**AuthFactorName** | Pointer to **string** | \"Official\" authentication factor name, as it appears to administrators in OneLogin. | [optional] +**PhoneNumber** | Pointer to **string** | For OTP codes sent via SMS, the phone number receiving the SMS message. | [optional] +**TypeDisplayName** | Pointer to **string** | Authentication factor display name as it appears to users upon initial registration, as defined by admins at Settings > Authentication Factors. | [optional] +**NeedsTrigger** | Pointer to **bool** | true: You MUST Activate this Factor to trigger an SMS or Push notification before Verifying the OTP code. false: No Activation required. You can Verify the OTP immediately. MFA factors that provide both push notifications (user accepts notification) and pull code submission (user initiates code submission from device or enters it manually) should appear twice; once with needs_trigger: true and once with needs_trigger: false. | [optional] +**UserDisplayName** | Pointer to **string** | Authentication factor display name assigned by users when they enroll the device. | [optional] +**Id** | Pointer to **int32** | MFA device identifier. | [optional] + +## Methods + +### NewGetEnrolledFactors200ResponseDataOtpDevicesInner + +`func NewGetEnrolledFactors200ResponseDataOtpDevicesInner() *GetEnrolledFactors200ResponseDataOtpDevicesInner` + +NewGetEnrolledFactors200ResponseDataOtpDevicesInner instantiates a new GetEnrolledFactors200ResponseDataOtpDevicesInner 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 + +### NewGetEnrolledFactors200ResponseDataOtpDevicesInnerWithDefaults + +`func NewGetEnrolledFactors200ResponseDataOtpDevicesInnerWithDefaults() *GetEnrolledFactors200ResponseDataOtpDevicesInner` + +NewGetEnrolledFactors200ResponseDataOtpDevicesInnerWithDefaults instantiates a new GetEnrolledFactors200ResponseDataOtpDevicesInner 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 + +### GetActive + +`func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) HasActive() bool` + +HasActive returns a boolean if a field has been set. + +### GetDefault + +`func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) GetDefault() bool` + +GetDefault returns the Default field if non-nil, zero value otherwise. + +### GetDefaultOk + +`func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) GetDefaultOk() (*bool, bool)` + +GetDefaultOk returns a tuple with the Default field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDefault + +`func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) SetDefault(v bool)` + +SetDefault sets Default field to given value. + +### HasDefault + +`func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) HasDefault() bool` + +HasDefault returns a boolean if a field has been set. + +### GetStateToken + +`func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) GetStateToken() string` + +GetStateToken returns the StateToken field if non-nil, zero value otherwise. + +### GetStateTokenOk + +`func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) GetStateTokenOk() (*string, bool)` + +GetStateTokenOk returns a tuple with the StateToken field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStateToken + +`func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) SetStateToken(v string)` + +SetStateToken sets StateToken field to given value. + +### HasStateToken + +`func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) HasStateToken() bool` + +HasStateToken returns a boolean if a field has been set. + +### GetAuthFactorName + +`func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) GetAuthFactorName() string` + +GetAuthFactorName returns the AuthFactorName field if non-nil, zero value otherwise. + +### GetAuthFactorNameOk + +`func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) GetAuthFactorNameOk() (*string, bool)` + +GetAuthFactorNameOk returns a tuple with the AuthFactorName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAuthFactorName + +`func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) SetAuthFactorName(v string)` + +SetAuthFactorName sets AuthFactorName field to given value. + +### HasAuthFactorName + +`func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) HasAuthFactorName() bool` + +HasAuthFactorName returns a boolean if a field has been set. + +### GetPhoneNumber + +`func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) GetPhoneNumber() string` + +GetPhoneNumber returns the PhoneNumber field if non-nil, zero value otherwise. + +### GetPhoneNumberOk + +`func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) GetPhoneNumberOk() (*string, bool)` + +GetPhoneNumberOk returns a tuple with the PhoneNumber field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPhoneNumber + +`func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) SetPhoneNumber(v string)` + +SetPhoneNumber sets PhoneNumber field to given value. + +### HasPhoneNumber + +`func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) HasPhoneNumber() bool` + +HasPhoneNumber returns a boolean if a field has been set. + +### GetTypeDisplayName + +`func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) GetTypeDisplayName() string` + +GetTypeDisplayName returns the TypeDisplayName field if non-nil, zero value otherwise. + +### GetTypeDisplayNameOk + +`func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) GetTypeDisplayNameOk() (*string, bool)` + +GetTypeDisplayNameOk returns a tuple with the TypeDisplayName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTypeDisplayName + +`func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) SetTypeDisplayName(v string)` + +SetTypeDisplayName sets TypeDisplayName field to given value. + +### HasTypeDisplayName + +`func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) HasTypeDisplayName() bool` + +HasTypeDisplayName returns a boolean if a field has been set. + +### GetNeedsTrigger + +`func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) GetNeedsTrigger() bool` + +GetNeedsTrigger returns the NeedsTrigger field if non-nil, zero value otherwise. + +### GetNeedsTriggerOk + +`func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) GetNeedsTriggerOk() (*bool, bool)` + +GetNeedsTriggerOk returns a tuple with the NeedsTrigger field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNeedsTrigger + +`func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) SetNeedsTrigger(v bool)` + +SetNeedsTrigger sets NeedsTrigger field to given value. + +### HasNeedsTrigger + +`func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) HasNeedsTrigger() bool` + +HasNeedsTrigger returns a boolean if a field has been set. + +### GetUserDisplayName + +`func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) GetUserDisplayName() string` + +GetUserDisplayName returns the UserDisplayName field if non-nil, zero value otherwise. + +### GetUserDisplayNameOk + +`func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) GetUserDisplayNameOk() (*string, bool)` + +GetUserDisplayNameOk returns a tuple with the UserDisplayName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUserDisplayName + +`func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) SetUserDisplayName(v string)` + +SetUserDisplayName sets UserDisplayName field to given value. + +### HasUserDisplayName + +`func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) HasUserDisplayName() bool` + +HasUserDisplayName returns a boolean if a field has been set. + +### GetId + +`func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) GetId() int32` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) GetIdOk() (*int32, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) SetId(v int32)` + +SetId sets Id field to given value. + +### HasId + +`func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) HasId() bool` + +HasId 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/GetEventById200Response.md b/docs/GetEventById200Response.md new file mode 100644 index 0000000..94c56e5 --- /dev/null +++ b/docs/GetEventById200Response.md @@ -0,0 +1,82 @@ +# GetEventById200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Status** | Pointer to [**Error**](Error.md) | | [optional] +**Data** | Pointer to [**Event**](Event.md) | | [optional] + +## Methods + +### NewGetEventById200Response + +`func NewGetEventById200Response() *GetEventById200Response` + +NewGetEventById200Response instantiates a new GetEventById200Response 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 + +### NewGetEventById200ResponseWithDefaults + +`func NewGetEventById200ResponseWithDefaults() *GetEventById200Response` + +NewGetEventById200ResponseWithDefaults instantiates a new GetEventById200Response 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 + +### GetStatus + +`func (o *GetEventById200Response) GetStatus() Error` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *GetEventById200Response) GetStatusOk() (*Error, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *GetEventById200Response) SetStatus(v Error)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *GetEventById200Response) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### GetData + +`func (o *GetEventById200Response) GetData() Event` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *GetEventById200Response) GetDataOk() (*Event, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *GetEventById200Response) SetData(v Event)` + +SetData sets Data field to given value. + +### HasData + +`func (o *GetEventById200Response) HasData() bool` + +HasData 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/GetEventTypes200Response.md b/docs/GetEventTypes200Response.md new file mode 100644 index 0000000..90f26ac --- /dev/null +++ b/docs/GetEventTypes200Response.md @@ -0,0 +1,82 @@ +# GetEventTypes200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Status** | Pointer to [**Error**](Error.md) | | [optional] +**Data** | Pointer to [**[]GetEventTypes200ResponseDataInner**](GetEventTypes200ResponseDataInner.md) | | [optional] + +## Methods + +### NewGetEventTypes200Response + +`func NewGetEventTypes200Response() *GetEventTypes200Response` + +NewGetEventTypes200Response instantiates a new GetEventTypes200Response 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 + +### NewGetEventTypes200ResponseWithDefaults + +`func NewGetEventTypes200ResponseWithDefaults() *GetEventTypes200Response` + +NewGetEventTypes200ResponseWithDefaults instantiates a new GetEventTypes200Response 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 + +### GetStatus + +`func (o *GetEventTypes200Response) GetStatus() Error` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *GetEventTypes200Response) GetStatusOk() (*Error, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *GetEventTypes200Response) SetStatus(v Error)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *GetEventTypes200Response) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### GetData + +`func (o *GetEventTypes200Response) GetData() []GetEventTypes200ResponseDataInner` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *GetEventTypes200Response) GetDataOk() (*[]GetEventTypes200ResponseDataInner, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *GetEventTypes200Response) SetData(v []GetEventTypes200ResponseDataInner)` + +SetData sets Data field to given value. + +### HasData + +`func (o *GetEventTypes200Response) HasData() bool` + +HasData 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/GetEventTypes200ResponseDataInner.md b/docs/GetEventTypes200ResponseDataInner.md new file mode 100644 index 0000000..867558b --- /dev/null +++ b/docs/GetEventTypes200ResponseDataInner.md @@ -0,0 +1,108 @@ +# GetEventTypes200ResponseDataInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | | [optional] +**Description** | Pointer to **string** | | [optional] +**Id** | Pointer to **int32** | | [optional] + +## Methods + +### NewGetEventTypes200ResponseDataInner + +`func NewGetEventTypes200ResponseDataInner() *GetEventTypes200ResponseDataInner` + +NewGetEventTypes200ResponseDataInner instantiates a new GetEventTypes200ResponseDataInner 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 + +### NewGetEventTypes200ResponseDataInnerWithDefaults + +`func NewGetEventTypes200ResponseDataInnerWithDefaults() *GetEventTypes200ResponseDataInner` + +NewGetEventTypes200ResponseDataInnerWithDefaults instantiates a new GetEventTypes200ResponseDataInner 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 *GetEventTypes200ResponseDataInner) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *GetEventTypes200ResponseDataInner) 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 *GetEventTypes200ResponseDataInner) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *GetEventTypes200ResponseDataInner) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetDescription + +`func (o *GetEventTypes200ResponseDataInner) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *GetEventTypes200ResponseDataInner) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *GetEventTypes200ResponseDataInner) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *GetEventTypes200ResponseDataInner) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetId + +`func (o *GetEventTypes200ResponseDataInner) GetId() int32` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *GetEventTypes200ResponseDataInner) GetIdOk() (*int32, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *GetEventTypes200ResponseDataInner) SetId(v int32)` + +SetId sets Id field to given value. + +### HasId + +`func (o *GetEventTypes200ResponseDataInner) HasId() bool` + +HasId 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/GetEvents200Response.md b/docs/GetEvents200Response.md new file mode 100644 index 0000000..720b8e2 --- /dev/null +++ b/docs/GetEvents200Response.md @@ -0,0 +1,108 @@ +# GetEvents200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Status** | Pointer to [**Error**](Error.md) | | [optional] +**Pagination** | Pointer to [**GetEvents200ResponsePagination**](GetEvents200ResponsePagination.md) | | [optional] +**Data** | Pointer to [**[]Event**](Event.md) | | [optional] + +## Methods + +### NewGetEvents200Response + +`func NewGetEvents200Response() *GetEvents200Response` + +NewGetEvents200Response instantiates a new GetEvents200Response 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 + +### NewGetEvents200ResponseWithDefaults + +`func NewGetEvents200ResponseWithDefaults() *GetEvents200Response` + +NewGetEvents200ResponseWithDefaults instantiates a new GetEvents200Response 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 + +### GetStatus + +`func (o *GetEvents200Response) GetStatus() Error` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *GetEvents200Response) GetStatusOk() (*Error, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *GetEvents200Response) SetStatus(v Error)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *GetEvents200Response) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### GetPagination + +`func (o *GetEvents200Response) GetPagination() GetEvents200ResponsePagination` + +GetPagination returns the Pagination field if non-nil, zero value otherwise. + +### GetPaginationOk + +`func (o *GetEvents200Response) GetPaginationOk() (*GetEvents200ResponsePagination, bool)` + +GetPaginationOk returns a tuple with the Pagination field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPagination + +`func (o *GetEvents200Response) SetPagination(v GetEvents200ResponsePagination)` + +SetPagination sets Pagination field to given value. + +### HasPagination + +`func (o *GetEvents200Response) HasPagination() bool` + +HasPagination returns a boolean if a field has been set. + +### GetData + +`func (o *GetEvents200Response) GetData() []Event` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *GetEvents200Response) GetDataOk() (*[]Event, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *GetEvents200Response) SetData(v []Event)` + +SetData sets Data field to given value. + +### HasData + +`func (o *GetEvents200Response) HasData() bool` + +HasData 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/GetEvents200ResponsePagination.md b/docs/GetEvents200ResponsePagination.md new file mode 100644 index 0000000..dbb8cda --- /dev/null +++ b/docs/GetEvents200ResponsePagination.md @@ -0,0 +1,134 @@ +# GetEvents200ResponsePagination + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**BeforeCursor** | Pointer to **string** | | [optional] +**AfterCursor** | Pointer to **string** | | [optional] +**PreviousLink** | Pointer to **string** | | [optional] +**NextLink** | Pointer to **string** | | [optional] + +## Methods + +### NewGetEvents200ResponsePagination + +`func NewGetEvents200ResponsePagination() *GetEvents200ResponsePagination` + +NewGetEvents200ResponsePagination instantiates a new GetEvents200ResponsePagination 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 + +### NewGetEvents200ResponsePaginationWithDefaults + +`func NewGetEvents200ResponsePaginationWithDefaults() *GetEvents200ResponsePagination` + +NewGetEvents200ResponsePaginationWithDefaults instantiates a new GetEvents200ResponsePagination 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 + +### GetBeforeCursor + +`func (o *GetEvents200ResponsePagination) GetBeforeCursor() string` + +GetBeforeCursor returns the BeforeCursor field if non-nil, zero value otherwise. + +### GetBeforeCursorOk + +`func (o *GetEvents200ResponsePagination) GetBeforeCursorOk() (*string, bool)` + +GetBeforeCursorOk returns a tuple with the BeforeCursor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBeforeCursor + +`func (o *GetEvents200ResponsePagination) SetBeforeCursor(v string)` + +SetBeforeCursor sets BeforeCursor field to given value. + +### HasBeforeCursor + +`func (o *GetEvents200ResponsePagination) HasBeforeCursor() bool` + +HasBeforeCursor returns a boolean if a field has been set. + +### GetAfterCursor + +`func (o *GetEvents200ResponsePagination) GetAfterCursor() string` + +GetAfterCursor returns the AfterCursor field if non-nil, zero value otherwise. + +### GetAfterCursorOk + +`func (o *GetEvents200ResponsePagination) GetAfterCursorOk() (*string, bool)` + +GetAfterCursorOk returns a tuple with the AfterCursor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAfterCursor + +`func (o *GetEvents200ResponsePagination) SetAfterCursor(v string)` + +SetAfterCursor sets AfterCursor field to given value. + +### HasAfterCursor + +`func (o *GetEvents200ResponsePagination) HasAfterCursor() bool` + +HasAfterCursor returns a boolean if a field has been set. + +### GetPreviousLink + +`func (o *GetEvents200ResponsePagination) GetPreviousLink() string` + +GetPreviousLink returns the PreviousLink field if non-nil, zero value otherwise. + +### GetPreviousLinkOk + +`func (o *GetEvents200ResponsePagination) GetPreviousLinkOk() (*string, bool)` + +GetPreviousLinkOk returns a tuple with the PreviousLink field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPreviousLink + +`func (o *GetEvents200ResponsePagination) SetPreviousLink(v string)` + +SetPreviousLink sets PreviousLink field to given value. + +### HasPreviousLink + +`func (o *GetEvents200ResponsePagination) HasPreviousLink() bool` + +HasPreviousLink returns a boolean if a field has been set. + +### GetNextLink + +`func (o *GetEvents200ResponsePagination) GetNextLink() string` + +GetNextLink returns the NextLink field if non-nil, zero value otherwise. + +### GetNextLinkOk + +`func (o *GetEvents200ResponsePagination) GetNextLinkOk() (*string, bool)` + +GetNextLinkOk returns a tuple with the NextLink field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNextLink + +`func (o *GetEvents200ResponsePagination) SetNextLink(v string)` + +SetNextLink sets NextLink field to given value. + +### HasNextLink + +`func (o *GetEvents200ResponsePagination) HasNextLink() bool` + +HasNextLink 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/GetGroups200Response.md b/docs/GetGroups200Response.md new file mode 100644 index 0000000..315e26e --- /dev/null +++ b/docs/GetGroups200Response.md @@ -0,0 +1,82 @@ +# GetGroups200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Status** | Pointer to [**Error**](Error.md) | | [optional] +**Data** | Pointer to [**[]Group**](Group.md) | | [optional] + +## Methods + +### NewGetGroups200Response + +`func NewGetGroups200Response() *GetGroups200Response` + +NewGetGroups200Response instantiates a new GetGroups200Response 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 + +### NewGetGroups200ResponseWithDefaults + +`func NewGetGroups200ResponseWithDefaults() *GetGroups200Response` + +NewGetGroups200ResponseWithDefaults instantiates a new GetGroups200Response 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 + +### GetStatus + +`func (o *GetGroups200Response) GetStatus() Error` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *GetGroups200Response) GetStatusOk() (*Error, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *GetGroups200Response) SetStatus(v Error)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *GetGroups200Response) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### GetData + +`func (o *GetGroups200Response) GetData() []Group` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *GetGroups200Response) GetDataOk() (*[]Group, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *GetGroups200Response) SetData(v []Group)` + +SetData sets Data field to given value. + +### HasData + +`func (o *GetGroups200Response) HasData() bool` + +HasData 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/GetInviteLink200Response.md b/docs/GetInviteLink200Response.md new file mode 100644 index 0000000..9f724b9 --- /dev/null +++ b/docs/GetInviteLink200Response.md @@ -0,0 +1,82 @@ +# GetInviteLink200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Status** | Pointer to [**Error**](Error.md) | | [optional] +**Data** | Pointer to **[]string** | Provides reset password link | [optional] + +## Methods + +### NewGetInviteLink200Response + +`func NewGetInviteLink200Response() *GetInviteLink200Response` + +NewGetInviteLink200Response instantiates a new GetInviteLink200Response 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 + +### NewGetInviteLink200ResponseWithDefaults + +`func NewGetInviteLink200ResponseWithDefaults() *GetInviteLink200Response` + +NewGetInviteLink200ResponseWithDefaults instantiates a new GetInviteLink200Response 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 + +### GetStatus + +`func (o *GetInviteLink200Response) GetStatus() Error` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *GetInviteLink200Response) GetStatusOk() (*Error, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *GetInviteLink200Response) SetStatus(v Error)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *GetInviteLink200Response) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### GetData + +`func (o *GetInviteLink200Response) GetData() []string` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *GetInviteLink200Response) GetDataOk() (*[]string, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *GetInviteLink200Response) SetData(v []string)` + +SetData sets Data field to given value. + +### HasData + +`func (o *GetInviteLink200Response) HasData() bool` + +HasData 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/GetInviteLinkRequest.md b/docs/GetInviteLinkRequest.md new file mode 100644 index 0000000..d1068ef --- /dev/null +++ b/docs/GetInviteLinkRequest.md @@ -0,0 +1,56 @@ +# GetInviteLinkRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | Pointer to **string** | Set to the user email address to generate an invite link. The value is case sensitive. | [optional] + +## Methods + +### NewGetInviteLinkRequest + +`func NewGetInviteLinkRequest() *GetInviteLinkRequest` + +NewGetInviteLinkRequest instantiates a new GetInviteLinkRequest 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 + +### NewGetInviteLinkRequestWithDefaults + +`func NewGetInviteLinkRequestWithDefaults() *GetInviteLinkRequest` + +NewGetInviteLinkRequestWithDefaults instantiates a new GetInviteLinkRequest 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 + +### GetEmail + +`func (o *GetInviteLinkRequest) GetEmail() string` + +GetEmail returns the Email field if non-nil, zero value otherwise. + +### GetEmailOk + +`func (o *GetInviteLinkRequest) 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 *GetInviteLinkRequest) SetEmail(v string)` + +SetEmail sets Email field to given value. + +### HasEmail + +`func (o *GetInviteLinkRequest) HasEmail() bool` + +HasEmail 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/GetMFAFactors200Response.md b/docs/GetMFAFactors200Response.md new file mode 100644 index 0000000..25febc3 --- /dev/null +++ b/docs/GetMFAFactors200Response.md @@ -0,0 +1,82 @@ +# GetMFAFactors200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Status** | Pointer to [**Error**](Error.md) | | [optional] +**Data** | Pointer to [**GetMFAFactors200ResponseData**](GetMFAFactors200ResponseData.md) | | [optional] + +## Methods + +### NewGetMFAFactors200Response + +`func NewGetMFAFactors200Response() *GetMFAFactors200Response` + +NewGetMFAFactors200Response instantiates a new GetMFAFactors200Response 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 + +### NewGetMFAFactors200ResponseWithDefaults + +`func NewGetMFAFactors200ResponseWithDefaults() *GetMFAFactors200Response` + +NewGetMFAFactors200ResponseWithDefaults instantiates a new GetMFAFactors200Response 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 + +### GetStatus + +`func (o *GetMFAFactors200Response) GetStatus() Error` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *GetMFAFactors200Response) GetStatusOk() (*Error, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *GetMFAFactors200Response) SetStatus(v Error)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *GetMFAFactors200Response) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### GetData + +`func (o *GetMFAFactors200Response) GetData() GetMFAFactors200ResponseData` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *GetMFAFactors200Response) GetDataOk() (*GetMFAFactors200ResponseData, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *GetMFAFactors200Response) SetData(v GetMFAFactors200ResponseData)` + +SetData sets Data field to given value. + +### HasData + +`func (o *GetMFAFactors200Response) HasData() bool` + +HasData 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/GetMFAFactors200ResponseData.md b/docs/GetMFAFactors200ResponseData.md new file mode 100644 index 0000000..7a9a19e --- /dev/null +++ b/docs/GetMFAFactors200ResponseData.md @@ -0,0 +1,56 @@ +# GetMFAFactors200ResponseData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AuthFactors** | Pointer to [**[]GetMFAFactors200ResponseDataAuthFactorsInner**](GetMFAFactors200ResponseDataAuthFactorsInner.md) | | [optional] + +## Methods + +### NewGetMFAFactors200ResponseData + +`func NewGetMFAFactors200ResponseData() *GetMFAFactors200ResponseData` + +NewGetMFAFactors200ResponseData instantiates a new GetMFAFactors200ResponseData 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 + +### NewGetMFAFactors200ResponseDataWithDefaults + +`func NewGetMFAFactors200ResponseDataWithDefaults() *GetMFAFactors200ResponseData` + +NewGetMFAFactors200ResponseDataWithDefaults instantiates a new GetMFAFactors200ResponseData 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 + +### GetAuthFactors + +`func (o *GetMFAFactors200ResponseData) GetAuthFactors() []GetMFAFactors200ResponseDataAuthFactorsInner` + +GetAuthFactors returns the AuthFactors field if non-nil, zero value otherwise. + +### GetAuthFactorsOk + +`func (o *GetMFAFactors200ResponseData) GetAuthFactorsOk() (*[]GetMFAFactors200ResponseDataAuthFactorsInner, bool)` + +GetAuthFactorsOk returns a tuple with the AuthFactors field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAuthFactors + +`func (o *GetMFAFactors200ResponseData) SetAuthFactors(v []GetMFAFactors200ResponseDataAuthFactorsInner)` + +SetAuthFactors sets AuthFactors field to given value. + +### HasAuthFactors + +`func (o *GetMFAFactors200ResponseData) HasAuthFactors() bool` + +HasAuthFactors 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/GetMFAFactors200ResponseDataAuthFactorsInner.md b/docs/GetMFAFactors200ResponseDataAuthFactorsInner.md new file mode 100644 index 0000000..3933643 --- /dev/null +++ b/docs/GetMFAFactors200ResponseDataAuthFactorsInner.md @@ -0,0 +1,82 @@ +# GetMFAFactors200ResponseDataAuthFactorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | Official authentication factor name, as it appears to administrators in OneLogin. | [optional] +**FactorId** | Pointer to **int32** | Identifier for the factor which will be used for user enrollment | [optional] + +## Methods + +### NewGetMFAFactors200ResponseDataAuthFactorsInner + +`func NewGetMFAFactors200ResponseDataAuthFactorsInner() *GetMFAFactors200ResponseDataAuthFactorsInner` + +NewGetMFAFactors200ResponseDataAuthFactorsInner instantiates a new GetMFAFactors200ResponseDataAuthFactorsInner 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 + +### NewGetMFAFactors200ResponseDataAuthFactorsInnerWithDefaults + +`func NewGetMFAFactors200ResponseDataAuthFactorsInnerWithDefaults() *GetMFAFactors200ResponseDataAuthFactorsInner` + +NewGetMFAFactors200ResponseDataAuthFactorsInnerWithDefaults instantiates a new GetMFAFactors200ResponseDataAuthFactorsInner 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 *GetMFAFactors200ResponseDataAuthFactorsInner) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *GetMFAFactors200ResponseDataAuthFactorsInner) 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 *GetMFAFactors200ResponseDataAuthFactorsInner) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *GetMFAFactors200ResponseDataAuthFactorsInner) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetFactorId + +`func (o *GetMFAFactors200ResponseDataAuthFactorsInner) GetFactorId() int32` + +GetFactorId returns the FactorId field if non-nil, zero value otherwise. + +### GetFactorIdOk + +`func (o *GetMFAFactors200ResponseDataAuthFactorsInner) GetFactorIdOk() (*int32, bool)` + +GetFactorIdOk returns a tuple with the FactorId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFactorId + +`func (o *GetMFAFactors200ResponseDataAuthFactorsInner) SetFactorId(v int32)` + +SetFactorId sets FactorId field to given value. + +### HasFactorId + +`func (o *GetMFAFactors200ResponseDataAuthFactorsInner) HasFactorId() bool` + +HasFactorId 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/GetRateLimit200Response.md b/docs/GetRateLimit200Response.md index 0f524c9..89ece77 100644 --- a/docs/GetRateLimit200Response.md +++ b/docs/GetRateLimit200Response.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Status** | Pointer to [**Status**](Status.md) | | [optional] -**Data** | Pointer to [**GetRateLimit200ResponseData**](GetRateLimit200ResponseData.md) | | [optional] +**Status** | Pointer to [**Error**](Error.md) | | [optional] +**Data** | Pointer to [**RateLimit**](RateLimit.md) | | [optional] ## Methods @@ -28,20 +28,20 @@ but it doesn't guarantee that properties required by API are set ### GetStatus -`func (o *GetRateLimit200Response) GetStatus() Status` +`func (o *GetRateLimit200Response) GetStatus() Error` GetStatus returns the Status field if non-nil, zero value otherwise. ### GetStatusOk -`func (o *GetRateLimit200Response) GetStatusOk() (*Status, bool)` +`func (o *GetRateLimit200Response) GetStatusOk() (*Error, bool)` GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetStatus -`func (o *GetRateLimit200Response) SetStatus(v Status)` +`func (o *GetRateLimit200Response) SetStatus(v Error)` SetStatus sets Status field to given value. @@ -53,20 +53,20 @@ HasStatus returns a boolean if a field has been set. ### GetData -`func (o *GetRateLimit200Response) GetData() GetRateLimit200ResponseData` +`func (o *GetRateLimit200Response) GetData() RateLimit` GetData returns the Data field if non-nil, zero value otherwise. ### GetDataOk -`func (o *GetRateLimit200Response) GetDataOk() (*GetRateLimit200ResponseData, bool)` +`func (o *GetRateLimit200Response) GetDataOk() (*RateLimit, bool)` GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetData -`func (o *GetRateLimit200Response) SetData(v GetRateLimit200ResponseData)` +`func (o *GetRateLimit200Response) SetData(v RateLimit)` SetData sets Data field to given value. diff --git a/docs/GetRiskScore400Response.md b/docs/GetRiskScore400Response.md deleted file mode 100644 index f770eae..0000000 --- a/docs/GetRiskScore400Response.md +++ /dev/null @@ -1,56 +0,0 @@ -# GetRiskScore400Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Messages** | Pointer to **[]string** | | [optional] - -## Methods - -### NewGetRiskScore400Response - -`func NewGetRiskScore400Response() *GetRiskScore400Response` - -NewGetRiskScore400Response instantiates a new GetRiskScore400Response 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 - -### NewGetRiskScore400ResponseWithDefaults - -`func NewGetRiskScore400ResponseWithDefaults() *GetRiskScore400Response` - -NewGetRiskScore400ResponseWithDefaults instantiates a new GetRiskScore400Response 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 - -### GetMessages - -`func (o *GetRiskScore400Response) GetMessages() []string` - -GetMessages returns the Messages field if non-nil, zero value otherwise. - -### GetMessagesOk - -`func (o *GetRiskScore400Response) GetMessagesOk() (*[]string, bool)` - -GetMessagesOk returns a tuple with the Messages field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMessages - -`func (o *GetRiskScore400Response) SetMessages(v []string)` - -SetMessages sets Messages field to given value. - -### HasMessages - -`func (o *GetRiskScore400Response) HasMessages() bool` - -HasMessages 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/GetScoreInsights200Response.md b/docs/GetRiskScores200Response.md similarity index 56% rename from docs/GetScoreInsights200Response.md rename to docs/GetRiskScores200Response.md index fb0b0bd..1cf605b 100644 --- a/docs/GetScoreInsights200Response.md +++ b/docs/GetRiskScores200Response.md @@ -1,78 +1,78 @@ -# GetScoreInsights200Response +# GetRiskScores200Response ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Scores** | Pointer to [**GetScoreInsights200ResponseScores**](GetScoreInsights200ResponseScores.md) | | [optional] +**Scores** | Pointer to [**GetRiskScores200ResponseScores**](GetRiskScores200ResponseScores.md) | | [optional] **Total** | Pointer to **int32** | | [optional] ## Methods -### NewGetScoreInsights200Response +### NewGetRiskScores200Response -`func NewGetScoreInsights200Response() *GetScoreInsights200Response` +`func NewGetRiskScores200Response() *GetRiskScores200Response` -NewGetScoreInsights200Response instantiates a new GetScoreInsights200Response object +NewGetRiskScores200Response instantiates a new GetRiskScores200Response 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 -### NewGetScoreInsights200ResponseWithDefaults +### NewGetRiskScores200ResponseWithDefaults -`func NewGetScoreInsights200ResponseWithDefaults() *GetScoreInsights200Response` +`func NewGetRiskScores200ResponseWithDefaults() *GetRiskScores200Response` -NewGetScoreInsights200ResponseWithDefaults instantiates a new GetScoreInsights200Response object +NewGetRiskScores200ResponseWithDefaults instantiates a new GetRiskScores200Response 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 ### GetScores -`func (o *GetScoreInsights200Response) GetScores() GetScoreInsights200ResponseScores` +`func (o *GetRiskScores200Response) GetScores() GetRiskScores200ResponseScores` GetScores returns the Scores field if non-nil, zero value otherwise. ### GetScoresOk -`func (o *GetScoreInsights200Response) GetScoresOk() (*GetScoreInsights200ResponseScores, bool)` +`func (o *GetRiskScores200Response) GetScoresOk() (*GetRiskScores200ResponseScores, bool)` GetScoresOk returns a tuple with the Scores field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetScores -`func (o *GetScoreInsights200Response) SetScores(v GetScoreInsights200ResponseScores)` +`func (o *GetRiskScores200Response) SetScores(v GetRiskScores200ResponseScores)` SetScores sets Scores field to given value. ### HasScores -`func (o *GetScoreInsights200Response) HasScores() bool` +`func (o *GetRiskScores200Response) HasScores() bool` HasScores returns a boolean if a field has been set. ### GetTotal -`func (o *GetScoreInsights200Response) GetTotal() int32` +`func (o *GetRiskScores200Response) GetTotal() int32` GetTotal returns the Total field if non-nil, zero value otherwise. ### GetTotalOk -`func (o *GetScoreInsights200Response) GetTotalOk() (*int32, bool)` +`func (o *GetRiskScores200Response) GetTotalOk() (*int32, bool)` GetTotalOk returns a tuple with the Total field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetTotal -`func (o *GetScoreInsights200Response) SetTotal(v int32)` +`func (o *GetRiskScores200Response) SetTotal(v int32)` SetTotal sets Total field to given value. ### HasTotal -`func (o *GetScoreInsights200Response) HasTotal() bool` +`func (o *GetRiskScores200Response) HasTotal() bool` HasTotal returns a boolean if a field has been set. diff --git a/docs/GetScoreInsights200ResponseScores.md b/docs/GetRiskScores200ResponseScores.md similarity index 60% rename from docs/GetScoreInsights200ResponseScores.md rename to docs/GetRiskScores200ResponseScores.md index d48aa48..464b4d2 100644 --- a/docs/GetScoreInsights200ResponseScores.md +++ b/docs/GetRiskScores200ResponseScores.md @@ -1,4 +1,4 @@ -# GetScoreInsights200ResponseScores +# GetRiskScores200ResponseScores ## Properties @@ -12,145 +12,145 @@ Name | Type | Description | Notes ## Methods -### NewGetScoreInsights200ResponseScores +### NewGetRiskScores200ResponseScores -`func NewGetScoreInsights200ResponseScores() *GetScoreInsights200ResponseScores` +`func NewGetRiskScores200ResponseScores() *GetRiskScores200ResponseScores` -NewGetScoreInsights200ResponseScores instantiates a new GetScoreInsights200ResponseScores object +NewGetRiskScores200ResponseScores instantiates a new GetRiskScores200ResponseScores 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 -### NewGetScoreInsights200ResponseScoresWithDefaults +### NewGetRiskScores200ResponseScoresWithDefaults -`func NewGetScoreInsights200ResponseScoresWithDefaults() *GetScoreInsights200ResponseScores` +`func NewGetRiskScores200ResponseScoresWithDefaults() *GetRiskScores200ResponseScores` -NewGetScoreInsights200ResponseScoresWithDefaults instantiates a new GetScoreInsights200ResponseScores object +NewGetRiskScores200ResponseScoresWithDefaults instantiates a new GetRiskScores200ResponseScores 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 ### GetMinimal -`func (o *GetScoreInsights200ResponseScores) GetMinimal() int32` +`func (o *GetRiskScores200ResponseScores) GetMinimal() int32` GetMinimal returns the Minimal field if non-nil, zero value otherwise. ### GetMinimalOk -`func (o *GetScoreInsights200ResponseScores) GetMinimalOk() (*int32, bool)` +`func (o *GetRiskScores200ResponseScores) GetMinimalOk() (*int32, bool)` GetMinimalOk returns a tuple with the Minimal field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetMinimal -`func (o *GetScoreInsights200ResponseScores) SetMinimal(v int32)` +`func (o *GetRiskScores200ResponseScores) SetMinimal(v int32)` SetMinimal sets Minimal field to given value. ### HasMinimal -`func (o *GetScoreInsights200ResponseScores) HasMinimal() bool` +`func (o *GetRiskScores200ResponseScores) HasMinimal() bool` HasMinimal returns a boolean if a field has been set. ### GetLow -`func (o *GetScoreInsights200ResponseScores) GetLow() int32` +`func (o *GetRiskScores200ResponseScores) GetLow() int32` GetLow returns the Low field if non-nil, zero value otherwise. ### GetLowOk -`func (o *GetScoreInsights200ResponseScores) GetLowOk() (*int32, bool)` +`func (o *GetRiskScores200ResponseScores) GetLowOk() (*int32, bool)` GetLowOk returns a tuple with the Low field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLow -`func (o *GetScoreInsights200ResponseScores) SetLow(v int32)` +`func (o *GetRiskScores200ResponseScores) SetLow(v int32)` SetLow sets Low field to given value. ### HasLow -`func (o *GetScoreInsights200ResponseScores) HasLow() bool` +`func (o *GetRiskScores200ResponseScores) HasLow() bool` HasLow returns a boolean if a field has been set. ### GetMedium -`func (o *GetScoreInsights200ResponseScores) GetMedium() int32` +`func (o *GetRiskScores200ResponseScores) GetMedium() int32` GetMedium returns the Medium field if non-nil, zero value otherwise. ### GetMediumOk -`func (o *GetScoreInsights200ResponseScores) GetMediumOk() (*int32, bool)` +`func (o *GetRiskScores200ResponseScores) GetMediumOk() (*int32, bool)` GetMediumOk returns a tuple with the Medium field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetMedium -`func (o *GetScoreInsights200ResponseScores) SetMedium(v int32)` +`func (o *GetRiskScores200ResponseScores) SetMedium(v int32)` SetMedium sets Medium field to given value. ### HasMedium -`func (o *GetScoreInsights200ResponseScores) HasMedium() bool` +`func (o *GetRiskScores200ResponseScores) HasMedium() bool` HasMedium returns a boolean if a field has been set. ### GetHigh -`func (o *GetScoreInsights200ResponseScores) GetHigh() int32` +`func (o *GetRiskScores200ResponseScores) GetHigh() int32` GetHigh returns the High field if non-nil, zero value otherwise. ### GetHighOk -`func (o *GetScoreInsights200ResponseScores) GetHighOk() (*int32, bool)` +`func (o *GetRiskScores200ResponseScores) GetHighOk() (*int32, bool)` GetHighOk returns a tuple with the High field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHigh -`func (o *GetScoreInsights200ResponseScores) SetHigh(v int32)` +`func (o *GetRiskScores200ResponseScores) SetHigh(v int32)` SetHigh sets High field to given value. ### HasHigh -`func (o *GetScoreInsights200ResponseScores) HasHigh() bool` +`func (o *GetRiskScores200ResponseScores) HasHigh() bool` HasHigh returns a boolean if a field has been set. ### GetVeryHigh -`func (o *GetScoreInsights200ResponseScores) GetVeryHigh() int32` +`func (o *GetRiskScores200ResponseScores) GetVeryHigh() int32` GetVeryHigh returns the VeryHigh field if non-nil, zero value otherwise. ### GetVeryHighOk -`func (o *GetScoreInsights200ResponseScores) GetVeryHighOk() (*int32, bool)` +`func (o *GetRiskScores200ResponseScores) GetVeryHighOk() (*int32, bool)` GetVeryHighOk returns a tuple with the VeryHigh field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetVeryHigh -`func (o *GetScoreInsights200ResponseScores) SetVeryHigh(v int32)` +`func (o *GetRiskScores200ResponseScores) SetVeryHigh(v int32)` SetVeryHigh sets VeryHigh field to given value. ### HasVeryHigh -`func (o *GetScoreInsights200ResponseScores) HasVeryHigh() bool` +`func (o *GetRiskScores200ResponseScores) HasVeryHigh() bool` HasVeryHigh returns a boolean if a field has been set. diff --git a/docs/GetRoleApps200ResponseInner.md b/docs/GetRoleApps200ResponseInner.md new file mode 100644 index 0000000..e8eacdb --- /dev/null +++ b/docs/GetRoleApps200ResponseInner.md @@ -0,0 +1,108 @@ +# GetRoleApps200ResponseInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **int32** | app id | [optional] +**Name** | Pointer to **string** | app name | [optional] +**IconUrl** | Pointer to **string** | url of Icon | [optional] + +## Methods + +### NewGetRoleApps200ResponseInner + +`func NewGetRoleApps200ResponseInner() *GetRoleApps200ResponseInner` + +NewGetRoleApps200ResponseInner instantiates a new GetRoleApps200ResponseInner 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 + +### NewGetRoleApps200ResponseInnerWithDefaults + +`func NewGetRoleApps200ResponseInnerWithDefaults() *GetRoleApps200ResponseInner` + +NewGetRoleApps200ResponseInnerWithDefaults instantiates a new GetRoleApps200ResponseInner 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 + +### GetId + +`func (o *GetRoleApps200ResponseInner) GetId() int32` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *GetRoleApps200ResponseInner) GetIdOk() (*int32, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *GetRoleApps200ResponseInner) SetId(v int32)` + +SetId sets Id field to given value. + +### HasId + +`func (o *GetRoleApps200ResponseInner) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetName + +`func (o *GetRoleApps200ResponseInner) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *GetRoleApps200ResponseInner) 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 *GetRoleApps200ResponseInner) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *GetRoleApps200ResponseInner) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetIconUrl + +`func (o *GetRoleApps200ResponseInner) GetIconUrl() string` + +GetIconUrl returns the IconUrl field if non-nil, zero value otherwise. + +### GetIconUrlOk + +`func (o *GetRoleApps200ResponseInner) GetIconUrlOk() (*string, bool)` + +GetIconUrlOk returns a tuple with the IconUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIconUrl + +`func (o *GetRoleApps200ResponseInner) SetIconUrl(v string)` + +SetIconUrl sets IconUrl field to given value. + +### HasIconUrl + +`func (o *GetRoleApps200ResponseInner) HasIconUrl() bool` + +HasIconUrl 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/GetRoleById200Response.md b/docs/GetRoleById200Response.md new file mode 100644 index 0000000..157c4ce --- /dev/null +++ b/docs/GetRoleById200Response.md @@ -0,0 +1,82 @@ +# GetRoleById200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Status** | Pointer to [**Error**](Error.md) | | [optional] +**Data** | Pointer to [**[]GetRoleById200ResponseDataInner**](GetRoleById200ResponseDataInner.md) | | [optional] + +## Methods + +### NewGetRoleById200Response + +`func NewGetRoleById200Response() *GetRoleById200Response` + +NewGetRoleById200Response instantiates a new GetRoleById200Response 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 + +### NewGetRoleById200ResponseWithDefaults + +`func NewGetRoleById200ResponseWithDefaults() *GetRoleById200Response` + +NewGetRoleById200ResponseWithDefaults instantiates a new GetRoleById200Response 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 + +### GetStatus + +`func (o *GetRoleById200Response) GetStatus() Error` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *GetRoleById200Response) GetStatusOk() (*Error, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *GetRoleById200Response) SetStatus(v Error)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *GetRoleById200Response) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### GetData + +`func (o *GetRoleById200Response) GetData() []GetRoleById200ResponseDataInner` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *GetRoleById200Response) GetDataOk() (*[]GetRoleById200ResponseDataInner, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *GetRoleById200Response) SetData(v []GetRoleById200ResponseDataInner)` + +SetData sets Data field to given value. + +### HasData + +`func (o *GetRoleById200Response) HasData() bool` + +HasData 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/Schema1AddedBy.md b/docs/GetRoleById200ResponseDataInner.md similarity index 55% rename from docs/Schema1AddedBy.md rename to docs/GetRoleById200ResponseDataInner.md index 4d688c9..b9d7220 100644 --- a/docs/Schema1AddedBy.md +++ b/docs/GetRoleById200ResponseDataInner.md @@ -1,78 +1,78 @@ -# Schema1AddedBy +# GetRoleById200ResponseDataInner ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | Pointer to **int32** | | [optional] -**Name** | Pointer to **string** | | [optional] +**Id** | Pointer to **int32** | role's unique ID in Onelogin | [optional] +**Name** | Pointer to **string** | Role name | [optional] ## Methods -### NewSchema1AddedBy +### NewGetRoleById200ResponseDataInner -`func NewSchema1AddedBy() *Schema1AddedBy` +`func NewGetRoleById200ResponseDataInner() *GetRoleById200ResponseDataInner` -NewSchema1AddedBy instantiates a new Schema1AddedBy object +NewGetRoleById200ResponseDataInner instantiates a new GetRoleById200ResponseDataInner 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 -### NewSchema1AddedByWithDefaults +### NewGetRoleById200ResponseDataInnerWithDefaults -`func NewSchema1AddedByWithDefaults() *Schema1AddedBy` +`func NewGetRoleById200ResponseDataInnerWithDefaults() *GetRoleById200ResponseDataInner` -NewSchema1AddedByWithDefaults instantiates a new Schema1AddedBy object +NewGetRoleById200ResponseDataInnerWithDefaults instantiates a new GetRoleById200ResponseDataInner 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 ### GetId -`func (o *Schema1AddedBy) GetId() int32` +`func (o *GetRoleById200ResponseDataInner) GetId() int32` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk -`func (o *Schema1AddedBy) GetIdOk() (*int32, bool)` +`func (o *GetRoleById200ResponseDataInner) GetIdOk() (*int32, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId -`func (o *Schema1AddedBy) SetId(v int32)` +`func (o *GetRoleById200ResponseDataInner) SetId(v int32)` SetId sets Id field to given value. ### HasId -`func (o *Schema1AddedBy) HasId() bool` +`func (o *GetRoleById200ResponseDataInner) HasId() bool` HasId returns a boolean if a field has been set. ### GetName -`func (o *Schema1AddedBy) GetName() string` +`func (o *GetRoleById200ResponseDataInner) GetName() string` GetName returns the Name field if non-nil, zero value otherwise. ### GetNameOk -`func (o *Schema1AddedBy) GetNameOk() (*string, bool)` +`func (o *GetRoleById200ResponseDataInner) 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 *Schema1AddedBy) SetName(v string)` +`func (o *GetRoleById200ResponseDataInner) SetName(v string)` SetName sets Name field to given value. ### HasName -`func (o *Schema1AddedBy) HasName() bool` +`func (o *GetRoleById200ResponseDataInner) HasName() bool` HasName returns a boolean if a field has been set. diff --git a/docs/GetRoleByName200Response.md b/docs/GetRoleByName200Response.md new file mode 100644 index 0000000..7da2b83 --- /dev/null +++ b/docs/GetRoleByName200Response.md @@ -0,0 +1,108 @@ +# GetRoleByName200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Status** | Pointer to [**Error**](Error.md) | | [optional] +**Pagination** | Pointer to [**GetRoleByName200ResponsePagination**](GetRoleByName200ResponsePagination.md) | | [optional] +**Data** | Pointer to [**[]GetRoleByName200ResponseDataInner**](GetRoleByName200ResponseDataInner.md) | | [optional] + +## Methods + +### NewGetRoleByName200Response + +`func NewGetRoleByName200Response() *GetRoleByName200Response` + +NewGetRoleByName200Response instantiates a new GetRoleByName200Response 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 + +### NewGetRoleByName200ResponseWithDefaults + +`func NewGetRoleByName200ResponseWithDefaults() *GetRoleByName200Response` + +NewGetRoleByName200ResponseWithDefaults instantiates a new GetRoleByName200Response 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 + +### GetStatus + +`func (o *GetRoleByName200Response) GetStatus() Error` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *GetRoleByName200Response) GetStatusOk() (*Error, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *GetRoleByName200Response) SetStatus(v Error)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *GetRoleByName200Response) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### GetPagination + +`func (o *GetRoleByName200Response) GetPagination() GetRoleByName200ResponsePagination` + +GetPagination returns the Pagination field if non-nil, zero value otherwise. + +### GetPaginationOk + +`func (o *GetRoleByName200Response) GetPaginationOk() (*GetRoleByName200ResponsePagination, bool)` + +GetPaginationOk returns a tuple with the Pagination field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPagination + +`func (o *GetRoleByName200Response) SetPagination(v GetRoleByName200ResponsePagination)` + +SetPagination sets Pagination field to given value. + +### HasPagination + +`func (o *GetRoleByName200Response) HasPagination() bool` + +HasPagination returns a boolean if a field has been set. + +### GetData + +`func (o *GetRoleByName200Response) GetData() []GetRoleByName200ResponseDataInner` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *GetRoleByName200Response) GetDataOk() (*[]GetRoleByName200ResponseDataInner, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *GetRoleByName200Response) SetData(v []GetRoleByName200ResponseDataInner)` + +SetData sets Data field to given value. + +### HasData + +`func (o *GetRoleByName200Response) HasData() bool` + +HasData 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/GetRoleByName200ResponseDataInner.md b/docs/GetRoleByName200ResponseDataInner.md new file mode 100644 index 0000000..b05659d --- /dev/null +++ b/docs/GetRoleByName200ResponseDataInner.md @@ -0,0 +1,82 @@ +# GetRoleByName200ResponseDataInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **int32** | Role ID | [optional] +**Name** | Pointer to **string** | Role Name | [optional] + +## Methods + +### NewGetRoleByName200ResponseDataInner + +`func NewGetRoleByName200ResponseDataInner() *GetRoleByName200ResponseDataInner` + +NewGetRoleByName200ResponseDataInner instantiates a new GetRoleByName200ResponseDataInner 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 + +### NewGetRoleByName200ResponseDataInnerWithDefaults + +`func NewGetRoleByName200ResponseDataInnerWithDefaults() *GetRoleByName200ResponseDataInner` + +NewGetRoleByName200ResponseDataInnerWithDefaults instantiates a new GetRoleByName200ResponseDataInner 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 + +### GetId + +`func (o *GetRoleByName200ResponseDataInner) GetId() int32` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *GetRoleByName200ResponseDataInner) GetIdOk() (*int32, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *GetRoleByName200ResponseDataInner) SetId(v int32)` + +SetId sets Id field to given value. + +### HasId + +`func (o *GetRoleByName200ResponseDataInner) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetName + +`func (o *GetRoleByName200ResponseDataInner) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *GetRoleByName200ResponseDataInner) 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 *GetRoleByName200ResponseDataInner) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *GetRoleByName200ResponseDataInner) HasName() bool` + +HasName 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/GetRoleByName200ResponsePagination.md b/docs/GetRoleByName200ResponsePagination.md new file mode 100644 index 0000000..1288acd --- /dev/null +++ b/docs/GetRoleByName200ResponsePagination.md @@ -0,0 +1,134 @@ +# GetRoleByName200ResponsePagination + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AfterCursor** | Pointer to **string** | | [optional] +**BeforeCursor** | Pointer to **string** | | [optional] +**NextLink** | Pointer to **string** | | [optional] +**PreviousLink** | Pointer to **string** | | [optional] + +## Methods + +### NewGetRoleByName200ResponsePagination + +`func NewGetRoleByName200ResponsePagination() *GetRoleByName200ResponsePagination` + +NewGetRoleByName200ResponsePagination instantiates a new GetRoleByName200ResponsePagination 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 + +### NewGetRoleByName200ResponsePaginationWithDefaults + +`func NewGetRoleByName200ResponsePaginationWithDefaults() *GetRoleByName200ResponsePagination` + +NewGetRoleByName200ResponsePaginationWithDefaults instantiates a new GetRoleByName200ResponsePagination 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 + +### GetAfterCursor + +`func (o *GetRoleByName200ResponsePagination) GetAfterCursor() string` + +GetAfterCursor returns the AfterCursor field if non-nil, zero value otherwise. + +### GetAfterCursorOk + +`func (o *GetRoleByName200ResponsePagination) GetAfterCursorOk() (*string, bool)` + +GetAfterCursorOk returns a tuple with the AfterCursor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAfterCursor + +`func (o *GetRoleByName200ResponsePagination) SetAfterCursor(v string)` + +SetAfterCursor sets AfterCursor field to given value. + +### HasAfterCursor + +`func (o *GetRoleByName200ResponsePagination) HasAfterCursor() bool` + +HasAfterCursor returns a boolean if a field has been set. + +### GetBeforeCursor + +`func (o *GetRoleByName200ResponsePagination) GetBeforeCursor() string` + +GetBeforeCursor returns the BeforeCursor field if non-nil, zero value otherwise. + +### GetBeforeCursorOk + +`func (o *GetRoleByName200ResponsePagination) GetBeforeCursorOk() (*string, bool)` + +GetBeforeCursorOk returns a tuple with the BeforeCursor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBeforeCursor + +`func (o *GetRoleByName200ResponsePagination) SetBeforeCursor(v string)` + +SetBeforeCursor sets BeforeCursor field to given value. + +### HasBeforeCursor + +`func (o *GetRoleByName200ResponsePagination) HasBeforeCursor() bool` + +HasBeforeCursor returns a boolean if a field has been set. + +### GetNextLink + +`func (o *GetRoleByName200ResponsePagination) GetNextLink() string` + +GetNextLink returns the NextLink field if non-nil, zero value otherwise. + +### GetNextLinkOk + +`func (o *GetRoleByName200ResponsePagination) GetNextLinkOk() (*string, bool)` + +GetNextLinkOk returns a tuple with the NextLink field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNextLink + +`func (o *GetRoleByName200ResponsePagination) SetNextLink(v string)` + +SetNextLink sets NextLink field to given value. + +### HasNextLink + +`func (o *GetRoleByName200ResponsePagination) HasNextLink() bool` + +HasNextLink returns a boolean if a field has been set. + +### GetPreviousLink + +`func (o *GetRoleByName200ResponsePagination) GetPreviousLink() string` + +GetPreviousLink returns the PreviousLink field if non-nil, zero value otherwise. + +### GetPreviousLinkOk + +`func (o *GetRoleByName200ResponsePagination) GetPreviousLinkOk() (*string, bool)` + +GetPreviousLinkOk returns a tuple with the PreviousLink field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPreviousLink + +`func (o *GetRoleByName200ResponsePagination) SetPreviousLink(v string)` + +SetPreviousLink sets PreviousLink field to given value. + +### HasPreviousLink + +`func (o *GetRoleByName200ResponsePagination) HasPreviousLink() bool` + +HasPreviousLink 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/GetUserRoles200Response.md b/docs/GetUserRoles200Response.md new file mode 100644 index 0000000..052c203 --- /dev/null +++ b/docs/GetUserRoles200Response.md @@ -0,0 +1,82 @@ +# GetUserRoles200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Status** | Pointer to [**Error**](Error.md) | | [optional] +**Data** | Pointer to **[]int32** | List of Role IDs that are assigned to the User | [optional] + +## Methods + +### NewGetUserRoles200Response + +`func NewGetUserRoles200Response() *GetUserRoles200Response` + +NewGetUserRoles200Response instantiates a new GetUserRoles200Response 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 + +### NewGetUserRoles200ResponseWithDefaults + +`func NewGetUserRoles200ResponseWithDefaults() *GetUserRoles200Response` + +NewGetUserRoles200ResponseWithDefaults instantiates a new GetUserRoles200Response 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 + +### GetStatus + +`func (o *GetUserRoles200Response) GetStatus() Error` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *GetUserRoles200Response) GetStatusOk() (*Error, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *GetUserRoles200Response) SetStatus(v Error)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *GetUserRoles200Response) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### GetData + +`func (o *GetUserRoles200Response) GetData() []int32` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *GetUserRoles200Response) GetDataOk() (*[]int32, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *GetUserRoles200Response) SetData(v []int32)` + +SetData sets Data field to given value. + +### HasData + +`func (o *GetUserRoles200Response) HasData() bool` + +HasData 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/VerifyFactorVoice200ResponseInner.md b/docs/GetUserVerification200Response.md similarity index 51% rename from docs/VerifyFactorVoice200ResponseInner.md rename to docs/GetUserVerification200Response.md index 5d6f62a..bebb962 100644 --- a/docs/VerifyFactorVoice200ResponseInner.md +++ b/docs/GetUserVerification200Response.md @@ -1,104 +1,104 @@ -# VerifyFactorVoice200ResponseInner +# GetUserVerification200Response ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | Pointer to **string** | | [optional] -**Status** | Pointer to **string** | | [optional] -**DeviceId** | Pointer to **string** | | [optional] +**Id** | Pointer to **string** | registration identifier | [optional] +**Status** | Pointer to **string** | pending = has not been completed. accepted registration has successfully completed, rejected user has denied the MFA attempt or incorrectly provided the OneLogin Voice OTP code. | [optional] +**DeviceId** | Pointer to **string** | Device Id to be used with verify factor | [optional] ## Methods -### NewVerifyFactorVoice200ResponseInner +### NewGetUserVerification200Response -`func NewVerifyFactorVoice200ResponseInner() *VerifyFactorVoice200ResponseInner` +`func NewGetUserVerification200Response() *GetUserVerification200Response` -NewVerifyFactorVoice200ResponseInner instantiates a new VerifyFactorVoice200ResponseInner object +NewGetUserVerification200Response instantiates a new GetUserVerification200Response 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 -### NewVerifyFactorVoice200ResponseInnerWithDefaults +### NewGetUserVerification200ResponseWithDefaults -`func NewVerifyFactorVoice200ResponseInnerWithDefaults() *VerifyFactorVoice200ResponseInner` +`func NewGetUserVerification200ResponseWithDefaults() *GetUserVerification200Response` -NewVerifyFactorVoice200ResponseInnerWithDefaults instantiates a new VerifyFactorVoice200ResponseInner object +NewGetUserVerification200ResponseWithDefaults instantiates a new GetUserVerification200Response 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 ### GetId -`func (o *VerifyFactorVoice200ResponseInner) GetId() string` +`func (o *GetUserVerification200Response) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk -`func (o *VerifyFactorVoice200ResponseInner) GetIdOk() (*string, bool)` +`func (o *GetUserVerification200Response) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId -`func (o *VerifyFactorVoice200ResponseInner) SetId(v string)` +`func (o *GetUserVerification200Response) SetId(v string)` SetId sets Id field to given value. ### HasId -`func (o *VerifyFactorVoice200ResponseInner) HasId() bool` +`func (o *GetUserVerification200Response) HasId() bool` HasId returns a boolean if a field has been set. ### GetStatus -`func (o *VerifyFactorVoice200ResponseInner) GetStatus() string` +`func (o *GetUserVerification200Response) GetStatus() string` GetStatus returns the Status field if non-nil, zero value otherwise. ### GetStatusOk -`func (o *VerifyFactorVoice200ResponseInner) GetStatusOk() (*string, bool)` +`func (o *GetUserVerification200Response) GetStatusOk() (*string, bool)` GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetStatus -`func (o *VerifyFactorVoice200ResponseInner) SetStatus(v string)` +`func (o *GetUserVerification200Response) SetStatus(v string)` SetStatus sets Status field to given value. ### HasStatus -`func (o *VerifyFactorVoice200ResponseInner) HasStatus() bool` +`func (o *GetUserVerification200Response) HasStatus() bool` HasStatus returns a boolean if a field has been set. ### GetDeviceId -`func (o *VerifyFactorVoice200ResponseInner) GetDeviceId() string` +`func (o *GetUserVerification200Response) GetDeviceId() string` GetDeviceId returns the DeviceId field if non-nil, zero value otherwise. ### GetDeviceIdOk -`func (o *VerifyFactorVoice200ResponseInner) GetDeviceIdOk() (*string, bool)` +`func (o *GetUserVerification200Response) GetDeviceIdOk() (*string, bool)` GetDeviceIdOk returns a tuple with the DeviceId field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetDeviceId -`func (o *VerifyFactorVoice200ResponseInner) SetDeviceId(v string)` +`func (o *GetUserVerification200Response) SetDeviceId(v string)` SetDeviceId sets DeviceId field to given value. ### HasDeviceId -`func (o *VerifyFactorVoice200ResponseInner) HasDeviceId() bool` +`func (o *GetUserVerification200Response) HasDeviceId() bool` HasDeviceId returns a boolean if a field has been set. diff --git a/docs/Group.md b/docs/Group.md new file mode 100644 index 0000000..6373a3e --- /dev/null +++ b/docs/Group.md @@ -0,0 +1,108 @@ +# Group + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **int32** | Group's unique Onelogin ID | [optional] +**Name** | Pointer to **string** | Group name | [optional] +**Reference** | Pointer to **string** | Deprecated. Will always show the attribute nil=\"true\". | [optional] + +## Methods + +### NewGroup + +`func NewGroup() *Group` + +NewGroup instantiates a new Group 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 + +### NewGroupWithDefaults + +`func NewGroupWithDefaults() *Group` + +NewGroupWithDefaults instantiates a new Group 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 + +### GetId + +`func (o *Group) GetId() int32` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Group) GetIdOk() (*int32, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Group) SetId(v int32)` + +SetId sets Id field to given value. + +### HasId + +`func (o *Group) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetName + +`func (o *Group) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Group) 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 *Group) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *Group) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetReference + +`func (o *Group) GetReference() string` + +GetReference returns the Reference field if non-nil, zero value otherwise. + +### GetReferenceOk + +`func (o *Group) GetReferenceOk() (*string, bool)` + +GetReferenceOk returns a tuple with the Reference field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReference + +`func (o *Group) SetReference(v string)` + +SetReference sets Reference field to given value. + +### HasReference + +`func (o *Group) HasReference() bool` + +HasReference 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/GroupsApi.md b/docs/GroupsApi.md new file mode 100644 index 0000000..a71eb5f --- /dev/null +++ b/docs/GroupsApi.md @@ -0,0 +1,141 @@ +# \GroupsApi + +All URIs are relative to *https://your-api-subdomain.onelogin.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetGroupById**](GroupsApi.md#GetGroupById) | **Get** /api/1/groups/{group_id} | Get Group by ID +[**GetGroups**](GroupsApi.md#GetGroups) | **Get** /api/1/groups | Get Groups + + + +## GetGroupById + +> GetGroups200Response GetGroupById(ctx, groupId).Execute() + +Get Group by ID + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + groupId := "groupId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.GroupsApi.GetGroupById(context.Background(), groupId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `GroupsApi.GetGroupById``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetGroupById`: GetGroups200Response + fmt.Fprintf(os.Stdout, "Response from `GroupsApi.GetGroupById`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**groupId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetGroupByIdRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**GetGroups200Response**](GetGroups200Response.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetGroups + +> GetGroups200Response GetGroups(ctx).Execute() + +Get Groups + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.GroupsApi.GetGroups(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `GroupsApi.GetGroups``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetGroups`: GetGroups200Response + fmt.Fprintf(os.Stdout, "Response from `GroupsApi.GetGroups`: %v\n", resp) +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetGroupsRequest struct via the builder pattern + + +### Return type + +[**GetGroups200Response**](GetGroups200Response.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/docs/Hook.md b/docs/Hook.md index b42260e..3465d45 100644 --- a/docs/Hook.md +++ b/docs/Hook.md @@ -11,12 +11,12 @@ Name | Type | Description | Notes **EnvVars** | **[]string** | Environment Variable objects that will be available via process.env.ENV_VAR_NAME in the hook code. | **Runtime** | **string** | The Smart Hooks supported Node.js version to execute this hook with. | **Retries** | **int32** | Number of retries if execution fails. | [default to 0] -**Packages** | **map[string]interface{}** | An object containing NPM packages that are bundled with the hook function. | +**Packages** | **map[string]string** | An object containing NPM packages that are bundled with the hook function. | **Function** | **string** | A base64 encoded string containing the javascript function code. | **ContextVersion** | Pointer to **string** | The semantic version of the content that will be injected into this hook. | [optional] **Status** | Pointer to **string** | String describing the state of the hook function. When a hook is ready and disabled is false it will be executed. | [optional] **Options** | Pointer to [**HookOptions**](HookOptions.md) | | [optional] -**Conditions** | Pointer to [**[]HookConditionsInner**](HookConditionsInner.md) | An array of objects that let you limit the execution of a hook to users in specific roles. | [optional] +**Conditions** | Pointer to [**[]Condition**](Condition.md) | An array of objects that let you limit the execution of a hook to users in specific roles. | [optional] **CreatedAt** | Pointer to **string** | ISO8601 format date that they hook function was created. | [optional] **UpdatedAt** | Pointer to **string** | ISO8601 format date that they hook function was last updated. | [optional] @@ -24,7 +24,7 @@ Name | Type | Description | Notes ### NewHook -`func NewHook(type_ string, disabled bool, timeout int32, envVars []string, runtime string, retries int32, packages map[string]interface{}, function string, ) *Hook` +`func NewHook(type_ string, disabled bool, timeout int32, envVars []string, runtime string, retries int32, packages map[string]string, function string, ) *Hook` NewHook instantiates a new Hook object This constructor will assign default values to properties that have it defined, @@ -186,20 +186,20 @@ SetRetries sets Retries field to given value. ### GetPackages -`func (o *Hook) GetPackages() map[string]interface{}` +`func (o *Hook) GetPackages() map[string]string` GetPackages returns the Packages field if non-nil, zero value otherwise. ### GetPackagesOk -`func (o *Hook) GetPackagesOk() (*map[string]interface{}, bool)` +`func (o *Hook) GetPackagesOk() (*map[string]string, bool)` GetPackagesOk returns a tuple with the Packages field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetPackages -`func (o *Hook) SetPackages(v map[string]interface{})` +`func (o *Hook) SetPackages(v map[string]string)` SetPackages sets Packages field to given value. @@ -301,20 +301,20 @@ HasOptions returns a boolean if a field has been set. ### GetConditions -`func (o *Hook) GetConditions() []HookConditionsInner` +`func (o *Hook) GetConditions() []Condition` GetConditions returns the Conditions field if non-nil, zero value otherwise. ### GetConditionsOk -`func (o *Hook) GetConditionsOk() (*[]HookConditionsInner, bool)` +`func (o *Hook) GetConditionsOk() (*[]Condition, bool)` GetConditionsOk returns a tuple with the Conditions field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetConditions -`func (o *Hook) SetConditions(v []HookConditionsInner)` +`func (o *Hook) SetConditions(v []Condition)` SetConditions sets Conditions field to given value. diff --git a/docs/HookConditionsInner.md b/docs/HookConditionsInner.md deleted file mode 100644 index 822754d..0000000 --- a/docs/HookConditionsInner.md +++ /dev/null @@ -1,108 +0,0 @@ -# HookConditionsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Source** | Pointer to **string** | | [optional] -**Operator** | Pointer to **string** | | [optional] -**Value** | Pointer to **string** | | [optional] - -## Methods - -### NewHookConditionsInner - -`func NewHookConditionsInner() *HookConditionsInner` - -NewHookConditionsInner instantiates a new HookConditionsInner 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 - -### NewHookConditionsInnerWithDefaults - -`func NewHookConditionsInnerWithDefaults() *HookConditionsInner` - -NewHookConditionsInnerWithDefaults instantiates a new HookConditionsInner 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 - -### GetSource - -`func (o *HookConditionsInner) GetSource() string` - -GetSource returns the Source field if non-nil, zero value otherwise. - -### GetSourceOk - -`func (o *HookConditionsInner) GetSourceOk() (*string, 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 *HookConditionsInner) SetSource(v string)` - -SetSource sets Source field to given value. - -### HasSource - -`func (o *HookConditionsInner) HasSource() bool` - -HasSource returns a boolean if a field has been set. - -### GetOperator - -`func (o *HookConditionsInner) GetOperator() string` - -GetOperator returns the Operator field if non-nil, zero value otherwise. - -### GetOperatorOk - -`func (o *HookConditionsInner) GetOperatorOk() (*string, bool)` - -GetOperatorOk returns a tuple with the Operator field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetOperator - -`func (o *HookConditionsInner) SetOperator(v string)` - -SetOperator sets Operator field to given value. - -### HasOperator - -`func (o *HookConditionsInner) HasOperator() bool` - -HasOperator returns a boolean if a field has been set. - -### GetValue - -`func (o *HookConditionsInner) GetValue() string` - -GetValue returns the Value field if non-nil, zero value otherwise. - -### GetValueOk - -`func (o *HookConditionsInner) GetValueOk() (*string, bool)` - -GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetValue - -`func (o *HookConditionsInner) SetValue(v string)` - -SetValue sets Value field to given value. - -### HasValue - -`func (o *HookConditionsInner) HasValue() bool` - -HasValue 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/Envvar.md b/docs/HookEnvvar.md similarity index 59% rename from docs/Envvar.md rename to docs/HookEnvvar.md index 5449227..9c50469 100644 --- a/docs/Envvar.md +++ b/docs/HookEnvvar.md @@ -1,133 +1,149 @@ -# Envvar +# HookEnvvar ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | Pointer to **string** | A unique identifier for the Hook Environment Variable | [optional] -**Name** | Pointer to **string** | The name of the environment variable. | [optional] +**Id** | Pointer to **string** | A unique identifier for the Hook Environment Variable | [optional] [readonly] +**Name** | **string** | The name of the environment variable. | **CreatedAt** | Pointer to **string** | The ISO8601 formatted date that the environment variable was created. | [optional] **UpdatedAt** | Pointer to **string** | The ISO8601 formatted date that the environment variable was last updated. | [optional] +**Value** | **string** | The secret value that will be encrypted at rest and injected in applicable hook functions at run time. | ## Methods -### NewEnvvar +### NewHookEnvvar -`func NewEnvvar() *Envvar` +`func NewHookEnvvar(name string, value string, ) *HookEnvvar` -NewEnvvar instantiates a new Envvar object +NewHookEnvvar instantiates a new HookEnvvar 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 -### NewEnvvarWithDefaults +### NewHookEnvvarWithDefaults -`func NewEnvvarWithDefaults() *Envvar` +`func NewHookEnvvarWithDefaults() *HookEnvvar` -NewEnvvarWithDefaults instantiates a new Envvar object +NewHookEnvvarWithDefaults instantiates a new HookEnvvar 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 ### GetId -`func (o *Envvar) GetId() string` +`func (o *HookEnvvar) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk -`func (o *Envvar) GetIdOk() (*string, bool)` +`func (o *HookEnvvar) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId -`func (o *Envvar) SetId(v string)` +`func (o *HookEnvvar) SetId(v string)` SetId sets Id field to given value. ### HasId -`func (o *Envvar) HasId() bool` +`func (o *HookEnvvar) HasId() bool` HasId returns a boolean if a field has been set. ### GetName -`func (o *Envvar) GetName() string` +`func (o *HookEnvvar) GetName() string` GetName returns the Name field if non-nil, zero value otherwise. ### GetNameOk -`func (o *Envvar) GetNameOk() (*string, bool)` +`func (o *HookEnvvar) 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 *Envvar) SetName(v string)` +`func (o *HookEnvvar) SetName(v string)` SetName sets Name field to given value. -### HasName - -`func (o *Envvar) HasName() bool` - -HasName returns a boolean if a field has been set. ### GetCreatedAt -`func (o *Envvar) GetCreatedAt() string` +`func (o *HookEnvvar) GetCreatedAt() string` GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. ### GetCreatedAtOk -`func (o *Envvar) GetCreatedAtOk() (*string, bool)` +`func (o *HookEnvvar) GetCreatedAtOk() (*string, bool)` GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetCreatedAt -`func (o *Envvar) SetCreatedAt(v string)` +`func (o *HookEnvvar) SetCreatedAt(v string)` SetCreatedAt sets CreatedAt field to given value. ### HasCreatedAt -`func (o *Envvar) HasCreatedAt() bool` +`func (o *HookEnvvar) HasCreatedAt() bool` HasCreatedAt returns a boolean if a field has been set. ### GetUpdatedAt -`func (o *Envvar) GetUpdatedAt() string` +`func (o *HookEnvvar) GetUpdatedAt() string` GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. ### GetUpdatedAtOk -`func (o *Envvar) GetUpdatedAtOk() (*string, bool)` +`func (o *HookEnvvar) GetUpdatedAtOk() (*string, bool)` GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetUpdatedAt -`func (o *Envvar) SetUpdatedAt(v string)` +`func (o *HookEnvvar) SetUpdatedAt(v string)` SetUpdatedAt sets UpdatedAt field to given value. ### HasUpdatedAt -`func (o *Envvar) HasUpdatedAt() bool` +`func (o *HookEnvvar) HasUpdatedAt() bool` HasUpdatedAt returns a boolean if a field has been set. +### GetValue + +`func (o *HookEnvvar) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *HookEnvvar) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *HookEnvvar) SetValue(v string)` + +SetValue sets Value 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/Log.md b/docs/HookLog.md similarity index 72% rename from docs/Log.md rename to docs/HookLog.md index a9608da..91cf809 100644 --- a/docs/Log.md +++ b/docs/HookLog.md @@ -1,4 +1,4 @@ -# Log +# HookLog ## Properties @@ -11,120 +11,120 @@ Name | Type | Description | Notes ## Methods -### NewLog +### NewHookLog -`func NewLog() *Log` +`func NewHookLog() *HookLog` -NewLog instantiates a new Log object +NewHookLog instantiates a new HookLog 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 -### NewLogWithDefaults +### NewHookLogWithDefaults -`func NewLogWithDefaults() *Log` +`func NewHookLogWithDefaults() *HookLog` -NewLogWithDefaults instantiates a new Log object +NewHookLogWithDefaults instantiates a new HookLog 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 ### GetRequestId -`func (o *Log) GetRequestId() string` +`func (o *HookLog) GetRequestId() string` GetRequestId returns the RequestId field if non-nil, zero value otherwise. ### GetRequestIdOk -`func (o *Log) GetRequestIdOk() (*string, bool)` +`func (o *HookLog) GetRequestIdOk() (*string, bool)` GetRequestIdOk returns a tuple with the RequestId field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetRequestId -`func (o *Log) SetRequestId(v string)` +`func (o *HookLog) SetRequestId(v string)` SetRequestId sets RequestId field to given value. ### HasRequestId -`func (o *Log) HasRequestId() bool` +`func (o *HookLog) HasRequestId() bool` HasRequestId returns a boolean if a field has been set. ### GetCorrelationId -`func (o *Log) GetCorrelationId() string` +`func (o *HookLog) GetCorrelationId() string` GetCorrelationId returns the CorrelationId field if non-nil, zero value otherwise. ### GetCorrelationIdOk -`func (o *Log) GetCorrelationIdOk() (*string, bool)` +`func (o *HookLog) GetCorrelationIdOk() (*string, bool)` GetCorrelationIdOk returns a tuple with the CorrelationId field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetCorrelationId -`func (o *Log) SetCorrelationId(v string)` +`func (o *HookLog) SetCorrelationId(v string)` SetCorrelationId sets CorrelationId field to given value. ### HasCorrelationId -`func (o *Log) HasCorrelationId() bool` +`func (o *HookLog) HasCorrelationId() bool` HasCorrelationId returns a boolean if a field has been set. ### GetCreatedAt -`func (o *Log) GetCreatedAt() string` +`func (o *HookLog) GetCreatedAt() string` GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. ### GetCreatedAtOk -`func (o *Log) GetCreatedAtOk() (*string, bool)` +`func (o *HookLog) GetCreatedAtOk() (*string, bool)` GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetCreatedAt -`func (o *Log) SetCreatedAt(v string)` +`func (o *HookLog) SetCreatedAt(v string)` SetCreatedAt sets CreatedAt field to given value. ### HasCreatedAt -`func (o *Log) HasCreatedAt() bool` +`func (o *HookLog) HasCreatedAt() bool` HasCreatedAt returns a boolean if a field has been set. ### GetEvents -`func (o *Log) GetEvents() []string` +`func (o *HookLog) GetEvents() []string` GetEvents returns the Events field if non-nil, zero value otherwise. ### GetEventsOk -`func (o *Log) GetEventsOk() (*[]string, bool)` +`func (o *HookLog) GetEventsOk() (*[]string, bool)` GetEventsOk returns a tuple with the Events field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetEvents -`func (o *Log) SetEvents(v []string)` +`func (o *HookLog) SetEvents(v []string)` SetEvents sets Events field to given value. ### HasEvents -`func (o *Log) HasEvents() bool` +`func (o *HookLog) HasEvents() bool` HasEvents returns a boolean if a field has been set. diff --git a/docs/HookStatus.md b/docs/HookStatus.md index 328c3db..e2148d6 100644 --- a/docs/HookStatus.md +++ b/docs/HookStatus.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Name** | Pointer to **string** | | [optional] -**Message** | Pointer to **string** | | [optional] +**Name** | Pointer to **string** | responses status nam | [optional] +**Message** | Pointer to **string** | your operation was successful | [optional] ## Methods diff --git a/docs/InviteLinksApi.md b/docs/InviteLinksApi.md new file mode 100644 index 0000000..ce2a087 --- /dev/null +++ b/docs/InviteLinksApi.md @@ -0,0 +1,142 @@ +# \InviteLinksApi + +All URIs are relative to *https://your-api-subdomain.onelogin.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetInviteLink**](InviteLinksApi.md#GetInviteLink) | **Post** /api/1/invites/get_invite_link | Generate Invite Link +[**SendInviteLink**](InviteLinksApi.md#SendInviteLink) | **Post** /api/1/invites/send_invite_link | Send Invite Link + + + +## GetInviteLink + +> GetInviteLink200Response GetInviteLink(ctx).GetInviteLinkRequest(getInviteLinkRequest).Execute() + +Generate Invite Link + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + getInviteLinkRequest := *openapiclient.NewGetInviteLinkRequest() // GetInviteLinkRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.InviteLinksApi.GetInviteLink(context.Background()).GetInviteLinkRequest(getInviteLinkRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `InviteLinksApi.GetInviteLink``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetInviteLink`: GetInviteLink200Response + fmt.Fprintf(os.Stdout, "Response from `InviteLinksApi.GetInviteLink`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetInviteLinkRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **getInviteLinkRequest** | [**GetInviteLinkRequest**](GetInviteLinkRequest.md) | | + +### Return type + +[**GetInviteLink200Response**](GetInviteLink200Response.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SendInviteLink + +> SendInviteLink200Response SendInviteLink(ctx).SendInviteLinkRequest(sendInviteLinkRequest).Execute() + +Send Invite Link + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + sendInviteLinkRequest := *openapiclient.NewSendInviteLinkRequest() // SendInviteLinkRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.InviteLinksApi.SendInviteLink(context.Background()).SendInviteLinkRequest(sendInviteLinkRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `InviteLinksApi.SendInviteLink``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SendInviteLink`: SendInviteLink200Response + fmt.Fprintf(os.Stdout, "Response from `InviteLinksApi.SendInviteLink`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiSendInviteLinkRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sendInviteLinkRequest** | [**SendInviteLinkRequest**](SendInviteLinkRequest.md) | | + +### Return type + +[**SendInviteLink200Response**](SendInviteLink200Response.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/docs/ListAccessTokenClaims200ResponseInner.md b/docs/ListAccessTokenClaims200ResponseInner.md deleted file mode 100644 index 5d361c6..0000000 --- a/docs/ListAccessTokenClaims200ResponseInner.md +++ /dev/null @@ -1,264 +0,0 @@ -# ListAccessTokenClaims200ResponseInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | Pointer to **int32** | | [optional] -**Label** | Pointer to **string** | | [optional] -**UserAttributeMappings** | Pointer to **string** | | [optional] -**UserAttributeMacros** | Pointer to **string** | | [optional] -**AttributesTransformations** | Pointer to **string** | | [optional] -**SkipIfBlank** | Pointer to **bool** | | [optional] -**Values** | Pointer to **[]string** | | [optional] -**DefaultValues** | Pointer to **string** | | [optional] -**ProvisionedEntitlements** | Pointer to **bool** | | [optional] - -## Methods - -### NewListAccessTokenClaims200ResponseInner - -`func NewListAccessTokenClaims200ResponseInner() *ListAccessTokenClaims200ResponseInner` - -NewListAccessTokenClaims200ResponseInner instantiates a new ListAccessTokenClaims200ResponseInner 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 - -### NewListAccessTokenClaims200ResponseInnerWithDefaults - -`func NewListAccessTokenClaims200ResponseInnerWithDefaults() *ListAccessTokenClaims200ResponseInner` - -NewListAccessTokenClaims200ResponseInnerWithDefaults instantiates a new ListAccessTokenClaims200ResponseInner 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 - -### GetId - -`func (o *ListAccessTokenClaims200ResponseInner) GetId() int32` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *ListAccessTokenClaims200ResponseInner) GetIdOk() (*int32, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *ListAccessTokenClaims200ResponseInner) SetId(v int32)` - -SetId sets Id field to given value. - -### HasId - -`func (o *ListAccessTokenClaims200ResponseInner) HasId() bool` - -HasId returns a boolean if a field has been set. - -### GetLabel - -`func (o *ListAccessTokenClaims200ResponseInner) GetLabel() string` - -GetLabel returns the Label field if non-nil, zero value otherwise. - -### GetLabelOk - -`func (o *ListAccessTokenClaims200ResponseInner) GetLabelOk() (*string, bool)` - -GetLabelOk returns a tuple with the Label field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLabel - -`func (o *ListAccessTokenClaims200ResponseInner) SetLabel(v string)` - -SetLabel sets Label field to given value. - -### HasLabel - -`func (o *ListAccessTokenClaims200ResponseInner) HasLabel() bool` - -HasLabel returns a boolean if a field has been set. - -### GetUserAttributeMappings - -`func (o *ListAccessTokenClaims200ResponseInner) GetUserAttributeMappings() string` - -GetUserAttributeMappings returns the UserAttributeMappings field if non-nil, zero value otherwise. - -### GetUserAttributeMappingsOk - -`func (o *ListAccessTokenClaims200ResponseInner) GetUserAttributeMappingsOk() (*string, bool)` - -GetUserAttributeMappingsOk returns a tuple with the UserAttributeMappings field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUserAttributeMappings - -`func (o *ListAccessTokenClaims200ResponseInner) SetUserAttributeMappings(v string)` - -SetUserAttributeMappings sets UserAttributeMappings field to given value. - -### HasUserAttributeMappings - -`func (o *ListAccessTokenClaims200ResponseInner) HasUserAttributeMappings() bool` - -HasUserAttributeMappings returns a boolean if a field has been set. - -### GetUserAttributeMacros - -`func (o *ListAccessTokenClaims200ResponseInner) GetUserAttributeMacros() string` - -GetUserAttributeMacros returns the UserAttributeMacros field if non-nil, zero value otherwise. - -### GetUserAttributeMacrosOk - -`func (o *ListAccessTokenClaims200ResponseInner) GetUserAttributeMacrosOk() (*string, bool)` - -GetUserAttributeMacrosOk returns a tuple with the UserAttributeMacros field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUserAttributeMacros - -`func (o *ListAccessTokenClaims200ResponseInner) SetUserAttributeMacros(v string)` - -SetUserAttributeMacros sets UserAttributeMacros field to given value. - -### HasUserAttributeMacros - -`func (o *ListAccessTokenClaims200ResponseInner) HasUserAttributeMacros() bool` - -HasUserAttributeMacros returns a boolean if a field has been set. - -### GetAttributesTransformations - -`func (o *ListAccessTokenClaims200ResponseInner) GetAttributesTransformations() string` - -GetAttributesTransformations returns the AttributesTransformations field if non-nil, zero value otherwise. - -### GetAttributesTransformationsOk - -`func (o *ListAccessTokenClaims200ResponseInner) GetAttributesTransformationsOk() (*string, bool)` - -GetAttributesTransformationsOk returns a tuple with the AttributesTransformations field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAttributesTransformations - -`func (o *ListAccessTokenClaims200ResponseInner) SetAttributesTransformations(v string)` - -SetAttributesTransformations sets AttributesTransformations field to given value. - -### HasAttributesTransformations - -`func (o *ListAccessTokenClaims200ResponseInner) HasAttributesTransformations() bool` - -HasAttributesTransformations returns a boolean if a field has been set. - -### GetSkipIfBlank - -`func (o *ListAccessTokenClaims200ResponseInner) GetSkipIfBlank() bool` - -GetSkipIfBlank returns the SkipIfBlank field if non-nil, zero value otherwise. - -### GetSkipIfBlankOk - -`func (o *ListAccessTokenClaims200ResponseInner) GetSkipIfBlankOk() (*bool, bool)` - -GetSkipIfBlankOk returns a tuple with the SkipIfBlank field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSkipIfBlank - -`func (o *ListAccessTokenClaims200ResponseInner) SetSkipIfBlank(v bool)` - -SetSkipIfBlank sets SkipIfBlank field to given value. - -### HasSkipIfBlank - -`func (o *ListAccessTokenClaims200ResponseInner) HasSkipIfBlank() bool` - -HasSkipIfBlank returns a boolean if a field has been set. - -### GetValues - -`func (o *ListAccessTokenClaims200ResponseInner) GetValues() []string` - -GetValues returns the Values field if non-nil, zero value otherwise. - -### GetValuesOk - -`func (o *ListAccessTokenClaims200ResponseInner) GetValuesOk() (*[]string, bool)` - -GetValuesOk returns a tuple with the Values field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetValues - -`func (o *ListAccessTokenClaims200ResponseInner) SetValues(v []string)` - -SetValues sets Values field to given value. - -### HasValues - -`func (o *ListAccessTokenClaims200ResponseInner) HasValues() bool` - -HasValues returns a boolean if a field has been set. - -### GetDefaultValues - -`func (o *ListAccessTokenClaims200ResponseInner) GetDefaultValues() string` - -GetDefaultValues returns the DefaultValues field if non-nil, zero value otherwise. - -### GetDefaultValuesOk - -`func (o *ListAccessTokenClaims200ResponseInner) GetDefaultValuesOk() (*string, bool)` - -GetDefaultValuesOk returns a tuple with the DefaultValues field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDefaultValues - -`func (o *ListAccessTokenClaims200ResponseInner) SetDefaultValues(v string)` - -SetDefaultValues sets DefaultValues field to given value. - -### HasDefaultValues - -`func (o *ListAccessTokenClaims200ResponseInner) HasDefaultValues() bool` - -HasDefaultValues returns a boolean if a field has been set. - -### GetProvisionedEntitlements - -`func (o *ListAccessTokenClaims200ResponseInner) GetProvisionedEntitlements() bool` - -GetProvisionedEntitlements returns the ProvisionedEntitlements field if non-nil, zero value otherwise. - -### GetProvisionedEntitlementsOk - -`func (o *ListAccessTokenClaims200ResponseInner) GetProvisionedEntitlementsOk() (*bool, bool)` - -GetProvisionedEntitlementsOk returns a tuple with the ProvisionedEntitlements field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetProvisionedEntitlements - -`func (o *ListAccessTokenClaims200ResponseInner) SetProvisionedEntitlements(v bool)` - -SetProvisionedEntitlements sets ProvisionedEntitlements field to given value. - -### HasProvisionedEntitlements - -`func (o *ListAccessTokenClaims200ResponseInner) HasProvisionedEntitlements() bool` - -HasProvisionedEntitlements 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/ListAppUsers200ResponseInner.md b/docs/ListAppUsers200ResponseInner.md deleted file mode 100644 index 56ca886..0000000 --- a/docs/ListAppUsers200ResponseInner.md +++ /dev/null @@ -1,160 +0,0 @@ -# ListAppUsers200ResponseInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Firstname** | Pointer to **string** | | [optional] -**Id** | Pointer to **int32** | | [optional] -**Email** | Pointer to **string** | | [optional] -**Lastname** | Pointer to **string** | | [optional] -**Username** | Pointer to **string** | | [optional] - -## Methods - -### NewListAppUsers200ResponseInner - -`func NewListAppUsers200ResponseInner() *ListAppUsers200ResponseInner` - -NewListAppUsers200ResponseInner instantiates a new ListAppUsers200ResponseInner 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 - -### NewListAppUsers200ResponseInnerWithDefaults - -`func NewListAppUsers200ResponseInnerWithDefaults() *ListAppUsers200ResponseInner` - -NewListAppUsers200ResponseInnerWithDefaults instantiates a new ListAppUsers200ResponseInner 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 - -### GetFirstname - -`func (o *ListAppUsers200ResponseInner) GetFirstname() string` - -GetFirstname returns the Firstname field if non-nil, zero value otherwise. - -### GetFirstnameOk - -`func (o *ListAppUsers200ResponseInner) GetFirstnameOk() (*string, bool)` - -GetFirstnameOk returns a tuple with the Firstname field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetFirstname - -`func (o *ListAppUsers200ResponseInner) SetFirstname(v string)` - -SetFirstname sets Firstname field to given value. - -### HasFirstname - -`func (o *ListAppUsers200ResponseInner) HasFirstname() bool` - -HasFirstname returns a boolean if a field has been set. - -### GetId - -`func (o *ListAppUsers200ResponseInner) GetId() int32` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *ListAppUsers200ResponseInner) GetIdOk() (*int32, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *ListAppUsers200ResponseInner) SetId(v int32)` - -SetId sets Id field to given value. - -### HasId - -`func (o *ListAppUsers200ResponseInner) HasId() bool` - -HasId returns a boolean if a field has been set. - -### GetEmail - -`func (o *ListAppUsers200ResponseInner) GetEmail() string` - -GetEmail returns the Email field if non-nil, zero value otherwise. - -### GetEmailOk - -`func (o *ListAppUsers200ResponseInner) 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 *ListAppUsers200ResponseInner) SetEmail(v string)` - -SetEmail sets Email field to given value. - -### HasEmail - -`func (o *ListAppUsers200ResponseInner) HasEmail() bool` - -HasEmail returns a boolean if a field has been set. - -### GetLastname - -`func (o *ListAppUsers200ResponseInner) GetLastname() string` - -GetLastname returns the Lastname field if non-nil, zero value otherwise. - -### GetLastnameOk - -`func (o *ListAppUsers200ResponseInner) GetLastnameOk() (*string, bool)` - -GetLastnameOk returns a tuple with the Lastname field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLastname - -`func (o *ListAppUsers200ResponseInner) SetLastname(v string)` - -SetLastname sets Lastname field to given value. - -### HasLastname - -`func (o *ListAppUsers200ResponseInner) HasLastname() bool` - -HasLastname returns a boolean if a field has been set. - -### GetUsername - -`func (o *ListAppUsers200ResponseInner) GetUsername() string` - -GetUsername returns the Username field if non-nil, zero value otherwise. - -### GetUsernameOk - -`func (o *ListAppUsers200ResponseInner) 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 *ListAppUsers200ResponseInner) SetUsername(v string)` - -SetUsername sets Username field to given value. - -### HasUsername - -`func (o *ListAppUsers200ResponseInner) HasUsername() bool` - -HasUsername 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/ListAuthorizationServers200ResponseInner.md b/docs/ListAuthorizationServers200ResponseInner.md deleted file mode 100644 index 007072e..0000000 --- a/docs/ListAuthorizationServers200ResponseInner.md +++ /dev/null @@ -1,134 +0,0 @@ -# ListAuthorizationServers200ResponseInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | Pointer to **int32** | | [optional] -**Name** | Pointer to **string** | | [optional] -**Configuration** | Pointer to [**ListAuthorizationServers200ResponseInnerConfiguration**](ListAuthorizationServers200ResponseInnerConfiguration.md) | | [optional] -**Description** | Pointer to **string** | | [optional] - -## Methods - -### NewListAuthorizationServers200ResponseInner - -`func NewListAuthorizationServers200ResponseInner() *ListAuthorizationServers200ResponseInner` - -NewListAuthorizationServers200ResponseInner instantiates a new ListAuthorizationServers200ResponseInner 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 - -### NewListAuthorizationServers200ResponseInnerWithDefaults - -`func NewListAuthorizationServers200ResponseInnerWithDefaults() *ListAuthorizationServers200ResponseInner` - -NewListAuthorizationServers200ResponseInnerWithDefaults instantiates a new ListAuthorizationServers200ResponseInner 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 - -### GetId - -`func (o *ListAuthorizationServers200ResponseInner) GetId() int32` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *ListAuthorizationServers200ResponseInner) GetIdOk() (*int32, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *ListAuthorizationServers200ResponseInner) SetId(v int32)` - -SetId sets Id field to given value. - -### HasId - -`func (o *ListAuthorizationServers200ResponseInner) HasId() bool` - -HasId returns a boolean if a field has been set. - -### GetName - -`func (o *ListAuthorizationServers200ResponseInner) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *ListAuthorizationServers200ResponseInner) 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 *ListAuthorizationServers200ResponseInner) SetName(v string)` - -SetName sets Name field to given value. - -### HasName - -`func (o *ListAuthorizationServers200ResponseInner) HasName() bool` - -HasName returns a boolean if a field has been set. - -### GetConfiguration - -`func (o *ListAuthorizationServers200ResponseInner) GetConfiguration() ListAuthorizationServers200ResponseInnerConfiguration` - -GetConfiguration returns the Configuration field if non-nil, zero value otherwise. - -### GetConfigurationOk - -`func (o *ListAuthorizationServers200ResponseInner) GetConfigurationOk() (*ListAuthorizationServers200ResponseInnerConfiguration, bool)` - -GetConfigurationOk returns a tuple with the Configuration field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConfiguration - -`func (o *ListAuthorizationServers200ResponseInner) SetConfiguration(v ListAuthorizationServers200ResponseInnerConfiguration)` - -SetConfiguration sets Configuration field to given value. - -### HasConfiguration - -`func (o *ListAuthorizationServers200ResponseInner) HasConfiguration() bool` - -HasConfiguration returns a boolean if a field has been set. - -### GetDescription - -`func (o *ListAuthorizationServers200ResponseInner) GetDescription() string` - -GetDescription returns the Description field if non-nil, zero value otherwise. - -### GetDescriptionOk - -`func (o *ListAuthorizationServers200ResponseInner) GetDescriptionOk() (*string, bool)` - -GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDescription - -`func (o *ListAuthorizationServers200ResponseInner) SetDescription(v string)` - -SetDescription sets Description field to given value. - -### HasDescription - -`func (o *ListAuthorizationServers200ResponseInner) HasDescription() bool` - -HasDescription 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/ListAuthorizationServers200ResponseInnerConfiguration.md b/docs/ListAuthorizationServers200ResponseInnerConfiguration.md deleted file mode 100644 index 22f10f6..0000000 --- a/docs/ListAuthorizationServers200ResponseInnerConfiguration.md +++ /dev/null @@ -1,82 +0,0 @@ -# ListAuthorizationServers200ResponseInnerConfiguration - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ResourceIdentifier** | Pointer to **string** | | [optional] -**Audiences** | Pointer to **[]string** | | [optional] - -## Methods - -### NewListAuthorizationServers200ResponseInnerConfiguration - -`func NewListAuthorizationServers200ResponseInnerConfiguration() *ListAuthorizationServers200ResponseInnerConfiguration` - -NewListAuthorizationServers200ResponseInnerConfiguration instantiates a new ListAuthorizationServers200ResponseInnerConfiguration 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 - -### NewListAuthorizationServers200ResponseInnerConfigurationWithDefaults - -`func NewListAuthorizationServers200ResponseInnerConfigurationWithDefaults() *ListAuthorizationServers200ResponseInnerConfiguration` - -NewListAuthorizationServers200ResponseInnerConfigurationWithDefaults instantiates a new ListAuthorizationServers200ResponseInnerConfiguration 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 - -### GetResourceIdentifier - -`func (o *ListAuthorizationServers200ResponseInnerConfiguration) GetResourceIdentifier() string` - -GetResourceIdentifier returns the ResourceIdentifier field if non-nil, zero value otherwise. - -### GetResourceIdentifierOk - -`func (o *ListAuthorizationServers200ResponseInnerConfiguration) GetResourceIdentifierOk() (*string, bool)` - -GetResourceIdentifierOk returns a tuple with the ResourceIdentifier field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetResourceIdentifier - -`func (o *ListAuthorizationServers200ResponseInnerConfiguration) SetResourceIdentifier(v string)` - -SetResourceIdentifier sets ResourceIdentifier field to given value. - -### HasResourceIdentifier - -`func (o *ListAuthorizationServers200ResponseInnerConfiguration) HasResourceIdentifier() bool` - -HasResourceIdentifier returns a boolean if a field has been set. - -### GetAudiences - -`func (o *ListAuthorizationServers200ResponseInnerConfiguration) GetAudiences() []string` - -GetAudiences returns the Audiences field if non-nil, zero value otherwise. - -### GetAudiencesOk - -`func (o *ListAuthorizationServers200ResponseInnerConfiguration) GetAudiencesOk() (*[]string, bool)` - -GetAudiencesOk returns a tuple with the Audiences field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAudiences - -`func (o *ListAuthorizationServers200ResponseInnerConfiguration) SetAudiences(v []string)` - -SetAudiences sets Audiences field to given value. - -### HasAudiences - -`func (o *ListAuthorizationServers200ResponseInnerConfiguration) HasAudiences() bool` - -HasAudiences 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/ListConditions200ResponseInner.md b/docs/ListConditions200ResponseInner.md index 66b7a55..1ffb2a1 100644 --- a/docs/ListConditions200ResponseInner.md +++ b/docs/ListConditions200ResponseInner.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Name** | Pointer to **string** | The name of the Condition. | [optional] +**Name** | Pointer to **string** | Name of the rule condition | [optional] **Value** | Pointer to **string** | The unique identifier of the condition. This should be used when defining conditions for a rule. | [optional] ## Methods diff --git a/docs/ListConditionOperators200ResponseInner.md b/docs/ListMappingActionValues200ResponseInner.md similarity index 51% rename from docs/ListConditionOperators200ResponseInner.md rename to docs/ListMappingActionValues200ResponseInner.md index 9902a52..b604d9d 100644 --- a/docs/ListConditionOperators200ResponseInner.md +++ b/docs/ListMappingActionValues200ResponseInner.md @@ -1,78 +1,78 @@ -# ListConditionOperators200ResponseInner +# ListMappingActionValues200ResponseInner ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Name** | Pointer to **string** | The name or description of the operator. | [optional] -**Value** | Pointer to **string** | The condition operator value to use when creating or updating App Rules. | [optional] +**Name** | Pointer to **string** | Name or description of operator | [optional] +**Value** | Pointer to **int32** | The action operator value to use when creating or updating User Mappings. | [optional] ## Methods -### NewListConditionOperators200ResponseInner +### NewListMappingActionValues200ResponseInner -`func NewListConditionOperators200ResponseInner() *ListConditionOperators200ResponseInner` +`func NewListMappingActionValues200ResponseInner() *ListMappingActionValues200ResponseInner` -NewListConditionOperators200ResponseInner instantiates a new ListConditionOperators200ResponseInner object +NewListMappingActionValues200ResponseInner instantiates a new ListMappingActionValues200ResponseInner 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 -### NewListConditionOperators200ResponseInnerWithDefaults +### NewListMappingActionValues200ResponseInnerWithDefaults -`func NewListConditionOperators200ResponseInnerWithDefaults() *ListConditionOperators200ResponseInner` +`func NewListMappingActionValues200ResponseInnerWithDefaults() *ListMappingActionValues200ResponseInner` -NewListConditionOperators200ResponseInnerWithDefaults instantiates a new ListConditionOperators200ResponseInner object +NewListMappingActionValues200ResponseInnerWithDefaults instantiates a new ListMappingActionValues200ResponseInner 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 *ListConditionOperators200ResponseInner) GetName() string` +`func (o *ListMappingActionValues200ResponseInner) GetName() string` GetName returns the Name field if non-nil, zero value otherwise. ### GetNameOk -`func (o *ListConditionOperators200ResponseInner) GetNameOk() (*string, bool)` +`func (o *ListMappingActionValues200ResponseInner) 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 *ListConditionOperators200ResponseInner) SetName(v string)` +`func (o *ListMappingActionValues200ResponseInner) SetName(v string)` SetName sets Name field to given value. ### HasName -`func (o *ListConditionOperators200ResponseInner) HasName() bool` +`func (o *ListMappingActionValues200ResponseInner) HasName() bool` HasName returns a boolean if a field has been set. ### GetValue -`func (o *ListConditionOperators200ResponseInner) GetValue() string` +`func (o *ListMappingActionValues200ResponseInner) GetValue() int32` GetValue returns the Value field if non-nil, zero value otherwise. ### GetValueOk -`func (o *ListConditionOperators200ResponseInner) GetValueOk() (*string, bool)` +`func (o *ListMappingActionValues200ResponseInner) GetValueOk() (*int32, bool)` GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetValue -`func (o *ListConditionOperators200ResponseInner) SetValue(v string)` +`func (o *ListMappingActionValues200ResponseInner) SetValue(v int32)` SetValue sets Value field to given value. ### HasValue -`func (o *ListConditionOperators200ResponseInner) HasValue() bool` +`func (o *ListMappingActionValues200ResponseInner) HasValue() bool` HasValue returns a boolean if a field has been set. diff --git a/docs/ListMappingConditions200ResponseInner.md b/docs/ListMappingConditions200Response.md similarity index 55% rename from docs/ListMappingConditions200ResponseInner.md rename to docs/ListMappingConditions200Response.md index bb51c08..d0f1ef5 100644 --- a/docs/ListMappingConditions200ResponseInner.md +++ b/docs/ListMappingConditions200Response.md @@ -1,78 +1,78 @@ -# ListMappingConditions200ResponseInner +# ListMappingConditions200Response ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Name** | Pointer to **string** | The name of the Condition. | [optional] -**Value** | Pointer to **string** | The unique identifier of the condition. This should be used when defining conditions for a User Mapping. | [optional] +**Name** | Pointer to **string** | Name of Condition | [optional] +**Value** | Pointer to **string** | The unique identifier of the condition. This should be used when defining conditions for a User Mapping | [optional] ## Methods -### NewListMappingConditions200ResponseInner +### NewListMappingConditions200Response -`func NewListMappingConditions200ResponseInner() *ListMappingConditions200ResponseInner` +`func NewListMappingConditions200Response() *ListMappingConditions200Response` -NewListMappingConditions200ResponseInner instantiates a new ListMappingConditions200ResponseInner object +NewListMappingConditions200Response instantiates a new ListMappingConditions200Response 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 -### NewListMappingConditions200ResponseInnerWithDefaults +### NewListMappingConditions200ResponseWithDefaults -`func NewListMappingConditions200ResponseInnerWithDefaults() *ListMappingConditions200ResponseInner` +`func NewListMappingConditions200ResponseWithDefaults() *ListMappingConditions200Response` -NewListMappingConditions200ResponseInnerWithDefaults instantiates a new ListMappingConditions200ResponseInner object +NewListMappingConditions200ResponseWithDefaults instantiates a new ListMappingConditions200Response 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 *ListMappingConditions200ResponseInner) GetName() string` +`func (o *ListMappingConditions200Response) GetName() string` GetName returns the Name field if non-nil, zero value otherwise. ### GetNameOk -`func (o *ListMappingConditions200ResponseInner) GetNameOk() (*string, bool)` +`func (o *ListMappingConditions200Response) 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 *ListMappingConditions200ResponseInner) SetName(v string)` +`func (o *ListMappingConditions200Response) SetName(v string)` SetName sets Name field to given value. ### HasName -`func (o *ListMappingConditions200ResponseInner) HasName() bool` +`func (o *ListMappingConditions200Response) HasName() bool` HasName returns a boolean if a field has been set. ### GetValue -`func (o *ListMappingConditions200ResponseInner) GetValue() string` +`func (o *ListMappingConditions200Response) GetValue() string` GetValue returns the Value field if non-nil, zero value otherwise. ### GetValueOk -`func (o *ListMappingConditions200ResponseInner) GetValueOk() (*string, bool)` +`func (o *ListMappingConditions200Response) GetValueOk() (*string, bool)` GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetValue -`func (o *ListMappingConditions200ResponseInner) SetValue(v string)` +`func (o *ListMappingConditions200Response) SetValue(v string)` SetValue sets Value field to given value. ### HasValue -`func (o *ListMappingConditions200ResponseInner) HasValue() bool` +`func (o *ListMappingConditions200Response) HasValue() bool` HasValue returns a boolean if a field has been set. diff --git a/docs/ListMappingConditionOperators200ResponseInner.md b/docs/ListMappingConditionsOperators200ResponseInner.md similarity index 54% rename from docs/ListMappingConditionOperators200ResponseInner.md rename to docs/ListMappingConditionsOperators200ResponseInner.md index f09b72e..144f5b2 100644 --- a/docs/ListMappingConditionOperators200ResponseInner.md +++ b/docs/ListMappingConditionsOperators200ResponseInner.md @@ -1,78 +1,78 @@ -# ListMappingConditionOperators200ResponseInner +# ListMappingConditionsOperators200ResponseInner ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Name** | Pointer to **string** | The name or description of the operator. | [optional] +**Name** | Pointer to **string** | Name or description of operator | [optional] **Value** | Pointer to **string** | The condition operator value to use when creating or updating User Mappings. | [optional] ## Methods -### NewListMappingConditionOperators200ResponseInner +### NewListMappingConditionsOperators200ResponseInner -`func NewListMappingConditionOperators200ResponseInner() *ListMappingConditionOperators200ResponseInner` +`func NewListMappingConditionsOperators200ResponseInner() *ListMappingConditionsOperators200ResponseInner` -NewListMappingConditionOperators200ResponseInner instantiates a new ListMappingConditionOperators200ResponseInner object +NewListMappingConditionsOperators200ResponseInner instantiates a new ListMappingConditionsOperators200ResponseInner 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 -### NewListMappingConditionOperators200ResponseInnerWithDefaults +### NewListMappingConditionsOperators200ResponseInnerWithDefaults -`func NewListMappingConditionOperators200ResponseInnerWithDefaults() *ListMappingConditionOperators200ResponseInner` +`func NewListMappingConditionsOperators200ResponseInnerWithDefaults() *ListMappingConditionsOperators200ResponseInner` -NewListMappingConditionOperators200ResponseInnerWithDefaults instantiates a new ListMappingConditionOperators200ResponseInner object +NewListMappingConditionsOperators200ResponseInnerWithDefaults instantiates a new ListMappingConditionsOperators200ResponseInner 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 *ListMappingConditionOperators200ResponseInner) GetName() string` +`func (o *ListMappingConditionsOperators200ResponseInner) GetName() string` GetName returns the Name field if non-nil, zero value otherwise. ### GetNameOk -`func (o *ListMappingConditionOperators200ResponseInner) GetNameOk() (*string, bool)` +`func (o *ListMappingConditionsOperators200ResponseInner) 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 *ListMappingConditionOperators200ResponseInner) SetName(v string)` +`func (o *ListMappingConditionsOperators200ResponseInner) SetName(v string)` SetName sets Name field to given value. ### HasName -`func (o *ListMappingConditionOperators200ResponseInner) HasName() bool` +`func (o *ListMappingConditionsOperators200ResponseInner) HasName() bool` HasName returns a boolean if a field has been set. ### GetValue -`func (o *ListMappingConditionOperators200ResponseInner) GetValue() string` +`func (o *ListMappingConditionsOperators200ResponseInner) GetValue() string` GetValue returns the Value field if non-nil, zero value otherwise. ### GetValueOk -`func (o *ListMappingConditionOperators200ResponseInner) GetValueOk() (*string, bool)` +`func (o *ListMappingConditionsOperators200ResponseInner) GetValueOk() (*string, bool)` GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetValue -`func (o *ListMappingConditionOperators200ResponseInner) SetValue(v string)` +`func (o *ListMappingConditionsOperators200ResponseInner) SetValue(v string)` SetValue sets Value field to given value. ### HasValue -`func (o *ListMappingConditionOperators200ResponseInner) HasValue() bool` +`func (o *ListMappingConditionsOperators200ResponseInner) HasValue() bool` HasValue returns a boolean if a field has been set. diff --git a/docs/ListMappingContionValues200ResponseInner.md b/docs/ListMappingContionValues200ResponseInner.md new file mode 100644 index 0000000..8e51b3f --- /dev/null +++ b/docs/ListMappingContionValues200ResponseInner.md @@ -0,0 +1,82 @@ +# ListMappingContionValues200ResponseInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | Name or description of operator | [optional] +**Value** | Pointer to **int32** | The condition operator value to use when creating or updating User Mappings. | [optional] + +## Methods + +### NewListMappingContionValues200ResponseInner + +`func NewListMappingContionValues200ResponseInner() *ListMappingContionValues200ResponseInner` + +NewListMappingContionValues200ResponseInner instantiates a new ListMappingContionValues200ResponseInner 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 + +### NewListMappingContionValues200ResponseInnerWithDefaults + +`func NewListMappingContionValues200ResponseInnerWithDefaults() *ListMappingContionValues200ResponseInner` + +NewListMappingContionValues200ResponseInnerWithDefaults instantiates a new ListMappingContionValues200ResponseInner 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 *ListMappingContionValues200ResponseInner) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ListMappingContionValues200ResponseInner) 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 *ListMappingContionValues200ResponseInner) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *ListMappingContionValues200ResponseInner) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetValue + +`func (o *ListMappingContionValues200ResponseInner) GetValue() int32` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *ListMappingContionValues200ResponseInner) GetValueOk() (*int32, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *ListMappingContionValues200ResponseInner) SetValue(v int32)` + +SetValue sets Value field to given value. + +### HasValue + +`func (o *ListMappingContionValues200ResponseInner) HasValue() bool` + +HasValue 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/ListMappingsActions200ResponseInner.md b/docs/ListMappingsActions200ResponseInner.md new file mode 100644 index 0000000..1a92cca --- /dev/null +++ b/docs/ListMappingsActions200ResponseInner.md @@ -0,0 +1,82 @@ +# ListMappingsActions200ResponseInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | Name of the action | [optional] +**Value** | Pointer to **string** | The unique identifier of the action. This should be used when defining actions for a User Mapping. | [optional] + +## Methods + +### NewListMappingsActions200ResponseInner + +`func NewListMappingsActions200ResponseInner() *ListMappingsActions200ResponseInner` + +NewListMappingsActions200ResponseInner instantiates a new ListMappingsActions200ResponseInner 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 + +### NewListMappingsActions200ResponseInnerWithDefaults + +`func NewListMappingsActions200ResponseInnerWithDefaults() *ListMappingsActions200ResponseInner` + +NewListMappingsActions200ResponseInnerWithDefaults instantiates a new ListMappingsActions200ResponseInner 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 *ListMappingsActions200ResponseInner) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ListMappingsActions200ResponseInner) 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 *ListMappingsActions200ResponseInner) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *ListMappingsActions200ResponseInner) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetValue + +`func (o *ListMappingsActions200ResponseInner) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *ListMappingsActions200ResponseInner) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *ListMappingsActions200ResponseInner) SetValue(v string)` + +SetValue sets Value field to given value. + +### HasValue + +`func (o *ListMappingsActions200ResponseInner) HasValue() bool` + +HasValue 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/ListMessageTemplates200ResponseInner.md b/docs/ListMessageTemplates200ResponseInner.md new file mode 100644 index 0000000..cdab3d6 --- /dev/null +++ b/docs/ListMessageTemplates200ResponseInner.md @@ -0,0 +1,108 @@ +# ListMessageTemplates200ResponseInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **int32** | template ID | [optional] +**Enabled** | Pointer to **bool** | indicator if template is enabled | [optional] +**Name** | Pointer to **string** | name of message template | [optional] + +## Methods + +### NewListMessageTemplates200ResponseInner + +`func NewListMessageTemplates200ResponseInner() *ListMessageTemplates200ResponseInner` + +NewListMessageTemplates200ResponseInner instantiates a new ListMessageTemplates200ResponseInner 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 + +### NewListMessageTemplates200ResponseInnerWithDefaults + +`func NewListMessageTemplates200ResponseInnerWithDefaults() *ListMessageTemplates200ResponseInner` + +NewListMessageTemplates200ResponseInnerWithDefaults instantiates a new ListMessageTemplates200ResponseInner 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 + +### GetId + +`func (o *ListMessageTemplates200ResponseInner) GetId() int32` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ListMessageTemplates200ResponseInner) GetIdOk() (*int32, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ListMessageTemplates200ResponseInner) SetId(v int32)` + +SetId sets Id field to given value. + +### HasId + +`func (o *ListMessageTemplates200ResponseInner) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetEnabled + +`func (o *ListMessageTemplates200ResponseInner) GetEnabled() bool` + +GetEnabled returns the Enabled field if non-nil, zero value otherwise. + +### GetEnabledOk + +`func (o *ListMessageTemplates200ResponseInner) 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 *ListMessageTemplates200ResponseInner) SetEnabled(v bool)` + +SetEnabled sets Enabled field to given value. + +### HasEnabled + +`func (o *ListMessageTemplates200ResponseInner) HasEnabled() bool` + +HasEnabled returns a boolean if a field has been set. + +### GetName + +`func (o *ListMessageTemplates200ResponseInner) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ListMessageTemplates200ResponseInner) 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 *ListMessageTemplates200ResponseInner) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *ListMessageTemplates200ResponseInner) HasName() bool` + +HasName 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/ListPrivelegeRoles200Response.md b/docs/ListPrivelegeRoles200Response.md new file mode 100644 index 0000000..3194a66 --- /dev/null +++ b/docs/ListPrivelegeRoles200Response.md @@ -0,0 +1,226 @@ +# ListPrivelegeRoles200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Total** | Pointer to **int32** | | [optional] +**Roles** | Pointer to **[]int32** | | [optional] +**BeforeCursor** | Pointer to **NullableInt32** | | [optional] +**PreviousLink** | Pointer to **NullableString** | | [optional] +**AfterCursor** | Pointer to **NullableInt32** | | [optional] +**NextLink** | Pointer to **NullableString** | | [optional] + +## Methods + +### NewListPrivelegeRoles200Response + +`func NewListPrivelegeRoles200Response() *ListPrivelegeRoles200Response` + +NewListPrivelegeRoles200Response instantiates a new ListPrivelegeRoles200Response 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 + +### NewListPrivelegeRoles200ResponseWithDefaults + +`func NewListPrivelegeRoles200ResponseWithDefaults() *ListPrivelegeRoles200Response` + +NewListPrivelegeRoles200ResponseWithDefaults instantiates a new ListPrivelegeRoles200Response 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 + +### GetTotal + +`func (o *ListPrivelegeRoles200Response) GetTotal() int32` + +GetTotal returns the Total field if non-nil, zero value otherwise. + +### GetTotalOk + +`func (o *ListPrivelegeRoles200Response) GetTotalOk() (*int32, bool)` + +GetTotalOk returns a tuple with the Total field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotal + +`func (o *ListPrivelegeRoles200Response) SetTotal(v int32)` + +SetTotal sets Total field to given value. + +### HasTotal + +`func (o *ListPrivelegeRoles200Response) HasTotal() bool` + +HasTotal returns a boolean if a field has been set. + +### GetRoles + +`func (o *ListPrivelegeRoles200Response) GetRoles() []int32` + +GetRoles returns the Roles field if non-nil, zero value otherwise. + +### GetRolesOk + +`func (o *ListPrivelegeRoles200Response) GetRolesOk() (*[]int32, bool)` + +GetRolesOk returns a tuple with the Roles field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRoles + +`func (o *ListPrivelegeRoles200Response) SetRoles(v []int32)` + +SetRoles sets Roles field to given value. + +### HasRoles + +`func (o *ListPrivelegeRoles200Response) HasRoles() bool` + +HasRoles returns a boolean if a field has been set. + +### GetBeforeCursor + +`func (o *ListPrivelegeRoles200Response) GetBeforeCursor() int32` + +GetBeforeCursor returns the BeforeCursor field if non-nil, zero value otherwise. + +### GetBeforeCursorOk + +`func (o *ListPrivelegeRoles200Response) GetBeforeCursorOk() (*int32, bool)` + +GetBeforeCursorOk returns a tuple with the BeforeCursor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBeforeCursor + +`func (o *ListPrivelegeRoles200Response) SetBeforeCursor(v int32)` + +SetBeforeCursor sets BeforeCursor field to given value. + +### HasBeforeCursor + +`func (o *ListPrivelegeRoles200Response) HasBeforeCursor() bool` + +HasBeforeCursor returns a boolean if a field has been set. + +### SetBeforeCursorNil + +`func (o *ListPrivelegeRoles200Response) SetBeforeCursorNil(b bool)` + + SetBeforeCursorNil sets the value for BeforeCursor to be an explicit nil + +### UnsetBeforeCursor +`func (o *ListPrivelegeRoles200Response) UnsetBeforeCursor()` + +UnsetBeforeCursor ensures that no value is present for BeforeCursor, not even an explicit nil +### GetPreviousLink + +`func (o *ListPrivelegeRoles200Response) GetPreviousLink() string` + +GetPreviousLink returns the PreviousLink field if non-nil, zero value otherwise. + +### GetPreviousLinkOk + +`func (o *ListPrivelegeRoles200Response) GetPreviousLinkOk() (*string, bool)` + +GetPreviousLinkOk returns a tuple with the PreviousLink field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPreviousLink + +`func (o *ListPrivelegeRoles200Response) SetPreviousLink(v string)` + +SetPreviousLink sets PreviousLink field to given value. + +### HasPreviousLink + +`func (o *ListPrivelegeRoles200Response) HasPreviousLink() bool` + +HasPreviousLink returns a boolean if a field has been set. + +### SetPreviousLinkNil + +`func (o *ListPrivelegeRoles200Response) SetPreviousLinkNil(b bool)` + + SetPreviousLinkNil sets the value for PreviousLink to be an explicit nil + +### UnsetPreviousLink +`func (o *ListPrivelegeRoles200Response) UnsetPreviousLink()` + +UnsetPreviousLink ensures that no value is present for PreviousLink, not even an explicit nil +### GetAfterCursor + +`func (o *ListPrivelegeRoles200Response) GetAfterCursor() int32` + +GetAfterCursor returns the AfterCursor field if non-nil, zero value otherwise. + +### GetAfterCursorOk + +`func (o *ListPrivelegeRoles200Response) GetAfterCursorOk() (*int32, bool)` + +GetAfterCursorOk returns a tuple with the AfterCursor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAfterCursor + +`func (o *ListPrivelegeRoles200Response) SetAfterCursor(v int32)` + +SetAfterCursor sets AfterCursor field to given value. + +### HasAfterCursor + +`func (o *ListPrivelegeRoles200Response) HasAfterCursor() bool` + +HasAfterCursor returns a boolean if a field has been set. + +### SetAfterCursorNil + +`func (o *ListPrivelegeRoles200Response) SetAfterCursorNil(b bool)` + + SetAfterCursorNil sets the value for AfterCursor to be an explicit nil + +### UnsetAfterCursor +`func (o *ListPrivelegeRoles200Response) UnsetAfterCursor()` + +UnsetAfterCursor ensures that no value is present for AfterCursor, not even an explicit nil +### GetNextLink + +`func (o *ListPrivelegeRoles200Response) GetNextLink() string` + +GetNextLink returns the NextLink field if non-nil, zero value otherwise. + +### GetNextLinkOk + +`func (o *ListPrivelegeRoles200Response) GetNextLinkOk() (*string, bool)` + +GetNextLinkOk returns a tuple with the NextLink field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNextLink + +`func (o *ListPrivelegeRoles200Response) SetNextLink(v string)` + +SetNextLink sets NextLink field to given value. + +### HasNextLink + +`func (o *ListPrivelegeRoles200Response) HasNextLink() bool` + +HasNextLink returns a boolean if a field has been set. + +### SetNextLinkNil + +`func (o *ListPrivelegeRoles200Response) SetNextLinkNil(b bool)` + + SetNextLinkNil sets the value for NextLink to be an explicit nil + +### UnsetNextLink +`func (o *ListPrivelegeRoles200Response) UnsetNextLink()` + +UnsetNextLink ensures that no value is present for NextLink, 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/Locale.md b/docs/Locale.md new file mode 100644 index 0000000..006214a --- /dev/null +++ b/docs/Locale.md @@ -0,0 +1,82 @@ +# Locale + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Language** | Pointer to **string** | locale string | [optional] +**IsDefault** | Pointer to **bool** | indicator if language is default | [optional] + +## Methods + +### NewLocale + +`func NewLocale() *Locale` + +NewLocale instantiates a new Locale 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 + +### NewLocaleWithDefaults + +`func NewLocaleWithDefaults() *Locale` + +NewLocaleWithDefaults instantiates a new Locale 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 + +### GetLanguage + +`func (o *Locale) GetLanguage() string` + +GetLanguage returns the Language field if non-nil, zero value otherwise. + +### GetLanguageOk + +`func (o *Locale) GetLanguageOk() (*string, bool)` + +GetLanguageOk returns a tuple with the Language field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLanguage + +`func (o *Locale) SetLanguage(v string)` + +SetLanguage sets Language field to given value. + +### HasLanguage + +`func (o *Locale) HasLanguage() bool` + +HasLanguage returns a boolean if a field has been set. + +### GetIsDefault + +`func (o *Locale) GetIsDefault() bool` + +GetIsDefault returns the IsDefault field if non-nil, zero value otherwise. + +### GetIsDefaultOk + +`func (o *Locale) GetIsDefaultOk() (*bool, bool)` + +GetIsDefaultOk returns a tuple with the IsDefault field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsDefault + +`func (o *Locale) SetIsDefault(v bool)` + +SetIsDefault sets IsDefault field to given value. + +### HasIsDefault + +`func (o *Locale) HasIsDefault() bool` + +HasIsDefault 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/LockAccountUserRequest.md b/docs/LockAccountUserRequest.md new file mode 100644 index 0000000..7cc137a --- /dev/null +++ b/docs/LockAccountUserRequest.md @@ -0,0 +1,51 @@ +# LockAccountUserRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**LockedUntil** | **int32** | Set to the number of minutes for which you want to lock the user account. Set to 0 if you want to lock the user account based on the Lock effective period set in the policy assigned to the user. If no policy is assigned to the user, setting this value to 0 will lock the user’s account until you unlock it Note that this value can not be less time that the Lock Effective Period specified on a user policy. | + +## Methods + +### NewLockAccountUserRequest + +`func NewLockAccountUserRequest(lockedUntil int32, ) *LockAccountUserRequest` + +NewLockAccountUserRequest instantiates a new LockAccountUserRequest 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 + +### NewLockAccountUserRequestWithDefaults + +`func NewLockAccountUserRequestWithDefaults() *LockAccountUserRequest` + +NewLockAccountUserRequestWithDefaults instantiates a new LockAccountUserRequest 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 + +### GetLockedUntil + +`func (o *LockAccountUserRequest) GetLockedUntil() int32` + +GetLockedUntil returns the LockedUntil field if non-nil, zero value otherwise. + +### GetLockedUntilOk + +`func (o *LockAccountUserRequest) GetLockedUntilOk() (*int32, bool)` + +GetLockedUntilOk returns a tuple with the LockedUntil field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLockedUntil + +`func (o *LockAccountUserRequest) SetLockedUntil(v int32)` + +SetLockedUntil sets LockedUntil 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/Mapping.md b/docs/Mapping.md index 5944683..6903107 100644 --- a/docs/Mapping.md +++ b/docs/Mapping.md @@ -9,14 +9,14 @@ Name | Type | Description | Notes **Enabled** | **bool** | Indicates if the mapping is enabled or not. | **Match** | **string** | Indicates how conditions should be matched. | **Position** | **int32** | Indicates the order of the mapping. When `null` this will default to last position. | -**Conditions** | Pointer to [**[]Condition**](Condition.md) | An array of conditions that the user must meet in order for the mapping to be applied. | [optional] -**Actions** | [**[]Action**](Action.md) | An array of actions that will be applied to the users that are matched by the conditions. | +**Conditions** | [**[]Condition**](Condition.md) | An array of conditions that the user must meet in order for the mapping to be applied. | +**Actions** | [**[]ActionObj**](ActionObj.md) | An array of actions that will be applied to the users that are matched by the conditions. | ## Methods ### NewMapping -`func NewMapping(name string, enabled bool, match string, position int32, actions []Action, ) *Mapping` +`func NewMapping(name string, enabled bool, match string, position int32, conditions []Condition, actions []ActionObj, ) *Mapping` NewMapping instantiates a new Mapping object This constructor will assign default values to properties that have it defined, @@ -155,28 +155,23 @@ and a boolean to check if the value has been set. SetConditions sets Conditions field to given value. -### HasConditions - -`func (o *Mapping) HasConditions() bool` - -HasConditions returns a boolean if a field has been set. ### GetActions -`func (o *Mapping) GetActions() []Action` +`func (o *Mapping) GetActions() []ActionObj` GetActions returns the Actions field if non-nil, zero value otherwise. ### GetActionsOk -`func (o *Mapping) GetActionsOk() (*[]Action, bool)` +`func (o *Mapping) GetActionsOk() (*[]ActionObj, bool)` GetActionsOk returns a tuple with the Actions field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetActions -`func (o *Mapping) SetActions(v []Action)` +`func (o *Mapping) SetActions(v []ActionObj)` SetActions sets Actions field to given value. diff --git a/docs/MessageTemplate.md b/docs/MessageTemplate.md new file mode 100644 index 0000000..70c7085 --- /dev/null +++ b/docs/MessageTemplate.md @@ -0,0 +1,223 @@ +# MessageTemplate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **int32** | | [optional] [readonly] +**AccountId** | Pointer to **int32** | | [optional] [readonly] +**Type** | **string** | Template type that describes the source (sms, voice, email) and purpose (registration, invite, etc) | +**Locale** | **string** | The 2 character language locale for the template. e.g. en = English, es = Spanish | +**Template** | [**MessageTemplateTemplate**](MessageTemplateTemplate.md) | | +**TemplateClass** | Pointer to **string** | | [optional] [readonly] +**UpdatedAt** | Pointer to **string** | Last time template was updated | [optional] [readonly] +**BrandId** | Pointer to **int32** | brand id number | [optional] [readonly] + +## Methods + +### NewMessageTemplate + +`func NewMessageTemplate(type_ string, locale string, template MessageTemplateTemplate, ) *MessageTemplate` + +NewMessageTemplate instantiates a new MessageTemplate 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 + +### NewMessageTemplateWithDefaults + +`func NewMessageTemplateWithDefaults() *MessageTemplate` + +NewMessageTemplateWithDefaults instantiates a new MessageTemplate 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 + +### GetId + +`func (o *MessageTemplate) GetId() int32` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *MessageTemplate) GetIdOk() (*int32, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *MessageTemplate) SetId(v int32)` + +SetId sets Id field to given value. + +### HasId + +`func (o *MessageTemplate) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetAccountId + +`func (o *MessageTemplate) GetAccountId() int32` + +GetAccountId returns the AccountId field if non-nil, zero value otherwise. + +### GetAccountIdOk + +`func (o *MessageTemplate) GetAccountIdOk() (*int32, bool)` + +GetAccountIdOk returns a tuple with the AccountId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountId + +`func (o *MessageTemplate) SetAccountId(v int32)` + +SetAccountId sets AccountId field to given value. + +### HasAccountId + +`func (o *MessageTemplate) HasAccountId() bool` + +HasAccountId returns a boolean if a field has been set. + +### GetType + +`func (o *MessageTemplate) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *MessageTemplate) GetTypeOk() (*string, 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 *MessageTemplate) SetType(v string)` + +SetType sets Type field to given value. + + +### GetLocale + +`func (o *MessageTemplate) GetLocale() string` + +GetLocale returns the Locale field if non-nil, zero value otherwise. + +### GetLocaleOk + +`func (o *MessageTemplate) GetLocaleOk() (*string, bool)` + +GetLocaleOk returns a tuple with the Locale field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLocale + +`func (o *MessageTemplate) SetLocale(v string)` + +SetLocale sets Locale field to given value. + + +### GetTemplate + +`func (o *MessageTemplate) GetTemplate() MessageTemplateTemplate` + +GetTemplate returns the Template field if non-nil, zero value otherwise. + +### GetTemplateOk + +`func (o *MessageTemplate) GetTemplateOk() (*MessageTemplateTemplate, bool)` + +GetTemplateOk returns a tuple with the Template field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTemplate + +`func (o *MessageTemplate) SetTemplate(v MessageTemplateTemplate)` + +SetTemplate sets Template field to given value. + + +### GetTemplateClass + +`func (o *MessageTemplate) GetTemplateClass() string` + +GetTemplateClass returns the TemplateClass field if non-nil, zero value otherwise. + +### GetTemplateClassOk + +`func (o *MessageTemplate) GetTemplateClassOk() (*string, bool)` + +GetTemplateClassOk returns a tuple with the TemplateClass field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTemplateClass + +`func (o *MessageTemplate) SetTemplateClass(v string)` + +SetTemplateClass sets TemplateClass field to given value. + +### HasTemplateClass + +`func (o *MessageTemplate) HasTemplateClass() bool` + +HasTemplateClass returns a boolean if a field has been set. + +### GetUpdatedAt + +`func (o *MessageTemplate) GetUpdatedAt() string` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *MessageTemplate) GetUpdatedAtOk() (*string, bool)` + +GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedAt + +`func (o *MessageTemplate) SetUpdatedAt(v string)` + +SetUpdatedAt sets UpdatedAt field to given value. + +### HasUpdatedAt + +`func (o *MessageTemplate) HasUpdatedAt() bool` + +HasUpdatedAt returns a boolean if a field has been set. + +### GetBrandId + +`func (o *MessageTemplate) GetBrandId() int32` + +GetBrandId returns the BrandId field if non-nil, zero value otherwise. + +### GetBrandIdOk + +`func (o *MessageTemplate) GetBrandIdOk() (*int32, bool)` + +GetBrandIdOk returns a tuple with the BrandId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBrandId + +`func (o *MessageTemplate) SetBrandId(v int32)` + +SetBrandId sets BrandId field to given value. + +### HasBrandId + +`func (o *MessageTemplate) HasBrandId() bool` + +HasBrandId 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/MessageTemplateTemplate.md b/docs/MessageTemplateTemplate.md new file mode 100644 index 0000000..efe39a8 --- /dev/null +++ b/docs/MessageTemplateTemplate.md @@ -0,0 +1,114 @@ +# MessageTemplateTemplate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Subject** | **string** | Custom Email Subject | +**Html** | **string** | The HTML body of the Custom Email | +**Plain** | **string** | The Plain text body of the email | +**Message** | **string** | The body of the SMS message. Max length 160 characters. | + +## Methods + +### NewMessageTemplateTemplate + +`func NewMessageTemplateTemplate(subject string, html string, plain string, message string, ) *MessageTemplateTemplate` + +NewMessageTemplateTemplate instantiates a new MessageTemplateTemplate 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 + +### NewMessageTemplateTemplateWithDefaults + +`func NewMessageTemplateTemplateWithDefaults() *MessageTemplateTemplate` + +NewMessageTemplateTemplateWithDefaults instantiates a new MessageTemplateTemplate 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 + +### GetSubject + +`func (o *MessageTemplateTemplate) GetSubject() string` + +GetSubject returns the Subject field if non-nil, zero value otherwise. + +### GetSubjectOk + +`func (o *MessageTemplateTemplate) GetSubjectOk() (*string, bool)` + +GetSubjectOk returns a tuple with the Subject field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSubject + +`func (o *MessageTemplateTemplate) SetSubject(v string)` + +SetSubject sets Subject field to given value. + + +### GetHtml + +`func (o *MessageTemplateTemplate) GetHtml() string` + +GetHtml returns the Html field if non-nil, zero value otherwise. + +### GetHtmlOk + +`func (o *MessageTemplateTemplate) GetHtmlOk() (*string, bool)` + +GetHtmlOk returns a tuple with the Html field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHtml + +`func (o *MessageTemplateTemplate) SetHtml(v string)` + +SetHtml sets Html field to given value. + + +### GetPlain + +`func (o *MessageTemplateTemplate) GetPlain() string` + +GetPlain returns the Plain field if non-nil, zero value otherwise. + +### GetPlainOk + +`func (o *MessageTemplateTemplate) GetPlainOk() (*string, bool)` + +GetPlainOk returns a tuple with the Plain field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPlain + +`func (o *MessageTemplateTemplate) SetPlain(v string)` + +SetPlain sets Plain field to given value. + + +### GetMessage + +`func (o *MessageTemplateTemplate) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *MessageTemplateTemplate) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *MessageTemplateTemplate) SetMessage(v string)` + +SetMessage sets Message 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/MessageTemplateTemplateOneOf.md b/docs/MessageTemplateTemplateOneOf.md new file mode 100644 index 0000000..87aba87 --- /dev/null +++ b/docs/MessageTemplateTemplateOneOf.md @@ -0,0 +1,93 @@ +# MessageTemplateTemplateOneOf + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Subject** | **string** | Custom Email Subject | +**Html** | **string** | The HTML body of the Custom Email | +**Plain** | **string** | The Plain text body of the email | + +## Methods + +### NewMessageTemplateTemplateOneOf + +`func NewMessageTemplateTemplateOneOf(subject string, html string, plain string, ) *MessageTemplateTemplateOneOf` + +NewMessageTemplateTemplateOneOf instantiates a new MessageTemplateTemplateOneOf 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 + +### NewMessageTemplateTemplateOneOfWithDefaults + +`func NewMessageTemplateTemplateOneOfWithDefaults() *MessageTemplateTemplateOneOf` + +NewMessageTemplateTemplateOneOfWithDefaults instantiates a new MessageTemplateTemplateOneOf 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 + +### GetSubject + +`func (o *MessageTemplateTemplateOneOf) GetSubject() string` + +GetSubject returns the Subject field if non-nil, zero value otherwise. + +### GetSubjectOk + +`func (o *MessageTemplateTemplateOneOf) GetSubjectOk() (*string, bool)` + +GetSubjectOk returns a tuple with the Subject field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSubject + +`func (o *MessageTemplateTemplateOneOf) SetSubject(v string)` + +SetSubject sets Subject field to given value. + + +### GetHtml + +`func (o *MessageTemplateTemplateOneOf) GetHtml() string` + +GetHtml returns the Html field if non-nil, zero value otherwise. + +### GetHtmlOk + +`func (o *MessageTemplateTemplateOneOf) GetHtmlOk() (*string, bool)` + +GetHtmlOk returns a tuple with the Html field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHtml + +`func (o *MessageTemplateTemplateOneOf) SetHtml(v string)` + +SetHtml sets Html field to given value. + + +### GetPlain + +`func (o *MessageTemplateTemplateOneOf) GetPlain() string` + +GetPlain returns the Plain field if non-nil, zero value otherwise. + +### GetPlainOk + +`func (o *MessageTemplateTemplateOneOf) GetPlainOk() (*string, bool)` + +GetPlainOk returns a tuple with the Plain field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPlain + +`func (o *MessageTemplateTemplateOneOf) SetPlain(v string)` + +SetPlain sets Plain 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/MessageTemplateTemplateOneOf1.md b/docs/MessageTemplateTemplateOneOf1.md new file mode 100644 index 0000000..1b99b24 --- /dev/null +++ b/docs/MessageTemplateTemplateOneOf1.md @@ -0,0 +1,51 @@ +# MessageTemplateTemplateOneOf1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | The body of the SMS message. Max length 160 characters. | + +## Methods + +### NewMessageTemplateTemplateOneOf1 + +`func NewMessageTemplateTemplateOneOf1(message string, ) *MessageTemplateTemplateOneOf1` + +NewMessageTemplateTemplateOneOf1 instantiates a new MessageTemplateTemplateOneOf1 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 + +### NewMessageTemplateTemplateOneOf1WithDefaults + +`func NewMessageTemplateTemplateOneOf1WithDefaults() *MessageTemplateTemplateOneOf1` + +NewMessageTemplateTemplateOneOf1WithDefaults instantiates a new MessageTemplateTemplateOneOf1 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 + +### GetMessage + +`func (o *MessageTemplateTemplateOneOf1) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *MessageTemplateTemplateOneOf1) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *MessageTemplateTemplateOneOf1) SetMessage(v string)` + +SetMessage sets Message 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/MultiFactorAuthenticationApi.md b/docs/MultiFactorAuthenticationApi.md new file mode 100644 index 0000000..4051608 --- /dev/null +++ b/docs/MultiFactorAuthenticationApi.md @@ -0,0 +1,751 @@ +# \MultiFactorAuthenticationApi + +All URIs are relative to *https://your-api-subdomain.onelogin.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateDeviceVerification**](MultiFactorAuthenticationApi.md#CreateDeviceVerification) | **Post** /api/2/mfa/users/{user_id}/verifications | Create Device Verification +[**CreateFactorRegistration**](MultiFactorAuthenticationApi.md#CreateFactorRegistration) | **Post** /api/2/mfa/users/{user_id}/registrations | Create Factor Registration +[**DeleteEnrolledFactor**](MultiFactorAuthenticationApi.md#DeleteEnrolledFactor) | **Delete** /api/2/mfa/users/{user_id}/devices/{device_id} | Delete Enrolled Factor +[**GenerateOTP**](MultiFactorAuthenticationApi.md#GenerateOTP) | **Post** /api/2/mfa/users/{user_id}/mfa_token | Generate MFA token +[**GetAuthFactors**](MultiFactorAuthenticationApi.md#GetAuthFactors) | **Get** /api/2/mfa/users/{user_id}/factors | Get User Factors +[**GetAuthenticationDevices**](MultiFactorAuthenticationApi.md#GetAuthenticationDevices) | **Get** /api/2/mfa/users/{user_id}/devices | Get User Devices +[**GetUserRegistration**](MultiFactorAuthenticationApi.md#GetUserRegistration) | **Get** /api/2/mfa/users/{user_id}/registrations/{registration_id} | Get User Registration +[**GetUserVerification**](MultiFactorAuthenticationApi.md#GetUserVerification) | **Get** /api/2/mfa/users/{user_id}/verifications/{verification_id} | Get User Verification +[**VerifyUserRegistration**](MultiFactorAuthenticationApi.md#VerifyUserRegistration) | **Put** /api/2/mfa/users/{user_id}/registrations/{registration_id} | Verify User Registration +[**VerifyUserVerification**](MultiFactorAuthenticationApi.md#VerifyUserVerification) | **Put** /api/2/mfa/users/{user_id}/verifications/{verification_id} | Verify User Verification + + + +## CreateDeviceVerification + +> CreateDeviceVerification201Response CreateDeviceVerification(ctx, userId).ContentType(contentType).CreateDeviceVerificationRequest(createDeviceVerificationRequest).Execute() + +Create Device Verification + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + userId := int32(56) // int32 | Set to the id of the user that you want to return. + contentType := "application/json" // string | (optional) (default to "application/json") + createDeviceVerificationRequest := *openapiclient.NewCreateDeviceVerificationRequest(int32(58959)) // CreateDeviceVerificationRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.MultiFactorAuthenticationApi.CreateDeviceVerification(context.Background(), userId).ContentType(contentType).CreateDeviceVerificationRequest(createDeviceVerificationRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MultiFactorAuthenticationApi.CreateDeviceVerification``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateDeviceVerification`: CreateDeviceVerification201Response + fmt.Fprintf(os.Stdout, "Response from `MultiFactorAuthenticationApi.CreateDeviceVerification`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**userId** | **int32** | Set to the id of the user that you want to return. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateDeviceVerificationRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **contentType** | **string** | | [default to "application/json"] + **createDeviceVerificationRequest** | [**CreateDeviceVerificationRequest**](CreateDeviceVerificationRequest.md) | | + +### Return type + +[**CreateDeviceVerification201Response**](CreateDeviceVerification201Response.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateFactorRegistration + +> CreateFactorRegistration201Response CreateFactorRegistration(ctx, userId).ContentType(contentType).CreateFactorRegistrationRequest(createFactorRegistrationRequest).Execute() + +Create Factor Registration + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + userId := int32(56) // int32 | Set to the id of the user that you want to return. + contentType := "application/json" // string | (optional) (default to "application/json") + createFactorRegistrationRequest := *openapiclient.NewCreateFactorRegistrationRequest(int32(58959), "OneLogin SMS") // CreateFactorRegistrationRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.MultiFactorAuthenticationApi.CreateFactorRegistration(context.Background(), userId).ContentType(contentType).CreateFactorRegistrationRequest(createFactorRegistrationRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MultiFactorAuthenticationApi.CreateFactorRegistration``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateFactorRegistration`: CreateFactorRegistration201Response + fmt.Fprintf(os.Stdout, "Response from `MultiFactorAuthenticationApi.CreateFactorRegistration`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**userId** | **int32** | Set to the id of the user that you want to return. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateFactorRegistrationRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **contentType** | **string** | | [default to "application/json"] + **createFactorRegistrationRequest** | [**CreateFactorRegistrationRequest**](CreateFactorRegistrationRequest.md) | | + +### Return type + +[**CreateFactorRegistration201Response**](CreateFactorRegistration201Response.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteEnrolledFactor + +> DeleteEnrolledFactor(ctx, userId, deviceId).Execute() + +Delete Enrolled Factor + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + userId := int32(56) // int32 | Set to the id of the user that you want to return. + deviceId := "deviceId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.MultiFactorAuthenticationApi.DeleteEnrolledFactor(context.Background(), userId, deviceId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MultiFactorAuthenticationApi.DeleteEnrolledFactor``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**userId** | **int32** | Set to the id of the user that you want to return. | +**deviceId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteEnrolledFactorRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + + (empty response body) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GenerateOTP + +> GenerateOTP201Response GenerateOTP(ctx, userId).ContentType(contentType).GenerateOTPRequest(generateOTPRequest).Execute() + +Generate MFA token + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + userId := int32(56) // int32 | Set to the id of the user that you want to return. + contentType := "application/json" // string | (optional) (default to "application/json") + generateOTPRequest := *openapiclient.NewGenerateOTPRequest() // GenerateOTPRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.MultiFactorAuthenticationApi.GenerateOTP(context.Background(), userId).ContentType(contentType).GenerateOTPRequest(generateOTPRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MultiFactorAuthenticationApi.GenerateOTP``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GenerateOTP`: GenerateOTP201Response + fmt.Fprintf(os.Stdout, "Response from `MultiFactorAuthenticationApi.GenerateOTP`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**userId** | **int32** | Set to the id of the user that you want to return. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGenerateOTPRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **contentType** | **string** | | [default to "application/json"] + **generateOTPRequest** | [**GenerateOTPRequest**](GenerateOTPRequest.md) | | + +### Return type + +[**GenerateOTP201Response**](GenerateOTP201Response.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetAuthFactors + +> GetAuthFactors200Response GetAuthFactors(ctx, userId).Execute() + +Get User Factors + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + userId := int32(56) // int32 | Set to the id of the user that you want to return. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.MultiFactorAuthenticationApi.GetAuthFactors(context.Background(), userId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MultiFactorAuthenticationApi.GetAuthFactors``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetAuthFactors`: GetAuthFactors200Response + fmt.Fprintf(os.Stdout, "Response from `MultiFactorAuthenticationApi.GetAuthFactors`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**userId** | **int32** | Set to the id of the user that you want to return. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetAuthFactorsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**GetAuthFactors200Response**](GetAuthFactors200Response.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetAuthenticationDevices + +> []GetAuthenticationDevices200ResponseInner GetAuthenticationDevices(ctx, userId).Execute() + +Get User Devices + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + userId := int32(56) // int32 | Set to the id of the user that you want to return. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.MultiFactorAuthenticationApi.GetAuthenticationDevices(context.Background(), userId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MultiFactorAuthenticationApi.GetAuthenticationDevices``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetAuthenticationDevices`: []GetAuthenticationDevices200ResponseInner + fmt.Fprintf(os.Stdout, "Response from `MultiFactorAuthenticationApi.GetAuthenticationDevices`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**userId** | **int32** | Set to the id of the user that you want to return. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetAuthenticationDevicesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**[]GetAuthenticationDevices200ResponseInner**](GetAuthenticationDevices200ResponseInner.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetUserRegistration + +> map[string]interface{} GetUserRegistration(ctx, userId, registrationId).Execute() + +Get User Registration + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + userId := int32(56) // int32 | Set to the id of the user that you want to return. + registrationId := "" // string | The id of a registration + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.MultiFactorAuthenticationApi.GetUserRegistration(context.Background(), userId, registrationId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MultiFactorAuthenticationApi.GetUserRegistration``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetUserRegistration`: map[string]interface{} + fmt.Fprintf(os.Stdout, "Response from `MultiFactorAuthenticationApi.GetUserRegistration`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**userId** | **int32** | Set to the id of the user that you want to return. | +**registrationId** | **string** | The id of a registration | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetUserRegistrationRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +**map[string]interface{}** + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetUserVerification + +> GetUserVerification200Response GetUserVerification(ctx, userId, verificationId).Execute() + +Get User Verification + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + userId := int32(56) // int32 | Set to the id of the user that you want to return. + verificationId := "" // string | The verification_id is returned on activation of the factor or you can get the device_id using the Activate Factor API call. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.MultiFactorAuthenticationApi.GetUserVerification(context.Background(), userId, verificationId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MultiFactorAuthenticationApi.GetUserVerification``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetUserVerification`: GetUserVerification200Response + fmt.Fprintf(os.Stdout, "Response from `MultiFactorAuthenticationApi.GetUserVerification`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**userId** | **int32** | Set to the id of the user that you want to return. | +**verificationId** | **string** | The verification_id is returned on activation of the factor or you can get the device_id using the Activate Factor API call. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetUserVerificationRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**GetUserVerification200Response**](GetUserVerification200Response.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## VerifyUserRegistration + +> VerifyUserRegistration200Response VerifyUserRegistration(ctx, userId, registrationId).ContentType(contentType).VerifyUserRegistrationRequest(verifyUserRegistrationRequest).Execute() + +Verify User Registration + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + userId := int32(56) // int32 | Set to the id of the user that you want to return. + registrationId := "" // string | The id of a registration + contentType := "application/json" // string | (optional) (default to "application/json") + verifyUserRegistrationRequest := *openapiclient.NewVerifyUserRegistrationRequest() // VerifyUserRegistrationRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.MultiFactorAuthenticationApi.VerifyUserRegistration(context.Background(), userId, registrationId).ContentType(contentType).VerifyUserRegistrationRequest(verifyUserRegistrationRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MultiFactorAuthenticationApi.VerifyUserRegistration``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `VerifyUserRegistration`: VerifyUserRegistration200Response + fmt.Fprintf(os.Stdout, "Response from `MultiFactorAuthenticationApi.VerifyUserRegistration`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**userId** | **int32** | Set to the id of the user that you want to return. | +**registrationId** | **string** | The id of a registration | + +### Other Parameters + +Other parameters are passed through a pointer to a apiVerifyUserRegistrationRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **contentType** | **string** | | [default to "application/json"] + **verifyUserRegistrationRequest** | [**VerifyUserRegistrationRequest**](VerifyUserRegistrationRequest.md) | | + +### Return type + +[**VerifyUserRegistration200Response**](VerifyUserRegistration200Response.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## VerifyUserVerification + +> Error VerifyUserVerification(ctx, userId, verificationId).ContentType(contentType).VerifyUserVerificationRequest(verifyUserVerificationRequest).Execute() + +Verify User Verification + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + userId := int32(56) // int32 | Set to the id of the user that you want to return. + verificationId := "" // string | The verification_id is returned on activation of the factor or you can get the device_id using the Activate Factor API call. + contentType := "application/json" // string | (optional) (default to "application/json") + verifyUserVerificationRequest := *openapiclient.NewVerifyUserVerificationRequest() // VerifyUserVerificationRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.MultiFactorAuthenticationApi.VerifyUserVerification(context.Background(), userId, verificationId).ContentType(contentType).VerifyUserVerificationRequest(verifyUserVerificationRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MultiFactorAuthenticationApi.VerifyUserVerification``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `VerifyUserVerification`: Error + fmt.Fprintf(os.Stdout, "Response from `MultiFactorAuthenticationApi.VerifyUserVerification`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**userId** | **int32** | Set to the id of the user that you want to return. | +**verificationId** | **string** | The verification_id is returned on activation of the factor or you can get the device_id using the Activate Factor API call. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiVerifyUserVerificationRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **contentType** | **string** | | [default to "application/json"] + **verifyUserVerificationRequest** | [**VerifyUserVerificationRequest**](VerifyUserVerificationRequest.md) | | + +### Return type + +[**Error**](Error.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/docs/MultiFactorAuthenticationV1Api.md b/docs/MultiFactorAuthenticationV1Api.md new file mode 100644 index 0000000..62b981e --- /dev/null +++ b/docs/MultiFactorAuthenticationV1Api.md @@ -0,0 +1,520 @@ +# \MultiFactorAuthenticationV1Api + +All URIs are relative to *https://your-api-subdomain.onelogin.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ActivateMfaFactors**](MultiFactorAuthenticationV1Api.md#ActivateMfaFactors) | **Post** /api/1/users/{user_id}/otp_devices/{device_id}/trigger | Activate a Factor +[**EnrollMfaFactor**](MultiFactorAuthenticationV1Api.md#EnrollMfaFactor) | **Post** /api/1/users/{user_id}/otp_devices | Enroll a Factor +[**GenerateMFAtoken**](MultiFactorAuthenticationV1Api.md#GenerateMFAtoken) | **Post** /api/1/users/{user_id}/mfa_token | Generate Temp MFA Token +[**GetEnrolledFactors**](MultiFactorAuthenticationV1Api.md#GetEnrolledFactors) | **Get** /api/1/users/{user_id}/otp_devices | Get Enrolled Factors +[**GetMFAFactors**](MultiFactorAuthenticationV1Api.md#GetMFAFactors) | **Get** /api/1/users/{user_id}/auth_factor | Get Available Factors +[**RemoveMfaFactors**](MultiFactorAuthenticationV1Api.md#RemoveMfaFactors) | **Delete** /api/1/users/{user_id}/otp_devices/{device_id} | Remove an Enrolled Factor +[**VerifyMfaFactor**](MultiFactorAuthenticationV1Api.md#VerifyMfaFactor) | **Post** /api/1/users/{user_id}/otp_devices/{device_id}/verify | Verify a Factor + + + +## ActivateMfaFactors + +> GetEnrolledFactors200Response ActivateMfaFactors(ctx, userId, deviceId).ActivateMfaFactorsRequest(activateMfaFactorsRequest).Execute() + +Activate a Factor + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + userId := int32(56) // int32 | Set to the id of the user that you want to return. + deviceId := "deviceId_example" // string | + activateMfaFactorsRequest := *openapiclient.NewActivateMfaFactorsRequest() // ActivateMfaFactorsRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.MultiFactorAuthenticationV1Api.ActivateMfaFactors(context.Background(), userId, deviceId).ActivateMfaFactorsRequest(activateMfaFactorsRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MultiFactorAuthenticationV1Api.ActivateMfaFactors``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ActivateMfaFactors`: GetEnrolledFactors200Response + fmt.Fprintf(os.Stdout, "Response from `MultiFactorAuthenticationV1Api.ActivateMfaFactors`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**userId** | **int32** | Set to the id of the user that you want to return. | +**deviceId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiActivateMfaFactorsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **activateMfaFactorsRequest** | [**ActivateMfaFactorsRequest**](ActivateMfaFactorsRequest.md) | | + +### Return type + +[**GetEnrolledFactors200Response**](GetEnrolledFactors200Response.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## EnrollMfaFactor + +> EnrollMfaFactor200Response EnrollMfaFactor(ctx, userId).OtpDevice(otpDevice).Execute() + +Enroll a Factor + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + userId := int32(56) // int32 | Set to the id of the user that you want to return. + otpDevice := *openapiclient.NewOtpDevice(int32(16282), "Rich's Phone", "+1xxxxxxxxxx") // OtpDevice | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.MultiFactorAuthenticationV1Api.EnrollMfaFactor(context.Background(), userId).OtpDevice(otpDevice).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MultiFactorAuthenticationV1Api.EnrollMfaFactor``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `EnrollMfaFactor`: EnrollMfaFactor200Response + fmt.Fprintf(os.Stdout, "Response from `MultiFactorAuthenticationV1Api.EnrollMfaFactor`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**userId** | **int32** | Set to the id of the user that you want to return. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiEnrollMfaFactorRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **otpDevice** | [**OtpDevice**](OtpDevice.md) | | + +### Return type + +[**EnrollMfaFactor200Response**](EnrollMfaFactor200Response.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GenerateMFAtoken + +> GenerateMFAtoken200Response GenerateMFAtoken(ctx, userId).GenerateMFAtokenRequest(generateMFAtokenRequest).Execute() + +Generate Temp MFA Token + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + userId := int32(56) // int32 | Set to the id of the user that you want to return. + generateMFAtokenRequest := *openapiclient.NewGenerateMFAtokenRequest() // GenerateMFAtokenRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.MultiFactorAuthenticationV1Api.GenerateMFAtoken(context.Background(), userId).GenerateMFAtokenRequest(generateMFAtokenRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MultiFactorAuthenticationV1Api.GenerateMFAtoken``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GenerateMFAtoken`: GenerateMFAtoken200Response + fmt.Fprintf(os.Stdout, "Response from `MultiFactorAuthenticationV1Api.GenerateMFAtoken`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**userId** | **int32** | Set to the id of the user that you want to return. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGenerateMFAtokenRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **generateMFAtokenRequest** | [**GenerateMFAtokenRequest**](GenerateMFAtokenRequest.md) | | + +### Return type + +[**GenerateMFAtoken200Response**](GenerateMFAtoken200Response.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetEnrolledFactors + +> GetEnrolledFactors200Response GetEnrolledFactors(ctx, userId).Execute() + +Get Enrolled Factors + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + userId := int32(56) // int32 | Set to the id of the user that you want to return. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.MultiFactorAuthenticationV1Api.GetEnrolledFactors(context.Background(), userId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MultiFactorAuthenticationV1Api.GetEnrolledFactors``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetEnrolledFactors`: GetEnrolledFactors200Response + fmt.Fprintf(os.Stdout, "Response from `MultiFactorAuthenticationV1Api.GetEnrolledFactors`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**userId** | **int32** | Set to the id of the user that you want to return. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetEnrolledFactorsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**GetEnrolledFactors200Response**](GetEnrolledFactors200Response.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetMFAFactors + +> GetMFAFactors200Response GetMFAFactors(ctx, userId).Execute() + +Get Available Factors + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + userId := int32(56) // int32 | Set to the id of the user that you want to return. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.MultiFactorAuthenticationV1Api.GetMFAFactors(context.Background(), userId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MultiFactorAuthenticationV1Api.GetMFAFactors``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetMFAFactors`: GetMFAFactors200Response + fmt.Fprintf(os.Stdout, "Response from `MultiFactorAuthenticationV1Api.GetMFAFactors`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**userId** | **int32** | Set to the id of the user that you want to return. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetMFAFactorsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**GetMFAFactors200Response**](GetMFAFactors200Response.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RemoveMfaFactors + +> RemoveMfaFactors(ctx, userId, deviceId).Execute() + +Remove an Enrolled Factor + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + userId := int32(56) // int32 | Set to the id of the user that you want to return. + deviceId := "deviceId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.MultiFactorAuthenticationV1Api.RemoveMfaFactors(context.Background(), userId, deviceId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MultiFactorAuthenticationV1Api.RemoveMfaFactors``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**userId** | **int32** | Set to the id of the user that you want to return. | +**deviceId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRemoveMfaFactorsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + + (empty response body) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## VerifyMfaFactor + +> Error VerifyMfaFactor(ctx, userId, deviceId).VerifyMfaFactorRequest(verifyMfaFactorRequest).Execute() + +Verify a Factor + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + userId := int32(56) // int32 | Set to the id of the user that you want to return. + deviceId := "deviceId_example" // string | + verifyMfaFactorRequest := *openapiclient.NewVerifyMfaFactorRequest() // VerifyMfaFactorRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.MultiFactorAuthenticationV1Api.VerifyMfaFactor(context.Background(), userId, deviceId).VerifyMfaFactorRequest(verifyMfaFactorRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MultiFactorAuthenticationV1Api.VerifyMfaFactor``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `VerifyMfaFactor`: Error + fmt.Fprintf(os.Stdout, "Response from `MultiFactorAuthenticationV1Api.VerifyMfaFactor`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**userId** | **int32** | Set to the id of the user that you want to return. | +**deviceId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiVerifyMfaFactorRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **verifyMfaFactorRequest** | [**VerifyMfaFactorRequest**](VerifyMfaFactorRequest.md) | | + +### Return type + +[**Error**](Error.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/docs/OAuth2Api.md b/docs/OAuth2Api.md new file mode 100644 index 0000000..be5cfba --- /dev/null +++ b/docs/OAuth2Api.md @@ -0,0 +1,208 @@ +# \OAuth2Api + +All URIs are relative to *https://your-api-subdomain.onelogin.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GenerateToken**](OAuth2Api.md#GenerateToken) | **Post** /auth/oauth2/v2/token | Generate Token +[**GetRateLimit**](OAuth2Api.md#GetRateLimit) | **Get** /auth/rate_limit | Get Rate Limit +[**RevokeTokens**](OAuth2Api.md#RevokeTokens) | **Post** /auth/oauth2/revoke | Revoke Tokens + + + +## GenerateToken + +> OauthToken GenerateToken(ctx).GenerateTokenRequest(generateTokenRequest).ContentType(contentType).Execute() + +Generate Token + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + generateTokenRequest := *openapiclient.NewGenerateTokenRequest("GrantType_example") // GenerateTokenRequest | Request Body to Generate OAuth Token + contentType := "application/json" // string | (optional) (default to "application/json") + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OAuth2Api.GenerateToken(context.Background()).GenerateTokenRequest(generateTokenRequest).ContentType(contentType).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OAuth2Api.GenerateToken``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GenerateToken`: OauthToken + fmt.Fprintf(os.Stdout, "Response from `OAuth2Api.GenerateToken`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiGenerateTokenRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **generateTokenRequest** | [**GenerateTokenRequest**](GenerateTokenRequest.md) | Request Body to Generate OAuth Token | + **contentType** | **string** | | [default to "application/json"] + +### Return type + +[**OauthToken**](OauthToken.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetRateLimit + +> GetRateLimit200Response GetRateLimit(ctx).Execute() + +Get Rate Limit + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OAuth2Api.GetRateLimit(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OAuth2Api.GetRateLimit``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetRateLimit`: GetRateLimit200Response + fmt.Fprintf(os.Stdout, "Response from `OAuth2Api.GetRateLimit`: %v\n", resp) +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetRateLimitRequest struct via the builder pattern + + +### Return type + +[**GetRateLimit200Response**](GetRateLimit200Response.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RevokeTokens + +> Error RevokeTokens(ctx).ContentType(contentType).RevokeTokensRequest(revokeTokensRequest).Execute() + +Revoke Tokens + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + contentType := "application/json" // string | (optional) (default to "application/json") + revokeTokensRequest := *openapiclient.NewRevokeTokensRequest("xx508xx63817x752xx74004x30705xx92x58349x5x78f5xx34x8x614xxxx1451") // RevokeTokensRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OAuth2Api.RevokeTokens(context.Background()).ContentType(contentType).RevokeTokensRequest(revokeTokensRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OAuth2Api.RevokeTokens``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RevokeTokens`: Error + fmt.Fprintf(os.Stdout, "Response from `OAuth2Api.RevokeTokens`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiRevokeTokensRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **contentType** | **string** | | [default to "application/json"] + **revokeTokensRequest** | [**RevokeTokensRequest**](RevokeTokensRequest.md) | | + +### Return type + +[**Error**](Error.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/docs/GenerateToken200Response.md b/docs/OauthToken.md similarity index 51% rename from docs/GenerateToken200Response.md rename to docs/OauthToken.md index 2dfa44f..d6058b3 100644 --- a/docs/GenerateToken200Response.md +++ b/docs/OauthToken.md @@ -1,184 +1,184 @@ -# GenerateToken200Response +# OauthToken ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**AccessToken** | Pointer to **string** | | [optional] -**CreatedAt** | Pointer to **string** | | [optional] -**ExpiresIn** | Pointer to **int32** | | [optional] -**RefreshToken** | Pointer to **string** | | [optional] -**TokenType** | Pointer to **string** | | [optional] -**AccounttId** | Pointer to **int32** | | [optional] +**AccessToken** | Pointer to **string** | Provides the requested access token. You can use this token to call our resource APIs. | [optional] +**CreatedAt** | Pointer to **string** | Time at which the access token was generated. | [optional] +**ExpiresIn** | Pointer to **int32** | Indicates that the generated access token expires in 36,000 seconds, 600 minutes, or 10 hours. An expired access token cannot be used to make resource API calls, but it can still be used along with its associated refresh token to call the Refresh Tokens v2 API. | [optional] +**RefreshToken** | Pointer to **string** | deprecated No longer in use | [optional] +**TokenType** | Pointer to **string** | Indicates that the generated access token is a bearer token. | [optional] +**AccountId** | Pointer to **int32** | Account ID associated with the API credentials used to generate the token. | [optional] ## Methods -### NewGenerateToken200Response +### NewOauthToken -`func NewGenerateToken200Response() *GenerateToken200Response` +`func NewOauthToken() *OauthToken` -NewGenerateToken200Response instantiates a new GenerateToken200Response object +NewOauthToken instantiates a new OauthToken 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 -### NewGenerateToken200ResponseWithDefaults +### NewOauthTokenWithDefaults -`func NewGenerateToken200ResponseWithDefaults() *GenerateToken200Response` +`func NewOauthTokenWithDefaults() *OauthToken` -NewGenerateToken200ResponseWithDefaults instantiates a new GenerateToken200Response object +NewOauthTokenWithDefaults instantiates a new OauthToken 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 ### GetAccessToken -`func (o *GenerateToken200Response) GetAccessToken() string` +`func (o *OauthToken) GetAccessToken() string` GetAccessToken returns the AccessToken field if non-nil, zero value otherwise. ### GetAccessTokenOk -`func (o *GenerateToken200Response) GetAccessTokenOk() (*string, bool)` +`func (o *OauthToken) GetAccessTokenOk() (*string, bool)` GetAccessTokenOk returns a tuple with the AccessToken field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetAccessToken -`func (o *GenerateToken200Response) SetAccessToken(v string)` +`func (o *OauthToken) SetAccessToken(v string)` SetAccessToken sets AccessToken field to given value. ### HasAccessToken -`func (o *GenerateToken200Response) HasAccessToken() bool` +`func (o *OauthToken) HasAccessToken() bool` HasAccessToken returns a boolean if a field has been set. ### GetCreatedAt -`func (o *GenerateToken200Response) GetCreatedAt() string` +`func (o *OauthToken) GetCreatedAt() string` GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. ### GetCreatedAtOk -`func (o *GenerateToken200Response) GetCreatedAtOk() (*string, bool)` +`func (o *OauthToken) GetCreatedAtOk() (*string, bool)` GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetCreatedAt -`func (o *GenerateToken200Response) SetCreatedAt(v string)` +`func (o *OauthToken) SetCreatedAt(v string)` SetCreatedAt sets CreatedAt field to given value. ### HasCreatedAt -`func (o *GenerateToken200Response) HasCreatedAt() bool` +`func (o *OauthToken) HasCreatedAt() bool` HasCreatedAt returns a boolean if a field has been set. ### GetExpiresIn -`func (o *GenerateToken200Response) GetExpiresIn() int32` +`func (o *OauthToken) GetExpiresIn() int32` GetExpiresIn returns the ExpiresIn field if non-nil, zero value otherwise. ### GetExpiresInOk -`func (o *GenerateToken200Response) GetExpiresInOk() (*int32, bool)` +`func (o *OauthToken) GetExpiresInOk() (*int32, bool)` GetExpiresInOk returns a tuple with the ExpiresIn field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetExpiresIn -`func (o *GenerateToken200Response) SetExpiresIn(v int32)` +`func (o *OauthToken) SetExpiresIn(v int32)` SetExpiresIn sets ExpiresIn field to given value. ### HasExpiresIn -`func (o *GenerateToken200Response) HasExpiresIn() bool` +`func (o *OauthToken) HasExpiresIn() bool` HasExpiresIn returns a boolean if a field has been set. ### GetRefreshToken -`func (o *GenerateToken200Response) GetRefreshToken() string` +`func (o *OauthToken) GetRefreshToken() string` GetRefreshToken returns the RefreshToken field if non-nil, zero value otherwise. ### GetRefreshTokenOk -`func (o *GenerateToken200Response) GetRefreshTokenOk() (*string, bool)` +`func (o *OauthToken) GetRefreshTokenOk() (*string, bool)` GetRefreshTokenOk returns a tuple with the RefreshToken field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetRefreshToken -`func (o *GenerateToken200Response) SetRefreshToken(v string)` +`func (o *OauthToken) SetRefreshToken(v string)` SetRefreshToken sets RefreshToken field to given value. ### HasRefreshToken -`func (o *GenerateToken200Response) HasRefreshToken() bool` +`func (o *OauthToken) HasRefreshToken() bool` HasRefreshToken returns a boolean if a field has been set. ### GetTokenType -`func (o *GenerateToken200Response) GetTokenType() string` +`func (o *OauthToken) GetTokenType() string` GetTokenType returns the TokenType field if non-nil, zero value otherwise. ### GetTokenTypeOk -`func (o *GenerateToken200Response) GetTokenTypeOk() (*string, bool)` +`func (o *OauthToken) GetTokenTypeOk() (*string, bool)` GetTokenTypeOk returns a tuple with the TokenType field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetTokenType -`func (o *GenerateToken200Response) SetTokenType(v string)` +`func (o *OauthToken) SetTokenType(v string)` SetTokenType sets TokenType field to given value. ### HasTokenType -`func (o *GenerateToken200Response) HasTokenType() bool` +`func (o *OauthToken) HasTokenType() bool` HasTokenType returns a boolean if a field has been set. -### GetAccounttId +### GetAccountId -`func (o *GenerateToken200Response) GetAccounttId() int32` +`func (o *OauthToken) GetAccountId() int32` -GetAccounttId returns the AccounttId field if non-nil, zero value otherwise. +GetAccountId returns the AccountId field if non-nil, zero value otherwise. -### GetAccounttIdOk +### GetAccountIdOk -`func (o *GenerateToken200Response) GetAccounttIdOk() (*int32, bool)` +`func (o *OauthToken) GetAccountIdOk() (*int32, bool)` -GetAccounttIdOk returns a tuple with the AccounttId field if it's non-nil, zero value otherwise +GetAccountIdOk returns a tuple with the AccountId field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetAccounttId +### SetAccountId -`func (o *GenerateToken200Response) SetAccounttId(v int32)` +`func (o *OauthToken) SetAccountId(v int32)` -SetAccounttId sets AccounttId field to given value. +SetAccountId sets AccountId field to given value. -### HasAccounttId +### HasAccountId -`func (o *GenerateToken200Response) HasAccounttId() bool` +`func (o *OauthToken) HasAccountId() bool` -HasAccounttId returns a boolean if a field has been set. +HasAccountId 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/Schema.md b/docs/OidcApp.md similarity index 58% rename from docs/Schema.md rename to docs/OidcApp.md index d7426b4..ab488c0 100644 --- a/docs/Schema.md +++ b/docs/OidcApp.md @@ -1,548 +1,492 @@ -# Schema +# OidcApp ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | Pointer to **int32** | Apps unique ID in OneLogin. | [optional] -**ConnectorId** | Pointer to **int32** | ID of the apps underlying connector. | [optional] -**Name** | Pointer to **string** | App name. | [optional] -**Description** | Pointer to **string** | Freeform description of the app. | [optional] +**Id** | Pointer to **int32** | Apps unique ID in OneLogin. | [optional] [readonly] +**Name** | **string** | The name of the app. | +**Visible** | **bool** | Indicates if the app is visible in the OneLogin portal. | +**Description** | **string** | Freeform description of the app. | **Notes** | Pointer to **string** | Freeform notes about the app. | [optional] -**PolicyId** | Pointer to **int32** | The security policy assigned to the app. | [optional] -**BrandId** | Pointer to **int32** | The custom login page branding to use for this app. Applies to app initiated logins via OIDC or SAML. | [optional] -**IconUrl** | Pointer to **string** | A link to the apps icon url. | [optional] -**Visible** | Pointer to **bool** | Indicates if the app is visible in the OneLogin portal. | [optional] -**AuthMethod** | Pointer to **int32** | An ID indicating the type of app. | [optional] +**IconUrl** | Pointer to **string** | A link to the apps icon url | [optional] +**AuthMethod** | Pointer to [**AuthMethod**](AuthMethod.md) | | [optional] +**PolicyId** | **int32** | The security policy assigned to the app. | +**AllowAssumedSignin** | Pointer to **bool** | Indicates whether or not administrators can access the app as a user that they have assumed control over. | [optional] **TabId** | Pointer to **int32** | ID of the OneLogin portal tab that the app is assigned to. | [optional] -**CreatedAt** | Pointer to **string** | The date the app was created. | [optional] -**UpdatedAt** | Pointer to **string** | The date the app was last updated. | [optional] +**ConnectorId** | **int32** | ID of the connector to base the app from. | +**CreatedAt** | Pointer to **string** | the date the app was created | [optional] +**UpdatedAt** | Pointer to **string** | the date the app was last updated | [optional] **RoleIds** | Pointer to **[]int32** | List of Role IDs that are assigned to the app. On App Create or Update the entire array is replaced with the values provided. | [optional] -**AllowAssumedSignin** | Pointer to **bool** | Indicates whether or not administrators can access the app as a user that they have assumed control over. | [optional] -**Provisioning** | Pointer to [**SchemaProvisioning**](SchemaProvisioning.md) | | [optional] -**Sso** | Pointer to **map[string]interface{}** | | [optional] -**Configuration** | Pointer to **map[string]interface{}** | | [optional] -**Parameters** | Pointer to **map[string]interface{}** | | [optional] -**EnforcementPoint** | Pointer to **map[string]interface{}** | | [optional] +**Provisioning** | Pointer to [**GenericAppProvisioning**](GenericAppProvisioning.md) | | [optional] +**Parameters** | Pointer to [**AppParameters**](AppParameters.md) | | [optional] +**EnforcementPoint** | Pointer to [**EnforcementPoint**](EnforcementPoint.md) | | [optional] +**Configuration** | [**ConfigurationOidc**](ConfigurationOidc.md) | | +**Sso** | Pointer to [**SsoOidc**](SsoOidc.md) | | [optional] ## Methods -### NewSchema +### NewOidcApp -`func NewSchema() *Schema` +`func NewOidcApp(name string, visible bool, description string, policyId int32, connectorId int32, configuration ConfigurationOidc, ) *OidcApp` -NewSchema instantiates a new Schema object +NewOidcApp instantiates a new OidcApp 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 -### NewSchemaWithDefaults +### NewOidcAppWithDefaults -`func NewSchemaWithDefaults() *Schema` +`func NewOidcAppWithDefaults() *OidcApp` -NewSchemaWithDefaults instantiates a new Schema object +NewOidcAppWithDefaults instantiates a new OidcApp 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 ### GetId -`func (o *Schema) GetId() int32` +`func (o *OidcApp) GetId() int32` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk -`func (o *Schema) GetIdOk() (*int32, bool)` +`func (o *OidcApp) GetIdOk() (*int32, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId -`func (o *Schema) SetId(v int32)` +`func (o *OidcApp) SetId(v int32)` SetId sets Id field to given value. ### HasId -`func (o *Schema) HasId() bool` +`func (o *OidcApp) HasId() bool` HasId returns a boolean if a field has been set. -### GetConnectorId +### GetName -`func (o *Schema) GetConnectorId() int32` +`func (o *OidcApp) GetName() string` -GetConnectorId returns the ConnectorId field if non-nil, zero value otherwise. +GetName returns the Name field if non-nil, zero value otherwise. -### GetConnectorIdOk +### GetNameOk -`func (o *Schema) GetConnectorIdOk() (*int32, bool)` +`func (o *OidcApp) GetNameOk() (*string, bool)` -GetConnectorIdOk returns a tuple with the ConnectorId field if it's non-nil, zero value otherwise +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. -### SetConnectorId - -`func (o *Schema) SetConnectorId(v int32)` - -SetConnectorId sets ConnectorId field to given value. +### SetName -### HasConnectorId +`func (o *OidcApp) SetName(v string)` -`func (o *Schema) HasConnectorId() bool` +SetName sets Name field to given value. -HasConnectorId returns a boolean if a field has been set. -### GetName +### GetVisible -`func (o *Schema) GetName() string` +`func (o *OidcApp) GetVisible() bool` -GetName returns the Name field if non-nil, zero value otherwise. +GetVisible returns the Visible field if non-nil, zero value otherwise. -### GetNameOk +### GetVisibleOk -`func (o *Schema) GetNameOk() (*string, bool)` +`func (o *OidcApp) GetVisibleOk() (*bool, bool)` -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +GetVisibleOk returns a tuple with the Visible field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetName - -`func (o *Schema) SetName(v string)` - -SetName sets Name field to given value. +### SetVisible -### HasName +`func (o *OidcApp) SetVisible(v bool)` -`func (o *Schema) HasName() bool` +SetVisible sets Visible field to given value. -HasName returns a boolean if a field has been set. ### GetDescription -`func (o *Schema) GetDescription() string` +`func (o *OidcApp) GetDescription() string` GetDescription returns the Description field if non-nil, zero value otherwise. ### GetDescriptionOk -`func (o *Schema) GetDescriptionOk() (*string, bool)` +`func (o *OidcApp) GetDescriptionOk() (*string, bool)` GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetDescription -`func (o *Schema) SetDescription(v string)` +`func (o *OidcApp) SetDescription(v string)` SetDescription sets Description field to given value. -### HasDescription - -`func (o *Schema) HasDescription() bool` - -HasDescription returns a boolean if a field has been set. ### GetNotes -`func (o *Schema) GetNotes() string` +`func (o *OidcApp) GetNotes() string` GetNotes returns the Notes field if non-nil, zero value otherwise. ### GetNotesOk -`func (o *Schema) GetNotesOk() (*string, bool)` +`func (o *OidcApp) GetNotesOk() (*string, bool)` GetNotesOk returns a tuple with the Notes field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetNotes -`func (o *Schema) SetNotes(v string)` +`func (o *OidcApp) SetNotes(v string)` SetNotes sets Notes field to given value. ### HasNotes -`func (o *Schema) HasNotes() bool` +`func (o *OidcApp) HasNotes() bool` HasNotes returns a boolean if a field has been set. -### GetPolicyId +### GetIconUrl -`func (o *Schema) GetPolicyId() int32` +`func (o *OidcApp) GetIconUrl() string` -GetPolicyId returns the PolicyId field if non-nil, zero value otherwise. +GetIconUrl returns the IconUrl field if non-nil, zero value otherwise. -### GetPolicyIdOk +### GetIconUrlOk -`func (o *Schema) GetPolicyIdOk() (*int32, bool)` +`func (o *OidcApp) GetIconUrlOk() (*string, bool)` -GetPolicyIdOk returns a tuple with the PolicyId field if it's non-nil, zero value otherwise +GetIconUrlOk returns a tuple with the IconUrl field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetPolicyId +### SetIconUrl -`func (o *Schema) SetPolicyId(v int32)` +`func (o *OidcApp) SetIconUrl(v string)` -SetPolicyId sets PolicyId field to given value. +SetIconUrl sets IconUrl field to given value. -### HasPolicyId +### HasIconUrl -`func (o *Schema) HasPolicyId() bool` +`func (o *OidcApp) HasIconUrl() bool` -HasPolicyId returns a boolean if a field has been set. +HasIconUrl returns a boolean if a field has been set. -### GetBrandId +### GetAuthMethod -`func (o *Schema) GetBrandId() int32` +`func (o *OidcApp) GetAuthMethod() AuthMethod` -GetBrandId returns the BrandId field if non-nil, zero value otherwise. +GetAuthMethod returns the AuthMethod field if non-nil, zero value otherwise. -### GetBrandIdOk +### GetAuthMethodOk -`func (o *Schema) GetBrandIdOk() (*int32, bool)` +`func (o *OidcApp) GetAuthMethodOk() (*AuthMethod, bool)` -GetBrandIdOk returns a tuple with the BrandId field if it's non-nil, zero value otherwise +GetAuthMethodOk returns a tuple with the AuthMethod field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetBrandId +### SetAuthMethod -`func (o *Schema) SetBrandId(v int32)` +`func (o *OidcApp) SetAuthMethod(v AuthMethod)` -SetBrandId sets BrandId field to given value. +SetAuthMethod sets AuthMethod field to given value. -### HasBrandId +### HasAuthMethod -`func (o *Schema) HasBrandId() bool` +`func (o *OidcApp) HasAuthMethod() bool` -HasBrandId returns a boolean if a field has been set. +HasAuthMethod returns a boolean if a field has been set. -### GetIconUrl +### GetPolicyId -`func (o *Schema) GetIconUrl() string` +`func (o *OidcApp) GetPolicyId() int32` -GetIconUrl returns the IconUrl field if non-nil, zero value otherwise. +GetPolicyId returns the PolicyId field if non-nil, zero value otherwise. -### GetIconUrlOk +### GetPolicyIdOk -`func (o *Schema) GetIconUrlOk() (*string, bool)` +`func (o *OidcApp) GetPolicyIdOk() (*int32, bool)` -GetIconUrlOk returns a tuple with the IconUrl field if it's non-nil, zero value otherwise +GetPolicyIdOk returns a tuple with the PolicyId field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetIconUrl - -`func (o *Schema) SetIconUrl(v string)` - -SetIconUrl sets IconUrl field to given value. +### SetPolicyId -### HasIconUrl +`func (o *OidcApp) SetPolicyId(v int32)` -`func (o *Schema) HasIconUrl() bool` +SetPolicyId sets PolicyId field to given value. -HasIconUrl returns a boolean if a field has been set. -### GetVisible +### GetAllowAssumedSignin -`func (o *Schema) GetVisible() bool` +`func (o *OidcApp) GetAllowAssumedSignin() bool` -GetVisible returns the Visible field if non-nil, zero value otherwise. +GetAllowAssumedSignin returns the AllowAssumedSignin field if non-nil, zero value otherwise. -### GetVisibleOk +### GetAllowAssumedSigninOk -`func (o *Schema) GetVisibleOk() (*bool, bool)` +`func (o *OidcApp) GetAllowAssumedSigninOk() (*bool, bool)` -GetVisibleOk returns a tuple with the Visible field if it's non-nil, zero value otherwise +GetAllowAssumedSigninOk returns a tuple with the AllowAssumedSignin field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetVisible +### SetAllowAssumedSignin -`func (o *Schema) SetVisible(v bool)` +`func (o *OidcApp) SetAllowAssumedSignin(v bool)` -SetVisible sets Visible field to given value. +SetAllowAssumedSignin sets AllowAssumedSignin field to given value. -### HasVisible +### HasAllowAssumedSignin -`func (o *Schema) HasVisible() bool` +`func (o *OidcApp) HasAllowAssumedSignin() bool` -HasVisible returns a boolean if a field has been set. +HasAllowAssumedSignin returns a boolean if a field has been set. -### GetAuthMethod +### GetTabId -`func (o *Schema) GetAuthMethod() int32` +`func (o *OidcApp) GetTabId() int32` -GetAuthMethod returns the AuthMethod field if non-nil, zero value otherwise. +GetTabId returns the TabId field if non-nil, zero value otherwise. -### GetAuthMethodOk +### GetTabIdOk -`func (o *Schema) GetAuthMethodOk() (*int32, bool)` +`func (o *OidcApp) GetTabIdOk() (*int32, bool)` -GetAuthMethodOk returns a tuple with the AuthMethod field if it's non-nil, zero value otherwise +GetTabIdOk returns a tuple with the TabId field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetAuthMethod +### SetTabId -`func (o *Schema) SetAuthMethod(v int32)` +`func (o *OidcApp) SetTabId(v int32)` -SetAuthMethod sets AuthMethod field to given value. +SetTabId sets TabId field to given value. -### HasAuthMethod +### HasTabId -`func (o *Schema) HasAuthMethod() bool` +`func (o *OidcApp) HasTabId() bool` -HasAuthMethod returns a boolean if a field has been set. +HasTabId returns a boolean if a field has been set. -### GetTabId +### GetConnectorId -`func (o *Schema) GetTabId() int32` +`func (o *OidcApp) GetConnectorId() int32` -GetTabId returns the TabId field if non-nil, zero value otherwise. +GetConnectorId returns the ConnectorId field if non-nil, zero value otherwise. -### GetTabIdOk +### GetConnectorIdOk -`func (o *Schema) GetTabIdOk() (*int32, bool)` +`func (o *OidcApp) GetConnectorIdOk() (*int32, bool)` -GetTabIdOk returns a tuple with the TabId field if it's non-nil, zero value otherwise +GetConnectorIdOk returns a tuple with the ConnectorId field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetTabId - -`func (o *Schema) SetTabId(v int32)` +### SetConnectorId -SetTabId sets TabId field to given value. +`func (o *OidcApp) SetConnectorId(v int32)` -### HasTabId - -`func (o *Schema) HasTabId() bool` +SetConnectorId sets ConnectorId field to given value. -HasTabId returns a boolean if a field has been set. ### GetCreatedAt -`func (o *Schema) GetCreatedAt() string` +`func (o *OidcApp) GetCreatedAt() string` GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. ### GetCreatedAtOk -`func (o *Schema) GetCreatedAtOk() (*string, bool)` +`func (o *OidcApp) GetCreatedAtOk() (*string, bool)` GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetCreatedAt -`func (o *Schema) SetCreatedAt(v string)` +`func (o *OidcApp) SetCreatedAt(v string)` SetCreatedAt sets CreatedAt field to given value. ### HasCreatedAt -`func (o *Schema) HasCreatedAt() bool` +`func (o *OidcApp) HasCreatedAt() bool` HasCreatedAt returns a boolean if a field has been set. ### GetUpdatedAt -`func (o *Schema) GetUpdatedAt() string` +`func (o *OidcApp) GetUpdatedAt() string` GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. ### GetUpdatedAtOk -`func (o *Schema) GetUpdatedAtOk() (*string, bool)` +`func (o *OidcApp) GetUpdatedAtOk() (*string, bool)` GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetUpdatedAt -`func (o *Schema) SetUpdatedAt(v string)` +`func (o *OidcApp) SetUpdatedAt(v string)` SetUpdatedAt sets UpdatedAt field to given value. ### HasUpdatedAt -`func (o *Schema) HasUpdatedAt() bool` +`func (o *OidcApp) HasUpdatedAt() bool` HasUpdatedAt returns a boolean if a field has been set. ### GetRoleIds -`func (o *Schema) GetRoleIds() []int32` +`func (o *OidcApp) GetRoleIds() []int32` GetRoleIds returns the RoleIds field if non-nil, zero value otherwise. ### GetRoleIdsOk -`func (o *Schema) GetRoleIdsOk() (*[]int32, bool)` +`func (o *OidcApp) GetRoleIdsOk() (*[]int32, bool)` GetRoleIdsOk returns a tuple with the RoleIds field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetRoleIds -`func (o *Schema) SetRoleIds(v []int32)` +`func (o *OidcApp) SetRoleIds(v []int32)` SetRoleIds sets RoleIds field to given value. ### HasRoleIds -`func (o *Schema) HasRoleIds() bool` +`func (o *OidcApp) HasRoleIds() bool` HasRoleIds returns a boolean if a field has been set. -### GetAllowAssumedSignin - -`func (o *Schema) GetAllowAssumedSignin() bool` - -GetAllowAssumedSignin returns the AllowAssumedSignin field if non-nil, zero value otherwise. - -### GetAllowAssumedSigninOk - -`func (o *Schema) GetAllowAssumedSigninOk() (*bool, bool)` - -GetAllowAssumedSigninOk returns a tuple with the AllowAssumedSignin field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAllowAssumedSignin - -`func (o *Schema) SetAllowAssumedSignin(v bool)` - -SetAllowAssumedSignin sets AllowAssumedSignin field to given value. - -### HasAllowAssumedSignin - -`func (o *Schema) HasAllowAssumedSignin() bool` - -HasAllowAssumedSignin returns a boolean if a field has been set. - ### GetProvisioning -`func (o *Schema) GetProvisioning() SchemaProvisioning` +`func (o *OidcApp) GetProvisioning() GenericAppProvisioning` GetProvisioning returns the Provisioning field if non-nil, zero value otherwise. ### GetProvisioningOk -`func (o *Schema) GetProvisioningOk() (*SchemaProvisioning, bool)` +`func (o *OidcApp) GetProvisioningOk() (*GenericAppProvisioning, bool)` GetProvisioningOk returns a tuple with the Provisioning field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetProvisioning -`func (o *Schema) SetProvisioning(v SchemaProvisioning)` +`func (o *OidcApp) SetProvisioning(v GenericAppProvisioning)` SetProvisioning sets Provisioning field to given value. ### HasProvisioning -`func (o *Schema) HasProvisioning() bool` +`func (o *OidcApp) HasProvisioning() bool` HasProvisioning returns a boolean if a field has been set. -### GetSso +### GetParameters -`func (o *Schema) GetSso() map[string]interface{}` +`func (o *OidcApp) GetParameters() AppParameters` -GetSso returns the Sso field if non-nil, zero value otherwise. +GetParameters returns the Parameters field if non-nil, zero value otherwise. -### GetSsoOk +### GetParametersOk -`func (o *Schema) GetSsoOk() (*map[string]interface{}, bool)` +`func (o *OidcApp) GetParametersOk() (*AppParameters, bool)` -GetSsoOk returns a tuple with the Sso field if it's non-nil, zero value otherwise +GetParametersOk returns a tuple with the Parameters field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetSso +### SetParameters -`func (o *Schema) SetSso(v map[string]interface{})` +`func (o *OidcApp) SetParameters(v AppParameters)` -SetSso sets Sso field to given value. +SetParameters sets Parameters field to given value. -### HasSso +### HasParameters -`func (o *Schema) HasSso() bool` +`func (o *OidcApp) HasParameters() bool` -HasSso returns a boolean if a field has been set. +HasParameters returns a boolean if a field has been set. -### GetConfiguration +### GetEnforcementPoint -`func (o *Schema) GetConfiguration() map[string]interface{}` +`func (o *OidcApp) GetEnforcementPoint() EnforcementPoint` -GetConfiguration returns the Configuration field if non-nil, zero value otherwise. +GetEnforcementPoint returns the EnforcementPoint field if non-nil, zero value otherwise. -### GetConfigurationOk +### GetEnforcementPointOk -`func (o *Schema) GetConfigurationOk() (*map[string]interface{}, bool)` +`func (o *OidcApp) GetEnforcementPointOk() (*EnforcementPoint, bool)` -GetConfigurationOk returns a tuple with the Configuration field if it's non-nil, zero value otherwise +GetEnforcementPointOk returns a tuple with the EnforcementPoint field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetConfiguration +### SetEnforcementPoint -`func (o *Schema) SetConfiguration(v map[string]interface{})` +`func (o *OidcApp) SetEnforcementPoint(v EnforcementPoint)` -SetConfiguration sets Configuration field to given value. +SetEnforcementPoint sets EnforcementPoint field to given value. -### HasConfiguration +### HasEnforcementPoint -`func (o *Schema) HasConfiguration() bool` +`func (o *OidcApp) HasEnforcementPoint() bool` -HasConfiguration returns a boolean if a field has been set. +HasEnforcementPoint returns a boolean if a field has been set. -### GetParameters +### GetConfiguration -`func (o *Schema) GetParameters() map[string]interface{}` +`func (o *OidcApp) GetConfiguration() ConfigurationOidc` -GetParameters returns the Parameters field if non-nil, zero value otherwise. +GetConfiguration returns the Configuration field if non-nil, zero value otherwise. -### GetParametersOk +### GetConfigurationOk -`func (o *Schema) GetParametersOk() (*map[string]interface{}, bool)` +`func (o *OidcApp) GetConfigurationOk() (*ConfigurationOidc, bool)` -GetParametersOk returns a tuple with the Parameters field if it's non-nil, zero value otherwise +GetConfigurationOk returns a tuple with the Configuration field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetParameters - -`func (o *Schema) SetParameters(v map[string]interface{})` - -SetParameters sets Parameters field to given value. +### SetConfiguration -### HasParameters +`func (o *OidcApp) SetConfiguration(v ConfigurationOidc)` -`func (o *Schema) HasParameters() bool` +SetConfiguration sets Configuration field to given value. -HasParameters returns a boolean if a field has been set. -### GetEnforcementPoint +### GetSso -`func (o *Schema) GetEnforcementPoint() map[string]interface{}` +`func (o *OidcApp) GetSso() SsoOidc` -GetEnforcementPoint returns the EnforcementPoint field if non-nil, zero value otherwise. +GetSso returns the Sso field if non-nil, zero value otherwise. -### GetEnforcementPointOk +### GetSsoOk -`func (o *Schema) GetEnforcementPointOk() (*map[string]interface{}, bool)` +`func (o *OidcApp) GetSsoOk() (*SsoOidc, bool)` -GetEnforcementPointOk returns a tuple with the EnforcementPoint field if it's non-nil, zero value otherwise +GetSsoOk returns a tuple with the Sso field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetEnforcementPoint +### SetSso -`func (o *Schema) SetEnforcementPoint(v map[string]interface{})` +`func (o *OidcApp) SetSso(v SsoOidc)` -SetEnforcementPoint sets EnforcementPoint field to given value. +SetSso sets Sso field to given value. -### HasEnforcementPoint +### HasSso -`func (o *Schema) HasEnforcementPoint() bool` +`func (o *OidcApp) HasSso() bool` -HasEnforcementPoint returns a boolean if a field has been set. +HasSso 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/OidcAppAllOf.md b/docs/OidcAppAllOf.md new file mode 100644 index 0000000..3a1a1d4 --- /dev/null +++ b/docs/OidcAppAllOf.md @@ -0,0 +1,77 @@ +# OidcAppAllOf + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Configuration** | [**ConfigurationOidc**](ConfigurationOidc.md) | | +**Sso** | Pointer to [**SsoOidc**](SsoOidc.md) | | [optional] + +## Methods + +### NewOidcAppAllOf + +`func NewOidcAppAllOf(configuration ConfigurationOidc, ) *OidcAppAllOf` + +NewOidcAppAllOf instantiates a new OidcAppAllOf 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 + +### NewOidcAppAllOfWithDefaults + +`func NewOidcAppAllOfWithDefaults() *OidcAppAllOf` + +NewOidcAppAllOfWithDefaults instantiates a new OidcAppAllOf 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 + +### GetConfiguration + +`func (o *OidcAppAllOf) GetConfiguration() ConfigurationOidc` + +GetConfiguration returns the Configuration field if non-nil, zero value otherwise. + +### GetConfigurationOk + +`func (o *OidcAppAllOf) GetConfigurationOk() (*ConfigurationOidc, bool)` + +GetConfigurationOk returns a tuple with the Configuration field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConfiguration + +`func (o *OidcAppAllOf) SetConfiguration(v ConfigurationOidc)` + +SetConfiguration sets Configuration field to given value. + + +### GetSso + +`func (o *OidcAppAllOf) GetSso() SsoOidc` + +GetSso returns the Sso field if non-nil, zero value otherwise. + +### GetSsoOk + +`func (o *OidcAppAllOf) GetSsoOk() (*SsoOidc, bool)` + +GetSsoOk returns a tuple with the Sso field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSso + +`func (o *OidcAppAllOf) SetSso(v SsoOidc)` + +SetSso sets Sso field to given value. + +### HasSso + +`func (o *OidcAppAllOf) HasSso() bool` + +HasSso 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/OtpDevice.md b/docs/OtpDevice.md new file mode 100644 index 0000000..16c7fba --- /dev/null +++ b/docs/OtpDevice.md @@ -0,0 +1,119 @@ +# OtpDevice + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FactorId** | **int32** | The identifier of the factor to enroll the user with. | [readonly] +**DisplayName** | **string** | A name for the users device | +**Number** | **string** | The phone number of the user in E.164 format. | +**Verified** | Pointer to **bool** | Defaults to false. Some factors like SMS or Voice require that a user recieve a token and then that token is supplied to the Verify endpoint before the device is considered active. You can set verfied to `true` which indicates the the users phone number is pre verified and the device can be immediately activated. | [optional] + +## Methods + +### NewOtpDevice + +`func NewOtpDevice(factorId int32, displayName string, number string, ) *OtpDevice` + +NewOtpDevice instantiates a new OtpDevice 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 + +### NewOtpDeviceWithDefaults + +`func NewOtpDeviceWithDefaults() *OtpDevice` + +NewOtpDeviceWithDefaults instantiates a new OtpDevice 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 + +### GetFactorId + +`func (o *OtpDevice) GetFactorId() int32` + +GetFactorId returns the FactorId field if non-nil, zero value otherwise. + +### GetFactorIdOk + +`func (o *OtpDevice) GetFactorIdOk() (*int32, bool)` + +GetFactorIdOk returns a tuple with the FactorId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFactorId + +`func (o *OtpDevice) SetFactorId(v int32)` + +SetFactorId sets FactorId field to given value. + + +### GetDisplayName + +`func (o *OtpDevice) GetDisplayName() string` + +GetDisplayName returns the DisplayName field if non-nil, zero value otherwise. + +### GetDisplayNameOk + +`func (o *OtpDevice) GetDisplayNameOk() (*string, bool)` + +GetDisplayNameOk returns a tuple with the DisplayName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDisplayName + +`func (o *OtpDevice) SetDisplayName(v string)` + +SetDisplayName sets DisplayName field to given value. + + +### GetNumber + +`func (o *OtpDevice) GetNumber() string` + +GetNumber returns the Number field if non-nil, zero value otherwise. + +### GetNumberOk + +`func (o *OtpDevice) GetNumberOk() (*string, bool)` + +GetNumberOk returns a tuple with the Number field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNumber + +`func (o *OtpDevice) SetNumber(v string)` + +SetNumber sets Number field to given value. + + +### GetVerified + +`func (o *OtpDevice) GetVerified() bool` + +GetVerified returns the Verified field if non-nil, zero value otherwise. + +### GetVerifiedOk + +`func (o *OtpDevice) GetVerifiedOk() (*bool, bool)` + +GetVerifiedOk returns a tuple with the Verified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVerified + +`func (o *OtpDevice) SetVerified(v bool)` + +SetVerified sets Verified field to given value. + +### HasVerified + +`func (o *OtpDevice) HasVerified() bool` + +HasVerified 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/Privilege.md b/docs/Privilege.md new file mode 100644 index 0000000..641a89e --- /dev/null +++ b/docs/Privilege.md @@ -0,0 +1,124 @@ +# Privilege + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **string** | | [optional] +**Name** | **string** | | +**Description** | Pointer to **string** | | [optional] +**Privilege** | [**PrivilegePrivilege**](PrivilegePrivilege.md) | | + +## Methods + +### NewPrivilege + +`func NewPrivilege(name string, privilege PrivilegePrivilege, ) *Privilege` + +NewPrivilege instantiates a new Privilege 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 + +### NewPrivilegeWithDefaults + +`func NewPrivilegeWithDefaults() *Privilege` + +NewPrivilegeWithDefaults instantiates a new Privilege 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 + +### GetId + +`func (o *Privilege) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Privilege) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Privilege) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *Privilege) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetName + +`func (o *Privilege) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Privilege) 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 *Privilege) SetName(v string)` + +SetName sets Name field to given value. + + +### GetDescription + +`func (o *Privilege) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *Privilege) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *Privilege) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *Privilege) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetPrivilege + +`func (o *Privilege) GetPrivilege() PrivilegePrivilege` + +GetPrivilege returns the Privilege field if non-nil, zero value otherwise. + +### GetPrivilegeOk + +`func (o *Privilege) GetPrivilegeOk() (*PrivilegePrivilege, bool)` + +GetPrivilegeOk returns a tuple with the Privilege field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPrivilege + +`func (o *Privilege) SetPrivilege(v PrivilegePrivilege)` + +SetPrivilege sets Privilege 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/PrivilegePrivilege.md b/docs/PrivilegePrivilege.md new file mode 100644 index 0000000..ac07fff --- /dev/null +++ b/docs/PrivilegePrivilege.md @@ -0,0 +1,82 @@ +# PrivilegePrivilege + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Version** | Pointer to **string** | | [optional] +**Statement** | Pointer to [**[]PrivilegePrivilegeStatementInner**](PrivilegePrivilegeStatementInner.md) | | [optional] + +## Methods + +### NewPrivilegePrivilege + +`func NewPrivilegePrivilege() *PrivilegePrivilege` + +NewPrivilegePrivilege instantiates a new PrivilegePrivilege 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 + +### NewPrivilegePrivilegeWithDefaults + +`func NewPrivilegePrivilegeWithDefaults() *PrivilegePrivilege` + +NewPrivilegePrivilegeWithDefaults instantiates a new PrivilegePrivilege 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 + +### GetVersion + +`func (o *PrivilegePrivilege) GetVersion() string` + +GetVersion returns the Version field if non-nil, zero value otherwise. + +### GetVersionOk + +`func (o *PrivilegePrivilege) GetVersionOk() (*string, bool)` + +GetVersionOk returns a tuple with the Version field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVersion + +`func (o *PrivilegePrivilege) SetVersion(v string)` + +SetVersion sets Version field to given value. + +### HasVersion + +`func (o *PrivilegePrivilege) HasVersion() bool` + +HasVersion returns a boolean if a field has been set. + +### GetStatement + +`func (o *PrivilegePrivilege) GetStatement() []PrivilegePrivilegeStatementInner` + +GetStatement returns the Statement field if non-nil, zero value otherwise. + +### GetStatementOk + +`func (o *PrivilegePrivilege) GetStatementOk() (*[]PrivilegePrivilegeStatementInner, bool)` + +GetStatementOk returns a tuple with the Statement field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatement + +`func (o *PrivilegePrivilege) SetStatement(v []PrivilegePrivilegeStatementInner)` + +SetStatement sets Statement field to given value. + +### HasStatement + +`func (o *PrivilegePrivilege) HasStatement() bool` + +HasStatement 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/PrivilegePrivilegeStatementInner.md b/docs/PrivilegePrivilegeStatementInner.md new file mode 100644 index 0000000..855e333 --- /dev/null +++ b/docs/PrivilegePrivilegeStatementInner.md @@ -0,0 +1,93 @@ +# PrivilegePrivilegeStatementInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Effect** | **string** | Set to “Allow.” By default, all actions are denied, this Statement allows the listed actions to be executed. | +**Action** | **[]string** | An array of strings that represent actions within OneLogin. Actions are prefixed with the class of object they are related to and followed by a specific action for the given class. e.g. users:List, where the class is users and the specific action is List. Don’t mix classes within an Action array. To create a privilege that includes multiple different classes, create multiple statements. A wildcard * that includes all actions is supported. Use wildcards to create a Super User privilege. | +**Scope** | **[]string** | Target the privileged action against specific resources with the scope. The scope pattern is the class of object used by the Action, followed by an ID that represents a resource in OneLogin. e.g. apps/1234, where apps is the class and 1234 is the ID of an app. The wildcard * is supported and indicates that all resources of the class type declared, in the Action, are in scope. The Action and Scope classes must match. However, there is an exception, a scope of roles/{role_id} can be combined with Actions on the user or app class. The exception allows you to target groups of users or apps with specific actions. | + +## Methods + +### NewPrivilegePrivilegeStatementInner + +`func NewPrivilegePrivilegeStatementInner(effect string, action []string, scope []string, ) *PrivilegePrivilegeStatementInner` + +NewPrivilegePrivilegeStatementInner instantiates a new PrivilegePrivilegeStatementInner 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 + +### NewPrivilegePrivilegeStatementInnerWithDefaults + +`func NewPrivilegePrivilegeStatementInnerWithDefaults() *PrivilegePrivilegeStatementInner` + +NewPrivilegePrivilegeStatementInnerWithDefaults instantiates a new PrivilegePrivilegeStatementInner 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 + +### GetEffect + +`func (o *PrivilegePrivilegeStatementInner) GetEffect() string` + +GetEffect returns the Effect field if non-nil, zero value otherwise. + +### GetEffectOk + +`func (o *PrivilegePrivilegeStatementInner) GetEffectOk() (*string, bool)` + +GetEffectOk returns a tuple with the Effect field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEffect + +`func (o *PrivilegePrivilegeStatementInner) SetEffect(v string)` + +SetEffect sets Effect field to given value. + + +### GetAction + +`func (o *PrivilegePrivilegeStatementInner) GetAction() []string` + +GetAction returns the Action field if non-nil, zero value otherwise. + +### GetActionOk + +`func (o *PrivilegePrivilegeStatementInner) GetActionOk() (*[]string, bool)` + +GetActionOk returns a tuple with the Action field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAction + +`func (o *PrivilegePrivilegeStatementInner) SetAction(v []string)` + +SetAction sets Action field to given value. + + +### GetScope + +`func (o *PrivilegePrivilegeStatementInner) GetScope() []string` + +GetScope returns the Scope field if non-nil, zero value otherwise. + +### GetScopeOk + +`func (o *PrivilegePrivilegeStatementInner) GetScopeOk() (*[]string, bool)` + +GetScopeOk returns a tuple with the Scope field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetScope + +`func (o *PrivilegePrivilegeStatementInner) SetScope(v []string)` + +SetScope sets Scope 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/PrivilegesApi.md b/docs/PrivilegesApi.md new file mode 100644 index 0000000..e7c5222 --- /dev/null +++ b/docs/PrivilegesApi.md @@ -0,0 +1,782 @@ +# \PrivilegesApi + +All URIs are relative to *https://your-api-subdomain.onelogin.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**AddPrivilegeToRole**](PrivilegesApi.md#AddPrivilegeToRole) | **Post** /api/1/privileges/{privilege_id}/roles | Assign a Privilege to Roles +[**AssignUsersToPrivilege**](PrivilegesApi.md#AssignUsersToPrivilege) | **Post** /api/1/privileges/{privilege_id}/users | Assign Users to a Privilege +[**CreatePrivilege**](PrivilegesApi.md#CreatePrivilege) | **Post** /api/1/privileges | Create a Privilege +[**DeletePrivilege**](PrivilegesApi.md#DeletePrivilege) | **Delete** /api/1/privileges/{privilege_id} | Delete a Privilege +[**DeleteRoleFromPrivilege**](PrivilegesApi.md#DeleteRoleFromPrivilege) | **Delete** /api/1/privileges/{privilege_id}/roles/{role_id} | Remove a Privilege from a Role +[**GetAssignedUser**](PrivilegesApi.md#GetAssignedUser) | **Get** /api/1/privileges/{privilege_id}/users | Get Users assigned to a Privilege +[**GetPrivilege**](PrivilegesApi.md#GetPrivilege) | **Get** /api/1/privileges/{privilege_id} | Get a Privilege +[**ListPrivelegeRoles**](PrivilegesApi.md#ListPrivelegeRoles) | **Get** /api/1/privileges/{privilege_id}/roles | Get Roles assigned to Privilege +[**ListPriveleges**](PrivilegesApi.md#ListPriveleges) | **Get** /api/1/privileges | List Privileges +[**RemoveUserFromPrivilege**](PrivilegesApi.md#RemoveUserFromPrivilege) | **Delete** /api/1/privileges/{privilege_id}/users/{user_id} | Remove a Privilege from Users +[**UpdatePrivilege**](PrivilegesApi.md#UpdatePrivilege) | **Put** /api/1/privileges/{privilege_id} | Update a Privilege + + + +## AddPrivilegeToRole + +> AddPrivilegeToRole201Response AddPrivilegeToRole(ctx, privilegeId).AddPrivilegeToRoleRequest(addPrivilegeToRoleRequest).Execute() + +Assign a Privilege to Roles + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + privilegeId := "privilegeId_example" // string | + addPrivilegeToRoleRequest := *openapiclient.NewAddPrivilegeToRoleRequest() // AddPrivilegeToRoleRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.PrivilegesApi.AddPrivilegeToRole(context.Background(), privilegeId).AddPrivilegeToRoleRequest(addPrivilegeToRoleRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `PrivilegesApi.AddPrivilegeToRole``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AddPrivilegeToRole`: AddPrivilegeToRole201Response + fmt.Fprintf(os.Stdout, "Response from `PrivilegesApi.AddPrivilegeToRole`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**privilegeId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiAddPrivilegeToRoleRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **addPrivilegeToRoleRequest** | [**AddPrivilegeToRoleRequest**](AddPrivilegeToRoleRequest.md) | | + +### Return type + +[**AddPrivilegeToRole201Response**](AddPrivilegeToRole201Response.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## AssignUsersToPrivilege + +> AddPrivilegeToRole201Response AssignUsersToPrivilege(ctx, privilegeId).AssignUsersToPrivilegeRequest(assignUsersToPrivilegeRequest).Execute() + +Assign Users to a Privilege + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + privilegeId := "privilegeId_example" // string | + assignUsersToPrivilegeRequest := *openapiclient.NewAssignUsersToPrivilegeRequest() // AssignUsersToPrivilegeRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.PrivilegesApi.AssignUsersToPrivilege(context.Background(), privilegeId).AssignUsersToPrivilegeRequest(assignUsersToPrivilegeRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `PrivilegesApi.AssignUsersToPrivilege``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AssignUsersToPrivilege`: AddPrivilegeToRole201Response + fmt.Fprintf(os.Stdout, "Response from `PrivilegesApi.AssignUsersToPrivilege`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**privilegeId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiAssignUsersToPrivilegeRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **assignUsersToPrivilegeRequest** | [**AssignUsersToPrivilegeRequest**](AssignUsersToPrivilegeRequest.md) | | + +### Return type + +[**AddPrivilegeToRole201Response**](AddPrivilegeToRole201Response.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreatePrivilege + +> CreatePrivilege200Response CreatePrivilege(ctx).Privilege(privilege).Execute() + +Create a Privilege + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + privilege := *openapiclient.NewPrivilege("User Administrator", *openapiclient.NewPrivilegePrivilege()) // Privilege | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.PrivilegesApi.CreatePrivilege(context.Background()).Privilege(privilege).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `PrivilegesApi.CreatePrivilege``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreatePrivilege`: CreatePrivilege200Response + fmt.Fprintf(os.Stdout, "Response from `PrivilegesApi.CreatePrivilege`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreatePrivilegeRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **privilege** | [**Privilege**](Privilege.md) | | + +### Return type + +[**CreatePrivilege200Response**](CreatePrivilege200Response.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeletePrivilege + +> DeletePrivilege(ctx, privilegeId).Execute() + +Delete a Privilege + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + privilegeId := "privilegeId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.PrivilegesApi.DeletePrivilege(context.Background(), privilegeId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `PrivilegesApi.DeletePrivilege``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**privilegeId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeletePrivilegeRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + + (empty response body) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteRoleFromPrivilege + +> DeleteRoleFromPrivilege(ctx, privilegeId, roleId).Execute() + +Remove a Privilege from a Role + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + privilegeId := "privilegeId_example" // string | + roleId := "roleId_example" // string | Set to the id of the role you want to return. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.PrivilegesApi.DeleteRoleFromPrivilege(context.Background(), privilegeId, roleId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `PrivilegesApi.DeleteRoleFromPrivilege``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**privilegeId** | **string** | | +**roleId** | **string** | Set to the id of the role you want to return. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteRoleFromPrivilegeRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + + (empty response body) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetAssignedUser + +> GetAssignedUser200Response GetAssignedUser(ctx, privilegeId).Execute() + +Get Users assigned to a Privilege + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + privilegeId := "privilegeId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.PrivilegesApi.GetAssignedUser(context.Background(), privilegeId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `PrivilegesApi.GetAssignedUser``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetAssignedUser`: GetAssignedUser200Response + fmt.Fprintf(os.Stdout, "Response from `PrivilegesApi.GetAssignedUser`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**privilegeId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetAssignedUserRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**GetAssignedUser200Response**](GetAssignedUser200Response.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetPrivilege + +> Privilege GetPrivilege(ctx, privilegeId).Execute() + +Get a Privilege + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + privilegeId := "privilegeId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.PrivilegesApi.GetPrivilege(context.Background(), privilegeId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `PrivilegesApi.GetPrivilege``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetPrivilege`: Privilege + fmt.Fprintf(os.Stdout, "Response from `PrivilegesApi.GetPrivilege`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**privilegeId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetPrivilegeRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**Privilege**](Privilege.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListPrivelegeRoles + +> ListPrivelegeRoles200Response ListPrivelegeRoles(ctx, privilegeId).Execute() + +Get Roles assigned to Privilege + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + privilegeId := "privilegeId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.PrivilegesApi.ListPrivelegeRoles(context.Background(), privilegeId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `PrivilegesApi.ListPrivelegeRoles``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListPrivelegeRoles`: ListPrivelegeRoles200Response + fmt.Fprintf(os.Stdout, "Response from `PrivilegesApi.ListPrivelegeRoles`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**privilegeId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListPrivelegeRolesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**ListPrivelegeRoles200Response**](ListPrivelegeRoles200Response.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListPriveleges + +> []Privilege ListPriveleges(ctx).Execute() + +List Privileges + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.PrivilegesApi.ListPriveleges(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `PrivilegesApi.ListPriveleges``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListPriveleges`: []Privilege + fmt.Fprintf(os.Stdout, "Response from `PrivilegesApi.ListPriveleges`: %v\n", resp) +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiListPrivelegesRequest struct via the builder pattern + + +### Return type + +[**[]Privilege**](Privilege.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RemoveUserFromPrivilege + +> RemoveUserFromPrivilege(ctx, privilegeId, userId).Execute() + +Remove a Privilege from Users + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + privilegeId := "privilegeId_example" // string | + userId := int32(56) // int32 | Set to the id of the user that you want to return. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.PrivilegesApi.RemoveUserFromPrivilege(context.Background(), privilegeId, userId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `PrivilegesApi.RemoveUserFromPrivilege``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**privilegeId** | **string** | | +**userId** | **int32** | Set to the id of the user that you want to return. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRemoveUserFromPrivilegeRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + + (empty response body) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdatePrivilege + +> UpdatePrivilege200Response UpdatePrivilege(ctx, privilegeId).Privilege(privilege).Execute() + +Update a Privilege + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + privilegeId := "privilegeId_example" // string | + privilege := *openapiclient.NewPrivilege("User Administrator", *openapiclient.NewPrivilegePrivilege()) // Privilege | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.PrivilegesApi.UpdatePrivilege(context.Background(), privilegeId).Privilege(privilege).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `PrivilegesApi.UpdatePrivilege``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdatePrivilege`: UpdatePrivilege200Response + fmt.Fprintf(os.Stdout, "Response from `PrivilegesApi.UpdatePrivilege`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**privilegeId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdatePrivilegeRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **privilege** | [**Privilege**](Privilege.md) | | + +### Return type + +[**UpdatePrivilege200Response**](UpdatePrivilege200Response.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/docs/GetRateLimit200ResponseData.md b/docs/RateLimit.md similarity index 58% rename from docs/GetRateLimit200ResponseData.md rename to docs/RateLimit.md index 355c443..5a4f1f4 100644 --- a/docs/GetRateLimit200ResponseData.md +++ b/docs/RateLimit.md @@ -1,104 +1,104 @@ -# GetRateLimit200ResponseData +# RateLimit ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**XRateLimitLimit** | Pointer to **int32** | | [optional] -**XRateLimitRemaining** | Pointer to **int32** | | [optional] -**XRateLimitReset** | Pointer to **int32** | | [optional] +**XRateLimitLimit** | Pointer to **int32** | Rate Limit Limit | [optional] +**XRateLimitRemaining** | Pointer to **int32** | Rate Limit Remaining | [optional] +**XRateLimitReset** | Pointer to **int32** | Rate Limit Reset | [optional] ## Methods -### NewGetRateLimit200ResponseData +### NewRateLimit -`func NewGetRateLimit200ResponseData() *GetRateLimit200ResponseData` +`func NewRateLimit() *RateLimit` -NewGetRateLimit200ResponseData instantiates a new GetRateLimit200ResponseData object +NewRateLimit instantiates a new RateLimit 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 -### NewGetRateLimit200ResponseDataWithDefaults +### NewRateLimitWithDefaults -`func NewGetRateLimit200ResponseDataWithDefaults() *GetRateLimit200ResponseData` +`func NewRateLimitWithDefaults() *RateLimit` -NewGetRateLimit200ResponseDataWithDefaults instantiates a new GetRateLimit200ResponseData object +NewRateLimitWithDefaults instantiates a new RateLimit 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 ### GetXRateLimitLimit -`func (o *GetRateLimit200ResponseData) GetXRateLimitLimit() int32` +`func (o *RateLimit) GetXRateLimitLimit() int32` GetXRateLimitLimit returns the XRateLimitLimit field if non-nil, zero value otherwise. ### GetXRateLimitLimitOk -`func (o *GetRateLimit200ResponseData) GetXRateLimitLimitOk() (*int32, bool)` +`func (o *RateLimit) GetXRateLimitLimitOk() (*int32, bool)` GetXRateLimitLimitOk returns a tuple with the XRateLimitLimit field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetXRateLimitLimit -`func (o *GetRateLimit200ResponseData) SetXRateLimitLimit(v int32)` +`func (o *RateLimit) SetXRateLimitLimit(v int32)` SetXRateLimitLimit sets XRateLimitLimit field to given value. ### HasXRateLimitLimit -`func (o *GetRateLimit200ResponseData) HasXRateLimitLimit() bool` +`func (o *RateLimit) HasXRateLimitLimit() bool` HasXRateLimitLimit returns a boolean if a field has been set. ### GetXRateLimitRemaining -`func (o *GetRateLimit200ResponseData) GetXRateLimitRemaining() int32` +`func (o *RateLimit) GetXRateLimitRemaining() int32` GetXRateLimitRemaining returns the XRateLimitRemaining field if non-nil, zero value otherwise. ### GetXRateLimitRemainingOk -`func (o *GetRateLimit200ResponseData) GetXRateLimitRemainingOk() (*int32, bool)` +`func (o *RateLimit) GetXRateLimitRemainingOk() (*int32, bool)` GetXRateLimitRemainingOk returns a tuple with the XRateLimitRemaining field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetXRateLimitRemaining -`func (o *GetRateLimit200ResponseData) SetXRateLimitRemaining(v int32)` +`func (o *RateLimit) SetXRateLimitRemaining(v int32)` SetXRateLimitRemaining sets XRateLimitRemaining field to given value. ### HasXRateLimitRemaining -`func (o *GetRateLimit200ResponseData) HasXRateLimitRemaining() bool` +`func (o *RateLimit) HasXRateLimitRemaining() bool` HasXRateLimitRemaining returns a boolean if a field has been set. ### GetXRateLimitReset -`func (o *GetRateLimit200ResponseData) GetXRateLimitReset() int32` +`func (o *RateLimit) GetXRateLimitReset() int32` GetXRateLimitReset returns the XRateLimitReset field if non-nil, zero value otherwise. ### GetXRateLimitResetOk -`func (o *GetRateLimit200ResponseData) GetXRateLimitResetOk() (*int32, bool)` +`func (o *RateLimit) GetXRateLimitResetOk() (*int32, bool)` GetXRateLimitResetOk returns a tuple with the XRateLimitReset field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetXRateLimitReset -`func (o *GetRateLimit200ResponseData) SetXRateLimitReset(v int32)` +`func (o *RateLimit) SetXRateLimitReset(v int32)` SetXRateLimitReset sets XRateLimitReset field to given value. ### HasXRateLimitReset -`func (o *GetRateLimit200ResponseData) HasXRateLimitReset() bool` +`func (o *RateLimit) HasXRateLimitReset() bool` HasXRateLimitReset returns a boolean if a field has been set. diff --git a/docs/RemoveUserRoleRequest.md b/docs/RemoveUserRoleRequest.md new file mode 100644 index 0000000..f050949 --- /dev/null +++ b/docs/RemoveUserRoleRequest.md @@ -0,0 +1,51 @@ +# RemoveUserRoleRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**RoleIdArray** | [**[]RemoveUserRoleRequestRoleIdArrayInner**](RemoveUserRoleRequestRoleIdArrayInner.md) | | + +## Methods + +### NewRemoveUserRoleRequest + +`func NewRemoveUserRoleRequest(roleIdArray []RemoveUserRoleRequestRoleIdArrayInner, ) *RemoveUserRoleRequest` + +NewRemoveUserRoleRequest instantiates a new RemoveUserRoleRequest 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 + +### NewRemoveUserRoleRequestWithDefaults + +`func NewRemoveUserRoleRequestWithDefaults() *RemoveUserRoleRequest` + +NewRemoveUserRoleRequestWithDefaults instantiates a new RemoveUserRoleRequest 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 + +### GetRoleIdArray + +`func (o *RemoveUserRoleRequest) GetRoleIdArray() []RemoveUserRoleRequestRoleIdArrayInner` + +GetRoleIdArray returns the RoleIdArray field if non-nil, zero value otherwise. + +### GetRoleIdArrayOk + +`func (o *RemoveUserRoleRequest) GetRoleIdArrayOk() (*[]RemoveUserRoleRequestRoleIdArrayInner, bool)` + +GetRoleIdArrayOk returns a tuple with the RoleIdArray field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRoleIdArray + +`func (o *RemoveUserRoleRequest) SetRoleIdArray(v []RemoveUserRoleRequestRoleIdArrayInner)` + +SetRoleIdArray sets RoleIdArray 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/RemoveUserRoleRequestRoleIdArrayInner.md b/docs/RemoveUserRoleRequestRoleIdArrayInner.md new file mode 100644 index 0000000..03f0f4d --- /dev/null +++ b/docs/RemoveUserRoleRequestRoleIdArrayInner.md @@ -0,0 +1,56 @@ +# RemoveUserRoleRequestRoleIdArrayInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**RoleId** | Pointer to **int32** | | [optional] + +## Methods + +### NewRemoveUserRoleRequestRoleIdArrayInner + +`func NewRemoveUserRoleRequestRoleIdArrayInner() *RemoveUserRoleRequestRoleIdArrayInner` + +NewRemoveUserRoleRequestRoleIdArrayInner instantiates a new RemoveUserRoleRequestRoleIdArrayInner 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 + +### NewRemoveUserRoleRequestRoleIdArrayInnerWithDefaults + +`func NewRemoveUserRoleRequestRoleIdArrayInnerWithDefaults() *RemoveUserRoleRequestRoleIdArrayInner` + +NewRemoveUserRoleRequestRoleIdArrayInnerWithDefaults instantiates a new RemoveUserRoleRequestRoleIdArrayInner 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 + +### GetRoleId + +`func (o *RemoveUserRoleRequestRoleIdArrayInner) GetRoleId() int32` + +GetRoleId returns the RoleId field if non-nil, zero value otherwise. + +### GetRoleIdOk + +`func (o *RemoveUserRoleRequestRoleIdArrayInner) GetRoleIdOk() (*int32, bool)` + +GetRoleIdOk returns a tuple with the RoleId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRoleId + +`func (o *RemoveUserRoleRequestRoleIdArrayInner) SetRoleId(v int32)` + +SetRoleId sets RoleId field to given value. + +### HasRoleId + +`func (o *RemoveUserRoleRequestRoleIdArrayInner) HasRoleId() bool` + +HasRoleId 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/RequestBrand.md b/docs/RequestBrand.md new file mode 100644 index 0000000..4b1af7b --- /dev/null +++ b/docs/RequestBrand.md @@ -0,0 +1,415 @@ +# RequestBrand + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | Pointer to **bool** | Indicates if the brand is enabled or not | [optional] [default to false] +**Name** | **string** | Brand’s name for humans. This isn’t related to subdomains. | +**CustomSupportEnabled** | Pointer to **bool** | Indicates if the custom support is enabled. If enabled, the login page includes the ability to submit a support request. | [optional] +**CustomColor** | Pointer to **string** | Primary brand color | [optional] +**CustomAccentColor** | Pointer to **string** | Secondary brand color | [optional] +**CustomMaskingColor** | Pointer to **string** | Color for the masking layer above the background image of the branded login screen. | [optional] +**CustomMaskingOpacity** | Pointer to **int32** | Opacity for the custom_masking_color. | [optional] +**EnableCustomLabelForLoginScreen** | Pointer to **bool** | Indicates if the custom Username/Email field label is enabled or not | [optional] +**CustomLabelTextForLoginScreen** | Pointer to **string** | Custom label for the Username/Email field on the login screen. See example here. | [optional] +**LoginInstructionTitle** | Pointer to **string** | Link text to show login instruction screen. | [optional] +**LoginInstruction** | Pointer to **string** | Text for the login instruction screen, styled in Markdown. | [optional] +**HideOneloginFooter** | Pointer to **bool** | Indicates if the OneLogin footer will appear at the bottom of the login page. | [optional] +**MfaEnrollmentMessage** | Pointer to **string** | Text that replaces the default text displayed on the initial screen of the MFA Registration. | [optional] +**Background** | Pointer to **string** | Base64 encoded image data (JPG/PNG, <5MB) | [optional] +**Logo** | Pointer to **string** | Base64 encoded image data (PNG, <1MB) | [optional] + +## Methods + +### NewRequestBrand + +`func NewRequestBrand(name string, ) *RequestBrand` + +NewRequestBrand instantiates a new RequestBrand 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 + +### NewRequestBrandWithDefaults + +`func NewRequestBrandWithDefaults() *RequestBrand` + +NewRequestBrandWithDefaults instantiates a new RequestBrand 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 + +### GetEnabled + +`func (o *RequestBrand) GetEnabled() bool` + +GetEnabled returns the Enabled field if non-nil, zero value otherwise. + +### GetEnabledOk + +`func (o *RequestBrand) 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 *RequestBrand) SetEnabled(v bool)` + +SetEnabled sets Enabled field to given value. + +### HasEnabled + +`func (o *RequestBrand) HasEnabled() bool` + +HasEnabled returns a boolean if a field has been set. + +### GetName + +`func (o *RequestBrand) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *RequestBrand) 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 *RequestBrand) SetName(v string)` + +SetName sets Name field to given value. + + +### GetCustomSupportEnabled + +`func (o *RequestBrand) GetCustomSupportEnabled() bool` + +GetCustomSupportEnabled returns the CustomSupportEnabled field if non-nil, zero value otherwise. + +### GetCustomSupportEnabledOk + +`func (o *RequestBrand) GetCustomSupportEnabledOk() (*bool, bool)` + +GetCustomSupportEnabledOk returns a tuple with the CustomSupportEnabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustomSupportEnabled + +`func (o *RequestBrand) SetCustomSupportEnabled(v bool)` + +SetCustomSupportEnabled sets CustomSupportEnabled field to given value. + +### HasCustomSupportEnabled + +`func (o *RequestBrand) HasCustomSupportEnabled() bool` + +HasCustomSupportEnabled returns a boolean if a field has been set. + +### GetCustomColor + +`func (o *RequestBrand) GetCustomColor() string` + +GetCustomColor returns the CustomColor field if non-nil, zero value otherwise. + +### GetCustomColorOk + +`func (o *RequestBrand) GetCustomColorOk() (*string, bool)` + +GetCustomColorOk returns a tuple with the CustomColor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustomColor + +`func (o *RequestBrand) SetCustomColor(v string)` + +SetCustomColor sets CustomColor field to given value. + +### HasCustomColor + +`func (o *RequestBrand) HasCustomColor() bool` + +HasCustomColor returns a boolean if a field has been set. + +### GetCustomAccentColor + +`func (o *RequestBrand) GetCustomAccentColor() string` + +GetCustomAccentColor returns the CustomAccentColor field if non-nil, zero value otherwise. + +### GetCustomAccentColorOk + +`func (o *RequestBrand) GetCustomAccentColorOk() (*string, bool)` + +GetCustomAccentColorOk returns a tuple with the CustomAccentColor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustomAccentColor + +`func (o *RequestBrand) SetCustomAccentColor(v string)` + +SetCustomAccentColor sets CustomAccentColor field to given value. + +### HasCustomAccentColor + +`func (o *RequestBrand) HasCustomAccentColor() bool` + +HasCustomAccentColor returns a boolean if a field has been set. + +### GetCustomMaskingColor + +`func (o *RequestBrand) GetCustomMaskingColor() string` + +GetCustomMaskingColor returns the CustomMaskingColor field if non-nil, zero value otherwise. + +### GetCustomMaskingColorOk + +`func (o *RequestBrand) GetCustomMaskingColorOk() (*string, bool)` + +GetCustomMaskingColorOk returns a tuple with the CustomMaskingColor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustomMaskingColor + +`func (o *RequestBrand) SetCustomMaskingColor(v string)` + +SetCustomMaskingColor sets CustomMaskingColor field to given value. + +### HasCustomMaskingColor + +`func (o *RequestBrand) HasCustomMaskingColor() bool` + +HasCustomMaskingColor returns a boolean if a field has been set. + +### GetCustomMaskingOpacity + +`func (o *RequestBrand) GetCustomMaskingOpacity() int32` + +GetCustomMaskingOpacity returns the CustomMaskingOpacity field if non-nil, zero value otherwise. + +### GetCustomMaskingOpacityOk + +`func (o *RequestBrand) GetCustomMaskingOpacityOk() (*int32, bool)` + +GetCustomMaskingOpacityOk returns a tuple with the CustomMaskingOpacity field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustomMaskingOpacity + +`func (o *RequestBrand) SetCustomMaskingOpacity(v int32)` + +SetCustomMaskingOpacity sets CustomMaskingOpacity field to given value. + +### HasCustomMaskingOpacity + +`func (o *RequestBrand) HasCustomMaskingOpacity() bool` + +HasCustomMaskingOpacity returns a boolean if a field has been set. + +### GetEnableCustomLabelForLoginScreen + +`func (o *RequestBrand) GetEnableCustomLabelForLoginScreen() bool` + +GetEnableCustomLabelForLoginScreen returns the EnableCustomLabelForLoginScreen field if non-nil, zero value otherwise. + +### GetEnableCustomLabelForLoginScreenOk + +`func (o *RequestBrand) GetEnableCustomLabelForLoginScreenOk() (*bool, bool)` + +GetEnableCustomLabelForLoginScreenOk returns a tuple with the EnableCustomLabelForLoginScreen field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnableCustomLabelForLoginScreen + +`func (o *RequestBrand) SetEnableCustomLabelForLoginScreen(v bool)` + +SetEnableCustomLabelForLoginScreen sets EnableCustomLabelForLoginScreen field to given value. + +### HasEnableCustomLabelForLoginScreen + +`func (o *RequestBrand) HasEnableCustomLabelForLoginScreen() bool` + +HasEnableCustomLabelForLoginScreen returns a boolean if a field has been set. + +### GetCustomLabelTextForLoginScreen + +`func (o *RequestBrand) GetCustomLabelTextForLoginScreen() string` + +GetCustomLabelTextForLoginScreen returns the CustomLabelTextForLoginScreen field if non-nil, zero value otherwise. + +### GetCustomLabelTextForLoginScreenOk + +`func (o *RequestBrand) GetCustomLabelTextForLoginScreenOk() (*string, bool)` + +GetCustomLabelTextForLoginScreenOk returns a tuple with the CustomLabelTextForLoginScreen field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustomLabelTextForLoginScreen + +`func (o *RequestBrand) SetCustomLabelTextForLoginScreen(v string)` + +SetCustomLabelTextForLoginScreen sets CustomLabelTextForLoginScreen field to given value. + +### HasCustomLabelTextForLoginScreen + +`func (o *RequestBrand) HasCustomLabelTextForLoginScreen() bool` + +HasCustomLabelTextForLoginScreen returns a boolean if a field has been set. + +### GetLoginInstructionTitle + +`func (o *RequestBrand) GetLoginInstructionTitle() string` + +GetLoginInstructionTitle returns the LoginInstructionTitle field if non-nil, zero value otherwise. + +### GetLoginInstructionTitleOk + +`func (o *RequestBrand) GetLoginInstructionTitleOk() (*string, bool)` + +GetLoginInstructionTitleOk returns a tuple with the LoginInstructionTitle field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLoginInstructionTitle + +`func (o *RequestBrand) SetLoginInstructionTitle(v string)` + +SetLoginInstructionTitle sets LoginInstructionTitle field to given value. + +### HasLoginInstructionTitle + +`func (o *RequestBrand) HasLoginInstructionTitle() bool` + +HasLoginInstructionTitle returns a boolean if a field has been set. + +### GetLoginInstruction + +`func (o *RequestBrand) GetLoginInstruction() string` + +GetLoginInstruction returns the LoginInstruction field if non-nil, zero value otherwise. + +### GetLoginInstructionOk + +`func (o *RequestBrand) GetLoginInstructionOk() (*string, bool)` + +GetLoginInstructionOk returns a tuple with the LoginInstruction field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLoginInstruction + +`func (o *RequestBrand) SetLoginInstruction(v string)` + +SetLoginInstruction sets LoginInstruction field to given value. + +### HasLoginInstruction + +`func (o *RequestBrand) HasLoginInstruction() bool` + +HasLoginInstruction returns a boolean if a field has been set. + +### GetHideOneloginFooter + +`func (o *RequestBrand) GetHideOneloginFooter() bool` + +GetHideOneloginFooter returns the HideOneloginFooter field if non-nil, zero value otherwise. + +### GetHideOneloginFooterOk + +`func (o *RequestBrand) GetHideOneloginFooterOk() (*bool, bool)` + +GetHideOneloginFooterOk returns a tuple with the HideOneloginFooter field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHideOneloginFooter + +`func (o *RequestBrand) SetHideOneloginFooter(v bool)` + +SetHideOneloginFooter sets HideOneloginFooter field to given value. + +### HasHideOneloginFooter + +`func (o *RequestBrand) HasHideOneloginFooter() bool` + +HasHideOneloginFooter returns a boolean if a field has been set. + +### GetMfaEnrollmentMessage + +`func (o *RequestBrand) GetMfaEnrollmentMessage() string` + +GetMfaEnrollmentMessage returns the MfaEnrollmentMessage field if non-nil, zero value otherwise. + +### GetMfaEnrollmentMessageOk + +`func (o *RequestBrand) GetMfaEnrollmentMessageOk() (*string, bool)` + +GetMfaEnrollmentMessageOk returns a tuple with the MfaEnrollmentMessage field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMfaEnrollmentMessage + +`func (o *RequestBrand) SetMfaEnrollmentMessage(v string)` + +SetMfaEnrollmentMessage sets MfaEnrollmentMessage field to given value. + +### HasMfaEnrollmentMessage + +`func (o *RequestBrand) HasMfaEnrollmentMessage() bool` + +HasMfaEnrollmentMessage returns a boolean if a field has been set. + +### GetBackground + +`func (o *RequestBrand) GetBackground() string` + +GetBackground returns the Background field if non-nil, zero value otherwise. + +### GetBackgroundOk + +`func (o *RequestBrand) 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 *RequestBrand) SetBackground(v string)` + +SetBackground sets Background field to given value. + +### HasBackground + +`func (o *RequestBrand) HasBackground() bool` + +HasBackground returns a boolean if a field has been set. + +### GetLogo + +`func (o *RequestBrand) GetLogo() string` + +GetLogo returns the Logo field if non-nil, zero value otherwise. + +### GetLogoOk + +`func (o *RequestBrand) GetLogoOk() (*string, bool)` + +GetLogoOk returns a tuple with the Logo field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLogo + +`func (o *RequestBrand) SetLogo(v string)` + +SetLogo sets Logo field to given value. + +### HasLogo + +`func (o *RequestBrand) HasLogo() bool` + +HasLogo 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/RevokeTokenRequest.md b/docs/RevokeTokensRequest.md similarity index 57% rename from docs/RevokeTokenRequest.md rename to docs/RevokeTokensRequest.md index f609219..70e4be3 100644 --- a/docs/RevokeTokenRequest.md +++ b/docs/RevokeTokensRequest.md @@ -1,54 +1,49 @@ -# RevokeTokenRequest +# RevokeTokensRequest ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**AccessToken** | Pointer to **string** | | [optional] +**AccessToken** | **string** | Set to the access token you want to revoke. This access token must have been generated using the client_id and client_secret provided in the Authorization header. | ## Methods -### NewRevokeTokenRequest +### NewRevokeTokensRequest -`func NewRevokeTokenRequest() *RevokeTokenRequest` +`func NewRevokeTokensRequest(accessToken string, ) *RevokeTokensRequest` -NewRevokeTokenRequest instantiates a new RevokeTokenRequest object +NewRevokeTokensRequest instantiates a new RevokeTokensRequest 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 -### NewRevokeTokenRequestWithDefaults +### NewRevokeTokensRequestWithDefaults -`func NewRevokeTokenRequestWithDefaults() *RevokeTokenRequest` +`func NewRevokeTokensRequestWithDefaults() *RevokeTokensRequest` -NewRevokeTokenRequestWithDefaults instantiates a new RevokeTokenRequest object +NewRevokeTokensRequestWithDefaults instantiates a new RevokeTokensRequest 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 ### GetAccessToken -`func (o *RevokeTokenRequest) GetAccessToken() string` +`func (o *RevokeTokensRequest) GetAccessToken() string` GetAccessToken returns the AccessToken field if non-nil, zero value otherwise. ### GetAccessTokenOk -`func (o *RevokeTokenRequest) GetAccessTokenOk() (*string, bool)` +`func (o *RevokeTokensRequest) GetAccessTokenOk() (*string, bool)` GetAccessTokenOk returns a tuple with the AccessToken field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetAccessToken -`func (o *RevokeTokenRequest) SetAccessToken(v string)` +`func (o *RevokeTokensRequest) SetAccessToken(v string)` SetAccessToken sets AccessToken field to given value. -### HasAccessToken - -`func (o *RevokeTokenRequest) HasAccessToken() bool` - -HasAccessToken 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/Role.md b/docs/Role.md index 50795c3..64d7c7c 100644 --- a/docs/Role.md +++ b/docs/Role.md @@ -4,11 +4,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | Pointer to **int32** | | [optional] -**Name** | **string** | | -**Apps** | Pointer to **[]int32** | | [optional] -**Users** | Pointer to **[]int32** | | [optional] -**Admins** | Pointer to **[]int32** | | [optional] +**Id** | Pointer to **int32** | Role ID | [optional] [readonly] +**Name** | **string** | The name of the role. | +**Apps** | Pointer to **[]int32** | A list of app IDs that will be assigned to the role. | [optional] +**Users** | Pointer to **[]int32** | A list of user IDs to assign to the role. | [optional] +**Admins** | Pointer to **[]int32** | A list of user IDs to assign as role administrators. | [optional] ## Methods diff --git a/docs/RolesApi.md b/docs/RolesApi.md new file mode 100644 index 0000000..136f3c4 --- /dev/null +++ b/docs/RolesApi.md @@ -0,0 +1,1107 @@ +# \RolesApi + +All URIs are relative to *https://your-api-subdomain.onelogin.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**AddRoleAdmins**](RolesApi.md#AddRoleAdmins) | **Post** /api/2/roles/{role_id}/admins | Add Role Admins +[**AddRoleUsers**](RolesApi.md#AddRoleUsers) | **Post** /api/2/roles/{role_id}/users | Add Role Users +[**CreateRole**](RolesApi.md#CreateRole) | **Post** /api/2/roles | Create Role +[**DeleteRole**](RolesApi.md#DeleteRole) | **Delete** /api/2/roles/{role_id} | Delete Role by ID +[**GetRole**](RolesApi.md#GetRole) | **Get** /api/2/roles/{role_id} | Get Role by ID +[**GetRoleAdmins**](RolesApi.md#GetRoleAdmins) | **Get** /api/2/roles/{role_id}/admins | Get Role Admins +[**GetRoleApps**](RolesApi.md#GetRoleApps) | **Get** /api/2/roles/{role_id}/apps | Get all Apps assigned to Role +[**GetRoleById**](RolesApi.md#GetRoleById) | **Get** /api/1/roles/{role_id} | Get Role by ID +[**GetRoleByName**](RolesApi.md#GetRoleByName) | **Get** /api/1/roles | Get Role by Name +[**GetRoleUsers**](RolesApi.md#GetRoleUsers) | **Get** /api/2/roles/{role_id}/users | Get Role Users +[**ListRoles**](RolesApi.md#ListRoles) | **Get** /api/2/roles | List Roles +[**RemoveRoleAdmins**](RolesApi.md#RemoveRoleAdmins) | **Delete** /api/2/roles/{role_id}/admins | Remove Role Admins +[**RemoveRoleUsers**](RolesApi.md#RemoveRoleUsers) | **Delete** /api/2/roles/{role_id}/users | Remove Role Users +[**SetRoleApps**](RolesApi.md#SetRoleApps) | **Put** /api/2/roles/{role_id}/apps | Set Role Apps +[**UpdateRole**](RolesApi.md#UpdateRole) | **Put** /api/2/roles/{role_id} | Update Role + + + +## AddRoleAdmins + +> []CreateRole201ResponseInner AddRoleAdmins(ctx, roleId).RequestBody(requestBody).Execute() + +Add Role Admins + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + roleId := "roleId_example" // string | Set to the id of the role you want to return. + requestBody := []int32{int32(123)} // []int32 | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.RolesApi.AddRoleAdmins(context.Background(), roleId).RequestBody(requestBody).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RolesApi.AddRoleAdmins``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AddRoleAdmins`: []CreateRole201ResponseInner + fmt.Fprintf(os.Stdout, "Response from `RolesApi.AddRoleAdmins`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**roleId** | **string** | Set to the id of the role you want to return. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiAddRoleAdminsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **requestBody** | **[]int32** | | + +### Return type + +[**[]CreateRole201ResponseInner**](CreateRole201ResponseInner.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## AddRoleUsers + +> []CreateRole201ResponseInner AddRoleUsers(ctx, roleId).RequestBody(requestBody).Execute() + +Add Role Users + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + roleId := "roleId_example" // string | Set to the id of the role you want to return. + requestBody := []int32{int32(123)} // []int32 | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.RolesApi.AddRoleUsers(context.Background(), roleId).RequestBody(requestBody).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RolesApi.AddRoleUsers``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AddRoleUsers`: []CreateRole201ResponseInner + fmt.Fprintf(os.Stdout, "Response from `RolesApi.AddRoleUsers`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**roleId** | **string** | Set to the id of the role you want to return. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiAddRoleUsersRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **requestBody** | **[]int32** | | + +### Return type + +[**[]CreateRole201ResponseInner**](CreateRole201ResponseInner.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateRole + +> []CreateRole201ResponseInner CreateRole(ctx).Role(role).Execute() + +Create Role + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + role := *openapiclient.NewRole("Name_example") // Role | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.RolesApi.CreateRole(context.Background()).Role(role).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RolesApi.CreateRole``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateRole`: []CreateRole201ResponseInner + fmt.Fprintf(os.Stdout, "Response from `RolesApi.CreateRole`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateRoleRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **role** | [**Role**](Role.md) | | + +### Return type + +[**[]CreateRole201ResponseInner**](CreateRole201ResponseInner.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteRole + +> DeleteRole(ctx, roleId).Execute() + +Delete Role by ID + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + roleId := "roleId_example" // string | Set to the id of the role you want to return. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.RolesApi.DeleteRole(context.Background(), roleId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RolesApi.DeleteRole``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**roleId** | **string** | Set to the id of the role you want to return. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteRoleRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + + (empty response body) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetRole + +> Role GetRole(ctx, roleId).Execute() + +Get Role by ID + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + roleId := "roleId_example" // string | Set to the id of the role you want to return. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.RolesApi.GetRole(context.Background(), roleId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RolesApi.GetRole``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetRole`: Role + fmt.Fprintf(os.Stdout, "Response from `RolesApi.GetRole`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**roleId** | **string** | Set to the id of the role you want to return. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetRoleRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**Role**](Role.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetRoleAdmins + +> []User GetRoleAdmins(ctx, roleId).Limit(limit).Page(page).Cursor(cursor).Name(name).IncludeUnassigned(includeUnassigned).Execute() + +Get Role Admins + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + roleId := "roleId_example" // string | Set to the id of the role you want to return. + limit := int32(56) // int32 | How many items to return at one time (max 100) (optional) + page := int32(56) // int32 | The page number of results to return. (optional) + cursor := "cursor_example" // string | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. (optional) + name := "name_example" // string | Allows you to filter on first name, last name, username, and email address. (optional) + includeUnassigned := true // bool | Optional. Defaults to false. Include users that aren’t assigned to the role. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.RolesApi.GetRoleAdmins(context.Background(), roleId).Limit(limit).Page(page).Cursor(cursor).Name(name).IncludeUnassigned(includeUnassigned).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RolesApi.GetRoleAdmins``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetRoleAdmins`: []User + fmt.Fprintf(os.Stdout, "Response from `RolesApi.GetRoleAdmins`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**roleId** | **string** | Set to the id of the role you want to return. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetRoleAdminsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **limit** | **int32** | How many items to return at one time (max 100) | + **page** | **int32** | The page number of results to return. | + **cursor** | **string** | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. | + **name** | **string** | Allows you to filter on first name, last name, username, and email address. | + **includeUnassigned** | **bool** | Optional. Defaults to false. Include users that aren’t assigned to the role. | + +### Return type + +[**[]User**](User.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: applcation/json, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetRoleApps + +> []GetRoleApps200ResponseInner GetRoleApps(ctx, roleId).Limit(limit).Page(page).Cursor(cursor).Assigned(assigned).Execute() + +Get all Apps assigned to Role + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + roleId := "roleId_example" // string | Set to the id of the role you want to return. + limit := int32(56) // int32 | How many items to return at one time (max 100) (optional) + page := int32(56) // int32 | The page number of results to return. (optional) + cursor := "cursor_example" // string | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. (optional) + assigned := true // bool | Optional. Defaults to true. Returns all apps not yet assigned to the role. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.RolesApi.GetRoleApps(context.Background(), roleId).Limit(limit).Page(page).Cursor(cursor).Assigned(assigned).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RolesApi.GetRoleApps``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetRoleApps`: []GetRoleApps200ResponseInner + fmt.Fprintf(os.Stdout, "Response from `RolesApi.GetRoleApps`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**roleId** | **string** | Set to the id of the role you want to return. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetRoleAppsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **limit** | **int32** | How many items to return at one time (max 100) | + **page** | **int32** | The page number of results to return. | + **cursor** | **string** | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. | + **assigned** | **bool** | Optional. Defaults to true. Returns all apps not yet assigned to the role. | + +### Return type + +[**[]GetRoleApps200ResponseInner**](GetRoleApps200ResponseInner.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: applcation/json, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetRoleById + +> GetRoleById200Response GetRoleById(ctx, roleId).Execute() + +Get Role by ID + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + roleId := "roleId_example" // string | Set to the id of the role you want to return. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.RolesApi.GetRoleById(context.Background(), roleId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RolesApi.GetRoleById``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetRoleById`: GetRoleById200Response + fmt.Fprintf(os.Stdout, "Response from `RolesApi.GetRoleById`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**roleId** | **string** | Set to the id of the role you want to return. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetRoleByIdRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**GetRoleById200Response**](GetRoleById200Response.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetRoleByName + +> GetRoleByName200Response GetRoleByName(ctx).Name(name).Execute() + +Get Role by Name + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + name := "name_example" // string | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.RolesApi.GetRoleByName(context.Background()).Name(name).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RolesApi.GetRoleByName``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetRoleByName`: GetRoleByName200Response + fmt.Fprintf(os.Stdout, "Response from `RolesApi.GetRoleByName`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetRoleByNameRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **string** | | + +### Return type + +[**GetRoleByName200Response**](GetRoleByName200Response.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetRoleUsers + +> []User GetRoleUsers(ctx, roleId).Limit(limit).Page(page).Cursor(cursor).Name(name).IncludeUnassigned(includeUnassigned).Execute() + +Get Role Users + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + roleId := "roleId_example" // string | Set to the id of the role you want to return. + limit := int32(56) // int32 | How many items to return at one time (max 100) (optional) + page := int32(56) // int32 | The page number of results to return. (optional) + cursor := "cursor_example" // string | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. (optional) + name := "name_example" // string | Allows you to filter on first name, last name, username, and email address. (optional) + includeUnassigned := true // bool | Optional. Defaults to false. Include users that aren’t assigned to the role. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.RolesApi.GetRoleUsers(context.Background(), roleId).Limit(limit).Page(page).Cursor(cursor).Name(name).IncludeUnassigned(includeUnassigned).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RolesApi.GetRoleUsers``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetRoleUsers`: []User + fmt.Fprintf(os.Stdout, "Response from `RolesApi.GetRoleUsers`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**roleId** | **string** | Set to the id of the role you want to return. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetRoleUsersRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **limit** | **int32** | How many items to return at one time (max 100) | + **page** | **int32** | The page number of results to return. | + **cursor** | **string** | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. | + **name** | **string** | Allows you to filter on first name, last name, username, and email address. | + **includeUnassigned** | **bool** | Optional. Defaults to false. Include users that aren’t assigned to the role. | + +### Return type + +[**[]User**](User.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: applcation/json, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListRoles + +> []Role ListRoles(ctx).AppId(appId).Limit(limit).Page(page).Cursor(cursor).RoleName(roleName).AppName(appName).Fields(fields).Execute() + +List Roles + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + appId := int32(56) // int32 | + limit := int32(56) // int32 | How many items to return at one time (max 100) (optional) + page := int32(56) // int32 | The page number of results to return. (optional) + cursor := "cursor_example" // string | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. (optional) + roleName := "roleName_example" // string | Optional. Filters by role name. (optional) + appName := "appName_example" // string | Optional. Returns roles that contain this app name. (optional) + fields := "fields_example" // string | Optional. Comma delimited list of fields to return. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.RolesApi.ListRoles(context.Background()).AppId(appId).Limit(limit).Page(page).Cursor(cursor).RoleName(roleName).AppName(appName).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RolesApi.ListRoles``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListRoles`: []Role + fmt.Fprintf(os.Stdout, "Response from `RolesApi.ListRoles`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListRolesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **appId** | **int32** | | + **limit** | **int32** | How many items to return at one time (max 100) | + **page** | **int32** | The page number of results to return. | + **cursor** | **string** | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. | + **roleName** | **string** | Optional. Filters by role name. | + **appName** | **string** | Optional. Returns roles that contain this app name. | + **fields** | **string** | Optional. Comma delimited list of fields to return. | + +### Return type + +[**[]Role**](Role.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RemoveRoleAdmins + +> RemoveRoleAdmins(ctx, roleId).RemoveRoleUsersRequest(removeRoleUsersRequest).Execute() + +Remove Role Admins + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + roleId := "roleId_example" // string | Set to the id of the role you want to return. + removeRoleUsersRequest := *openapiclient.NewRemoveRoleUsersRequest() // RemoveRoleUsersRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.RolesApi.RemoveRoleAdmins(context.Background(), roleId).RemoveRoleUsersRequest(removeRoleUsersRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RolesApi.RemoveRoleAdmins``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**roleId** | **string** | Set to the id of the role you want to return. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRemoveRoleAdminsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **removeRoleUsersRequest** | [**RemoveRoleUsersRequest**](RemoveRoleUsersRequest.md) | | + +### Return type + + (empty response body) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RemoveRoleUsers + +> RemoveRoleUsers(ctx, roleId).RemoveRoleUsersRequest(removeRoleUsersRequest).Execute() + +Remove Role Users + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + roleId := "roleId_example" // string | Set to the id of the role you want to return. + removeRoleUsersRequest := *openapiclient.NewRemoveRoleUsersRequest() // RemoveRoleUsersRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.RolesApi.RemoveRoleUsers(context.Background(), roleId).RemoveRoleUsersRequest(removeRoleUsersRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RolesApi.RemoveRoleUsers``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**roleId** | **string** | Set to the id of the role you want to return. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRemoveRoleUsersRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **removeRoleUsersRequest** | [**RemoveRoleUsersRequest**](RemoveRoleUsersRequest.md) | | + +### Return type + + (empty response body) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SetRoleApps + +> []CreateRole201ResponseInner SetRoleApps(ctx, roleId).RequestBody(requestBody).Execute() + +Set Role Apps + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + roleId := "roleId_example" // string | Set to the id of the role you want to return. + requestBody := []int32{int32(123)} // []int32 | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.RolesApi.SetRoleApps(context.Background(), roleId).RequestBody(requestBody).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RolesApi.SetRoleApps``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SetRoleApps`: []CreateRole201ResponseInner + fmt.Fprintf(os.Stdout, "Response from `RolesApi.SetRoleApps`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**roleId** | **string** | Set to the id of the role you want to return. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSetRoleAppsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **requestBody** | **[]int32** | | + +### Return type + +[**[]CreateRole201ResponseInner**](CreateRole201ResponseInner.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateRole + +> UpdateRole200Response UpdateRole(ctx, roleId).Role(role).Execute() + +Update Role + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + roleId := "roleId_example" // string | Set to the id of the role you want to return. + role := *openapiclient.NewRole("Name_example") // Role | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.RolesApi.UpdateRole(context.Background(), roleId).Role(role).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RolesApi.UpdateRole``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateRole`: UpdateRole200Response + fmt.Fprintf(os.Stdout, "Response from `RolesApi.UpdateRole`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**roleId** | **string** | Set to the id of the role you want to return. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateRoleRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **role** | [**Role**](Role.md) | | + +### Return type + +[**UpdateRole200Response**](UpdateRole200Response.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/docs/ListActions200ResponseInner.md b/docs/RuleAction.md similarity index 60% rename from docs/ListActions200ResponseInner.md rename to docs/RuleAction.md index d977d81..1605b48 100644 --- a/docs/ListActions200ResponseInner.md +++ b/docs/RuleAction.md @@ -1,78 +1,78 @@ -# ListActions200ResponseInner +# RuleAction ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Name** | Pointer to **string** | The name of the Action. | [optional] +**Name** | Pointer to **string** | Name of the Action | [optional] **Value** | Pointer to **string** | The unique identifier of the action. This should be used when defining actions for a User Mapping. | [optional] ## Methods -### NewListActions200ResponseInner +### NewRuleAction -`func NewListActions200ResponseInner() *ListActions200ResponseInner` +`func NewRuleAction() *RuleAction` -NewListActions200ResponseInner instantiates a new ListActions200ResponseInner object +NewRuleAction instantiates a new RuleAction 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 -### NewListActions200ResponseInnerWithDefaults +### NewRuleActionWithDefaults -`func NewListActions200ResponseInnerWithDefaults() *ListActions200ResponseInner` +`func NewRuleActionWithDefaults() *RuleAction` -NewListActions200ResponseInnerWithDefaults instantiates a new ListActions200ResponseInner object +NewRuleActionWithDefaults instantiates a new RuleAction 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 *ListActions200ResponseInner) GetName() string` +`func (o *RuleAction) GetName() string` GetName returns the Name field if non-nil, zero value otherwise. ### GetNameOk -`func (o *ListActions200ResponseInner) GetNameOk() (*string, bool)` +`func (o *RuleAction) 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 *ListActions200ResponseInner) SetName(v string)` +`func (o *RuleAction) SetName(v string)` SetName sets Name field to given value. ### HasName -`func (o *ListActions200ResponseInner) HasName() bool` +`func (o *RuleAction) HasName() bool` HasName returns a boolean if a field has been set. ### GetValue -`func (o *ListActions200ResponseInner) GetValue() string` +`func (o *RuleAction) GetValue() string` GetValue returns the Value field if non-nil, zero value otherwise. ### GetValueOk -`func (o *ListActions200ResponseInner) GetValueOk() (*string, bool)` +`func (o *RuleAction) GetValueOk() (*string, bool)` GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetValue -`func (o *ListActions200ResponseInner) SetValue(v string)` +`func (o *RuleAction) SetValue(v string)` SetValue sets Value field to given value. ### HasValue -`func (o *ListActions200ResponseInner) HasValue() bool` +`func (o *RuleAction) HasValue() bool` HasValue returns a boolean if a field has been set. diff --git a/docs/ListConditionValues200ResponseInner.md b/docs/RuleCondition.md similarity index 53% rename from docs/ListConditionValues200ResponseInner.md rename to docs/RuleCondition.md index f9af85c..0d01af9 100644 --- a/docs/ListConditionValues200ResponseInner.md +++ b/docs/RuleCondition.md @@ -1,78 +1,78 @@ -# ListConditionValues200ResponseInner +# RuleCondition ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Name** | Pointer to **string** | | [optional] -**Value** | Pointer to **string** | | [optional] +**Name** | Pointer to **string** | Name of the operator | [optional] +**Value** | Pointer to **string** | The condition operator value to use when creating or updating rules. | [optional] ## Methods -### NewListConditionValues200ResponseInner +### NewRuleCondition -`func NewListConditionValues200ResponseInner() *ListConditionValues200ResponseInner` +`func NewRuleCondition() *RuleCondition` -NewListConditionValues200ResponseInner instantiates a new ListConditionValues200ResponseInner object +NewRuleCondition instantiates a new RuleCondition 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 -### NewListConditionValues200ResponseInnerWithDefaults +### NewRuleConditionWithDefaults -`func NewListConditionValues200ResponseInnerWithDefaults() *ListConditionValues200ResponseInner` +`func NewRuleConditionWithDefaults() *RuleCondition` -NewListConditionValues200ResponseInnerWithDefaults instantiates a new ListConditionValues200ResponseInner object +NewRuleConditionWithDefaults instantiates a new RuleCondition 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 *ListConditionValues200ResponseInner) GetName() string` +`func (o *RuleCondition) GetName() string` GetName returns the Name field if non-nil, zero value otherwise. ### GetNameOk -`func (o *ListConditionValues200ResponseInner) GetNameOk() (*string, bool)` +`func (o *RuleCondition) 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 *ListConditionValues200ResponseInner) SetName(v string)` +`func (o *RuleCondition) SetName(v string)` SetName sets Name field to given value. ### HasName -`func (o *ListConditionValues200ResponseInner) HasName() bool` +`func (o *RuleCondition) HasName() bool` HasName returns a boolean if a field has been set. ### GetValue -`func (o *ListConditionValues200ResponseInner) GetValue() string` +`func (o *RuleCondition) GetValue() string` GetValue returns the Value field if non-nil, zero value otherwise. ### GetValueOk -`func (o *ListConditionValues200ResponseInner) GetValueOk() (*string, bool)` +`func (o *RuleCondition) GetValueOk() (*string, bool)` GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetValue -`func (o *ListConditionValues200ResponseInner) SetValue(v string)` +`func (o *RuleCondition) SetValue(v string)` SetValue sets Value field to given value. ### HasValue -`func (o *ListConditionValues200ResponseInner) HasValue() bool` +`func (o *RuleCondition) HasValue() bool` HasValue returns a boolean if a field has been set. diff --git a/docs/SAMLAssertionsApi.md b/docs/SAMLAssertionsApi.md new file mode 100644 index 0000000..ae7c581 --- /dev/null +++ b/docs/SAMLAssertionsApi.md @@ -0,0 +1,284 @@ +# \SAMLAssertionsApi + +All URIs are relative to *https://your-api-subdomain.onelogin.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GenerateSamlAssert**](SAMLAssertionsApi.md#GenerateSamlAssert) | **Post** /api/1/saml_assertion | Generate SAML Assertion +[**GenerateSamlAssert2**](SAMLAssertionsApi.md#GenerateSamlAssert2) | **Post** /api/2/saml_assertion | Generate SAML Assertion +[**VerFactorSaml**](SAMLAssertionsApi.md#VerFactorSaml) | **Post** /api/1/saml_assertion/verify_factor | Verify Factor SAML +[**VerFactorSaml2**](SAMLAssertionsApi.md#VerFactorSaml2) | **Post** /api/2/saml_assertion/verify_factor | Verify Factor SAML + + + +## GenerateSamlAssert + +> GenerateSamlAssert200Response GenerateSamlAssert(ctx).ContentType(contentType).SamlAssert(samlAssert).Execute() + +Generate SAML Assertion + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + contentType := "application/json" // string | (optional) (default to "application/json") + samlAssert := *openapiclient.NewSamlAssert("UsernameOrEmail_example", "Password_example", "AppId_example", "Subdomain_example") // SamlAssert | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SAMLAssertionsApi.GenerateSamlAssert(context.Background()).ContentType(contentType).SamlAssert(samlAssert).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SAMLAssertionsApi.GenerateSamlAssert``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GenerateSamlAssert`: GenerateSamlAssert200Response + fmt.Fprintf(os.Stdout, "Response from `SAMLAssertionsApi.GenerateSamlAssert`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiGenerateSamlAssertRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **contentType** | **string** | | [default to "application/json"] + **samlAssert** | [**SamlAssert**](SamlAssert.md) | | + +### Return type + +[**GenerateSamlAssert200Response**](GenerateSamlAssert200Response.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GenerateSamlAssert2 + +> GenerateSamlAssert200Response GenerateSamlAssert2(ctx).ContentType(contentType).SamlAssert(samlAssert).Execute() + +Generate SAML Assertion + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + contentType := "application/json" // string | (optional) (default to "application/json") + samlAssert := *openapiclient.NewSamlAssert("UsernameOrEmail_example", "Password_example", "AppId_example", "Subdomain_example") // SamlAssert | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SAMLAssertionsApi.GenerateSamlAssert2(context.Background()).ContentType(contentType).SamlAssert(samlAssert).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SAMLAssertionsApi.GenerateSamlAssert2``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GenerateSamlAssert2`: GenerateSamlAssert200Response + fmt.Fprintf(os.Stdout, "Response from `SAMLAssertionsApi.GenerateSamlAssert2`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiGenerateSamlAssert2Request struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **contentType** | **string** | | [default to "application/json"] + **samlAssert** | [**SamlAssert**](SamlAssert.md) | | + +### Return type + +[**GenerateSamlAssert200Response**](GenerateSamlAssert200Response.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## VerFactorSaml + +> VerFactorSaml200Response VerFactorSaml(ctx).ContentType(contentType).SamlFactor(samlFactor).Execute() + +Verify Factor SAML + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + contentType := "application/json" // string | (optional) (default to "application/json") + samlFactor := *openapiclient.NewSamlFactor("1657651", "1657651", "11x0x1x16x1x3259xxxx0x59xx6xxxx670x61x45xxxxx") // SamlFactor | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SAMLAssertionsApi.VerFactorSaml(context.Background()).ContentType(contentType).SamlFactor(samlFactor).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SAMLAssertionsApi.VerFactorSaml``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `VerFactorSaml`: VerFactorSaml200Response + fmt.Fprintf(os.Stdout, "Response from `SAMLAssertionsApi.VerFactorSaml`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiVerFactorSamlRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **contentType** | **string** | | [default to "application/json"] + **samlFactor** | [**SamlFactor**](SamlFactor.md) | | + +### Return type + +[**VerFactorSaml200Response**](VerFactorSaml200Response.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## VerFactorSaml2 + +> VerFactorSaml200Response VerFactorSaml2(ctx).ContentType(contentType).SamlFactor(samlFactor).Execute() + +Verify Factor SAML + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + contentType := "application/json" // string | (optional) (default to "application/json") + samlFactor := *openapiclient.NewSamlFactor("1657651", "1657651", "11x0x1x16x1x3259xxxx0x59xx6xxxx670x61x45xxxxx") // SamlFactor | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SAMLAssertionsApi.VerFactorSaml2(context.Background()).ContentType(contentType).SamlFactor(samlFactor).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SAMLAssertionsApi.VerFactorSaml2``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `VerFactorSaml2`: VerFactorSaml200Response + fmt.Fprintf(os.Stdout, "Response from `SAMLAssertionsApi.VerFactorSaml2`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiVerFactorSaml2Request struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **contentType** | **string** | | [default to "application/json"] + **samlFactor** | [**SamlFactor**](SamlFactor.md) | | + +### Return type + +[**VerFactorSaml200Response**](VerFactorSaml200Response.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/docs/SamlApp.md b/docs/SamlApp.md new file mode 100644 index 0000000..13644ac --- /dev/null +++ b/docs/SamlApp.md @@ -0,0 +1,489 @@ +# SamlApp + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **int32** | Apps unique ID in OneLogin. | [optional] [readonly] +**Name** | **string** | The name of the app. | +**Visible** | **bool** | Indicates if the app is visible in the OneLogin portal. | +**Description** | **string** | Freeform description of the app. | +**Notes** | Pointer to **string** | Freeform notes about the app. | [optional] +**IconUrl** | Pointer to **string** | A link to the apps icon url | [optional] +**AuthMethod** | Pointer to [**AuthMethod**](AuthMethod.md) | | [optional] +**PolicyId** | **int32** | The security policy assigned to the app. | +**AllowAssumedSignin** | Pointer to **bool** | Indicates whether or not administrators can access the app as a user that they have assumed control over. | [optional] +**TabId** | Pointer to **int32** | ID of the OneLogin portal tab that the app is assigned to. | [optional] +**ConnectorId** | **int32** | ID of the connector to base the app from. | +**CreatedAt** | Pointer to **string** | the date the app was created | [optional] +**UpdatedAt** | Pointer to **string** | the date the app was last updated | [optional] +**RoleIds** | Pointer to **[]int32** | List of Role IDs that are assigned to the app. On App Create or Update the entire array is replaced with the values provided. | [optional] +**Provisioning** | Pointer to [**GenericAppProvisioning**](GenericAppProvisioning.md) | | [optional] +**Parameters** | [**SamlAppAllOfParameters**](SamlAppAllOfParameters.md) | | +**EnforcementPoint** | Pointer to [**EnforcementPoint**](EnforcementPoint.md) | | [optional] +**Configuration** | [**ConfigurationSaml**](ConfigurationSaml.md) | | +**Sso** | Pointer to [**SsoSaml**](SsoSaml.md) | | [optional] + +## Methods + +### NewSamlApp + +`func NewSamlApp(name string, visible bool, description string, policyId int32, connectorId int32, parameters SamlAppAllOfParameters, configuration ConfigurationSaml, ) *SamlApp` + +NewSamlApp instantiates a new SamlApp 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 + +### NewSamlAppWithDefaults + +`func NewSamlAppWithDefaults() *SamlApp` + +NewSamlAppWithDefaults instantiates a new SamlApp 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 + +### GetId + +`func (o *SamlApp) GetId() int32` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *SamlApp) GetIdOk() (*int32, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *SamlApp) SetId(v int32)` + +SetId sets Id field to given value. + +### HasId + +`func (o *SamlApp) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetName + +`func (o *SamlApp) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *SamlApp) 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 *SamlApp) SetName(v string)` + +SetName sets Name field to given value. + + +### GetVisible + +`func (o *SamlApp) GetVisible() bool` + +GetVisible returns the Visible field if non-nil, zero value otherwise. + +### GetVisibleOk + +`func (o *SamlApp) GetVisibleOk() (*bool, bool)` + +GetVisibleOk returns a tuple with the Visible field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVisible + +`func (o *SamlApp) SetVisible(v bool)` + +SetVisible sets Visible field to given value. + + +### GetDescription + +`func (o *SamlApp) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *SamlApp) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *SamlApp) SetDescription(v string)` + +SetDescription sets Description field to given value. + + +### GetNotes + +`func (o *SamlApp) GetNotes() string` + +GetNotes returns the Notes field if non-nil, zero value otherwise. + +### GetNotesOk + +`func (o *SamlApp) GetNotesOk() (*string, bool)` + +GetNotesOk returns a tuple with the Notes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNotes + +`func (o *SamlApp) SetNotes(v string)` + +SetNotes sets Notes field to given value. + +### HasNotes + +`func (o *SamlApp) HasNotes() bool` + +HasNotes returns a boolean if a field has been set. + +### GetIconUrl + +`func (o *SamlApp) GetIconUrl() string` + +GetIconUrl returns the IconUrl field if non-nil, zero value otherwise. + +### GetIconUrlOk + +`func (o *SamlApp) GetIconUrlOk() (*string, bool)` + +GetIconUrlOk returns a tuple with the IconUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIconUrl + +`func (o *SamlApp) SetIconUrl(v string)` + +SetIconUrl sets IconUrl field to given value. + +### HasIconUrl + +`func (o *SamlApp) HasIconUrl() bool` + +HasIconUrl returns a boolean if a field has been set. + +### GetAuthMethod + +`func (o *SamlApp) GetAuthMethod() AuthMethod` + +GetAuthMethod returns the AuthMethod field if non-nil, zero value otherwise. + +### GetAuthMethodOk + +`func (o *SamlApp) GetAuthMethodOk() (*AuthMethod, bool)` + +GetAuthMethodOk returns a tuple with the AuthMethod field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAuthMethod + +`func (o *SamlApp) SetAuthMethod(v AuthMethod)` + +SetAuthMethod sets AuthMethod field to given value. + +### HasAuthMethod + +`func (o *SamlApp) HasAuthMethod() bool` + +HasAuthMethod returns a boolean if a field has been set. + +### GetPolicyId + +`func (o *SamlApp) GetPolicyId() int32` + +GetPolicyId returns the PolicyId field if non-nil, zero value otherwise. + +### GetPolicyIdOk + +`func (o *SamlApp) GetPolicyIdOk() (*int32, bool)` + +GetPolicyIdOk returns a tuple with the PolicyId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPolicyId + +`func (o *SamlApp) SetPolicyId(v int32)` + +SetPolicyId sets PolicyId field to given value. + + +### GetAllowAssumedSignin + +`func (o *SamlApp) GetAllowAssumedSignin() bool` + +GetAllowAssumedSignin returns the AllowAssumedSignin field if non-nil, zero value otherwise. + +### GetAllowAssumedSigninOk + +`func (o *SamlApp) GetAllowAssumedSigninOk() (*bool, bool)` + +GetAllowAssumedSigninOk returns a tuple with the AllowAssumedSignin field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAllowAssumedSignin + +`func (o *SamlApp) SetAllowAssumedSignin(v bool)` + +SetAllowAssumedSignin sets AllowAssumedSignin field to given value. + +### HasAllowAssumedSignin + +`func (o *SamlApp) HasAllowAssumedSignin() bool` + +HasAllowAssumedSignin returns a boolean if a field has been set. + +### GetTabId + +`func (o *SamlApp) GetTabId() int32` + +GetTabId returns the TabId field if non-nil, zero value otherwise. + +### GetTabIdOk + +`func (o *SamlApp) GetTabIdOk() (*int32, bool)` + +GetTabIdOk returns a tuple with the TabId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTabId + +`func (o *SamlApp) SetTabId(v int32)` + +SetTabId sets TabId field to given value. + +### HasTabId + +`func (o *SamlApp) HasTabId() bool` + +HasTabId returns a boolean if a field has been set. + +### GetConnectorId + +`func (o *SamlApp) GetConnectorId() int32` + +GetConnectorId returns the ConnectorId field if non-nil, zero value otherwise. + +### GetConnectorIdOk + +`func (o *SamlApp) GetConnectorIdOk() (*int32, bool)` + +GetConnectorIdOk returns a tuple with the ConnectorId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConnectorId + +`func (o *SamlApp) SetConnectorId(v int32)` + +SetConnectorId sets ConnectorId field to given value. + + +### GetCreatedAt + +`func (o *SamlApp) GetCreatedAt() string` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *SamlApp) GetCreatedAtOk() (*string, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *SamlApp) SetCreatedAt(v string)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *SamlApp) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### GetUpdatedAt + +`func (o *SamlApp) GetUpdatedAt() string` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *SamlApp) GetUpdatedAtOk() (*string, bool)` + +GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedAt + +`func (o *SamlApp) SetUpdatedAt(v string)` + +SetUpdatedAt sets UpdatedAt field to given value. + +### HasUpdatedAt + +`func (o *SamlApp) HasUpdatedAt() bool` + +HasUpdatedAt returns a boolean if a field has been set. + +### GetRoleIds + +`func (o *SamlApp) GetRoleIds() []int32` + +GetRoleIds returns the RoleIds field if non-nil, zero value otherwise. + +### GetRoleIdsOk + +`func (o *SamlApp) GetRoleIdsOk() (*[]int32, bool)` + +GetRoleIdsOk returns a tuple with the RoleIds field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRoleIds + +`func (o *SamlApp) SetRoleIds(v []int32)` + +SetRoleIds sets RoleIds field to given value. + +### HasRoleIds + +`func (o *SamlApp) HasRoleIds() bool` + +HasRoleIds returns a boolean if a field has been set. + +### GetProvisioning + +`func (o *SamlApp) GetProvisioning() GenericAppProvisioning` + +GetProvisioning returns the Provisioning field if non-nil, zero value otherwise. + +### GetProvisioningOk + +`func (o *SamlApp) GetProvisioningOk() (*GenericAppProvisioning, bool)` + +GetProvisioningOk returns a tuple with the Provisioning field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProvisioning + +`func (o *SamlApp) SetProvisioning(v GenericAppProvisioning)` + +SetProvisioning sets Provisioning field to given value. + +### HasProvisioning + +`func (o *SamlApp) HasProvisioning() bool` + +HasProvisioning returns a boolean if a field has been set. + +### GetParameters + +`func (o *SamlApp) GetParameters() SamlAppAllOfParameters` + +GetParameters returns the Parameters field if non-nil, zero value otherwise. + +### GetParametersOk + +`func (o *SamlApp) GetParametersOk() (*SamlAppAllOfParameters, bool)` + +GetParametersOk returns a tuple with the Parameters field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetParameters + +`func (o *SamlApp) SetParameters(v SamlAppAllOfParameters)` + +SetParameters sets Parameters field to given value. + + +### GetEnforcementPoint + +`func (o *SamlApp) GetEnforcementPoint() EnforcementPoint` + +GetEnforcementPoint returns the EnforcementPoint field if non-nil, zero value otherwise. + +### GetEnforcementPointOk + +`func (o *SamlApp) GetEnforcementPointOk() (*EnforcementPoint, bool)` + +GetEnforcementPointOk returns a tuple with the EnforcementPoint field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnforcementPoint + +`func (o *SamlApp) SetEnforcementPoint(v EnforcementPoint)` + +SetEnforcementPoint sets EnforcementPoint field to given value. + +### HasEnforcementPoint + +`func (o *SamlApp) HasEnforcementPoint() bool` + +HasEnforcementPoint returns a boolean if a field has been set. + +### GetConfiguration + +`func (o *SamlApp) GetConfiguration() ConfigurationSaml` + +GetConfiguration returns the Configuration field if non-nil, zero value otherwise. + +### GetConfigurationOk + +`func (o *SamlApp) GetConfigurationOk() (*ConfigurationSaml, bool)` + +GetConfigurationOk returns a tuple with the Configuration field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConfiguration + +`func (o *SamlApp) SetConfiguration(v ConfigurationSaml)` + +SetConfiguration sets Configuration field to given value. + + +### GetSso + +`func (o *SamlApp) GetSso() SsoSaml` + +GetSso returns the Sso field if non-nil, zero value otherwise. + +### GetSsoOk + +`func (o *SamlApp) GetSsoOk() (*SsoSaml, bool)` + +GetSsoOk returns a tuple with the Sso field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSso + +`func (o *SamlApp) SetSso(v SsoSaml)` + +SetSso sets Sso field to given value. + +### HasSso + +`func (o *SamlApp) HasSso() bool` + +HasSso 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/SamlAppAllOf.md b/docs/SamlAppAllOf.md new file mode 100644 index 0000000..cd93514 --- /dev/null +++ b/docs/SamlAppAllOf.md @@ -0,0 +1,98 @@ +# SamlAppAllOf + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Configuration** | [**ConfigurationSaml**](ConfigurationSaml.md) | | +**Sso** | Pointer to [**SsoSaml**](SsoSaml.md) | | [optional] +**Parameters** | [**SamlAppAllOfParameters**](SamlAppAllOfParameters.md) | | + +## Methods + +### NewSamlAppAllOf + +`func NewSamlAppAllOf(configuration ConfigurationSaml, parameters SamlAppAllOfParameters, ) *SamlAppAllOf` + +NewSamlAppAllOf instantiates a new SamlAppAllOf 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 + +### NewSamlAppAllOfWithDefaults + +`func NewSamlAppAllOfWithDefaults() *SamlAppAllOf` + +NewSamlAppAllOfWithDefaults instantiates a new SamlAppAllOf 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 + +### GetConfiguration + +`func (o *SamlAppAllOf) GetConfiguration() ConfigurationSaml` + +GetConfiguration returns the Configuration field if non-nil, zero value otherwise. + +### GetConfigurationOk + +`func (o *SamlAppAllOf) GetConfigurationOk() (*ConfigurationSaml, bool)` + +GetConfigurationOk returns a tuple with the Configuration field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConfiguration + +`func (o *SamlAppAllOf) SetConfiguration(v ConfigurationSaml)` + +SetConfiguration sets Configuration field to given value. + + +### GetSso + +`func (o *SamlAppAllOf) GetSso() SsoSaml` + +GetSso returns the Sso field if non-nil, zero value otherwise. + +### GetSsoOk + +`func (o *SamlAppAllOf) GetSsoOk() (*SsoSaml, bool)` + +GetSsoOk returns a tuple with the Sso field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSso + +`func (o *SamlAppAllOf) SetSso(v SsoSaml)` + +SetSso sets Sso field to given value. + +### HasSso + +`func (o *SamlAppAllOf) HasSso() bool` + +HasSso returns a boolean if a field has been set. + +### GetParameters + +`func (o *SamlAppAllOf) GetParameters() SamlAppAllOfParameters` + +GetParameters returns the Parameters field if non-nil, zero value otherwise. + +### GetParametersOk + +`func (o *SamlAppAllOf) GetParametersOk() (*SamlAppAllOfParameters, bool)` + +GetParametersOk returns a tuple with the Parameters field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetParameters + +`func (o *SamlAppAllOf) SetParameters(v SamlAppAllOfParameters)` + +SetParameters sets Parameters 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/SamlAppAllOfParameters.md b/docs/SamlAppAllOfParameters.md new file mode 100644 index 0000000..f0985a1 --- /dev/null +++ b/docs/SamlAppAllOfParameters.md @@ -0,0 +1,51 @@ +# SamlAppAllOfParameters + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SamlUsername** | [**SamlAppAllOfParametersSamlUsername**](SamlAppAllOfParametersSamlUsername.md) | | + +## Methods + +### NewSamlAppAllOfParameters + +`func NewSamlAppAllOfParameters(samlUsername SamlAppAllOfParametersSamlUsername, ) *SamlAppAllOfParameters` + +NewSamlAppAllOfParameters instantiates a new SamlAppAllOfParameters 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 + +### NewSamlAppAllOfParametersWithDefaults + +`func NewSamlAppAllOfParametersWithDefaults() *SamlAppAllOfParameters` + +NewSamlAppAllOfParametersWithDefaults instantiates a new SamlAppAllOfParameters 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 + +### GetSamlUsername + +`func (o *SamlAppAllOfParameters) GetSamlUsername() SamlAppAllOfParametersSamlUsername` + +GetSamlUsername returns the SamlUsername field if non-nil, zero value otherwise. + +### GetSamlUsernameOk + +`func (o *SamlAppAllOfParameters) GetSamlUsernameOk() (*SamlAppAllOfParametersSamlUsername, bool)` + +GetSamlUsernameOk returns a tuple with the SamlUsername field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSamlUsername + +`func (o *SamlAppAllOfParameters) SetSamlUsername(v SamlAppAllOfParametersSamlUsername)` + +SetSamlUsername sets SamlUsername 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/SamlAppAllOfParametersSamlUsername.md b/docs/SamlAppAllOfParametersSamlUsername.md new file mode 100644 index 0000000..339f70e --- /dev/null +++ b/docs/SamlAppAllOfParametersSamlUsername.md @@ -0,0 +1,51 @@ +# SamlAppAllOfParametersSamlUsername + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**UserAttributeMappings** | **string** | | + +## Methods + +### NewSamlAppAllOfParametersSamlUsername + +`func NewSamlAppAllOfParametersSamlUsername(userAttributeMappings string, ) *SamlAppAllOfParametersSamlUsername` + +NewSamlAppAllOfParametersSamlUsername instantiates a new SamlAppAllOfParametersSamlUsername 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 + +### NewSamlAppAllOfParametersSamlUsernameWithDefaults + +`func NewSamlAppAllOfParametersSamlUsernameWithDefaults() *SamlAppAllOfParametersSamlUsername` + +NewSamlAppAllOfParametersSamlUsernameWithDefaults instantiates a new SamlAppAllOfParametersSamlUsername 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 + +### GetUserAttributeMappings + +`func (o *SamlAppAllOfParametersSamlUsername) GetUserAttributeMappings() string` + +GetUserAttributeMappings returns the UserAttributeMappings field if non-nil, zero value otherwise. + +### GetUserAttributeMappingsOk + +`func (o *SamlAppAllOfParametersSamlUsername) GetUserAttributeMappingsOk() (*string, bool)` + +GetUserAttributeMappingsOk returns a tuple with the UserAttributeMappings field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUserAttributeMappings + +`func (o *SamlAppAllOfParametersSamlUsername) SetUserAttributeMappings(v string)` + +SetUserAttributeMappings sets UserAttributeMappings 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/GenerateSamlAssertionRequest.md b/docs/SamlAssert.md similarity index 62% rename from docs/GenerateSamlAssertionRequest.md rename to docs/SamlAssert.md index 9327a68..a2eff6c 100644 --- a/docs/GenerateSamlAssertionRequest.md +++ b/docs/SamlAssert.md @@ -1,4 +1,4 @@ -# GenerateSamlAssertionRequest +# SamlAssert ## Properties @@ -8,129 +8,129 @@ Name | Type | Description | Notes **Password** | **string** | Password of the OneLogin user accessing the app for which you want to generate a SAML token. | **AppId** | **string** | App ID of the app for which you want to generate a SAML token. This is the app ID in OneLogin. | **Subdomain** | **string** | Set to the subdomain of the OneLogin user accessing the app for which you want to generate a SAML token. | -**IpAddress** | Pointer to **string** | Whitelisted IP address, if MFA is required and you need to honor IP address whitelisting defined in MFA policies. | [optional] +**IpAddress** | Pointer to **string** | If you are using this API in a scenario in which MFA is required and you’ll need to be able to honor IP address whitelisting defined in MFA policies, provide this parameter and set its value to the whitelisted IP address that needs to be bypassed. | [optional] ## Methods -### NewGenerateSamlAssertionRequest +### NewSamlAssert -`func NewGenerateSamlAssertionRequest(usernameOrEmail string, password string, appId string, subdomain string, ) *GenerateSamlAssertionRequest` +`func NewSamlAssert(usernameOrEmail string, password string, appId string, subdomain string, ) *SamlAssert` -NewGenerateSamlAssertionRequest instantiates a new GenerateSamlAssertionRequest object +NewSamlAssert instantiates a new SamlAssert 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 -### NewGenerateSamlAssertionRequestWithDefaults +### NewSamlAssertWithDefaults -`func NewGenerateSamlAssertionRequestWithDefaults() *GenerateSamlAssertionRequest` +`func NewSamlAssertWithDefaults() *SamlAssert` -NewGenerateSamlAssertionRequestWithDefaults instantiates a new GenerateSamlAssertionRequest object +NewSamlAssertWithDefaults instantiates a new SamlAssert 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 ### GetUsernameOrEmail -`func (o *GenerateSamlAssertionRequest) GetUsernameOrEmail() string` +`func (o *SamlAssert) GetUsernameOrEmail() string` GetUsernameOrEmail returns the UsernameOrEmail field if non-nil, zero value otherwise. ### GetUsernameOrEmailOk -`func (o *GenerateSamlAssertionRequest) GetUsernameOrEmailOk() (*string, bool)` +`func (o *SamlAssert) GetUsernameOrEmailOk() (*string, bool)` GetUsernameOrEmailOk returns a tuple with the UsernameOrEmail field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetUsernameOrEmail -`func (o *GenerateSamlAssertionRequest) SetUsernameOrEmail(v string)` +`func (o *SamlAssert) SetUsernameOrEmail(v string)` SetUsernameOrEmail sets UsernameOrEmail field to given value. ### GetPassword -`func (o *GenerateSamlAssertionRequest) GetPassword() string` +`func (o *SamlAssert) GetPassword() string` GetPassword returns the Password field if non-nil, zero value otherwise. ### GetPasswordOk -`func (o *GenerateSamlAssertionRequest) GetPasswordOk() (*string, bool)` +`func (o *SamlAssert) GetPasswordOk() (*string, bool)` GetPasswordOk returns a tuple with the Password field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetPassword -`func (o *GenerateSamlAssertionRequest) SetPassword(v string)` +`func (o *SamlAssert) SetPassword(v string)` SetPassword sets Password field to given value. ### GetAppId -`func (o *GenerateSamlAssertionRequest) GetAppId() string` +`func (o *SamlAssert) GetAppId() string` GetAppId returns the AppId field if non-nil, zero value otherwise. ### GetAppIdOk -`func (o *GenerateSamlAssertionRequest) GetAppIdOk() (*string, bool)` +`func (o *SamlAssert) GetAppIdOk() (*string, bool)` GetAppIdOk returns a tuple with the AppId field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetAppId -`func (o *GenerateSamlAssertionRequest) SetAppId(v string)` +`func (o *SamlAssert) SetAppId(v string)` SetAppId sets AppId field to given value. ### GetSubdomain -`func (o *GenerateSamlAssertionRequest) GetSubdomain() string` +`func (o *SamlAssert) GetSubdomain() string` GetSubdomain returns the Subdomain field if non-nil, zero value otherwise. ### GetSubdomainOk -`func (o *GenerateSamlAssertionRequest) GetSubdomainOk() (*string, bool)` +`func (o *SamlAssert) GetSubdomainOk() (*string, bool)` GetSubdomainOk returns a tuple with the Subdomain field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetSubdomain -`func (o *GenerateSamlAssertionRequest) SetSubdomain(v string)` +`func (o *SamlAssert) SetSubdomain(v string)` SetSubdomain sets Subdomain field to given value. ### GetIpAddress -`func (o *GenerateSamlAssertionRequest) GetIpAddress() string` +`func (o *SamlAssert) GetIpAddress() string` GetIpAddress returns the IpAddress field if non-nil, zero value otherwise. ### GetIpAddressOk -`func (o *GenerateSamlAssertionRequest) GetIpAddressOk() (*string, bool)` +`func (o *SamlAssert) GetIpAddressOk() (*string, bool)` GetIpAddressOk returns a tuple with the IpAddress field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetIpAddress -`func (o *GenerateSamlAssertionRequest) SetIpAddress(v string)` +`func (o *SamlAssert) SetIpAddress(v string)` SetIpAddress sets IpAddress field to given value. ### HasIpAddress -`func (o *GenerateSamlAssertionRequest) HasIpAddress() bool` +`func (o *SamlAssert) HasIpAddress() bool` HasIpAddress returns a boolean if a field has been set. diff --git a/docs/VerifyFactorSamlRequest.md b/docs/SamlFactor.md similarity index 63% rename from docs/VerifyFactorSamlRequest.md rename to docs/SamlFactor.md index 65c38d4..00f56e9 100644 --- a/docs/VerifyFactorSamlRequest.md +++ b/docs/SamlFactor.md @@ -1,4 +1,4 @@ -# VerifyFactorSamlRequest +# SamlFactor ## Properties @@ -6,136 +6,136 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **AppId** | **string** | App ID of the app for which you want to generate a SAML token. This is the app ID in OneLogin. | **DeviceId** | **string** | Provide the MFA device_id you are submitting for verification. The device_id is supplied by the Generate SAML Assertion API. | -**StateToken** | **string** | state_token associated with the MFA device_id you are submitting. The state_token is supplied by the Generate SAML Assertion API. | -**OtpToken** | Pointer to **string** | Provide the OTP value for the MFA factor you are submitting for verification. | [optional] +**StateToken** | **string** | Provide the state_token associated with the MFA device_id you are submitting for verification. The state_token is supplied by the Generate SAML Assertion API. | +**OtpToken** | Pointer to **string** | Provide the OTP value for the MFA factor you are submitting for verification. For some MFA factors; such as OneLogin OTP SMS, which requires the user to request an OTP; the otp_token value is not required, and if not included, returns a 200 OK - Pending result. You’ll make a subsequent Verify Factor API call to provide the otp_token value once it has been provided to the user. | [optional] **DoNotNotify** | Pointer to **bool** | When verifying MFA via Protect Push, set this to true to stop additional push notifications being sent to the OneLogin Protect device. | [optional] ## Methods -### NewVerifyFactorSamlRequest +### NewSamlFactor -`func NewVerifyFactorSamlRequest(appId string, deviceId string, stateToken string, ) *VerifyFactorSamlRequest` +`func NewSamlFactor(appId string, deviceId string, stateToken string, ) *SamlFactor` -NewVerifyFactorSamlRequest instantiates a new VerifyFactorSamlRequest object +NewSamlFactor instantiates a new SamlFactor 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 -### NewVerifyFactorSamlRequestWithDefaults +### NewSamlFactorWithDefaults -`func NewVerifyFactorSamlRequestWithDefaults() *VerifyFactorSamlRequest` +`func NewSamlFactorWithDefaults() *SamlFactor` -NewVerifyFactorSamlRequestWithDefaults instantiates a new VerifyFactorSamlRequest object +NewSamlFactorWithDefaults instantiates a new SamlFactor 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 ### GetAppId -`func (o *VerifyFactorSamlRequest) GetAppId() string` +`func (o *SamlFactor) GetAppId() string` GetAppId returns the AppId field if non-nil, zero value otherwise. ### GetAppIdOk -`func (o *VerifyFactorSamlRequest) GetAppIdOk() (*string, bool)` +`func (o *SamlFactor) GetAppIdOk() (*string, bool)` GetAppIdOk returns a tuple with the AppId field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetAppId -`func (o *VerifyFactorSamlRequest) SetAppId(v string)` +`func (o *SamlFactor) SetAppId(v string)` SetAppId sets AppId field to given value. ### GetDeviceId -`func (o *VerifyFactorSamlRequest) GetDeviceId() string` +`func (o *SamlFactor) GetDeviceId() string` GetDeviceId returns the DeviceId field if non-nil, zero value otherwise. ### GetDeviceIdOk -`func (o *VerifyFactorSamlRequest) GetDeviceIdOk() (*string, bool)` +`func (o *SamlFactor) GetDeviceIdOk() (*string, bool)` GetDeviceIdOk returns a tuple with the DeviceId field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetDeviceId -`func (o *VerifyFactorSamlRequest) SetDeviceId(v string)` +`func (o *SamlFactor) SetDeviceId(v string)` SetDeviceId sets DeviceId field to given value. ### GetStateToken -`func (o *VerifyFactorSamlRequest) GetStateToken() string` +`func (o *SamlFactor) GetStateToken() string` GetStateToken returns the StateToken field if non-nil, zero value otherwise. ### GetStateTokenOk -`func (o *VerifyFactorSamlRequest) GetStateTokenOk() (*string, bool)` +`func (o *SamlFactor) GetStateTokenOk() (*string, bool)` GetStateTokenOk returns a tuple with the StateToken field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetStateToken -`func (o *VerifyFactorSamlRequest) SetStateToken(v string)` +`func (o *SamlFactor) SetStateToken(v string)` SetStateToken sets StateToken field to given value. ### GetOtpToken -`func (o *VerifyFactorSamlRequest) GetOtpToken() string` +`func (o *SamlFactor) GetOtpToken() string` GetOtpToken returns the OtpToken field if non-nil, zero value otherwise. ### GetOtpTokenOk -`func (o *VerifyFactorSamlRequest) GetOtpTokenOk() (*string, bool)` +`func (o *SamlFactor) GetOtpTokenOk() (*string, bool)` GetOtpTokenOk returns a tuple with the OtpToken field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetOtpToken -`func (o *VerifyFactorSamlRequest) SetOtpToken(v string)` +`func (o *SamlFactor) SetOtpToken(v string)` SetOtpToken sets OtpToken field to given value. ### HasOtpToken -`func (o *VerifyFactorSamlRequest) HasOtpToken() bool` +`func (o *SamlFactor) HasOtpToken() bool` HasOtpToken returns a boolean if a field has been set. ### GetDoNotNotify -`func (o *VerifyFactorSamlRequest) GetDoNotNotify() bool` +`func (o *SamlFactor) GetDoNotNotify() bool` GetDoNotNotify returns the DoNotNotify field if non-nil, zero value otherwise. ### GetDoNotNotifyOk -`func (o *VerifyFactorSamlRequest) GetDoNotNotifyOk() (*bool, bool)` +`func (o *SamlFactor) GetDoNotNotifyOk() (*bool, bool)` GetDoNotNotifyOk returns a tuple with the DoNotNotify field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetDoNotNotify -`func (o *VerifyFactorSamlRequest) SetDoNotNotify(v bool)` +`func (o *SamlFactor) SetDoNotNotify(v bool)` SetDoNotNotify sets DoNotNotify field to given value. ### HasDoNotNotify -`func (o *VerifyFactorSamlRequest) HasDoNotNotify() bool` +`func (o *SamlFactor) HasDoNotNotify() bool` HasDoNotNotify returns a boolean if a field has been set. diff --git a/docs/Schema1.md b/docs/Schema1.md deleted file mode 100644 index ec2766b..0000000 --- a/docs/Schema1.md +++ /dev/null @@ -1,186 +0,0 @@ -# Schema1 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | Pointer to **int32** | | [optional] -**Name** | Pointer to **string** | | [optional] -**Username** | Pointer to **string** | | [optional] -**AddedBy** | Pointer to [**Schema1AddedBy**](Schema1AddedBy.md) | | [optional] -**AddedAt** | Pointer to **string** | | [optional] -**Assigned** | Pointer to **bool** | Indicates if assigned to role or not. Defaults to true. | [optional] - -## Methods - -### NewSchema1 - -`func NewSchema1() *Schema1` - -NewSchema1 instantiates a new Schema1 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 - -### NewSchema1WithDefaults - -`func NewSchema1WithDefaults() *Schema1` - -NewSchema1WithDefaults instantiates a new Schema1 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 - -### GetId - -`func (o *Schema1) GetId() int32` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *Schema1) GetIdOk() (*int32, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *Schema1) SetId(v int32)` - -SetId sets Id field to given value. - -### HasId - -`func (o *Schema1) HasId() bool` - -HasId returns a boolean if a field has been set. - -### GetName - -`func (o *Schema1) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *Schema1) 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 *Schema1) SetName(v string)` - -SetName sets Name field to given value. - -### HasName - -`func (o *Schema1) HasName() bool` - -HasName returns a boolean if a field has been set. - -### GetUsername - -`func (o *Schema1) GetUsername() string` - -GetUsername returns the Username field if non-nil, zero value otherwise. - -### GetUsernameOk - -`func (o *Schema1) 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 *Schema1) SetUsername(v string)` - -SetUsername sets Username field to given value. - -### HasUsername - -`func (o *Schema1) HasUsername() bool` - -HasUsername returns a boolean if a field has been set. - -### GetAddedBy - -`func (o *Schema1) GetAddedBy() Schema1AddedBy` - -GetAddedBy returns the AddedBy field if non-nil, zero value otherwise. - -### GetAddedByOk - -`func (o *Schema1) GetAddedByOk() (*Schema1AddedBy, bool)` - -GetAddedByOk returns a tuple with the AddedBy field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAddedBy - -`func (o *Schema1) SetAddedBy(v Schema1AddedBy)` - -SetAddedBy sets AddedBy field to given value. - -### HasAddedBy - -`func (o *Schema1) HasAddedBy() bool` - -HasAddedBy returns a boolean if a field has been set. - -### GetAddedAt - -`func (o *Schema1) GetAddedAt() string` - -GetAddedAt returns the AddedAt field if non-nil, zero value otherwise. - -### GetAddedAtOk - -`func (o *Schema1) GetAddedAtOk() (*string, bool)` - -GetAddedAtOk returns a tuple with the AddedAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAddedAt - -`func (o *Schema1) SetAddedAt(v string)` - -SetAddedAt sets AddedAt field to given value. - -### HasAddedAt - -`func (o *Schema1) HasAddedAt() bool` - -HasAddedAt returns a boolean if a field has been set. - -### GetAssigned - -`func (o *Schema1) GetAssigned() bool` - -GetAssigned returns the Assigned field if non-nil, zero value otherwise. - -### GetAssignedOk - -`func (o *Schema1) GetAssignedOk() (*bool, bool)` - -GetAssignedOk returns a tuple with the Assigned field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAssigned - -`func (o *Schema1) SetAssigned(v bool)` - -SetAssigned sets Assigned field to given value. - -### HasAssigned - -`func (o *Schema1) HasAssigned() bool` - -HasAssigned 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/AddScopeRequest.md b/docs/Scope.md similarity index 54% rename from docs/AddScopeRequest.md rename to docs/Scope.md index 183b9d7..0b9bd90 100644 --- a/docs/AddScopeRequest.md +++ b/docs/Scope.md @@ -1,78 +1,104 @@ -# AddScopeRequest +# Scope ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Value** | Pointer to **string** | | [optional] -**Description** | Pointer to **string** | | [optional] +**Id** | Pointer to **int32** | Unique Scope ID value | [optional] +**Value** | Pointer to **string** | Scope Value | [optional] +**Description** | Pointer to **string** | Description of the scope | [optional] ## Methods -### NewAddScopeRequest +### NewScope -`func NewAddScopeRequest() *AddScopeRequest` +`func NewScope() *Scope` -NewAddScopeRequest instantiates a new AddScopeRequest object +NewScope instantiates a new Scope 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 -### NewAddScopeRequestWithDefaults +### NewScopeWithDefaults -`func NewAddScopeRequestWithDefaults() *AddScopeRequest` +`func NewScopeWithDefaults() *Scope` -NewAddScopeRequestWithDefaults instantiates a new AddScopeRequest object +NewScopeWithDefaults instantiates a new Scope 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 +### GetId + +`func (o *Scope) GetId() int32` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Scope) GetIdOk() (*int32, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Scope) SetId(v int32)` + +SetId sets Id field to given value. + +### HasId + +`func (o *Scope) HasId() bool` + +HasId returns a boolean if a field has been set. + ### GetValue -`func (o *AddScopeRequest) GetValue() string` +`func (o *Scope) GetValue() string` GetValue returns the Value field if non-nil, zero value otherwise. ### GetValueOk -`func (o *AddScopeRequest) GetValueOk() (*string, bool)` +`func (o *Scope) GetValueOk() (*string, bool)` GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetValue -`func (o *AddScopeRequest) SetValue(v string)` +`func (o *Scope) SetValue(v string)` SetValue sets Value field to given value. ### HasValue -`func (o *AddScopeRequest) HasValue() bool` +`func (o *Scope) HasValue() bool` HasValue returns a boolean if a field has been set. ### GetDescription -`func (o *AddScopeRequest) GetDescription() string` +`func (o *Scope) GetDescription() string` GetDescription returns the Description field if non-nil, zero value otherwise. ### GetDescriptionOk -`func (o *AddScopeRequest) GetDescriptionOk() (*string, bool)` +`func (o *Scope) GetDescriptionOk() (*string, bool)` GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetDescription -`func (o *AddScopeRequest) SetDescription(v string)` +`func (o *Scope) SetDescription(v string)` SetDescription sets Description field to given value. ### HasDescription -`func (o *AddScopeRequest) HasDescription() bool` +`func (o *Scope) HasDescription() bool` HasDescription returns a boolean if a field has been set. diff --git a/docs/GenerateToken400Response.md b/docs/SendInviteLink200Response.md similarity index 59% rename from docs/GenerateToken400Response.md rename to docs/SendInviteLink200Response.md index f75264f..040de9f 100644 --- a/docs/GenerateToken400Response.md +++ b/docs/SendInviteLink200Response.md @@ -1,52 +1,52 @@ -# GenerateToken400Response +# SendInviteLink200Response ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Status** | Pointer to [**Status**](Status.md) | | [optional] +**Status** | Pointer to [**Error**](Error.md) | | [optional] ## Methods -### NewGenerateToken400Response +### NewSendInviteLink200Response -`func NewGenerateToken400Response() *GenerateToken400Response` +`func NewSendInviteLink200Response() *SendInviteLink200Response` -NewGenerateToken400Response instantiates a new GenerateToken400Response object +NewSendInviteLink200Response instantiates a new SendInviteLink200Response 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 -### NewGenerateToken400ResponseWithDefaults +### NewSendInviteLink200ResponseWithDefaults -`func NewGenerateToken400ResponseWithDefaults() *GenerateToken400Response` +`func NewSendInviteLink200ResponseWithDefaults() *SendInviteLink200Response` -NewGenerateToken400ResponseWithDefaults instantiates a new GenerateToken400Response object +NewSendInviteLink200ResponseWithDefaults instantiates a new SendInviteLink200Response 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 ### GetStatus -`func (o *GenerateToken400Response) GetStatus() Status` +`func (o *SendInviteLink200Response) GetStatus() Error` GetStatus returns the Status field if non-nil, zero value otherwise. ### GetStatusOk -`func (o *GenerateToken400Response) GetStatusOk() (*Status, bool)` +`func (o *SendInviteLink200Response) GetStatusOk() (*Error, bool)` GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetStatus -`func (o *GenerateToken400Response) SetStatus(v Status)` +`func (o *SendInviteLink200Response) SetStatus(v Error)` SetStatus sets Status field to given value. ### HasStatus -`func (o *GenerateToken400Response) HasStatus() bool` +`func (o *SendInviteLink200Response) HasStatus() bool` HasStatus returns a boolean if a field has been set. diff --git a/docs/SendInviteLinkRequest.md b/docs/SendInviteLinkRequest.md new file mode 100644 index 0000000..0c4762e --- /dev/null +++ b/docs/SendInviteLinkRequest.md @@ -0,0 +1,82 @@ +# SendInviteLinkRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | Pointer to **string** | Set to the user email address to generate an invite link. The value is case sensitive. | [optional] +**PersonalEmail** | Pointer to **string** | To send an invite email to a different address than the one provided in email, provide it here. The invite link is sent to this address instead. | [optional] + +## Methods + +### NewSendInviteLinkRequest + +`func NewSendInviteLinkRequest() *SendInviteLinkRequest` + +NewSendInviteLinkRequest instantiates a new SendInviteLinkRequest 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 + +### NewSendInviteLinkRequestWithDefaults + +`func NewSendInviteLinkRequestWithDefaults() *SendInviteLinkRequest` + +NewSendInviteLinkRequestWithDefaults instantiates a new SendInviteLinkRequest 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 + +### GetEmail + +`func (o *SendInviteLinkRequest) GetEmail() string` + +GetEmail returns the Email field if non-nil, zero value otherwise. + +### GetEmailOk + +`func (o *SendInviteLinkRequest) 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 *SendInviteLinkRequest) SetEmail(v string)` + +SetEmail sets Email field to given value. + +### HasEmail + +`func (o *SendInviteLinkRequest) HasEmail() bool` + +HasEmail returns a boolean if a field has been set. + +### GetPersonalEmail + +`func (o *SendInviteLinkRequest) GetPersonalEmail() string` + +GetPersonalEmail returns the PersonalEmail field if non-nil, zero value otherwise. + +### GetPersonalEmailOk + +`func (o *SendInviteLinkRequest) GetPersonalEmailOk() (*string, bool)` + +GetPersonalEmailOk returns a tuple with the PersonalEmail field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPersonalEmail + +`func (o *SendInviteLinkRequest) SetPersonalEmail(v string)` + +SetPersonalEmail sets PersonalEmail field to given value. + +### HasPersonalEmail + +`func (o *SendInviteLinkRequest) HasPersonalEmail() bool` + +HasPersonalEmail 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/SetRoleApps200ResponseInner.md b/docs/SetRoleApps200ResponseInner.md deleted file mode 100644 index 27d92ff..0000000 --- a/docs/SetRoleApps200ResponseInner.md +++ /dev/null @@ -1,56 +0,0 @@ -# SetRoleApps200ResponseInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | Pointer to **int32** | Apps unique ID in OneLogin. | [optional] - -## Methods - -### NewSetRoleApps200ResponseInner - -`func NewSetRoleApps200ResponseInner() *SetRoleApps200ResponseInner` - -NewSetRoleApps200ResponseInner instantiates a new SetRoleApps200ResponseInner 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 - -### NewSetRoleApps200ResponseInnerWithDefaults - -`func NewSetRoleApps200ResponseInnerWithDefaults() *SetRoleApps200ResponseInner` - -NewSetRoleApps200ResponseInnerWithDefaults instantiates a new SetRoleApps200ResponseInner 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 - -### GetId - -`func (o *SetRoleApps200ResponseInner) GetId() int32` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *SetRoleApps200ResponseInner) GetIdOk() (*int32, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *SetRoleApps200ResponseInner) SetId(v int32)` - -SetId sets Id field to given value. - -### HasId - -`func (o *SetRoleApps200ResponseInner) HasId() bool` - -HasId 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/SetUserStateRequest.md b/docs/SetUserStateRequest.md new file mode 100644 index 0000000..957480d --- /dev/null +++ b/docs/SetUserStateRequest.md @@ -0,0 +1,51 @@ +# SetUserStateRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | **int32** | Set to the state value. Valid values include: - 0 : Unapproved - 1 : Approved - 2 : Rejected - 3 : Unlicensed | + +## Methods + +### NewSetUserStateRequest + +`func NewSetUserStateRequest(state int32, ) *SetUserStateRequest` + +NewSetUserStateRequest instantiates a new SetUserStateRequest 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 + +### NewSetUserStateRequestWithDefaults + +`func NewSetUserStateRequestWithDefaults() *SetUserStateRequest` + +NewSetUserStateRequestWithDefaults instantiates a new SetUserStateRequest 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 + +### GetState + +`func (o *SetUserStateRequest) GetState() int32` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *SetUserStateRequest) GetStateOk() (*int32, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *SetUserStateRequest) SetState(v int32)` + +SetState sets State 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/SmartHooksApi.md b/docs/SmartHooksApi.md new file mode 100644 index 0000000..a631499 --- /dev/null +++ b/docs/SmartHooksApi.md @@ -0,0 +1,791 @@ +# \SmartHooksApi + +All URIs are relative to *https://your-api-subdomain.onelogin.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateEnvironmentVariable**](SmartHooksApi.md#CreateEnvironmentVariable) | **Post** /api/2/hooks/envs | Create Environment Variable +[**CreateHook**](SmartHooksApi.md#CreateHook) | **Post** /api/2/hooks | Create Smart Hook +[**DeleteEnvironmentVariable**](SmartHooksApi.md#DeleteEnvironmentVariable) | **Delete** /api/2/hooks/envs/{envvar_id} | Delete Environment Variable +[**DeleteHook**](SmartHooksApi.md#DeleteHook) | **Delete** /api/2/hooks/{hook_id} | Delete Smart Hook by ID +[**GetEnvironmentVariable**](SmartHooksApi.md#GetEnvironmentVariable) | **Get** /api/2/hooks/envs/{envvar_id} | Get Environment Variable +[**GetHook**](SmartHooksApi.md#GetHook) | **Get** /api/2/hooks/{hook_id} | Get Smart Hook by ID +[**GetLogs**](SmartHooksApi.md#GetLogs) | **Get** /api/2/hooks/{hook_id}/logs | Get Smart Hook Logs +[**ListEnvironmentVariables**](SmartHooksApi.md#ListEnvironmentVariables) | **Get** /api/2/hooks/envs | List Environment Variables +[**ListHooks**](SmartHooksApi.md#ListHooks) | **Get** /api/2/hooks | List all Smart Hooks +[**UpdateEnvironmentVariable**](SmartHooksApi.md#UpdateEnvironmentVariable) | **Put** /api/2/hooks/envs/{envvar_id} | Update Environment Variable +[**UpdateHook**](SmartHooksApi.md#UpdateHook) | **Put** /api/2/hooks/{hook_id} | Update Smart Hook by ID + + + +## CreateEnvironmentVariable + +> HookEnvvar CreateEnvironmentVariable(ctx).HookEnvvar(hookEnvvar).Execute() + +Create Environment Variable + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + hookEnvvar := *openapiclient.NewHookEnvvar("Name_example", "Value_example") // HookEnvvar | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SmartHooksApi.CreateEnvironmentVariable(context.Background()).HookEnvvar(hookEnvvar).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SmartHooksApi.CreateEnvironmentVariable``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateEnvironmentVariable`: HookEnvvar + fmt.Fprintf(os.Stdout, "Response from `SmartHooksApi.CreateEnvironmentVariable`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateEnvironmentVariableRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **hookEnvvar** | [**HookEnvvar**](HookEnvvar.md) | | + +### Return type + +[**HookEnvvar**](HookEnvvar.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateHook + +> Hook CreateHook(ctx).Hook(hook).Execute() + +Create Smart Hook + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + hook := *openapiclient.NewHook("Type_example", false, int32(123), []string{"EnvVars_example"}, "Runtime_example", int32(123), map[string]string{"key": "Inner_example"}, "Function_example") // Hook | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SmartHooksApi.CreateHook(context.Background()).Hook(hook).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SmartHooksApi.CreateHook``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateHook`: Hook + fmt.Fprintf(os.Stdout, "Response from `SmartHooksApi.CreateHook`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateHookRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **hook** | [**Hook**](Hook.md) | | + +### Return type + +[**Hook**](Hook.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteEnvironmentVariable + +> DeleteEnvironmentVariable(ctx, envvarId).Execute() + +Delete Environment Variable + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + envvarId := "envvarId_example" // string | Set to the id of the Hook Environment Variable that you want to fetch. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SmartHooksApi.DeleteEnvironmentVariable(context.Background(), envvarId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SmartHooksApi.DeleteEnvironmentVariable``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**envvarId** | **string** | Set to the id of the Hook Environment Variable that you want to fetch. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteEnvironmentVariableRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + + (empty response body) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteHook + +> DeleteHook(ctx, hookId).Execute() + +Delete Smart Hook by ID + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + hookId := "hookId_example" // string | Set to the id of the Hook that you want to return. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SmartHooksApi.DeleteHook(context.Background(), hookId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SmartHooksApi.DeleteHook``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**hookId** | **string** | Set to the id of the Hook that you want to return. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteHookRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + + (empty response body) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetEnvironmentVariable + +> HookEnvvar GetEnvironmentVariable(ctx, envvarId).Execute() + +Get Environment Variable + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + envvarId := "envvarId_example" // string | Set to the id of the Hook Environment Variable that you want to fetch. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SmartHooksApi.GetEnvironmentVariable(context.Background(), envvarId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SmartHooksApi.GetEnvironmentVariable``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetEnvironmentVariable`: HookEnvvar + fmt.Fprintf(os.Stdout, "Response from `SmartHooksApi.GetEnvironmentVariable`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**envvarId** | **string** | Set to the id of the Hook Environment Variable that you want to fetch. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetEnvironmentVariableRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**HookEnvvar**](HookEnvvar.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetHook + +> Hook GetHook(ctx, hookId).Execute() + +Get Smart Hook by ID + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + hookId := "hookId_example" // string | Set to the id of the Hook that you want to return. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SmartHooksApi.GetHook(context.Background(), hookId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SmartHooksApi.GetHook``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetHook`: Hook + fmt.Fprintf(os.Stdout, "Response from `SmartHooksApi.GetHook`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**hookId** | **string** | Set to the id of the Hook that you want to return. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetHookRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**Hook**](Hook.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetLogs + +> []HookLog GetLogs(ctx, hookId).Limit(limit).Page(page).Cursor(cursor).RequestId(requestId).CorrelationId(correlationId).Execute() + +Get Smart Hook Logs + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + hookId := "hookId_example" // string | Set to the id of the Hook that you want to return. + limit := int32(56) // int32 | How many items to return at one time (max 100) (optional) + page := int32(56) // int32 | The page number of results to return. (optional) + cursor := "cursor_example" // string | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. (optional) + requestId := "requestId_example" // string | Returns logs that contain this request_id. (optional) + correlationId := "correlationId_example" // string | Returns logs that contain this correlation_id. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SmartHooksApi.GetLogs(context.Background(), hookId).Limit(limit).Page(page).Cursor(cursor).RequestId(requestId).CorrelationId(correlationId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SmartHooksApi.GetLogs``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetLogs`: []HookLog + fmt.Fprintf(os.Stdout, "Response from `SmartHooksApi.GetLogs`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**hookId** | **string** | Set to the id of the Hook that you want to return. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetLogsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **limit** | **int32** | How many items to return at one time (max 100) | + **page** | **int32** | The page number of results to return. | + **cursor** | **string** | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. | + **requestId** | **string** | Returns logs that contain this request_id. | + **correlationId** | **string** | Returns logs that contain this correlation_id. | + +### Return type + +[**[]HookLog**](HookLog.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListEnvironmentVariables + +> []HookEnvvar ListEnvironmentVariables(ctx).Limit(limit).Page(page).Cursor(cursor).Execute() + +List Environment Variables + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + limit := int32(56) // int32 | How many items to return at one time (max 100) (optional) + page := int32(56) // int32 | The page number of results to return. (optional) + cursor := "cursor_example" // string | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SmartHooksApi.ListEnvironmentVariables(context.Background()).Limit(limit).Page(page).Cursor(cursor).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SmartHooksApi.ListEnvironmentVariables``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListEnvironmentVariables`: []HookEnvvar + fmt.Fprintf(os.Stdout, "Response from `SmartHooksApi.ListEnvironmentVariables`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListEnvironmentVariablesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **int32** | How many items to return at one time (max 100) | + **page** | **int32** | The page number of results to return. | + **cursor** | **string** | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. | + +### Return type + +[**[]HookEnvvar**](HookEnvvar.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListHooks + +> []Hook ListHooks(ctx).Limit(limit).Page(page).Cursor(cursor).Execute() + +List all Smart Hooks + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + limit := int32(56) // int32 | How many items to return at one time (max 100) (optional) + page := int32(56) // int32 | The page number of results to return. (optional) + cursor := "cursor_example" // string | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SmartHooksApi.ListHooks(context.Background()).Limit(limit).Page(page).Cursor(cursor).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SmartHooksApi.ListHooks``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListHooks`: []Hook + fmt.Fprintf(os.Stdout, "Response from `SmartHooksApi.ListHooks`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListHooksRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **int32** | How many items to return at one time (max 100) | + **page** | **int32** | The page number of results to return. | + **cursor** | **string** | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. | + +### Return type + +[**[]Hook**](Hook.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateEnvironmentVariable + +> HookEnvvar UpdateEnvironmentVariable(ctx, envvarId).UpdateEnvironmentVariableRequest(updateEnvironmentVariableRequest).Execute() + +Update Environment Variable + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + envvarId := "envvarId_example" // string | Set to the id of the Hook Environment Variable that you want to fetch. + updateEnvironmentVariableRequest := *openapiclient.NewUpdateEnvironmentVariableRequest("Value_example") // UpdateEnvironmentVariableRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SmartHooksApi.UpdateEnvironmentVariable(context.Background(), envvarId).UpdateEnvironmentVariableRequest(updateEnvironmentVariableRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SmartHooksApi.UpdateEnvironmentVariable``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateEnvironmentVariable`: HookEnvvar + fmt.Fprintf(os.Stdout, "Response from `SmartHooksApi.UpdateEnvironmentVariable`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**envvarId** | **string** | Set to the id of the Hook Environment Variable that you want to fetch. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateEnvironmentVariableRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **updateEnvironmentVariableRequest** | [**UpdateEnvironmentVariableRequest**](UpdateEnvironmentVariableRequest.md) | | + +### Return type + +[**HookEnvvar**](HookEnvvar.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateHook + +> Hook UpdateHook(ctx, hookId).Hook(hook).Execute() + +Update Smart Hook by ID + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + hookId := "hookId_example" // string | Set to the id of the Hook that you want to return. + hook := *openapiclient.NewHook("Type_example", false, int32(123), []string{"EnvVars_example"}, "Runtime_example", int32(123), map[string]string{"key": "Inner_example"}, "Function_example") // Hook | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SmartHooksApi.UpdateHook(context.Background(), hookId).Hook(hook).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SmartHooksApi.UpdateHook``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateHook`: Hook + fmt.Fprintf(os.Stdout, "Response from `SmartHooksApi.UpdateHook`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**hookId** | **string** | Set to the id of the Hook that you want to return. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateHookRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **hook** | [**Hook**](Hook.md) | | + +### Return type + +[**Hook**](Hook.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/docs/Source.md b/docs/Source.md index 79f2b46..86185fe 100644 --- a/docs/Source.md +++ b/docs/Source.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | Pointer to **string** | | [optional] +**Id** | Pointer to **string** | A unique id that represents the source of the event. | [optional] **Name** | Pointer to **string** | The name of the source | [optional] ## Methods diff --git a/docs/SsoOidc.md b/docs/SsoOidc.md new file mode 100644 index 0000000..0b424df --- /dev/null +++ b/docs/SsoOidc.md @@ -0,0 +1,56 @@ +# SsoOidc + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ClientId** | Pointer to **string** | OIDC: The OpenId Connect Client Id. Note that client_secret is only returned after Creating an App | [optional] + +## Methods + +### NewSsoOidc + +`func NewSsoOidc() *SsoOidc` + +NewSsoOidc instantiates a new SsoOidc 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 + +### NewSsoOidcWithDefaults + +`func NewSsoOidcWithDefaults() *SsoOidc` + +NewSsoOidcWithDefaults instantiates a new SsoOidc 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 + +### GetClientId + +`func (o *SsoOidc) GetClientId() string` + +GetClientId returns the ClientId field if non-nil, zero value otherwise. + +### GetClientIdOk + +`func (o *SsoOidc) GetClientIdOk() (*string, bool)` + +GetClientIdOk returns a tuple with the ClientId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetClientId + +`func (o *SsoOidc) SetClientId(v string)` + +SetClientId sets ClientId field to given value. + +### HasClientId + +`func (o *SsoOidc) HasClientId() bool` + +HasClientId 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/SsoSaml.md b/docs/SsoSaml.md new file mode 100644 index 0000000..c9887d8 --- /dev/null +++ b/docs/SsoSaml.md @@ -0,0 +1,160 @@ +# SsoSaml + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**MetadataUrl** | Pointer to **string** | | [optional] +**AcsUrl** | Pointer to **string** | | [optional] +**SlsUrl** | Pointer to **string** | | [optional] +**Issuer** | Pointer to **string** | | [optional] +**Certificate** | Pointer to [**SsoSamlCertificate**](SsoSamlCertificate.md) | | [optional] + +## Methods + +### NewSsoSaml + +`func NewSsoSaml() *SsoSaml` + +NewSsoSaml instantiates a new SsoSaml 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 + +### NewSsoSamlWithDefaults + +`func NewSsoSamlWithDefaults() *SsoSaml` + +NewSsoSamlWithDefaults instantiates a new SsoSaml 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 + +### GetMetadataUrl + +`func (o *SsoSaml) GetMetadataUrl() string` + +GetMetadataUrl returns the MetadataUrl field if non-nil, zero value otherwise. + +### GetMetadataUrlOk + +`func (o *SsoSaml) GetMetadataUrlOk() (*string, bool)` + +GetMetadataUrlOk returns a tuple with the MetadataUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMetadataUrl + +`func (o *SsoSaml) SetMetadataUrl(v string)` + +SetMetadataUrl sets MetadataUrl field to given value. + +### HasMetadataUrl + +`func (o *SsoSaml) HasMetadataUrl() bool` + +HasMetadataUrl returns a boolean if a field has been set. + +### GetAcsUrl + +`func (o *SsoSaml) GetAcsUrl() string` + +GetAcsUrl returns the AcsUrl field if non-nil, zero value otherwise. + +### GetAcsUrlOk + +`func (o *SsoSaml) GetAcsUrlOk() (*string, bool)` + +GetAcsUrlOk returns a tuple with the AcsUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAcsUrl + +`func (o *SsoSaml) SetAcsUrl(v string)` + +SetAcsUrl sets AcsUrl field to given value. + +### HasAcsUrl + +`func (o *SsoSaml) HasAcsUrl() bool` + +HasAcsUrl returns a boolean if a field has been set. + +### GetSlsUrl + +`func (o *SsoSaml) GetSlsUrl() string` + +GetSlsUrl returns the SlsUrl field if non-nil, zero value otherwise. + +### GetSlsUrlOk + +`func (o *SsoSaml) GetSlsUrlOk() (*string, bool)` + +GetSlsUrlOk returns a tuple with the SlsUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSlsUrl + +`func (o *SsoSaml) SetSlsUrl(v string)` + +SetSlsUrl sets SlsUrl field to given value. + +### HasSlsUrl + +`func (o *SsoSaml) HasSlsUrl() bool` + +HasSlsUrl returns a boolean if a field has been set. + +### GetIssuer + +`func (o *SsoSaml) GetIssuer() string` + +GetIssuer returns the Issuer field if non-nil, zero value otherwise. + +### GetIssuerOk + +`func (o *SsoSaml) 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 *SsoSaml) SetIssuer(v string)` + +SetIssuer sets Issuer field to given value. + +### HasIssuer + +`func (o *SsoSaml) HasIssuer() bool` + +HasIssuer returns a boolean if a field has been set. + +### GetCertificate + +`func (o *SsoSaml) GetCertificate() SsoSamlCertificate` + +GetCertificate returns the Certificate field if non-nil, zero value otherwise. + +### GetCertificateOk + +`func (o *SsoSaml) GetCertificateOk() (*SsoSamlCertificate, bool)` + +GetCertificateOk returns a tuple with the Certificate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCertificate + +`func (o *SsoSaml) SetCertificate(v SsoSamlCertificate)` + +SetCertificate sets Certificate field to given value. + +### HasCertificate + +`func (o *SsoSaml) HasCertificate() bool` + +HasCertificate 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/SsoSamlCertificate.md b/docs/SsoSamlCertificate.md new file mode 100644 index 0000000..9536cca --- /dev/null +++ b/docs/SsoSamlCertificate.md @@ -0,0 +1,108 @@ +# SsoSamlCertificate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **int32** | SAML Certificate ID | [optional] +**Name** | Pointer to **string** | SAML Certificate Name | [optional] +**Value** | Pointer to **string** | SAML Certificate Value | [optional] + +## Methods + +### NewSsoSamlCertificate + +`func NewSsoSamlCertificate() *SsoSamlCertificate` + +NewSsoSamlCertificate instantiates a new SsoSamlCertificate 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 + +### NewSsoSamlCertificateWithDefaults + +`func NewSsoSamlCertificateWithDefaults() *SsoSamlCertificate` + +NewSsoSamlCertificateWithDefaults instantiates a new SsoSamlCertificate 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 + +### GetId + +`func (o *SsoSamlCertificate) GetId() int32` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *SsoSamlCertificate) GetIdOk() (*int32, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *SsoSamlCertificate) SetId(v int32)` + +SetId sets Id field to given value. + +### HasId + +`func (o *SsoSamlCertificate) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetName + +`func (o *SsoSamlCertificate) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *SsoSamlCertificate) 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 *SsoSamlCertificate) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *SsoSamlCertificate) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetValue + +`func (o *SsoSamlCertificate) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *SsoSamlCertificate) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *SsoSamlCertificate) SetValue(v string)` + +SetValue sets Value field to given value. + +### HasValue + +`func (o *SsoSamlCertificate) HasValue() bool` + +HasValue 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/Status2.md b/docs/Status2.md deleted file mode 100644 index 4efc1ec..0000000 --- a/docs/Status2.md +++ /dev/null @@ -1,56 +0,0 @@ -# Status2 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Status** | Pointer to [**Status2Status**](Status2Status.md) | | [optional] - -## Methods - -### NewStatus2 - -`func NewStatus2() *Status2` - -NewStatus2 instantiates a new Status2 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 - -### NewStatus2WithDefaults - -`func NewStatus2WithDefaults() *Status2` - -NewStatus2WithDefaults instantiates a new Status2 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 - -### GetStatus - -`func (o *Status2) GetStatus() Status2Status` - -GetStatus returns the Status field if non-nil, zero value otherwise. - -### GetStatusOk - -`func (o *Status2) GetStatusOk() (*Status2Status, bool)` - -GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStatus - -`func (o *Status2) SetStatus(v Status2Status)` - -SetStatus sets Status field to given value. - -### HasStatus - -`func (o *Status2) HasStatus() bool` - -HasStatus 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/Status2Status.md b/docs/Status2Status.md deleted file mode 100644 index 70a60b8..0000000 --- a/docs/Status2Status.md +++ /dev/null @@ -1,134 +0,0 @@ -# Status2Status - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Type** | Pointer to **string** | | [optional] -**Code** | Pointer to **int32** | | [optional] -**Message** | Pointer to **string** | | [optional] -**Error** | Pointer to **bool** | | [optional] - -## Methods - -### NewStatus2Status - -`func NewStatus2Status() *Status2Status` - -NewStatus2Status instantiates a new Status2Status 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 - -### NewStatus2StatusWithDefaults - -`func NewStatus2StatusWithDefaults() *Status2Status` - -NewStatus2StatusWithDefaults instantiates a new Status2Status 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 - -### GetType - -`func (o *Status2Status) GetType() string` - -GetType returns the Type field if non-nil, zero value otherwise. - -### GetTypeOk - -`func (o *Status2Status) GetTypeOk() (*string, 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 *Status2Status) SetType(v string)` - -SetType sets Type field to given value. - -### HasType - -`func (o *Status2Status) HasType() bool` - -HasType returns a boolean if a field has been set. - -### GetCode - -`func (o *Status2Status) GetCode() int32` - -GetCode returns the Code field if non-nil, zero value otherwise. - -### GetCodeOk - -`func (o *Status2Status) GetCodeOk() (*int32, bool)` - -GetCodeOk returns a tuple with the Code field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCode - -`func (o *Status2Status) SetCode(v int32)` - -SetCode sets Code field to given value. - -### HasCode - -`func (o *Status2Status) HasCode() bool` - -HasCode returns a boolean if a field has been set. - -### GetMessage - -`func (o *Status2Status) GetMessage() string` - -GetMessage returns the Message field if non-nil, zero value otherwise. - -### GetMessageOk - -`func (o *Status2Status) GetMessageOk() (*string, bool)` - -GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMessage - -`func (o *Status2Status) SetMessage(v string)` - -SetMessage sets Message field to given value. - -### HasMessage - -`func (o *Status2Status) HasMessage() bool` - -HasMessage returns a boolean if a field has been set. - -### GetError - -`func (o *Status2Status) GetError() bool` - -GetError returns the Error field if non-nil, zero value otherwise. - -### GetErrorOk - -`func (o *Status2Status) GetErrorOk() (*bool, bool)` - -GetErrorOk returns a tuple with the Error field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetError - -`func (o *Status2Status) SetError(v bool)` - -SetError sets Error field to given value. - -### HasError - -`func (o *Status2Status) HasError() bool` - -HasError 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/TokenClaim.md b/docs/TokenClaim.md new file mode 100644 index 0000000..d84d072 --- /dev/null +++ b/docs/TokenClaim.md @@ -0,0 +1,264 @@ +# TokenClaim + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **int32** | The unique ID of the claim. | [optional] +**Label** | Pointer to **string** | The UI label for the claims. | [optional] +**UserAttributeMappings** | Pointer to **string** | A user attribute to map values from. | [optional] +**UserAttributeMacros** | Pointer to **string** | When `user_attribute_mappings` is set to `_macro_` this macro will be used to assign the claims value. | [optional] +**AttributeTransformations** | Pointer to **string** | The type of transformation to perform on multi valued attributes. | [optional] +**SkipIfBlank** | Pointer to **bool** | not used | [optional] +**Values** | Pointer to **[]string** | Relates to Rules/Entitlements. Not supported yet. | [optional] +**DefaultValues** | Pointer to **string** | Relates to Rules/Entitlements. Not supported yet. | [optional] +**ProvisionedEntitlements** | Pointer to **bool** | Relates to Rules/Entitlements. Not supported yet. | [optional] + +## Methods + +### NewTokenClaim + +`func NewTokenClaim() *TokenClaim` + +NewTokenClaim instantiates a new TokenClaim 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 + +### NewTokenClaimWithDefaults + +`func NewTokenClaimWithDefaults() *TokenClaim` + +NewTokenClaimWithDefaults instantiates a new TokenClaim 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 + +### GetId + +`func (o *TokenClaim) GetId() int32` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *TokenClaim) GetIdOk() (*int32, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *TokenClaim) SetId(v int32)` + +SetId sets Id field to given value. + +### HasId + +`func (o *TokenClaim) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetLabel + +`func (o *TokenClaim) GetLabel() string` + +GetLabel returns the Label field if non-nil, zero value otherwise. + +### GetLabelOk + +`func (o *TokenClaim) GetLabelOk() (*string, bool)` + +GetLabelOk returns a tuple with the Label field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLabel + +`func (o *TokenClaim) SetLabel(v string)` + +SetLabel sets Label field to given value. + +### HasLabel + +`func (o *TokenClaim) HasLabel() bool` + +HasLabel returns a boolean if a field has been set. + +### GetUserAttributeMappings + +`func (o *TokenClaim) GetUserAttributeMappings() string` + +GetUserAttributeMappings returns the UserAttributeMappings field if non-nil, zero value otherwise. + +### GetUserAttributeMappingsOk + +`func (o *TokenClaim) GetUserAttributeMappingsOk() (*string, bool)` + +GetUserAttributeMappingsOk returns a tuple with the UserAttributeMappings field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUserAttributeMappings + +`func (o *TokenClaim) SetUserAttributeMappings(v string)` + +SetUserAttributeMappings sets UserAttributeMappings field to given value. + +### HasUserAttributeMappings + +`func (o *TokenClaim) HasUserAttributeMappings() bool` + +HasUserAttributeMappings returns a boolean if a field has been set. + +### GetUserAttributeMacros + +`func (o *TokenClaim) GetUserAttributeMacros() string` + +GetUserAttributeMacros returns the UserAttributeMacros field if non-nil, zero value otherwise. + +### GetUserAttributeMacrosOk + +`func (o *TokenClaim) GetUserAttributeMacrosOk() (*string, bool)` + +GetUserAttributeMacrosOk returns a tuple with the UserAttributeMacros field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUserAttributeMacros + +`func (o *TokenClaim) SetUserAttributeMacros(v string)` + +SetUserAttributeMacros sets UserAttributeMacros field to given value. + +### HasUserAttributeMacros + +`func (o *TokenClaim) HasUserAttributeMacros() bool` + +HasUserAttributeMacros returns a boolean if a field has been set. + +### GetAttributeTransformations + +`func (o *TokenClaim) GetAttributeTransformations() string` + +GetAttributeTransformations returns the AttributeTransformations field if non-nil, zero value otherwise. + +### GetAttributeTransformationsOk + +`func (o *TokenClaim) GetAttributeTransformationsOk() (*string, bool)` + +GetAttributeTransformationsOk returns a tuple with the AttributeTransformations field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAttributeTransformations + +`func (o *TokenClaim) SetAttributeTransformations(v string)` + +SetAttributeTransformations sets AttributeTransformations field to given value. + +### HasAttributeTransformations + +`func (o *TokenClaim) HasAttributeTransformations() bool` + +HasAttributeTransformations returns a boolean if a field has been set. + +### GetSkipIfBlank + +`func (o *TokenClaim) GetSkipIfBlank() bool` + +GetSkipIfBlank returns the SkipIfBlank field if non-nil, zero value otherwise. + +### GetSkipIfBlankOk + +`func (o *TokenClaim) GetSkipIfBlankOk() (*bool, bool)` + +GetSkipIfBlankOk returns a tuple with the SkipIfBlank field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSkipIfBlank + +`func (o *TokenClaim) SetSkipIfBlank(v bool)` + +SetSkipIfBlank sets SkipIfBlank field to given value. + +### HasSkipIfBlank + +`func (o *TokenClaim) HasSkipIfBlank() bool` + +HasSkipIfBlank returns a boolean if a field has been set. + +### GetValues + +`func (o *TokenClaim) GetValues() []string` + +GetValues returns the Values field if non-nil, zero value otherwise. + +### GetValuesOk + +`func (o *TokenClaim) GetValuesOk() (*[]string, bool)` + +GetValuesOk returns a tuple with the Values field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValues + +`func (o *TokenClaim) SetValues(v []string)` + +SetValues sets Values field to given value. + +### HasValues + +`func (o *TokenClaim) HasValues() bool` + +HasValues returns a boolean if a field has been set. + +### GetDefaultValues + +`func (o *TokenClaim) GetDefaultValues() string` + +GetDefaultValues returns the DefaultValues field if non-nil, zero value otherwise. + +### GetDefaultValuesOk + +`func (o *TokenClaim) GetDefaultValuesOk() (*string, bool)` + +GetDefaultValuesOk returns a tuple with the DefaultValues field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDefaultValues + +`func (o *TokenClaim) SetDefaultValues(v string)` + +SetDefaultValues sets DefaultValues field to given value. + +### HasDefaultValues + +`func (o *TokenClaim) HasDefaultValues() bool` + +HasDefaultValues returns a boolean if a field has been set. + +### GetProvisionedEntitlements + +`func (o *TokenClaim) GetProvisionedEntitlements() bool` + +GetProvisionedEntitlements returns the ProvisionedEntitlements field if non-nil, zero value otherwise. + +### GetProvisionedEntitlementsOk + +`func (o *TokenClaim) GetProvisionedEntitlementsOk() (*bool, bool)` + +GetProvisionedEntitlementsOk returns a tuple with the ProvisionedEntitlements field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProvisionedEntitlements + +`func (o *TokenClaim) SetProvisionedEntitlements(v bool)` + +SetProvisionedEntitlements sets ProvisionedEntitlements field to given value. + +### HasProvisionedEntitlements + +`func (o *TokenClaim) HasProvisionedEntitlements() bool` + +HasProvisionedEntitlements 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/TrackEventRequest.md b/docs/TrackRiskEventRequest.md similarity index 66% rename from docs/TrackEventRequest.md rename to docs/TrackRiskEventRequest.md index d8d99aa..81e9dad 100644 --- a/docs/TrackEventRequest.md +++ b/docs/TrackRiskEventRequest.md @@ -1,4 +1,4 @@ -# TrackEventRequest +# TrackRiskEventRequest ## Properties @@ -16,225 +16,225 @@ Name | Type | Description | Notes ## Methods -### NewTrackEventRequest +### NewTrackRiskEventRequest -`func NewTrackEventRequest(verb string, ip string, userAgent string, user RiskUser, ) *TrackEventRequest` +`func NewTrackRiskEventRequest(verb string, ip string, userAgent string, user RiskUser, ) *TrackRiskEventRequest` -NewTrackEventRequest instantiates a new TrackEventRequest object +NewTrackRiskEventRequest instantiates a new TrackRiskEventRequest 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 -### NewTrackEventRequestWithDefaults +### NewTrackRiskEventRequestWithDefaults -`func NewTrackEventRequestWithDefaults() *TrackEventRequest` +`func NewTrackRiskEventRequestWithDefaults() *TrackRiskEventRequest` -NewTrackEventRequestWithDefaults instantiates a new TrackEventRequest object +NewTrackRiskEventRequestWithDefaults instantiates a new TrackRiskEventRequest 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 ### GetVerb -`func (o *TrackEventRequest) GetVerb() string` +`func (o *TrackRiskEventRequest) GetVerb() string` GetVerb returns the Verb field if non-nil, zero value otherwise. ### GetVerbOk -`func (o *TrackEventRequest) GetVerbOk() (*string, bool)` +`func (o *TrackRiskEventRequest) GetVerbOk() (*string, bool)` GetVerbOk returns a tuple with the Verb field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetVerb -`func (o *TrackEventRequest) SetVerb(v string)` +`func (o *TrackRiskEventRequest) SetVerb(v string)` SetVerb sets Verb field to given value. ### GetIp -`func (o *TrackEventRequest) GetIp() string` +`func (o *TrackRiskEventRequest) GetIp() string` GetIp returns the Ip field if non-nil, zero value otherwise. ### GetIpOk -`func (o *TrackEventRequest) GetIpOk() (*string, bool)` +`func (o *TrackRiskEventRequest) GetIpOk() (*string, bool)` GetIpOk returns a tuple with the Ip field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetIp -`func (o *TrackEventRequest) SetIp(v string)` +`func (o *TrackRiskEventRequest) SetIp(v string)` SetIp sets Ip field to given value. ### GetUserAgent -`func (o *TrackEventRequest) GetUserAgent() string` +`func (o *TrackRiskEventRequest) GetUserAgent() string` GetUserAgent returns the UserAgent field if non-nil, zero value otherwise. ### GetUserAgentOk -`func (o *TrackEventRequest) GetUserAgentOk() (*string, bool)` +`func (o *TrackRiskEventRequest) GetUserAgentOk() (*string, bool)` GetUserAgentOk returns a tuple with the UserAgent field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetUserAgent -`func (o *TrackEventRequest) SetUserAgent(v string)` +`func (o *TrackRiskEventRequest) SetUserAgent(v string)` SetUserAgent sets UserAgent field to given value. ### GetUser -`func (o *TrackEventRequest) GetUser() RiskUser` +`func (o *TrackRiskEventRequest) GetUser() RiskUser` GetUser returns the User field if non-nil, zero value otherwise. ### GetUserOk -`func (o *TrackEventRequest) GetUserOk() (*RiskUser, bool)` +`func (o *TrackRiskEventRequest) GetUserOk() (*RiskUser, bool)` GetUserOk returns a tuple with the User field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetUser -`func (o *TrackEventRequest) SetUser(v RiskUser)` +`func (o *TrackRiskEventRequest) SetUser(v RiskUser)` SetUser sets User field to given value. ### GetSource -`func (o *TrackEventRequest) GetSource() Source` +`func (o *TrackRiskEventRequest) GetSource() Source` GetSource returns the Source field if non-nil, zero value otherwise. ### GetSourceOk -`func (o *TrackEventRequest) GetSourceOk() (*Source, bool)` +`func (o *TrackRiskEventRequest) 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 *TrackEventRequest) SetSource(v Source)` +`func (o *TrackRiskEventRequest) SetSource(v Source)` SetSource sets Source field to given value. ### HasSource -`func (o *TrackEventRequest) HasSource() bool` +`func (o *TrackRiskEventRequest) HasSource() bool` HasSource returns a boolean if a field has been set. ### GetSession -`func (o *TrackEventRequest) GetSession() Session` +`func (o *TrackRiskEventRequest) GetSession() Session` GetSession returns the Session field if non-nil, zero value otherwise. ### GetSessionOk -`func (o *TrackEventRequest) GetSessionOk() (*Session, bool)` +`func (o *TrackRiskEventRequest) GetSessionOk() (*Session, bool)` GetSessionOk returns a tuple with the Session field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetSession -`func (o *TrackEventRequest) SetSession(v Session)` +`func (o *TrackRiskEventRequest) SetSession(v Session)` SetSession sets Session field to given value. ### HasSession -`func (o *TrackEventRequest) HasSession() bool` +`func (o *TrackRiskEventRequest) HasSession() bool` HasSession returns a boolean if a field has been set. ### GetDevice -`func (o *TrackEventRequest) GetDevice() RiskDevice` +`func (o *TrackRiskEventRequest) GetDevice() RiskDevice` GetDevice returns the Device field if non-nil, zero value otherwise. ### GetDeviceOk -`func (o *TrackEventRequest) GetDeviceOk() (*RiskDevice, bool)` +`func (o *TrackRiskEventRequest) GetDeviceOk() (*RiskDevice, bool)` GetDeviceOk returns a tuple with the Device field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetDevice -`func (o *TrackEventRequest) SetDevice(v RiskDevice)` +`func (o *TrackRiskEventRequest) SetDevice(v RiskDevice)` SetDevice sets Device field to given value. ### HasDevice -`func (o *TrackEventRequest) HasDevice() bool` +`func (o *TrackRiskEventRequest) HasDevice() bool` HasDevice returns a boolean if a field has been set. ### GetFp -`func (o *TrackEventRequest) GetFp() string` +`func (o *TrackRiskEventRequest) GetFp() string` GetFp returns the Fp field if non-nil, zero value otherwise. ### GetFpOk -`func (o *TrackEventRequest) GetFpOk() (*string, bool)` +`func (o *TrackRiskEventRequest) GetFpOk() (*string, bool)` GetFpOk returns a tuple with the Fp field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetFp -`func (o *TrackEventRequest) SetFp(v string)` +`func (o *TrackRiskEventRequest) SetFp(v string)` SetFp sets Fp field to given value. ### HasFp -`func (o *TrackEventRequest) HasFp() bool` +`func (o *TrackRiskEventRequest) HasFp() bool` HasFp returns a boolean if a field has been set. ### GetPublished -`func (o *TrackEventRequest) GetPublished() string` +`func (o *TrackRiskEventRequest) GetPublished() string` GetPublished returns the Published field if non-nil, zero value otherwise. ### GetPublishedOk -`func (o *TrackEventRequest) GetPublishedOk() (*string, bool)` +`func (o *TrackRiskEventRequest) GetPublishedOk() (*string, bool)` GetPublishedOk returns a tuple with the Published field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetPublished -`func (o *TrackEventRequest) SetPublished(v string)` +`func (o *TrackRiskEventRequest) SetPublished(v string)` SetPublished sets Published field to given value. ### HasPublished -`func (o *TrackEventRequest) HasPublished() bool` +`func (o *TrackRiskEventRequest) HasPublished() bool` HasPublished returns a boolean if a field has been set. diff --git a/docs/UpdateAuthorizationServer400Response.md b/docs/UpdateAuthorizationServer400Response.md deleted file mode 100644 index 105d459..0000000 --- a/docs/UpdateAuthorizationServer400Response.md +++ /dev/null @@ -1,134 +0,0 @@ -# UpdateAuthorizationServer400Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Field** | Pointer to **string** | | [optional] -**Message** | Pointer to **string** | | [optional] -**StatusCode** | Pointer to **int32** | | [optional] -**Name** | Pointer to **string** | | [optional] - -## Methods - -### NewUpdateAuthorizationServer400Response - -`func NewUpdateAuthorizationServer400Response() *UpdateAuthorizationServer400Response` - -NewUpdateAuthorizationServer400Response instantiates a new UpdateAuthorizationServer400Response 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 - -### NewUpdateAuthorizationServer400ResponseWithDefaults - -`func NewUpdateAuthorizationServer400ResponseWithDefaults() *UpdateAuthorizationServer400Response` - -NewUpdateAuthorizationServer400ResponseWithDefaults instantiates a new UpdateAuthorizationServer400Response 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 - -### GetField - -`func (o *UpdateAuthorizationServer400Response) GetField() string` - -GetField returns the Field field if non-nil, zero value otherwise. - -### GetFieldOk - -`func (o *UpdateAuthorizationServer400Response) GetFieldOk() (*string, bool)` - -GetFieldOk returns a tuple with the Field field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetField - -`func (o *UpdateAuthorizationServer400Response) SetField(v string)` - -SetField sets Field field to given value. - -### HasField - -`func (o *UpdateAuthorizationServer400Response) HasField() bool` - -HasField returns a boolean if a field has been set. - -### GetMessage - -`func (o *UpdateAuthorizationServer400Response) GetMessage() string` - -GetMessage returns the Message field if non-nil, zero value otherwise. - -### GetMessageOk - -`func (o *UpdateAuthorizationServer400Response) GetMessageOk() (*string, bool)` - -GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMessage - -`func (o *UpdateAuthorizationServer400Response) SetMessage(v string)` - -SetMessage sets Message field to given value. - -### HasMessage - -`func (o *UpdateAuthorizationServer400Response) HasMessage() bool` - -HasMessage returns a boolean if a field has been set. - -### GetStatusCode - -`func (o *UpdateAuthorizationServer400Response) GetStatusCode() int32` - -GetStatusCode returns the StatusCode field if non-nil, zero value otherwise. - -### GetStatusCodeOk - -`func (o *UpdateAuthorizationServer400Response) GetStatusCodeOk() (*int32, bool)` - -GetStatusCodeOk returns a tuple with the StatusCode field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStatusCode - -`func (o *UpdateAuthorizationServer400Response) SetStatusCode(v int32)` - -SetStatusCode sets StatusCode field to given value. - -### HasStatusCode - -`func (o *UpdateAuthorizationServer400Response) HasStatusCode() bool` - -HasStatusCode returns a boolean if a field has been set. - -### GetName - -`func (o *UpdateAuthorizationServer400Response) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *UpdateAuthorizationServer400Response) 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 *UpdateAuthorizationServer400Response) SetName(v string)` - -SetName sets Name field to given value. - -### HasName - -`func (o *UpdateAuthorizationServer400Response) HasName() bool` - -HasName 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/UpdateClientAppRequest.md b/docs/UpdateClientAppRequest.md index 0638d0d..2fd85f9 100644 --- a/docs/UpdateClientAppRequest.md +++ b/docs/UpdateClientAppRequest.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Scopes** | Pointer to **[]int32** | | [optional] +**Scopes** | Pointer to **[]int32** | An array of Scope IDs the scopes the app can request | [optional] ## Methods diff --git a/docs/UpdatePasswordInsecureRequest.md b/docs/UpdatePasswordInsecureRequest.md new file mode 100644 index 0000000..b56d593 --- /dev/null +++ b/docs/UpdatePasswordInsecureRequest.md @@ -0,0 +1,98 @@ +# UpdatePasswordInsecureRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Password** | **string** | Set to the password value using cleartext. Hashes are never stored as cleartext. They are stored securely using cryptographic hash. OneLogin continuously upgrades the strength of the hash. Ensure that the value meets the password strength requirements set for the account. | +**PasswordConfirmation** | **string** | Ensure that this value matches the password value exactly. | +**ValidatePolicy** | Pointer to **bool** | Will passwords validate against the User Policy. Defaults to false. | [optional] [default to false] + +## Methods + +### NewUpdatePasswordInsecureRequest + +`func NewUpdatePasswordInsecureRequest(password string, passwordConfirmation string, ) *UpdatePasswordInsecureRequest` + +NewUpdatePasswordInsecureRequest instantiates a new UpdatePasswordInsecureRequest 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 + +### NewUpdatePasswordInsecureRequestWithDefaults + +`func NewUpdatePasswordInsecureRequestWithDefaults() *UpdatePasswordInsecureRequest` + +NewUpdatePasswordInsecureRequestWithDefaults instantiates a new UpdatePasswordInsecureRequest 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 + +### GetPassword + +`func (o *UpdatePasswordInsecureRequest) GetPassword() string` + +GetPassword returns the Password field if non-nil, zero value otherwise. + +### GetPasswordOk + +`func (o *UpdatePasswordInsecureRequest) GetPasswordOk() (*string, bool)` + +GetPasswordOk returns a tuple with the Password field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPassword + +`func (o *UpdatePasswordInsecureRequest) SetPassword(v string)` + +SetPassword sets Password field to given value. + + +### GetPasswordConfirmation + +`func (o *UpdatePasswordInsecureRequest) GetPasswordConfirmation() string` + +GetPasswordConfirmation returns the PasswordConfirmation field if non-nil, zero value otherwise. + +### GetPasswordConfirmationOk + +`func (o *UpdatePasswordInsecureRequest) GetPasswordConfirmationOk() (*string, bool)` + +GetPasswordConfirmationOk returns a tuple with the PasswordConfirmation field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPasswordConfirmation + +`func (o *UpdatePasswordInsecureRequest) SetPasswordConfirmation(v string)` + +SetPasswordConfirmation sets PasswordConfirmation field to given value. + + +### GetValidatePolicy + +`func (o *UpdatePasswordInsecureRequest) GetValidatePolicy() bool` + +GetValidatePolicy returns the ValidatePolicy field if non-nil, zero value otherwise. + +### GetValidatePolicyOk + +`func (o *UpdatePasswordInsecureRequest) GetValidatePolicyOk() (*bool, bool)` + +GetValidatePolicyOk returns a tuple with the ValidatePolicy field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValidatePolicy + +`func (o *UpdatePasswordInsecureRequest) SetValidatePolicy(v bool)` + +SetValidatePolicy sets ValidatePolicy field to given value. + +### HasValidatePolicy + +`func (o *UpdatePasswordInsecureRequest) HasValidatePolicy() bool` + +HasValidatePolicy 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/UpdatePasswordSecureRequest.md b/docs/UpdatePasswordSecureRequest.md new file mode 100644 index 0000000..92f6d47 --- /dev/null +++ b/docs/UpdatePasswordSecureRequest.md @@ -0,0 +1,119 @@ +# UpdatePasswordSecureRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Password** | **string** | Set to the password value using a SHA-256-encoded value. If you are including your own password_salt value in your request, prepend the salt value to the cleartext password value before SHA-256-encoding it. For example, if your salt value is hello and your cleartext password value is password, the value you need to SHA-256-encode is hellopassword. The resulting encoded value would be b1c788abac15390de987ad17b65ac73c9b475d428a51f245c645a442fddd078b. Note that the alpha characters in this has must all be lower case. | +**PasswordConfirmation** | **string** | This value must match the password value. | +**PasswordAlgorithm** | **string** | Set to salt+sha256. | +**PasswordSalt** | Pointer to **string** | Optional. If your password hash has been salted then you can provide the salt used in this param. This assumes that the salt was prepended to the password before doing the SHA256 hash. The API supports a salt value that is up to 40 characters long. | [optional] + +## Methods + +### NewUpdatePasswordSecureRequest + +`func NewUpdatePasswordSecureRequest(password string, passwordConfirmation string, passwordAlgorithm string, ) *UpdatePasswordSecureRequest` + +NewUpdatePasswordSecureRequest instantiates a new UpdatePasswordSecureRequest 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 + +### NewUpdatePasswordSecureRequestWithDefaults + +`func NewUpdatePasswordSecureRequestWithDefaults() *UpdatePasswordSecureRequest` + +NewUpdatePasswordSecureRequestWithDefaults instantiates a new UpdatePasswordSecureRequest 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 + +### GetPassword + +`func (o *UpdatePasswordSecureRequest) GetPassword() string` + +GetPassword returns the Password field if non-nil, zero value otherwise. + +### GetPasswordOk + +`func (o *UpdatePasswordSecureRequest) GetPasswordOk() (*string, bool)` + +GetPasswordOk returns a tuple with the Password field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPassword + +`func (o *UpdatePasswordSecureRequest) SetPassword(v string)` + +SetPassword sets Password field to given value. + + +### GetPasswordConfirmation + +`func (o *UpdatePasswordSecureRequest) GetPasswordConfirmation() string` + +GetPasswordConfirmation returns the PasswordConfirmation field if non-nil, zero value otherwise. + +### GetPasswordConfirmationOk + +`func (o *UpdatePasswordSecureRequest) GetPasswordConfirmationOk() (*string, bool)` + +GetPasswordConfirmationOk returns a tuple with the PasswordConfirmation field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPasswordConfirmation + +`func (o *UpdatePasswordSecureRequest) SetPasswordConfirmation(v string)` + +SetPasswordConfirmation sets PasswordConfirmation field to given value. + + +### GetPasswordAlgorithm + +`func (o *UpdatePasswordSecureRequest) GetPasswordAlgorithm() string` + +GetPasswordAlgorithm returns the PasswordAlgorithm field if non-nil, zero value otherwise. + +### GetPasswordAlgorithmOk + +`func (o *UpdatePasswordSecureRequest) GetPasswordAlgorithmOk() (*string, bool)` + +GetPasswordAlgorithmOk returns a tuple with the PasswordAlgorithm field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPasswordAlgorithm + +`func (o *UpdatePasswordSecureRequest) SetPasswordAlgorithm(v string)` + +SetPasswordAlgorithm sets PasswordAlgorithm field to given value. + + +### GetPasswordSalt + +`func (o *UpdatePasswordSecureRequest) GetPasswordSalt() string` + +GetPasswordSalt returns the PasswordSalt field if non-nil, zero value otherwise. + +### GetPasswordSaltOk + +`func (o *UpdatePasswordSecureRequest) GetPasswordSaltOk() (*string, bool)` + +GetPasswordSaltOk returns a tuple with the PasswordSalt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPasswordSalt + +`func (o *UpdatePasswordSecureRequest) SetPasswordSalt(v string)` + +SetPasswordSalt sets PasswordSalt field to given value. + +### HasPasswordSalt + +`func (o *UpdatePasswordSecureRequest) HasPasswordSalt() bool` + +HasPasswordSalt 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/AddRoleUsers200ResponseInner.md b/docs/UpdatePrivilege200Response.md similarity index 57% rename from docs/AddRoleUsers200ResponseInner.md rename to docs/UpdatePrivilege200Response.md index f615e77..2c722e7 100644 --- a/docs/AddRoleUsers200ResponseInner.md +++ b/docs/UpdatePrivilege200Response.md @@ -1,52 +1,52 @@ -# AddRoleUsers200ResponseInner +# UpdatePrivilege200Response ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | Pointer to **int32** | | [optional] +**Id** | Pointer to **string** | Privilege ID | [optional] ## Methods -### NewAddRoleUsers200ResponseInner +### NewUpdatePrivilege200Response -`func NewAddRoleUsers200ResponseInner() *AddRoleUsers200ResponseInner` +`func NewUpdatePrivilege200Response() *UpdatePrivilege200Response` -NewAddRoleUsers200ResponseInner instantiates a new AddRoleUsers200ResponseInner object +NewUpdatePrivilege200Response instantiates a new UpdatePrivilege200Response 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 -### NewAddRoleUsers200ResponseInnerWithDefaults +### NewUpdatePrivilege200ResponseWithDefaults -`func NewAddRoleUsers200ResponseInnerWithDefaults() *AddRoleUsers200ResponseInner` +`func NewUpdatePrivilege200ResponseWithDefaults() *UpdatePrivilege200Response` -NewAddRoleUsers200ResponseInnerWithDefaults instantiates a new AddRoleUsers200ResponseInner object +NewUpdatePrivilege200ResponseWithDefaults instantiates a new UpdatePrivilege200Response 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 ### GetId -`func (o *AddRoleUsers200ResponseInner) GetId() int32` +`func (o *UpdatePrivilege200Response) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk -`func (o *AddRoleUsers200ResponseInner) GetIdOk() (*int32, bool)` +`func (o *UpdatePrivilege200Response) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId -`func (o *AddRoleUsers200ResponseInner) SetId(v int32)` +`func (o *UpdatePrivilege200Response) SetId(v string)` SetId sets Id field to given value. ### HasId -`func (o *AddRoleUsers200ResponseInner) HasId() bool` +`func (o *UpdatePrivilege200Response) HasId() bool` HasId returns a boolean if a field has been set. diff --git a/docs/UpdateRiskRuleRequest.md b/docs/UpdateRiskRuleRequest.md new file mode 100644 index 0000000..5354e23 --- /dev/null +++ b/docs/UpdateRiskRuleRequest.md @@ -0,0 +1,56 @@ +# UpdateRiskRuleRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **string** | The ID of the Rule to Update | [optional] + +## Methods + +### NewUpdateRiskRuleRequest + +`func NewUpdateRiskRuleRequest() *UpdateRiskRuleRequest` + +NewUpdateRiskRuleRequest instantiates a new UpdateRiskRuleRequest 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 + +### NewUpdateRiskRuleRequestWithDefaults + +`func NewUpdateRiskRuleRequestWithDefaults() *UpdateRiskRuleRequest` + +NewUpdateRiskRuleRequestWithDefaults instantiates a new UpdateRiskRuleRequest 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 + +### GetId + +`func (o *UpdateRiskRuleRequest) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *UpdateRiskRuleRequest) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *UpdateRiskRuleRequest) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *UpdateRiskRuleRequest) HasId() bool` + +HasId 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/User.md b/docs/User.md index 02caf89..5232424 100644 --- a/docs/User.md +++ b/docs/User.md @@ -22,7 +22,7 @@ Name | Type | Description | Notes **TrustedIdpId** | Pointer to **int32** | The ID of the OneLogin Trusted IDP of the user. | [optional] **ManagerAdId** | Pointer to **string** | The ID of the user's manager in Active Directory. | [optional] **ManagerUserId** | Pointer to **string** | The OneLogin User ID for the user's manager. | [optional] -**SamaccountName** | Pointer to **string** | The user's Active Directory username. | [optional] +**Samaccountname** | Pointer to **string** | The user's Active Directory username. | [optional] **MemberOf** | Pointer to **string** | The user's directory membership. | [optional] **Userprincipalname** | Pointer to **string** | The principle name of the user. | [optional] **DistinguishedName** | Pointer to **string** | The distinguished name of the user. | [optional] @@ -33,7 +33,6 @@ Name | Type | Description | Notes **UpdatedAt** | Pointer to **string** | | [optional] **PreferredLocaleCode** | Pointer to **string** | | [optional] **CreatedAt** | Pointer to **string** | | [optional] -**CustomAttributes** | Pointer to **map[string]interface{}** | | [optional] **InvalidLoginAttempts** | Pointer to **int32** | | [optional] **LockedUntil** | Pointer to **string** | | [optional] **PasswordChangedAt** | Pointer to **string** | | [optional] @@ -511,30 +510,30 @@ SetManagerUserId sets ManagerUserId field to given value. HasManagerUserId returns a boolean if a field has been set. -### GetSamaccountName +### GetSamaccountname -`func (o *User) GetSamaccountName() string` +`func (o *User) GetSamaccountname() string` -GetSamaccountName returns the SamaccountName field if non-nil, zero value otherwise. +GetSamaccountname returns the Samaccountname field if non-nil, zero value otherwise. -### GetSamaccountNameOk +### GetSamaccountnameOk -`func (o *User) GetSamaccountNameOk() (*string, bool)` +`func (o *User) GetSamaccountnameOk() (*string, bool)` -GetSamaccountNameOk returns a tuple with the SamaccountName field if it's non-nil, zero value otherwise +GetSamaccountnameOk returns a tuple with the Samaccountname field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetSamaccountName +### SetSamaccountname -`func (o *User) SetSamaccountName(v string)` +`func (o *User) SetSamaccountname(v string)` -SetSamaccountName sets SamaccountName field to given value. +SetSamaccountname sets Samaccountname field to given value. -### HasSamaccountName +### HasSamaccountname -`func (o *User) HasSamaccountName() bool` +`func (o *User) HasSamaccountname() bool` -HasSamaccountName returns a boolean if a field has been set. +HasSamaccountname returns a boolean if a field has been set. ### GetMemberOf @@ -786,31 +785,6 @@ SetCreatedAt sets CreatedAt field to given value. HasCreatedAt returns a boolean if a field has been set. -### GetCustomAttributes - -`func (o *User) GetCustomAttributes() map[string]interface{}` - -GetCustomAttributes returns the CustomAttributes field if non-nil, zero value otherwise. - -### GetCustomAttributesOk - -`func (o *User) GetCustomAttributesOk() (*map[string]interface{}, bool)` - -GetCustomAttributesOk returns a tuple with the CustomAttributes field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCustomAttributes - -`func (o *User) SetCustomAttributes(v map[string]interface{})` - -SetCustomAttributes sets CustomAttributes field to given value. - -### HasCustomAttributes - -`func (o *User) HasCustomAttributes() bool` - -HasCustomAttributes returns a boolean if a field has been set. - ### GetInvalidLoginAttempts `func (o *User) GetInvalidLoginAttempts() int32` diff --git a/docs/UserMappingsApi.md b/docs/UserMappingsApi.md new file mode 100644 index 0000000..d69c138 --- /dev/null +++ b/docs/UserMappingsApi.md @@ -0,0 +1,771 @@ +# \UserMappingsApi + +All URIs are relative to *https://your-api-subdomain.onelogin.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateMapping**](UserMappingsApi.md#CreateMapping) | **Post** /api/2/mappings | Create Mapping +[**DeleteMapping**](UserMappingsApi.md#DeleteMapping) | **Delete** /api/2/mappings/{mapping_id} | Delete Mapping +[**GetMapping**](UserMappingsApi.md#GetMapping) | **Get** /api/2/mappings/{mapping_id} | Get Mapping +[**ListMappingActionValues**](UserMappingsApi.md#ListMappingActionValues) | **Get** /api/2/mappings/actions/{mapping_action_value}/values | List Actions Values +[**ListMappingConditions**](UserMappingsApi.md#ListMappingConditions) | **Get** /api/2/mappings/conditions | List Conditions +[**ListMappingConditionsOperators**](UserMappingsApi.md#ListMappingConditionsOperators) | **Get** /api/2/mappings/conditions/{mapping_condition_value}/operators | List Conditions Operators +[**ListMappingContionValues**](UserMappingsApi.md#ListMappingContionValues) | **Get** /api/2/mappings/conditions/{mapping_condition_value}/values | List Conditions Values +[**ListMappings**](UserMappingsApi.md#ListMappings) | **Get** /api/2/mappings | List Mappings +[**ListMappingsActions**](UserMappingsApi.md#ListMappingsActions) | **Get** /api/2/mappings/actions | List Actions +[**SortMappings**](UserMappingsApi.md#SortMappings) | **Put** /api/2/mappings/sort | Bulk Sort +[**UpdateMapping**](UserMappingsApi.md#UpdateMapping) | **Put** /api/2/mappings/{mapping_id} | Update Mapping + + + +## CreateMapping + +> []Mapping CreateMapping(ctx).ContentType(contentType).Mapping(mapping).Execute() + +Create Mapping + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + contentType := "application/json" // string | (optional) (default to "application/json") + mapping := *openapiclient.NewMapping("Name_example", false, "Match_example", int32(123), []openapiclient.Condition{*openapiclient.NewCondition()}, []openapiclient.ActionObj{*openapiclient.NewActionObj()}) // Mapping | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UserMappingsApi.CreateMapping(context.Background()).ContentType(contentType).Mapping(mapping).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UserMappingsApi.CreateMapping``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateMapping`: []Mapping + fmt.Fprintf(os.Stdout, "Response from `UserMappingsApi.CreateMapping`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateMappingRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **contentType** | **string** | | [default to "application/json"] + **mapping** | [**Mapping**](Mapping.md) | | + +### Return type + +[**[]Mapping**](Mapping.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteMapping + +> DeleteMapping(ctx, mappingId).Execute() + +Delete Mapping + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + mappingId := int32(56) // int32 | The id of the user mapping to locate. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UserMappingsApi.DeleteMapping(context.Background(), mappingId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UserMappingsApi.DeleteMapping``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**mappingId** | **int32** | The id of the user mapping to locate. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteMappingRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + + (empty response body) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetMapping + +> Mapping GetMapping(ctx, mappingId).Execute() + +Get Mapping + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + mappingId := int32(56) // int32 | The id of the user mapping to locate. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UserMappingsApi.GetMapping(context.Background(), mappingId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UserMappingsApi.GetMapping``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetMapping`: Mapping + fmt.Fprintf(os.Stdout, "Response from `UserMappingsApi.GetMapping`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**mappingId** | **int32** | The id of the user mapping to locate. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetMappingRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**Mapping**](Mapping.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListMappingActionValues + +> []ListMappingActionValues200ResponseInner ListMappingActionValues(ctx, mappingActionValue).Execute() + +List Actions Values + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + mappingActionValue := "mappingActionValue_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UserMappingsApi.ListMappingActionValues(context.Background(), mappingActionValue).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UserMappingsApi.ListMappingActionValues``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListMappingActionValues`: []ListMappingActionValues200ResponseInner + fmt.Fprintf(os.Stdout, "Response from `UserMappingsApi.ListMappingActionValues`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**mappingActionValue** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListMappingActionValuesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**[]ListMappingActionValues200ResponseInner**](ListMappingActionValues200ResponseInner.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListMappingConditions + +> ListMappingConditions200Response ListMappingConditions(ctx).Execute() + +List Conditions + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UserMappingsApi.ListMappingConditions(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UserMappingsApi.ListMappingConditions``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListMappingConditions`: ListMappingConditions200Response + fmt.Fprintf(os.Stdout, "Response from `UserMappingsApi.ListMappingConditions`: %v\n", resp) +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiListMappingConditionsRequest struct via the builder pattern + + +### Return type + +[**ListMappingConditions200Response**](ListMappingConditions200Response.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListMappingConditionsOperators + +> []ListMappingConditionsOperators200ResponseInner ListMappingConditionsOperators(ctx, mappingConditionValue).Execute() + +List Conditions Operators + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + mappingConditionValue := "mappingConditionValue_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UserMappingsApi.ListMappingConditionsOperators(context.Background(), mappingConditionValue).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UserMappingsApi.ListMappingConditionsOperators``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListMappingConditionsOperators`: []ListMappingConditionsOperators200ResponseInner + fmt.Fprintf(os.Stdout, "Response from `UserMappingsApi.ListMappingConditionsOperators`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**mappingConditionValue** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListMappingConditionsOperatorsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**[]ListMappingConditionsOperators200ResponseInner**](ListMappingConditionsOperators200ResponseInner.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListMappingContionValues + +> []ListMappingContionValues200ResponseInner ListMappingContionValues(ctx, mappingConditionValue).Execute() + +List Conditions Values + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + mappingConditionValue := "mappingConditionValue_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UserMappingsApi.ListMappingContionValues(context.Background(), mappingConditionValue).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UserMappingsApi.ListMappingContionValues``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListMappingContionValues`: []ListMappingContionValues200ResponseInner + fmt.Fprintf(os.Stdout, "Response from `UserMappingsApi.ListMappingContionValues`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**mappingConditionValue** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListMappingContionValuesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**[]ListMappingContionValues200ResponseInner**](ListMappingContionValues200ResponseInner.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListMappings + +> []Mapping ListMappings(ctx).Enabled(enabled).HasCondition(hasCondition).HasConditionType(hasConditionType).HasAction(hasAction).HasActionType(hasActionType).Execute() + +List Mappings + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + enabled := true // bool | Defaults to true. When set to `false` will return all disabled mappings. (optional) (default to true) + hasCondition := "has_condition=has_role:123456" // string | Filters Rules based on their Conditions. Values formatted as :, where name is the Condition to look for, and value is the value to find. Multiple filters can be declared by using a comma delimited list. Wildcards are supported in both the name and value fields. For example: Single filter. has_condition=has_role:123456 Multiple filters. has_condition=has_role:123456,status:1 Wildcard for conditions. has_condition=*:123456 Wildcard for condition values. has_condition=has_role:* (optional) + hasConditionType := "hasConditionType_example" // string | Filters Rules based on their Conditions. Values formatted as :, where name is the Condition to look for, and value is the value to find. Multiple filters can be declared by using a comma delimited list. Wildcards are supported in both the name and value fields. For example: Single filter. has_condition=has_role:123456 Multiple filters. has_condition=has_role:123456,status:1 Wildcard for conditions. has_condition=*:123456 Wildcard for condition values. has_condition=has_role:* (optional) + hasAction := "has_action=set_groups:123456,set_usertype:*" // string | Filters Rules based on their Actions. Values formatted as :, where name is the Action to look for, and value is the value to find. Multiple filters can be declared by using a comma delimited list. Wildcards are supported in both the name and value fields. For example: Single filter. has_action=set_licenses:123456 Multiple filters. has_action=set_groups:123456,set_usertype:* Wildcard for actions. has_action=*:123456 Wildcard for action values. has_action=set_userprincipalname:* (optional) + hasActionType := "hasActionType_example" // string | Filters Rules based on their action types. Allowed values are: builtin - actions that involve standard attributes custom - actions that involve custom attributes none - no actions are defined For example: Find Rules with no actions has_action_type=none (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UserMappingsApi.ListMappings(context.Background()).Enabled(enabled).HasCondition(hasCondition).HasConditionType(hasConditionType).HasAction(hasAction).HasActionType(hasActionType).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UserMappingsApi.ListMappings``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListMappings`: []Mapping + fmt.Fprintf(os.Stdout, "Response from `UserMappingsApi.ListMappings`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListMappingsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **enabled** | **bool** | Defaults to true. When set to `false` will return all disabled mappings. | [default to true] + **hasCondition** | **string** | Filters Rules based on their Conditions. Values formatted as :, where name is the Condition to look for, and value is the value to find. Multiple filters can be declared by using a comma delimited list. Wildcards are supported in both the name and value fields. For example: Single filter. has_condition=has_role:123456 Multiple filters. has_condition=has_role:123456,status:1 Wildcard for conditions. has_condition=*:123456 Wildcard for condition values. has_condition=has_role:* | + **hasConditionType** | **string** | Filters Rules based on their Conditions. Values formatted as :, where name is the Condition to look for, and value is the value to find. Multiple filters can be declared by using a comma delimited list. Wildcards are supported in both the name and value fields. For example: Single filter. has_condition=has_role:123456 Multiple filters. has_condition=has_role:123456,status:1 Wildcard for conditions. has_condition=*:123456 Wildcard for condition values. has_condition=has_role:* | + **hasAction** | **string** | Filters Rules based on their Actions. Values formatted as :, where name is the Action to look for, and value is the value to find. Multiple filters can be declared by using a comma delimited list. Wildcards are supported in both the name and value fields. For example: Single filter. has_action=set_licenses:123456 Multiple filters. has_action=set_groups:123456,set_usertype:* Wildcard for actions. has_action=*:123456 Wildcard for action values. has_action=set_userprincipalname:* | + **hasActionType** | **string** | Filters Rules based on their action types. Allowed values are: builtin - actions that involve standard attributes custom - actions that involve custom attributes none - no actions are defined For example: Find Rules with no actions has_action_type=none | + +### Return type + +[**[]Mapping**](Mapping.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListMappingsActions + +> []ListMappingsActions200ResponseInner ListMappingsActions(ctx).Execute() + +List Actions + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UserMappingsApi.ListMappingsActions(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UserMappingsApi.ListMappingsActions``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListMappingsActions`: []ListMappingsActions200ResponseInner + fmt.Fprintf(os.Stdout, "Response from `UserMappingsApi.ListMappingsActions`: %v\n", resp) +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiListMappingsActionsRequest struct via the builder pattern + + +### Return type + +[**[]ListMappingsActions200ResponseInner**](ListMappingsActions200ResponseInner.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SortMappings + +> []int32 SortMappings(ctx).RequestBody(requestBody).Execute() + +Bulk Sort + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + requestBody := []int32{int32(123)} // []int32 | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UserMappingsApi.SortMappings(context.Background()).RequestBody(requestBody).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UserMappingsApi.SortMappings``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SortMappings`: []int32 + fmt.Fprintf(os.Stdout, "Response from `UserMappingsApi.SortMappings`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiSortMappingsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **requestBody** | **[]int32** | | + +### Return type + +**[]int32** + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateMapping + +> int32 UpdateMapping(ctx, mappingId).ContentType(contentType).Body(body).Execute() + +Update Mapping + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + mappingId := int32(56) // int32 | The id of the user mapping to locate. + contentType := "application/json" // string | (optional) (default to "application/json") + body := map[string]interface{}{ ... } // map[string]interface{} | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UserMappingsApi.UpdateMapping(context.Background(), mappingId).ContentType(contentType).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UserMappingsApi.UpdateMapping``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateMapping`: int32 + fmt.Fprintf(os.Stdout, "Response from `UserMappingsApi.UpdateMapping`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**mappingId** | **int32** | The id of the user mapping to locate. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateMappingRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **contentType** | **string** | | [default to "application/json"] + **body** | **map[string]interface{}** | | + +### Return type + +**int32** + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/docs/UsersV1Api.md b/docs/UsersV1Api.md new file mode 100644 index 0000000..301c39e --- /dev/null +++ b/docs/UsersV1Api.md @@ -0,0 +1,1116 @@ +# \UsersV1Api + +All URIs are relative to *https://your-api-subdomain.onelogin.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**AddRolesToUser**](UsersV1Api.md#AddRolesToUser) | **Put** /api/1/users/{user_id}/add_roles | Add Roles for a User +[**CreateUser**](UsersV1Api.md#CreateUser) | **Post** /api/1/users | Create a User +[**DeleteUser**](UsersV1Api.md#DeleteUser) | **Delete** /api/1/users/{user_id} | Delete a User +[**GetCustomAttributes**](UsersV1Api.md#GetCustomAttributes) | **Get** /api/1/users/custom_attributes | Get Custom Attributes +[**GetUserApps**](UsersV1Api.md#GetUserApps) | **Get** /api/1/users/{user_id}/apps | Get Apps for a User +[**GetUserById**](UsersV1Api.md#GetUserById) | **Get** /api/1/users/{user_id} | Get User by ID +[**GetUserRoles**](UsersV1Api.md#GetUserRoles) | **Get** /api/1/users/{user_id}/roles | Get Roles for a User +[**ListUsers**](UsersV1Api.md#ListUsers) | **Get** /api/1/users | List Users +[**LockAccountUser**](UsersV1Api.md#LockAccountUser) | **Put** /api/1/users/{user_id}/lock_user | Lock User Account +[**LogOutUser**](UsersV1Api.md#LogOutUser) | **Put** /api/1/users/{user_id}/logout | Log User Out +[**RemoveUserRole**](UsersV1Api.md#RemoveUserRole) | **Put** /api/1/users/{user_id}/remove_roles | Remove Roles for a User +[**SetUserState**](UsersV1Api.md#SetUserState) | **Put** /api/1/users/{user_id}/set_state | Set User State +[**UpdatePasswordInsecure**](UsersV1Api.md#UpdatePasswordInsecure) | **Put** /api/1/users/set_password_clear_text/{user_id} | Set Password Using ID in Cleartext +[**UpdatePasswordSecure**](UsersV1Api.md#UpdatePasswordSecure) | **Put** /api/1/users/set_password_using_salt/{user_id} | Set Password Using ID and SHA-256 and Salt +[**UpdateUser**](UsersV1Api.md#UpdateUser) | **Put** /api/1/users/{user_id} | Update a User + + + +## AddRolesToUser + +> Error AddRolesToUser(ctx, userId).AddRolesToUserRequest(addRolesToUserRequest).Execute() + +Add Roles for a User + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + userId := int32(56) // int32 | Set to the id of the user that you want to return. + addRolesToUserRequest := *openapiclient.NewAddRolesToUserRequest([]int32{int32(123)}) // AddRolesToUserRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UsersV1Api.AddRolesToUser(context.Background(), userId).AddRolesToUserRequest(addRolesToUserRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UsersV1Api.AddRolesToUser``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AddRolesToUser`: Error + fmt.Fprintf(os.Stdout, "Response from `UsersV1Api.AddRolesToUser`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**userId** | **int32** | Set to the id of the user that you want to return. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiAddRolesToUserRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **addRolesToUserRequest** | [**AddRolesToUserRequest**](AddRolesToUserRequest.md) | | + +### Return type + +[**Error**](Error.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateUser + +> User CreateUser(ctx).Mappings(mappings).ValidatePolicy(validatePolicy).User(user).Execute() + +Create a User + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + mappings := "mappings_example" // string | Controls how mappings will be applied to the user on creation. Defaults to async. (optional) + validatePolicy := true // bool | Will passwords validate against the User Policy? Defaults to true. (optional) + user := *openapiclient.NewUser() // User | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UsersV1Api.CreateUser(context.Background()).Mappings(mappings).ValidatePolicy(validatePolicy).User(user).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UsersV1Api.CreateUser``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateUser`: User + fmt.Fprintf(os.Stdout, "Response from `UsersV1Api.CreateUser`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateUserRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **mappings** | **string** | Controls how mappings will be applied to the user on creation. Defaults to async. | + **validatePolicy** | **bool** | Will passwords validate against the User Policy? Defaults to true. | + **user** | [**User**](User.md) | | + +### Return type + +[**User**](User.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteUser + +> DeleteUser(ctx, userId).Execute() + +Delete a User + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + userId := int32(56) // int32 | Set to the id of the user that you want to return. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UsersV1Api.DeleteUser(context.Background(), userId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UsersV1Api.DeleteUser``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**userId** | **int32** | Set to the id of the user that you want to return. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteUserRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + + (empty response body) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetCustomAttributes + +> GetCustomAttributes200Response GetCustomAttributes(ctx).Execute() + +Get Custom Attributes + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UsersV1Api.GetCustomAttributes(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UsersV1Api.GetCustomAttributes``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetCustomAttributes`: GetCustomAttributes200Response + fmt.Fprintf(os.Stdout, "Response from `UsersV1Api.GetCustomAttributes`: %v\n", resp) +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetCustomAttributesRequest struct via the builder pattern + + +### Return type + +[**GetCustomAttributes200Response**](GetCustomAttributes200Response.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetUserApps + +> []GetUserApps200ResponseInner GetUserApps(ctx, userId).IgnoreVisibility(ignoreVisibility).Execute() + +Get Apps for a User + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + userId := int32(56) // int32 | Set to the id of the user that you want to return. + ignoreVisibility := true // bool | Defaults to `false`. When `true` will show all apps that are assigned to a user regardless of their portal visibility setting. (optional) (default to false) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UsersV1Api.GetUserApps(context.Background(), userId).IgnoreVisibility(ignoreVisibility).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UsersV1Api.GetUserApps``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetUserApps`: []GetUserApps200ResponseInner + fmt.Fprintf(os.Stdout, "Response from `UsersV1Api.GetUserApps`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**userId** | **int32** | Set to the id of the user that you want to return. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetUserAppsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **ignoreVisibility** | **bool** | Defaults to `false`. When `true` will show all apps that are assigned to a user regardless of their portal visibility setting. | [default to false] + +### Return type + +[**[]GetUserApps200ResponseInner**](GetUserApps200ResponseInner.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetUserById + +> User GetUserById(ctx, userId).Execute() + +Get User by ID + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + userId := int32(56) // int32 | Set to the id of the user that you want to return. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UsersV1Api.GetUserById(context.Background(), userId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UsersV1Api.GetUserById``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetUserById`: User + fmt.Fprintf(os.Stdout, "Response from `UsersV1Api.GetUserById`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**userId** | **int32** | Set to the id of the user that you want to return. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetUserByIdRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**User**](User.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetUserRoles + +> GetUserRoles200Response GetUserRoles(ctx, userId).Execute() + +Get Roles for a User + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + userId := int32(56) // int32 | Set to the id of the user that you want to return. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UsersV1Api.GetUserRoles(context.Background(), userId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UsersV1Api.GetUserRoles``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetUserRoles`: GetUserRoles200Response + fmt.Fprintf(os.Stdout, "Response from `UsersV1Api.GetUserRoles`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**userId** | **int32** | Set to the id of the user that you want to return. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetUserRolesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**GetUserRoles200Response**](GetUserRoles200Response.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListUsers + +> []User ListUsers(ctx).Limit(limit).Page(page).Cursor(cursor).CreatedSince(createdSince).CreatedUntil(createdUntil).UpdatedSince(updatedSince).UpdatedUntil(updatedUntil).LastLoginSince(lastLoginSince).LastLoginUntil(lastLoginUntil).Firstname(firstname).Lastname(lastname).Email(email).Username(username).Samaccountname(samaccountname).DirectoryId(directoryId).ExternalId(externalId).UserIds(userIds).CustomAttributesAttributeName(customAttributesAttributeName).Fields(fields).Execute() + +List Users + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + limit := int32(56) // int32 | How many items to return at one time (max 100) (optional) + page := int32(56) // int32 | The page number of results to return. (optional) + cursor := "cursor_example" // string | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. (optional) + createdSince := "createdSince_example" // string | An ISO8601 timestamp value that returns all users created after a given date & time. (optional) + createdUntil := "createdUntil_example" // string | An ISO8601 timestamp value that returns all users created before a given date & time. (optional) + updatedSince := "updatedSince_example" // string | An ISO8601 timestamp value that returns all users updated after a given date & time. (optional) + updatedUntil := "updatedUntil_example" // string | An ISO8601 timestamp value that returns all users updated before a given date & time. (optional) + lastLoginSince := "lastLoginSince_example" // string | An ISO8601 timestamp value that returns all users that logged in after a given date & time. (optional) + lastLoginUntil := "lastLoginUntil_example" // string | An ISO8601 timestamp value that returns all users that logged in before a given date & time. (optional) + firstname := "firstname_example" // string | The first name of the user (optional) + lastname := "lastname_example" // string | The last name of the user (optional) + email := "email_example" // string | The email address of the user (optional) + username := "username_example" // string | The username for the user (optional) + samaccountname := "samaccountname_example" // string | The AD login name for the user (optional) + directoryId := int32(56) // int32 | (optional) + externalId := "externalId_example" // string | An external identifier that has been set on the user (optional) + userIds := "userIds_example" // string | A comma separated list of OneLogin User IDs (optional) + customAttributesAttributeName := "customAttributesAttributeName_example" // string | The short name of a custom attribute. Note that the attribute name is prefixed with custom_attributes. (optional) + fields := "fields_example" // string | Optional. Comma delimited list of fields to return. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UsersV1Api.ListUsers(context.Background()).Limit(limit).Page(page).Cursor(cursor).CreatedSince(createdSince).CreatedUntil(createdUntil).UpdatedSince(updatedSince).UpdatedUntil(updatedUntil).LastLoginSince(lastLoginSince).LastLoginUntil(lastLoginUntil).Firstname(firstname).Lastname(lastname).Email(email).Username(username).Samaccountname(samaccountname).DirectoryId(directoryId).ExternalId(externalId).UserIds(userIds).CustomAttributesAttributeName(customAttributesAttributeName).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UsersV1Api.ListUsers``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListUsers`: []User + fmt.Fprintf(os.Stdout, "Response from `UsersV1Api.ListUsers`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListUsersRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **int32** | How many items to return at one time (max 100) | + **page** | **int32** | The page number of results to return. | + **cursor** | **string** | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. | + **createdSince** | **string** | An ISO8601 timestamp value that returns all users created after a given date & time. | + **createdUntil** | **string** | An ISO8601 timestamp value that returns all users created before a given date & time. | + **updatedSince** | **string** | An ISO8601 timestamp value that returns all users updated after a given date & time. | + **updatedUntil** | **string** | An ISO8601 timestamp value that returns all users updated before a given date & time. | + **lastLoginSince** | **string** | An ISO8601 timestamp value that returns all users that logged in after a given date & time. | + **lastLoginUntil** | **string** | An ISO8601 timestamp value that returns all users that logged in before a given date & time. | + **firstname** | **string** | The first name of the user | + **lastname** | **string** | The last name of the user | + **email** | **string** | The email address of the user | + **username** | **string** | The username for the user | + **samaccountname** | **string** | The AD login name for the user | + **directoryId** | **int32** | | + **externalId** | **string** | An external identifier that has been set on the user | + **userIds** | **string** | A comma separated list of OneLogin User IDs | + **customAttributesAttributeName** | **string** | The short name of a custom attribute. Note that the attribute name is prefixed with custom_attributes. | + **fields** | **string** | Optional. Comma delimited list of fields to return. | + +### Return type + +[**[]User**](User.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## LockAccountUser + +> Error LockAccountUser(ctx, userId).LockAccountUserRequest(lockAccountUserRequest).Execute() + +Lock User Account + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + userId := int32(56) // int32 | Set to the id of the user that you want to return. + lockAccountUserRequest := *openapiclient.NewLockAccountUserRequest(int32(15)) // LockAccountUserRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UsersV1Api.LockAccountUser(context.Background(), userId).LockAccountUserRequest(lockAccountUserRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UsersV1Api.LockAccountUser``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `LockAccountUser`: Error + fmt.Fprintf(os.Stdout, "Response from `UsersV1Api.LockAccountUser`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**userId** | **int32** | Set to the id of the user that you want to return. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiLockAccountUserRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **lockAccountUserRequest** | [**LockAccountUserRequest**](LockAccountUserRequest.md) | | + +### Return type + +[**Error**](Error.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## LogOutUser + +> Error LogOutUser(ctx, userId).Body(body).Execute() + +Log User Out + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + userId := int32(56) // int32 | Set to the id of the user that you want to return. + body := map[string]interface{}{ ... } // map[string]interface{} | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UsersV1Api.LogOutUser(context.Background(), userId).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UsersV1Api.LogOutUser``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `LogOutUser`: Error + fmt.Fprintf(os.Stdout, "Response from `UsersV1Api.LogOutUser`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**userId** | **int32** | Set to the id of the user that you want to return. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiLogOutUserRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **body** | **map[string]interface{}** | | + +### Return type + +[**Error**](Error.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RemoveUserRole + +> Error RemoveUserRole(ctx, userId).RemoveUserRoleRequest(removeUserRoleRequest).Execute() + +Remove Roles for a User + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + userId := int32(56) // int32 | Set to the id of the user that you want to return. + removeUserRoleRequest := *openapiclient.NewRemoveUserRoleRequest([]openapiclient.RemoveUserRoleRequestRoleIdArrayInner{*openapiclient.NewRemoveUserRoleRequestRoleIdArrayInner()}) // RemoveUserRoleRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UsersV1Api.RemoveUserRole(context.Background(), userId).RemoveUserRoleRequest(removeUserRoleRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UsersV1Api.RemoveUserRole``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RemoveUserRole`: Error + fmt.Fprintf(os.Stdout, "Response from `UsersV1Api.RemoveUserRole`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**userId** | **int32** | Set to the id of the user that you want to return. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRemoveUserRoleRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **removeUserRoleRequest** | [**RemoveUserRoleRequest**](RemoveUserRoleRequest.md) | | + +### Return type + +[**Error**](Error.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## SetUserState + +> Error SetUserState(ctx, userId).SetUserStateRequest(setUserStateRequest).Execute() + +Set User State + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + userId := int32(56) // int32 | Set to the id of the user that you want to return. + setUserStateRequest := *openapiclient.NewSetUserStateRequest(int32(1)) // SetUserStateRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UsersV1Api.SetUserState(context.Background(), userId).SetUserStateRequest(setUserStateRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UsersV1Api.SetUserState``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SetUserState`: Error + fmt.Fprintf(os.Stdout, "Response from `UsersV1Api.SetUserState`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**userId** | **int32** | Set to the id of the user that you want to return. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSetUserStateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **setUserStateRequest** | [**SetUserStateRequest**](SetUserStateRequest.md) | | + +### Return type + +[**Error**](Error.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdatePasswordInsecure + +> Error UpdatePasswordInsecure(ctx, userId).UpdatePasswordInsecureRequest(updatePasswordInsecureRequest).Execute() + +Set Password Using ID in Cleartext + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + userId := int32(56) // int32 | Set to the id of the user that you want to return. + updatePasswordInsecureRequest := *openapiclient.NewUpdatePasswordInsecureRequest("", "") // UpdatePasswordInsecureRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UsersV1Api.UpdatePasswordInsecure(context.Background(), userId).UpdatePasswordInsecureRequest(updatePasswordInsecureRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UsersV1Api.UpdatePasswordInsecure``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdatePasswordInsecure`: Error + fmt.Fprintf(os.Stdout, "Response from `UsersV1Api.UpdatePasswordInsecure`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**userId** | **int32** | Set to the id of the user that you want to return. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdatePasswordInsecureRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **updatePasswordInsecureRequest** | [**UpdatePasswordInsecureRequest**](UpdatePasswordInsecureRequest.md) | | + +### Return type + +[**Error**](Error.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdatePasswordSecure + +> Error UpdatePasswordSecure(ctx, userId).UpdatePasswordSecureRequest(updatePasswordSecureRequest).Execute() + +Set Password Using ID and SHA-256 and Salt + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + userId := int32(56) // int32 | Set to the id of the user that you want to return. + updatePasswordSecureRequest := *openapiclient.NewUpdatePasswordSecureRequest("xxxxx637aead4030a653f29dae62f1542d67484342c00627a65066e05c5f0", "xxxxx637aead4030a653f29dae62f1542d67484342c00627a65066e05c5f0", "salt+sha256") // UpdatePasswordSecureRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UsersV1Api.UpdatePasswordSecure(context.Background(), userId).UpdatePasswordSecureRequest(updatePasswordSecureRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UsersV1Api.UpdatePasswordSecure``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdatePasswordSecure`: Error + fmt.Fprintf(os.Stdout, "Response from `UsersV1Api.UpdatePasswordSecure`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**userId** | **int32** | Set to the id of the user that you want to return. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdatePasswordSecureRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **updatePasswordSecureRequest** | [**UpdatePasswordSecureRequest**](UpdatePasswordSecureRequest.md) | | + +### Return type + +[**Error**](Error.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateUser + +> User UpdateUser(ctx, userId).Mappings(mappings).ValidatePolicy(validatePolicy).User(user).Execute() + +Update a User + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + userId := int32(56) // int32 | Set to the id of the user that you want to return. + mappings := "mappings_example" // string | Controls how mappings will be applied to the user on creation. Defaults to async. (optional) + validatePolicy := true // bool | Will passwords validate against the User Policy? Defaults to true. (optional) + user := *openapiclient.NewUser() // User | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UsersV1Api.UpdateUser(context.Background(), userId).Mappings(mappings).ValidatePolicy(validatePolicy).User(user).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UsersV1Api.UpdateUser``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateUser`: User + fmt.Fprintf(os.Stdout, "Response from `UsersV1Api.UpdateUser`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**userId** | **int32** | Set to the id of the user that you want to return. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateUserRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **mappings** | **string** | Controls how mappings will be applied to the user on creation. Defaults to async. | + **validatePolicy** | **bool** | Will passwords validate against the User Policy? Defaults to true. | + **user** | [**User**](User.md) | | + +### Return type + +[**User**](User.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/docs/UsersV2Api.md b/docs/UsersV2Api.md new file mode 100644 index 0000000..acab05d --- /dev/null +++ b/docs/UsersV2Api.md @@ -0,0 +1,472 @@ +# \UsersV2Api + +All URIs are relative to *https://your-api-subdomain.onelogin.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateUser2**](UsersV2Api.md#CreateUser2) | **Post** /api/2/users | Create User +[**DeleteUser2**](UsersV2Api.md#DeleteUser2) | **Delete** /api/2/users/{user_id} | Delete User +[**GetUser2**](UsersV2Api.md#GetUser2) | **Get** /api/2/users/{user_id} | Get User +[**GetUserApps2**](UsersV2Api.md#GetUserApps2) | **Get** /api/2/users/{user_id}/apps | Get User Apps +[**ListUsers2**](UsersV2Api.md#ListUsers2) | **Get** /api/2/users | List Users +[**UpdateUser2**](UsersV2Api.md#UpdateUser2) | **Put** /api/2/users/{user_id} | Update User + + + +## CreateUser2 + +> User CreateUser2(ctx).Mappings(mappings).ValidatePolicy(validatePolicy).User(user).Execute() + +Create User + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + mappings := "mappings_example" // string | Controls how mappings will be applied to the user on creation. Defaults to async. (optional) + validatePolicy := true // bool | Will passwords validate against the User Policy? Defaults to true. (optional) + user := *openapiclient.NewUser() // User | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UsersV2Api.CreateUser2(context.Background()).Mappings(mappings).ValidatePolicy(validatePolicy).User(user).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UsersV2Api.CreateUser2``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateUser2`: User + fmt.Fprintf(os.Stdout, "Response from `UsersV2Api.CreateUser2`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateUser2Request struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **mappings** | **string** | Controls how mappings will be applied to the user on creation. Defaults to async. | + **validatePolicy** | **bool** | Will passwords validate against the User Policy? Defaults to true. | + **user** | [**User**](User.md) | | + +### Return type + +[**User**](User.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteUser2 + +> DeleteUser2(ctx, userId).Execute() + +Delete User + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + userId := int32(56) // int32 | Set to the id of the user that you want to return. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UsersV2Api.DeleteUser2(context.Background(), userId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UsersV2Api.DeleteUser2``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**userId** | **int32** | Set to the id of the user that you want to return. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteUser2Request struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + + (empty response body) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetUser2 + +> User GetUser2(ctx, userId).Execute() + +Get User + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + userId := int32(56) // int32 | Set to the id of the user that you want to return. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UsersV2Api.GetUser2(context.Background(), userId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UsersV2Api.GetUser2``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetUser2`: User + fmt.Fprintf(os.Stdout, "Response from `UsersV2Api.GetUser2`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**userId** | **int32** | Set to the id of the user that you want to return. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetUser2Request struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**User**](User.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetUserApps2 + +> []GetUserApps200ResponseInner GetUserApps2(ctx, userId).IgnoreVisibility(ignoreVisibility).Execute() + +Get User Apps + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + userId := int32(56) // int32 | Set to the id of the user that you want to return. + ignoreVisibility := true // bool | Defaults to `false`. When `true` will show all apps that are assigned to a user regardless of their portal visibility setting. (optional) (default to false) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UsersV2Api.GetUserApps2(context.Background(), userId).IgnoreVisibility(ignoreVisibility).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UsersV2Api.GetUserApps2``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetUserApps2`: []GetUserApps200ResponseInner + fmt.Fprintf(os.Stdout, "Response from `UsersV2Api.GetUserApps2`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**userId** | **int32** | Set to the id of the user that you want to return. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetUserApps2Request struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **ignoreVisibility** | **bool** | Defaults to `false`. When `true` will show all apps that are assigned to a user regardless of their portal visibility setting. | [default to false] + +### Return type + +[**[]GetUserApps200ResponseInner**](GetUserApps200ResponseInner.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListUsers2 + +> []User ListUsers2(ctx).Limit(limit).Page(page).Cursor(cursor).CreatedSince(createdSince).CreatedUntil(createdUntil).UpdatedSince(updatedSince).UpdatedUntil(updatedUntil).LastLoginSince(lastLoginSince).LastLoginUntil(lastLoginUntil).Firstname(firstname).Lastname(lastname).Email(email).Username(username).Samaccountname(samaccountname).DirectoryId(directoryId).ExternalId(externalId).UserIds(userIds).CustomAttributesAttributeName(customAttributesAttributeName).Fields(fields).Execute() + +List Users + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + limit := int32(56) // int32 | How many items to return at one time (max 100) (optional) + page := int32(56) // int32 | The page number of results to return. (optional) + cursor := "cursor_example" // string | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. (optional) + createdSince := "createdSince_example" // string | An ISO8601 timestamp value that returns all users created after a given date & time. (optional) + createdUntil := "createdUntil_example" // string | An ISO8601 timestamp value that returns all users created before a given date & time. (optional) + updatedSince := "updatedSince_example" // string | An ISO8601 timestamp value that returns all users updated after a given date & time. (optional) + updatedUntil := "updatedUntil_example" // string | An ISO8601 timestamp value that returns all users updated before a given date & time. (optional) + lastLoginSince := "lastLoginSince_example" // string | An ISO8601 timestamp value that returns all users that logged in after a given date & time. (optional) + lastLoginUntil := "lastLoginUntil_example" // string | An ISO8601 timestamp value that returns all users that logged in before a given date & time. (optional) + firstname := "firstname_example" // string | The first name of the user (optional) + lastname := "lastname_example" // string | The last name of the user (optional) + email := "email_example" // string | The email address of the user (optional) + username := "username_example" // string | The username for the user (optional) + samaccountname := "samaccountname_example" // string | The AD login name for the user (optional) + directoryId := int32(56) // int32 | (optional) + externalId := "externalId_example" // string | An external identifier that has been set on the user (optional) + userIds := "userIds_example" // string | A comma separated list of OneLogin User IDs (optional) + customAttributesAttributeName := "customAttributesAttributeName_example" // string | The short name of a custom attribute. Note that the attribute name is prefixed with custom_attributes. (optional) + fields := "fields_example" // string | Optional. Comma delimited list of fields to return. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UsersV2Api.ListUsers2(context.Background()).Limit(limit).Page(page).Cursor(cursor).CreatedSince(createdSince).CreatedUntil(createdUntil).UpdatedSince(updatedSince).UpdatedUntil(updatedUntil).LastLoginSince(lastLoginSince).LastLoginUntil(lastLoginUntil).Firstname(firstname).Lastname(lastname).Email(email).Username(username).Samaccountname(samaccountname).DirectoryId(directoryId).ExternalId(externalId).UserIds(userIds).CustomAttributesAttributeName(customAttributesAttributeName).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UsersV2Api.ListUsers2``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListUsers2`: []User + fmt.Fprintf(os.Stdout, "Response from `UsersV2Api.ListUsers2`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListUsers2Request struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **int32** | How many items to return at one time (max 100) | + **page** | **int32** | The page number of results to return. | + **cursor** | **string** | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. | + **createdSince** | **string** | An ISO8601 timestamp value that returns all users created after a given date & time. | + **createdUntil** | **string** | An ISO8601 timestamp value that returns all users created before a given date & time. | + **updatedSince** | **string** | An ISO8601 timestamp value that returns all users updated after a given date & time. | + **updatedUntil** | **string** | An ISO8601 timestamp value that returns all users updated before a given date & time. | + **lastLoginSince** | **string** | An ISO8601 timestamp value that returns all users that logged in after a given date & time. | + **lastLoginUntil** | **string** | An ISO8601 timestamp value that returns all users that logged in before a given date & time. | + **firstname** | **string** | The first name of the user | + **lastname** | **string** | The last name of the user | + **email** | **string** | The email address of the user | + **username** | **string** | The username for the user | + **samaccountname** | **string** | The AD login name for the user | + **directoryId** | **int32** | | + **externalId** | **string** | An external identifier that has been set on the user | + **userIds** | **string** | A comma separated list of OneLogin User IDs | + **customAttributesAttributeName** | **string** | The short name of a custom attribute. Note that the attribute name is prefixed with custom_attributes. | + **fields** | **string** | Optional. Comma delimited list of fields to return. | + +### Return type + +[**[]User**](User.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateUser2 + +> User UpdateUser2(ctx, userId).Mappings(mappings).ValidatePolicy(validatePolicy).User(user).Execute() + +Update User + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + userId := int32(56) // int32 | Set to the id of the user that you want to return. + mappings := "mappings_example" // string | Controls how mappings will be applied to the user on creation. Defaults to async. (optional) + validatePolicy := true // bool | Will passwords validate against the User Policy? Defaults to true. (optional) + user := *openapiclient.NewUser() // User | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UsersV2Api.UpdateUser2(context.Background(), userId).Mappings(mappings).ValidatePolicy(validatePolicy).User(user).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UsersV2Api.UpdateUser2``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateUser2`: User + fmt.Fprintf(os.Stdout, "Response from `UsersV2Api.UpdateUser2`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**userId** | **int32** | Set to the id of the user that you want to return. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateUser2Request struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **mappings** | **string** | Controls how mappings will be applied to the user on creation. Defaults to async. | + **validatePolicy** | **bool** | Will passwords validate against the User Policy? Defaults to true. | + **user** | [**User**](User.md) | | + +### Return type + +[**User**](User.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/docs/VerifyFactorSaml200Response.md b/docs/VerFactorSaml200Response.md similarity index 63% rename from docs/VerifyFactorSaml200Response.md rename to docs/VerFactorSaml200Response.md index cc8b4c4..ce605e8 100644 --- a/docs/VerifyFactorSaml200Response.md +++ b/docs/VerFactorSaml200Response.md @@ -1,4 +1,4 @@ -# VerifyFactorSaml200Response +# VerFactorSaml200Response ## Properties @@ -9,70 +9,70 @@ Name | Type | Description | Notes ## Methods -### NewVerifyFactorSaml200Response +### NewVerFactorSaml200Response -`func NewVerifyFactorSaml200Response() *VerifyFactorSaml200Response` +`func NewVerFactorSaml200Response() *VerFactorSaml200Response` -NewVerifyFactorSaml200Response instantiates a new VerifyFactorSaml200Response object +NewVerFactorSaml200Response instantiates a new VerFactorSaml200Response 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 -### NewVerifyFactorSaml200ResponseWithDefaults +### NewVerFactorSaml200ResponseWithDefaults -`func NewVerifyFactorSaml200ResponseWithDefaults() *VerifyFactorSaml200Response` +`func NewVerFactorSaml200ResponseWithDefaults() *VerFactorSaml200Response` -NewVerifyFactorSaml200ResponseWithDefaults instantiates a new VerifyFactorSaml200Response object +NewVerFactorSaml200ResponseWithDefaults instantiates a new VerFactorSaml200Response 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 ### GetData -`func (o *VerifyFactorSaml200Response) GetData() string` +`func (o *VerFactorSaml200Response) GetData() string` GetData returns the Data field if non-nil, zero value otherwise. ### GetDataOk -`func (o *VerifyFactorSaml200Response) GetDataOk() (*string, bool)` +`func (o *VerFactorSaml200Response) GetDataOk() (*string, bool)` GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetData -`func (o *VerifyFactorSaml200Response) SetData(v string)` +`func (o *VerFactorSaml200Response) SetData(v string)` SetData sets Data field to given value. ### HasData -`func (o *VerifyFactorSaml200Response) HasData() bool` +`func (o *VerFactorSaml200Response) HasData() bool` HasData returns a boolean if a field has been set. ### GetMessage -`func (o *VerifyFactorSaml200Response) GetMessage() string` +`func (o *VerFactorSaml200Response) GetMessage() string` GetMessage returns the Message field if non-nil, zero value otherwise. ### GetMessageOk -`func (o *VerifyFactorSaml200Response) GetMessageOk() (*string, bool)` +`func (o *VerFactorSaml200Response) GetMessageOk() (*string, bool)` GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetMessage -`func (o *VerifyFactorSaml200Response) SetMessage(v string)` +`func (o *VerFactorSaml200Response) SetMessage(v string)` SetMessage sets Message field to given value. ### HasMessage -`func (o *VerifyFactorSaml200Response) HasMessage() bool` +`func (o *VerFactorSaml200Response) HasMessage() bool` HasMessage returns a boolean if a field has been set. diff --git a/docs/Verb.md b/docs/Verb.md new file mode 100644 index 0000000..8870a7e --- /dev/null +++ b/docs/Verb.md @@ -0,0 +1,21 @@ +# Verb + +## Enum + + +* `LOG_IN` (value: `"log-in"`) + +* `LOG_OUT` (value: `"log-out"`) + +* `LOG_IN_DENIED` (value: `"log-in-denied"`) + +* `AUTHENTICATION_CHALLENGE` (value: `"authentication-challenge"`) + +* `AUTHENTICATION_CHALLENGE_PASS` (value: `"authentication-challenge-pass"`) + +* `AUTHENTICATION_CHALLENGE_FAIL` (value: `"authentication-challenge-fail"`) + + +[[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/VerifyMfaFactorRequest.md b/docs/VerifyMfaFactorRequest.md new file mode 100644 index 0000000..d7e67c7 --- /dev/null +++ b/docs/VerifyMfaFactorRequest.md @@ -0,0 +1,82 @@ +# VerifyMfaFactorRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**StateToken** | Pointer to **string** | The state_token is returned after a successful request to Enroll a Factor or Activate a Factor. The state_token MUST be provided if the needs_trigger attribute from the proceeding calls is set to true. Note that the state_token expires 120 seconds after creation. If the token is expired you will need to Activate the Factor again. | [optional] +**OtpToken** | Pointer to **string** | OTP code provided by the device or SMS message sent to user. When a device like OneLogin Protect that supports Push has been used you do not need to provide the otp_token and can keep polling this endpoint until the state_token expires. | [optional] + +## Methods + +### NewVerifyMfaFactorRequest + +`func NewVerifyMfaFactorRequest() *VerifyMfaFactorRequest` + +NewVerifyMfaFactorRequest instantiates a new VerifyMfaFactorRequest 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 + +### NewVerifyMfaFactorRequestWithDefaults + +`func NewVerifyMfaFactorRequestWithDefaults() *VerifyMfaFactorRequest` + +NewVerifyMfaFactorRequestWithDefaults instantiates a new VerifyMfaFactorRequest 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 + +### GetStateToken + +`func (o *VerifyMfaFactorRequest) GetStateToken() string` + +GetStateToken returns the StateToken field if non-nil, zero value otherwise. + +### GetStateTokenOk + +`func (o *VerifyMfaFactorRequest) GetStateTokenOk() (*string, bool)` + +GetStateTokenOk returns a tuple with the StateToken field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStateToken + +`func (o *VerifyMfaFactorRequest) SetStateToken(v string)` + +SetStateToken sets StateToken field to given value. + +### HasStateToken + +`func (o *VerifyMfaFactorRequest) HasStateToken() bool` + +HasStateToken returns a boolean if a field has been set. + +### GetOtpToken + +`func (o *VerifyMfaFactorRequest) GetOtpToken() string` + +GetOtpToken returns the OtpToken field if non-nil, zero value otherwise. + +### GetOtpTokenOk + +`func (o *VerifyMfaFactorRequest) GetOtpTokenOk() (*string, bool)` + +GetOtpTokenOk returns a tuple with the OtpToken field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOtpToken + +`func (o *VerifyMfaFactorRequest) SetOtpToken(v string)` + +SetOtpToken sets OtpToken field to given value. + +### HasOtpToken + +`func (o *VerifyMfaFactorRequest) HasOtpToken() bool` + +HasOtpToken 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/Registration.md b/docs/VerifyUserRegistration200Response.md similarity index 61% rename from docs/Registration.md rename to docs/VerifyUserRegistration200Response.md index 4f79875..725489b 100644 --- a/docs/Registration.md +++ b/docs/VerifyUserRegistration200Response.md @@ -1,4 +1,4 @@ -# Registration +# VerifyUserRegistration200Response ## Properties @@ -10,95 +10,95 @@ Name | Type | Description | Notes ## Methods -### NewRegistration +### NewVerifyUserRegistration200Response -`func NewRegistration() *Registration` +`func NewVerifyUserRegistration200Response() *VerifyUserRegistration200Response` -NewRegistration instantiates a new Registration object +NewVerifyUserRegistration200Response instantiates a new VerifyUserRegistration200Response 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 -### NewRegistrationWithDefaults +### NewVerifyUserRegistration200ResponseWithDefaults -`func NewRegistrationWithDefaults() *Registration` +`func NewVerifyUserRegistration200ResponseWithDefaults() *VerifyUserRegistration200Response` -NewRegistrationWithDefaults instantiates a new Registration object +NewVerifyUserRegistration200ResponseWithDefaults instantiates a new VerifyUserRegistration200Response 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 ### GetId -`func (o *Registration) GetId() string` +`func (o *VerifyUserRegistration200Response) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk -`func (o *Registration) GetIdOk() (*string, bool)` +`func (o *VerifyUserRegistration200Response) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId -`func (o *Registration) SetId(v string)` +`func (o *VerifyUserRegistration200Response) SetId(v string)` SetId sets Id field to given value. ### HasId -`func (o *Registration) HasId() bool` +`func (o *VerifyUserRegistration200Response) HasId() bool` HasId returns a boolean if a field has been set. ### GetStatus -`func (o *Registration) GetStatus() string` +`func (o *VerifyUserRegistration200Response) GetStatus() string` GetStatus returns the Status field if non-nil, zero value otherwise. ### GetStatusOk -`func (o *Registration) GetStatusOk() (*string, bool)` +`func (o *VerifyUserRegistration200Response) GetStatusOk() (*string, bool)` GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetStatus -`func (o *Registration) SetStatus(v string)` +`func (o *VerifyUserRegistration200Response) SetStatus(v string)` SetStatus sets Status field to given value. ### HasStatus -`func (o *Registration) HasStatus() bool` +`func (o *VerifyUserRegistration200Response) HasStatus() bool` HasStatus returns a boolean if a field has been set. ### GetDeviceId -`func (o *Registration) GetDeviceId() string` +`func (o *VerifyUserRegistration200Response) GetDeviceId() string` GetDeviceId returns the DeviceId field if non-nil, zero value otherwise. ### GetDeviceIdOk -`func (o *Registration) GetDeviceIdOk() (*string, bool)` +`func (o *VerifyUserRegistration200Response) GetDeviceIdOk() (*string, bool)` GetDeviceIdOk returns a tuple with the DeviceId field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetDeviceId -`func (o *Registration) SetDeviceId(v string)` +`func (o *VerifyUserRegistration200Response) SetDeviceId(v string)` SetDeviceId sets DeviceId field to given value. ### HasDeviceId -`func (o *Registration) HasDeviceId() bool` +`func (o *VerifyUserRegistration200Response) HasDeviceId() bool` HasDeviceId returns a boolean if a field has been set. diff --git a/docs/VerifyEnrollmentRequest.md b/docs/VerifyUserRegistrationRequest.md similarity index 53% rename from docs/VerifyEnrollmentRequest.md rename to docs/VerifyUserRegistrationRequest.md index 4ffae4a..6d4f702 100644 --- a/docs/VerifyEnrollmentRequest.md +++ b/docs/VerifyUserRegistrationRequest.md @@ -1,52 +1,52 @@ -# VerifyEnrollmentRequest +# VerifyUserRegistrationRequest ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Otp** | Pointer to **int32** | | [optional] +**Otp** | Pointer to **int32** | One-Time-Password (OTP) that was sent to the user based on the chosen factor. OneLogin SMS and OneLogin Email support this OTP code. | [optional] ## Methods -### NewVerifyEnrollmentRequest +### NewVerifyUserRegistrationRequest -`func NewVerifyEnrollmentRequest() *VerifyEnrollmentRequest` +`func NewVerifyUserRegistrationRequest() *VerifyUserRegistrationRequest` -NewVerifyEnrollmentRequest instantiates a new VerifyEnrollmentRequest object +NewVerifyUserRegistrationRequest instantiates a new VerifyUserRegistrationRequest 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 -### NewVerifyEnrollmentRequestWithDefaults +### NewVerifyUserRegistrationRequestWithDefaults -`func NewVerifyEnrollmentRequestWithDefaults() *VerifyEnrollmentRequest` +`func NewVerifyUserRegistrationRequestWithDefaults() *VerifyUserRegistrationRequest` -NewVerifyEnrollmentRequestWithDefaults instantiates a new VerifyEnrollmentRequest object +NewVerifyUserRegistrationRequestWithDefaults instantiates a new VerifyUserRegistrationRequest 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 ### GetOtp -`func (o *VerifyEnrollmentRequest) GetOtp() int32` +`func (o *VerifyUserRegistrationRequest) GetOtp() int32` GetOtp returns the Otp field if non-nil, zero value otherwise. ### GetOtpOk -`func (o *VerifyEnrollmentRequest) GetOtpOk() (*int32, bool)` +`func (o *VerifyUserRegistrationRequest) GetOtpOk() (*int32, bool)` GetOtpOk returns a tuple with the Otp field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetOtp -`func (o *VerifyEnrollmentRequest) SetOtp(v int32)` +`func (o *VerifyUserRegistrationRequest) SetOtp(v int32)` SetOtp sets Otp field to given value. ### HasOtp -`func (o *VerifyEnrollmentRequest) HasOtp() bool` +`func (o *VerifyUserRegistrationRequest) HasOtp() bool` HasOtp returns a boolean if a field has been set. diff --git a/docs/VerifyFactorRequest.md b/docs/VerifyUserVerificationRequest.md similarity index 59% rename from docs/VerifyFactorRequest.md rename to docs/VerifyUserVerificationRequest.md index 9d307d7..a72775c 100644 --- a/docs/VerifyFactorRequest.md +++ b/docs/VerifyUserVerificationRequest.md @@ -1,78 +1,78 @@ -# VerifyFactorRequest +# VerifyUserVerificationRequest ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Otp** | Pointer to **string** | OTP code provided by the device or SMS message sent to user. | [optional] -**DeviceId** | Pointer to **int32** | ID of the specified device which has been registerd for the given user. | [optional] +**DeviceId** | Pointer to **int32** | ID of the specified device which has been registerd for the given user. Available on Get Devices API call. | [optional] ## Methods -### NewVerifyFactorRequest +### NewVerifyUserVerificationRequest -`func NewVerifyFactorRequest() *VerifyFactorRequest` +`func NewVerifyUserVerificationRequest() *VerifyUserVerificationRequest` -NewVerifyFactorRequest instantiates a new VerifyFactorRequest object +NewVerifyUserVerificationRequest instantiates a new VerifyUserVerificationRequest 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 -### NewVerifyFactorRequestWithDefaults +### NewVerifyUserVerificationRequestWithDefaults -`func NewVerifyFactorRequestWithDefaults() *VerifyFactorRequest` +`func NewVerifyUserVerificationRequestWithDefaults() *VerifyUserVerificationRequest` -NewVerifyFactorRequestWithDefaults instantiates a new VerifyFactorRequest object +NewVerifyUserVerificationRequestWithDefaults instantiates a new VerifyUserVerificationRequest 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 ### GetOtp -`func (o *VerifyFactorRequest) GetOtp() string` +`func (o *VerifyUserVerificationRequest) GetOtp() string` GetOtp returns the Otp field if non-nil, zero value otherwise. ### GetOtpOk -`func (o *VerifyFactorRequest) GetOtpOk() (*string, bool)` +`func (o *VerifyUserVerificationRequest) GetOtpOk() (*string, bool)` GetOtpOk returns a tuple with the Otp field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetOtp -`func (o *VerifyFactorRequest) SetOtp(v string)` +`func (o *VerifyUserVerificationRequest) SetOtp(v string)` SetOtp sets Otp field to given value. ### HasOtp -`func (o *VerifyFactorRequest) HasOtp() bool` +`func (o *VerifyUserVerificationRequest) HasOtp() bool` HasOtp returns a boolean if a field has been set. ### GetDeviceId -`func (o *VerifyFactorRequest) GetDeviceId() int32` +`func (o *VerifyUserVerificationRequest) GetDeviceId() int32` GetDeviceId returns the DeviceId field if non-nil, zero value otherwise. ### GetDeviceIdOk -`func (o *VerifyFactorRequest) GetDeviceIdOk() (*int32, bool)` +`func (o *VerifyUserVerificationRequest) GetDeviceIdOk() (*int32, bool)` GetDeviceIdOk returns a tuple with the DeviceId field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetDeviceId -`func (o *VerifyFactorRequest) SetDeviceId(v int32)` +`func (o *VerifyUserVerificationRequest) SetDeviceId(v int32)` SetDeviceId sets DeviceId field to given value. ### HasDeviceId -`func (o *VerifyFactorRequest) HasDeviceId() bool` +`func (o *VerifyUserVerificationRequest) HasDeviceId() bool` HasDeviceId returns a boolean if a field has been set. diff --git a/docs/VigilanceAIApi.md b/docs/VigilanceAIApi.md new file mode 100644 index 0000000..7b41bb0 --- /dev/null +++ b/docs/VigilanceAIApi.md @@ -0,0 +1,548 @@ +# \VigilanceAIApi + +All URIs are relative to *https://your-api-subdomain.onelogin.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateRiskRule**](VigilanceAIApi.md#CreateRiskRule) | **Post** /api/2/risk/rules | Create Rule +[**DeleteRiskRule**](VigilanceAIApi.md#DeleteRiskRule) | **Delete** /api/2/risk/rules/{rule_id} | Delete Rule +[**GetRiskRule**](VigilanceAIApi.md#GetRiskRule) | **Get** /api/2/risk/rules/{rule_id} | get Risk Rule +[**GetRiskScore**](VigilanceAIApi.md#GetRiskScore) | **Post** /api/2/risk/verify | Get a Risk Score +[**GetRiskScores**](VigilanceAIApi.md#GetRiskScores) | **Get** /api/2/risk/scores | Get Score Summary +[**ListRiskRules**](VigilanceAIApi.md#ListRiskRules) | **Get** /api/2/risk/rules | List Rules +[**TrackRiskEvent**](VigilanceAIApi.md#TrackRiskEvent) | **Post** /api/2/risk/events | Track an Event +[**UpdateRiskRule**](VigilanceAIApi.md#UpdateRiskRule) | **Put** /api/2/risk/rules/{rule_id} | Update Rule + + + +## CreateRiskRule + +> RiskRule CreateRiskRule(ctx).RiskRule(riskRule).Execute() + +Create Rule + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + riskRule := *openapiclient.NewRiskRule() // RiskRule | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.VigilanceAIApi.CreateRiskRule(context.Background()).RiskRule(riskRule).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `VigilanceAIApi.CreateRiskRule``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateRiskRule`: RiskRule + fmt.Fprintf(os.Stdout, "Response from `VigilanceAIApi.CreateRiskRule`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateRiskRuleRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **riskRule** | [**RiskRule**](RiskRule.md) | | + +### Return type + +[**RiskRule**](RiskRule.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteRiskRule + +> DeleteRiskRule(ctx, ruleId).Execute() + +Delete Rule + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + ruleId := "ruleId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.VigilanceAIApi.DeleteRiskRule(context.Background(), ruleId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `VigilanceAIApi.DeleteRiskRule``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ruleId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteRiskRuleRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + + (empty response body) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetRiskRule + +> RiskRule GetRiskRule(ctx, ruleId).Execute() + +get Risk Rule + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + ruleId := "ruleId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.VigilanceAIApi.GetRiskRule(context.Background(), ruleId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `VigilanceAIApi.GetRiskRule``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetRiskRule`: RiskRule + fmt.Fprintf(os.Stdout, "Response from `VigilanceAIApi.GetRiskRule`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ruleId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetRiskRuleRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**RiskRule**](RiskRule.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetRiskScore + +> GetRiskScore200Response GetRiskScore(ctx).GetRiskScoreRequest(getRiskScoreRequest).Before(before).After(after).Execute() + +Get a Risk Score + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + getRiskScoreRequest := *openapiclient.NewGetRiskScoreRequest("Ip_example", "UserAgent_example", *openapiclient.NewRiskUser("Id_example")) // GetRiskScoreRequest | + before := "before_example" // string | Optional ISO8601 formatted date string. Defaults to current date. Maximum date is 90 days ago. (optional) + after := "after_example" // string | Optional ISO8601 formatted date string. Defaults to 30 days ago. Maximum date is 90 days ago. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.VigilanceAIApi.GetRiskScore(context.Background()).GetRiskScoreRequest(getRiskScoreRequest).Before(before).After(after).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `VigilanceAIApi.GetRiskScore``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetRiskScore`: GetRiskScore200Response + fmt.Fprintf(os.Stdout, "Response from `VigilanceAIApi.GetRiskScore`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetRiskScoreRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **getRiskScoreRequest** | [**GetRiskScoreRequest**](GetRiskScoreRequest.md) | | + **before** | **string** | Optional ISO8601 formatted date string. Defaults to current date. Maximum date is 90 days ago. | + **after** | **string** | Optional ISO8601 formatted date string. Defaults to 30 days ago. Maximum date is 90 days ago. | + +### Return type + +[**GetRiskScore200Response**](GetRiskScore200Response.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetRiskScores + +> GetRiskScores200Response GetRiskScores(ctx).Execute() + +Get Score Summary + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.VigilanceAIApi.GetRiskScores(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `VigilanceAIApi.GetRiskScores``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetRiskScores`: GetRiskScores200Response + fmt.Fprintf(os.Stdout, "Response from `VigilanceAIApi.GetRiskScores`: %v\n", resp) +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetRiskScoresRequest struct via the builder pattern + + +### Return type + +[**GetRiskScores200Response**](GetRiskScores200Response.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListRiskRules + +> []RiskRule ListRiskRules(ctx).Execute() + +List Rules + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.VigilanceAIApi.ListRiskRules(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `VigilanceAIApi.ListRiskRules``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListRiskRules`: []RiskRule + fmt.Fprintf(os.Stdout, "Response from `VigilanceAIApi.ListRiskRules`: %v\n", resp) +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiListRiskRulesRequest struct via the builder pattern + + +### Return type + +[**[]RiskRule**](RiskRule.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TrackRiskEvent + +> TrackRiskEvent(ctx).TrackRiskEventRequest(trackRiskEventRequest).Execute() + +Track an Event + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + trackRiskEventRequest := *openapiclient.NewTrackRiskEventRequest("Verb_example", "Ip_example", "UserAgent_example", *openapiclient.NewRiskUser("Id_example")) // TrackRiskEventRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.VigilanceAIApi.TrackRiskEvent(context.Background()).TrackRiskEventRequest(trackRiskEventRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `VigilanceAIApi.TrackRiskEvent``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiTrackRiskEventRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **trackRiskEventRequest** | [**TrackRiskEventRequest**](TrackRiskEventRequest.md) | | + +### Return type + + (empty response body) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateRiskRule + +> RiskRule UpdateRiskRule(ctx, ruleId).UpdateRiskRuleRequest(updateRiskRuleRequest).Execute() + +Update Rule + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + ruleId := "ruleId_example" // string | + updateRiskRuleRequest := *openapiclient.NewUpdateRiskRuleRequest() // UpdateRiskRuleRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.VigilanceAIApi.UpdateRiskRule(context.Background(), ruleId).UpdateRiskRuleRequest(updateRiskRuleRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `VigilanceAIApi.UpdateRiskRule``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateRiskRule`: RiskRule + fmt.Fprintf(os.Stdout, "Response from `VigilanceAIApi.UpdateRiskRule`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ruleId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateRiskRuleRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **updateRiskRuleRequest** | [**UpdateRiskRuleRequest**](UpdateRiskRuleRequest.md) | | + +### Return type + +[**RiskRule**](RiskRule.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/git_push.sh b/git_push.sh index a8f83bb..f53a75d 100644 --- a/git_push.sh +++ b/git_push.sh @@ -14,12 +14,12 @@ if [ "$git_host" = "" ]; then fi if [ "$git_user_id" = "" ]; then - git_user_id="onelogin" + git_user_id="GIT_USER_ID" echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi if [ "$git_repo_id" = "" ]; then - git_repo_id="onelogin-go-sdk" + git_repo_id="GIT_REPO_ID" echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi diff --git a/go.mod b/go.mod index 5d20e67..25754c9 100644 --- a/go.mod +++ b/go.mod @@ -2,4 +2,7 @@ module github.com/onelogin/onelogin-go-sdk go 1.13 -require golang.org/x/oauth2 v0.0.0-20210323180902-22b0adad7558 +require ( + github.com/stretchr/testify v1.4.0 + golang.org/x/oauth2 v0.0.0-20210323180902-22b0adad7558 +) diff --git a/go.sum b/go.sum index aca013a..0d63dca 100644 --- a/go.sum +++ b/go.sum @@ -39,6 +39,7 @@ github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5P 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 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= 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= @@ -100,13 +101,17 @@ github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1: 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 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= 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 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= 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 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= 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= @@ -347,8 +352,10 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj 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= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= 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 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= 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= diff --git a/model_action.go b/model_action.go deleted file mode 100644 index b6a1534..0000000 --- a/model_action.go +++ /dev/null @@ -1,264 +0,0 @@ -/* -OneLogin API - -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -API version: 3.0.0-alpha.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package openapi - -import ( - "encoding/json" -) - -// Action struct for Action -type Action struct { - // The action to apply - Action *string `json:"action,omitempty"` - // Only applicable to provisioned and set_* actions. Items in the array will be a plain text string or valid value for the selected action. - Value []string `json:"value,omitempty"` - // A regular expression to extract a value. Applies to provisionable, multi-selects, and string actions. - Expression *string `json:"expression,omitempty"` - // A hash containing scriptlet code that returns a value. - Scriplet *string `json:"scriplet,omitempty"` - // A template to construct a value. Applies to default, string, and list actions. - Macro *string `json:"macro,omitempty"` -} - -// NewAction instantiates a new Action 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 NewAction() *Action { - this := Action{} - return &this -} - -// NewActionWithDefaults instantiates a new Action 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 NewActionWithDefaults() *Action { - this := Action{} - return &this -} - -// GetAction returns the Action field value if set, zero value otherwise. -func (o *Action) GetAction() string { - if o == nil || o.Action == nil { - var ret string - return ret - } - 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. -func (o *Action) GetActionOk() (*string, bool) { - if o == nil || o.Action == nil { - return nil, false - } - return o.Action, true -} - -// HasAction returns a boolean if a field has been set. -func (o *Action) HasAction() bool { - if o != nil && o.Action != nil { - return true - } - - return false -} - -// SetAction gets a reference to the given string and assigns it to the Action field. -func (o *Action) SetAction(v string) { - o.Action = &v -} - -// GetValue returns the Value field value if set, zero value otherwise. -func (o *Action) GetValue() []string { - if o == nil || o.Value == nil { - var ret []string - return ret - } - return o.Value -} - -// GetValueOk returns a tuple with the Value field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Action) GetValueOk() ([]string, bool) { - if o == nil || o.Value == nil { - return nil, false - } - return o.Value, true -} - -// HasValue returns a boolean if a field has been set. -func (o *Action) HasValue() bool { - if o != nil && o.Value != nil { - return true - } - - return false -} - -// SetValue gets a reference to the given []string and assigns it to the Value field. -func (o *Action) SetValue(v []string) { - o.Value = v -} - -// GetExpression returns the Expression field value if set, zero value otherwise. -func (o *Action) GetExpression() string { - if o == nil || o.Expression == nil { - var ret string - return ret - } - return *o.Expression -} - -// 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 *Action) GetExpressionOk() (*string, bool) { - if o == nil || o.Expression == nil { - return nil, false - } - return o.Expression, true -} - -// HasExpression returns a boolean if a field has been set. -func (o *Action) HasExpression() bool { - if o != nil && o.Expression != nil { - return true - } - - return false -} - -// SetExpression gets a reference to the given string and assigns it to the Expression field. -func (o *Action) SetExpression(v string) { - o.Expression = &v -} - -// GetScriplet returns the Scriplet field value if set, zero value otherwise. -func (o *Action) GetScriplet() string { - if o == nil || o.Scriplet == nil { - var ret string - return ret - } - return *o.Scriplet -} - -// GetScripletOk returns a tuple with the Scriplet field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Action) GetScripletOk() (*string, bool) { - if o == nil || o.Scriplet == nil { - return nil, false - } - return o.Scriplet, true -} - -// HasScriplet returns a boolean if a field has been set. -func (o *Action) HasScriplet() bool { - if o != nil && o.Scriplet != nil { - return true - } - - return false -} - -// SetScriplet gets a reference to the given string and assigns it to the Scriplet field. -func (o *Action) SetScriplet(v string) { - o.Scriplet = &v -} - -// GetMacro returns the Macro field value if set, zero value otherwise. -func (o *Action) GetMacro() string { - if o == nil || o.Macro == nil { - var ret string - return ret - } - return *o.Macro -} - -// GetMacroOk returns a tuple with the Macro field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Action) GetMacroOk() (*string, bool) { - if o == nil || o.Macro == nil { - return nil, false - } - return o.Macro, true -} - -// HasMacro returns a boolean if a field has been set. -func (o *Action) HasMacro() bool { - if o != nil && o.Macro != nil { - return true - } - - return false -} - -// SetMacro gets a reference to the given string and assigns it to the Macro field. -func (o *Action) SetMacro(v string) { - o.Macro = &v -} - -func (o Action) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Action != nil { - toSerialize["action"] = o.Action - } - if o.Value != nil { - toSerialize["value"] = o.Value - } - if o.Expression != nil { - toSerialize["expression"] = o.Expression - } - if o.Scriplet != nil { - toSerialize["scriplet"] = o.Scriplet - } - if o.Macro != nil { - toSerialize["macro"] = o.Macro - } - return json.Marshal(toSerialize) -} - -type NullableAction struct { - value *Action - isSet bool -} - -func (v NullableAction) Get() *Action { - return v.value -} - -func (v *NullableAction) Set(val *Action) { - v.value = val - v.isSet = true -} - -func (v NullableAction) IsSet() bool { - return v.isSet -} - -func (v *NullableAction) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableAction(val *Action) *NullableAction { - return &NullableAction{value: val, isSet: true} -} - -func (v NullableAction) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableAction) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_action_obj.go b/model_action_obj.go new file mode 100644 index 0000000..8cabca9 --- /dev/null +++ b/model_action_obj.go @@ -0,0 +1,164 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the ActionObj type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ActionObj{} + +// ActionObj struct for ActionObj +type ActionObj struct { + // The action to apply + Action *string `json:"action,omitempty"` + // Only applicable to provisioned and set_* actions. Items in the array will be a plain text string or valid value for the selected action. + Value []string `json:"value,omitempty"` +} + +// NewActionObj instantiates a new ActionObj 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 NewActionObj() *ActionObj { + this := ActionObj{} + return &this +} + +// NewActionObjWithDefaults instantiates a new ActionObj 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 NewActionObjWithDefaults() *ActionObj { + this := ActionObj{} + return &this +} + +// GetAction returns the Action field value if set, zero value otherwise. +func (o *ActionObj) GetAction() string { + if o == nil || isNil(o.Action) { + var ret string + return ret + } + 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. +func (o *ActionObj) GetActionOk() (*string, bool) { + if o == nil || isNil(o.Action) { + return nil, false + } + return o.Action, true +} + +// HasAction returns a boolean if a field has been set. +func (o *ActionObj) HasAction() bool { + if o != nil && !isNil(o.Action) { + return true + } + + return false +} + +// SetAction gets a reference to the given string and assigns it to the Action field. +func (o *ActionObj) SetAction(v string) { + o.Action = &v +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *ActionObj) GetValue() []string { + if o == nil || isNil(o.Value) { + var ret []string + return ret + } + return o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ActionObj) GetValueOk() ([]string, bool) { + if o == nil || isNil(o.Value) { + return nil, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *ActionObj) HasValue() bool { + if o != nil && !isNil(o.Value) { + return true + } + + return false +} + +// SetValue gets a reference to the given []string and assigns it to the Value field. +func (o *ActionObj) SetValue(v []string) { + o.Value = v +} + +func (o ActionObj) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ActionObj) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.Action) { + toSerialize["action"] = o.Action + } + if !isNil(o.Value) { + toSerialize["value"] = o.Value + } + return toSerialize, nil +} + +type NullableActionObj struct { + value *ActionObj + isSet bool +} + +func (v NullableActionObj) Get() *ActionObj { + return v.value +} + +func (v *NullableActionObj) Set(val *ActionObj) { + v.value = val + v.isSet = true +} + +func (v NullableActionObj) IsSet() bool { + return v.isSet +} + +func (v *NullableActionObj) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableActionObj(val *ActionObj) *NullableActionObj { + return &NullableActionObj{value: val, isSet: true} +} + +func (v NullableActionObj) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableActionObj) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_activate_factor_request.go b/model_activate_factor_request.go deleted file mode 100644 index 5827606..0000000 --- a/model_activate_factor_request.go +++ /dev/null @@ -1,227 +0,0 @@ -/* -OneLogin API - -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -API version: 3.0.0-alpha.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package openapi - -import ( - "encoding/json" -) - -// ActivateFactorRequest struct for ActivateFactorRequest -type ActivateFactorRequest struct { - // Required. Specifies the factor to be verified. - DeviceId *int32 `json:"device_id,omitempty"` - // Optional. Sets the window of time in seconds that the factor must be verified within. - ExpiresIn *int32 `json:"expires_in,omitempty"` - // Optional. Only applies to Email MagicLink factor. - RedirectTo *string `json:"redirect_to,omitempty"` - // Optional. Only applies to SMS factor. A message template that will be sent via SMS. - CustomMessage *string `json:"custom_message,omitempty"` -} - -// NewActivateFactorRequest instantiates a new ActivateFactorRequest 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 NewActivateFactorRequest() *ActivateFactorRequest { - this := ActivateFactorRequest{} - return &this -} - -// NewActivateFactorRequestWithDefaults instantiates a new ActivateFactorRequest 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 NewActivateFactorRequestWithDefaults() *ActivateFactorRequest { - this := ActivateFactorRequest{} - return &this -} - -// GetDeviceId returns the DeviceId field value if set, zero value otherwise. -func (o *ActivateFactorRequest) GetDeviceId() int32 { - if o == nil || o.DeviceId == nil { - var ret int32 - return ret - } - return *o.DeviceId -} - -// GetDeviceIdOk returns a tuple with the DeviceId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ActivateFactorRequest) GetDeviceIdOk() (*int32, bool) { - if o == nil || o.DeviceId == nil { - return nil, false - } - return o.DeviceId, true -} - -// HasDeviceId returns a boolean if a field has been set. -func (o *ActivateFactorRequest) HasDeviceId() bool { - if o != nil && o.DeviceId != nil { - return true - } - - return false -} - -// SetDeviceId gets a reference to the given int32 and assigns it to the DeviceId field. -func (o *ActivateFactorRequest) SetDeviceId(v int32) { - o.DeviceId = &v -} - -// GetExpiresIn returns the ExpiresIn field value if set, zero value otherwise. -func (o *ActivateFactorRequest) GetExpiresIn() int32 { - if o == nil || o.ExpiresIn == nil { - var ret int32 - return ret - } - return *o.ExpiresIn -} - -// GetExpiresInOk returns a tuple with the ExpiresIn field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ActivateFactorRequest) GetExpiresInOk() (*int32, bool) { - if o == nil || o.ExpiresIn == nil { - return nil, false - } - return o.ExpiresIn, true -} - -// HasExpiresIn returns a boolean if a field has been set. -func (o *ActivateFactorRequest) HasExpiresIn() bool { - if o != nil && o.ExpiresIn != nil { - return true - } - - return false -} - -// SetExpiresIn gets a reference to the given int32 and assigns it to the ExpiresIn field. -func (o *ActivateFactorRequest) SetExpiresIn(v int32) { - o.ExpiresIn = &v -} - -// GetRedirectTo returns the RedirectTo field value if set, zero value otherwise. -func (o *ActivateFactorRequest) GetRedirectTo() string { - if o == nil || o.RedirectTo == nil { - var ret string - return ret - } - return *o.RedirectTo -} - -// GetRedirectToOk returns a tuple with the RedirectTo field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ActivateFactorRequest) GetRedirectToOk() (*string, bool) { - if o == nil || o.RedirectTo == nil { - return nil, false - } - return o.RedirectTo, true -} - -// HasRedirectTo returns a boolean if a field has been set. -func (o *ActivateFactorRequest) HasRedirectTo() bool { - if o != nil && o.RedirectTo != nil { - return true - } - - return false -} - -// SetRedirectTo gets a reference to the given string and assigns it to the RedirectTo field. -func (o *ActivateFactorRequest) SetRedirectTo(v string) { - o.RedirectTo = &v -} - -// GetCustomMessage returns the CustomMessage field value if set, zero value otherwise. -func (o *ActivateFactorRequest) GetCustomMessage() string { - if o == nil || o.CustomMessage == nil { - var ret string - return ret - } - return *o.CustomMessage -} - -// GetCustomMessageOk returns a tuple with the CustomMessage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ActivateFactorRequest) GetCustomMessageOk() (*string, bool) { - if o == nil || o.CustomMessage == nil { - return nil, false - } - return o.CustomMessage, true -} - -// HasCustomMessage returns a boolean if a field has been set. -func (o *ActivateFactorRequest) HasCustomMessage() bool { - if o != nil && o.CustomMessage != nil { - return true - } - - return false -} - -// SetCustomMessage gets a reference to the given string and assigns it to the CustomMessage field. -func (o *ActivateFactorRequest) SetCustomMessage(v string) { - o.CustomMessage = &v -} - -func (o ActivateFactorRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.DeviceId != nil { - toSerialize["device_id"] = o.DeviceId - } - if o.ExpiresIn != nil { - toSerialize["expires_in"] = o.ExpiresIn - } - if o.RedirectTo != nil { - toSerialize["redirect_to"] = o.RedirectTo - } - if o.CustomMessage != nil { - toSerialize["custom_message"] = o.CustomMessage - } - return json.Marshal(toSerialize) -} - -type NullableActivateFactorRequest struct { - value *ActivateFactorRequest - isSet bool -} - -func (v NullableActivateFactorRequest) Get() *ActivateFactorRequest { - return v.value -} - -func (v *NullableActivateFactorRequest) Set(val *ActivateFactorRequest) { - v.value = val - v.isSet = true -} - -func (v NullableActivateFactorRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableActivateFactorRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableActivateFactorRequest(val *ActivateFactorRequest) *NullableActivateFactorRequest { - return &NullableActivateFactorRequest{value: val, isSet: true} -} - -func (v NullableActivateFactorRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableActivateFactorRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_activate_mfa_factors_request.go b/model_activate_mfa_factors_request.go new file mode 100644 index 0000000..2b404dc --- /dev/null +++ b/model_activate_mfa_factors_request.go @@ -0,0 +1,201 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the ActivateMfaFactorsRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ActivateMfaFactorsRequest{} + +// ActivateMfaFactorsRequest struct for ActivateMfaFactorsRequest +type ActivateMfaFactorsRequest struct { + // Optional. Sets the window of time in seconds that the factor must be verified within. Defaults to 120 seconds (2 minutes). Max 900 seconds (15 minutes). + StateTokenExpiresIn *int32 `json:"state_token_expires_in,omitempty"` + // Optional. Defaults to false. Only applies to SMS factor. When set to `true` a 6 digit numeric code will be sent to the user instead of the standard code which is alphanumeric. + NumericSmsOtp *bool `json:"numeric_sms_otp,omitempty"` + // Optional. Only applies to SMS factor. A message template that will be sent via SMS. Max length of the message after template items are inserted is 160 characters. The following template variables can be included in the message. - {{otp_code}} - The security code. - {{expiration}} - The number of minutes until the one time code expires. + SmsMessage *string `json:"sms_message,omitempty"` +} + +// NewActivateMfaFactorsRequest instantiates a new ActivateMfaFactorsRequest 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 NewActivateMfaFactorsRequest() *ActivateMfaFactorsRequest { + this := ActivateMfaFactorsRequest{} + return &this +} + +// NewActivateMfaFactorsRequestWithDefaults instantiates a new ActivateMfaFactorsRequest 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 NewActivateMfaFactorsRequestWithDefaults() *ActivateMfaFactorsRequest { + this := ActivateMfaFactorsRequest{} + return &this +} + +// GetStateTokenExpiresIn returns the StateTokenExpiresIn field value if set, zero value otherwise. +func (o *ActivateMfaFactorsRequest) GetStateTokenExpiresIn() int32 { + if o == nil || isNil(o.StateTokenExpiresIn) { + var ret int32 + return ret + } + return *o.StateTokenExpiresIn +} + +// GetStateTokenExpiresInOk returns a tuple with the StateTokenExpiresIn field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ActivateMfaFactorsRequest) GetStateTokenExpiresInOk() (*int32, bool) { + if o == nil || isNil(o.StateTokenExpiresIn) { + return nil, false + } + return o.StateTokenExpiresIn, true +} + +// HasStateTokenExpiresIn returns a boolean if a field has been set. +func (o *ActivateMfaFactorsRequest) HasStateTokenExpiresIn() bool { + if o != nil && !isNil(o.StateTokenExpiresIn) { + return true + } + + return false +} + +// SetStateTokenExpiresIn gets a reference to the given int32 and assigns it to the StateTokenExpiresIn field. +func (o *ActivateMfaFactorsRequest) SetStateTokenExpiresIn(v int32) { + o.StateTokenExpiresIn = &v +} + +// GetNumericSmsOtp returns the NumericSmsOtp field value if set, zero value otherwise. +func (o *ActivateMfaFactorsRequest) GetNumericSmsOtp() bool { + if o == nil || isNil(o.NumericSmsOtp) { + var ret bool + return ret + } + return *o.NumericSmsOtp +} + +// GetNumericSmsOtpOk returns a tuple with the NumericSmsOtp field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ActivateMfaFactorsRequest) GetNumericSmsOtpOk() (*bool, bool) { + if o == nil || isNil(o.NumericSmsOtp) { + return nil, false + } + return o.NumericSmsOtp, true +} + +// HasNumericSmsOtp returns a boolean if a field has been set. +func (o *ActivateMfaFactorsRequest) HasNumericSmsOtp() bool { + if o != nil && !isNil(o.NumericSmsOtp) { + return true + } + + return false +} + +// SetNumericSmsOtp gets a reference to the given bool and assigns it to the NumericSmsOtp field. +func (o *ActivateMfaFactorsRequest) SetNumericSmsOtp(v bool) { + o.NumericSmsOtp = &v +} + +// GetSmsMessage returns the SmsMessage field value if set, zero value otherwise. +func (o *ActivateMfaFactorsRequest) GetSmsMessage() string { + if o == nil || isNil(o.SmsMessage) { + var ret string + return ret + } + return *o.SmsMessage +} + +// GetSmsMessageOk returns a tuple with the SmsMessage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ActivateMfaFactorsRequest) GetSmsMessageOk() (*string, bool) { + if o == nil || isNil(o.SmsMessage) { + return nil, false + } + return o.SmsMessage, true +} + +// HasSmsMessage returns a boolean if a field has been set. +func (o *ActivateMfaFactorsRequest) HasSmsMessage() bool { + if o != nil && !isNil(o.SmsMessage) { + return true + } + + return false +} + +// SetSmsMessage gets a reference to the given string and assigns it to the SmsMessage field. +func (o *ActivateMfaFactorsRequest) SetSmsMessage(v string) { + o.SmsMessage = &v +} + +func (o ActivateMfaFactorsRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ActivateMfaFactorsRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.StateTokenExpiresIn) { + toSerialize["state_token_expires_in"] = o.StateTokenExpiresIn + } + if !isNil(o.NumericSmsOtp) { + toSerialize["numeric_sms_otp"] = o.NumericSmsOtp + } + if !isNil(o.SmsMessage) { + toSerialize["sms_message"] = o.SmsMessage + } + return toSerialize, nil +} + +type NullableActivateMfaFactorsRequest struct { + value *ActivateMfaFactorsRequest + isSet bool +} + +func (v NullableActivateMfaFactorsRequest) Get() *ActivateMfaFactorsRequest { + return v.value +} + +func (v *NullableActivateMfaFactorsRequest) Set(val *ActivateMfaFactorsRequest) { + v.value = val + v.isSet = true +} + +func (v NullableActivateMfaFactorsRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableActivateMfaFactorsRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableActivateMfaFactorsRequest(val *ActivateMfaFactorsRequest) *NullableActivateMfaFactorsRequest { + return &NullableActivateMfaFactorsRequest{value: val, isSet: true} +} + +func (v NullableActivateMfaFactorsRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableActivateMfaFactorsRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_add_access_token_claim_request.go b/model_add_access_token_claim_request.go deleted file mode 100644 index 565ce22..0000000 --- a/model_add_access_token_claim_request.go +++ /dev/null @@ -1,187 +0,0 @@ -/* -OneLogin API - -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -API version: 3.0.0-alpha.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package openapi - -import ( - "encoding/json" -) - -// AddAccessTokenClaimRequest struct for AddAccessTokenClaimRequest -type AddAccessTokenClaimRequest struct { - Name *string `json:"name,omitempty"` - UserAttributeMappings *string `json:"user_attribute_mappings,omitempty"` - UserAttributeMacros *string `json:"user_attribute_macros,omitempty"` -} - -// NewAddAccessTokenClaimRequest instantiates a new AddAccessTokenClaimRequest 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 NewAddAccessTokenClaimRequest() *AddAccessTokenClaimRequest { - this := AddAccessTokenClaimRequest{} - return &this -} - -// NewAddAccessTokenClaimRequestWithDefaults instantiates a new AddAccessTokenClaimRequest 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 NewAddAccessTokenClaimRequestWithDefaults() *AddAccessTokenClaimRequest { - this := AddAccessTokenClaimRequest{} - return &this -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *AddAccessTokenClaimRequest) GetName() string { - if o == nil || o.Name == nil { - var ret string - return ret - } - return *o.Name -} - -// 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 *AddAccessTokenClaimRequest) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *AddAccessTokenClaimRequest) HasName() bool { - if o != nil && o.Name != nil { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *AddAccessTokenClaimRequest) SetName(v string) { - o.Name = &v -} - -// GetUserAttributeMappings returns the UserAttributeMappings field value if set, zero value otherwise. -func (o *AddAccessTokenClaimRequest) GetUserAttributeMappings() string { - if o == nil || o.UserAttributeMappings == nil { - var ret string - return ret - } - return *o.UserAttributeMappings -} - -// GetUserAttributeMappingsOk returns a tuple with the UserAttributeMappings field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AddAccessTokenClaimRequest) GetUserAttributeMappingsOk() (*string, bool) { - if o == nil || o.UserAttributeMappings == nil { - return nil, false - } - return o.UserAttributeMappings, true -} - -// HasUserAttributeMappings returns a boolean if a field has been set. -func (o *AddAccessTokenClaimRequest) HasUserAttributeMappings() bool { - if o != nil && o.UserAttributeMappings != nil { - return true - } - - return false -} - -// SetUserAttributeMappings gets a reference to the given string and assigns it to the UserAttributeMappings field. -func (o *AddAccessTokenClaimRequest) SetUserAttributeMappings(v string) { - o.UserAttributeMappings = &v -} - -// GetUserAttributeMacros returns the UserAttributeMacros field value if set, zero value otherwise. -func (o *AddAccessTokenClaimRequest) GetUserAttributeMacros() string { - if o == nil || o.UserAttributeMacros == nil { - var ret string - return ret - } - return *o.UserAttributeMacros -} - -// GetUserAttributeMacrosOk returns a tuple with the UserAttributeMacros field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AddAccessTokenClaimRequest) GetUserAttributeMacrosOk() (*string, bool) { - if o == nil || o.UserAttributeMacros == nil { - return nil, false - } - return o.UserAttributeMacros, true -} - -// HasUserAttributeMacros returns a boolean if a field has been set. -func (o *AddAccessTokenClaimRequest) HasUserAttributeMacros() bool { - if o != nil && o.UserAttributeMacros != nil { - return true - } - - return false -} - -// SetUserAttributeMacros gets a reference to the given string and assigns it to the UserAttributeMacros field. -func (o *AddAccessTokenClaimRequest) SetUserAttributeMacros(v string) { - o.UserAttributeMacros = &v -} - -func (o AddAccessTokenClaimRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Name != nil { - toSerialize["name"] = o.Name - } - if o.UserAttributeMappings != nil { - toSerialize["user_attribute_mappings"] = o.UserAttributeMappings - } - if o.UserAttributeMacros != nil { - toSerialize["user_attribute_macros"] = o.UserAttributeMacros - } - return json.Marshal(toSerialize) -} - -type NullableAddAccessTokenClaimRequest struct { - value *AddAccessTokenClaimRequest - isSet bool -} - -func (v NullableAddAccessTokenClaimRequest) Get() *AddAccessTokenClaimRequest { - return v.value -} - -func (v *NullableAddAccessTokenClaimRequest) Set(val *AddAccessTokenClaimRequest) { - v.value = val - v.isSet = true -} - -func (v NullableAddAccessTokenClaimRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableAddAccessTokenClaimRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableAddAccessTokenClaimRequest(val *AddAccessTokenClaimRequest) *NullableAddAccessTokenClaimRequest { - return &NullableAddAccessTokenClaimRequest{value: val, isSet: true} -} - -func (v NullableAddAccessTokenClaimRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableAddAccessTokenClaimRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_add_client_app_201_response.go b/model_add_client_app_201_response.go new file mode 100644 index 0000000..835328e --- /dev/null +++ b/model_add_client_app_201_response.go @@ -0,0 +1,162 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the AddClientApp201Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AddClientApp201Response{} + +// AddClientApp201Response struct for AddClientApp201Response +type AddClientApp201Response struct { + AppId *int32 `json:"app_id,omitempty"` + ApiAuthId *int32 `json:"api_auth_id,omitempty"` +} + +// NewAddClientApp201Response instantiates a new AddClientApp201Response 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 NewAddClientApp201Response() *AddClientApp201Response { + this := AddClientApp201Response{} + return &this +} + +// NewAddClientApp201ResponseWithDefaults instantiates a new AddClientApp201Response 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 NewAddClientApp201ResponseWithDefaults() *AddClientApp201Response { + this := AddClientApp201Response{} + return &this +} + +// GetAppId returns the AppId field value if set, zero value otherwise. +func (o *AddClientApp201Response) GetAppId() int32 { + if o == nil || isNil(o.AppId) { + var ret int32 + return ret + } + return *o.AppId +} + +// GetAppIdOk returns a tuple with the AppId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AddClientApp201Response) GetAppIdOk() (*int32, bool) { + if o == nil || isNil(o.AppId) { + return nil, false + } + return o.AppId, true +} + +// HasAppId returns a boolean if a field has been set. +func (o *AddClientApp201Response) HasAppId() bool { + if o != nil && !isNil(o.AppId) { + return true + } + + return false +} + +// SetAppId gets a reference to the given int32 and assigns it to the AppId field. +func (o *AddClientApp201Response) SetAppId(v int32) { + o.AppId = &v +} + +// GetApiAuthId returns the ApiAuthId field value if set, zero value otherwise. +func (o *AddClientApp201Response) GetApiAuthId() int32 { + if o == nil || isNil(o.ApiAuthId) { + var ret int32 + return ret + } + return *o.ApiAuthId +} + +// GetApiAuthIdOk returns a tuple with the ApiAuthId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AddClientApp201Response) GetApiAuthIdOk() (*int32, bool) { + if o == nil || isNil(o.ApiAuthId) { + return nil, false + } + return o.ApiAuthId, true +} + +// HasApiAuthId returns a boolean if a field has been set. +func (o *AddClientApp201Response) HasApiAuthId() bool { + if o != nil && !isNil(o.ApiAuthId) { + return true + } + + return false +} + +// SetApiAuthId gets a reference to the given int32 and assigns it to the ApiAuthId field. +func (o *AddClientApp201Response) SetApiAuthId(v int32) { + o.ApiAuthId = &v +} + +func (o AddClientApp201Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AddClientApp201Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.AppId) { + toSerialize["app_id"] = o.AppId + } + if !isNil(o.ApiAuthId) { + toSerialize["api_auth_id"] = o.ApiAuthId + } + return toSerialize, nil +} + +type NullableAddClientApp201Response struct { + value *AddClientApp201Response + isSet bool +} + +func (v NullableAddClientApp201Response) Get() *AddClientApp201Response { + return v.value +} + +func (v *NullableAddClientApp201Response) Set(val *AddClientApp201Response) { + v.value = val + v.isSet = true +} + +func (v NullableAddClientApp201Response) IsSet() bool { + return v.isSet +} + +func (v *NullableAddClientApp201Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAddClientApp201Response(val *AddClientApp201Response) *NullableAddClientApp201Response { + return &NullableAddClientApp201Response{value: val, isSet: true} +} + +func (v NullableAddClientApp201Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAddClientApp201Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_add_client_app_request.go b/model_add_client_app_request.go index a983d0c..8f5599a 100644 --- a/model_add_client_app_request.go +++ b/model_add_client_app_request.go @@ -1,22 +1,27 @@ /* OneLogin API -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) +OpenAPI Specification for OneLogin -API version: 3.0.0-alpha.1 +API version: 3.1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package openapi +package onelogin import ( "encoding/json" ) +// checks if the AddClientAppRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AddClientAppRequest{} + // AddClientAppRequest struct for AddClientAppRequest type AddClientAppRequest struct { + // The ID of the OpenId Connect app to allow access through. AppId *int32 `json:"app_id,omitempty"` + // An array of Scope IDs that represent scopes the app can request Scopes []int32 `json:"scopes,omitempty"` } @@ -39,7 +44,7 @@ func NewAddClientAppRequestWithDefaults() *AddClientAppRequest { // GetAppId returns the AppId field value if set, zero value otherwise. func (o *AddClientAppRequest) GetAppId() int32 { - if o == nil || o.AppId == nil { + if o == nil || isNil(o.AppId) { var ret int32 return ret } @@ -49,7 +54,7 @@ func (o *AddClientAppRequest) GetAppId() int32 { // GetAppIdOk returns a tuple with the AppId field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AddClientAppRequest) GetAppIdOk() (*int32, bool) { - if o == nil || o.AppId == nil { + if o == nil || isNil(o.AppId) { return nil, false } return o.AppId, true @@ -57,7 +62,7 @@ func (o *AddClientAppRequest) GetAppIdOk() (*int32, bool) { // HasAppId returns a boolean if a field has been set. func (o *AddClientAppRequest) HasAppId() bool { - if o != nil && o.AppId != nil { + if o != nil && !isNil(o.AppId) { return true } @@ -71,7 +76,7 @@ func (o *AddClientAppRequest) SetAppId(v int32) { // GetScopes returns the Scopes field value if set, zero value otherwise. func (o *AddClientAppRequest) GetScopes() []int32 { - if o == nil || o.Scopes == nil { + if o == nil || isNil(o.Scopes) { var ret []int32 return ret } @@ -81,7 +86,7 @@ func (o *AddClientAppRequest) GetScopes() []int32 { // GetScopesOk returns a tuple with the Scopes field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AddClientAppRequest) GetScopesOk() ([]int32, bool) { - if o == nil || o.Scopes == nil { + if o == nil || isNil(o.Scopes) { return nil, false } return o.Scopes, true @@ -89,7 +94,7 @@ func (o *AddClientAppRequest) GetScopesOk() ([]int32, bool) { // HasScopes returns a boolean if a field has been set. func (o *AddClientAppRequest) HasScopes() bool { - if o != nil && o.Scopes != nil { + if o != nil && !isNil(o.Scopes) { return true } @@ -102,14 +107,22 @@ func (o *AddClientAppRequest) SetScopes(v []int32) { } func (o AddClientAppRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AddClientAppRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.AppId != nil { + if !isNil(o.AppId) { toSerialize["app_id"] = o.AppId } - if o.Scopes != nil { + if !isNil(o.Scopes) { toSerialize["scopes"] = o.Scopes } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableAddClientAppRequest struct { diff --git a/model_add_privilege_to_role_201_response.go b/model_add_privilege_to_role_201_response.go new file mode 100644 index 0000000..0bd7ed5 --- /dev/null +++ b/model_add_privilege_to_role_201_response.go @@ -0,0 +1,126 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the AddPrivilegeToRole201Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AddPrivilegeToRole201Response{} + +// AddPrivilegeToRole201Response struct for AddPrivilegeToRole201Response +type AddPrivilegeToRole201Response struct { + Success *bool `json:"success,omitempty"` +} + +// NewAddPrivilegeToRole201Response instantiates a new AddPrivilegeToRole201Response 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 NewAddPrivilegeToRole201Response() *AddPrivilegeToRole201Response { + this := AddPrivilegeToRole201Response{} + return &this +} + +// NewAddPrivilegeToRole201ResponseWithDefaults instantiates a new AddPrivilegeToRole201Response 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 NewAddPrivilegeToRole201ResponseWithDefaults() *AddPrivilegeToRole201Response { + this := AddPrivilegeToRole201Response{} + return &this +} + +// GetSuccess returns the Success field value if set, zero value otherwise. +func (o *AddPrivilegeToRole201Response) GetSuccess() bool { + if o == nil || isNil(o.Success) { + var ret bool + return ret + } + return *o.Success +} + +// GetSuccessOk returns a tuple with the Success field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AddPrivilegeToRole201Response) GetSuccessOk() (*bool, bool) { + if o == nil || isNil(o.Success) { + return nil, false + } + return o.Success, true +} + +// HasSuccess returns a boolean if a field has been set. +func (o *AddPrivilegeToRole201Response) HasSuccess() bool { + if o != nil && !isNil(o.Success) { + return true + } + + return false +} + +// SetSuccess gets a reference to the given bool and assigns it to the Success field. +func (o *AddPrivilegeToRole201Response) SetSuccess(v bool) { + o.Success = &v +} + +func (o AddPrivilegeToRole201Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AddPrivilegeToRole201Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.Success) { + toSerialize["success"] = o.Success + } + return toSerialize, nil +} + +type NullableAddPrivilegeToRole201Response struct { + value *AddPrivilegeToRole201Response + isSet bool +} + +func (v NullableAddPrivilegeToRole201Response) Get() *AddPrivilegeToRole201Response { + return v.value +} + +func (v *NullableAddPrivilegeToRole201Response) Set(val *AddPrivilegeToRole201Response) { + v.value = val + v.isSet = true +} + +func (v NullableAddPrivilegeToRole201Response) IsSet() bool { + return v.isSet +} + +func (v *NullableAddPrivilegeToRole201Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAddPrivilegeToRole201Response(val *AddPrivilegeToRole201Response) *NullableAddPrivilegeToRole201Response { + return &NullableAddPrivilegeToRole201Response{value: val, isSet: true} +} + +func (v NullableAddPrivilegeToRole201Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAddPrivilegeToRole201Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_add_privilege_to_role_request.go b/model_add_privilege_to_role_request.go new file mode 100644 index 0000000..5a194dc --- /dev/null +++ b/model_add_privilege_to_role_request.go @@ -0,0 +1,126 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the AddPrivilegeToRoleRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AddPrivilegeToRoleRequest{} + +// AddPrivilegeToRoleRequest struct for AddPrivilegeToRoleRequest +type AddPrivilegeToRoleRequest struct { + Roles []int32 `json:"roles,omitempty"` +} + +// NewAddPrivilegeToRoleRequest instantiates a new AddPrivilegeToRoleRequest 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 NewAddPrivilegeToRoleRequest() *AddPrivilegeToRoleRequest { + this := AddPrivilegeToRoleRequest{} + return &this +} + +// NewAddPrivilegeToRoleRequestWithDefaults instantiates a new AddPrivilegeToRoleRequest 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 NewAddPrivilegeToRoleRequestWithDefaults() *AddPrivilegeToRoleRequest { + this := AddPrivilegeToRoleRequest{} + return &this +} + +// GetRoles returns the Roles field value if set, zero value otherwise. +func (o *AddPrivilegeToRoleRequest) GetRoles() []int32 { + if o == nil || isNil(o.Roles) { + var ret []int32 + return ret + } + return o.Roles +} + +// GetRolesOk returns a tuple with the Roles field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AddPrivilegeToRoleRequest) GetRolesOk() ([]int32, bool) { + if o == nil || isNil(o.Roles) { + return nil, false + } + return o.Roles, true +} + +// HasRoles returns a boolean if a field has been set. +func (o *AddPrivilegeToRoleRequest) HasRoles() bool { + if o != nil && !isNil(o.Roles) { + return true + } + + return false +} + +// SetRoles gets a reference to the given []int32 and assigns it to the Roles field. +func (o *AddPrivilegeToRoleRequest) SetRoles(v []int32) { + o.Roles = v +} + +func (o AddPrivilegeToRoleRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AddPrivilegeToRoleRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.Roles) { + toSerialize["roles"] = o.Roles + } + return toSerialize, nil +} + +type NullableAddPrivilegeToRoleRequest struct { + value *AddPrivilegeToRoleRequest + isSet bool +} + +func (v NullableAddPrivilegeToRoleRequest) Get() *AddPrivilegeToRoleRequest { + return v.value +} + +func (v *NullableAddPrivilegeToRoleRequest) Set(val *AddPrivilegeToRoleRequest) { + v.value = val + v.isSet = true +} + +func (v NullableAddPrivilegeToRoleRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableAddPrivilegeToRoleRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAddPrivilegeToRoleRequest(val *AddPrivilegeToRoleRequest) *NullableAddPrivilegeToRoleRequest { + return &NullableAddPrivilegeToRoleRequest{value: val, isSet: true} +} + +func (v NullableAddPrivilegeToRoleRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAddPrivilegeToRoleRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_add_role_users_200_response_inner.go b/model_add_role_users_200_response_inner.go deleted file mode 100644 index b284006..0000000 --- a/model_add_role_users_200_response_inner.go +++ /dev/null @@ -1,115 +0,0 @@ -/* -OneLogin API - -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -API version: 3.0.0-alpha.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package openapi - -import ( - "encoding/json" -) - -// AddRoleUsers200ResponseInner struct for AddRoleUsers200ResponseInner -type AddRoleUsers200ResponseInner struct { - Id *int32 `json:"id,omitempty"` -} - -// NewAddRoleUsers200ResponseInner instantiates a new AddRoleUsers200ResponseInner 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 NewAddRoleUsers200ResponseInner() *AddRoleUsers200ResponseInner { - this := AddRoleUsers200ResponseInner{} - return &this -} - -// NewAddRoleUsers200ResponseInnerWithDefaults instantiates a new AddRoleUsers200ResponseInner 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 NewAddRoleUsers200ResponseInnerWithDefaults() *AddRoleUsers200ResponseInner { - this := AddRoleUsers200ResponseInner{} - return &this -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *AddRoleUsers200ResponseInner) GetId() int32 { - if o == nil || o.Id == nil { - var ret int32 - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AddRoleUsers200ResponseInner) GetIdOk() (*int32, bool) { - if o == nil || o.Id == nil { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *AddRoleUsers200ResponseInner) HasId() bool { - if o != nil && o.Id != nil { - return true - } - - return false -} - -// SetId gets a reference to the given int32 and assigns it to the Id field. -func (o *AddRoleUsers200ResponseInner) SetId(v int32) { - o.Id = &v -} - -func (o AddRoleUsers200ResponseInner) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - return json.Marshal(toSerialize) -} - -type NullableAddRoleUsers200ResponseInner struct { - value *AddRoleUsers200ResponseInner - isSet bool -} - -func (v NullableAddRoleUsers200ResponseInner) Get() *AddRoleUsers200ResponseInner { - return v.value -} - -func (v *NullableAddRoleUsers200ResponseInner) Set(val *AddRoleUsers200ResponseInner) { - v.value = val - v.isSet = true -} - -func (v NullableAddRoleUsers200ResponseInner) IsSet() bool { - return v.isSet -} - -func (v *NullableAddRoleUsers200ResponseInner) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableAddRoleUsers200ResponseInner(val *AddRoleUsers200ResponseInner) *NullableAddRoleUsers200ResponseInner { - return &NullableAddRoleUsers200ResponseInner{value: val, isSet: true} -} - -func (v NullableAddRoleUsers200ResponseInner) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableAddRoleUsers200ResponseInner) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_add_roles_to_user_request.go b/model_add_roles_to_user_request.go new file mode 100644 index 0000000..e7b96b9 --- /dev/null +++ b/model_add_roles_to_user_request.go @@ -0,0 +1,118 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the AddRolesToUserRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AddRolesToUserRequest{} + +// AddRolesToUserRequest struct for AddRolesToUserRequest +type AddRolesToUserRequest struct { + // Set to an array of one or more role IDs. The IDs must be positive integers. + RoleIdArray []int32 `json:"role_id_array"` +} + +// NewAddRolesToUserRequest instantiates a new AddRolesToUserRequest 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 NewAddRolesToUserRequest(roleIdArray []int32) *AddRolesToUserRequest { + this := AddRolesToUserRequest{} + this.RoleIdArray = roleIdArray + return &this +} + +// NewAddRolesToUserRequestWithDefaults instantiates a new AddRolesToUserRequest 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 NewAddRolesToUserRequestWithDefaults() *AddRolesToUserRequest { + this := AddRolesToUserRequest{} + return &this +} + +// GetRoleIdArray returns the RoleIdArray field value +func (o *AddRolesToUserRequest) GetRoleIdArray() []int32 { + if o == nil { + var ret []int32 + return ret + } + + return o.RoleIdArray +} + +// GetRoleIdArrayOk returns a tuple with the RoleIdArray field value +// and a boolean to check if the value has been set. +func (o *AddRolesToUserRequest) GetRoleIdArrayOk() ([]int32, bool) { + if o == nil { + return nil, false + } + return o.RoleIdArray, true +} + +// SetRoleIdArray sets field value +func (o *AddRolesToUserRequest) SetRoleIdArray(v []int32) { + o.RoleIdArray = v +} + +func (o AddRolesToUserRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AddRolesToUserRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["role_id_array"] = o.RoleIdArray + return toSerialize, nil +} + +type NullableAddRolesToUserRequest struct { + value *AddRolesToUserRequest + isSet bool +} + +func (v NullableAddRolesToUserRequest) Get() *AddRolesToUserRequest { + return v.value +} + +func (v *NullableAddRolesToUserRequest) Set(val *AddRolesToUserRequest) { + v.value = val + v.isSet = true +} + +func (v NullableAddRolesToUserRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableAddRolesToUserRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAddRolesToUserRequest(val *AddRolesToUserRequest) *NullableAddRolesToUserRequest { + return &NullableAddRolesToUserRequest{value: val, isSet: true} +} + +func (v NullableAddRolesToUserRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAddRolesToUserRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_add_scope_request.go b/model_add_scope_request.go deleted file mode 100644 index 4d076e9..0000000 --- a/model_add_scope_request.go +++ /dev/null @@ -1,151 +0,0 @@ -/* -OneLogin API - -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -API version: 3.0.0-alpha.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package openapi - -import ( - "encoding/json" -) - -// AddScopeRequest struct for AddScopeRequest -type AddScopeRequest struct { - Value *string `json:"value,omitempty"` - Description *string `json:"description,omitempty"` -} - -// NewAddScopeRequest instantiates a new AddScopeRequest 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 NewAddScopeRequest() *AddScopeRequest { - this := AddScopeRequest{} - return &this -} - -// NewAddScopeRequestWithDefaults instantiates a new AddScopeRequest 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 NewAddScopeRequestWithDefaults() *AddScopeRequest { - this := AddScopeRequest{} - return &this -} - -// GetValue returns the Value field value if set, zero value otherwise. -func (o *AddScopeRequest) GetValue() string { - if o == nil || o.Value == nil { - var ret string - return ret - } - return *o.Value -} - -// GetValueOk returns a tuple with the Value field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AddScopeRequest) GetValueOk() (*string, bool) { - if o == nil || o.Value == nil { - return nil, false - } - return o.Value, true -} - -// HasValue returns a boolean if a field has been set. -func (o *AddScopeRequest) HasValue() bool { - if o != nil && o.Value != nil { - return true - } - - return false -} - -// SetValue gets a reference to the given string and assigns it to the Value field. -func (o *AddScopeRequest) SetValue(v string) { - o.Value = &v -} - -// GetDescription returns the Description field value if set, zero value otherwise. -func (o *AddScopeRequest) GetDescription() string { - if o == nil || o.Description == nil { - var ret string - return ret - } - return *o.Description -} - -// 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 *AddScopeRequest) GetDescriptionOk() (*string, bool) { - if o == nil || o.Description == nil { - return nil, false - } - return o.Description, true -} - -// HasDescription returns a boolean if a field has been set. -func (o *AddScopeRequest) HasDescription() bool { - if o != nil && o.Description != nil { - return true - } - - return false -} - -// SetDescription gets a reference to the given string and assigns it to the Description field. -func (o *AddScopeRequest) SetDescription(v string) { - o.Description = &v -} - -func (o AddScopeRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Value != nil { - toSerialize["value"] = o.Value - } - if o.Description != nil { - toSerialize["description"] = o.Description - } - return json.Marshal(toSerialize) -} - -type NullableAddScopeRequest struct { - value *AddScopeRequest - isSet bool -} - -func (v NullableAddScopeRequest) Get() *AddScopeRequest { - return v.value -} - -func (v *NullableAddScopeRequest) Set(val *AddScopeRequest) { - v.value = val - v.isSet = true -} - -func (v NullableAddScopeRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableAddScopeRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableAddScopeRequest(val *AddScopeRequest) *NullableAddScopeRequest { - return &NullableAddScopeRequest{value: val, isSet: true} -} - -func (v NullableAddScopeRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableAddScopeRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_status_1.go b/model_alt_err.go similarity index 56% rename from model_status_1.go rename to model_alt_err.go index fbb34f0..8faa2ef 100644 --- a/model_status_1.go +++ b/model_alt_err.go @@ -1,185 +1,199 @@ /* OneLogin API -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) +OpenAPI Specification for OneLogin -API version: 3.0.0-alpha.1 +API version: 3.1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package openapi +package onelogin import ( "encoding/json" ) -// Status1 struct for Status1 -type Status1 struct { - Message *string `json:"message,omitempty"` +// checks if the AltErr type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AltErr{} + +// AltErr struct for AltErr +type AltErr struct { + // HTTP error code https://developer.mozilla.org/en-US/docs/Web/HTTP/Status StatusCode *int32 `json:"statusCode,omitempty"` + // Error Code Name Name *string `json:"name,omitempty"` + // Description of Error + Message *string `json:"message,omitempty"` } -// NewStatus1 instantiates a new Status1 object +// NewAltErr instantiates a new AltErr 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 NewStatus1() *Status1 { - this := Status1{} +func NewAltErr() *AltErr { + this := AltErr{} return &this } -// NewStatus1WithDefaults instantiates a new Status1 object +// NewAltErrWithDefaults instantiates a new AltErr 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 NewStatus1WithDefaults() *Status1 { - this := Status1{} +func NewAltErrWithDefaults() *AltErr { + this := AltErr{} return &this } -// GetMessage returns the Message field value if set, zero value otherwise. -func (o *Status1) GetMessage() string { - if o == nil || o.Message == nil { - var ret string +// GetStatusCode returns the StatusCode field value if set, zero value otherwise. +func (o *AltErr) GetStatusCode() int32 { + if o == nil || isNil(o.StatusCode) { + var ret int32 return ret } - return *o.Message + return *o.StatusCode } -// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// GetStatusCodeOk returns a tuple with the StatusCode field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Status1) GetMessageOk() (*string, bool) { - if o == nil || o.Message == nil { +func (o *AltErr) GetStatusCodeOk() (*int32, bool) { + if o == nil || isNil(o.StatusCode) { return nil, false } - return o.Message, true + return o.StatusCode, true } -// HasMessage returns a boolean if a field has been set. -func (o *Status1) HasMessage() bool { - if o != nil && o.Message != nil { +// HasStatusCode returns a boolean if a field has been set. +func (o *AltErr) HasStatusCode() bool { + if o != nil && !isNil(o.StatusCode) { return true } return false } -// SetMessage gets a reference to the given string and assigns it to the Message field. -func (o *Status1) SetMessage(v string) { - o.Message = &v +// SetStatusCode gets a reference to the given int32 and assigns it to the StatusCode field. +func (o *AltErr) SetStatusCode(v int32) { + o.StatusCode = &v } -// GetStatusCode returns the StatusCode field value if set, zero value otherwise. -func (o *Status1) GetStatusCode() int32 { - if o == nil || o.StatusCode == nil { - var ret int32 +// GetName returns the Name field value if set, zero value otherwise. +func (o *AltErr) GetName() string { + if o == nil || isNil(o.Name) { + var ret string return ret } - return *o.StatusCode + return *o.Name } -// GetStatusCodeOk returns a tuple with the StatusCode field value if set, nil otherwise +// 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 *Status1) GetStatusCodeOk() (*int32, bool) { - if o == nil || o.StatusCode == nil { +func (o *AltErr) GetNameOk() (*string, bool) { + if o == nil || isNil(o.Name) { return nil, false } - return o.StatusCode, true + return o.Name, true } -// HasStatusCode returns a boolean if a field has been set. -func (o *Status1) HasStatusCode() bool { - if o != nil && o.StatusCode != nil { +// HasName returns a boolean if a field has been set. +func (o *AltErr) HasName() bool { + if o != nil && !isNil(o.Name) { return true } return false } -// SetStatusCode gets a reference to the given int32 and assigns it to the StatusCode field. -func (o *Status1) SetStatusCode(v int32) { - o.StatusCode = &v +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *AltErr) SetName(v string) { + o.Name = &v } -// GetName returns the Name field value if set, zero value otherwise. -func (o *Status1) GetName() string { - if o == nil || o.Name == nil { +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *AltErr) GetMessage() string { + if o == nil || isNil(o.Message) { var ret string return ret } - return *o.Name + return *o.Message } -// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Status1) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { +func (o *AltErr) GetMessageOk() (*string, bool) { + if o == nil || isNil(o.Message) { return nil, false } - return o.Name, true + return o.Message, true } -// HasName returns a boolean if a field has been set. -func (o *Status1) HasName() bool { - if o != nil && o.Name != nil { +// HasMessage returns a boolean if a field has been set. +func (o *AltErr) HasMessage() bool { + if o != nil && !isNil(o.Message) { return true } return false } -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *Status1) SetName(v string) { - o.Name = &v +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *AltErr) SetMessage(v string) { + o.Message = &v } -func (o Status1) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Message != nil { - toSerialize["message"] = o.Message +func (o AltErr) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.StatusCode != nil { + return json.Marshal(toSerialize) +} + +func (o AltErr) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.StatusCode) { toSerialize["statusCode"] = o.StatusCode } - if o.Name != nil { + if !isNil(o.Name) { toSerialize["name"] = o.Name } - return json.Marshal(toSerialize) + if !isNil(o.Message) { + toSerialize["message"] = o.Message + } + return toSerialize, nil } -type NullableStatus1 struct { - value *Status1 +type NullableAltErr struct { + value *AltErr isSet bool } -func (v NullableStatus1) Get() *Status1 { +func (v NullableAltErr) Get() *AltErr { return v.value } -func (v *NullableStatus1) Set(val *Status1) { +func (v *NullableAltErr) Set(val *AltErr) { v.value = val v.isSet = true } -func (v NullableStatus1) IsSet() bool { +func (v NullableAltErr) IsSet() bool { return v.isSet } -func (v *NullableStatus1) Unset() { +func (v *NullableAltErr) Unset() { v.value = nil v.isSet = false } -func NewNullableStatus1(val *Status1) *NullableStatus1 { - return &NullableStatus1{value: val, isSet: true} +func NewNullableAltErr(val *AltErr) *NullableAltErr { + return &NullableAltErr{value: val, isSet: true} } -func (v NullableStatus1) MarshalJSON() ([]byte, error) { +func (v NullableAltErr) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } -func (v *NullableStatus1) UnmarshalJSON(src []byte) error { +func (v *NullableAltErr) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/model_app_parameters.go b/model_app_parameters.go new file mode 100644 index 0000000..1b8c225 --- /dev/null +++ b/model_app_parameters.go @@ -0,0 +1,266 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the AppParameters type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AppParameters{} + +// AppParameters The parameters section contains parameterized attributes that have defined at the connector level as well as custom attributes that have been defined specifically for this app. Regardless of how they are defined, all parameters have the following attributes. Each parameter is an object with the key for the object being set as the parameters short name. +type AppParameters struct { + // A user attribute to map values from For custom attributes prefix the name of the attribute with `custom_attribute_`. e.g. To get the value for custom attribute `employee_id` use `custom_attribute_employee_id`. + UserAttributeMappings *string `json:"user_attribute_mappings,omitempty"` + // When `user_attribute_mappings` is set to `_macro_` this macro will be used to assign the parameter value. + UserAttributeMacros *string `json:"user_attribute_macros,omitempty"` + // The can only be set when creating a new parameter. It can not be updated. + Label *string `json:"label,omitempty"` + // When true, this parameter will be included in a SAML assertion payload. + IncludeInSamlAssertion *bool `json:"include_in_saml_assertion,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _AppParameters AppParameters + +// NewAppParameters instantiates a new AppParameters 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 NewAppParameters() *AppParameters { + this := AppParameters{} + return &this +} + +// NewAppParametersWithDefaults instantiates a new AppParameters 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 NewAppParametersWithDefaults() *AppParameters { + this := AppParameters{} + return &this +} + +// GetUserAttributeMappings returns the UserAttributeMappings field value if set, zero value otherwise. +func (o *AppParameters) GetUserAttributeMappings() string { + if o == nil || isNil(o.UserAttributeMappings) { + var ret string + return ret + } + return *o.UserAttributeMappings +} + +// GetUserAttributeMappingsOk returns a tuple with the UserAttributeMappings field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AppParameters) GetUserAttributeMappingsOk() (*string, bool) { + if o == nil || isNil(o.UserAttributeMappings) { + return nil, false + } + return o.UserAttributeMappings, true +} + +// HasUserAttributeMappings returns a boolean if a field has been set. +func (o *AppParameters) HasUserAttributeMappings() bool { + if o != nil && !isNil(o.UserAttributeMappings) { + return true + } + + return false +} + +// SetUserAttributeMappings gets a reference to the given string and assigns it to the UserAttributeMappings field. +func (o *AppParameters) SetUserAttributeMappings(v string) { + o.UserAttributeMappings = &v +} + +// GetUserAttributeMacros returns the UserAttributeMacros field value if set, zero value otherwise. +func (o *AppParameters) GetUserAttributeMacros() string { + if o == nil || isNil(o.UserAttributeMacros) { + var ret string + return ret + } + return *o.UserAttributeMacros +} + +// GetUserAttributeMacrosOk returns a tuple with the UserAttributeMacros field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AppParameters) GetUserAttributeMacrosOk() (*string, bool) { + if o == nil || isNil(o.UserAttributeMacros) { + return nil, false + } + return o.UserAttributeMacros, true +} + +// HasUserAttributeMacros returns a boolean if a field has been set. +func (o *AppParameters) HasUserAttributeMacros() bool { + if o != nil && !isNil(o.UserAttributeMacros) { + return true + } + + return false +} + +// SetUserAttributeMacros gets a reference to the given string and assigns it to the UserAttributeMacros field. +func (o *AppParameters) SetUserAttributeMacros(v string) { + o.UserAttributeMacros = &v +} + +// GetLabel returns the Label field value if set, zero value otherwise. +func (o *AppParameters) GetLabel() string { + if o == nil || isNil(o.Label) { + var ret string + return ret + } + return *o.Label +} + +// 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 *AppParameters) GetLabelOk() (*string, bool) { + if o == nil || isNil(o.Label) { + return nil, false + } + return o.Label, true +} + +// HasLabel returns a boolean if a field has been set. +func (o *AppParameters) HasLabel() bool { + if o != nil && !isNil(o.Label) { + return true + } + + return false +} + +// SetLabel gets a reference to the given string and assigns it to the Label field. +func (o *AppParameters) SetLabel(v string) { + o.Label = &v +} + +// GetIncludeInSamlAssertion returns the IncludeInSamlAssertion field value if set, zero value otherwise. +func (o *AppParameters) GetIncludeInSamlAssertion() bool { + if o == nil || isNil(o.IncludeInSamlAssertion) { + var ret bool + return ret + } + return *o.IncludeInSamlAssertion +} + +// GetIncludeInSamlAssertionOk returns a tuple with the IncludeInSamlAssertion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AppParameters) GetIncludeInSamlAssertionOk() (*bool, bool) { + if o == nil || isNil(o.IncludeInSamlAssertion) { + return nil, false + } + return o.IncludeInSamlAssertion, true +} + +// HasIncludeInSamlAssertion returns a boolean if a field has been set. +func (o *AppParameters) HasIncludeInSamlAssertion() bool { + if o != nil && !isNil(o.IncludeInSamlAssertion) { + return true + } + + return false +} + +// SetIncludeInSamlAssertion gets a reference to the given bool and assigns it to the IncludeInSamlAssertion field. +func (o *AppParameters) SetIncludeInSamlAssertion(v bool) { + o.IncludeInSamlAssertion = &v +} + +func (o AppParameters) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AppParameters) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.UserAttributeMappings) { + toSerialize["user_attribute_mappings"] = o.UserAttributeMappings + } + if !isNil(o.UserAttributeMacros) { + toSerialize["user_attribute_macros"] = o.UserAttributeMacros + } + if !isNil(o.Label) { + toSerialize["label"] = o.Label + } + if !isNil(o.IncludeInSamlAssertion) { + toSerialize["include_in_saml_assertion"] = o.IncludeInSamlAssertion + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *AppParameters) UnmarshalJSON(bytes []byte) (err error) { + varAppParameters := _AppParameters{} + + if err = json.Unmarshal(bytes, &varAppParameters); err == nil { + *o = AppParameters(varAppParameters) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "user_attribute_mappings") + delete(additionalProperties, "user_attribute_macros") + delete(additionalProperties, "label") + delete(additionalProperties, "include_in_saml_assertion") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableAppParameters struct { + value *AppParameters + isSet bool +} + +func (v NullableAppParameters) Get() *AppParameters { + return v.value +} + +func (v *NullableAppParameters) Set(val *AppParameters) { + v.value = val + v.isSet = true +} + +func (v NullableAppParameters) IsSet() bool { + return v.isSet +} + +func (v *NullableAppParameters) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAppParameters(val *AppParameters) *NullableAppParameters { + return &NullableAppParameters{value: val, isSet: true} +} + +func (v NullableAppParameters) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAppParameters) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_rule.go b/model_app_rule.go similarity index 60% rename from model_rule.go rename to model_app_rule.go index 0ea5039..820c64b 100644 --- a/model_rule.go +++ b/model_app_rule.go @@ -1,23 +1,27 @@ /* OneLogin API -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) +OpenAPI Specification for OneLogin -API version: 3.0.0-alpha.1 +API version: 3.1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package openapi +package onelogin import ( "encoding/json" ) -// Rule struct for Rule -type Rule struct { +// checks if the AppRule type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AppRule{} + +// AppRule struct for AppRule +type AppRule struct { + // App Rule ID Id *int32 `json:"id,omitempty"` - // The name of the rule. + // Rule Name Name *string `json:"name,omitempty"` // Indicates how conditions should be matched. Match *string `json:"match,omitempty"` @@ -27,30 +31,29 @@ type Rule struct { Position *int32 `json:"position,omitempty"` // An array of conditions that the user must meet in order for the rule to be applied. Conditions []Condition `json:"conditions,omitempty"` - // An array of actions that will be applied to the users that are matched by the conditions. - Actions []Action `json:"actions,omitempty"` + Actions []ActionObj `json:"actions,omitempty"` } -// NewRule instantiates a new Rule object +// NewAppRule instantiates a new AppRule 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 NewRule() *Rule { - this := Rule{} +func NewAppRule() *AppRule { + this := AppRule{} return &this } -// NewRuleWithDefaults instantiates a new Rule object +// NewAppRuleWithDefaults instantiates a new AppRule 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 NewRuleWithDefaults() *Rule { - this := Rule{} +func NewAppRuleWithDefaults() *AppRule { + this := AppRule{} return &this } // GetId returns the Id field value if set, zero value otherwise. -func (o *Rule) GetId() int32 { - if o == nil || o.Id == nil { +func (o *AppRule) GetId() int32 { + if o == nil || isNil(o.Id) { var ret int32 return ret } @@ -59,16 +62,16 @@ func (o *Rule) GetId() int32 { // GetIdOk returns a tuple with the Id field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Rule) GetIdOk() (*int32, bool) { - if o == nil || o.Id == nil { +func (o *AppRule) GetIdOk() (*int32, bool) { + if o == nil || isNil(o.Id) { return nil, false } return o.Id, true } // HasId returns a boolean if a field has been set. -func (o *Rule) HasId() bool { - if o != nil && o.Id != nil { +func (o *AppRule) HasId() bool { + if o != nil && !isNil(o.Id) { return true } @@ -76,13 +79,13 @@ func (o *Rule) HasId() bool { } // SetId gets a reference to the given int32 and assigns it to the Id field. -func (o *Rule) SetId(v int32) { +func (o *AppRule) SetId(v int32) { o.Id = &v } // GetName returns the Name field value if set, zero value otherwise. -func (o *Rule) GetName() string { - if o == nil || o.Name == nil { +func (o *AppRule) GetName() string { + if o == nil || isNil(o.Name) { var ret string return ret } @@ -91,16 +94,16 @@ func (o *Rule) 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 *Rule) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { +func (o *AppRule) GetNameOk() (*string, bool) { + if o == nil || isNil(o.Name) { return nil, false } return o.Name, true } // HasName returns a boolean if a field has been set. -func (o *Rule) HasName() bool { - if o != nil && o.Name != nil { +func (o *AppRule) HasName() bool { + if o != nil && !isNil(o.Name) { return true } @@ -108,13 +111,13 @@ func (o *Rule) HasName() bool { } // SetName gets a reference to the given string and assigns it to the Name field. -func (o *Rule) SetName(v string) { +func (o *AppRule) SetName(v string) { o.Name = &v } // GetMatch returns the Match field value if set, zero value otherwise. -func (o *Rule) GetMatch() string { - if o == nil || o.Match == nil { +func (o *AppRule) GetMatch() string { + if o == nil || isNil(o.Match) { var ret string return ret } @@ -123,16 +126,16 @@ func (o *Rule) GetMatch() string { // GetMatchOk returns a tuple with the Match field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Rule) GetMatchOk() (*string, bool) { - if o == nil || o.Match == nil { +func (o *AppRule) GetMatchOk() (*string, bool) { + if o == nil || isNil(o.Match) { return nil, false } return o.Match, true } // HasMatch returns a boolean if a field has been set. -func (o *Rule) HasMatch() bool { - if o != nil && o.Match != nil { +func (o *AppRule) HasMatch() bool { + if o != nil && !isNil(o.Match) { return true } @@ -140,13 +143,13 @@ func (o *Rule) HasMatch() bool { } // SetMatch gets a reference to the given string and assigns it to the Match field. -func (o *Rule) SetMatch(v string) { +func (o *AppRule) SetMatch(v string) { o.Match = &v } // GetEnabled returns the Enabled field value if set, zero value otherwise. -func (o *Rule) GetEnabled() bool { - if o == nil || o.Enabled == nil { +func (o *AppRule) GetEnabled() bool { + if o == nil || isNil(o.Enabled) { var ret bool return ret } @@ -155,16 +158,16 @@ func (o *Rule) 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 *Rule) GetEnabledOk() (*bool, bool) { - if o == nil || o.Enabled == nil { +func (o *AppRule) GetEnabledOk() (*bool, bool) { + if o == nil || isNil(o.Enabled) { return nil, false } return o.Enabled, true } // HasEnabled returns a boolean if a field has been set. -func (o *Rule) HasEnabled() bool { - if o != nil && o.Enabled != nil { +func (o *AppRule) HasEnabled() bool { + if o != nil && !isNil(o.Enabled) { return true } @@ -172,13 +175,13 @@ func (o *Rule) HasEnabled() bool { } // SetEnabled gets a reference to the given bool and assigns it to the Enabled field. -func (o *Rule) SetEnabled(v bool) { +func (o *AppRule) SetEnabled(v bool) { o.Enabled = &v } // GetPosition returns the Position field value if set, zero value otherwise. -func (o *Rule) GetPosition() int32 { - if o == nil || o.Position == nil { +func (o *AppRule) GetPosition() int32 { + if o == nil || isNil(o.Position) { var ret int32 return ret } @@ -187,16 +190,16 @@ func (o *Rule) GetPosition() int32 { // GetPositionOk returns a tuple with the Position field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Rule) GetPositionOk() (*int32, bool) { - if o == nil || o.Position == nil { +func (o *AppRule) GetPositionOk() (*int32, bool) { + if o == nil || isNil(o.Position) { return nil, false } return o.Position, true } // HasPosition returns a boolean if a field has been set. -func (o *Rule) HasPosition() bool { - if o != nil && o.Position != nil { +func (o *AppRule) HasPosition() bool { + if o != nil && !isNil(o.Position) { return true } @@ -204,13 +207,13 @@ func (o *Rule) HasPosition() bool { } // SetPosition gets a reference to the given int32 and assigns it to the Position field. -func (o *Rule) SetPosition(v int32) { +func (o *AppRule) SetPosition(v int32) { o.Position = &v } // GetConditions returns the Conditions field value if set, zero value otherwise. -func (o *Rule) GetConditions() []Condition { - if o == nil || o.Conditions == nil { +func (o *AppRule) GetConditions() []Condition { + if o == nil || isNil(o.Conditions) { var ret []Condition return ret } @@ -219,16 +222,16 @@ func (o *Rule) GetConditions() []Condition { // GetConditionsOk returns a tuple with the Conditions field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Rule) GetConditionsOk() ([]Condition, bool) { - if o == nil || o.Conditions == nil { +func (o *AppRule) GetConditionsOk() ([]Condition, bool) { + if o == nil || isNil(o.Conditions) { return nil, false } return o.Conditions, true } // HasConditions returns a boolean if a field has been set. -func (o *Rule) HasConditions() bool { - if o != nil && o.Conditions != nil { +func (o *AppRule) HasConditions() bool { + if o != nil && !isNil(o.Conditions) { return true } @@ -236,14 +239,14 @@ func (o *Rule) HasConditions() bool { } // SetConditions gets a reference to the given []Condition and assigns it to the Conditions field. -func (o *Rule) SetConditions(v []Condition) { +func (o *AppRule) SetConditions(v []Condition) { o.Conditions = v } // GetActions returns the Actions field value if set, zero value otherwise. -func (o *Rule) GetActions() []Action { - if o == nil || o.Actions == nil { - var ret []Action +func (o *AppRule) GetActions() []ActionObj { + if o == nil || isNil(o.Actions) { + var ret []ActionObj return ret } return o.Actions @@ -251,85 +254,93 @@ func (o *Rule) GetActions() []Action { // GetActionsOk returns a tuple with the Actions field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Rule) GetActionsOk() ([]Action, bool) { - if o == nil || o.Actions == nil { +func (o *AppRule) GetActionsOk() ([]ActionObj, bool) { + if o == nil || isNil(o.Actions) { return nil, false } return o.Actions, true } // HasActions returns a boolean if a field has been set. -func (o *Rule) HasActions() bool { - if o != nil && o.Actions != nil { +func (o *AppRule) HasActions() bool { + if o != nil && !isNil(o.Actions) { return true } return false } -// SetActions gets a reference to the given []Action and assigns it to the Actions field. -func (o *Rule) SetActions(v []Action) { +// SetActions gets a reference to the given []ActionObj and assigns it to the Actions field. +func (o *AppRule) SetActions(v []ActionObj) { o.Actions = v } -func (o Rule) MarshalJSON() ([]byte, error) { +func (o AppRule) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AppRule) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { + if !isNil(o.Id) { toSerialize["id"] = o.Id } - if o.Name != nil { + if !isNil(o.Name) { toSerialize["name"] = o.Name } - if o.Match != nil { + if !isNil(o.Match) { toSerialize["match"] = o.Match } - if o.Enabled != nil { + if !isNil(o.Enabled) { toSerialize["enabled"] = o.Enabled } - if o.Position != nil { + if !isNil(o.Position) { toSerialize["position"] = o.Position } - if o.Conditions != nil { + if !isNil(o.Conditions) { toSerialize["conditions"] = o.Conditions } - if o.Actions != nil { + if !isNil(o.Actions) { toSerialize["actions"] = o.Actions } - return json.Marshal(toSerialize) + return toSerialize, nil } -type NullableRule struct { - value *Rule +type NullableAppRule struct { + value *AppRule isSet bool } -func (v NullableRule) Get() *Rule { +func (v NullableAppRule) Get() *AppRule { return v.value } -func (v *NullableRule) Set(val *Rule) { +func (v *NullableAppRule) Set(val *AppRule) { v.value = val v.isSet = true } -func (v NullableRule) IsSet() bool { +func (v NullableAppRule) IsSet() bool { return v.isSet } -func (v *NullableRule) Unset() { +func (v *NullableAppRule) Unset() { v.value = nil v.isSet = false } -func NewNullableRule(val *Rule) *NullableRule { - return &NullableRule{value: val, isSet: true} +func NewNullableAppRule(val *AppRule) *NullableAppRule { + return &NullableAppRule{value: val, isSet: true} } -func (v NullableRule) MarshalJSON() ([]byte, error) { +func (v NullableAppRule) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } -func (v *NullableRule) UnmarshalJSON(src []byte) error { +func (v *NullableAppRule) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/model_assign_users_to_privilege_request.go b/model_assign_users_to_privilege_request.go new file mode 100644 index 0000000..006914e --- /dev/null +++ b/model_assign_users_to_privilege_request.go @@ -0,0 +1,126 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the AssignUsersToPrivilegeRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AssignUsersToPrivilegeRequest{} + +// AssignUsersToPrivilegeRequest struct for AssignUsersToPrivilegeRequest +type AssignUsersToPrivilegeRequest struct { + Users []int32 `json:"users,omitempty"` +} + +// NewAssignUsersToPrivilegeRequest instantiates a new AssignUsersToPrivilegeRequest 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 NewAssignUsersToPrivilegeRequest() *AssignUsersToPrivilegeRequest { + this := AssignUsersToPrivilegeRequest{} + return &this +} + +// NewAssignUsersToPrivilegeRequestWithDefaults instantiates a new AssignUsersToPrivilegeRequest 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 NewAssignUsersToPrivilegeRequestWithDefaults() *AssignUsersToPrivilegeRequest { + this := AssignUsersToPrivilegeRequest{} + return &this +} + +// GetUsers returns the Users field value if set, zero value otherwise. +func (o *AssignUsersToPrivilegeRequest) GetUsers() []int32 { + if o == nil || isNil(o.Users) { + 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 *AssignUsersToPrivilegeRequest) GetUsersOk() ([]int32, bool) { + if o == nil || isNil(o.Users) { + return nil, false + } + return o.Users, true +} + +// HasUsers returns a boolean if a field has been set. +func (o *AssignUsersToPrivilegeRequest) HasUsers() bool { + if o != nil && !isNil(o.Users) { + return true + } + + return false +} + +// SetUsers gets a reference to the given []int32 and assigns it to the Users field. +func (o *AssignUsersToPrivilegeRequest) SetUsers(v []int32) { + o.Users = v +} + +func (o AssignUsersToPrivilegeRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AssignUsersToPrivilegeRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.Users) { + toSerialize["users"] = o.Users + } + return toSerialize, nil +} + +type NullableAssignUsersToPrivilegeRequest struct { + value *AssignUsersToPrivilegeRequest + isSet bool +} + +func (v NullableAssignUsersToPrivilegeRequest) Get() *AssignUsersToPrivilegeRequest { + return v.value +} + +func (v *NullableAssignUsersToPrivilegeRequest) Set(val *AssignUsersToPrivilegeRequest) { + v.value = val + v.isSet = true +} + +func (v NullableAssignUsersToPrivilegeRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableAssignUsersToPrivilegeRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAssignUsersToPrivilegeRequest(val *AssignUsersToPrivilegeRequest) *NullableAssignUsersToPrivilegeRequest { + return &NullableAssignUsersToPrivilegeRequest{value: val, isSet: true} +} + +func (v NullableAssignUsersToPrivilegeRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAssignUsersToPrivilegeRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_auth_claim.go b/model_auth_claim.go new file mode 100644 index 0000000..91af8ac --- /dev/null +++ b/model_auth_claim.go @@ -0,0 +1,192 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the AuthClaim type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AuthClaim{} + +// AuthClaim struct for AuthClaim +type AuthClaim struct { + // The attribute name for the claim when its returned in an Access Token + Name string `json:"name"` + // A user attribute to map values from For custom attributes prefix the name of the attribute with `custom_attribute_`. e.g. To get the value for custom attribute `employee_id` use `custom_attribute_employee_id`. + UserAttributeMappings *string `json:"user_attribute_mappings,omitempty"` + // When `user_attribute_mappings` is set to `_macro_` this macro will be used to assign the parameter value. + UserAttributeMacros *string `json:"user_attribute_macros,omitempty"` +} + +// NewAuthClaim instantiates a new AuthClaim 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 NewAuthClaim(name string) *AuthClaim { + this := AuthClaim{} + this.Name = name + return &this +} + +// NewAuthClaimWithDefaults instantiates a new AuthClaim 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 NewAuthClaimWithDefaults() *AuthClaim { + this := AuthClaim{} + return &this +} + +// GetName returns the Name field value +func (o *AuthClaim) 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 *AuthClaim) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *AuthClaim) SetName(v string) { + o.Name = v +} + +// GetUserAttributeMappings returns the UserAttributeMappings field value if set, zero value otherwise. +func (o *AuthClaim) GetUserAttributeMappings() string { + if o == nil || isNil(o.UserAttributeMappings) { + var ret string + return ret + } + return *o.UserAttributeMappings +} + +// GetUserAttributeMappingsOk returns a tuple with the UserAttributeMappings field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AuthClaim) GetUserAttributeMappingsOk() (*string, bool) { + if o == nil || isNil(o.UserAttributeMappings) { + return nil, false + } + return o.UserAttributeMappings, true +} + +// HasUserAttributeMappings returns a boolean if a field has been set. +func (o *AuthClaim) HasUserAttributeMappings() bool { + if o != nil && !isNil(o.UserAttributeMappings) { + return true + } + + return false +} + +// SetUserAttributeMappings gets a reference to the given string and assigns it to the UserAttributeMappings field. +func (o *AuthClaim) SetUserAttributeMappings(v string) { + o.UserAttributeMappings = &v +} + +// GetUserAttributeMacros returns the UserAttributeMacros field value if set, zero value otherwise. +func (o *AuthClaim) GetUserAttributeMacros() string { + if o == nil || isNil(o.UserAttributeMacros) { + var ret string + return ret + } + return *o.UserAttributeMacros +} + +// GetUserAttributeMacrosOk returns a tuple with the UserAttributeMacros field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AuthClaim) GetUserAttributeMacrosOk() (*string, bool) { + if o == nil || isNil(o.UserAttributeMacros) { + return nil, false + } + return o.UserAttributeMacros, true +} + +// HasUserAttributeMacros returns a boolean if a field has been set. +func (o *AuthClaim) HasUserAttributeMacros() bool { + if o != nil && !isNil(o.UserAttributeMacros) { + return true + } + + return false +} + +// SetUserAttributeMacros gets a reference to the given string and assigns it to the UserAttributeMacros field. +func (o *AuthClaim) SetUserAttributeMacros(v string) { + o.UserAttributeMacros = &v +} + +func (o AuthClaim) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AuthClaim) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !isNil(o.UserAttributeMappings) { + toSerialize["user_attribute_mappings"] = o.UserAttributeMappings + } + if !isNil(o.UserAttributeMacros) { + toSerialize["user_attribute_macros"] = o.UserAttributeMacros + } + return toSerialize, nil +} + +type NullableAuthClaim struct { + value *AuthClaim + isSet bool +} + +func (v NullableAuthClaim) Get() *AuthClaim { + return v.value +} + +func (v *NullableAuthClaim) Set(val *AuthClaim) { + v.value = val + v.isSet = true +} + +func (v NullableAuthClaim) IsSet() bool { + return v.isSet +} + +func (v *NullableAuthClaim) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAuthClaim(val *AuthClaim) *NullableAuthClaim { + return &NullableAuthClaim{value: val, isSet: true} +} + +func (v NullableAuthClaim) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAuthClaim) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_rule_id.go b/model_auth_id.go similarity index 50% rename from model_rule_id.go rename to model_auth_id.go index 9a0474a..e84190a 100644 --- a/model_rule_id.go +++ b/model_auth_id.go @@ -1,44 +1,48 @@ /* OneLogin API -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) +OpenAPI Specification for OneLogin -API version: 3.0.0-alpha.1 +API version: 3.1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package openapi +package onelogin import ( "encoding/json" ) -// RuleId struct for RuleId -type RuleId struct { +// checks if the AuthId type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AuthId{} + +// AuthId struct for AuthId +type AuthId struct { + // Unique ID for the Scope Id *int32 `json:"id,omitempty"` } -// NewRuleId instantiates a new RuleId object +// NewAuthId instantiates a new AuthId 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 NewRuleId() *RuleId { - this := RuleId{} +func NewAuthId() *AuthId { + this := AuthId{} return &this } -// NewRuleIdWithDefaults instantiates a new RuleId object +// NewAuthIdWithDefaults instantiates a new AuthId 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 NewRuleIdWithDefaults() *RuleId { - this := RuleId{} +func NewAuthIdWithDefaults() *AuthId { + this := AuthId{} return &this } // GetId returns the Id field value if set, zero value otherwise. -func (o *RuleId) GetId() int32 { - if o == nil || o.Id == nil { +func (o *AuthId) GetId() int32 { + if o == nil || isNil(o.Id) { var ret int32 return ret } @@ -47,16 +51,16 @@ func (o *RuleId) GetId() int32 { // GetIdOk returns a tuple with the Id field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *RuleId) GetIdOk() (*int32, bool) { - if o == nil || o.Id == nil { +func (o *AuthId) GetIdOk() (*int32, bool) { + if o == nil || isNil(o.Id) { return nil, false } return o.Id, true } // HasId returns a boolean if a field has been set. -func (o *RuleId) HasId() bool { - if o != nil && o.Id != nil { +func (o *AuthId) HasId() bool { + if o != nil && !isNil(o.Id) { return true } @@ -64,50 +68,58 @@ func (o *RuleId) HasId() bool { } // SetId gets a reference to the given int32 and assigns it to the Id field. -func (o *RuleId) SetId(v int32) { +func (o *AuthId) SetId(v int32) { o.Id = &v } -func (o RuleId) MarshalJSON() ([]byte, error) { +func (o AuthId) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AuthId) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { + if !isNil(o.Id) { toSerialize["id"] = o.Id } - return json.Marshal(toSerialize) + return toSerialize, nil } -type NullableRuleId struct { - value *RuleId +type NullableAuthId struct { + value *AuthId isSet bool } -func (v NullableRuleId) Get() *RuleId { +func (v NullableAuthId) Get() *AuthId { return v.value } -func (v *NullableRuleId) Set(val *RuleId) { +func (v *NullableAuthId) Set(val *AuthId) { v.value = val v.isSet = true } -func (v NullableRuleId) IsSet() bool { +func (v NullableAuthId) IsSet() bool { return v.isSet } -func (v *NullableRuleId) Unset() { +func (v *NullableAuthId) Unset() { v.value = nil v.isSet = false } -func NewNullableRuleId(val *RuleId) *NullableRuleId { - return &NullableRuleId{value: val, isSet: true} +func NewNullableAuthId(val *AuthId) *NullableAuthId { + return &NullableAuthId{value: val, isSet: true} } -func (v NullableRuleId) MarshalJSON() ([]byte, error) { +func (v NullableAuthId) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } -func (v *NullableRuleId) UnmarshalJSON(src []byte) error { +func (v *NullableAuthId) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/model_auth_method.go b/model_auth_method.go index 7121db8..5643ade 100644 --- a/model_auth_method.go +++ b/model_auth_method.go @@ -1,21 +1,21 @@ /* OneLogin API -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) +OpenAPI Specification for OneLogin -API version: 3.0.0-alpha.1 +API version: 3.1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package openapi +package onelogin import ( "encoding/json" "fmt" ) -// AuthMethod An ID indicating the type of app. +// AuthMethod An ID indicating the type of app: - 0: Password - 1: OpenId - 2: SAML - 3: API - 4: Google - 6: Forms Based App - 7: WSFED - 8: OpenId Connect type AuthMethod int32 // List of auth_method @@ -25,6 +25,7 @@ const ( _2 AuthMethod = 2 _3 AuthMethod = 3 _4 AuthMethod = 4 + _5 AuthMethod = 5 _6 AuthMethod = 6 _7 AuthMethod = 7 _8 AuthMethod = 8 @@ -37,6 +38,7 @@ var AllowedAuthMethodEnumValues = []AuthMethod{ 2, 3, 4, + 5, 6, 7, 8, diff --git a/model_auth_scope.go b/model_auth_scope.go new file mode 100644 index 0000000..3c0b4b5 --- /dev/null +++ b/model_auth_scope.go @@ -0,0 +1,199 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the AuthScope type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AuthScope{} + +// AuthScope struct for AuthScope +type AuthScope struct { + // Unique ID for the Scope + Id *int32 `json:"id,omitempty"` + // A value representing the api scope that with be authorized + Value *string `json:"value,omitempty"` + // A description of what access the scope enables + Description *string `json:"description,omitempty"` +} + +// NewAuthScope instantiates a new AuthScope 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 NewAuthScope() *AuthScope { + this := AuthScope{} + return &this +} + +// NewAuthScopeWithDefaults instantiates a new AuthScope 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 NewAuthScopeWithDefaults() *AuthScope { + this := AuthScope{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *AuthScope) GetId() int32 { + if o == nil || isNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AuthScope) GetIdOk() (*int32, bool) { + if o == nil || isNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *AuthScope) HasId() bool { + if o != nil && !isNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *AuthScope) SetId(v int32) { + o.Id = &v +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *AuthScope) GetValue() string { + if o == nil || isNil(o.Value) { + var ret string + return ret + } + return *o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AuthScope) GetValueOk() (*string, bool) { + if o == nil || isNil(o.Value) { + return nil, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *AuthScope) HasValue() bool { + if o != nil && !isNil(o.Value) { + return true + } + + return false +} + +// SetValue gets a reference to the given string and assigns it to the Value field. +func (o *AuthScope) SetValue(v string) { + o.Value = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *AuthScope) GetDescription() string { + if o == nil || isNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// 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 *AuthScope) GetDescriptionOk() (*string, bool) { + if o == nil || isNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *AuthScope) HasDescription() bool { + if o != nil && !isNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *AuthScope) SetDescription(v string) { + o.Description = &v +} + +func (o AuthScope) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AuthScope) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: id is readOnly + if !isNil(o.Value) { + toSerialize["value"] = o.Value + } + if !isNil(o.Description) { + toSerialize["description"] = o.Description + } + return toSerialize, nil +} + +type NullableAuthScope struct { + value *AuthScope + isSet bool +} + +func (v NullableAuthScope) Get() *AuthScope { + return v.value +} + +func (v *NullableAuthScope) Set(val *AuthScope) { + v.value = val + v.isSet = true +} + +func (v NullableAuthScope) IsSet() bool { + return v.isSet +} + +func (v *NullableAuthScope) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAuthScope(val *AuthScope) *NullableAuthScope { + return &NullableAuthScope{value: val, isSet: true} +} + +func (v NullableAuthScope) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAuthScope) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_auth_server.go b/model_auth_server.go new file mode 100644 index 0000000..50e896a --- /dev/null +++ b/model_auth_server.go @@ -0,0 +1,208 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the AuthServer type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AuthServer{} + +// AuthServer base resource for configuring api authorization in OneLogin +type AuthServer struct { + // Auth server unique ID in Onelogin + Id *int32 `json:"id,omitempty"` + // Name of the API. + Name string `json:"name"` + // Description of what the API does. + Description string `json:"description"` + Configuration AuthServerConfiguration `json:"configuration"` +} + +// NewAuthServer instantiates a new AuthServer 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 NewAuthServer(name string, description string, configuration AuthServerConfiguration) *AuthServer { + this := AuthServer{} + this.Name = name + this.Description = description + this.Configuration = configuration + return &this +} + +// NewAuthServerWithDefaults instantiates a new AuthServer 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 NewAuthServerWithDefaults() *AuthServer { + this := AuthServer{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *AuthServer) GetId() int32 { + if o == nil || isNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AuthServer) GetIdOk() (*int32, bool) { + if o == nil || isNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *AuthServer) HasId() bool { + if o != nil && !isNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *AuthServer) SetId(v int32) { + o.Id = &v +} + +// GetName returns the Name field value +func (o *AuthServer) 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 *AuthServer) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *AuthServer) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value +func (o *AuthServer) GetDescription() string { + if o == nil { + var ret string + return ret + } + + return o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value +// and a boolean to check if the value has been set. +func (o *AuthServer) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Description, true +} + +// SetDescription sets field value +func (o *AuthServer) SetDescription(v string) { + o.Description = v +} + +// GetConfiguration returns the Configuration field value +func (o *AuthServer) GetConfiguration() AuthServerConfiguration { + if o == nil { + var ret AuthServerConfiguration + return ret + } + + return o.Configuration +} + +// GetConfigurationOk returns a tuple with the Configuration field value +// and a boolean to check if the value has been set. +func (o *AuthServer) GetConfigurationOk() (*AuthServerConfiguration, bool) { + if o == nil { + return nil, false + } + return &o.Configuration, true +} + +// SetConfiguration sets field value +func (o *AuthServer) SetConfiguration(v AuthServerConfiguration) { + o.Configuration = v +} + +func (o AuthServer) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AuthServer) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: id is readOnly + toSerialize["name"] = o.Name + toSerialize["description"] = o.Description + toSerialize["configuration"] = o.Configuration + return toSerialize, nil +} + +type NullableAuthServer struct { + value *AuthServer + isSet bool +} + +func (v NullableAuthServer) Get() *AuthServer { + return v.value +} + +func (v *NullableAuthServer) Set(val *AuthServer) { + v.value = val + v.isSet = true +} + +func (v NullableAuthServer) IsSet() bool { + return v.isSet +} + +func (v *NullableAuthServer) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAuthServer(val *AuthServer) *NullableAuthServer { + return &NullableAuthServer{value: val, isSet: true} +} + +func (v NullableAuthServer) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAuthServer) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_auth_server_configuration.go b/model_auth_server_configuration.go index aa515f2..24cee4f 100644 --- a/model_auth_server_configuration.go +++ b/model_auth_server_configuration.go @@ -1,24 +1,31 @@ /* OneLogin API -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) +OpenAPI Specification for OneLogin -API version: 3.0.0-alpha.1 +API version: 3.1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package openapi +package onelogin import ( "encoding/json" ) -// AuthServerConfiguration struct for AuthServerConfiguration +// checks if the AuthServerConfiguration type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AuthServerConfiguration{} + +// AuthServerConfiguration Authorization server configuration type AuthServerConfiguration struct { - Audiences []string `json:"audiences,omitempty"` + // List of API endpoints that will be returned in Access Tokens. + Audiences []string `json:"audiences"` + // The number of minutes until refresh token expires. There is no maximum expiry limit. RefreshTokenExpirationMinutes *int32 `json:"refresh_token_expiration_minutes,omitempty"` - ResourceIdentifier *string `json:"resource_identifier,omitempty"` + // Unique identifier for the API that the Authorization Server will issue Access Tokens for. + ResourceIdentifier string `json:"resource_identifier"` + // The number of minutes until access token expires. There is no maximum expiry limit. AccessTokenExpirationMinutes *int32 `json:"access_token_expiration_minutes,omitempty"` } @@ -26,8 +33,10 @@ type AuthServerConfiguration 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 NewAuthServerConfiguration() *AuthServerConfiguration { +func NewAuthServerConfiguration(audiences []string, resourceIdentifier string) *AuthServerConfiguration { this := AuthServerConfiguration{} + this.Audiences = audiences + this.ResourceIdentifier = resourceIdentifier return &this } @@ -39,41 +48,33 @@ func NewAuthServerConfigurationWithDefaults() *AuthServerConfiguration { return &this } -// GetAudiences returns the Audiences field value if set, zero value otherwise. +// GetAudiences returns the Audiences field value func (o *AuthServerConfiguration) GetAudiences() []string { - if o == nil || o.Audiences == nil { + if o == nil { var ret []string return ret } + return o.Audiences } -// GetAudiencesOk returns a tuple with the Audiences field value if set, nil otherwise +// GetAudiencesOk returns a tuple with the Audiences field value // and a boolean to check if the value has been set. func (o *AuthServerConfiguration) GetAudiencesOk() ([]string, bool) { - if o == nil || o.Audiences == nil { + if o == nil { return nil, false } return o.Audiences, true } -// HasAudiences returns a boolean if a field has been set. -func (o *AuthServerConfiguration) HasAudiences() bool { - if o != nil && o.Audiences != nil { - return true - } - - return false -} - -// SetAudiences gets a reference to the given []string and assigns it to the Audiences field. +// SetAudiences sets field value func (o *AuthServerConfiguration) SetAudiences(v []string) { o.Audiences = v } // GetRefreshTokenExpirationMinutes returns the RefreshTokenExpirationMinutes field value if set, zero value otherwise. func (o *AuthServerConfiguration) GetRefreshTokenExpirationMinutes() int32 { - if o == nil || o.RefreshTokenExpirationMinutes == nil { + if o == nil || isNil(o.RefreshTokenExpirationMinutes) { var ret int32 return ret } @@ -83,7 +84,7 @@ func (o *AuthServerConfiguration) GetRefreshTokenExpirationMinutes() int32 { // GetRefreshTokenExpirationMinutesOk returns a tuple with the RefreshTokenExpirationMinutes field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AuthServerConfiguration) GetRefreshTokenExpirationMinutesOk() (*int32, bool) { - if o == nil || o.RefreshTokenExpirationMinutes == nil { + if o == nil || isNil(o.RefreshTokenExpirationMinutes) { return nil, false } return o.RefreshTokenExpirationMinutes, true @@ -91,7 +92,7 @@ func (o *AuthServerConfiguration) GetRefreshTokenExpirationMinutesOk() (*int32, // HasRefreshTokenExpirationMinutes returns a boolean if a field has been set. func (o *AuthServerConfiguration) HasRefreshTokenExpirationMinutes() bool { - if o != nil && o.RefreshTokenExpirationMinutes != nil { + if o != nil && !isNil(o.RefreshTokenExpirationMinutes) { return true } @@ -103,41 +104,33 @@ func (o *AuthServerConfiguration) SetRefreshTokenExpirationMinutes(v int32) { o.RefreshTokenExpirationMinutes = &v } -// GetResourceIdentifier returns the ResourceIdentifier field value if set, zero value otherwise. +// GetResourceIdentifier returns the ResourceIdentifier field value func (o *AuthServerConfiguration) GetResourceIdentifier() string { - if o == nil || o.ResourceIdentifier == nil { + if o == nil { var ret string return ret } - return *o.ResourceIdentifier + + return o.ResourceIdentifier } -// GetResourceIdentifierOk returns a tuple with the ResourceIdentifier field value if set, nil otherwise +// GetResourceIdentifierOk returns a tuple with the ResourceIdentifier field value // and a boolean to check if the value has been set. func (o *AuthServerConfiguration) GetResourceIdentifierOk() (*string, bool) { - if o == nil || o.ResourceIdentifier == nil { + if o == nil { return nil, false } - return o.ResourceIdentifier, true -} - -// HasResourceIdentifier returns a boolean if a field has been set. -func (o *AuthServerConfiguration) HasResourceIdentifier() bool { - if o != nil && o.ResourceIdentifier != nil { - return true - } - - return false + return &o.ResourceIdentifier, true } -// SetResourceIdentifier gets a reference to the given string and assigns it to the ResourceIdentifier field. +// SetResourceIdentifier sets field value func (o *AuthServerConfiguration) SetResourceIdentifier(v string) { - o.ResourceIdentifier = &v + o.ResourceIdentifier = v } // GetAccessTokenExpirationMinutes returns the AccessTokenExpirationMinutes field value if set, zero value otherwise. func (o *AuthServerConfiguration) GetAccessTokenExpirationMinutes() int32 { - if o == nil || o.AccessTokenExpirationMinutes == nil { + if o == nil || isNil(o.AccessTokenExpirationMinutes) { var ret int32 return ret } @@ -147,7 +140,7 @@ func (o *AuthServerConfiguration) GetAccessTokenExpirationMinutes() int32 { // GetAccessTokenExpirationMinutesOk returns a tuple with the AccessTokenExpirationMinutes field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *AuthServerConfiguration) GetAccessTokenExpirationMinutesOk() (*int32, bool) { - if o == nil || o.AccessTokenExpirationMinutes == nil { + if o == nil || isNil(o.AccessTokenExpirationMinutes) { return nil, false } return o.AccessTokenExpirationMinutes, true @@ -155,7 +148,7 @@ func (o *AuthServerConfiguration) GetAccessTokenExpirationMinutesOk() (*int32, b // HasAccessTokenExpirationMinutes returns a boolean if a field has been set. func (o *AuthServerConfiguration) HasAccessTokenExpirationMinutes() bool { - if o != nil && o.AccessTokenExpirationMinutes != nil { + if o != nil && !isNil(o.AccessTokenExpirationMinutes) { return true } @@ -168,20 +161,24 @@ func (o *AuthServerConfiguration) SetAccessTokenExpirationMinutes(v int32) { } func (o AuthServerConfiguration) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Audiences != nil { - toSerialize["audiences"] = o.Audiences + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.RefreshTokenExpirationMinutes != nil { + return json.Marshal(toSerialize) +} + +func (o AuthServerConfiguration) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["audiences"] = o.Audiences + if !isNil(o.RefreshTokenExpirationMinutes) { toSerialize["refresh_token_expiration_minutes"] = o.RefreshTokenExpirationMinutes } - if o.ResourceIdentifier != nil { - toSerialize["resource_identifier"] = o.ResourceIdentifier - } - if o.AccessTokenExpirationMinutes != nil { + toSerialize["resource_identifier"] = o.ResourceIdentifier + if !isNil(o.AccessTokenExpirationMinutes) { toSerialize["access_token_expiration_minutes"] = o.AccessTokenExpirationMinutes } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableAuthServerConfiguration struct { diff --git a/model_brand.go b/model_brand.go new file mode 100644 index 0000000..93b0ade --- /dev/null +++ b/model_brand.go @@ -0,0 +1,509 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the Brand type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Brand{} + +// Brand struct for Brand +type Brand struct { + Id int32 `json:"id"` + // Indicates if the brand is enabled or not + Enabled bool `json:"enabled"` + // Indicates if the custom support is enabled. If enabled, the login page includes the ability to submit a support request. + CustomSupportEnabled bool `json:"custom_support_enabled"` + // Primary brand color + CustomColor string `json:"custom_color"` + // Secondary brand color + CustomAccentColor string `json:"custom_accent_color"` + // Color for the masking layer above the background image of the branded login screen. + CustomMaskingColor string `json:"custom_masking_color"` + // Opacity for the custom_masking_color. + CustomMaskingOpacity int32 `json:"custom_masking_opacity"` + // Text that replaces the default text displayed on the initial screen of the MFA Registration. + MfaEnrollmentMessage string `json:"mfa_enrollment_message"` + // Indicates if the custom Username/Email field label is enabled or not + EnableCustomLabelForLoginScreen bool `json:"enable_custom_label_for_login_screen"` + // Custom label for the Username/Email field on the login screen. See example here. + CustomLabelTextForLoginScreen string `json:"custom_label_text_for_login_screen"` + // Text for the login instruction screen, styled in Markdown. + LoginInstruction string `json:"login_instruction"` + // Link text to show login instruction screen. + LoginInstructionTitle string `json:"login_instruction_title"` + // Indicates if the OneLogin footer will appear at the bottom of the login page. + HideOneloginFooter bool `json:"hide_onelogin_footer"` + Background BrandBackground `json:"background"` + Logo BrandLogo `json:"logo"` +} + +// NewBrand instantiates a new Brand 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 NewBrand(id int32, enabled bool, customSupportEnabled bool, customColor string, customAccentColor string, customMaskingColor string, customMaskingOpacity int32, mfaEnrollmentMessage string, enableCustomLabelForLoginScreen bool, customLabelTextForLoginScreen string, loginInstruction string, loginInstructionTitle string, hideOneloginFooter bool, background BrandBackground, logo BrandLogo) *Brand { + this := Brand{} + this.Id = id + this.Enabled = enabled + this.CustomSupportEnabled = customSupportEnabled + this.CustomColor = customColor + this.CustomAccentColor = customAccentColor + this.CustomMaskingColor = customMaskingColor + this.CustomMaskingOpacity = customMaskingOpacity + this.MfaEnrollmentMessage = mfaEnrollmentMessage + this.EnableCustomLabelForLoginScreen = enableCustomLabelForLoginScreen + this.CustomLabelTextForLoginScreen = customLabelTextForLoginScreen + this.LoginInstruction = loginInstruction + this.LoginInstructionTitle = loginInstructionTitle + this.HideOneloginFooter = hideOneloginFooter + this.Background = background + this.Logo = logo + return &this +} + +// NewBrandWithDefaults instantiates a new Brand 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 NewBrandWithDefaults() *Brand { + this := Brand{} + var enabled bool = false + this.Enabled = enabled + return &this +} + +// GetId returns the Id field value +func (o *Brand) GetId() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *Brand) GetIdOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *Brand) SetId(v int32) { + o.Id = v +} + +// GetEnabled returns the Enabled field value +func (o *Brand) GetEnabled() bool { + if o == nil { + var ret bool + return ret + } + + return o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value +// and a boolean to check if the value has been set. +func (o *Brand) GetEnabledOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Enabled, true +} + +// SetEnabled sets field value +func (o *Brand) SetEnabled(v bool) { + o.Enabled = v +} + +// GetCustomSupportEnabled returns the CustomSupportEnabled field value +func (o *Brand) GetCustomSupportEnabled() bool { + if o == nil { + var ret bool + return ret + } + + return o.CustomSupportEnabled +} + +// GetCustomSupportEnabledOk returns a tuple with the CustomSupportEnabled field value +// and a boolean to check if the value has been set. +func (o *Brand) GetCustomSupportEnabledOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.CustomSupportEnabled, true +} + +// SetCustomSupportEnabled sets field value +func (o *Brand) SetCustomSupportEnabled(v bool) { + o.CustomSupportEnabled = v +} + +// GetCustomColor returns the CustomColor field value +func (o *Brand) GetCustomColor() string { + if o == nil { + var ret string + return ret + } + + return o.CustomColor +} + +// GetCustomColorOk returns a tuple with the CustomColor field value +// and a boolean to check if the value has been set. +func (o *Brand) GetCustomColorOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.CustomColor, true +} + +// SetCustomColor sets field value +func (o *Brand) SetCustomColor(v string) { + o.CustomColor = v +} + +// GetCustomAccentColor returns the CustomAccentColor field value +func (o *Brand) GetCustomAccentColor() string { + if o == nil { + var ret string + return ret + } + + return o.CustomAccentColor +} + +// GetCustomAccentColorOk returns a tuple with the CustomAccentColor field value +// and a boolean to check if the value has been set. +func (o *Brand) GetCustomAccentColorOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.CustomAccentColor, true +} + +// SetCustomAccentColor sets field value +func (o *Brand) SetCustomAccentColor(v string) { + o.CustomAccentColor = v +} + +// GetCustomMaskingColor returns the CustomMaskingColor field value +func (o *Brand) GetCustomMaskingColor() string { + if o == nil { + var ret string + return ret + } + + return o.CustomMaskingColor +} + +// GetCustomMaskingColorOk returns a tuple with the CustomMaskingColor field value +// and a boolean to check if the value has been set. +func (o *Brand) GetCustomMaskingColorOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.CustomMaskingColor, true +} + +// SetCustomMaskingColor sets field value +func (o *Brand) SetCustomMaskingColor(v string) { + o.CustomMaskingColor = v +} + +// GetCustomMaskingOpacity returns the CustomMaskingOpacity field value +func (o *Brand) GetCustomMaskingOpacity() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.CustomMaskingOpacity +} + +// GetCustomMaskingOpacityOk returns a tuple with the CustomMaskingOpacity field value +// and a boolean to check if the value has been set. +func (o *Brand) GetCustomMaskingOpacityOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.CustomMaskingOpacity, true +} + +// SetCustomMaskingOpacity sets field value +func (o *Brand) SetCustomMaskingOpacity(v int32) { + o.CustomMaskingOpacity = v +} + +// GetMfaEnrollmentMessage returns the MfaEnrollmentMessage field value +func (o *Brand) GetMfaEnrollmentMessage() string { + if o == nil { + var ret string + return ret + } + + return o.MfaEnrollmentMessage +} + +// GetMfaEnrollmentMessageOk returns a tuple with the MfaEnrollmentMessage field value +// and a boolean to check if the value has been set. +func (o *Brand) GetMfaEnrollmentMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.MfaEnrollmentMessage, true +} + +// SetMfaEnrollmentMessage sets field value +func (o *Brand) SetMfaEnrollmentMessage(v string) { + o.MfaEnrollmentMessage = v +} + +// GetEnableCustomLabelForLoginScreen returns the EnableCustomLabelForLoginScreen field value +func (o *Brand) GetEnableCustomLabelForLoginScreen() bool { + if o == nil { + var ret bool + return ret + } + + return o.EnableCustomLabelForLoginScreen +} + +// GetEnableCustomLabelForLoginScreenOk returns a tuple with the EnableCustomLabelForLoginScreen field value +// and a boolean to check if the value has been set. +func (o *Brand) GetEnableCustomLabelForLoginScreenOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.EnableCustomLabelForLoginScreen, true +} + +// SetEnableCustomLabelForLoginScreen sets field value +func (o *Brand) SetEnableCustomLabelForLoginScreen(v bool) { + o.EnableCustomLabelForLoginScreen = v +} + +// GetCustomLabelTextForLoginScreen returns the CustomLabelTextForLoginScreen field value +func (o *Brand) GetCustomLabelTextForLoginScreen() string { + if o == nil { + var ret string + return ret + } + + return o.CustomLabelTextForLoginScreen +} + +// GetCustomLabelTextForLoginScreenOk returns a tuple with the CustomLabelTextForLoginScreen field value +// and a boolean to check if the value has been set. +func (o *Brand) GetCustomLabelTextForLoginScreenOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.CustomLabelTextForLoginScreen, true +} + +// SetCustomLabelTextForLoginScreen sets field value +func (o *Brand) SetCustomLabelTextForLoginScreen(v string) { + o.CustomLabelTextForLoginScreen = v +} + +// GetLoginInstruction returns the LoginInstruction field value +func (o *Brand) GetLoginInstruction() string { + if o == nil { + var ret string + return ret + } + + return o.LoginInstruction +} + +// GetLoginInstructionOk returns a tuple with the LoginInstruction field value +// and a boolean to check if the value has been set. +func (o *Brand) GetLoginInstructionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LoginInstruction, true +} + +// SetLoginInstruction sets field value +func (o *Brand) SetLoginInstruction(v string) { + o.LoginInstruction = v +} + +// GetLoginInstructionTitle returns the LoginInstructionTitle field value +func (o *Brand) GetLoginInstructionTitle() string { + if o == nil { + var ret string + return ret + } + + return o.LoginInstructionTitle +} + +// GetLoginInstructionTitleOk returns a tuple with the LoginInstructionTitle field value +// and a boolean to check if the value has been set. +func (o *Brand) GetLoginInstructionTitleOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LoginInstructionTitle, true +} + +// SetLoginInstructionTitle sets field value +func (o *Brand) SetLoginInstructionTitle(v string) { + o.LoginInstructionTitle = v +} + +// GetHideOneloginFooter returns the HideOneloginFooter field value +func (o *Brand) GetHideOneloginFooter() bool { + if o == nil { + var ret bool + return ret + } + + return o.HideOneloginFooter +} + +// GetHideOneloginFooterOk returns a tuple with the HideOneloginFooter field value +// and a boolean to check if the value has been set. +func (o *Brand) GetHideOneloginFooterOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.HideOneloginFooter, true +} + +// SetHideOneloginFooter sets field value +func (o *Brand) SetHideOneloginFooter(v bool) { + o.HideOneloginFooter = v +} + +// GetBackground returns the Background field value +func (o *Brand) GetBackground() BrandBackground { + if o == nil { + var ret BrandBackground + 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 *Brand) GetBackgroundOk() (*BrandBackground, bool) { + if o == nil { + return nil, false + } + return &o.Background, true +} + +// SetBackground sets field value +func (o *Brand) SetBackground(v BrandBackground) { + o.Background = v +} + +// GetLogo returns the Logo field value +func (o *Brand) GetLogo() BrandLogo { + if o == nil { + var ret BrandLogo + return ret + } + + return o.Logo +} + +// GetLogoOk returns a tuple with the Logo field value +// and a boolean to check if the value has been set. +func (o *Brand) GetLogoOk() (*BrandLogo, bool) { + if o == nil { + return nil, false + } + return &o.Logo, true +} + +// SetLogo sets field value +func (o *Brand) SetLogo(v BrandLogo) { + o.Logo = v +} + +func (o Brand) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Brand) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["enabled"] = o.Enabled + toSerialize["custom_support_enabled"] = o.CustomSupportEnabled + toSerialize["custom_color"] = o.CustomColor + toSerialize["custom_accent_color"] = o.CustomAccentColor + toSerialize["custom_masking_color"] = o.CustomMaskingColor + toSerialize["custom_masking_opacity"] = o.CustomMaskingOpacity + toSerialize["mfa_enrollment_message"] = o.MfaEnrollmentMessage + toSerialize["enable_custom_label_for_login_screen"] = o.EnableCustomLabelForLoginScreen + toSerialize["custom_label_text_for_login_screen"] = o.CustomLabelTextForLoginScreen + toSerialize["login_instruction"] = o.LoginInstruction + toSerialize["login_instruction_title"] = o.LoginInstructionTitle + toSerialize["hide_onelogin_footer"] = o.HideOneloginFooter + toSerialize["background"] = o.Background + toSerialize["logo"] = o.Logo + return toSerialize, nil +} + +type NullableBrand struct { + value *Brand + isSet bool +} + +func (v NullableBrand) Get() *Brand { + return v.value +} + +func (v *NullableBrand) Set(val *Brand) { + v.value = val + v.isSet = true +} + +func (v NullableBrand) IsSet() bool { + return v.isSet +} + +func (v *NullableBrand) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBrand(val *Brand) *NullableBrand { + return &NullableBrand{value: val, isSet: true} +} + +func (v NullableBrand) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBrand) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_brand_app.go b/model_brand_app.go new file mode 100644 index 0000000..b0eb5dd --- /dev/null +++ b/model_brand_app.go @@ -0,0 +1,333 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the BrandApp type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BrandApp{} + +// BrandApp struct for BrandApp +type BrandApp struct { + Id int32 `json:"id"` + UpdatedAt string `json:"updated_at"` + Name string `json:"name"` + ConnectorId int32 `json:"connector_id"` + AuthMethodDescription string `json:"auth_method_description"` + Description string `json:"description"` + AuthMethod int32 `json:"auth_method"` + CreatedAt string `json:"created_at"` + Visible bool `json:"visible"` +} + +// NewBrandApp instantiates a new BrandApp 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 NewBrandApp(id int32, updatedAt string, name string, connectorId int32, authMethodDescription string, description string, authMethod int32, createdAt string, visible bool) *BrandApp { + this := BrandApp{} + this.Id = id + this.UpdatedAt = updatedAt + this.Name = name + this.ConnectorId = connectorId + this.AuthMethodDescription = authMethodDescription + this.Description = description + this.AuthMethod = authMethod + this.CreatedAt = createdAt + this.Visible = visible + return &this +} + +// NewBrandAppWithDefaults instantiates a new BrandApp 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 NewBrandAppWithDefaults() *BrandApp { + this := BrandApp{} + return &this +} + +// GetId returns the Id field value +func (o *BrandApp) GetId() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *BrandApp) GetIdOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *BrandApp) SetId(v int32) { + o.Id = v +} + +// GetUpdatedAt returns the UpdatedAt field value +func (o *BrandApp) GetUpdatedAt() string { + if o == nil { + var ret string + return ret + } + + return o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value +// and a boolean to check if the value has been set. +func (o *BrandApp) GetUpdatedAtOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.UpdatedAt, true +} + +// SetUpdatedAt sets field value +func (o *BrandApp) SetUpdatedAt(v string) { + o.UpdatedAt = v +} + +// GetName returns the Name field value +func (o *BrandApp) 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 *BrandApp) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *BrandApp) SetName(v string) { + o.Name = v +} + +// GetConnectorId returns the ConnectorId field value +func (o *BrandApp) GetConnectorId() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.ConnectorId +} + +// GetConnectorIdOk returns a tuple with the ConnectorId field value +// and a boolean to check if the value has been set. +func (o *BrandApp) GetConnectorIdOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.ConnectorId, true +} + +// SetConnectorId sets field value +func (o *BrandApp) SetConnectorId(v int32) { + o.ConnectorId = v +} + +// GetAuthMethodDescription returns the AuthMethodDescription field value +func (o *BrandApp) GetAuthMethodDescription() string { + if o == nil { + var ret string + return ret + } + + return o.AuthMethodDescription +} + +// GetAuthMethodDescriptionOk returns a tuple with the AuthMethodDescription field value +// and a boolean to check if the value has been set. +func (o *BrandApp) GetAuthMethodDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.AuthMethodDescription, true +} + +// SetAuthMethodDescription sets field value +func (o *BrandApp) SetAuthMethodDescription(v string) { + o.AuthMethodDescription = v +} + +// GetDescription returns the Description field value +func (o *BrandApp) GetDescription() string { + if o == nil { + var ret string + return ret + } + + return o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value +// and a boolean to check if the value has been set. +func (o *BrandApp) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Description, true +} + +// SetDescription sets field value +func (o *BrandApp) SetDescription(v string) { + o.Description = v +} + +// GetAuthMethod returns the AuthMethod field value +func (o *BrandApp) GetAuthMethod() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.AuthMethod +} + +// GetAuthMethodOk returns a tuple with the AuthMethod field value +// and a boolean to check if the value has been set. +func (o *BrandApp) GetAuthMethodOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.AuthMethod, true +} + +// SetAuthMethod sets field value +func (o *BrandApp) SetAuthMethod(v int32) { + o.AuthMethod = v +} + +// GetCreatedAt returns the CreatedAt field value +func (o *BrandApp) GetCreatedAt() string { + if o == nil { + var ret string + return ret + } + + return o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value +// and a boolean to check if the value has been set. +func (o *BrandApp) GetCreatedAtOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.CreatedAt, true +} + +// SetCreatedAt sets field value +func (o *BrandApp) SetCreatedAt(v string) { + o.CreatedAt = v +} + +// GetVisible returns the Visible field value +func (o *BrandApp) GetVisible() bool { + if o == nil { + var ret bool + return ret + } + + return o.Visible +} + +// GetVisibleOk returns a tuple with the Visible field value +// and a boolean to check if the value has been set. +func (o *BrandApp) GetVisibleOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Visible, true +} + +// SetVisible sets field value +func (o *BrandApp) SetVisible(v bool) { + o.Visible = v +} + +func (o BrandApp) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BrandApp) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["updated_at"] = o.UpdatedAt + toSerialize["name"] = o.Name + toSerialize["connector_id"] = o.ConnectorId + toSerialize["auth_method_description"] = o.AuthMethodDescription + toSerialize["description"] = o.Description + toSerialize["auth_method"] = o.AuthMethod + toSerialize["created_at"] = o.CreatedAt + toSerialize["visible"] = o.Visible + return toSerialize, nil +} + +type NullableBrandApp struct { + value *BrandApp + isSet bool +} + +func (v NullableBrandApp) Get() *BrandApp { + return v.value +} + +func (v *NullableBrandApp) Set(val *BrandApp) { + v.value = val + v.isSet = true +} + +func (v NullableBrandApp) IsSet() bool { + return v.isSet +} + +func (v *NullableBrandApp) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBrandApp(val *BrandApp) *NullableBrandApp { + return &NullableBrandApp{value: val, isSet: true} +} + +func (v NullableBrandApp) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBrandApp) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_brand_background.go b/model_brand_background.go new file mode 100644 index 0000000..0dca0a6 --- /dev/null +++ b/model_brand_background.go @@ -0,0 +1,198 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the BrandBackground type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BrandBackground{} + +// BrandBackground struct for BrandBackground +type BrandBackground struct { + Urls BrandBackgroundUrls `json:"urls"` + FileSize int32 `json:"file_size"` + UpdatedAt string `json:"updated_at"` + ContentType string `json:"content_type"` +} + +// NewBrandBackground instantiates a new BrandBackground 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 NewBrandBackground(urls BrandBackgroundUrls, fileSize int32, updatedAt string, contentType string) *BrandBackground { + this := BrandBackground{} + this.Urls = urls + this.FileSize = fileSize + this.UpdatedAt = updatedAt + this.ContentType = contentType + return &this +} + +// NewBrandBackgroundWithDefaults instantiates a new BrandBackground 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 NewBrandBackgroundWithDefaults() *BrandBackground { + this := BrandBackground{} + return &this +} + +// GetUrls returns the Urls field value +func (o *BrandBackground) GetUrls() BrandBackgroundUrls { + if o == nil { + var ret BrandBackgroundUrls + return ret + } + + return o.Urls +} + +// GetUrlsOk returns a tuple with the Urls field value +// and a boolean to check if the value has been set. +func (o *BrandBackground) GetUrlsOk() (*BrandBackgroundUrls, bool) { + if o == nil { + return nil, false + } + return &o.Urls, true +} + +// SetUrls sets field value +func (o *BrandBackground) SetUrls(v BrandBackgroundUrls) { + o.Urls = v +} + +// GetFileSize returns the FileSize field value +func (o *BrandBackground) GetFileSize() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.FileSize +} + +// GetFileSizeOk returns a tuple with the FileSize field value +// and a boolean to check if the value has been set. +func (o *BrandBackground) GetFileSizeOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.FileSize, true +} + +// SetFileSize sets field value +func (o *BrandBackground) SetFileSize(v int32) { + o.FileSize = v +} + +// GetUpdatedAt returns the UpdatedAt field value +func (o *BrandBackground) GetUpdatedAt() string { + if o == nil { + var ret string + return ret + } + + return o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value +// and a boolean to check if the value has been set. +func (o *BrandBackground) GetUpdatedAtOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.UpdatedAt, true +} + +// SetUpdatedAt sets field value +func (o *BrandBackground) SetUpdatedAt(v string) { + o.UpdatedAt = v +} + +// GetContentType returns the ContentType field value +func (o *BrandBackground) GetContentType() string { + if o == nil { + var ret string + return ret + } + + return o.ContentType +} + +// GetContentTypeOk returns a tuple with the ContentType field value +// and a boolean to check if the value has been set. +func (o *BrandBackground) GetContentTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ContentType, true +} + +// SetContentType sets field value +func (o *BrandBackground) SetContentType(v string) { + o.ContentType = v +} + +func (o BrandBackground) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BrandBackground) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["urls"] = o.Urls + toSerialize["file_size"] = o.FileSize + toSerialize["updated_at"] = o.UpdatedAt + toSerialize["content_type"] = o.ContentType + return toSerialize, nil +} + +type NullableBrandBackground struct { + value *BrandBackground + isSet bool +} + +func (v NullableBrandBackground) Get() *BrandBackground { + return v.value +} + +func (v *NullableBrandBackground) Set(val *BrandBackground) { + v.value = val + v.isSet = true +} + +func (v NullableBrandBackground) IsSet() bool { + return v.isSet +} + +func (v *NullableBrandBackground) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBrandBackground(val *BrandBackground) *NullableBrandBackground { + return &NullableBrandBackground{value: val, isSet: true} +} + +func (v NullableBrandBackground) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBrandBackground) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_brand_background_urls.go b/model_brand_background_urls.go new file mode 100644 index 0000000..bd667cb --- /dev/null +++ b/model_brand_background_urls.go @@ -0,0 +1,171 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the BrandBackgroundUrls type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BrandBackgroundUrls{} + +// BrandBackgroundUrls struct for BrandBackgroundUrls +type BrandBackgroundUrls struct { + Original string `json:"original"` + Login string `json:"login"` + Branding string `json:"branding"` +} + +// NewBrandBackgroundUrls instantiates a new BrandBackgroundUrls 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 NewBrandBackgroundUrls(original string, login string, branding string) *BrandBackgroundUrls { + this := BrandBackgroundUrls{} + this.Original = original + this.Login = login + this.Branding = branding + return &this +} + +// NewBrandBackgroundUrlsWithDefaults instantiates a new BrandBackgroundUrls 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 NewBrandBackgroundUrlsWithDefaults() *BrandBackgroundUrls { + this := BrandBackgroundUrls{} + return &this +} + +// GetOriginal returns the Original field value +func (o *BrandBackgroundUrls) GetOriginal() string { + if o == nil { + var ret string + return ret + } + + return o.Original +} + +// GetOriginalOk returns a tuple with the Original field value +// and a boolean to check if the value has been set. +func (o *BrandBackgroundUrls) GetOriginalOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Original, true +} + +// SetOriginal sets field value +func (o *BrandBackgroundUrls) SetOriginal(v string) { + o.Original = v +} + +// GetLogin returns the Login field value +func (o *BrandBackgroundUrls) GetLogin() string { + if o == nil { + var ret string + return ret + } + + return o.Login +} + +// GetLoginOk returns a tuple with the Login field value +// and a boolean to check if the value has been set. +func (o *BrandBackgroundUrls) GetLoginOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Login, true +} + +// SetLogin sets field value +func (o *BrandBackgroundUrls) SetLogin(v string) { + o.Login = v +} + +// GetBranding returns the Branding field value +func (o *BrandBackgroundUrls) GetBranding() string { + if o == nil { + var ret string + return ret + } + + return o.Branding +} + +// GetBrandingOk returns a tuple with the Branding field value +// and a boolean to check if the value has been set. +func (o *BrandBackgroundUrls) GetBrandingOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Branding, true +} + +// SetBranding sets field value +func (o *BrandBackgroundUrls) SetBranding(v string) { + o.Branding = v +} + +func (o BrandBackgroundUrls) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BrandBackgroundUrls) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["original"] = o.Original + toSerialize["login"] = o.Login + toSerialize["branding"] = o.Branding + return toSerialize, nil +} + +type NullableBrandBackgroundUrls struct { + value *BrandBackgroundUrls + isSet bool +} + +func (v NullableBrandBackgroundUrls) Get() *BrandBackgroundUrls { + return v.value +} + +func (v *NullableBrandBackgroundUrls) Set(val *BrandBackgroundUrls) { + v.value = val + v.isSet = true +} + +func (v NullableBrandBackgroundUrls) IsSet() bool { + return v.isSet +} + +func (v *NullableBrandBackgroundUrls) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBrandBackgroundUrls(val *BrandBackgroundUrls) *NullableBrandBackgroundUrls { + return &NullableBrandBackgroundUrls{value: val, isSet: true} +} + +func (v NullableBrandBackgroundUrls) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBrandBackgroundUrls) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_brand_logo.go b/model_brand_logo.go new file mode 100644 index 0000000..97ddf2c --- /dev/null +++ b/model_brand_logo.go @@ -0,0 +1,198 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the BrandLogo type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BrandLogo{} + +// BrandLogo struct for BrandLogo +type BrandLogo struct { + Urls BrandLogoUrls `json:"urls"` + FileSize int32 `json:"file_size"` + UpdatedAt string `json:"updated_at"` + ContentType string `json:"content_type"` +} + +// NewBrandLogo instantiates a new BrandLogo 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 NewBrandLogo(urls BrandLogoUrls, fileSize int32, updatedAt string, contentType string) *BrandLogo { + this := BrandLogo{} + this.Urls = urls + this.FileSize = fileSize + this.UpdatedAt = updatedAt + this.ContentType = contentType + return &this +} + +// NewBrandLogoWithDefaults instantiates a new BrandLogo 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 NewBrandLogoWithDefaults() *BrandLogo { + this := BrandLogo{} + return &this +} + +// GetUrls returns the Urls field value +func (o *BrandLogo) GetUrls() BrandLogoUrls { + if o == nil { + var ret BrandLogoUrls + return ret + } + + return o.Urls +} + +// GetUrlsOk returns a tuple with the Urls field value +// and a boolean to check if the value has been set. +func (o *BrandLogo) GetUrlsOk() (*BrandLogoUrls, bool) { + if o == nil { + return nil, false + } + return &o.Urls, true +} + +// SetUrls sets field value +func (o *BrandLogo) SetUrls(v BrandLogoUrls) { + o.Urls = v +} + +// GetFileSize returns the FileSize field value +func (o *BrandLogo) GetFileSize() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.FileSize +} + +// GetFileSizeOk returns a tuple with the FileSize field value +// and a boolean to check if the value has been set. +func (o *BrandLogo) GetFileSizeOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.FileSize, true +} + +// SetFileSize sets field value +func (o *BrandLogo) SetFileSize(v int32) { + o.FileSize = v +} + +// GetUpdatedAt returns the UpdatedAt field value +func (o *BrandLogo) GetUpdatedAt() string { + if o == nil { + var ret string + return ret + } + + return o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value +// and a boolean to check if the value has been set. +func (o *BrandLogo) GetUpdatedAtOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.UpdatedAt, true +} + +// SetUpdatedAt sets field value +func (o *BrandLogo) SetUpdatedAt(v string) { + o.UpdatedAt = v +} + +// GetContentType returns the ContentType field value +func (o *BrandLogo) GetContentType() string { + if o == nil { + var ret string + return ret + } + + return o.ContentType +} + +// GetContentTypeOk returns a tuple with the ContentType field value +// and a boolean to check if the value has been set. +func (o *BrandLogo) GetContentTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ContentType, true +} + +// SetContentType sets field value +func (o *BrandLogo) SetContentType(v string) { + o.ContentType = v +} + +func (o BrandLogo) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BrandLogo) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["urls"] = o.Urls + toSerialize["file_size"] = o.FileSize + toSerialize["updated_at"] = o.UpdatedAt + toSerialize["content_type"] = o.ContentType + return toSerialize, nil +} + +type NullableBrandLogo struct { + value *BrandLogo + isSet bool +} + +func (v NullableBrandLogo) Get() *BrandLogo { + return v.value +} + +func (v *NullableBrandLogo) Set(val *BrandLogo) { + v.value = val + v.isSet = true +} + +func (v NullableBrandLogo) IsSet() bool { + return v.isSet +} + +func (v *NullableBrandLogo) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBrandLogo(val *BrandLogo) *NullableBrandLogo { + return &NullableBrandLogo{value: val, isSet: true} +} + +func (v NullableBrandLogo) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBrandLogo) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_brand_logo_urls.go b/model_brand_logo_urls.go new file mode 100644 index 0000000..012e4da --- /dev/null +++ b/model_brand_logo_urls.go @@ -0,0 +1,171 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the BrandLogoUrls type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BrandLogoUrls{} + +// BrandLogoUrls struct for BrandLogoUrls +type BrandLogoUrls struct { + Original string `json:"original"` + Login string `json:"login"` + Navigation string `json:"navigation"` +} + +// NewBrandLogoUrls instantiates a new BrandLogoUrls 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 NewBrandLogoUrls(original string, login string, navigation string) *BrandLogoUrls { + this := BrandLogoUrls{} + this.Original = original + this.Login = login + this.Navigation = navigation + return &this +} + +// NewBrandLogoUrlsWithDefaults instantiates a new BrandLogoUrls 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 NewBrandLogoUrlsWithDefaults() *BrandLogoUrls { + this := BrandLogoUrls{} + return &this +} + +// GetOriginal returns the Original field value +func (o *BrandLogoUrls) GetOriginal() string { + if o == nil { + var ret string + return ret + } + + return o.Original +} + +// GetOriginalOk returns a tuple with the Original field value +// and a boolean to check if the value has been set. +func (o *BrandLogoUrls) GetOriginalOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Original, true +} + +// SetOriginal sets field value +func (o *BrandLogoUrls) SetOriginal(v string) { + o.Original = v +} + +// GetLogin returns the Login field value +func (o *BrandLogoUrls) GetLogin() string { + if o == nil { + var ret string + return ret + } + + return o.Login +} + +// GetLoginOk returns a tuple with the Login field value +// and a boolean to check if the value has been set. +func (o *BrandLogoUrls) GetLoginOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Login, true +} + +// SetLogin sets field value +func (o *BrandLogoUrls) SetLogin(v string) { + o.Login = v +} + +// GetNavigation returns the Navigation field value +func (o *BrandLogoUrls) GetNavigation() string { + if o == nil { + var ret string + return ret + } + + return o.Navigation +} + +// GetNavigationOk returns a tuple with the Navigation field value +// and a boolean to check if the value has been set. +func (o *BrandLogoUrls) GetNavigationOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Navigation, true +} + +// SetNavigation sets field value +func (o *BrandLogoUrls) SetNavigation(v string) { + o.Navigation = v +} + +func (o BrandLogoUrls) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BrandLogoUrls) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["original"] = o.Original + toSerialize["login"] = o.Login + toSerialize["navigation"] = o.Navigation + return toSerialize, nil +} + +type NullableBrandLogoUrls struct { + value *BrandLogoUrls + isSet bool +} + +func (v NullableBrandLogoUrls) Get() *BrandLogoUrls { + return v.value +} + +func (v *NullableBrandLogoUrls) Set(val *BrandLogoUrls) { + v.value = val + v.isSet = true +} + +func (v NullableBrandLogoUrls) IsSet() bool { + return v.isSet +} + +func (v *NullableBrandLogoUrls) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBrandLogoUrls(val *BrandLogoUrls) *NullableBrandLogoUrls { + return &NullableBrandLogoUrls{value: val, isSet: true} +} + +func (v NullableBrandLogoUrls) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBrandLogoUrls) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_brand_req.go b/model_brand_req.go new file mode 100644 index 0000000..6621843 --- /dev/null +++ b/model_brand_req.go @@ -0,0 +1,201 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the BrandReq type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BrandReq{} + +// BrandReq struct for BrandReq +type BrandReq struct { + // Brand’s unique ID in OneLogin. + Id *int32 `json:"id,omitempty"` + // Indicates if the brand is enabled or not. + Enabled *bool `json:"enabled,omitempty"` + // Brand name for humans. This isn’t related to subdomains. + Name *string `json:"name,omitempty"` +} + +// NewBrandReq instantiates a new BrandReq 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 NewBrandReq() *BrandReq { + this := BrandReq{} + return &this +} + +// NewBrandReqWithDefaults instantiates a new BrandReq 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 NewBrandReqWithDefaults() *BrandReq { + this := BrandReq{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *BrandReq) GetId() int32 { + if o == nil || isNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BrandReq) GetIdOk() (*int32, bool) { + if o == nil || isNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *BrandReq) HasId() bool { + if o != nil && !isNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *BrandReq) SetId(v int32) { + o.Id = &v +} + +// GetEnabled returns the Enabled field value if set, zero value otherwise. +func (o *BrandReq) GetEnabled() bool { + if o == nil || isNil(o.Enabled) { + 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 *BrandReq) GetEnabledOk() (*bool, bool) { + if o == nil || isNil(o.Enabled) { + return nil, false + } + return o.Enabled, true +} + +// HasEnabled returns a boolean if a field has been set. +func (o *BrandReq) HasEnabled() bool { + if o != nil && !isNil(o.Enabled) { + return true + } + + return false +} + +// SetEnabled gets a reference to the given bool and assigns it to the Enabled field. +func (o *BrandReq) SetEnabled(v bool) { + o.Enabled = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *BrandReq) GetName() string { + if o == nil || isNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// 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 *BrandReq) GetNameOk() (*string, bool) { + if o == nil || isNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *BrandReq) HasName() bool { + if o != nil && !isNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *BrandReq) SetName(v string) { + o.Name = &v +} + +func (o BrandReq) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BrandReq) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.Id) { + toSerialize["id"] = o.Id + } + if !isNil(o.Enabled) { + toSerialize["enabled"] = o.Enabled + } + if !isNil(o.Name) { + toSerialize["name"] = o.Name + } + return toSerialize, nil +} + +type NullableBrandReq struct { + value *BrandReq + isSet bool +} + +func (v NullableBrandReq) Get() *BrandReq { + return v.value +} + +func (v *NullableBrandReq) Set(val *BrandReq) { + v.value = val + v.isSet = true +} + +func (v NullableBrandReq) IsSet() bool { + return v.isSet +} + +func (v *NullableBrandReq) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBrandReq(val *BrandReq) *NullableBrandReq { + return &NullableBrandReq{value: val, isSet: true} +} + +func (v NullableBrandReq) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBrandReq) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_client_app.go b/model_client_app.go deleted file mode 100644 index 9869c83..0000000 --- a/model_client_app.go +++ /dev/null @@ -1,151 +0,0 @@ -/* -OneLogin API - -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -API version: 3.0.0-alpha.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package openapi - -import ( - "encoding/json" -) - -// ClientApp struct for ClientApp -type ClientApp struct { - AppId *int32 `json:"app_id,omitempty"` - ApiAuthId *int32 `json:"api_auth_id,omitempty"` -} - -// NewClientApp instantiates a new ClientApp 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 NewClientApp() *ClientApp { - this := ClientApp{} - return &this -} - -// NewClientAppWithDefaults instantiates a new ClientApp 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 NewClientAppWithDefaults() *ClientApp { - this := ClientApp{} - return &this -} - -// GetAppId returns the AppId field value if set, zero value otherwise. -func (o *ClientApp) GetAppId() int32 { - if o == nil || o.AppId == nil { - var ret int32 - return ret - } - return *o.AppId -} - -// GetAppIdOk returns a tuple with the AppId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ClientApp) GetAppIdOk() (*int32, bool) { - if o == nil || o.AppId == nil { - return nil, false - } - return o.AppId, true -} - -// HasAppId returns a boolean if a field has been set. -func (o *ClientApp) HasAppId() bool { - if o != nil && o.AppId != nil { - return true - } - - return false -} - -// SetAppId gets a reference to the given int32 and assigns it to the AppId field. -func (o *ClientApp) SetAppId(v int32) { - o.AppId = &v -} - -// GetApiAuthId returns the ApiAuthId field value if set, zero value otherwise. -func (o *ClientApp) GetApiAuthId() int32 { - if o == nil || o.ApiAuthId == nil { - var ret int32 - return ret - } - return *o.ApiAuthId -} - -// GetApiAuthIdOk returns a tuple with the ApiAuthId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ClientApp) GetApiAuthIdOk() (*int32, bool) { - if o == nil || o.ApiAuthId == nil { - return nil, false - } - return o.ApiAuthId, true -} - -// HasApiAuthId returns a boolean if a field has been set. -func (o *ClientApp) HasApiAuthId() bool { - if o != nil && o.ApiAuthId != nil { - return true - } - - return false -} - -// SetApiAuthId gets a reference to the given int32 and assigns it to the ApiAuthId field. -func (o *ClientApp) SetApiAuthId(v int32) { - o.ApiAuthId = &v -} - -func (o ClientApp) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.AppId != nil { - toSerialize["app_id"] = o.AppId - } - if o.ApiAuthId != nil { - toSerialize["api_auth_id"] = o.ApiAuthId - } - return json.Marshal(toSerialize) -} - -type NullableClientApp struct { - value *ClientApp - isSet bool -} - -func (v NullableClientApp) Get() *ClientApp { - return v.value -} - -func (v *NullableClientApp) Set(val *ClientApp) { - v.value = val - v.isSet = true -} - -func (v NullableClientApp) IsSet() bool { - return v.isSet -} - -func (v *NullableClientApp) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableClientApp(val *ClientApp) *NullableClientApp { - return &NullableClientApp{value: val, isSet: true} -} - -func (v NullableClientApp) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableClientApp) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_client_app_full.go b/model_client_app_full.go new file mode 100644 index 0000000..755e71c --- /dev/null +++ b/model_client_app_full.go @@ -0,0 +1,237 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the ClientAppFull type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ClientAppFull{} + +// ClientAppFull struct for ClientAppFull +type ClientAppFull struct { + // List of All Scopes assigned to a client app + Scopes []Scope `json:"scopes,omitempty"` + // Unique Client App ID + AppId *int32 `json:"app_id,omitempty"` + // Name of client app + Name *string `json:"name,omitempty"` + ApiAuthId *int32 `json:"api_auth_id,omitempty"` +} + +// NewClientAppFull instantiates a new ClientAppFull 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 NewClientAppFull() *ClientAppFull { + this := ClientAppFull{} + return &this +} + +// NewClientAppFullWithDefaults instantiates a new ClientAppFull 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 NewClientAppFullWithDefaults() *ClientAppFull { + this := ClientAppFull{} + return &this +} + +// GetScopes returns the Scopes field value if set, zero value otherwise. +func (o *ClientAppFull) GetScopes() []Scope { + if o == nil || isNil(o.Scopes) { + var ret []Scope + return ret + } + return o.Scopes +} + +// GetScopesOk returns a tuple with the Scopes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ClientAppFull) GetScopesOk() ([]Scope, bool) { + if o == nil || isNil(o.Scopes) { + return nil, false + } + return o.Scopes, true +} + +// HasScopes returns a boolean if a field has been set. +func (o *ClientAppFull) HasScopes() bool { + if o != nil && !isNil(o.Scopes) { + return true + } + + return false +} + +// SetScopes gets a reference to the given []Scope and assigns it to the Scopes field. +func (o *ClientAppFull) SetScopes(v []Scope) { + o.Scopes = v +} + +// GetAppId returns the AppId field value if set, zero value otherwise. +func (o *ClientAppFull) GetAppId() int32 { + if o == nil || isNil(o.AppId) { + var ret int32 + return ret + } + return *o.AppId +} + +// GetAppIdOk returns a tuple with the AppId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ClientAppFull) GetAppIdOk() (*int32, bool) { + if o == nil || isNil(o.AppId) { + return nil, false + } + return o.AppId, true +} + +// HasAppId returns a boolean if a field has been set. +func (o *ClientAppFull) HasAppId() bool { + if o != nil && !isNil(o.AppId) { + return true + } + + return false +} + +// SetAppId gets a reference to the given int32 and assigns it to the AppId field. +func (o *ClientAppFull) SetAppId(v int32) { + o.AppId = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *ClientAppFull) GetName() string { + if o == nil || isNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// 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 *ClientAppFull) GetNameOk() (*string, bool) { + if o == nil || isNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *ClientAppFull) HasName() bool { + if o != nil && !isNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *ClientAppFull) SetName(v string) { + o.Name = &v +} + +// GetApiAuthId returns the ApiAuthId field value if set, zero value otherwise. +func (o *ClientAppFull) GetApiAuthId() int32 { + if o == nil || isNil(o.ApiAuthId) { + var ret int32 + return ret + } + return *o.ApiAuthId +} + +// GetApiAuthIdOk returns a tuple with the ApiAuthId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ClientAppFull) GetApiAuthIdOk() (*int32, bool) { + if o == nil || isNil(o.ApiAuthId) { + return nil, false + } + return o.ApiAuthId, true +} + +// HasApiAuthId returns a boolean if a field has been set. +func (o *ClientAppFull) HasApiAuthId() bool { + if o != nil && !isNil(o.ApiAuthId) { + return true + } + + return false +} + +// SetApiAuthId gets a reference to the given int32 and assigns it to the ApiAuthId field. +func (o *ClientAppFull) SetApiAuthId(v int32) { + o.ApiAuthId = &v +} + +func (o ClientAppFull) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ClientAppFull) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.Scopes) { + toSerialize["scopes"] = o.Scopes + } + if !isNil(o.AppId) { + toSerialize["app_id"] = o.AppId + } + if !isNil(o.Name) { + toSerialize["name"] = o.Name + } + if !isNil(o.ApiAuthId) { + toSerialize["api_auth_id"] = o.ApiAuthId + } + return toSerialize, nil +} + +type NullableClientAppFull struct { + value *ClientAppFull + isSet bool +} + +func (v NullableClientAppFull) Get() *ClientAppFull { + return v.value +} + +func (v *NullableClientAppFull) Set(val *ClientAppFull) { + v.value = val + v.isSet = true +} + +func (v NullableClientAppFull) IsSet() bool { + return v.isSet +} + +func (v *NullableClientAppFull) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableClientAppFull(val *ClientAppFull) *NullableClientAppFull { + return &NullableClientAppFull{value: val, isSet: true} +} + +func (v NullableClientAppFull) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableClientAppFull) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_clock_counter.go b/model_clock_counter.go new file mode 100644 index 0000000..449d708 --- /dev/null +++ b/model_clock_counter.go @@ -0,0 +1,162 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the ClockCounter type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ClockCounter{} + +// ClockCounter unit: - 0 = Seconds - 1 = Minutes - 2 = Hours value: - When Unit = 0 or 1 value must be 0-60 - When Unit = 2 value must be 0-24 +type ClockCounter struct { + Value *int32 `json:"value,omitempty"` + Unit *int32 `json:"unit,omitempty"` +} + +// NewClockCounter instantiates a new ClockCounter 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 NewClockCounter() *ClockCounter { + this := ClockCounter{} + return &this +} + +// NewClockCounterWithDefaults instantiates a new ClockCounter 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 NewClockCounterWithDefaults() *ClockCounter { + this := ClockCounter{} + return &this +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *ClockCounter) GetValue() int32 { + if o == nil || isNil(o.Value) { + var ret int32 + return ret + } + return *o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ClockCounter) GetValueOk() (*int32, bool) { + if o == nil || isNil(o.Value) { + return nil, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *ClockCounter) HasValue() bool { + if o != nil && !isNil(o.Value) { + return true + } + + return false +} + +// SetValue gets a reference to the given int32 and assigns it to the Value field. +func (o *ClockCounter) SetValue(v int32) { + o.Value = &v +} + +// GetUnit returns the Unit field value if set, zero value otherwise. +func (o *ClockCounter) GetUnit() int32 { + if o == nil || isNil(o.Unit) { + var ret int32 + return ret + } + return *o.Unit +} + +// GetUnitOk returns a tuple with the Unit field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ClockCounter) GetUnitOk() (*int32, bool) { + if o == nil || isNil(o.Unit) { + return nil, false + } + return o.Unit, true +} + +// HasUnit returns a boolean if a field has been set. +func (o *ClockCounter) HasUnit() bool { + if o != nil && !isNil(o.Unit) { + return true + } + + return false +} + +// SetUnit gets a reference to the given int32 and assigns it to the Unit field. +func (o *ClockCounter) SetUnit(v int32) { + o.Unit = &v +} + +func (o ClockCounter) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ClockCounter) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.Value) { + toSerialize["value"] = o.Value + } + if !isNil(o.Unit) { + toSerialize["unit"] = o.Unit + } + return toSerialize, nil +} + +type NullableClockCounter struct { + value *ClockCounter + isSet bool +} + +func (v NullableClockCounter) Get() *ClockCounter { + return v.value +} + +func (v *NullableClockCounter) Set(val *ClockCounter) { + v.value = val + v.isSet = true +} + +func (v NullableClockCounter) IsSet() bool { + return v.isSet +} + +func (v *NullableClockCounter) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableClockCounter(val *ClockCounter) *NullableClockCounter { + return &NullableClockCounter{value: val, isSet: true} +} + +func (v NullableClockCounter) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableClockCounter) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_condition.go b/model_condition.go index a65ae5c..a4d248f 100644 --- a/model_condition.go +++ b/model_condition.go @@ -1,26 +1,29 @@ /* OneLogin API -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) +OpenAPI Specification for OneLogin -API version: 3.0.0-alpha.1 +API version: 3.1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package openapi +package onelogin import ( "encoding/json" ) -// Condition struct for Condition +// checks if the Condition type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Condition{} + +// Condition Conditions in which mappings are applied type Condition struct { - // The source field to check. + // source field to check. Source *string `json:"source,omitempty"` // A valid operator for the selected condition source Operator *string `json:"operator,omitempty"` - // A plain text string or valid value for the selected condition source. + // A plain text string or valid value for the selected condition source Value *string `json:"value,omitempty"` } @@ -43,7 +46,7 @@ func NewConditionWithDefaults() *Condition { // GetSource returns the Source field value if set, zero value otherwise. func (o *Condition) GetSource() string { - if o == nil || o.Source == nil { + if o == nil || isNil(o.Source) { var ret string return ret } @@ -53,7 +56,7 @@ func (o *Condition) GetSource() string { // GetSourceOk returns a tuple with the Source field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Condition) GetSourceOk() (*string, bool) { - if o == nil || o.Source == nil { + if o == nil || isNil(o.Source) { return nil, false } return o.Source, true @@ -61,7 +64,7 @@ func (o *Condition) GetSourceOk() (*string, bool) { // HasSource returns a boolean if a field has been set. func (o *Condition) HasSource() bool { - if o != nil && o.Source != nil { + if o != nil && !isNil(o.Source) { return true } @@ -75,7 +78,7 @@ func (o *Condition) SetSource(v string) { // GetOperator returns the Operator field value if set, zero value otherwise. func (o *Condition) GetOperator() string { - if o == nil || o.Operator == nil { + if o == nil || isNil(o.Operator) { var ret string return ret } @@ -85,7 +88,7 @@ func (o *Condition) GetOperator() string { // GetOperatorOk returns a tuple with the Operator field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Condition) GetOperatorOk() (*string, bool) { - if o == nil || o.Operator == nil { + if o == nil || isNil(o.Operator) { return nil, false } return o.Operator, true @@ -93,7 +96,7 @@ func (o *Condition) GetOperatorOk() (*string, bool) { // HasOperator returns a boolean if a field has been set. func (o *Condition) HasOperator() bool { - if o != nil && o.Operator != nil { + if o != nil && !isNil(o.Operator) { return true } @@ -107,7 +110,7 @@ func (o *Condition) SetOperator(v string) { // GetValue returns the Value field value if set, zero value otherwise. func (o *Condition) GetValue() string { - if o == nil || o.Value == nil { + if o == nil || isNil(o.Value) { var ret string return ret } @@ -117,7 +120,7 @@ func (o *Condition) GetValue() string { // GetValueOk returns a tuple with the Value field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Condition) GetValueOk() (*string, bool) { - if o == nil || o.Value == nil { + if o == nil || isNil(o.Value) { return nil, false } return o.Value, true @@ -125,7 +128,7 @@ func (o *Condition) GetValueOk() (*string, bool) { // HasValue returns a boolean if a field has been set. func (o *Condition) HasValue() bool { - if o != nil && o.Value != nil { + if o != nil && !isNil(o.Value) { return true } @@ -138,17 +141,25 @@ func (o *Condition) SetValue(v string) { } func (o Condition) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Condition) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Source != nil { + if !isNil(o.Source) { toSerialize["source"] = o.Source } - if o.Operator != nil { + if !isNil(o.Operator) { toSerialize["operator"] = o.Operator } - if o.Value != nil { + if !isNil(o.Value) { toSerialize["value"] = o.Value } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableCondition struct { diff --git a/model_configuration_oidc.go b/model_configuration_oidc.go new file mode 100644 index 0000000..72ff735 --- /dev/null +++ b/model_configuration_oidc.go @@ -0,0 +1,258 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the ConfigurationOidc type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ConfigurationOidc{} + +// ConfigurationOidc struct for ConfigurationOidc +type ConfigurationOidc struct { + // The OpenId Connect Client Id. Note that client_secret is only returned after Creating an App. + LoginUrl string `json:"login_url"` + // Comma or newline separated list of valid redirect uris for the OpenId Connect Authorization Code flow. + RedirectUri string `json:"redirect_uri"` + // Number of minutes the refresh token will be valid for. + AccessTokenExpirationMinutes int32 `json:"access_token_expiration_minutes"` + // Number of minutes the refresh token will be valid for. + RefreshTokenExpirationMinutes int32 `json:"refresh_token_expiration_minutes"` + // - 0: Basic - 1: POST - 2: None / PKCE + TokenEndpointAuthMethod int32 `json:"token_endpoint_auth_method"` + // - 0 : Web - 1 : Native / Mobile + OidcApplicationType int32 `json:"oidc_application_type"` +} + +// NewConfigurationOidc instantiates a new ConfigurationOidc 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 NewConfigurationOidc(loginUrl string, redirectUri string, accessTokenExpirationMinutes int32, refreshTokenExpirationMinutes int32, tokenEndpointAuthMethod int32, oidcApplicationType int32) *ConfigurationOidc { + this := ConfigurationOidc{} + this.LoginUrl = loginUrl + this.RedirectUri = redirectUri + this.AccessTokenExpirationMinutes = accessTokenExpirationMinutes + this.RefreshTokenExpirationMinutes = refreshTokenExpirationMinutes + this.TokenEndpointAuthMethod = tokenEndpointAuthMethod + this.OidcApplicationType = oidcApplicationType + return &this +} + +// NewConfigurationOidcWithDefaults instantiates a new ConfigurationOidc 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 NewConfigurationOidcWithDefaults() *ConfigurationOidc { + this := ConfigurationOidc{} + return &this +} + +// GetLoginUrl returns the LoginUrl field value +func (o *ConfigurationOidc) GetLoginUrl() string { + if o == nil { + var ret string + return ret + } + + return o.LoginUrl +} + +// GetLoginUrlOk returns a tuple with the LoginUrl field value +// and a boolean to check if the value has been set. +func (o *ConfigurationOidc) GetLoginUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LoginUrl, true +} + +// SetLoginUrl sets field value +func (o *ConfigurationOidc) SetLoginUrl(v string) { + o.LoginUrl = v +} + +// GetRedirectUri returns the RedirectUri field value +func (o *ConfigurationOidc) GetRedirectUri() string { + if o == nil { + var ret string + return ret + } + + return o.RedirectUri +} + +// GetRedirectUriOk returns a tuple with the RedirectUri field value +// and a boolean to check if the value has been set. +func (o *ConfigurationOidc) GetRedirectUriOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RedirectUri, true +} + +// SetRedirectUri sets field value +func (o *ConfigurationOidc) SetRedirectUri(v string) { + o.RedirectUri = v +} + +// GetAccessTokenExpirationMinutes returns the AccessTokenExpirationMinutes field value +func (o *ConfigurationOidc) GetAccessTokenExpirationMinutes() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.AccessTokenExpirationMinutes +} + +// GetAccessTokenExpirationMinutesOk returns a tuple with the AccessTokenExpirationMinutes field value +// and a boolean to check if the value has been set. +func (o *ConfigurationOidc) GetAccessTokenExpirationMinutesOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.AccessTokenExpirationMinutes, true +} + +// SetAccessTokenExpirationMinutes sets field value +func (o *ConfigurationOidc) SetAccessTokenExpirationMinutes(v int32) { + o.AccessTokenExpirationMinutes = v +} + +// GetRefreshTokenExpirationMinutes returns the RefreshTokenExpirationMinutes field value +func (o *ConfigurationOidc) GetRefreshTokenExpirationMinutes() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.RefreshTokenExpirationMinutes +} + +// GetRefreshTokenExpirationMinutesOk returns a tuple with the RefreshTokenExpirationMinutes field value +// and a boolean to check if the value has been set. +func (o *ConfigurationOidc) GetRefreshTokenExpirationMinutesOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.RefreshTokenExpirationMinutes, true +} + +// SetRefreshTokenExpirationMinutes sets field value +func (o *ConfigurationOidc) SetRefreshTokenExpirationMinutes(v int32) { + o.RefreshTokenExpirationMinutes = v +} + +// GetTokenEndpointAuthMethod returns the TokenEndpointAuthMethod field value +func (o *ConfigurationOidc) GetTokenEndpointAuthMethod() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.TokenEndpointAuthMethod +} + +// GetTokenEndpointAuthMethodOk returns a tuple with the TokenEndpointAuthMethod field value +// and a boolean to check if the value has been set. +func (o *ConfigurationOidc) GetTokenEndpointAuthMethodOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.TokenEndpointAuthMethod, true +} + +// SetTokenEndpointAuthMethod sets field value +func (o *ConfigurationOidc) SetTokenEndpointAuthMethod(v int32) { + o.TokenEndpointAuthMethod = v +} + +// GetOidcApplicationType returns the OidcApplicationType field value +func (o *ConfigurationOidc) GetOidcApplicationType() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.OidcApplicationType +} + +// GetOidcApplicationTypeOk returns a tuple with the OidcApplicationType field value +// and a boolean to check if the value has been set. +func (o *ConfigurationOidc) GetOidcApplicationTypeOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.OidcApplicationType, true +} + +// SetOidcApplicationType sets field value +func (o *ConfigurationOidc) SetOidcApplicationType(v int32) { + o.OidcApplicationType = v +} + +func (o ConfigurationOidc) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ConfigurationOidc) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["login_url"] = o.LoginUrl + toSerialize["redirect_uri"] = o.RedirectUri + toSerialize["access_token_expiration_minutes"] = o.AccessTokenExpirationMinutes + toSerialize["refresh_token_expiration_minutes"] = o.RefreshTokenExpirationMinutes + toSerialize["token_endpoint_auth_method"] = o.TokenEndpointAuthMethod + toSerialize["oidc_application_type"] = o.OidcApplicationType + return toSerialize, nil +} + +type NullableConfigurationOidc struct { + value *ConfigurationOidc + isSet bool +} + +func (v NullableConfigurationOidc) Get() *ConfigurationOidc { + return v.value +} + +func (v *NullableConfigurationOidc) Set(val *ConfigurationOidc) { + v.value = val + v.isSet = true +} + +func (v NullableConfigurationOidc) IsSet() bool { + return v.isSet +} + +func (v *NullableConfigurationOidc) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableConfigurationOidc(val *ConfigurationOidc) *NullableConfigurationOidc { + return &NullableConfigurationOidc{value: val, isSet: true} +} + +func (v NullableConfigurationOidc) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableConfigurationOidc) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_configuration_saml.go b/model_configuration_saml.go new file mode 100644 index 0000000..4241f3d --- /dev/null +++ b/model_configuration_saml.go @@ -0,0 +1,146 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the ConfigurationSaml type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ConfigurationSaml{} + +// ConfigurationSaml struct for ConfigurationSaml +type ConfigurationSaml struct { + // One of the following: - SHA-1 - SHA-256 - SHA-348 - SHA-512 + SignatureAlgorithm string `json:"signature_algorithm"` + // When creating apps the default certificate will be used unless the `certificate_id` attribute is applied in the `configuration` object. + CertificateId int32 `json:"certificate_id"` +} + +// NewConfigurationSaml instantiates a new ConfigurationSaml 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 NewConfigurationSaml(signatureAlgorithm string, certificateId int32) *ConfigurationSaml { + this := ConfigurationSaml{} + this.SignatureAlgorithm = signatureAlgorithm + this.CertificateId = certificateId + return &this +} + +// NewConfigurationSamlWithDefaults instantiates a new ConfigurationSaml 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 NewConfigurationSamlWithDefaults() *ConfigurationSaml { + this := ConfigurationSaml{} + return &this +} + +// GetSignatureAlgorithm returns the SignatureAlgorithm field value +func (o *ConfigurationSaml) GetSignatureAlgorithm() string { + if o == nil { + var ret string + return ret + } + + return o.SignatureAlgorithm +} + +// GetSignatureAlgorithmOk returns a tuple with the SignatureAlgorithm field value +// and a boolean to check if the value has been set. +func (o *ConfigurationSaml) GetSignatureAlgorithmOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.SignatureAlgorithm, true +} + +// SetSignatureAlgorithm sets field value +func (o *ConfigurationSaml) SetSignatureAlgorithm(v string) { + o.SignatureAlgorithm = v +} + +// GetCertificateId returns the CertificateId field value +func (o *ConfigurationSaml) GetCertificateId() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.CertificateId +} + +// GetCertificateIdOk returns a tuple with the CertificateId field value +// and a boolean to check if the value has been set. +func (o *ConfigurationSaml) GetCertificateIdOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.CertificateId, true +} + +// SetCertificateId sets field value +func (o *ConfigurationSaml) SetCertificateId(v int32) { + o.CertificateId = v +} + +func (o ConfigurationSaml) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ConfigurationSaml) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["signature_algorithm"] = o.SignatureAlgorithm + toSerialize["certificate_id"] = o.CertificateId + return toSerialize, nil +} + +type NullableConfigurationSaml struct { + value *ConfigurationSaml + isSet bool +} + +func (v NullableConfigurationSaml) Get() *ConfigurationSaml { + return v.value +} + +func (v *NullableConfigurationSaml) Set(val *ConfigurationSaml) { + v.value = val + v.isSet = true +} + +func (v NullableConfigurationSaml) IsSet() bool { + return v.isSet +} + +func (v *NullableConfigurationSaml) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableConfigurationSaml(val *ConfigurationSaml) *NullableConfigurationSaml { + return &NullableConfigurationSaml{value: val, isSet: true} +} + +func (v NullableConfigurationSaml) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableConfigurationSaml) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_connector.go b/model_connector.go index 764ca89..ce6f8fb 100644 --- a/model_connector.go +++ b/model_connector.go @@ -1,30 +1,33 @@ /* OneLogin API -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) +OpenAPI Specification for OneLogin -API version: 3.0.0-alpha.1 +API version: 3.1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package openapi +package onelogin import ( "encoding/json" ) +// checks if the Connector type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Connector{} + // Connector struct for Connector type Connector struct { - // The connectors unique ID in OneLogin. + // Connectors unique ID in OneLogin. Id *int32 `json:"id,omitempty"` - // The name of the connector. + // Name of Connector Name *string `json:"name,omitempty"` + // A link to the icon's url. + IconUrl *string `json:"icon_url,omitempty"` AuthMethod *AuthMethod `json:"auth_method,omitempty"` // Indicates if apps created using this connector will be allowed to create custom parameters. AllowsNewParameters *bool `json:"allows_new_parameters,omitempty"` - // A link to the apps icon url. - IconUrl *string `json:"icon_url,omitempty"` } // NewConnector instantiates a new Connector object @@ -46,7 +49,7 @@ func NewConnectorWithDefaults() *Connector { // GetId returns the Id field value if set, zero value otherwise. func (o *Connector) GetId() int32 { - if o == nil || o.Id == nil { + if o == nil || isNil(o.Id) { var ret int32 return ret } @@ -56,7 +59,7 @@ func (o *Connector) GetId() int32 { // GetIdOk returns a tuple with the Id field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Connector) GetIdOk() (*int32, bool) { - if o == nil || o.Id == nil { + if o == nil || isNil(o.Id) { return nil, false } return o.Id, true @@ -64,7 +67,7 @@ func (o *Connector) GetIdOk() (*int32, bool) { // HasId returns a boolean if a field has been set. func (o *Connector) HasId() bool { - if o != nil && o.Id != nil { + if o != nil && !isNil(o.Id) { return true } @@ -78,7 +81,7 @@ func (o *Connector) SetId(v int32) { // GetName returns the Name field value if set, zero value otherwise. func (o *Connector) GetName() string { - if o == nil || o.Name == nil { + if o == nil || isNil(o.Name) { var ret string return ret } @@ -88,7 +91,7 @@ func (o *Connector) 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 *Connector) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { + if o == nil || isNil(o.Name) { return nil, false } return o.Name, true @@ -96,7 +99,7 @@ func (o *Connector) GetNameOk() (*string, bool) { // HasName returns a boolean if a field has been set. func (o *Connector) HasName() bool { - if o != nil && o.Name != nil { + if o != nil && !isNil(o.Name) { return true } @@ -108,9 +111,41 @@ func (o *Connector) SetName(v string) { o.Name = &v } +// GetIconUrl returns the IconUrl field value if set, zero value otherwise. +func (o *Connector) GetIconUrl() string { + if o == nil || isNil(o.IconUrl) { + var ret string + return ret + } + return *o.IconUrl +} + +// 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 *Connector) GetIconUrlOk() (*string, bool) { + if o == nil || isNil(o.IconUrl) { + return nil, false + } + return o.IconUrl, true +} + +// HasIconUrl returns a boolean if a field has been set. +func (o *Connector) HasIconUrl() bool { + if o != nil && !isNil(o.IconUrl) { + return true + } + + return false +} + +// SetIconUrl gets a reference to the given string and assigns it to the IconUrl field. +func (o *Connector) SetIconUrl(v string) { + o.IconUrl = &v +} + // GetAuthMethod returns the AuthMethod field value if set, zero value otherwise. func (o *Connector) GetAuthMethod() AuthMethod { - if o == nil || o.AuthMethod == nil { + if o == nil || isNil(o.AuthMethod) { var ret AuthMethod return ret } @@ -120,7 +155,7 @@ func (o *Connector) GetAuthMethod() AuthMethod { // GetAuthMethodOk returns a tuple with the AuthMethod field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Connector) GetAuthMethodOk() (*AuthMethod, bool) { - if o == nil || o.AuthMethod == nil { + if o == nil || isNil(o.AuthMethod) { return nil, false } return o.AuthMethod, true @@ -128,7 +163,7 @@ func (o *Connector) GetAuthMethodOk() (*AuthMethod, bool) { // HasAuthMethod returns a boolean if a field has been set. func (o *Connector) HasAuthMethod() bool { - if o != nil && o.AuthMethod != nil { + if o != nil && !isNil(o.AuthMethod) { return true } @@ -142,7 +177,7 @@ func (o *Connector) SetAuthMethod(v AuthMethod) { // GetAllowsNewParameters returns the AllowsNewParameters field value if set, zero value otherwise. func (o *Connector) GetAllowsNewParameters() bool { - if o == nil || o.AllowsNewParameters == nil { + if o == nil || isNil(o.AllowsNewParameters) { var ret bool return ret } @@ -152,7 +187,7 @@ func (o *Connector) GetAllowsNewParameters() bool { // GetAllowsNewParametersOk returns a tuple with the AllowsNewParameters field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Connector) GetAllowsNewParametersOk() (*bool, bool) { - if o == nil || o.AllowsNewParameters == nil { + if o == nil || isNil(o.AllowsNewParameters) { return nil, false } return o.AllowsNewParameters, true @@ -160,7 +195,7 @@ func (o *Connector) GetAllowsNewParametersOk() (*bool, bool) { // HasAllowsNewParameters returns a boolean if a field has been set. func (o *Connector) HasAllowsNewParameters() bool { - if o != nil && o.AllowsNewParameters != nil { + if o != nil && !isNil(o.AllowsNewParameters) { return true } @@ -172,56 +207,32 @@ func (o *Connector) SetAllowsNewParameters(v bool) { o.AllowsNewParameters = &v } -// GetIconUrl returns the IconUrl field value if set, zero value otherwise. -func (o *Connector) GetIconUrl() string { - if o == nil || o.IconUrl == nil { - var ret string - return ret - } - return *o.IconUrl -} - -// 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 *Connector) GetIconUrlOk() (*string, bool) { - if o == nil || o.IconUrl == nil { - return nil, false - } - return o.IconUrl, true -} - -// HasIconUrl returns a boolean if a field has been set. -func (o *Connector) HasIconUrl() bool { - if o != nil && o.IconUrl != nil { - return true +func (o Connector) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err } - - return false -} - -// SetIconUrl gets a reference to the given string and assigns it to the IconUrl field. -func (o *Connector) SetIconUrl(v string) { - o.IconUrl = &v + return json.Marshal(toSerialize) } -func (o Connector) MarshalJSON() ([]byte, error) { +func (o Connector) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { + if !isNil(o.Id) { toSerialize["id"] = o.Id } - if o.Name != nil { + if !isNil(o.Name) { toSerialize["name"] = o.Name } - if o.AuthMethod != nil { + if !isNil(o.IconUrl) { + toSerialize["icon_url"] = o.IconUrl + } + if !isNil(o.AuthMethod) { toSerialize["auth_method"] = o.AuthMethod } - if o.AllowsNewParameters != nil { + if !isNil(o.AllowsNewParameters) { toSerialize["allows_new_parameters"] = o.AllowsNewParameters } - if o.IconUrl != nil { - toSerialize["icon_url"] = o.IconUrl - } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableConnector struct { diff --git a/model_create_app_200_response.go b/model_create_app_200_response.go new file mode 100644 index 0000000..f0c1cc6 --- /dev/null +++ b/model_create_app_200_response.go @@ -0,0 +1,178 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" + "fmt" +) + +// CreateApp200Response - struct for CreateApp200Response +type CreateApp200Response struct { + GenericApp *GenericApp + OidcApp *OidcApp + SamlApp *SamlApp +} + +// GenericAppAsCreateApp200Response is a convenience function that returns GenericApp wrapped in CreateApp200Response +func GenericAppAsCreateApp200Response(v *GenericApp) CreateApp200Response { + return CreateApp200Response{ + GenericApp: v, + } +} + +// OidcAppAsCreateApp200Response is a convenience function that returns OidcApp wrapped in CreateApp200Response +func OidcAppAsCreateApp200Response(v *OidcApp) CreateApp200Response { + return CreateApp200Response{ + OidcApp: v, + } +} + +// SamlAppAsCreateApp200Response is a convenience function that returns SamlApp wrapped in CreateApp200Response +func SamlAppAsCreateApp200Response(v *SamlApp) CreateApp200Response { + return CreateApp200Response{ + SamlApp: v, + } +} + + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *CreateApp200Response) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into GenericApp + err = newStrictDecoder(data).Decode(&dst.GenericApp) + if err == nil { + jsonGenericApp, _ := json.Marshal(dst.GenericApp) + if string(jsonGenericApp) == "{}" { // empty struct + dst.GenericApp = nil + } else { + match++ + } + } else { + dst.GenericApp = nil + } + + // try to unmarshal data into OidcApp + err = newStrictDecoder(data).Decode(&dst.OidcApp) + if err == nil { + jsonOidcApp, _ := json.Marshal(dst.OidcApp) + if string(jsonOidcApp) == "{}" { // empty struct + dst.OidcApp = nil + } else { + match++ + } + } else { + dst.OidcApp = nil + } + + // try to unmarshal data into SamlApp + err = newStrictDecoder(data).Decode(&dst.SamlApp) + if err == nil { + jsonSamlApp, _ := json.Marshal(dst.SamlApp) + if string(jsonSamlApp) == "{}" { // empty struct + dst.SamlApp = nil + } else { + match++ + } + } else { + dst.SamlApp = nil + } + + if match > 1 { // more than 1 match + // reset to nil + dst.GenericApp = nil + dst.OidcApp = nil + dst.SamlApp = nil + + return fmt.Errorf("data matches more than one schema in oneOf(CreateApp200Response)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("data failed to match schemas in oneOf(CreateApp200Response)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src CreateApp200Response) MarshalJSON() ([]byte, error) { + if src.GenericApp != nil { + return json.Marshal(&src.GenericApp) + } + + if src.OidcApp != nil { + return json.Marshal(&src.OidcApp) + } + + if src.SamlApp != nil { + return json.Marshal(&src.SamlApp) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *CreateApp200Response) GetActualInstance() (interface{}) { + if obj == nil { + return nil + } + if obj.GenericApp != nil { + return obj.GenericApp + } + + if obj.OidcApp != nil { + return obj.OidcApp + } + + if obj.SamlApp != nil { + return obj.SamlApp + } + + // all schemas are nil + return nil +} + +type NullableCreateApp200Response struct { + value *CreateApp200Response + isSet bool +} + +func (v NullableCreateApp200Response) Get() *CreateApp200Response { + return v.value +} + +func (v *NullableCreateApp200Response) Set(val *CreateApp200Response) { + v.value = val + v.isSet = true +} + +func (v NullableCreateApp200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateApp200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateApp200Response(val *CreateApp200Response) *NullableCreateApp200Response { + return &NullableCreateApp200Response{value: val, isSet: true} +} + +func (v NullableCreateApp200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateApp200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_create_app_request.go b/model_create_app_request.go new file mode 100644 index 0000000..c8cd922 --- /dev/null +++ b/model_create_app_request.go @@ -0,0 +1,178 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" + "fmt" +) + +// CreateAppRequest - struct for CreateAppRequest +type CreateAppRequest struct { + GenericApp *GenericApp + OidcApp *OidcApp + SamlApp *SamlApp +} + +// GenericAppAsCreateAppRequest is a convenience function that returns GenericApp wrapped in CreateAppRequest +func GenericAppAsCreateAppRequest(v *GenericApp) CreateAppRequest { + return CreateAppRequest{ + GenericApp: v, + } +} + +// OidcAppAsCreateAppRequest is a convenience function that returns OidcApp wrapped in CreateAppRequest +func OidcAppAsCreateAppRequest(v *OidcApp) CreateAppRequest { + return CreateAppRequest{ + OidcApp: v, + } +} + +// SamlAppAsCreateAppRequest is a convenience function that returns SamlApp wrapped in CreateAppRequest +func SamlAppAsCreateAppRequest(v *SamlApp) CreateAppRequest { + return CreateAppRequest{ + SamlApp: v, + } +} + + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *CreateAppRequest) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into GenericApp + err = newStrictDecoder(data).Decode(&dst.GenericApp) + if err == nil { + jsonGenericApp, _ := json.Marshal(dst.GenericApp) + if string(jsonGenericApp) == "{}" { // empty struct + dst.GenericApp = nil + } else { + match++ + } + } else { + dst.GenericApp = nil + } + + // try to unmarshal data into OidcApp + err = newStrictDecoder(data).Decode(&dst.OidcApp) + if err == nil { + jsonOidcApp, _ := json.Marshal(dst.OidcApp) + if string(jsonOidcApp) == "{}" { // empty struct + dst.OidcApp = nil + } else { + match++ + } + } else { + dst.OidcApp = nil + } + + // try to unmarshal data into SamlApp + err = newStrictDecoder(data).Decode(&dst.SamlApp) + if err == nil { + jsonSamlApp, _ := json.Marshal(dst.SamlApp) + if string(jsonSamlApp) == "{}" { // empty struct + dst.SamlApp = nil + } else { + match++ + } + } else { + dst.SamlApp = nil + } + + if match > 1 { // more than 1 match + // reset to nil + dst.GenericApp = nil + dst.OidcApp = nil + dst.SamlApp = nil + + return fmt.Errorf("data matches more than one schema in oneOf(CreateAppRequest)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("data failed to match schemas in oneOf(CreateAppRequest)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src CreateAppRequest) MarshalJSON() ([]byte, error) { + if src.GenericApp != nil { + return json.Marshal(&src.GenericApp) + } + + if src.OidcApp != nil { + return json.Marshal(&src.OidcApp) + } + + if src.SamlApp != nil { + return json.Marshal(&src.SamlApp) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *CreateAppRequest) GetActualInstance() (interface{}) { + if obj == nil { + return nil + } + if obj.GenericApp != nil { + return obj.GenericApp + } + + if obj.OidcApp != nil { + return obj.OidcApp + } + + if obj.SamlApp != nil { + return obj.SamlApp + } + + // all schemas are nil + return nil +} + +type NullableCreateAppRequest struct { + value *CreateAppRequest + isSet bool +} + +func (v NullableCreateAppRequest) Get() *CreateAppRequest { + return v.value +} + +func (v *NullableCreateAppRequest) Set(val *CreateAppRequest) { + v.value = val + v.isSet = true +} + +func (v NullableCreateAppRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateAppRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateAppRequest(val *CreateAppRequest) *NullableCreateAppRequest { + return &NullableCreateAppRequest{value: val, isSet: true} +} + +func (v NullableCreateAppRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateAppRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_create_authorization_server_request.go b/model_create_authorization_server_request.go deleted file mode 100644 index e88ac1b..0000000 --- a/model_create_authorization_server_request.go +++ /dev/null @@ -1,187 +0,0 @@ -/* -OneLogin API - -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -API version: 3.0.0-alpha.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package openapi - -import ( - "encoding/json" -) - -// CreateAuthorizationServerRequest struct for CreateAuthorizationServerRequest -type CreateAuthorizationServerRequest struct { - Name *string `json:"name,omitempty"` - Description *string `json:"description,omitempty"` - Configuration *AuthServerConfiguration `json:"configuration,omitempty"` -} - -// NewCreateAuthorizationServerRequest instantiates a new CreateAuthorizationServerRequest 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 NewCreateAuthorizationServerRequest() *CreateAuthorizationServerRequest { - this := CreateAuthorizationServerRequest{} - return &this -} - -// NewCreateAuthorizationServerRequestWithDefaults instantiates a new CreateAuthorizationServerRequest 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 NewCreateAuthorizationServerRequestWithDefaults() *CreateAuthorizationServerRequest { - this := CreateAuthorizationServerRequest{} - return &this -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *CreateAuthorizationServerRequest) GetName() string { - if o == nil || o.Name == nil { - var ret string - return ret - } - return *o.Name -} - -// 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 *CreateAuthorizationServerRequest) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *CreateAuthorizationServerRequest) HasName() bool { - if o != nil && o.Name != nil { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *CreateAuthorizationServerRequest) SetName(v string) { - o.Name = &v -} - -// GetDescription returns the Description field value if set, zero value otherwise. -func (o *CreateAuthorizationServerRequest) GetDescription() string { - if o == nil || o.Description == nil { - var ret string - return ret - } - return *o.Description -} - -// 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 *CreateAuthorizationServerRequest) GetDescriptionOk() (*string, bool) { - if o == nil || o.Description == nil { - return nil, false - } - return o.Description, true -} - -// HasDescription returns a boolean if a field has been set. -func (o *CreateAuthorizationServerRequest) HasDescription() bool { - if o != nil && o.Description != nil { - return true - } - - return false -} - -// SetDescription gets a reference to the given string and assigns it to the Description field. -func (o *CreateAuthorizationServerRequest) SetDescription(v string) { - o.Description = &v -} - -// GetConfiguration returns the Configuration field value if set, zero value otherwise. -func (o *CreateAuthorizationServerRequest) GetConfiguration() AuthServerConfiguration { - if o == nil || o.Configuration == nil { - var ret AuthServerConfiguration - return ret - } - return *o.Configuration -} - -// GetConfigurationOk returns a tuple with the Configuration field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateAuthorizationServerRequest) GetConfigurationOk() (*AuthServerConfiguration, bool) { - if o == nil || o.Configuration == nil { - return nil, false - } - return o.Configuration, true -} - -// HasConfiguration returns a boolean if a field has been set. -func (o *CreateAuthorizationServerRequest) HasConfiguration() bool { - if o != nil && o.Configuration != nil { - return true - } - - return false -} - -// SetConfiguration gets a reference to the given AuthServerConfiguration and assigns it to the Configuration field. -func (o *CreateAuthorizationServerRequest) SetConfiguration(v AuthServerConfiguration) { - o.Configuration = &v -} - -func (o CreateAuthorizationServerRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Name != nil { - toSerialize["name"] = o.Name - } - if o.Description != nil { - toSerialize["description"] = o.Description - } - if o.Configuration != nil { - toSerialize["configuration"] = o.Configuration - } - return json.Marshal(toSerialize) -} - -type NullableCreateAuthorizationServerRequest struct { - value *CreateAuthorizationServerRequest - isSet bool -} - -func (v NullableCreateAuthorizationServerRequest) Get() *CreateAuthorizationServerRequest { - return v.value -} - -func (v *NullableCreateAuthorizationServerRequest) Set(val *CreateAuthorizationServerRequest) { - v.value = val - v.isSet = true -} - -func (v NullableCreateAuthorizationServerRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableCreateAuthorizationServerRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCreateAuthorizationServerRequest(val *CreateAuthorizationServerRequest) *NullableCreateAuthorizationServerRequest { - return &NullableCreateAuthorizationServerRequest{value: val, isSet: true} -} - -func (v NullableCreateAuthorizationServerRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCreateAuthorizationServerRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_create_device_verification_201_response.go b/model_create_device_verification_201_response.go new file mode 100644 index 0000000..ca406fc --- /dev/null +++ b/model_create_device_verification_201_response.go @@ -0,0 +1,386 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the CreateDeviceVerification201Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateDeviceVerification201Response{} + +// CreateDeviceVerification201Response struct for CreateDeviceVerification201Response +type CreateDeviceVerification201Response struct { + // Specifies the factor to be verified. + DeviceId *int32 `json:"device_id,omitempty"` + // A name for the users device + DisplayName *string `json:"display_name,omitempty"` + // A short lived token that is required to Verify the Factor. This token expires based on the expires_in parameter passed in. + ExpiresAt *string `json:"expires_at,omitempty"` + // Only applies to Email MagicLink factor. Redirects MagicLink success page to specified URL after 2 seconds. Email must already be configured by the user. + RedirectTo *string `json:"redirect_to,omitempty"` + // Authentication factor display name assigned by users when they register the device. + UserDisplayName *string `json:"user_display_name,omitempty"` + // Registration identifier. + Id *string `json:"id,omitempty"` + // Authentication factor display name as it appears to users upon initial registration, as defined by admins at Settings > Authentication Factors. + TypeDisplayName *string `json:"type_display_name,omitempty"` + // Authentication factor name, as it appears to administrators in OneLogin. + AuthFactorName *string `json:"auth_factor_name,omitempty"` +} + +// NewCreateDeviceVerification201Response instantiates a new CreateDeviceVerification201Response 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 NewCreateDeviceVerification201Response() *CreateDeviceVerification201Response { + this := CreateDeviceVerification201Response{} + return &this +} + +// NewCreateDeviceVerification201ResponseWithDefaults instantiates a new CreateDeviceVerification201Response 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 NewCreateDeviceVerification201ResponseWithDefaults() *CreateDeviceVerification201Response { + this := CreateDeviceVerification201Response{} + return &this +} + +// GetDeviceId returns the DeviceId field value if set, zero value otherwise. +func (o *CreateDeviceVerification201Response) GetDeviceId() int32 { + if o == nil || isNil(o.DeviceId) { + var ret int32 + return ret + } + return *o.DeviceId +} + +// GetDeviceIdOk returns a tuple with the DeviceId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateDeviceVerification201Response) GetDeviceIdOk() (*int32, bool) { + if o == nil || isNil(o.DeviceId) { + return nil, false + } + return o.DeviceId, true +} + +// HasDeviceId returns a boolean if a field has been set. +func (o *CreateDeviceVerification201Response) HasDeviceId() bool { + if o != nil && !isNil(o.DeviceId) { + return true + } + + return false +} + +// SetDeviceId gets a reference to the given int32 and assigns it to the DeviceId field. +func (o *CreateDeviceVerification201Response) SetDeviceId(v int32) { + o.DeviceId = &v +} + +// GetDisplayName returns the DisplayName field value if set, zero value otherwise. +func (o *CreateDeviceVerification201Response) GetDisplayName() string { + if o == nil || isNil(o.DisplayName) { + var ret string + return ret + } + return *o.DisplayName +} + +// GetDisplayNameOk returns a tuple with the DisplayName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateDeviceVerification201Response) GetDisplayNameOk() (*string, bool) { + if o == nil || isNil(o.DisplayName) { + return nil, false + } + return o.DisplayName, true +} + +// HasDisplayName returns a boolean if a field has been set. +func (o *CreateDeviceVerification201Response) HasDisplayName() bool { + if o != nil && !isNil(o.DisplayName) { + return true + } + + return false +} + +// SetDisplayName gets a reference to the given string and assigns it to the DisplayName field. +func (o *CreateDeviceVerification201Response) SetDisplayName(v string) { + o.DisplayName = &v +} + +// GetExpiresAt returns the ExpiresAt field value if set, zero value otherwise. +func (o *CreateDeviceVerification201Response) GetExpiresAt() string { + if o == nil || isNil(o.ExpiresAt) { + var ret string + return ret + } + return *o.ExpiresAt +} + +// GetExpiresAtOk returns a tuple with the ExpiresAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateDeviceVerification201Response) GetExpiresAtOk() (*string, bool) { + if o == nil || isNil(o.ExpiresAt) { + return nil, false + } + return o.ExpiresAt, true +} + +// HasExpiresAt returns a boolean if a field has been set. +func (o *CreateDeviceVerification201Response) HasExpiresAt() bool { + if o != nil && !isNil(o.ExpiresAt) { + return true + } + + return false +} + +// SetExpiresAt gets a reference to the given string and assigns it to the ExpiresAt field. +func (o *CreateDeviceVerification201Response) SetExpiresAt(v string) { + o.ExpiresAt = &v +} + +// GetRedirectTo returns the RedirectTo field value if set, zero value otherwise. +func (o *CreateDeviceVerification201Response) GetRedirectTo() string { + if o == nil || isNil(o.RedirectTo) { + var ret string + return ret + } + return *o.RedirectTo +} + +// GetRedirectToOk returns a tuple with the RedirectTo field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateDeviceVerification201Response) GetRedirectToOk() (*string, bool) { + if o == nil || isNil(o.RedirectTo) { + return nil, false + } + return o.RedirectTo, true +} + +// HasRedirectTo returns a boolean if a field has been set. +func (o *CreateDeviceVerification201Response) HasRedirectTo() bool { + if o != nil && !isNil(o.RedirectTo) { + return true + } + + return false +} + +// SetRedirectTo gets a reference to the given string and assigns it to the RedirectTo field. +func (o *CreateDeviceVerification201Response) SetRedirectTo(v string) { + o.RedirectTo = &v +} + +// GetUserDisplayName returns the UserDisplayName field value if set, zero value otherwise. +func (o *CreateDeviceVerification201Response) GetUserDisplayName() string { + if o == nil || isNil(o.UserDisplayName) { + var ret string + return ret + } + return *o.UserDisplayName +} + +// GetUserDisplayNameOk returns a tuple with the UserDisplayName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateDeviceVerification201Response) GetUserDisplayNameOk() (*string, bool) { + if o == nil || isNil(o.UserDisplayName) { + return nil, false + } + return o.UserDisplayName, true +} + +// HasUserDisplayName returns a boolean if a field has been set. +func (o *CreateDeviceVerification201Response) HasUserDisplayName() bool { + if o != nil && !isNil(o.UserDisplayName) { + return true + } + + return false +} + +// SetUserDisplayName gets a reference to the given string and assigns it to the UserDisplayName field. +func (o *CreateDeviceVerification201Response) SetUserDisplayName(v string) { + o.UserDisplayName = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *CreateDeviceVerification201Response) GetId() string { + if o == nil || isNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateDeviceVerification201Response) GetIdOk() (*string, bool) { + if o == nil || isNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *CreateDeviceVerification201Response) HasId() bool { + if o != nil && !isNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *CreateDeviceVerification201Response) SetId(v string) { + o.Id = &v +} + +// GetTypeDisplayName returns the TypeDisplayName field value if set, zero value otherwise. +func (o *CreateDeviceVerification201Response) GetTypeDisplayName() string { + if o == nil || isNil(o.TypeDisplayName) { + var ret string + return ret + } + return *o.TypeDisplayName +} + +// GetTypeDisplayNameOk returns a tuple with the TypeDisplayName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateDeviceVerification201Response) GetTypeDisplayNameOk() (*string, bool) { + if o == nil || isNil(o.TypeDisplayName) { + return nil, false + } + return o.TypeDisplayName, true +} + +// HasTypeDisplayName returns a boolean if a field has been set. +func (o *CreateDeviceVerification201Response) HasTypeDisplayName() bool { + if o != nil && !isNil(o.TypeDisplayName) { + return true + } + + return false +} + +// SetTypeDisplayName gets a reference to the given string and assigns it to the TypeDisplayName field. +func (o *CreateDeviceVerification201Response) SetTypeDisplayName(v string) { + o.TypeDisplayName = &v +} + +// GetAuthFactorName returns the AuthFactorName field value if set, zero value otherwise. +func (o *CreateDeviceVerification201Response) GetAuthFactorName() string { + if o == nil || isNil(o.AuthFactorName) { + var ret string + return ret + } + return *o.AuthFactorName +} + +// GetAuthFactorNameOk returns a tuple with the AuthFactorName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateDeviceVerification201Response) GetAuthFactorNameOk() (*string, bool) { + if o == nil || isNil(o.AuthFactorName) { + return nil, false + } + return o.AuthFactorName, true +} + +// HasAuthFactorName returns a boolean if a field has been set. +func (o *CreateDeviceVerification201Response) HasAuthFactorName() bool { + if o != nil && !isNil(o.AuthFactorName) { + return true + } + + return false +} + +// SetAuthFactorName gets a reference to the given string and assigns it to the AuthFactorName field. +func (o *CreateDeviceVerification201Response) SetAuthFactorName(v string) { + o.AuthFactorName = &v +} + +func (o CreateDeviceVerification201Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateDeviceVerification201Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.DeviceId) { + toSerialize["device_id"] = o.DeviceId + } + if !isNil(o.DisplayName) { + toSerialize["display_name"] = o.DisplayName + } + if !isNil(o.ExpiresAt) { + toSerialize["expires_at"] = o.ExpiresAt + } + if !isNil(o.RedirectTo) { + toSerialize["redirect_to"] = o.RedirectTo + } + if !isNil(o.UserDisplayName) { + toSerialize["user_display_name"] = o.UserDisplayName + } + if !isNil(o.Id) { + toSerialize["id"] = o.Id + } + if !isNil(o.TypeDisplayName) { + toSerialize["type_display_name"] = o.TypeDisplayName + } + if !isNil(o.AuthFactorName) { + toSerialize["auth_factor_name"] = o.AuthFactorName + } + return toSerialize, nil +} + +type NullableCreateDeviceVerification201Response struct { + value *CreateDeviceVerification201Response + isSet bool +} + +func (v NullableCreateDeviceVerification201Response) Get() *CreateDeviceVerification201Response { + return v.value +} + +func (v *NullableCreateDeviceVerification201Response) Set(val *CreateDeviceVerification201Response) { + v.value = val + v.isSet = true +} + +func (v NullableCreateDeviceVerification201Response) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateDeviceVerification201Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateDeviceVerification201Response(val *CreateDeviceVerification201Response) *NullableCreateDeviceVerification201Response { + return &NullableCreateDeviceVerification201Response{value: val, isSet: true} +} + +func (v NullableCreateDeviceVerification201Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateDeviceVerification201Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_create_device_verification_request.go b/model_create_device_verification_request.go new file mode 100644 index 0000000..a065268 --- /dev/null +++ b/model_create_device_verification_request.go @@ -0,0 +1,266 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the CreateDeviceVerificationRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateDeviceVerificationRequest{} + +// CreateDeviceVerificationRequest struct for CreateDeviceVerificationRequest +type CreateDeviceVerificationRequest struct { + // Specifies the factor to be verified. + DeviceId int32 `json:"device_id"` + // A name for the users device + DisplayName *string `json:"display_name,omitempty"` + // Defaults to 120. Valid values are: 120-900 seconds. + ExpiresIn *string `json:"expires_in,omitempty"` + // Only applies to Email MagicLink factor. Redirects MagicLink success page to specified URL after 2 seconds. Email must already be configured by the user. + RedirectTo *string `json:"redirect_to,omitempty"` + // Only applies to SMS factor. A message template that will be sent via SMS. Max length of the message after template items are inserted is 160 characters including the OTP code. SMS must already be configured by the user. The following template variables can be included in the message. - {{otp_code}} - The security code. - {{otp_expiry}} - The number of minutes until the one time code expires. + CustomMessage *string `json:"custom_message,omitempty"` +} + +// NewCreateDeviceVerificationRequest instantiates a new CreateDeviceVerificationRequest 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 NewCreateDeviceVerificationRequest(deviceId int32) *CreateDeviceVerificationRequest { + this := CreateDeviceVerificationRequest{} + this.DeviceId = deviceId + return &this +} + +// NewCreateDeviceVerificationRequestWithDefaults instantiates a new CreateDeviceVerificationRequest 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 NewCreateDeviceVerificationRequestWithDefaults() *CreateDeviceVerificationRequest { + this := CreateDeviceVerificationRequest{} + return &this +} + +// GetDeviceId returns the DeviceId field value +func (o *CreateDeviceVerificationRequest) GetDeviceId() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.DeviceId +} + +// GetDeviceIdOk returns a tuple with the DeviceId field value +// and a boolean to check if the value has been set. +func (o *CreateDeviceVerificationRequest) GetDeviceIdOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.DeviceId, true +} + +// SetDeviceId sets field value +func (o *CreateDeviceVerificationRequest) SetDeviceId(v int32) { + o.DeviceId = v +} + +// GetDisplayName returns the DisplayName field value if set, zero value otherwise. +func (o *CreateDeviceVerificationRequest) GetDisplayName() string { + if o == nil || isNil(o.DisplayName) { + var ret string + return ret + } + return *o.DisplayName +} + +// GetDisplayNameOk returns a tuple with the DisplayName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateDeviceVerificationRequest) GetDisplayNameOk() (*string, bool) { + if o == nil || isNil(o.DisplayName) { + return nil, false + } + return o.DisplayName, true +} + +// HasDisplayName returns a boolean if a field has been set. +func (o *CreateDeviceVerificationRequest) HasDisplayName() bool { + if o != nil && !isNil(o.DisplayName) { + return true + } + + return false +} + +// SetDisplayName gets a reference to the given string and assigns it to the DisplayName field. +func (o *CreateDeviceVerificationRequest) SetDisplayName(v string) { + o.DisplayName = &v +} + +// GetExpiresIn returns the ExpiresIn field value if set, zero value otherwise. +func (o *CreateDeviceVerificationRequest) GetExpiresIn() string { + if o == nil || isNil(o.ExpiresIn) { + var ret string + return ret + } + return *o.ExpiresIn +} + +// GetExpiresInOk returns a tuple with the ExpiresIn field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateDeviceVerificationRequest) GetExpiresInOk() (*string, bool) { + if o == nil || isNil(o.ExpiresIn) { + return nil, false + } + return o.ExpiresIn, true +} + +// HasExpiresIn returns a boolean if a field has been set. +func (o *CreateDeviceVerificationRequest) HasExpiresIn() bool { + if o != nil && !isNil(o.ExpiresIn) { + return true + } + + return false +} + +// SetExpiresIn gets a reference to the given string and assigns it to the ExpiresIn field. +func (o *CreateDeviceVerificationRequest) SetExpiresIn(v string) { + o.ExpiresIn = &v +} + +// GetRedirectTo returns the RedirectTo field value if set, zero value otherwise. +func (o *CreateDeviceVerificationRequest) GetRedirectTo() string { + if o == nil || isNil(o.RedirectTo) { + var ret string + return ret + } + return *o.RedirectTo +} + +// GetRedirectToOk returns a tuple with the RedirectTo field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateDeviceVerificationRequest) GetRedirectToOk() (*string, bool) { + if o == nil || isNil(o.RedirectTo) { + return nil, false + } + return o.RedirectTo, true +} + +// HasRedirectTo returns a boolean if a field has been set. +func (o *CreateDeviceVerificationRequest) HasRedirectTo() bool { + if o != nil && !isNil(o.RedirectTo) { + return true + } + + return false +} + +// SetRedirectTo gets a reference to the given string and assigns it to the RedirectTo field. +func (o *CreateDeviceVerificationRequest) SetRedirectTo(v string) { + o.RedirectTo = &v +} + +// GetCustomMessage returns the CustomMessage field value if set, zero value otherwise. +func (o *CreateDeviceVerificationRequest) GetCustomMessage() string { + if o == nil || isNil(o.CustomMessage) { + var ret string + return ret + } + return *o.CustomMessage +} + +// GetCustomMessageOk returns a tuple with the CustomMessage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateDeviceVerificationRequest) GetCustomMessageOk() (*string, bool) { + if o == nil || isNil(o.CustomMessage) { + return nil, false + } + return o.CustomMessage, true +} + +// HasCustomMessage returns a boolean if a field has been set. +func (o *CreateDeviceVerificationRequest) HasCustomMessage() bool { + if o != nil && !isNil(o.CustomMessage) { + return true + } + + return false +} + +// SetCustomMessage gets a reference to the given string and assigns it to the CustomMessage field. +func (o *CreateDeviceVerificationRequest) SetCustomMessage(v string) { + o.CustomMessage = &v +} + +func (o CreateDeviceVerificationRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateDeviceVerificationRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["device_id"] = o.DeviceId + if !isNil(o.DisplayName) { + toSerialize["display_name"] = o.DisplayName + } + if !isNil(o.ExpiresIn) { + toSerialize["expires_in"] = o.ExpiresIn + } + if !isNil(o.RedirectTo) { + toSerialize["redirect_to"] = o.RedirectTo + } + if !isNil(o.CustomMessage) { + toSerialize["custom_message"] = o.CustomMessage + } + return toSerialize, nil +} + +type NullableCreateDeviceVerificationRequest struct { + value *CreateDeviceVerificationRequest + isSet bool +} + +func (v NullableCreateDeviceVerificationRequest) Get() *CreateDeviceVerificationRequest { + return v.value +} + +func (v *NullableCreateDeviceVerificationRequest) Set(val *CreateDeviceVerificationRequest) { + v.value = val + v.isSet = true +} + +func (v NullableCreateDeviceVerificationRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateDeviceVerificationRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateDeviceVerificationRequest(val *CreateDeviceVerificationRequest) *NullableCreateDeviceVerificationRequest { + return &NullableCreateDeviceVerificationRequest{value: val, isSet: true} +} + +func (v NullableCreateDeviceVerificationRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateDeviceVerificationRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_create_environment_variable_request.go b/model_create_environment_variable_request.go deleted file mode 100644 index c4c203b..0000000 --- a/model_create_environment_variable_request.go +++ /dev/null @@ -1,139 +0,0 @@ -/* -OneLogin API - -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -API version: 3.0.0-alpha.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package openapi - -import ( - "encoding/json" -) - -// CreateEnvironmentVariableRequest struct for CreateEnvironmentVariableRequest -type CreateEnvironmentVariableRequest struct { - // The name for the environment variable that will be used to retrieve the value from a hook function. - Name string `json:"name"` - // The secret value that will be encrypted at rest and injected in applicable hook functions at run time. - Value string `json:"value"` -} - -// NewCreateEnvironmentVariableRequest instantiates a new CreateEnvironmentVariableRequest 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 NewCreateEnvironmentVariableRequest(name string, value string) *CreateEnvironmentVariableRequest { - this := CreateEnvironmentVariableRequest{} - this.Name = name - this.Value = value - return &this -} - -// NewCreateEnvironmentVariableRequestWithDefaults instantiates a new CreateEnvironmentVariableRequest 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 NewCreateEnvironmentVariableRequestWithDefaults() *CreateEnvironmentVariableRequest { - this := CreateEnvironmentVariableRequest{} - return &this -} - -// GetName returns the Name field value -func (o *CreateEnvironmentVariableRequest) 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 *CreateEnvironmentVariableRequest) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *CreateEnvironmentVariableRequest) SetName(v string) { - o.Name = v -} - -// GetValue returns the Value field value -func (o *CreateEnvironmentVariableRequest) GetValue() string { - if o == nil { - var ret string - return ret - } - - return o.Value -} - -// GetValueOk returns a tuple with the Value field value -// and a boolean to check if the value has been set. -func (o *CreateEnvironmentVariableRequest) GetValueOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Value, true -} - -// SetValue sets field value -func (o *CreateEnvironmentVariableRequest) SetValue(v string) { - o.Value = v -} - -func (o CreateEnvironmentVariableRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["name"] = o.Name - } - if true { - toSerialize["value"] = o.Value - } - return json.Marshal(toSerialize) -} - -type NullableCreateEnvironmentVariableRequest struct { - value *CreateEnvironmentVariableRequest - isSet bool -} - -func (v NullableCreateEnvironmentVariableRequest) Get() *CreateEnvironmentVariableRequest { - return v.value -} - -func (v *NullableCreateEnvironmentVariableRequest) Set(val *CreateEnvironmentVariableRequest) { - v.value = val - v.isSet = true -} - -func (v NullableCreateEnvironmentVariableRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableCreateEnvironmentVariableRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCreateEnvironmentVariableRequest(val *CreateEnvironmentVariableRequest) *NullableCreateEnvironmentVariableRequest { - return &NullableCreateEnvironmentVariableRequest{value: val, isSet: true} -} - -func (v NullableCreateEnvironmentVariableRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCreateEnvironmentVariableRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_create_factor_registration_201_response.go b/model_create_factor_registration_201_response.go new file mode 100644 index 0000000..8bfe379 --- /dev/null +++ b/model_create_factor_registration_201_response.go @@ -0,0 +1,312 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the CreateFactorRegistration201Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateFactorRegistration201Response{} + +// CreateFactorRegistration201Response struct for CreateFactorRegistration201Response +type CreateFactorRegistration201Response struct { + // MFA device identifier. + DeviceId *string `json:"device_id,omitempty"` + // Authentication factor display name assigned by users when they register the device. + UserDisplayName *string `json:"user_display_name,omitempty"` + // Authentication factor display name as it appears to users upon initial registration, as defined by admins at Settings > Authentication Factors. + TypeDisplayName *string `json:"type_display_name,omitempty"` + // Authentication factor name, as it appears to administrators in OneLogin. + AuthFactorName *string `json:"auth_factor_name,omitempty"` + // Verification identifier used in subsequent verification step. + Id *string `json:"id,omitempty"` + // User identifier + UserId *string `json:"user_id,omitempty"` +} + +// NewCreateFactorRegistration201Response instantiates a new CreateFactorRegistration201Response 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 NewCreateFactorRegistration201Response() *CreateFactorRegistration201Response { + this := CreateFactorRegistration201Response{} + return &this +} + +// NewCreateFactorRegistration201ResponseWithDefaults instantiates a new CreateFactorRegistration201Response 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 NewCreateFactorRegistration201ResponseWithDefaults() *CreateFactorRegistration201Response { + this := CreateFactorRegistration201Response{} + return &this +} + +// GetDeviceId returns the DeviceId field value if set, zero value otherwise. +func (o *CreateFactorRegistration201Response) GetDeviceId() string { + if o == nil || isNil(o.DeviceId) { + var ret string + return ret + } + return *o.DeviceId +} + +// GetDeviceIdOk returns a tuple with the DeviceId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateFactorRegistration201Response) GetDeviceIdOk() (*string, bool) { + if o == nil || isNil(o.DeviceId) { + return nil, false + } + return o.DeviceId, true +} + +// HasDeviceId returns a boolean if a field has been set. +func (o *CreateFactorRegistration201Response) HasDeviceId() bool { + if o != nil && !isNil(o.DeviceId) { + return true + } + + return false +} + +// SetDeviceId gets a reference to the given string and assigns it to the DeviceId field. +func (o *CreateFactorRegistration201Response) SetDeviceId(v string) { + o.DeviceId = &v +} + +// GetUserDisplayName returns the UserDisplayName field value if set, zero value otherwise. +func (o *CreateFactorRegistration201Response) GetUserDisplayName() string { + if o == nil || isNil(o.UserDisplayName) { + var ret string + return ret + } + return *o.UserDisplayName +} + +// GetUserDisplayNameOk returns a tuple with the UserDisplayName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateFactorRegistration201Response) GetUserDisplayNameOk() (*string, bool) { + if o == nil || isNil(o.UserDisplayName) { + return nil, false + } + return o.UserDisplayName, true +} + +// HasUserDisplayName returns a boolean if a field has been set. +func (o *CreateFactorRegistration201Response) HasUserDisplayName() bool { + if o != nil && !isNil(o.UserDisplayName) { + return true + } + + return false +} + +// SetUserDisplayName gets a reference to the given string and assigns it to the UserDisplayName field. +func (o *CreateFactorRegistration201Response) SetUserDisplayName(v string) { + o.UserDisplayName = &v +} + +// GetTypeDisplayName returns the TypeDisplayName field value if set, zero value otherwise. +func (o *CreateFactorRegistration201Response) GetTypeDisplayName() string { + if o == nil || isNil(o.TypeDisplayName) { + var ret string + return ret + } + return *o.TypeDisplayName +} + +// GetTypeDisplayNameOk returns a tuple with the TypeDisplayName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateFactorRegistration201Response) GetTypeDisplayNameOk() (*string, bool) { + if o == nil || isNil(o.TypeDisplayName) { + return nil, false + } + return o.TypeDisplayName, true +} + +// HasTypeDisplayName returns a boolean if a field has been set. +func (o *CreateFactorRegistration201Response) HasTypeDisplayName() bool { + if o != nil && !isNil(o.TypeDisplayName) { + return true + } + + return false +} + +// SetTypeDisplayName gets a reference to the given string and assigns it to the TypeDisplayName field. +func (o *CreateFactorRegistration201Response) SetTypeDisplayName(v string) { + o.TypeDisplayName = &v +} + +// GetAuthFactorName returns the AuthFactorName field value if set, zero value otherwise. +func (o *CreateFactorRegistration201Response) GetAuthFactorName() string { + if o == nil || isNil(o.AuthFactorName) { + var ret string + return ret + } + return *o.AuthFactorName +} + +// GetAuthFactorNameOk returns a tuple with the AuthFactorName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateFactorRegistration201Response) GetAuthFactorNameOk() (*string, bool) { + if o == nil || isNil(o.AuthFactorName) { + return nil, false + } + return o.AuthFactorName, true +} + +// HasAuthFactorName returns a boolean if a field has been set. +func (o *CreateFactorRegistration201Response) HasAuthFactorName() bool { + if o != nil && !isNil(o.AuthFactorName) { + return true + } + + return false +} + +// SetAuthFactorName gets a reference to the given string and assigns it to the AuthFactorName field. +func (o *CreateFactorRegistration201Response) SetAuthFactorName(v string) { + o.AuthFactorName = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *CreateFactorRegistration201Response) GetId() string { + if o == nil || isNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateFactorRegistration201Response) GetIdOk() (*string, bool) { + if o == nil || isNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *CreateFactorRegistration201Response) HasId() bool { + if o != nil && !isNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *CreateFactorRegistration201Response) SetId(v string) { + o.Id = &v +} + +// GetUserId returns the UserId field value if set, zero value otherwise. +func (o *CreateFactorRegistration201Response) GetUserId() string { + if o == nil || isNil(o.UserId) { + var ret string + return ret + } + return *o.UserId +} + +// GetUserIdOk returns a tuple with the UserId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateFactorRegistration201Response) GetUserIdOk() (*string, bool) { + if o == nil || isNil(o.UserId) { + return nil, false + } + return o.UserId, true +} + +// HasUserId returns a boolean if a field has been set. +func (o *CreateFactorRegistration201Response) HasUserId() bool { + if o != nil && !isNil(o.UserId) { + return true + } + + return false +} + +// SetUserId gets a reference to the given string and assigns it to the UserId field. +func (o *CreateFactorRegistration201Response) SetUserId(v string) { + o.UserId = &v +} + +func (o CreateFactorRegistration201Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateFactorRegistration201Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.DeviceId) { + toSerialize["device_id"] = o.DeviceId + } + if !isNil(o.UserDisplayName) { + toSerialize["user_display_name"] = o.UserDisplayName + } + if !isNil(o.TypeDisplayName) { + toSerialize["type_display_name"] = o.TypeDisplayName + } + if !isNil(o.AuthFactorName) { + toSerialize["auth_factor_name"] = o.AuthFactorName + } + if !isNil(o.Id) { + toSerialize["id"] = o.Id + } + if !isNil(o.UserId) { + toSerialize["user_id"] = o.UserId + } + return toSerialize, nil +} + +type NullableCreateFactorRegistration201Response struct { + value *CreateFactorRegistration201Response + isSet bool +} + +func (v NullableCreateFactorRegistration201Response) Get() *CreateFactorRegistration201Response { + return v.value +} + +func (v *NullableCreateFactorRegistration201Response) Set(val *CreateFactorRegistration201Response) { + v.value = val + v.isSet = true +} + +func (v NullableCreateFactorRegistration201Response) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateFactorRegistration201Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateFactorRegistration201Response(val *CreateFactorRegistration201Response) *NullableCreateFactorRegistration201Response { + return &NullableCreateFactorRegistration201Response{value: val, isSet: true} +} + +func (v NullableCreateFactorRegistration201Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateFactorRegistration201Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_create_factor_registration_request.go b/model_create_factor_registration_request.go new file mode 100644 index 0000000..6993aac --- /dev/null +++ b/model_create_factor_registration_request.go @@ -0,0 +1,294 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the CreateFactorRegistrationRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateFactorRegistrationRequest{} + +// CreateFactorRegistrationRequest struct for CreateFactorRegistrationRequest +type CreateFactorRegistrationRequest struct { + // The identifier of the factor to enroll the user with. See Get Available Factors for a list of possible id values. + FactorId int32 `json:"factor_id"` + // A name for the users device + DisplayName string `json:"display_name"` + // Defaults to 120. Valid values are: 120-900 seconds. + ExpiresIn *string `json:"expires_in,omitempty"` + // Defaults to false. The following factors support verified = true as part of the initial registration request: OneLogin SMS, OneLogin Voice, OneLogin Email. When using verified = true it is critical that the supported factors have pre-verified values, most likely imported from an existing directory or by the users themselvdes. Factors such as Authenticator and OneLogin Protect do not support verification = true as the user interaction is required to verify the factor. + Verified *bool `json:"verified,omitempty"` + // Only applies to Email MagicLink factor. Redirects MagicLink success page to specified URL after 2 seconds. Email must already be configured by the user. + RedirectTo *string `json:"redirect_to,omitempty"` + // Only applies to SMS factor. A message template that will be sent via SMS. Max length of the message after template items are inserted is 160 characters including the OTP code. SMS must already be configured by the user. The following template variables can be included in the message. - {{otp_code}} - The security code. - {{otp_expiry}} - The number of minutes until the one time code expires. + CustomMessage *string `json:"custom_message,omitempty"` +} + +// NewCreateFactorRegistrationRequest instantiates a new CreateFactorRegistrationRequest 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 NewCreateFactorRegistrationRequest(factorId int32, displayName string) *CreateFactorRegistrationRequest { + this := CreateFactorRegistrationRequest{} + this.FactorId = factorId + this.DisplayName = displayName + return &this +} + +// NewCreateFactorRegistrationRequestWithDefaults instantiates a new CreateFactorRegistrationRequest 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 NewCreateFactorRegistrationRequestWithDefaults() *CreateFactorRegistrationRequest { + this := CreateFactorRegistrationRequest{} + return &this +} + +// GetFactorId returns the FactorId field value +func (o *CreateFactorRegistrationRequest) GetFactorId() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.FactorId +} + +// GetFactorIdOk returns a tuple with the FactorId field value +// and a boolean to check if the value has been set. +func (o *CreateFactorRegistrationRequest) GetFactorIdOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.FactorId, true +} + +// SetFactorId sets field value +func (o *CreateFactorRegistrationRequest) SetFactorId(v int32) { + o.FactorId = v +} + +// GetDisplayName returns the DisplayName field value +func (o *CreateFactorRegistrationRequest) GetDisplayName() string { + if o == nil { + var ret string + return ret + } + + return o.DisplayName +} + +// GetDisplayNameOk returns a tuple with the DisplayName field value +// and a boolean to check if the value has been set. +func (o *CreateFactorRegistrationRequest) GetDisplayNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DisplayName, true +} + +// SetDisplayName sets field value +func (o *CreateFactorRegistrationRequest) SetDisplayName(v string) { + o.DisplayName = v +} + +// GetExpiresIn returns the ExpiresIn field value if set, zero value otherwise. +func (o *CreateFactorRegistrationRequest) GetExpiresIn() string { + if o == nil || isNil(o.ExpiresIn) { + var ret string + return ret + } + return *o.ExpiresIn +} + +// GetExpiresInOk returns a tuple with the ExpiresIn field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateFactorRegistrationRequest) GetExpiresInOk() (*string, bool) { + if o == nil || isNil(o.ExpiresIn) { + return nil, false + } + return o.ExpiresIn, true +} + +// HasExpiresIn returns a boolean if a field has been set. +func (o *CreateFactorRegistrationRequest) HasExpiresIn() bool { + if o != nil && !isNil(o.ExpiresIn) { + return true + } + + return false +} + +// SetExpiresIn gets a reference to the given string and assigns it to the ExpiresIn field. +func (o *CreateFactorRegistrationRequest) SetExpiresIn(v string) { + o.ExpiresIn = &v +} + +// GetVerified returns the Verified field value if set, zero value otherwise. +func (o *CreateFactorRegistrationRequest) GetVerified() bool { + if o == nil || isNil(o.Verified) { + var ret bool + return ret + } + return *o.Verified +} + +// GetVerifiedOk returns a tuple with the Verified field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateFactorRegistrationRequest) GetVerifiedOk() (*bool, bool) { + if o == nil || isNil(o.Verified) { + return nil, false + } + return o.Verified, true +} + +// HasVerified returns a boolean if a field has been set. +func (o *CreateFactorRegistrationRequest) HasVerified() bool { + if o != nil && !isNil(o.Verified) { + return true + } + + return false +} + +// SetVerified gets a reference to the given bool and assigns it to the Verified field. +func (o *CreateFactorRegistrationRequest) SetVerified(v bool) { + o.Verified = &v +} + +// GetRedirectTo returns the RedirectTo field value if set, zero value otherwise. +func (o *CreateFactorRegistrationRequest) GetRedirectTo() string { + if o == nil || isNil(o.RedirectTo) { + var ret string + return ret + } + return *o.RedirectTo +} + +// GetRedirectToOk returns a tuple with the RedirectTo field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateFactorRegistrationRequest) GetRedirectToOk() (*string, bool) { + if o == nil || isNil(o.RedirectTo) { + return nil, false + } + return o.RedirectTo, true +} + +// HasRedirectTo returns a boolean if a field has been set. +func (o *CreateFactorRegistrationRequest) HasRedirectTo() bool { + if o != nil && !isNil(o.RedirectTo) { + return true + } + + return false +} + +// SetRedirectTo gets a reference to the given string and assigns it to the RedirectTo field. +func (o *CreateFactorRegistrationRequest) SetRedirectTo(v string) { + o.RedirectTo = &v +} + +// GetCustomMessage returns the CustomMessage field value if set, zero value otherwise. +func (o *CreateFactorRegistrationRequest) GetCustomMessage() string { + if o == nil || isNil(o.CustomMessage) { + var ret string + return ret + } + return *o.CustomMessage +} + +// GetCustomMessageOk returns a tuple with the CustomMessage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateFactorRegistrationRequest) GetCustomMessageOk() (*string, bool) { + if o == nil || isNil(o.CustomMessage) { + return nil, false + } + return o.CustomMessage, true +} + +// HasCustomMessage returns a boolean if a field has been set. +func (o *CreateFactorRegistrationRequest) HasCustomMessage() bool { + if o != nil && !isNil(o.CustomMessage) { + return true + } + + return false +} + +// SetCustomMessage gets a reference to the given string and assigns it to the CustomMessage field. +func (o *CreateFactorRegistrationRequest) SetCustomMessage(v string) { + o.CustomMessage = &v +} + +func (o CreateFactorRegistrationRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateFactorRegistrationRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["factor_id"] = o.FactorId + toSerialize["display_name"] = o.DisplayName + if !isNil(o.ExpiresIn) { + toSerialize["expires_in"] = o.ExpiresIn + } + if !isNil(o.Verified) { + toSerialize["verified"] = o.Verified + } + if !isNil(o.RedirectTo) { + toSerialize["redirect_to"] = o.RedirectTo + } + if !isNil(o.CustomMessage) { + toSerialize["custom_message"] = o.CustomMessage + } + return toSerialize, nil +} + +type NullableCreateFactorRegistrationRequest struct { + value *CreateFactorRegistrationRequest + isSet bool +} + +func (v NullableCreateFactorRegistrationRequest) Get() *CreateFactorRegistrationRequest { + return v.value +} + +func (v *NullableCreateFactorRegistrationRequest) Set(val *CreateFactorRegistrationRequest) { + v.value = val + v.isSet = true +} + +func (v NullableCreateFactorRegistrationRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateFactorRegistrationRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateFactorRegistrationRequest(val *CreateFactorRegistrationRequest) *NullableCreateFactorRegistrationRequest { + return &NullableCreateFactorRegistrationRequest{value: val, isSet: true} +} + +func (v NullableCreateFactorRegistrationRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateFactorRegistrationRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_create_privilege_200_response.go b/model_create_privilege_200_response.go new file mode 100644 index 0000000..76e6432 --- /dev/null +++ b/model_create_privilege_200_response.go @@ -0,0 +1,127 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the CreatePrivilege200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreatePrivilege200Response{} + +// CreatePrivilege200Response struct for CreatePrivilege200Response +type CreatePrivilege200Response struct { + // Privilege Id + Id *string `json:"id,omitempty"` +} + +// NewCreatePrivilege200Response instantiates a new CreatePrivilege200Response 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 NewCreatePrivilege200Response() *CreatePrivilege200Response { + this := CreatePrivilege200Response{} + return &this +} + +// NewCreatePrivilege200ResponseWithDefaults instantiates a new CreatePrivilege200Response 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 NewCreatePrivilege200ResponseWithDefaults() *CreatePrivilege200Response { + this := CreatePrivilege200Response{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *CreatePrivilege200Response) GetId() string { + if o == nil || isNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreatePrivilege200Response) GetIdOk() (*string, bool) { + if o == nil || isNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *CreatePrivilege200Response) HasId() bool { + if o != nil && !isNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *CreatePrivilege200Response) SetId(v string) { + o.Id = &v +} + +func (o CreatePrivilege200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreatePrivilege200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.Id) { + toSerialize["id"] = o.Id + } + return toSerialize, nil +} + +type NullableCreatePrivilege200Response struct { + value *CreatePrivilege200Response + isSet bool +} + +func (v NullableCreatePrivilege200Response) Get() *CreatePrivilege200Response { + return v.value +} + +func (v *NullableCreatePrivilege200Response) Set(val *CreatePrivilege200Response) { + v.value = val + v.isSet = true +} + +func (v NullableCreatePrivilege200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableCreatePrivilege200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreatePrivilege200Response(val *CreatePrivilege200Response) *NullableCreatePrivilege200Response { + return &NullableCreatePrivilege200Response{value: val, isSet: true} +} + +func (v NullableCreatePrivilege200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreatePrivilege200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_create_role_201_response_inner.go b/model_create_role_201_response_inner.go new file mode 100644 index 0000000..1c54c96 --- /dev/null +++ b/model_create_role_201_response_inner.go @@ -0,0 +1,126 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the CreateRole201ResponseInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateRole201ResponseInner{} + +// CreateRole201ResponseInner struct for CreateRole201ResponseInner +type CreateRole201ResponseInner struct { + Id *int32 `json:"id,omitempty"` +} + +// NewCreateRole201ResponseInner instantiates a new CreateRole201ResponseInner 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 NewCreateRole201ResponseInner() *CreateRole201ResponseInner { + this := CreateRole201ResponseInner{} + return &this +} + +// NewCreateRole201ResponseInnerWithDefaults instantiates a new CreateRole201ResponseInner 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 NewCreateRole201ResponseInnerWithDefaults() *CreateRole201ResponseInner { + this := CreateRole201ResponseInner{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *CreateRole201ResponseInner) GetId() int32 { + if o == nil || isNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateRole201ResponseInner) GetIdOk() (*int32, bool) { + if o == nil || isNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *CreateRole201ResponseInner) HasId() bool { + if o != nil && !isNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *CreateRole201ResponseInner) SetId(v int32) { + o.Id = &v +} + +func (o CreateRole201ResponseInner) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateRole201ResponseInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.Id) { + toSerialize["id"] = o.Id + } + return toSerialize, nil +} + +type NullableCreateRole201ResponseInner struct { + value *CreateRole201ResponseInner + isSet bool +} + +func (v NullableCreateRole201ResponseInner) Get() *CreateRole201ResponseInner { + return v.value +} + +func (v *NullableCreateRole201ResponseInner) Set(val *CreateRole201ResponseInner) { + v.value = val + v.isSet = true +} + +func (v NullableCreateRole201ResponseInner) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateRole201ResponseInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateRole201ResponseInner(val *CreateRole201ResponseInner) *NullableCreateRole201ResponseInner { + return &NullableCreateRole201ResponseInner{value: val, isSet: true} +} + +func (v NullableCreateRole201ResponseInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateRole201ResponseInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_create_roles_201_response_inner.go b/model_create_roles_201_response_inner.go deleted file mode 100644 index 694c700..0000000 --- a/model_create_roles_201_response_inner.go +++ /dev/null @@ -1,115 +0,0 @@ -/* -OneLogin API - -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -API version: 3.0.0-alpha.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package openapi - -import ( - "encoding/json" -) - -// CreateRoles201ResponseInner struct for CreateRoles201ResponseInner -type CreateRoles201ResponseInner struct { - Id *int32 `json:"id,omitempty"` -} - -// NewCreateRoles201ResponseInner instantiates a new CreateRoles201ResponseInner 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 NewCreateRoles201ResponseInner() *CreateRoles201ResponseInner { - this := CreateRoles201ResponseInner{} - return &this -} - -// NewCreateRoles201ResponseInnerWithDefaults instantiates a new CreateRoles201ResponseInner 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 NewCreateRoles201ResponseInnerWithDefaults() *CreateRoles201ResponseInner { - this := CreateRoles201ResponseInner{} - return &this -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *CreateRoles201ResponseInner) GetId() int32 { - if o == nil || o.Id == nil { - var ret int32 - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateRoles201ResponseInner) GetIdOk() (*int32, bool) { - if o == nil || o.Id == nil { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *CreateRoles201ResponseInner) HasId() bool { - if o != nil && o.Id != nil { - return true - } - - return false -} - -// SetId gets a reference to the given int32 and assigns it to the Id field. -func (o *CreateRoles201ResponseInner) SetId(v int32) { - o.Id = &v -} - -func (o CreateRoles201ResponseInner) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - return json.Marshal(toSerialize) -} - -type NullableCreateRoles201ResponseInner struct { - value *CreateRoles201ResponseInner - isSet bool -} - -func (v NullableCreateRoles201ResponseInner) Get() *CreateRoles201ResponseInner { - return v.value -} - -func (v *NullableCreateRoles201ResponseInner) Set(val *CreateRoles201ResponseInner) { - v.value = val - v.isSet = true -} - -func (v NullableCreateRoles201ResponseInner) IsSet() bool { - return v.isSet -} - -func (v *NullableCreateRoles201ResponseInner) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCreateRoles201ResponseInner(val *CreateRoles201ResponseInner) *NullableCreateRoles201ResponseInner { - return &NullableCreateRoles201ResponseInner{value: val, isSet: true} -} - -func (v NullableCreateRoles201ResponseInner) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCreateRoles201ResponseInner) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_device.go b/model_device.go index e94e054..65a6428 100644 --- a/model_device.go +++ b/model_device.go @@ -1,26 +1,28 @@ /* OneLogin API -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) +OpenAPI Specification for OneLogin -API version: 3.0.0-alpha.1 +API version: 3.1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package openapi +package onelogin import ( "encoding/json" ) +// checks if the Device type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Device{} + // Device struct for Device type Device struct { - DeviceId *string `json:"device_id,omitempty"` - UserDisplayName *string `json:"user_display_name,omitempty"` - TypeDisplayName *string `json:"type_display_name,omitempty"` - AuthFactorName *string `json:"auth_factor_name,omitempty"` - Default *bool `json:"default,omitempty"` + // an ID for the device type that must be submitted with the Verify Factor API call. + DeviceId *int32 `json:"device_id,omitempty"` + // Lists an available MFA device type, such as OneLogin OTP SMS or Google Authenticator. + DeviceType *string `json:"device_type,omitempty"` } // NewDevice instantiates a new Device object @@ -41,9 +43,9 @@ func NewDeviceWithDefaults() *Device { } // GetDeviceId returns the DeviceId field value if set, zero value otherwise. -func (o *Device) GetDeviceId() string { - if o == nil || o.DeviceId == nil { - var ret string +func (o *Device) GetDeviceId() int32 { + if o == nil || isNil(o.DeviceId) { + var ret int32 return ret } return *o.DeviceId @@ -51,8 +53,8 @@ func (o *Device) GetDeviceId() string { // GetDeviceIdOk returns a tuple with the DeviceId field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Device) GetDeviceIdOk() (*string, bool) { - if o == nil || o.DeviceId == nil { +func (o *Device) GetDeviceIdOk() (*int32, bool) { + if o == nil || isNil(o.DeviceId) { return nil, false } return o.DeviceId, true @@ -60,164 +62,67 @@ func (o *Device) GetDeviceIdOk() (*string, bool) { // HasDeviceId returns a boolean if a field has been set. func (o *Device) HasDeviceId() bool { - if o != nil && o.DeviceId != nil { + if o != nil && !isNil(o.DeviceId) { return true } return false } -// SetDeviceId gets a reference to the given string and assigns it to the DeviceId field. -func (o *Device) SetDeviceId(v string) { +// SetDeviceId gets a reference to the given int32 and assigns it to the DeviceId field. +func (o *Device) SetDeviceId(v int32) { o.DeviceId = &v } -// GetUserDisplayName returns the UserDisplayName field value if set, zero value otherwise. -func (o *Device) GetUserDisplayName() string { - if o == nil || o.UserDisplayName == nil { - var ret string - return ret - } - return *o.UserDisplayName -} - -// GetUserDisplayNameOk returns a tuple with the UserDisplayName field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Device) GetUserDisplayNameOk() (*string, bool) { - if o == nil || o.UserDisplayName == nil { - return nil, false - } - return o.UserDisplayName, true -} - -// HasUserDisplayName returns a boolean if a field has been set. -func (o *Device) HasUserDisplayName() bool { - if o != nil && o.UserDisplayName != nil { - return true - } - - return false -} - -// SetUserDisplayName gets a reference to the given string and assigns it to the UserDisplayName field. -func (o *Device) SetUserDisplayName(v string) { - o.UserDisplayName = &v -} - -// GetTypeDisplayName returns the TypeDisplayName field value if set, zero value otherwise. -func (o *Device) GetTypeDisplayName() string { - if o == nil || o.TypeDisplayName == nil { +// GetDeviceType returns the DeviceType field value if set, zero value otherwise. +func (o *Device) GetDeviceType() string { + if o == nil || isNil(o.DeviceType) { var ret string return ret } - return *o.TypeDisplayName + return *o.DeviceType } -// GetTypeDisplayNameOk returns a tuple with the TypeDisplayName field value if set, nil otherwise +// GetDeviceTypeOk returns a tuple with the DeviceType field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Device) GetTypeDisplayNameOk() (*string, bool) { - if o == nil || o.TypeDisplayName == nil { +func (o *Device) GetDeviceTypeOk() (*string, bool) { + if o == nil || isNil(o.DeviceType) { return nil, false } - return o.TypeDisplayName, true + return o.DeviceType, true } -// HasTypeDisplayName returns a boolean if a field has been set. -func (o *Device) HasTypeDisplayName() bool { - if o != nil && o.TypeDisplayName != nil { +// HasDeviceType returns a boolean if a field has been set. +func (o *Device) HasDeviceType() bool { + if o != nil && !isNil(o.DeviceType) { return true } return false } -// SetTypeDisplayName gets a reference to the given string and assigns it to the TypeDisplayName field. -func (o *Device) SetTypeDisplayName(v string) { - o.TypeDisplayName = &v -} - -// GetAuthFactorName returns the AuthFactorName field value if set, zero value otherwise. -func (o *Device) GetAuthFactorName() string { - if o == nil || o.AuthFactorName == nil { - var ret string - return ret - } - return *o.AuthFactorName -} - -// GetAuthFactorNameOk returns a tuple with the AuthFactorName field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Device) GetAuthFactorNameOk() (*string, bool) { - if o == nil || o.AuthFactorName == nil { - return nil, false - } - return o.AuthFactorName, true +// SetDeviceType gets a reference to the given string and assigns it to the DeviceType field. +func (o *Device) SetDeviceType(v string) { + o.DeviceType = &v } -// HasAuthFactorName returns a boolean if a field has been set. -func (o *Device) HasAuthFactorName() bool { - if o != nil && o.AuthFactorName != nil { - return true - } - - return false -} - -// SetAuthFactorName gets a reference to the given string and assigns it to the AuthFactorName field. -func (o *Device) SetAuthFactorName(v string) { - o.AuthFactorName = &v -} - -// GetDefault returns the Default field value if set, zero value otherwise. -func (o *Device) GetDefault() bool { - if o == nil || o.Default == nil { - var ret bool - return ret - } - return *o.Default -} - -// 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 *Device) GetDefaultOk() (*bool, bool) { - if o == nil || o.Default == nil { - return nil, false - } - return o.Default, true -} - -// HasDefault returns a boolean if a field has been set. -func (o *Device) HasDefault() bool { - if o != nil && o.Default != nil { - return true +func (o Device) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err } - - return false -} - -// SetDefault gets a reference to the given bool and assigns it to the Default field. -func (o *Device) SetDefault(v bool) { - o.Default = &v + return json.Marshal(toSerialize) } -func (o Device) MarshalJSON() ([]byte, error) { +func (o Device) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.DeviceId != nil { + if !isNil(o.DeviceId) { toSerialize["device_id"] = o.DeviceId } - if o.UserDisplayName != nil { - toSerialize["user_display_name"] = o.UserDisplayName - } - if o.TypeDisplayName != nil { - toSerialize["type_display_name"] = o.TypeDisplayName + if !isNil(o.DeviceType) { + toSerialize["device_type"] = o.DeviceType } - if o.AuthFactorName != nil { - toSerialize["auth_factor_name"] = o.AuthFactorName - } - if o.Default != nil { - toSerialize["default"] = o.Default - } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableDevice struct { diff --git a/model_email_config.go b/model_email_config.go new file mode 100644 index 0000000..781acc7 --- /dev/null +++ b/model_email_config.go @@ -0,0 +1,330 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the EmailConfig type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EmailConfig{} + +// EmailConfig struct for EmailConfig +type EmailConfig struct { + // Email Settings server address + Address string `json:"address"` + // Use TLS + UseTls *bool `json:"use_tls,omitempty"` + // The From email address in the message. + From string `json:"from"` + // Domain of the From address. + Domain string `json:"domain"` + // The user name of the account to authenticate with the Email Settings server. + UserName *string `json:"user_name,omitempty"` + // The password of the account to authenticate with the Email Settings server. + Password *string `json:"password,omitempty"` + // Defaults to 25. + Port *int32 `json:"port,omitempty"` +} + +// NewEmailConfig instantiates a new EmailConfig 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 NewEmailConfig(address string, from string, domain string) *EmailConfig { + this := EmailConfig{} + this.Address = address + var useTls bool = true + this.UseTls = &useTls + this.From = from + this.Domain = domain + var port int32 = 25 + this.Port = &port + return &this +} + +// NewEmailConfigWithDefaults instantiates a new EmailConfig 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 NewEmailConfigWithDefaults() *EmailConfig { + this := EmailConfig{} + var useTls bool = true + this.UseTls = &useTls + var port int32 = 25 + this.Port = &port + return &this +} + +// GetAddress returns the Address field value +func (o *EmailConfig) GetAddress() string { + if o == nil { + var ret string + return ret + } + + return o.Address +} + +// GetAddressOk returns a tuple with the Address field value +// and a boolean to check if the value has been set. +func (o *EmailConfig) GetAddressOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Address, true +} + +// SetAddress sets field value +func (o *EmailConfig) SetAddress(v string) { + o.Address = v +} + +// GetUseTls returns the UseTls field value if set, zero value otherwise. +func (o *EmailConfig) GetUseTls() bool { + if o == nil || isNil(o.UseTls) { + var ret bool + return ret + } + return *o.UseTls +} + +// 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 *EmailConfig) GetUseTlsOk() (*bool, bool) { + if o == nil || isNil(o.UseTls) { + return nil, false + } + return o.UseTls, true +} + +// HasUseTls returns a boolean if a field has been set. +func (o *EmailConfig) HasUseTls() bool { + if o != nil && !isNil(o.UseTls) { + return true + } + + return false +} + +// SetUseTls gets a reference to the given bool and assigns it to the UseTls field. +func (o *EmailConfig) SetUseTls(v bool) { + o.UseTls = &v +} + +// GetFrom returns the From field value +func (o *EmailConfig) GetFrom() string { + if o == nil { + var ret string + return ret + } + + return o.From +} + +// GetFromOk returns a tuple with the From field value +// and a boolean to check if the value has been set. +func (o *EmailConfig) GetFromOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.From, true +} + +// SetFrom sets field value +func (o *EmailConfig) SetFrom(v string) { + o.From = v +} + +// GetDomain returns the Domain field value +func (o *EmailConfig) GetDomain() string { + if o == nil { + var ret string + return ret + } + + return o.Domain +} + +// GetDomainOk returns a tuple with the Domain field value +// and a boolean to check if the value has been set. +func (o *EmailConfig) GetDomainOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Domain, true +} + +// SetDomain sets field value +func (o *EmailConfig) SetDomain(v string) { + o.Domain = v +} + +// GetUserName returns the UserName field value if set, zero value otherwise. +func (o *EmailConfig) GetUserName() string { + if o == nil || isNil(o.UserName) { + var ret string + return ret + } + return *o.UserName +} + +// 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 *EmailConfig) GetUserNameOk() (*string, bool) { + if o == nil || isNil(o.UserName) { + return nil, false + } + return o.UserName, true +} + +// HasUserName returns a boolean if a field has been set. +func (o *EmailConfig) HasUserName() bool { + if o != nil && !isNil(o.UserName) { + return true + } + + return false +} + +// SetUserName gets a reference to the given string and assigns it to the UserName field. +func (o *EmailConfig) SetUserName(v string) { + o.UserName = &v +} + +// GetPassword returns the Password field value if set, zero value otherwise. +func (o *EmailConfig) GetPassword() string { + if o == nil || isNil(o.Password) { + var ret string + return ret + } + return *o.Password +} + +// 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 *EmailConfig) GetPasswordOk() (*string, bool) { + if o == nil || isNil(o.Password) { + return nil, false + } + return o.Password, true +} + +// HasPassword returns a boolean if a field has been set. +func (o *EmailConfig) HasPassword() bool { + if o != nil && !isNil(o.Password) { + return true + } + + return false +} + +// SetPassword gets a reference to the given string and assigns it to the Password field. +func (o *EmailConfig) SetPassword(v string) { + o.Password = &v +} + +// GetPort returns the Port field value if set, zero value otherwise. +func (o *EmailConfig) GetPort() int32 { + if o == nil || isNil(o.Port) { + var ret int32 + return ret + } + return *o.Port +} + +// 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 *EmailConfig) GetPortOk() (*int32, bool) { + if o == nil || isNil(o.Port) { + return nil, false + } + return o.Port, true +} + +// HasPort returns a boolean if a field has been set. +func (o *EmailConfig) HasPort() bool { + if o != nil && !isNil(o.Port) { + return true + } + + return false +} + +// SetPort gets a reference to the given int32 and assigns it to the Port field. +func (o *EmailConfig) SetPort(v int32) { + o.Port = &v +} + +func (o EmailConfig) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EmailConfig) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["address"] = o.Address + if !isNil(o.UseTls) { + toSerialize["use_tls"] = o.UseTls + } + toSerialize["from"] = o.From + toSerialize["domain"] = o.Domain + if !isNil(o.UserName) { + toSerialize["user_name"] = o.UserName + } + if !isNil(o.Password) { + toSerialize["password"] = o.Password + } + if !isNil(o.Port) { + toSerialize["port"] = o.Port + } + return toSerialize, nil +} + +type NullableEmailConfig struct { + value *EmailConfig + isSet bool +} + +func (v NullableEmailConfig) Get() *EmailConfig { + return v.value +} + +func (v *NullableEmailConfig) Set(val *EmailConfig) { + v.value = val + v.isSet = true +} + +func (v NullableEmailConfig) IsSet() bool { + return v.isSet +} + +func (v *NullableEmailConfig) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEmailConfig(val *EmailConfig) *NullableEmailConfig { + return &NullableEmailConfig{value: val, isSet: true} +} + +func (v NullableEmailConfig) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEmailConfig) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_enforcement_point.go b/model_enforcement_point.go new file mode 100644 index 0000000..0dce001 --- /dev/null +++ b/model_enforcement_point.go @@ -0,0 +1,597 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the EnforcementPoint type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EnforcementPoint{} + +// EnforcementPoint For apps that connect to a OneLogin Access Enforcement Point the following enforcement_point object will be included with the app payload. +type EnforcementPoint struct { + // Require user authentication to access any resource protected by this enforcement point. + RequireSitewideAuthentication *bool `json:"require_sitewide_authentication,omitempty"` + // If access is conditional, the conditions that must evaluate to true to allow access to a resource. For example, to require the user must be authenticated and have either the role Admin or User + Conditions *string `json:"conditions,omitempty"` + SessionExpiryFixed *ClockCounter `json:"session_expiry_fixed,omitempty"` + SessionExpiryInactivity *ClockCounter `json:"session_expiry_inactivity,omitempty"` + // Specify to always `allow`, `deny` access to resources, of if access is `conditional`. + Permissions *string `json:"permissions,omitempty"` + // Can only be set on create. Access Gateway Token. + Token *string `json:"token,omitempty"` + // A fully-qualified URL to the internal application including scheme, authority and path. The target host authority must be an IP address, not a hostname. + Target NullableString `json:"target,omitempty"` + // Array of resource objects + Resources []EnforcementPointResourcesInner `json:"resources,omitempty"` + // The root path to the application, often the name of the application. Can be any name, path or just a slash (“/”). The context root uniquely identifies the application within the enforcement point. + ContextRoot *string `json:"context_root,omitempty"` + // Use the target host header as opposed to the original gateway or upstream host header. + UseTargetHostHeader *bool `json:"use_target_host_header,omitempty"` + // A comma-delimited list of one or more virtual hosts that map to applications assigned to the enforcement point. A VHOST may be a host name or an IP address. VHOST distinguish between applications that are at the same context root. + Vhost NullableString `json:"vhost,omitempty"` + // The location within the context root to which the browser will be redirected for IdP-initiated single sign-on. For example, the landing page might be an index page in the context root such as index.html or default.aspx. The landing page cannot begin with a slash and must use valid URL characters. + LandingPage NullableString `json:"landing_page,omitempty"` + // The URL path evaluation is case insensitive by default. Resources hosted on web servers such as Apache, NGINX and Java EE are case sensitive paths. Web servers such as Microsoft IIS are not case-sensitive. + CaseSensitive *bool `json:"case_sensitive,omitempty"` +} + +// NewEnforcementPoint instantiates a new EnforcementPoint 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 NewEnforcementPoint() *EnforcementPoint { + this := EnforcementPoint{} + return &this +} + +// NewEnforcementPointWithDefaults instantiates a new EnforcementPoint 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 NewEnforcementPointWithDefaults() *EnforcementPoint { + this := EnforcementPoint{} + return &this +} + +// GetRequireSitewideAuthentication returns the RequireSitewideAuthentication field value if set, zero value otherwise. +func (o *EnforcementPoint) GetRequireSitewideAuthentication() bool { + if o == nil || isNil(o.RequireSitewideAuthentication) { + var ret bool + return ret + } + return *o.RequireSitewideAuthentication +} + +// GetRequireSitewideAuthenticationOk returns a tuple with the RequireSitewideAuthentication field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnforcementPoint) GetRequireSitewideAuthenticationOk() (*bool, bool) { + if o == nil || isNil(o.RequireSitewideAuthentication) { + return nil, false + } + return o.RequireSitewideAuthentication, true +} + +// HasRequireSitewideAuthentication returns a boolean if a field has been set. +func (o *EnforcementPoint) HasRequireSitewideAuthentication() bool { + if o != nil && !isNil(o.RequireSitewideAuthentication) { + return true + } + + return false +} + +// SetRequireSitewideAuthentication gets a reference to the given bool and assigns it to the RequireSitewideAuthentication field. +func (o *EnforcementPoint) SetRequireSitewideAuthentication(v bool) { + o.RequireSitewideAuthentication = &v +} + +// GetConditions returns the Conditions field value if set, zero value otherwise. +func (o *EnforcementPoint) GetConditions() string { + if o == nil || isNil(o.Conditions) { + var ret string + return ret + } + return *o.Conditions +} + +// GetConditionsOk returns a tuple with the Conditions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnforcementPoint) GetConditionsOk() (*string, bool) { + if o == nil || isNil(o.Conditions) { + return nil, false + } + return o.Conditions, true +} + +// HasConditions returns a boolean if a field has been set. +func (o *EnforcementPoint) HasConditions() bool { + if o != nil && !isNil(o.Conditions) { + return true + } + + return false +} + +// SetConditions gets a reference to the given string and assigns it to the Conditions field. +func (o *EnforcementPoint) SetConditions(v string) { + o.Conditions = &v +} + +// GetSessionExpiryFixed returns the SessionExpiryFixed field value if set, zero value otherwise. +func (o *EnforcementPoint) GetSessionExpiryFixed() ClockCounter { + if o == nil || isNil(o.SessionExpiryFixed) { + var ret ClockCounter + return ret + } + return *o.SessionExpiryFixed +} + +// GetSessionExpiryFixedOk returns a tuple with the SessionExpiryFixed field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnforcementPoint) GetSessionExpiryFixedOk() (*ClockCounter, bool) { + if o == nil || isNil(o.SessionExpiryFixed) { + return nil, false + } + return o.SessionExpiryFixed, true +} + +// HasSessionExpiryFixed returns a boolean if a field has been set. +func (o *EnforcementPoint) HasSessionExpiryFixed() bool { + if o != nil && !isNil(o.SessionExpiryFixed) { + return true + } + + return false +} + +// SetSessionExpiryFixed gets a reference to the given ClockCounter and assigns it to the SessionExpiryFixed field. +func (o *EnforcementPoint) SetSessionExpiryFixed(v ClockCounter) { + o.SessionExpiryFixed = &v +} + +// GetSessionExpiryInactivity returns the SessionExpiryInactivity field value if set, zero value otherwise. +func (o *EnforcementPoint) GetSessionExpiryInactivity() ClockCounter { + if o == nil || isNil(o.SessionExpiryInactivity) { + var ret ClockCounter + return ret + } + return *o.SessionExpiryInactivity +} + +// GetSessionExpiryInactivityOk returns a tuple with the SessionExpiryInactivity field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnforcementPoint) GetSessionExpiryInactivityOk() (*ClockCounter, bool) { + if o == nil || isNil(o.SessionExpiryInactivity) { + return nil, false + } + return o.SessionExpiryInactivity, true +} + +// HasSessionExpiryInactivity returns a boolean if a field has been set. +func (o *EnforcementPoint) HasSessionExpiryInactivity() bool { + if o != nil && !isNil(o.SessionExpiryInactivity) { + return true + } + + return false +} + +// SetSessionExpiryInactivity gets a reference to the given ClockCounter and assigns it to the SessionExpiryInactivity field. +func (o *EnforcementPoint) SetSessionExpiryInactivity(v ClockCounter) { + o.SessionExpiryInactivity = &v +} + +// GetPermissions returns the Permissions field value if set, zero value otherwise. +func (o *EnforcementPoint) GetPermissions() string { + if o == nil || isNil(o.Permissions) { + var ret string + return ret + } + return *o.Permissions +} + +// 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 *EnforcementPoint) GetPermissionsOk() (*string, bool) { + if o == nil || isNil(o.Permissions) { + return nil, false + } + return o.Permissions, true +} + +// HasPermissions returns a boolean if a field has been set. +func (o *EnforcementPoint) HasPermissions() bool { + if o != nil && !isNil(o.Permissions) { + return true + } + + return false +} + +// SetPermissions gets a reference to the given string and assigns it to the Permissions field. +func (o *EnforcementPoint) SetPermissions(v string) { + o.Permissions = &v +} + +// GetToken returns the Token field value if set, zero value otherwise. +func (o *EnforcementPoint) GetToken() string { + if o == nil || isNil(o.Token) { + var ret string + return ret + } + return *o.Token +} + +// 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 *EnforcementPoint) GetTokenOk() (*string, bool) { + if o == nil || isNil(o.Token) { + return nil, false + } + return o.Token, true +} + +// HasToken returns a boolean if a field has been set. +func (o *EnforcementPoint) HasToken() bool { + if o != nil && !isNil(o.Token) { + return true + } + + return false +} + +// SetToken gets a reference to the given string and assigns it to the Token field. +func (o *EnforcementPoint) SetToken(v string) { + o.Token = &v +} + +// GetTarget returns the Target field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnforcementPoint) GetTarget() string { + if o == nil || isNil(o.Target.Get()) { + var ret string + return ret + } + return *o.Target.Get() +} + +// GetTargetOk returns a tuple with the Target 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 *EnforcementPoint) GetTargetOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Target.Get(), o.Target.IsSet() +} + +// HasTarget returns a boolean if a field has been set. +func (o *EnforcementPoint) HasTarget() bool { + if o != nil && o.Target.IsSet() { + return true + } + + return false +} + +// SetTarget gets a reference to the given NullableString and assigns it to the Target field. +func (o *EnforcementPoint) SetTarget(v string) { + o.Target.Set(&v) +} +// SetTargetNil sets the value for Target to be an explicit nil +func (o *EnforcementPoint) SetTargetNil() { + o.Target.Set(nil) +} + +// UnsetTarget ensures that no value is present for Target, not even an explicit nil +func (o *EnforcementPoint) UnsetTarget() { + o.Target.Unset() +} + +// GetResources returns the Resources field value if set, zero value otherwise. +func (o *EnforcementPoint) GetResources() []EnforcementPointResourcesInner { + if o == nil || isNil(o.Resources) { + var ret []EnforcementPointResourcesInner + return ret + } + return o.Resources +} + +// GetResourcesOk returns a tuple with the Resources field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnforcementPoint) GetResourcesOk() ([]EnforcementPointResourcesInner, bool) { + if o == nil || isNil(o.Resources) { + return nil, false + } + return o.Resources, true +} + +// HasResources returns a boolean if a field has been set. +func (o *EnforcementPoint) HasResources() bool { + if o != nil && !isNil(o.Resources) { + return true + } + + return false +} + +// SetResources gets a reference to the given []EnforcementPointResourcesInner and assigns it to the Resources field. +func (o *EnforcementPoint) SetResources(v []EnforcementPointResourcesInner) { + o.Resources = v +} + +// GetContextRoot returns the ContextRoot field value if set, zero value otherwise. +func (o *EnforcementPoint) GetContextRoot() string { + if o == nil || isNil(o.ContextRoot) { + var ret string + return ret + } + return *o.ContextRoot +} + +// GetContextRootOk returns a tuple with the ContextRoot field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnforcementPoint) GetContextRootOk() (*string, bool) { + if o == nil || isNil(o.ContextRoot) { + return nil, false + } + return o.ContextRoot, true +} + +// HasContextRoot returns a boolean if a field has been set. +func (o *EnforcementPoint) HasContextRoot() bool { + if o != nil && !isNil(o.ContextRoot) { + return true + } + + return false +} + +// SetContextRoot gets a reference to the given string and assigns it to the ContextRoot field. +func (o *EnforcementPoint) SetContextRoot(v string) { + o.ContextRoot = &v +} + +// GetUseTargetHostHeader returns the UseTargetHostHeader field value if set, zero value otherwise. +func (o *EnforcementPoint) GetUseTargetHostHeader() bool { + if o == nil || isNil(o.UseTargetHostHeader) { + var ret bool + return ret + } + return *o.UseTargetHostHeader +} + +// GetUseTargetHostHeaderOk returns a tuple with the UseTargetHostHeader field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnforcementPoint) GetUseTargetHostHeaderOk() (*bool, bool) { + if o == nil || isNil(o.UseTargetHostHeader) { + return nil, false + } + return o.UseTargetHostHeader, true +} + +// HasUseTargetHostHeader returns a boolean if a field has been set. +func (o *EnforcementPoint) HasUseTargetHostHeader() bool { + if o != nil && !isNil(o.UseTargetHostHeader) { + return true + } + + return false +} + +// SetUseTargetHostHeader gets a reference to the given bool and assigns it to the UseTargetHostHeader field. +func (o *EnforcementPoint) SetUseTargetHostHeader(v bool) { + o.UseTargetHostHeader = &v +} + +// GetVhost returns the Vhost field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnforcementPoint) GetVhost() string { + if o == nil || isNil(o.Vhost.Get()) { + var ret string + return ret + } + return *o.Vhost.Get() +} + +// GetVhostOk returns a tuple with the Vhost 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 *EnforcementPoint) GetVhostOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Vhost.Get(), o.Vhost.IsSet() +} + +// HasVhost returns a boolean if a field has been set. +func (o *EnforcementPoint) HasVhost() bool { + if o != nil && o.Vhost.IsSet() { + return true + } + + return false +} + +// SetVhost gets a reference to the given NullableString and assigns it to the Vhost field. +func (o *EnforcementPoint) SetVhost(v string) { + o.Vhost.Set(&v) +} +// SetVhostNil sets the value for Vhost to be an explicit nil +func (o *EnforcementPoint) SetVhostNil() { + o.Vhost.Set(nil) +} + +// UnsetVhost ensures that no value is present for Vhost, not even an explicit nil +func (o *EnforcementPoint) UnsetVhost() { + o.Vhost.Unset() +} + +// GetLandingPage returns the LandingPage field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnforcementPoint) GetLandingPage() string { + if o == nil || isNil(o.LandingPage.Get()) { + var ret string + return ret + } + return *o.LandingPage.Get() +} + +// GetLandingPageOk returns a tuple with the LandingPage 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 *EnforcementPoint) GetLandingPageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.LandingPage.Get(), o.LandingPage.IsSet() +} + +// HasLandingPage returns a boolean if a field has been set. +func (o *EnforcementPoint) HasLandingPage() bool { + if o != nil && o.LandingPage.IsSet() { + return true + } + + return false +} + +// SetLandingPage gets a reference to the given NullableString and assigns it to the LandingPage field. +func (o *EnforcementPoint) SetLandingPage(v string) { + o.LandingPage.Set(&v) +} +// SetLandingPageNil sets the value for LandingPage to be an explicit nil +func (o *EnforcementPoint) SetLandingPageNil() { + o.LandingPage.Set(nil) +} + +// UnsetLandingPage ensures that no value is present for LandingPage, not even an explicit nil +func (o *EnforcementPoint) UnsetLandingPage() { + o.LandingPage.Unset() +} + +// GetCaseSensitive returns the CaseSensitive field value if set, zero value otherwise. +func (o *EnforcementPoint) GetCaseSensitive() bool { + if o == nil || isNil(o.CaseSensitive) { + var ret bool + return ret + } + return *o.CaseSensitive +} + +// GetCaseSensitiveOk returns a tuple with the CaseSensitive field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnforcementPoint) GetCaseSensitiveOk() (*bool, bool) { + if o == nil || isNil(o.CaseSensitive) { + return nil, false + } + return o.CaseSensitive, true +} + +// HasCaseSensitive returns a boolean if a field has been set. +func (o *EnforcementPoint) HasCaseSensitive() bool { + if o != nil && !isNil(o.CaseSensitive) { + return true + } + + return false +} + +// SetCaseSensitive gets a reference to the given bool and assigns it to the CaseSensitive field. +func (o *EnforcementPoint) SetCaseSensitive(v bool) { + o.CaseSensitive = &v +} + +func (o EnforcementPoint) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EnforcementPoint) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.RequireSitewideAuthentication) { + toSerialize["require_sitewide_authentication"] = o.RequireSitewideAuthentication + } + if !isNil(o.Conditions) { + toSerialize["conditions"] = o.Conditions + } + if !isNil(o.SessionExpiryFixed) { + toSerialize["session_expiry_fixed"] = o.SessionExpiryFixed + } + if !isNil(o.SessionExpiryInactivity) { + toSerialize["session_expiry_inactivity"] = o.SessionExpiryInactivity + } + if !isNil(o.Permissions) { + toSerialize["permissions"] = o.Permissions + } + // skip: token is readOnly + if o.Target.IsSet() { + toSerialize["target"] = o.Target.Get() + } + if !isNil(o.Resources) { + toSerialize["resources"] = o.Resources + } + if !isNil(o.ContextRoot) { + toSerialize["context_root"] = o.ContextRoot + } + if !isNil(o.UseTargetHostHeader) { + toSerialize["use_target_host_header"] = o.UseTargetHostHeader + } + if o.Vhost.IsSet() { + toSerialize["vhost"] = o.Vhost.Get() + } + if o.LandingPage.IsSet() { + toSerialize["landing_page"] = o.LandingPage.Get() + } + if !isNil(o.CaseSensitive) { + toSerialize["case_sensitive"] = o.CaseSensitive + } + return toSerialize, nil +} + +type NullableEnforcementPoint struct { + value *EnforcementPoint + isSet bool +} + +func (v NullableEnforcementPoint) Get() *EnforcementPoint { + return v.value +} + +func (v *NullableEnforcementPoint) Set(val *EnforcementPoint) { + v.value = val + v.isSet = true +} + +func (v NullableEnforcementPoint) IsSet() bool { + return v.isSet +} + +func (v *NullableEnforcementPoint) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEnforcementPoint(val *EnforcementPoint) *NullableEnforcementPoint { + return &NullableEnforcementPoint{value: val, isSet: true} +} + +func (v NullableEnforcementPoint) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEnforcementPoint) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_enforcement_point_resources_inner.go b/model_enforcement_point_resources_inner.go new file mode 100644 index 0000000..8610b29 --- /dev/null +++ b/model_enforcement_point_resources_inner.go @@ -0,0 +1,281 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the EnforcementPointResourcesInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EnforcementPointResourcesInner{} + +// EnforcementPointResourcesInner struct for EnforcementPointResourcesInner +type EnforcementPointResourcesInner struct { + Path *string `json:"path,omitempty"` + IsPathRegex NullableBool `json:"is_path_regex,omitempty"` + RequireAuth *bool `json:"require_auth,omitempty"` + Permission *string `json:"permission,omitempty"` + // required if permission == \"conditions\" + Conditions *string `json:"conditions,omitempty"` +} + +// NewEnforcementPointResourcesInner instantiates a new EnforcementPointResourcesInner 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 NewEnforcementPointResourcesInner() *EnforcementPointResourcesInner { + this := EnforcementPointResourcesInner{} + return &this +} + +// NewEnforcementPointResourcesInnerWithDefaults instantiates a new EnforcementPointResourcesInner 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 NewEnforcementPointResourcesInnerWithDefaults() *EnforcementPointResourcesInner { + this := EnforcementPointResourcesInner{} + return &this +} + +// GetPath returns the Path field value if set, zero value otherwise. +func (o *EnforcementPointResourcesInner) GetPath() string { + if o == nil || isNil(o.Path) { + 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 *EnforcementPointResourcesInner) GetPathOk() (*string, bool) { + if o == nil || isNil(o.Path) { + return nil, false + } + return o.Path, true +} + +// HasPath returns a boolean if a field has been set. +func (o *EnforcementPointResourcesInner) HasPath() bool { + if o != nil && !isNil(o.Path) { + return true + } + + return false +} + +// SetPath gets a reference to the given string and assigns it to the Path field. +func (o *EnforcementPointResourcesInner) SetPath(v string) { + o.Path = &v +} + +// GetIsPathRegex returns the IsPathRegex field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *EnforcementPointResourcesInner) GetIsPathRegex() bool { + if o == nil || isNil(o.IsPathRegex.Get()) { + var ret bool + return ret + } + return *o.IsPathRegex.Get() +} + +// GetIsPathRegexOk returns a tuple with the IsPathRegex 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 *EnforcementPointResourcesInner) GetIsPathRegexOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.IsPathRegex.Get(), o.IsPathRegex.IsSet() +} + +// HasIsPathRegex returns a boolean if a field has been set. +func (o *EnforcementPointResourcesInner) HasIsPathRegex() bool { + if o != nil && o.IsPathRegex.IsSet() { + return true + } + + return false +} + +// SetIsPathRegex gets a reference to the given NullableBool and assigns it to the IsPathRegex field. +func (o *EnforcementPointResourcesInner) SetIsPathRegex(v bool) { + o.IsPathRegex.Set(&v) +} +// SetIsPathRegexNil sets the value for IsPathRegex to be an explicit nil +func (o *EnforcementPointResourcesInner) SetIsPathRegexNil() { + o.IsPathRegex.Set(nil) +} + +// UnsetIsPathRegex ensures that no value is present for IsPathRegex, not even an explicit nil +func (o *EnforcementPointResourcesInner) UnsetIsPathRegex() { + o.IsPathRegex.Unset() +} + +// GetRequireAuth returns the RequireAuth field value if set, zero value otherwise. +func (o *EnforcementPointResourcesInner) GetRequireAuth() bool { + if o == nil || isNil(o.RequireAuth) { + var ret bool + return ret + } + return *o.RequireAuth +} + +// GetRequireAuthOk returns a tuple with the RequireAuth field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnforcementPointResourcesInner) GetRequireAuthOk() (*bool, bool) { + if o == nil || isNil(o.RequireAuth) { + return nil, false + } + return o.RequireAuth, true +} + +// HasRequireAuth returns a boolean if a field has been set. +func (o *EnforcementPointResourcesInner) HasRequireAuth() bool { + if o != nil && !isNil(o.RequireAuth) { + return true + } + + return false +} + +// SetRequireAuth gets a reference to the given bool and assigns it to the RequireAuth field. +func (o *EnforcementPointResourcesInner) SetRequireAuth(v bool) { + o.RequireAuth = &v +} + +// GetPermission returns the Permission field value if set, zero value otherwise. +func (o *EnforcementPointResourcesInner) GetPermission() string { + if o == nil || isNil(o.Permission) { + var ret string + return ret + } + return *o.Permission +} + +// GetPermissionOk returns a tuple with the Permission field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnforcementPointResourcesInner) GetPermissionOk() (*string, bool) { + if o == nil || isNil(o.Permission) { + return nil, false + } + return o.Permission, true +} + +// HasPermission returns a boolean if a field has been set. +func (o *EnforcementPointResourcesInner) HasPermission() bool { + if o != nil && !isNil(o.Permission) { + return true + } + + return false +} + +// SetPermission gets a reference to the given string and assigns it to the Permission field. +func (o *EnforcementPointResourcesInner) SetPermission(v string) { + o.Permission = &v +} + +// GetConditions returns the Conditions field value if set, zero value otherwise. +func (o *EnforcementPointResourcesInner) GetConditions() string { + if o == nil || isNil(o.Conditions) { + var ret string + return ret + } + return *o.Conditions +} + +// GetConditionsOk returns a tuple with the Conditions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnforcementPointResourcesInner) GetConditionsOk() (*string, bool) { + if o == nil || isNil(o.Conditions) { + return nil, false + } + return o.Conditions, true +} + +// HasConditions returns a boolean if a field has been set. +func (o *EnforcementPointResourcesInner) HasConditions() bool { + if o != nil && !isNil(o.Conditions) { + return true + } + + return false +} + +// SetConditions gets a reference to the given string and assigns it to the Conditions field. +func (o *EnforcementPointResourcesInner) SetConditions(v string) { + o.Conditions = &v +} + +func (o EnforcementPointResourcesInner) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EnforcementPointResourcesInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.Path) { + toSerialize["path"] = o.Path + } + if o.IsPathRegex.IsSet() { + toSerialize["is_path_regex"] = o.IsPathRegex.Get() + } + if !isNil(o.RequireAuth) { + toSerialize["require_auth"] = o.RequireAuth + } + if !isNil(o.Permission) { + toSerialize["permission"] = o.Permission + } + if !isNil(o.Conditions) { + toSerialize["conditions"] = o.Conditions + } + return toSerialize, nil +} + +type NullableEnforcementPointResourcesInner struct { + value *EnforcementPointResourcesInner + isSet bool +} + +func (v NullableEnforcementPointResourcesInner) Get() *EnforcementPointResourcesInner { + return v.value +} + +func (v *NullableEnforcementPointResourcesInner) Set(val *EnforcementPointResourcesInner) { + v.value = val + v.isSet = true +} + +func (v NullableEnforcementPointResourcesInner) IsSet() bool { + return v.isSet +} + +func (v *NullableEnforcementPointResourcesInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEnforcementPointResourcesInner(val *EnforcementPointResourcesInner) *NullableEnforcementPointResourcesInner { + return &NullableEnforcementPointResourcesInner{value: val, isSet: true} +} + +func (v NullableEnforcementPointResourcesInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEnforcementPointResourcesInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_enroll_factor_request.go b/model_enroll_factor_request.go deleted file mode 100644 index 377db62..0000000 --- a/model_enroll_factor_request.go +++ /dev/null @@ -1,287 +0,0 @@ -/* -OneLogin API - -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -API version: 3.0.0-alpha.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package openapi - -import ( - "encoding/json" -) - -// EnrollFactorRequest struct for EnrollFactorRequest -type EnrollFactorRequest struct { - // The identifier of the factor to enroll the user with. - FactorId int32 `json:"factor_id"` - // A name for the users device. - DisplayName string `json:"display_name"` - // Defaults to 120. Valid values are: 120-900 seconds. - ExpiresIn *string `json:"expires_in,omitempty"` - // Defaults to false. - Verified *bool `json:"verified,omitempty"` - // Redirects MagicLink success page to specified URL after 2 seconds. - RedirectTo *string `json:"redirect_to,omitempty"` - // A message template that will be sent via SMS. Max length of the message after template items are inserted is 160 characters including the OTP code. - CustomMessage *string `json:"custom_message,omitempty"` -} - -// NewEnrollFactorRequest instantiates a new EnrollFactorRequest 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 NewEnrollFactorRequest(factorId int32, displayName string) *EnrollFactorRequest { - this := EnrollFactorRequest{} - this.FactorId = factorId - this.DisplayName = displayName - return &this -} - -// NewEnrollFactorRequestWithDefaults instantiates a new EnrollFactorRequest 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 NewEnrollFactorRequestWithDefaults() *EnrollFactorRequest { - this := EnrollFactorRequest{} - return &this -} - -// GetFactorId returns the FactorId field value -func (o *EnrollFactorRequest) GetFactorId() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.FactorId -} - -// GetFactorIdOk returns a tuple with the FactorId field value -// and a boolean to check if the value has been set. -func (o *EnrollFactorRequest) GetFactorIdOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.FactorId, true -} - -// SetFactorId sets field value -func (o *EnrollFactorRequest) SetFactorId(v int32) { - o.FactorId = v -} - -// GetDisplayName returns the DisplayName field value -func (o *EnrollFactorRequest) GetDisplayName() string { - if o == nil { - var ret string - return ret - } - - return o.DisplayName -} - -// GetDisplayNameOk returns a tuple with the DisplayName field value -// and a boolean to check if the value has been set. -func (o *EnrollFactorRequest) GetDisplayNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.DisplayName, true -} - -// SetDisplayName sets field value -func (o *EnrollFactorRequest) SetDisplayName(v string) { - o.DisplayName = v -} - -// GetExpiresIn returns the ExpiresIn field value if set, zero value otherwise. -func (o *EnrollFactorRequest) GetExpiresIn() string { - if o == nil || o.ExpiresIn == nil { - var ret string - return ret - } - return *o.ExpiresIn -} - -// GetExpiresInOk returns a tuple with the ExpiresIn field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *EnrollFactorRequest) GetExpiresInOk() (*string, bool) { - if o == nil || o.ExpiresIn == nil { - return nil, false - } - return o.ExpiresIn, true -} - -// HasExpiresIn returns a boolean if a field has been set. -func (o *EnrollFactorRequest) HasExpiresIn() bool { - if o != nil && o.ExpiresIn != nil { - return true - } - - return false -} - -// SetExpiresIn gets a reference to the given string and assigns it to the ExpiresIn field. -func (o *EnrollFactorRequest) SetExpiresIn(v string) { - o.ExpiresIn = &v -} - -// GetVerified returns the Verified field value if set, zero value otherwise. -func (o *EnrollFactorRequest) GetVerified() bool { - if o == nil || o.Verified == nil { - var ret bool - return ret - } - return *o.Verified -} - -// GetVerifiedOk returns a tuple with the Verified field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *EnrollFactorRequest) GetVerifiedOk() (*bool, bool) { - if o == nil || o.Verified == nil { - return nil, false - } - return o.Verified, true -} - -// HasVerified returns a boolean if a field has been set. -func (o *EnrollFactorRequest) HasVerified() bool { - if o != nil && o.Verified != nil { - return true - } - - return false -} - -// SetVerified gets a reference to the given bool and assigns it to the Verified field. -func (o *EnrollFactorRequest) SetVerified(v bool) { - o.Verified = &v -} - -// GetRedirectTo returns the RedirectTo field value if set, zero value otherwise. -func (o *EnrollFactorRequest) GetRedirectTo() string { - if o == nil || o.RedirectTo == nil { - var ret string - return ret - } - return *o.RedirectTo -} - -// GetRedirectToOk returns a tuple with the RedirectTo field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *EnrollFactorRequest) GetRedirectToOk() (*string, bool) { - if o == nil || o.RedirectTo == nil { - return nil, false - } - return o.RedirectTo, true -} - -// HasRedirectTo returns a boolean if a field has been set. -func (o *EnrollFactorRequest) HasRedirectTo() bool { - if o != nil && o.RedirectTo != nil { - return true - } - - return false -} - -// SetRedirectTo gets a reference to the given string and assigns it to the RedirectTo field. -func (o *EnrollFactorRequest) SetRedirectTo(v string) { - o.RedirectTo = &v -} - -// GetCustomMessage returns the CustomMessage field value if set, zero value otherwise. -func (o *EnrollFactorRequest) GetCustomMessage() string { - if o == nil || o.CustomMessage == nil { - var ret string - return ret - } - return *o.CustomMessage -} - -// GetCustomMessageOk returns a tuple with the CustomMessage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *EnrollFactorRequest) GetCustomMessageOk() (*string, bool) { - if o == nil || o.CustomMessage == nil { - return nil, false - } - return o.CustomMessage, true -} - -// HasCustomMessage returns a boolean if a field has been set. -func (o *EnrollFactorRequest) HasCustomMessage() bool { - if o != nil && o.CustomMessage != nil { - return true - } - - return false -} - -// SetCustomMessage gets a reference to the given string and assigns it to the CustomMessage field. -func (o *EnrollFactorRequest) SetCustomMessage(v string) { - o.CustomMessage = &v -} - -func (o EnrollFactorRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["factor_id"] = o.FactorId - } - if true { - toSerialize["display_name"] = o.DisplayName - } - if o.ExpiresIn != nil { - toSerialize["expires_in"] = o.ExpiresIn - } - if o.Verified != nil { - toSerialize["verified"] = o.Verified - } - if o.RedirectTo != nil { - toSerialize["redirect_to"] = o.RedirectTo - } - if o.CustomMessage != nil { - toSerialize["custom_message"] = o.CustomMessage - } - return json.Marshal(toSerialize) -} - -type NullableEnrollFactorRequest struct { - value *EnrollFactorRequest - isSet bool -} - -func (v NullableEnrollFactorRequest) Get() *EnrollFactorRequest { - return v.value -} - -func (v *NullableEnrollFactorRequest) Set(val *EnrollFactorRequest) { - v.value = val - v.isSet = true -} - -func (v NullableEnrollFactorRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableEnrollFactorRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableEnrollFactorRequest(val *EnrollFactorRequest) *NullableEnrollFactorRequest { - return &NullableEnrollFactorRequest{value: val, isSet: true} -} - -func (v NullableEnrollFactorRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableEnrollFactorRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_enroll_mfa_factor_200_response.go b/model_enroll_mfa_factor_200_response.go new file mode 100644 index 0000000..56a7773 --- /dev/null +++ b/model_enroll_mfa_factor_200_response.go @@ -0,0 +1,162 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the EnrollMfaFactor200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EnrollMfaFactor200Response{} + +// EnrollMfaFactor200Response struct for EnrollMfaFactor200Response +type EnrollMfaFactor200Response struct { + Status *Error `json:"status,omitempty"` + Data []GetEnrolledFactors200ResponseDataOtpDevicesInner `json:"data,omitempty"` +} + +// NewEnrollMfaFactor200Response instantiates a new EnrollMfaFactor200Response 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 NewEnrollMfaFactor200Response() *EnrollMfaFactor200Response { + this := EnrollMfaFactor200Response{} + return &this +} + +// NewEnrollMfaFactor200ResponseWithDefaults instantiates a new EnrollMfaFactor200Response 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 NewEnrollMfaFactor200ResponseWithDefaults() *EnrollMfaFactor200Response { + this := EnrollMfaFactor200Response{} + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *EnrollMfaFactor200Response) GetStatus() Error { + if o == nil || isNil(o.Status) { + var ret Error + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnrollMfaFactor200Response) GetStatusOk() (*Error, bool) { + if o == nil || isNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *EnrollMfaFactor200Response) HasStatus() bool { + if o != nil && !isNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given Error and assigns it to the Status field. +func (o *EnrollMfaFactor200Response) SetStatus(v Error) { + o.Status = &v +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *EnrollMfaFactor200Response) GetData() []GetEnrolledFactors200ResponseDataOtpDevicesInner { + if o == nil || isNil(o.Data) { + var ret []GetEnrolledFactors200ResponseDataOtpDevicesInner + return ret + } + return o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EnrollMfaFactor200Response) GetDataOk() ([]GetEnrolledFactors200ResponseDataOtpDevicesInner, bool) { + if o == nil || isNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *EnrollMfaFactor200Response) HasData() bool { + if o != nil && !isNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given []GetEnrolledFactors200ResponseDataOtpDevicesInner and assigns it to the Data field. +func (o *EnrollMfaFactor200Response) SetData(v []GetEnrolledFactors200ResponseDataOtpDevicesInner) { + o.Data = v +} + +func (o EnrollMfaFactor200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EnrollMfaFactor200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.Status) { + toSerialize["status"] = o.Status + } + if !isNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullableEnrollMfaFactor200Response struct { + value *EnrollMfaFactor200Response + isSet bool +} + +func (v NullableEnrollMfaFactor200Response) Get() *EnrollMfaFactor200Response { + return v.value +} + +func (v *NullableEnrollMfaFactor200Response) Set(val *EnrollMfaFactor200Response) { + v.value = val + v.isSet = true +} + +func (v NullableEnrollMfaFactor200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableEnrollMfaFactor200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEnrollMfaFactor200Response(val *EnrollMfaFactor200Response) *NullableEnrollMfaFactor200Response { + return &NullableEnrollMfaFactor200Response{value: val, isSet: true} +} + +func (v NullableEnrollMfaFactor200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEnrollMfaFactor200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_envvar.go b/model_envvar.go deleted file mode 100644 index 2d27e5b..0000000 --- a/model_envvar.go +++ /dev/null @@ -1,227 +0,0 @@ -/* -OneLogin API - -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -API version: 3.0.0-alpha.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package openapi - -import ( - "encoding/json" -) - -// Envvar struct for Envvar -type Envvar struct { - // A unique identifier for the Hook Environment Variable - Id *string `json:"id,omitempty"` - // The name of the environment variable. - Name *string `json:"name,omitempty"` - // The ISO8601 formatted date that the environment variable was created. - CreatedAt *string `json:"created_at,omitempty"` - // The ISO8601 formatted date that the environment variable was last updated. - UpdatedAt *string `json:"updated_at,omitempty"` -} - -// NewEnvvar instantiates a new Envvar 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 NewEnvvar() *Envvar { - this := Envvar{} - return &this -} - -// NewEnvvarWithDefaults instantiates a new Envvar 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 NewEnvvarWithDefaults() *Envvar { - this := Envvar{} - return &this -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *Envvar) GetId() string { - if o == nil || o.Id == nil { - var ret string - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Envvar) GetIdOk() (*string, bool) { - if o == nil || o.Id == nil { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *Envvar) HasId() bool { - if o != nil && o.Id != nil { - return true - } - - return false -} - -// SetId gets a reference to the given string and assigns it to the Id field. -func (o *Envvar) SetId(v string) { - o.Id = &v -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *Envvar) GetName() string { - if o == nil || o.Name == nil { - var ret string - return ret - } - return *o.Name -} - -// 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 *Envvar) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *Envvar) HasName() bool { - if o != nil && o.Name != nil { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *Envvar) SetName(v string) { - o.Name = &v -} - -// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. -func (o *Envvar) GetCreatedAt() string { - if o == nil || o.CreatedAt == nil { - var ret string - return ret - } - return *o.CreatedAt -} - -// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Envvar) GetCreatedAtOk() (*string, bool) { - if o == nil || o.CreatedAt == nil { - return nil, false - } - return o.CreatedAt, true -} - -// HasCreatedAt returns a boolean if a field has been set. -func (o *Envvar) HasCreatedAt() bool { - if o != nil && o.CreatedAt != nil { - return true - } - - return false -} - -// SetCreatedAt gets a reference to the given string and assigns it to the CreatedAt field. -func (o *Envvar) SetCreatedAt(v string) { - o.CreatedAt = &v -} - -// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. -func (o *Envvar) GetUpdatedAt() string { - if o == nil || o.UpdatedAt == nil { - var ret string - return ret - } - return *o.UpdatedAt -} - -// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Envvar) GetUpdatedAtOk() (*string, bool) { - if o == nil || o.UpdatedAt == nil { - return nil, false - } - return o.UpdatedAt, true -} - -// HasUpdatedAt returns a boolean if a field has been set. -func (o *Envvar) HasUpdatedAt() bool { - if o != nil && o.UpdatedAt != nil { - return true - } - - return false -} - -// SetUpdatedAt gets a reference to the given string and assigns it to the UpdatedAt field. -func (o *Envvar) SetUpdatedAt(v string) { - o.UpdatedAt = &v -} - -func (o Envvar) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Name != nil { - toSerialize["name"] = o.Name - } - if o.CreatedAt != nil { - toSerialize["created_at"] = o.CreatedAt - } - if o.UpdatedAt != nil { - toSerialize["updated_at"] = o.UpdatedAt - } - return json.Marshal(toSerialize) -} - -type NullableEnvvar struct { - value *Envvar - isSet bool -} - -func (v NullableEnvvar) Get() *Envvar { - return v.value -} - -func (v *NullableEnvvar) Set(val *Envvar) { - v.value = val - v.isSet = true -} - -func (v NullableEnvvar) IsSet() bool { - return v.isSet -} - -func (v *NullableEnvvar) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableEnvvar(val *Envvar) *NullableEnvvar { - return &NullableEnvvar{value: val, isSet: true} -} - -func (v NullableEnvvar) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableEnvvar) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_error.go b/model_error.go new file mode 100644 index 0000000..dd4e9a2 --- /dev/null +++ b/model_error.go @@ -0,0 +1,216 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the Error type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Error{} + +// Error struct for Error +type Error struct { + Error *bool `json:"error,omitempty"` + Code int32 `json:"code"` + Type *string `json:"type,omitempty"` + Message string `json:"message"` +} + +// NewError instantiates a new Error 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 NewError(code int32, message string) *Error { + this := Error{} + this.Code = code + this.Message = message + return &this +} + +// NewErrorWithDefaults instantiates a new Error 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 NewErrorWithDefaults() *Error { + this := Error{} + return &this +} + +// GetError returns the Error field value if set, zero value otherwise. +func (o *Error) GetError() bool { + if o == nil || isNil(o.Error) { + var ret bool + return ret + } + return *o.Error +} + +// 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 *Error) GetErrorOk() (*bool, bool) { + if o == nil || isNil(o.Error) { + return nil, false + } + return o.Error, true +} + +// HasError returns a boolean if a field has been set. +func (o *Error) HasError() bool { + if o != nil && !isNil(o.Error) { + return true + } + + return false +} + +// SetError gets a reference to the given bool and assigns it to the Error field. +func (o *Error) SetError(v bool) { + o.Error = &v +} + +// GetCode returns the Code field value +func (o *Error) GetCode() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Code +} + +// GetCodeOk returns a tuple with the Code field value +// and a boolean to check if the value has been set. +func (o *Error) GetCodeOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Code, true +} + +// SetCode sets field value +func (o *Error) SetCode(v int32) { + o.Code = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *Error) GetType() string { + if o == nil || isNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// 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 *Error) GetTypeOk() (*string, bool) { + if o == nil || isNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *Error) HasType() bool { + if o != nil && !isNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *Error) SetType(v string) { + o.Type = &v +} + +// GetMessage returns the Message field value +func (o *Error) GetMessage() string { + if o == nil { + var ret string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *Error) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Message, true +} + +// SetMessage sets field value +func (o *Error) SetMessage(v string) { + o.Message = v +} + +func (o Error) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Error) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.Error) { + toSerialize["error"] = o.Error + } + toSerialize["code"] = o.Code + if !isNil(o.Type) { + toSerialize["type"] = o.Type + } + toSerialize["message"] = o.Message + return toSerialize, nil +} + +type NullableError struct { + value *Error + isSet bool +} + +func (v NullableError) Get() *Error { + return v.value +} + +func (v *NullableError) Set(val *Error) { + v.value = val + v.isSet = true +} + +func (v NullableError) IsSet() bool { + return v.isSet +} + +func (v *NullableError) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableError(val *Error) *NullableError { + return &NullableError{value: val, isSet: true} +} + +func (v NullableError) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableError) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_error_status.go b/model_error_status.go deleted file mode 100644 index 26491e5..0000000 --- a/model_error_status.go +++ /dev/null @@ -1,187 +0,0 @@ -/* -OneLogin API - -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -API version: 3.0.0-alpha.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package openapi - -import ( - "encoding/json" -) - -// ErrorStatus struct for ErrorStatus -type ErrorStatus struct { - Code *int32 `json:"code,omitempty"` - Message *string `json:"message,omitempty"` - Errors []ErrorStatusErrorsInner `json:"errors,omitempty"` -} - -// NewErrorStatus instantiates a new ErrorStatus 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 NewErrorStatus() *ErrorStatus { - this := ErrorStatus{} - return &this -} - -// NewErrorStatusWithDefaults instantiates a new ErrorStatus 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 NewErrorStatusWithDefaults() *ErrorStatus { - this := ErrorStatus{} - return &this -} - -// GetCode returns the Code field value if set, zero value otherwise. -func (o *ErrorStatus) GetCode() int32 { - if o == nil || o.Code == nil { - var ret int32 - return ret - } - return *o.Code -} - -// 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 *ErrorStatus) GetCodeOk() (*int32, bool) { - if o == nil || o.Code == nil { - return nil, false - } - return o.Code, true -} - -// HasCode returns a boolean if a field has been set. -func (o *ErrorStatus) HasCode() bool { - if o != nil && o.Code != nil { - return true - } - - return false -} - -// SetCode gets a reference to the given int32 and assigns it to the Code field. -func (o *ErrorStatus) SetCode(v int32) { - o.Code = &v -} - -// GetMessage returns the Message field value if set, zero value otherwise. -func (o *ErrorStatus) GetMessage() string { - if o == nil || o.Message == nil { - var ret string - return ret - } - return *o.Message -} - -// GetMessageOk returns a tuple with the Message field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ErrorStatus) GetMessageOk() (*string, bool) { - if o == nil || o.Message == nil { - return nil, false - } - return o.Message, true -} - -// HasMessage returns a boolean if a field has been set. -func (o *ErrorStatus) HasMessage() bool { - if o != nil && o.Message != nil { - return true - } - - return false -} - -// SetMessage gets a reference to the given string and assigns it to the Message field. -func (o *ErrorStatus) SetMessage(v string) { - o.Message = &v -} - -// GetErrors returns the Errors field value if set, zero value otherwise. -func (o *ErrorStatus) GetErrors() []ErrorStatusErrorsInner { - if o == nil || o.Errors == nil { - var ret []ErrorStatusErrorsInner - return ret - } - return o.Errors -} - -// GetErrorsOk returns a tuple with the Errors field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ErrorStatus) GetErrorsOk() ([]ErrorStatusErrorsInner, bool) { - if o == nil || o.Errors == nil { - return nil, false - } - return o.Errors, true -} - -// HasErrors returns a boolean if a field has been set. -func (o *ErrorStatus) HasErrors() bool { - if o != nil && o.Errors != nil { - return true - } - - return false -} - -// SetErrors gets a reference to the given []ErrorStatusErrorsInner and assigns it to the Errors field. -func (o *ErrorStatus) SetErrors(v []ErrorStatusErrorsInner) { - o.Errors = v -} - -func (o ErrorStatus) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Code != nil { - toSerialize["code"] = o.Code - } - if o.Message != nil { - toSerialize["message"] = o.Message - } - if o.Errors != nil { - toSerialize["errors"] = o.Errors - } - return json.Marshal(toSerialize) -} - -type NullableErrorStatus struct { - value *ErrorStatus - isSet bool -} - -func (v NullableErrorStatus) Get() *ErrorStatus { - return v.value -} - -func (v *NullableErrorStatus) Set(val *ErrorStatus) { - v.value = val - v.isSet = true -} - -func (v NullableErrorStatus) IsSet() bool { - return v.isSet -} - -func (v *NullableErrorStatus) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableErrorStatus(val *ErrorStatus) *NullableErrorStatus { - return &NullableErrorStatus{value: val, isSet: true} -} - -func (v NullableErrorStatus) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableErrorStatus) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_error_status_errors_inner.go b/model_error_status_errors_inner.go deleted file mode 100644 index bdf0833..0000000 --- a/model_error_status_errors_inner.go +++ /dev/null @@ -1,151 +0,0 @@ -/* -OneLogin API - -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -API version: 3.0.0-alpha.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package openapi - -import ( - "encoding/json" -) - -// ErrorStatusErrorsInner struct for ErrorStatusErrorsInner -type ErrorStatusErrorsInner struct { - Field *string `json:"field,omitempty"` - Message []string `json:"message,omitempty"` -} - -// NewErrorStatusErrorsInner instantiates a new ErrorStatusErrorsInner 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 NewErrorStatusErrorsInner() *ErrorStatusErrorsInner { - this := ErrorStatusErrorsInner{} - return &this -} - -// NewErrorStatusErrorsInnerWithDefaults instantiates a new ErrorStatusErrorsInner 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 NewErrorStatusErrorsInnerWithDefaults() *ErrorStatusErrorsInner { - this := ErrorStatusErrorsInner{} - return &this -} - -// GetField returns the Field field value if set, zero value otherwise. -func (o *ErrorStatusErrorsInner) GetField() string { - if o == nil || o.Field == nil { - var ret string - return ret - } - return *o.Field -} - -// GetFieldOk returns a tuple with the Field field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ErrorStatusErrorsInner) GetFieldOk() (*string, bool) { - if o == nil || o.Field == nil { - return nil, false - } - return o.Field, true -} - -// HasField returns a boolean if a field has been set. -func (o *ErrorStatusErrorsInner) HasField() bool { - if o != nil && o.Field != nil { - return true - } - - return false -} - -// SetField gets a reference to the given string and assigns it to the Field field. -func (o *ErrorStatusErrorsInner) SetField(v string) { - o.Field = &v -} - -// GetMessage returns the Message field value if set, zero value otherwise. -func (o *ErrorStatusErrorsInner) GetMessage() []string { - if o == nil || o.Message == nil { - var ret []string - return ret - } - return o.Message -} - -// GetMessageOk returns a tuple with the Message field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ErrorStatusErrorsInner) GetMessageOk() ([]string, bool) { - if o == nil || o.Message == nil { - return nil, false - } - return o.Message, true -} - -// HasMessage returns a boolean if a field has been set. -func (o *ErrorStatusErrorsInner) HasMessage() bool { - if o != nil && o.Message != nil { - return true - } - - return false -} - -// SetMessage gets a reference to the given []string and assigns it to the Message field. -func (o *ErrorStatusErrorsInner) SetMessage(v []string) { - o.Message = v -} - -func (o ErrorStatusErrorsInner) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Field != nil { - toSerialize["field"] = o.Field - } - if o.Message != nil { - toSerialize["message"] = o.Message - } - return json.Marshal(toSerialize) -} - -type NullableErrorStatusErrorsInner struct { - value *ErrorStatusErrorsInner - isSet bool -} - -func (v NullableErrorStatusErrorsInner) Get() *ErrorStatusErrorsInner { - return v.value -} - -func (v *NullableErrorStatusErrorsInner) Set(val *ErrorStatusErrorsInner) { - v.value = val - v.isSet = true -} - -func (v NullableErrorStatusErrorsInner) IsSet() bool { - return v.isSet -} - -func (v *NullableErrorStatusErrorsInner) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableErrorStatusErrorsInner(val *ErrorStatusErrorsInner) *NullableErrorStatusErrorsInner { - return &NullableErrorStatusErrorsInner{value: val, isSet: true} -} - -func (v NullableErrorStatusErrorsInner) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableErrorStatusErrorsInner) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_event.go b/model_event.go new file mode 100644 index 0000000..4a58249 --- /dev/null +++ b/model_event.go @@ -0,0 +1,1738 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the Event type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Event{} + +// Event struct for Event +type Event struct { + // Account that triggered the event. + AccountId *int32 `json:"account_id,omitempty"` + // Acting system that triggered the event when the actor is not a user. + ActorSystem *string `json:"actor_system,omitempty"` + // ID of the user whose action triggered the event. + ActorUserId *int32 `json:"actor_user_id,omitempty"` + // First and last name of the user whose action triggered the event. + ActorUserName *string `json:"actor_user_name,omitempty"` + AdcId *int32 `json:"adc_id,omitempty"` + // Name of the app involved in the event, if applicable. + AppName *string `json:"app-name,omitempty"` + // ID of the app involved in the event, if applicable. + AppId *int32 `json:"app_id,omitempty"` + AssumedBySuperadminOrReseller *int32 `json:"assumed_by_superadmin_or_reseller,omitempty"` + // ID of the user who assumed the role of the acting user to trigger the event, if applicable. + AssumingActingUserId *int32 `json:"assuming_acting_user_id,omitempty"` + CertificateId *int32 `json:"certificate_id,omitempty"` + // Client ID used to generate the access token that made the API call that generated the event. + ClientId *string `json:"client_id,omitempty"` + // ISO8601 Time and date at which the event was created. This value is autogenerated by OneLogin. + CreatedAt *string `json:"created_at,omitempty"` + // More details about the event. + CustomMessage *string `json:"custom_message,omitempty"` + // Directory sync run ID. + DirectorySyncRunId *int32 `json:"directory_sync_run_id,omitempty"` + // Provisioning error details, if applicable. + ErrorDescription *string `json:"error_description,omitempty"` + // Type of event triggered. + EventTypeId *int32 `json:"event_type_id,omitempty"` + // Name of a group involved in the event. + GroupName *string `json:"group-name,omitempty"` + // ID of a group involved in the event. + GroupId *int32 `json:"group_id,omitempty"` + // Event's unique ID in OneLogin. Autogenerated by OneLogin. + Id *int32 `json:"id,omitempty"` + // IP address of the machine used to trigger the event. + Ipaddr *string `json:"ipaddr,omitempty"` + MappingId *int32 `json:"mapping_id,omitempty"` + // More details about the event. + Notes *string `json:"notes,omitempty"` + ObjectId *int32 `json:"object_id,omitempty"` + // ID of a device involved in the event. + OtpDeviceId *int32 `json:"otp_device_id,omitempty"` + // Name of a device involved in the event. + OtpDeviceName *string `json:"otp_device_name,omitempty"` + Param *string `json:"param,omitempty"` + // ID of the policy involved in the event. + PolicyId *int32 `json:"policy_id,omitempty"` + // Name of the policy involved in the event. + PolicyName *string `json:"policy_name,omitempty"` + PolicyType *string `json:"policy_type,omitempty"` + PrivilegeId *int32 `json:"privilege_id,omitempty"` + ProxyIp *string `json:"proxy_ip,omitempty"` + RadiusConfigId *int32 `json:"radius_config_id,omitempty"` + ResolvedAt *string `json:"resolved_at,omitempty"` + // ID of the resource (user, role, group, and so forth) associated with the event. + ResourceTypeId *int32 `json:"resource_type_id,omitempty"` + // Identifier for risk cookie + RiskCookieId *string `json:"risk_cookie_id,omitempty"` + RiskReasons *string `json:"risk_reasons,omitempty"` + RiskScore *int32 `json:"risk_score,omitempty"` + // ID of a role involved in the event. + RoleId *int32 `json:"role_id,omitempty"` + // Name of a role involved in the event. + RoleName *string `json:"role_name,omitempty"` + ServiceDirectoryId *int32 `json:"service_directory_id,omitempty"` + Solved *bool `json:"solved,omitempty"` + TrustedIdpId *int32 `json:"trusted_idp_id,omitempty"` + UserFieldId *int32 `json:"user_field_id,omitempty"` + // ID of the user that was acted upon to trigger the event. + UserId *int32 `json:"user_id,omitempty"` + // Name of the user that was acted upon to trigger the event. + UserName *string `json:"user_name,omitempty"` +} + +// NewEvent instantiates a new Event 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 NewEvent() *Event { + this := Event{} + return &this +} + +// NewEventWithDefaults instantiates a new Event 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 NewEventWithDefaults() *Event { + this := Event{} + return &this +} + +// GetAccountId returns the AccountId field value if set, zero value otherwise. +func (o *Event) GetAccountId() int32 { + if o == nil || isNil(o.AccountId) { + var ret int32 + return ret + } + return *o.AccountId +} + +// GetAccountIdOk returns a tuple with the AccountId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Event) GetAccountIdOk() (*int32, bool) { + if o == nil || isNil(o.AccountId) { + return nil, false + } + return o.AccountId, true +} + +// HasAccountId returns a boolean if a field has been set. +func (o *Event) HasAccountId() bool { + if o != nil && !isNil(o.AccountId) { + return true + } + + return false +} + +// SetAccountId gets a reference to the given int32 and assigns it to the AccountId field. +func (o *Event) SetAccountId(v int32) { + o.AccountId = &v +} + +// GetActorSystem returns the ActorSystem field value if set, zero value otherwise. +func (o *Event) GetActorSystem() string { + if o == nil || isNil(o.ActorSystem) { + var ret string + return ret + } + return *o.ActorSystem +} + +// GetActorSystemOk returns a tuple with the ActorSystem field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Event) GetActorSystemOk() (*string, bool) { + if o == nil || isNil(o.ActorSystem) { + return nil, false + } + return o.ActorSystem, true +} + +// HasActorSystem returns a boolean if a field has been set. +func (o *Event) HasActorSystem() bool { + if o != nil && !isNil(o.ActorSystem) { + return true + } + + return false +} + +// SetActorSystem gets a reference to the given string and assigns it to the ActorSystem field. +func (o *Event) SetActorSystem(v string) { + o.ActorSystem = &v +} + +// GetActorUserId returns the ActorUserId field value if set, zero value otherwise. +func (o *Event) GetActorUserId() int32 { + if o == nil || isNil(o.ActorUserId) { + var ret int32 + return ret + } + return *o.ActorUserId +} + +// GetActorUserIdOk returns a tuple with the ActorUserId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Event) GetActorUserIdOk() (*int32, bool) { + if o == nil || isNil(o.ActorUserId) { + return nil, false + } + return o.ActorUserId, true +} + +// HasActorUserId returns a boolean if a field has been set. +func (o *Event) HasActorUserId() bool { + if o != nil && !isNil(o.ActorUserId) { + return true + } + + return false +} + +// SetActorUserId gets a reference to the given int32 and assigns it to the ActorUserId field. +func (o *Event) SetActorUserId(v int32) { + o.ActorUserId = &v +} + +// GetActorUserName returns the ActorUserName field value if set, zero value otherwise. +func (o *Event) GetActorUserName() string { + if o == nil || isNil(o.ActorUserName) { + var ret string + return ret + } + return *o.ActorUserName +} + +// GetActorUserNameOk returns a tuple with the ActorUserName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Event) GetActorUserNameOk() (*string, bool) { + if o == nil || isNil(o.ActorUserName) { + return nil, false + } + return o.ActorUserName, true +} + +// HasActorUserName returns a boolean if a field has been set. +func (o *Event) HasActorUserName() bool { + if o != nil && !isNil(o.ActorUserName) { + return true + } + + return false +} + +// SetActorUserName gets a reference to the given string and assigns it to the ActorUserName field. +func (o *Event) SetActorUserName(v string) { + o.ActorUserName = &v +} + +// GetAdcId returns the AdcId field value if set, zero value otherwise. +func (o *Event) GetAdcId() int32 { + if o == nil || isNil(o.AdcId) { + var ret int32 + return ret + } + return *o.AdcId +} + +// GetAdcIdOk returns a tuple with the AdcId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Event) GetAdcIdOk() (*int32, bool) { + if o == nil || isNil(o.AdcId) { + return nil, false + } + return o.AdcId, true +} + +// HasAdcId returns a boolean if a field has been set. +func (o *Event) HasAdcId() bool { + if o != nil && !isNil(o.AdcId) { + return true + } + + return false +} + +// SetAdcId gets a reference to the given int32 and assigns it to the AdcId field. +func (o *Event) SetAdcId(v int32) { + o.AdcId = &v +} + +// GetAppName returns the AppName field value if set, zero value otherwise. +func (o *Event) GetAppName() string { + if o == nil || isNil(o.AppName) { + var ret string + return ret + } + return *o.AppName +} + +// GetAppNameOk returns a tuple with the AppName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Event) GetAppNameOk() (*string, bool) { + if o == nil || isNil(o.AppName) { + return nil, false + } + return o.AppName, true +} + +// HasAppName returns a boolean if a field has been set. +func (o *Event) HasAppName() bool { + if o != nil && !isNil(o.AppName) { + return true + } + + return false +} + +// SetAppName gets a reference to the given string and assigns it to the AppName field. +func (o *Event) SetAppName(v string) { + o.AppName = &v +} + +// GetAppId returns the AppId field value if set, zero value otherwise. +func (o *Event) GetAppId() int32 { + if o == nil || isNil(o.AppId) { + var ret int32 + return ret + } + return *o.AppId +} + +// GetAppIdOk returns a tuple with the AppId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Event) GetAppIdOk() (*int32, bool) { + if o == nil || isNil(o.AppId) { + return nil, false + } + return o.AppId, true +} + +// HasAppId returns a boolean if a field has been set. +func (o *Event) HasAppId() bool { + if o != nil && !isNil(o.AppId) { + return true + } + + return false +} + +// SetAppId gets a reference to the given int32 and assigns it to the AppId field. +func (o *Event) SetAppId(v int32) { + o.AppId = &v +} + +// GetAssumedBySuperadminOrReseller returns the AssumedBySuperadminOrReseller field value if set, zero value otherwise. +func (o *Event) GetAssumedBySuperadminOrReseller() int32 { + if o == nil || isNil(o.AssumedBySuperadminOrReseller) { + var ret int32 + return ret + } + return *o.AssumedBySuperadminOrReseller +} + +// GetAssumedBySuperadminOrResellerOk returns a tuple with the AssumedBySuperadminOrReseller field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Event) GetAssumedBySuperadminOrResellerOk() (*int32, bool) { + if o == nil || isNil(o.AssumedBySuperadminOrReseller) { + return nil, false + } + return o.AssumedBySuperadminOrReseller, true +} + +// HasAssumedBySuperadminOrReseller returns a boolean if a field has been set. +func (o *Event) HasAssumedBySuperadminOrReseller() bool { + if o != nil && !isNil(o.AssumedBySuperadminOrReseller) { + return true + } + + return false +} + +// SetAssumedBySuperadminOrReseller gets a reference to the given int32 and assigns it to the AssumedBySuperadminOrReseller field. +func (o *Event) SetAssumedBySuperadminOrReseller(v int32) { + o.AssumedBySuperadminOrReseller = &v +} + +// GetAssumingActingUserId returns the AssumingActingUserId field value if set, zero value otherwise. +func (o *Event) GetAssumingActingUserId() int32 { + if o == nil || isNil(o.AssumingActingUserId) { + var ret int32 + return ret + } + return *o.AssumingActingUserId +} + +// GetAssumingActingUserIdOk returns a tuple with the AssumingActingUserId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Event) GetAssumingActingUserIdOk() (*int32, bool) { + if o == nil || isNil(o.AssumingActingUserId) { + return nil, false + } + return o.AssumingActingUserId, true +} + +// HasAssumingActingUserId returns a boolean if a field has been set. +func (o *Event) HasAssumingActingUserId() bool { + if o != nil && !isNil(o.AssumingActingUserId) { + return true + } + + return false +} + +// SetAssumingActingUserId gets a reference to the given int32 and assigns it to the AssumingActingUserId field. +func (o *Event) SetAssumingActingUserId(v int32) { + o.AssumingActingUserId = &v +} + +// GetCertificateId returns the CertificateId field value if set, zero value otherwise. +func (o *Event) GetCertificateId() int32 { + if o == nil || isNil(o.CertificateId) { + var ret int32 + return ret + } + return *o.CertificateId +} + +// GetCertificateIdOk returns a tuple with the CertificateId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Event) GetCertificateIdOk() (*int32, bool) { + if o == nil || isNil(o.CertificateId) { + return nil, false + } + return o.CertificateId, true +} + +// HasCertificateId returns a boolean if a field has been set. +func (o *Event) HasCertificateId() bool { + if o != nil && !isNil(o.CertificateId) { + return true + } + + return false +} + +// SetCertificateId gets a reference to the given int32 and assigns it to the CertificateId field. +func (o *Event) SetCertificateId(v int32) { + o.CertificateId = &v +} + +// GetClientId returns the ClientId field value if set, zero value otherwise. +func (o *Event) GetClientId() string { + if o == nil || isNil(o.ClientId) { + var ret string + return ret + } + return *o.ClientId +} + +// 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 *Event) GetClientIdOk() (*string, bool) { + if o == nil || isNil(o.ClientId) { + return nil, false + } + return o.ClientId, true +} + +// HasClientId returns a boolean if a field has been set. +func (o *Event) HasClientId() bool { + if o != nil && !isNil(o.ClientId) { + return true + } + + return false +} + +// SetClientId gets a reference to the given string and assigns it to the ClientId field. +func (o *Event) SetClientId(v string) { + o.ClientId = &v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *Event) GetCreatedAt() string { + if o == nil || isNil(o.CreatedAt) { + var ret string + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Event) GetCreatedAtOk() (*string, bool) { + if o == nil || isNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *Event) HasCreatedAt() bool { + if o != nil && !isNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given string and assigns it to the CreatedAt field. +func (o *Event) SetCreatedAt(v string) { + o.CreatedAt = &v +} + +// GetCustomMessage returns the CustomMessage field value if set, zero value otherwise. +func (o *Event) GetCustomMessage() string { + if o == nil || isNil(o.CustomMessage) { + var ret string + return ret + } + return *o.CustomMessage +} + +// GetCustomMessageOk returns a tuple with the CustomMessage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Event) GetCustomMessageOk() (*string, bool) { + if o == nil || isNil(o.CustomMessage) { + return nil, false + } + return o.CustomMessage, true +} + +// HasCustomMessage returns a boolean if a field has been set. +func (o *Event) HasCustomMessage() bool { + if o != nil && !isNil(o.CustomMessage) { + return true + } + + return false +} + +// SetCustomMessage gets a reference to the given string and assigns it to the CustomMessage field. +func (o *Event) SetCustomMessage(v string) { + o.CustomMessage = &v +} + +// GetDirectorySyncRunId returns the DirectorySyncRunId field value if set, zero value otherwise. +func (o *Event) GetDirectorySyncRunId() int32 { + if o == nil || isNil(o.DirectorySyncRunId) { + var ret int32 + return ret + } + return *o.DirectorySyncRunId +} + +// GetDirectorySyncRunIdOk returns a tuple with the DirectorySyncRunId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Event) GetDirectorySyncRunIdOk() (*int32, bool) { + if o == nil || isNil(o.DirectorySyncRunId) { + return nil, false + } + return o.DirectorySyncRunId, true +} + +// HasDirectorySyncRunId returns a boolean if a field has been set. +func (o *Event) HasDirectorySyncRunId() bool { + if o != nil && !isNil(o.DirectorySyncRunId) { + return true + } + + return false +} + +// SetDirectorySyncRunId gets a reference to the given int32 and assigns it to the DirectorySyncRunId field. +func (o *Event) SetDirectorySyncRunId(v int32) { + o.DirectorySyncRunId = &v +} + +// GetErrorDescription returns the ErrorDescription field value if set, zero value otherwise. +func (o *Event) GetErrorDescription() string { + if o == nil || isNil(o.ErrorDescription) { + var ret string + return ret + } + return *o.ErrorDescription +} + +// GetErrorDescriptionOk returns a tuple with the ErrorDescription field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Event) GetErrorDescriptionOk() (*string, bool) { + if o == nil || isNil(o.ErrorDescription) { + return nil, false + } + return o.ErrorDescription, true +} + +// HasErrorDescription returns a boolean if a field has been set. +func (o *Event) HasErrorDescription() bool { + if o != nil && !isNil(o.ErrorDescription) { + return true + } + + return false +} + +// SetErrorDescription gets a reference to the given string and assigns it to the ErrorDescription field. +func (o *Event) SetErrorDescription(v string) { + o.ErrorDescription = &v +} + +// GetEventTypeId returns the EventTypeId field value if set, zero value otherwise. +func (o *Event) GetEventTypeId() int32 { + if o == nil || isNil(o.EventTypeId) { + var ret int32 + return ret + } + return *o.EventTypeId +} + +// GetEventTypeIdOk returns a tuple with the EventTypeId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Event) GetEventTypeIdOk() (*int32, bool) { + if o == nil || isNil(o.EventTypeId) { + return nil, false + } + return o.EventTypeId, true +} + +// HasEventTypeId returns a boolean if a field has been set. +func (o *Event) HasEventTypeId() bool { + if o != nil && !isNil(o.EventTypeId) { + return true + } + + return false +} + +// SetEventTypeId gets a reference to the given int32 and assigns it to the EventTypeId field. +func (o *Event) SetEventTypeId(v int32) { + o.EventTypeId = &v +} + +// GetGroupName returns the GroupName field value if set, zero value otherwise. +func (o *Event) GetGroupName() string { + if o == nil || isNil(o.GroupName) { + var ret string + return ret + } + return *o.GroupName +} + +// GetGroupNameOk returns a tuple with the GroupName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Event) GetGroupNameOk() (*string, bool) { + if o == nil || isNil(o.GroupName) { + return nil, false + } + return o.GroupName, true +} + +// HasGroupName returns a boolean if a field has been set. +func (o *Event) HasGroupName() bool { + if o != nil && !isNil(o.GroupName) { + return true + } + + return false +} + +// SetGroupName gets a reference to the given string and assigns it to the GroupName field. +func (o *Event) SetGroupName(v string) { + o.GroupName = &v +} + +// GetGroupId returns the GroupId field value if set, zero value otherwise. +func (o *Event) GetGroupId() int32 { + if o == nil || isNil(o.GroupId) { + var ret int32 + return ret + } + return *o.GroupId +} + +// GetGroupIdOk returns a tuple with the GroupId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Event) GetGroupIdOk() (*int32, bool) { + if o == nil || isNil(o.GroupId) { + return nil, false + } + return o.GroupId, true +} + +// HasGroupId returns a boolean if a field has been set. +func (o *Event) HasGroupId() bool { + if o != nil && !isNil(o.GroupId) { + return true + } + + return false +} + +// SetGroupId gets a reference to the given int32 and assigns it to the GroupId field. +func (o *Event) SetGroupId(v int32) { + o.GroupId = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *Event) GetId() int32 { + if o == nil || isNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Event) GetIdOk() (*int32, bool) { + if o == nil || isNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *Event) HasId() bool { + if o != nil && !isNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *Event) SetId(v int32) { + o.Id = &v +} + +// GetIpaddr returns the Ipaddr field value if set, zero value otherwise. +func (o *Event) GetIpaddr() string { + if o == nil || isNil(o.Ipaddr) { + var ret string + return ret + } + return *o.Ipaddr +} + +// GetIpaddrOk returns a tuple with the Ipaddr field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Event) GetIpaddrOk() (*string, bool) { + if o == nil || isNil(o.Ipaddr) { + return nil, false + } + return o.Ipaddr, true +} + +// HasIpaddr returns a boolean if a field has been set. +func (o *Event) HasIpaddr() bool { + if o != nil && !isNil(o.Ipaddr) { + return true + } + + return false +} + +// SetIpaddr gets a reference to the given string and assigns it to the Ipaddr field. +func (o *Event) SetIpaddr(v string) { + o.Ipaddr = &v +} + +// GetMappingId returns the MappingId field value if set, zero value otherwise. +func (o *Event) GetMappingId() int32 { + if o == nil || isNil(o.MappingId) { + var ret int32 + return ret + } + return *o.MappingId +} + +// GetMappingIdOk returns a tuple with the MappingId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Event) GetMappingIdOk() (*int32, bool) { + if o == nil || isNil(o.MappingId) { + return nil, false + } + return o.MappingId, true +} + +// HasMappingId returns a boolean if a field has been set. +func (o *Event) HasMappingId() bool { + if o != nil && !isNil(o.MappingId) { + return true + } + + return false +} + +// SetMappingId gets a reference to the given int32 and assigns it to the MappingId field. +func (o *Event) SetMappingId(v int32) { + o.MappingId = &v +} + +// GetNotes returns the Notes field value if set, zero value otherwise. +func (o *Event) GetNotes() string { + if o == nil || isNil(o.Notes) { + var ret string + return ret + } + return *o.Notes +} + +// GetNotesOk returns a tuple with the Notes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Event) GetNotesOk() (*string, bool) { + if o == nil || isNil(o.Notes) { + return nil, false + } + return o.Notes, true +} + +// HasNotes returns a boolean if a field has been set. +func (o *Event) HasNotes() bool { + if o != nil && !isNil(o.Notes) { + return true + } + + return false +} + +// SetNotes gets a reference to the given string and assigns it to the Notes field. +func (o *Event) SetNotes(v string) { + o.Notes = &v +} + +// GetObjectId returns the ObjectId field value if set, zero value otherwise. +func (o *Event) GetObjectId() int32 { + if o == nil || isNil(o.ObjectId) { + var ret int32 + return ret + } + return *o.ObjectId +} + +// GetObjectIdOk returns a tuple with the ObjectId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Event) GetObjectIdOk() (*int32, bool) { + if o == nil || isNil(o.ObjectId) { + return nil, false + } + return o.ObjectId, true +} + +// HasObjectId returns a boolean if a field has been set. +func (o *Event) HasObjectId() bool { + if o != nil && !isNil(o.ObjectId) { + return true + } + + return false +} + +// SetObjectId gets a reference to the given int32 and assigns it to the ObjectId field. +func (o *Event) SetObjectId(v int32) { + o.ObjectId = &v +} + +// GetOtpDeviceId returns the OtpDeviceId field value if set, zero value otherwise. +func (o *Event) GetOtpDeviceId() int32 { + if o == nil || isNil(o.OtpDeviceId) { + var ret int32 + return ret + } + return *o.OtpDeviceId +} + +// GetOtpDeviceIdOk returns a tuple with the OtpDeviceId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Event) GetOtpDeviceIdOk() (*int32, bool) { + if o == nil || isNil(o.OtpDeviceId) { + return nil, false + } + return o.OtpDeviceId, true +} + +// HasOtpDeviceId returns a boolean if a field has been set. +func (o *Event) HasOtpDeviceId() bool { + if o != nil && !isNil(o.OtpDeviceId) { + return true + } + + return false +} + +// SetOtpDeviceId gets a reference to the given int32 and assigns it to the OtpDeviceId field. +func (o *Event) SetOtpDeviceId(v int32) { + o.OtpDeviceId = &v +} + +// GetOtpDeviceName returns the OtpDeviceName field value if set, zero value otherwise. +func (o *Event) GetOtpDeviceName() string { + if o == nil || isNil(o.OtpDeviceName) { + var ret string + return ret + } + return *o.OtpDeviceName +} + +// GetOtpDeviceNameOk returns a tuple with the OtpDeviceName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Event) GetOtpDeviceNameOk() (*string, bool) { + if o == nil || isNil(o.OtpDeviceName) { + return nil, false + } + return o.OtpDeviceName, true +} + +// HasOtpDeviceName returns a boolean if a field has been set. +func (o *Event) HasOtpDeviceName() bool { + if o != nil && !isNil(o.OtpDeviceName) { + return true + } + + return false +} + +// SetOtpDeviceName gets a reference to the given string and assigns it to the OtpDeviceName field. +func (o *Event) SetOtpDeviceName(v string) { + o.OtpDeviceName = &v +} + +// GetParam returns the Param field value if set, zero value otherwise. +func (o *Event) GetParam() string { + if o == nil || isNil(o.Param) { + var ret string + return ret + } + return *o.Param +} + +// GetParamOk returns a tuple with the Param field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Event) GetParamOk() (*string, bool) { + if o == nil || isNil(o.Param) { + return nil, false + } + return o.Param, true +} + +// HasParam returns a boolean if a field has been set. +func (o *Event) HasParam() bool { + if o != nil && !isNil(o.Param) { + return true + } + + return false +} + +// SetParam gets a reference to the given string and assigns it to the Param field. +func (o *Event) SetParam(v string) { + o.Param = &v +} + +// GetPolicyId returns the PolicyId field value if set, zero value otherwise. +func (o *Event) GetPolicyId() int32 { + if o == nil || isNil(o.PolicyId) { + var ret int32 + return ret + } + return *o.PolicyId +} + +// GetPolicyIdOk returns a tuple with the PolicyId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Event) GetPolicyIdOk() (*int32, bool) { + if o == nil || isNil(o.PolicyId) { + return nil, false + } + return o.PolicyId, true +} + +// HasPolicyId returns a boolean if a field has been set. +func (o *Event) HasPolicyId() bool { + if o != nil && !isNil(o.PolicyId) { + return true + } + + return false +} + +// SetPolicyId gets a reference to the given int32 and assigns it to the PolicyId field. +func (o *Event) SetPolicyId(v int32) { + o.PolicyId = &v +} + +// GetPolicyName returns the PolicyName field value if set, zero value otherwise. +func (o *Event) GetPolicyName() string { + if o == nil || isNil(o.PolicyName) { + var ret string + return ret + } + return *o.PolicyName +} + +// GetPolicyNameOk returns a tuple with the PolicyName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Event) GetPolicyNameOk() (*string, bool) { + if o == nil || isNil(o.PolicyName) { + return nil, false + } + return o.PolicyName, true +} + +// HasPolicyName returns a boolean if a field has been set. +func (o *Event) HasPolicyName() bool { + if o != nil && !isNil(o.PolicyName) { + return true + } + + return false +} + +// SetPolicyName gets a reference to the given string and assigns it to the PolicyName field. +func (o *Event) SetPolicyName(v string) { + o.PolicyName = &v +} + +// GetPolicyType returns the PolicyType field value if set, zero value otherwise. +func (o *Event) GetPolicyType() string { + if o == nil || isNil(o.PolicyType) { + var ret string + return ret + } + return *o.PolicyType +} + +// GetPolicyTypeOk returns a tuple with the PolicyType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Event) GetPolicyTypeOk() (*string, bool) { + if o == nil || isNil(o.PolicyType) { + return nil, false + } + return o.PolicyType, true +} + +// HasPolicyType returns a boolean if a field has been set. +func (o *Event) HasPolicyType() bool { + if o != nil && !isNil(o.PolicyType) { + return true + } + + return false +} + +// SetPolicyType gets a reference to the given string and assigns it to the PolicyType field. +func (o *Event) SetPolicyType(v string) { + o.PolicyType = &v +} + +// GetPrivilegeId returns the PrivilegeId field value if set, zero value otherwise. +func (o *Event) GetPrivilegeId() int32 { + if o == nil || isNil(o.PrivilegeId) { + var ret int32 + return ret + } + return *o.PrivilegeId +} + +// GetPrivilegeIdOk returns a tuple with the PrivilegeId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Event) GetPrivilegeIdOk() (*int32, bool) { + if o == nil || isNil(o.PrivilegeId) { + return nil, false + } + return o.PrivilegeId, true +} + +// HasPrivilegeId returns a boolean if a field has been set. +func (o *Event) HasPrivilegeId() bool { + if o != nil && !isNil(o.PrivilegeId) { + return true + } + + return false +} + +// SetPrivilegeId gets a reference to the given int32 and assigns it to the PrivilegeId field. +func (o *Event) SetPrivilegeId(v int32) { + o.PrivilegeId = &v +} + +// GetProxyIp returns the ProxyIp field value if set, zero value otherwise. +func (o *Event) GetProxyIp() string { + if o == nil || isNil(o.ProxyIp) { + var ret string + return ret + } + return *o.ProxyIp +} + +// GetProxyIpOk returns a tuple with the ProxyIp field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Event) GetProxyIpOk() (*string, bool) { + if o == nil || isNil(o.ProxyIp) { + return nil, false + } + return o.ProxyIp, true +} + +// HasProxyIp returns a boolean if a field has been set. +func (o *Event) HasProxyIp() bool { + if o != nil && !isNil(o.ProxyIp) { + return true + } + + return false +} + +// SetProxyIp gets a reference to the given string and assigns it to the ProxyIp field. +func (o *Event) SetProxyIp(v string) { + o.ProxyIp = &v +} + +// GetRadiusConfigId returns the RadiusConfigId field value if set, zero value otherwise. +func (o *Event) GetRadiusConfigId() int32 { + if o == nil || isNil(o.RadiusConfigId) { + var ret int32 + return ret + } + return *o.RadiusConfigId +} + +// GetRadiusConfigIdOk returns a tuple with the RadiusConfigId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Event) GetRadiusConfigIdOk() (*int32, bool) { + if o == nil || isNil(o.RadiusConfigId) { + return nil, false + } + return o.RadiusConfigId, true +} + +// HasRadiusConfigId returns a boolean if a field has been set. +func (o *Event) HasRadiusConfigId() bool { + if o != nil && !isNil(o.RadiusConfigId) { + return true + } + + return false +} + +// SetRadiusConfigId gets a reference to the given int32 and assigns it to the RadiusConfigId field. +func (o *Event) SetRadiusConfigId(v int32) { + o.RadiusConfigId = &v +} + +// GetResolvedAt returns the ResolvedAt field value if set, zero value otherwise. +func (o *Event) GetResolvedAt() string { + if o == nil || isNil(o.ResolvedAt) { + var ret string + return ret + } + return *o.ResolvedAt +} + +// GetResolvedAtOk returns a tuple with the ResolvedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Event) GetResolvedAtOk() (*string, bool) { + if o == nil || isNil(o.ResolvedAt) { + return nil, false + } + return o.ResolvedAt, true +} + +// HasResolvedAt returns a boolean if a field has been set. +func (o *Event) HasResolvedAt() bool { + if o != nil && !isNil(o.ResolvedAt) { + return true + } + + return false +} + +// SetResolvedAt gets a reference to the given string and assigns it to the ResolvedAt field. +func (o *Event) SetResolvedAt(v string) { + o.ResolvedAt = &v +} + +// GetResourceTypeId returns the ResourceTypeId field value if set, zero value otherwise. +func (o *Event) GetResourceTypeId() int32 { + if o == nil || isNil(o.ResourceTypeId) { + var ret int32 + return ret + } + return *o.ResourceTypeId +} + +// GetResourceTypeIdOk returns a tuple with the ResourceTypeId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Event) GetResourceTypeIdOk() (*int32, bool) { + if o == nil || isNil(o.ResourceTypeId) { + return nil, false + } + return o.ResourceTypeId, true +} + +// HasResourceTypeId returns a boolean if a field has been set. +func (o *Event) HasResourceTypeId() bool { + if o != nil && !isNil(o.ResourceTypeId) { + return true + } + + return false +} + +// SetResourceTypeId gets a reference to the given int32 and assigns it to the ResourceTypeId field. +func (o *Event) SetResourceTypeId(v int32) { + o.ResourceTypeId = &v +} + +// GetRiskCookieId returns the RiskCookieId field value if set, zero value otherwise. +func (o *Event) GetRiskCookieId() string { + if o == nil || isNil(o.RiskCookieId) { + var ret string + return ret + } + return *o.RiskCookieId +} + +// GetRiskCookieIdOk returns a tuple with the RiskCookieId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Event) GetRiskCookieIdOk() (*string, bool) { + if o == nil || isNil(o.RiskCookieId) { + return nil, false + } + return o.RiskCookieId, true +} + +// HasRiskCookieId returns a boolean if a field has been set. +func (o *Event) HasRiskCookieId() bool { + if o != nil && !isNil(o.RiskCookieId) { + return true + } + + return false +} + +// SetRiskCookieId gets a reference to the given string and assigns it to the RiskCookieId field. +func (o *Event) SetRiskCookieId(v string) { + o.RiskCookieId = &v +} + +// GetRiskReasons returns the RiskReasons field value if set, zero value otherwise. +func (o *Event) GetRiskReasons() string { + if o == nil || isNil(o.RiskReasons) { + var ret string + return ret + } + return *o.RiskReasons +} + +// GetRiskReasonsOk returns a tuple with the RiskReasons field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Event) GetRiskReasonsOk() (*string, bool) { + if o == nil || isNil(o.RiskReasons) { + return nil, false + } + return o.RiskReasons, true +} + +// HasRiskReasons returns a boolean if a field has been set. +func (o *Event) HasRiskReasons() bool { + if o != nil && !isNil(o.RiskReasons) { + return true + } + + return false +} + +// SetRiskReasons gets a reference to the given string and assigns it to the RiskReasons field. +func (o *Event) SetRiskReasons(v string) { + o.RiskReasons = &v +} + +// GetRiskScore returns the RiskScore field value if set, zero value otherwise. +func (o *Event) GetRiskScore() int32 { + if o == nil || isNil(o.RiskScore) { + var ret int32 + return ret + } + return *o.RiskScore +} + +// GetRiskScoreOk returns a tuple with the RiskScore field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Event) GetRiskScoreOk() (*int32, bool) { + if o == nil || isNil(o.RiskScore) { + return nil, false + } + return o.RiskScore, true +} + +// HasRiskScore returns a boolean if a field has been set. +func (o *Event) HasRiskScore() bool { + if o != nil && !isNil(o.RiskScore) { + return true + } + + return false +} + +// SetRiskScore gets a reference to the given int32 and assigns it to the RiskScore field. +func (o *Event) SetRiskScore(v int32) { + o.RiskScore = &v +} + +// GetRoleId returns the RoleId field value if set, zero value otherwise. +func (o *Event) GetRoleId() int32 { + if o == nil || isNil(o.RoleId) { + var ret int32 + return ret + } + return *o.RoleId +} + +// GetRoleIdOk returns a tuple with the RoleId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Event) GetRoleIdOk() (*int32, bool) { + if o == nil || isNil(o.RoleId) { + return nil, false + } + return o.RoleId, true +} + +// HasRoleId returns a boolean if a field has been set. +func (o *Event) HasRoleId() bool { + if o != nil && !isNil(o.RoleId) { + return true + } + + return false +} + +// SetRoleId gets a reference to the given int32 and assigns it to the RoleId field. +func (o *Event) SetRoleId(v int32) { + o.RoleId = &v +} + +// GetRoleName returns the RoleName field value if set, zero value otherwise. +func (o *Event) GetRoleName() string { + if o == nil || isNil(o.RoleName) { + var ret string + return ret + } + return *o.RoleName +} + +// GetRoleNameOk returns a tuple with the RoleName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Event) GetRoleNameOk() (*string, bool) { + if o == nil || isNil(o.RoleName) { + return nil, false + } + return o.RoleName, true +} + +// HasRoleName returns a boolean if a field has been set. +func (o *Event) HasRoleName() bool { + if o != nil && !isNil(o.RoleName) { + return true + } + + return false +} + +// SetRoleName gets a reference to the given string and assigns it to the RoleName field. +func (o *Event) SetRoleName(v string) { + o.RoleName = &v +} + +// GetServiceDirectoryId returns the ServiceDirectoryId field value if set, zero value otherwise. +func (o *Event) GetServiceDirectoryId() int32 { + if o == nil || isNil(o.ServiceDirectoryId) { + var ret int32 + return ret + } + return *o.ServiceDirectoryId +} + +// GetServiceDirectoryIdOk returns a tuple with the ServiceDirectoryId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Event) GetServiceDirectoryIdOk() (*int32, bool) { + if o == nil || isNil(o.ServiceDirectoryId) { + return nil, false + } + return o.ServiceDirectoryId, true +} + +// HasServiceDirectoryId returns a boolean if a field has been set. +func (o *Event) HasServiceDirectoryId() bool { + if o != nil && !isNil(o.ServiceDirectoryId) { + return true + } + + return false +} + +// SetServiceDirectoryId gets a reference to the given int32 and assigns it to the ServiceDirectoryId field. +func (o *Event) SetServiceDirectoryId(v int32) { + o.ServiceDirectoryId = &v +} + +// GetSolved returns the Solved field value if set, zero value otherwise. +func (o *Event) GetSolved() bool { + if o == nil || isNil(o.Solved) { + var ret bool + return ret + } + return *o.Solved +} + +// GetSolvedOk returns a tuple with the Solved field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Event) GetSolvedOk() (*bool, bool) { + if o == nil || isNil(o.Solved) { + return nil, false + } + return o.Solved, true +} + +// HasSolved returns a boolean if a field has been set. +func (o *Event) HasSolved() bool { + if o != nil && !isNil(o.Solved) { + return true + } + + return false +} + +// SetSolved gets a reference to the given bool and assigns it to the Solved field. +func (o *Event) SetSolved(v bool) { + o.Solved = &v +} + +// GetTrustedIdpId returns the TrustedIdpId field value if set, zero value otherwise. +func (o *Event) GetTrustedIdpId() int32 { + if o == nil || isNil(o.TrustedIdpId) { + var ret int32 + return ret + } + return *o.TrustedIdpId +} + +// GetTrustedIdpIdOk returns a tuple with the TrustedIdpId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Event) GetTrustedIdpIdOk() (*int32, bool) { + if o == nil || isNil(o.TrustedIdpId) { + return nil, false + } + return o.TrustedIdpId, true +} + +// HasTrustedIdpId returns a boolean if a field has been set. +func (o *Event) HasTrustedIdpId() bool { + if o != nil && !isNil(o.TrustedIdpId) { + return true + } + + return false +} + +// SetTrustedIdpId gets a reference to the given int32 and assigns it to the TrustedIdpId field. +func (o *Event) SetTrustedIdpId(v int32) { + o.TrustedIdpId = &v +} + +// GetUserFieldId returns the UserFieldId field value if set, zero value otherwise. +func (o *Event) GetUserFieldId() int32 { + if o == nil || isNil(o.UserFieldId) { + var ret int32 + return ret + } + return *o.UserFieldId +} + +// GetUserFieldIdOk returns a tuple with the UserFieldId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Event) GetUserFieldIdOk() (*int32, bool) { + if o == nil || isNil(o.UserFieldId) { + return nil, false + } + return o.UserFieldId, true +} + +// HasUserFieldId returns a boolean if a field has been set. +func (o *Event) HasUserFieldId() bool { + if o != nil && !isNil(o.UserFieldId) { + return true + } + + return false +} + +// SetUserFieldId gets a reference to the given int32 and assigns it to the UserFieldId field. +func (o *Event) SetUserFieldId(v int32) { + o.UserFieldId = &v +} + +// GetUserId returns the UserId field value if set, zero value otherwise. +func (o *Event) GetUserId() int32 { + if o == nil || isNil(o.UserId) { + var ret int32 + return ret + } + return *o.UserId +} + +// GetUserIdOk returns a tuple with the UserId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Event) GetUserIdOk() (*int32, bool) { + if o == nil || isNil(o.UserId) { + return nil, false + } + return o.UserId, true +} + +// HasUserId returns a boolean if a field has been set. +func (o *Event) HasUserId() bool { + if o != nil && !isNil(o.UserId) { + return true + } + + return false +} + +// SetUserId gets a reference to the given int32 and assigns it to the UserId field. +func (o *Event) SetUserId(v int32) { + o.UserId = &v +} + +// GetUserName returns the UserName field value if set, zero value otherwise. +func (o *Event) GetUserName() string { + if o == nil || isNil(o.UserName) { + var ret string + return ret + } + return *o.UserName +} + +// 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 *Event) GetUserNameOk() (*string, bool) { + if o == nil || isNil(o.UserName) { + return nil, false + } + return o.UserName, true +} + +// HasUserName returns a boolean if a field has been set. +func (o *Event) HasUserName() bool { + if o != nil && !isNil(o.UserName) { + return true + } + + return false +} + +// SetUserName gets a reference to the given string and assigns it to the UserName field. +func (o *Event) SetUserName(v string) { + o.UserName = &v +} + +func (o Event) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Event) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.AccountId) { + toSerialize["account_id"] = o.AccountId + } + if !isNil(o.ActorSystem) { + toSerialize["actor_system"] = o.ActorSystem + } + if !isNil(o.ActorUserId) { + toSerialize["actor_user_id"] = o.ActorUserId + } + if !isNil(o.ActorUserName) { + toSerialize["actor_user_name"] = o.ActorUserName + } + if !isNil(o.AdcId) { + toSerialize["adc_id"] = o.AdcId + } + if !isNil(o.AppName) { + toSerialize["app-name"] = o.AppName + } + if !isNil(o.AppId) { + toSerialize["app_id"] = o.AppId + } + if !isNil(o.AssumedBySuperadminOrReseller) { + toSerialize["assumed_by_superadmin_or_reseller"] = o.AssumedBySuperadminOrReseller + } + if !isNil(o.AssumingActingUserId) { + toSerialize["assuming_acting_user_id"] = o.AssumingActingUserId + } + if !isNil(o.CertificateId) { + toSerialize["certificate_id"] = o.CertificateId + } + if !isNil(o.ClientId) { + toSerialize["client_id"] = o.ClientId + } + if !isNil(o.CreatedAt) { + toSerialize["created_at"] = o.CreatedAt + } + if !isNil(o.CustomMessage) { + toSerialize["custom_message"] = o.CustomMessage + } + if !isNil(o.DirectorySyncRunId) { + toSerialize["directory_sync_run_id"] = o.DirectorySyncRunId + } + if !isNil(o.ErrorDescription) { + toSerialize["error_description"] = o.ErrorDescription + } + if !isNil(o.EventTypeId) { + toSerialize["event_type_id"] = o.EventTypeId + } + if !isNil(o.GroupName) { + toSerialize["group-name"] = o.GroupName + } + if !isNil(o.GroupId) { + toSerialize["group_id"] = o.GroupId + } + if !isNil(o.Id) { + toSerialize["id"] = o.Id + } + if !isNil(o.Ipaddr) { + toSerialize["ipaddr"] = o.Ipaddr + } + if !isNil(o.MappingId) { + toSerialize["mapping_id"] = o.MappingId + } + if !isNil(o.Notes) { + toSerialize["notes"] = o.Notes + } + if !isNil(o.ObjectId) { + toSerialize["object_id"] = o.ObjectId + } + if !isNil(o.OtpDeviceId) { + toSerialize["otp_device_id"] = o.OtpDeviceId + } + if !isNil(o.OtpDeviceName) { + toSerialize["otp_device_name"] = o.OtpDeviceName + } + if !isNil(o.Param) { + toSerialize["param"] = o.Param + } + if !isNil(o.PolicyId) { + toSerialize["policy_id"] = o.PolicyId + } + if !isNil(o.PolicyName) { + toSerialize["policy_name"] = o.PolicyName + } + if !isNil(o.PolicyType) { + toSerialize["policy_type"] = o.PolicyType + } + if !isNil(o.PrivilegeId) { + toSerialize["privilege_id"] = o.PrivilegeId + } + if !isNil(o.ProxyIp) { + toSerialize["proxy_ip"] = o.ProxyIp + } + if !isNil(o.RadiusConfigId) { + toSerialize["radius_config_id"] = o.RadiusConfigId + } + if !isNil(o.ResolvedAt) { + toSerialize["resolved_at"] = o.ResolvedAt + } + if !isNil(o.ResourceTypeId) { + toSerialize["resource_type_id"] = o.ResourceTypeId + } + if !isNil(o.RiskCookieId) { + toSerialize["risk_cookie_id"] = o.RiskCookieId + } + if !isNil(o.RiskReasons) { + toSerialize["risk_reasons"] = o.RiskReasons + } + if !isNil(o.RiskScore) { + toSerialize["risk_score"] = o.RiskScore + } + if !isNil(o.RoleId) { + toSerialize["role_id"] = o.RoleId + } + if !isNil(o.RoleName) { + toSerialize["role_name"] = o.RoleName + } + if !isNil(o.ServiceDirectoryId) { + toSerialize["service_directory_id"] = o.ServiceDirectoryId + } + if !isNil(o.Solved) { + toSerialize["solved"] = o.Solved + } + if !isNil(o.TrustedIdpId) { + toSerialize["trusted_idp_id"] = o.TrustedIdpId + } + if !isNil(o.UserFieldId) { + toSerialize["user_field_id"] = o.UserFieldId + } + if !isNil(o.UserId) { + toSerialize["user_id"] = o.UserId + } + if !isNil(o.UserName) { + toSerialize["user_name"] = o.UserName + } + return toSerialize, nil +} + +type NullableEvent struct { + value *Event + isSet bool +} + +func (v NullableEvent) Get() *Event { + return v.value +} + +func (v *NullableEvent) Set(val *Event) { + v.value = val + v.isSet = true +} + +func (v NullableEvent) IsSet() bool { + return v.isSet +} + +func (v *NullableEvent) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEvent(val *Event) *NullableEvent { + return &NullableEvent{value: val, isSet: true} +} + +func (v NullableEvent) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEvent) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_factor_inner.go b/model_factor_inner.go deleted file mode 100644 index 62c8c52..0000000 --- a/model_factor_inner.go +++ /dev/null @@ -1,374 +0,0 @@ -/* -OneLogin API - -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -API version: 3.0.0-alpha.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package openapi - -import ( - "encoding/json" -) - -// FactorInner struct for FactorInner -type FactorInner struct { - // MFA device identifier. - Id *string `json:"id,omitempty"` - // accepted : factor has been verified. pending: registered but has not been verified. - Status *string `json:"status,omitempty"` - // True = is user's default MFA device for OneLogin. - Default *bool `json:"default,omitempty"` - // \"Official\" authentication factor name, as it appears to administrators in OneLogin. - AuthFactorName *string `json:"auth_factor_name,omitempty"` - // Authentication factor display name as it appears to users upon initial registration, as defined by admins at Settings > Authentication Factors. - TypeDisplayName *string `json:"type_display_name,omitempty"` - // Authentication factor display name assigned by users when they enroll the device. - UserDisplayName *string `json:"user_display_name,omitempty"` - // A short lived token that is required to Verify the Factor. This token expires based on the expires_in parameter passed in. - ExpiresAt *string `json:"expires_at,omitempty"` - FactorData *FactorInnerFactorData `json:"factor_data,omitempty"` -} - -// NewFactorInner instantiates a new FactorInner 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 NewFactorInner() *FactorInner { - this := FactorInner{} - return &this -} - -// NewFactorInnerWithDefaults instantiates a new FactorInner 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 NewFactorInnerWithDefaults() *FactorInner { - this := FactorInner{} - return &this -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *FactorInner) GetId() string { - if o == nil || o.Id == nil { - var ret string - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *FactorInner) GetIdOk() (*string, bool) { - if o == nil || o.Id == nil { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *FactorInner) HasId() bool { - if o != nil && o.Id != nil { - return true - } - - return false -} - -// SetId gets a reference to the given string and assigns it to the Id field. -func (o *FactorInner) SetId(v string) { - o.Id = &v -} - -// GetStatus returns the Status field value if set, zero value otherwise. -func (o *FactorInner) GetStatus() string { - if o == nil || o.Status == nil { - var ret string - return ret - } - return *o.Status -} - -// GetStatusOk returns a tuple with the Status field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *FactorInner) GetStatusOk() (*string, bool) { - if o == nil || o.Status == nil { - return nil, false - } - return o.Status, true -} - -// HasStatus returns a boolean if a field has been set. -func (o *FactorInner) HasStatus() bool { - if o != nil && o.Status != nil { - return true - } - - return false -} - -// SetStatus gets a reference to the given string and assigns it to the Status field. -func (o *FactorInner) SetStatus(v string) { - o.Status = &v -} - -// GetDefault returns the Default field value if set, zero value otherwise. -func (o *FactorInner) GetDefault() bool { - if o == nil || o.Default == nil { - var ret bool - return ret - } - return *o.Default -} - -// 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 *FactorInner) GetDefaultOk() (*bool, bool) { - if o == nil || o.Default == nil { - return nil, false - } - return o.Default, true -} - -// HasDefault returns a boolean if a field has been set. -func (o *FactorInner) HasDefault() bool { - if o != nil && o.Default != nil { - return true - } - - return false -} - -// SetDefault gets a reference to the given bool and assigns it to the Default field. -func (o *FactorInner) SetDefault(v bool) { - o.Default = &v -} - -// GetAuthFactorName returns the AuthFactorName field value if set, zero value otherwise. -func (o *FactorInner) GetAuthFactorName() string { - if o == nil || o.AuthFactorName == nil { - var ret string - return ret - } - return *o.AuthFactorName -} - -// GetAuthFactorNameOk returns a tuple with the AuthFactorName field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *FactorInner) GetAuthFactorNameOk() (*string, bool) { - if o == nil || o.AuthFactorName == nil { - return nil, false - } - return o.AuthFactorName, true -} - -// HasAuthFactorName returns a boolean if a field has been set. -func (o *FactorInner) HasAuthFactorName() bool { - if o != nil && o.AuthFactorName != nil { - return true - } - - return false -} - -// SetAuthFactorName gets a reference to the given string and assigns it to the AuthFactorName field. -func (o *FactorInner) SetAuthFactorName(v string) { - o.AuthFactorName = &v -} - -// GetTypeDisplayName returns the TypeDisplayName field value if set, zero value otherwise. -func (o *FactorInner) GetTypeDisplayName() string { - if o == nil || o.TypeDisplayName == nil { - var ret string - return ret - } - return *o.TypeDisplayName -} - -// GetTypeDisplayNameOk returns a tuple with the TypeDisplayName field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *FactorInner) GetTypeDisplayNameOk() (*string, bool) { - if o == nil || o.TypeDisplayName == nil { - return nil, false - } - return o.TypeDisplayName, true -} - -// HasTypeDisplayName returns a boolean if a field has been set. -func (o *FactorInner) HasTypeDisplayName() bool { - if o != nil && o.TypeDisplayName != nil { - return true - } - - return false -} - -// SetTypeDisplayName gets a reference to the given string and assigns it to the TypeDisplayName field. -func (o *FactorInner) SetTypeDisplayName(v string) { - o.TypeDisplayName = &v -} - -// GetUserDisplayName returns the UserDisplayName field value if set, zero value otherwise. -func (o *FactorInner) GetUserDisplayName() string { - if o == nil || o.UserDisplayName == nil { - var ret string - return ret - } - return *o.UserDisplayName -} - -// GetUserDisplayNameOk returns a tuple with the UserDisplayName field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *FactorInner) GetUserDisplayNameOk() (*string, bool) { - if o == nil || o.UserDisplayName == nil { - return nil, false - } - return o.UserDisplayName, true -} - -// HasUserDisplayName returns a boolean if a field has been set. -func (o *FactorInner) HasUserDisplayName() bool { - if o != nil && o.UserDisplayName != nil { - return true - } - - return false -} - -// SetUserDisplayName gets a reference to the given string and assigns it to the UserDisplayName field. -func (o *FactorInner) SetUserDisplayName(v string) { - o.UserDisplayName = &v -} - -// GetExpiresAt returns the ExpiresAt field value if set, zero value otherwise. -func (o *FactorInner) GetExpiresAt() string { - if o == nil || o.ExpiresAt == nil { - var ret string - return ret - } - return *o.ExpiresAt -} - -// GetExpiresAtOk returns a tuple with the ExpiresAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *FactorInner) GetExpiresAtOk() (*string, bool) { - if o == nil || o.ExpiresAt == nil { - return nil, false - } - return o.ExpiresAt, true -} - -// HasExpiresAt returns a boolean if a field has been set. -func (o *FactorInner) HasExpiresAt() bool { - if o != nil && o.ExpiresAt != nil { - return true - } - - return false -} - -// SetExpiresAt gets a reference to the given string and assigns it to the ExpiresAt field. -func (o *FactorInner) SetExpiresAt(v string) { - o.ExpiresAt = &v -} - -// GetFactorData returns the FactorData field value if set, zero value otherwise. -func (o *FactorInner) GetFactorData() FactorInnerFactorData { - if o == nil || o.FactorData == nil { - var ret FactorInnerFactorData - return ret - } - return *o.FactorData -} - -// GetFactorDataOk returns a tuple with the FactorData field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *FactorInner) GetFactorDataOk() (*FactorInnerFactorData, bool) { - if o == nil || o.FactorData == nil { - return nil, false - } - return o.FactorData, true -} - -// HasFactorData returns a boolean if a field has been set. -func (o *FactorInner) HasFactorData() bool { - if o != nil && o.FactorData != nil { - return true - } - - return false -} - -// SetFactorData gets a reference to the given FactorInnerFactorData and assigns it to the FactorData field. -func (o *FactorInner) SetFactorData(v FactorInnerFactorData) { - o.FactorData = &v -} - -func (o FactorInner) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Status != nil { - toSerialize["status"] = o.Status - } - if o.Default != nil { - toSerialize["default"] = o.Default - } - if o.AuthFactorName != nil { - toSerialize["auth_factor_name"] = o.AuthFactorName - } - if o.TypeDisplayName != nil { - toSerialize["type_display_name"] = o.TypeDisplayName - } - if o.UserDisplayName != nil { - toSerialize["user_display_name"] = o.UserDisplayName - } - if o.ExpiresAt != nil { - toSerialize["expires_at"] = o.ExpiresAt - } - if o.FactorData != nil { - toSerialize["factor_data"] = o.FactorData - } - return json.Marshal(toSerialize) -} - -type NullableFactorInner struct { - value *FactorInner - isSet bool -} - -func (v NullableFactorInner) Get() *FactorInner { - return v.value -} - -func (v *NullableFactorInner) Set(val *FactorInner) { - v.value = val - v.isSet = true -} - -func (v NullableFactorInner) IsSet() bool { - return v.isSet -} - -func (v *NullableFactorInner) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFactorInner(val *FactorInner) *NullableFactorInner { - return &NullableFactorInner{value: val, isSet: true} -} - -func (v NullableFactorInner) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFactorInner) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_factor_inner_factor_data.go b/model_factor_inner_factor_data.go deleted file mode 100644 index 30f2441..0000000 --- a/model_factor_inner_factor_data.go +++ /dev/null @@ -1,153 +0,0 @@ -/* -OneLogin API - -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -API version: 3.0.0-alpha.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package openapi - -import ( - "encoding/json" -) - -// FactorInnerFactorData Array of factor specific properties. For example, the token or totp code for OneLogin Protect. -type FactorInnerFactorData struct { - // The token which can be used to verify the factor registration. - VerificationToken *string `json:"verification_token,omitempty"` - // OTP Url that can be leveraged for any authenticator that supports the key uri format. - TotpUrl *string `json:"totp_url,omitempty"` -} - -// NewFactorInnerFactorData instantiates a new FactorInnerFactorData 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 NewFactorInnerFactorData() *FactorInnerFactorData { - this := FactorInnerFactorData{} - return &this -} - -// NewFactorInnerFactorDataWithDefaults instantiates a new FactorInnerFactorData 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 NewFactorInnerFactorDataWithDefaults() *FactorInnerFactorData { - this := FactorInnerFactorData{} - return &this -} - -// GetVerificationToken returns the VerificationToken field value if set, zero value otherwise. -func (o *FactorInnerFactorData) GetVerificationToken() string { - if o == nil || o.VerificationToken == nil { - var ret string - return ret - } - return *o.VerificationToken -} - -// GetVerificationTokenOk returns a tuple with the VerificationToken field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *FactorInnerFactorData) GetVerificationTokenOk() (*string, bool) { - if o == nil || o.VerificationToken == nil { - return nil, false - } - return o.VerificationToken, true -} - -// HasVerificationToken returns a boolean if a field has been set. -func (o *FactorInnerFactorData) HasVerificationToken() bool { - if o != nil && o.VerificationToken != nil { - return true - } - - return false -} - -// SetVerificationToken gets a reference to the given string and assigns it to the VerificationToken field. -func (o *FactorInnerFactorData) SetVerificationToken(v string) { - o.VerificationToken = &v -} - -// GetTotpUrl returns the TotpUrl field value if set, zero value otherwise. -func (o *FactorInnerFactorData) GetTotpUrl() string { - if o == nil || o.TotpUrl == nil { - var ret string - return ret - } - return *o.TotpUrl -} - -// GetTotpUrlOk returns a tuple with the TotpUrl field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *FactorInnerFactorData) GetTotpUrlOk() (*string, bool) { - if o == nil || o.TotpUrl == nil { - return nil, false - } - return o.TotpUrl, true -} - -// HasTotpUrl returns a boolean if a field has been set. -func (o *FactorInnerFactorData) HasTotpUrl() bool { - if o != nil && o.TotpUrl != nil { - return true - } - - return false -} - -// SetTotpUrl gets a reference to the given string and assigns it to the TotpUrl field. -func (o *FactorInnerFactorData) SetTotpUrl(v string) { - o.TotpUrl = &v -} - -func (o FactorInnerFactorData) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.VerificationToken != nil { - toSerialize["verification_token"] = o.VerificationToken - } - if o.TotpUrl != nil { - toSerialize["totp_url"] = o.TotpUrl - } - return json.Marshal(toSerialize) -} - -type NullableFactorInnerFactorData struct { - value *FactorInnerFactorData - isSet bool -} - -func (v NullableFactorInnerFactorData) Get() *FactorInnerFactorData { - return v.value -} - -func (v *NullableFactorInnerFactorData) Set(val *FactorInnerFactorData) { - v.value = val - v.isSet = true -} - -func (v NullableFactorInnerFactorData) IsSet() bool { - return v.isSet -} - -func (v *NullableFactorInnerFactorData) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFactorInnerFactorData(val *FactorInnerFactorData) *NullableFactorInnerFactorData { - return &NullableFactorInnerFactorData{value: val, isSet: true} -} - -func (v NullableFactorInnerFactorData) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFactorInnerFactorData) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_generate_mf_atoken_200_response.go b/model_generate_mf_atoken_200_response.go new file mode 100644 index 0000000..e7a7eec --- /dev/null +++ b/model_generate_mf_atoken_200_response.go @@ -0,0 +1,201 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the GenerateMFAtoken200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GenerateMFAtoken200Response{} + +// GenerateMFAtoken200Response struct for GenerateMFAtoken200Response +type GenerateMFAtoken200Response struct { + // Token can function as a temporary MFA token. It can be used to authenticate for any app when valid. + MfaToken *string `json:"mfa_token,omitempty"` + // true indcates the token can be used multiple times, until it expires. false indicates the token is invalid after a single use or once it expires. Defaults to false. + Resuable *bool `json:"resuable,omitempty"` + // Defines the expiration time and date for the token. Format is UTC time. + ExpiresAt *string `json:"expires_at,omitempty"` +} + +// NewGenerateMFAtoken200Response instantiates a new GenerateMFAtoken200Response 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 NewGenerateMFAtoken200Response() *GenerateMFAtoken200Response { + this := GenerateMFAtoken200Response{} + return &this +} + +// NewGenerateMFAtoken200ResponseWithDefaults instantiates a new GenerateMFAtoken200Response 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 NewGenerateMFAtoken200ResponseWithDefaults() *GenerateMFAtoken200Response { + this := GenerateMFAtoken200Response{} + return &this +} + +// GetMfaToken returns the MfaToken field value if set, zero value otherwise. +func (o *GenerateMFAtoken200Response) GetMfaToken() string { + if o == nil || isNil(o.MfaToken) { + var ret string + return ret + } + return *o.MfaToken +} + +// GetMfaTokenOk returns a tuple with the MfaToken field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GenerateMFAtoken200Response) GetMfaTokenOk() (*string, bool) { + if o == nil || isNil(o.MfaToken) { + return nil, false + } + return o.MfaToken, true +} + +// HasMfaToken returns a boolean if a field has been set. +func (o *GenerateMFAtoken200Response) HasMfaToken() bool { + if o != nil && !isNil(o.MfaToken) { + return true + } + + return false +} + +// SetMfaToken gets a reference to the given string and assigns it to the MfaToken field. +func (o *GenerateMFAtoken200Response) SetMfaToken(v string) { + o.MfaToken = &v +} + +// GetResuable returns the Resuable field value if set, zero value otherwise. +func (o *GenerateMFAtoken200Response) GetResuable() bool { + if o == nil || isNil(o.Resuable) { + var ret bool + return ret + } + return *o.Resuable +} + +// GetResuableOk returns a tuple with the Resuable field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GenerateMFAtoken200Response) GetResuableOk() (*bool, bool) { + if o == nil || isNil(o.Resuable) { + return nil, false + } + return o.Resuable, true +} + +// HasResuable returns a boolean if a field has been set. +func (o *GenerateMFAtoken200Response) HasResuable() bool { + if o != nil && !isNil(o.Resuable) { + return true + } + + return false +} + +// SetResuable gets a reference to the given bool and assigns it to the Resuable field. +func (o *GenerateMFAtoken200Response) SetResuable(v bool) { + o.Resuable = &v +} + +// GetExpiresAt returns the ExpiresAt field value if set, zero value otherwise. +func (o *GenerateMFAtoken200Response) GetExpiresAt() string { + if o == nil || isNil(o.ExpiresAt) { + var ret string + return ret + } + return *o.ExpiresAt +} + +// GetExpiresAtOk returns a tuple with the ExpiresAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GenerateMFAtoken200Response) GetExpiresAtOk() (*string, bool) { + if o == nil || isNil(o.ExpiresAt) { + return nil, false + } + return o.ExpiresAt, true +} + +// HasExpiresAt returns a boolean if a field has been set. +func (o *GenerateMFAtoken200Response) HasExpiresAt() bool { + if o != nil && !isNil(o.ExpiresAt) { + return true + } + + return false +} + +// SetExpiresAt gets a reference to the given string and assigns it to the ExpiresAt field. +func (o *GenerateMFAtoken200Response) SetExpiresAt(v string) { + o.ExpiresAt = &v +} + +func (o GenerateMFAtoken200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GenerateMFAtoken200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.MfaToken) { + toSerialize["mfa_token"] = o.MfaToken + } + if !isNil(o.Resuable) { + toSerialize["resuable"] = o.Resuable + } + if !isNil(o.ExpiresAt) { + toSerialize["expires_at"] = o.ExpiresAt + } + return toSerialize, nil +} + +type NullableGenerateMFAtoken200Response struct { + value *GenerateMFAtoken200Response + isSet bool +} + +func (v NullableGenerateMFAtoken200Response) Get() *GenerateMFAtoken200Response { + return v.value +} + +func (v *NullableGenerateMFAtoken200Response) Set(val *GenerateMFAtoken200Response) { + v.value = val + v.isSet = true +} + +func (v NullableGenerateMFAtoken200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableGenerateMFAtoken200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGenerateMFAtoken200Response(val *GenerateMFAtoken200Response) *NullableGenerateMFAtoken200Response { + return &NullableGenerateMFAtoken200Response{value: val, isSet: true} +} + +func (v NullableGenerateMFAtoken200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGenerateMFAtoken200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_generate_mf_atoken_request.go b/model_generate_mf_atoken_request.go new file mode 100644 index 0000000..7bf2ea1 --- /dev/null +++ b/model_generate_mf_atoken_request.go @@ -0,0 +1,168 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the GenerateMFAtokenRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GenerateMFAtokenRequest{} + +// GenerateMFAtokenRequest struct for GenerateMFAtokenRequest +type GenerateMFAtokenRequest struct { + // Set the duration of the token in seconds. Token expiration defaults to 259200 seconds = 72 hours. 72 hours is the max value. + ExpiresIn *int32 `json:"expires_in,omitempty"` + // Defines if the token is reusable multiple times within the expiry window. Value defaults to false. If set to true, token can be used multiple times, until it expires. + Reusable *bool `json:"reusable,omitempty"` +} + +// NewGenerateMFAtokenRequest instantiates a new GenerateMFAtokenRequest 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 NewGenerateMFAtokenRequest() *GenerateMFAtokenRequest { + this := GenerateMFAtokenRequest{} + var reusable bool = false + this.Reusable = &reusable + return &this +} + +// NewGenerateMFAtokenRequestWithDefaults instantiates a new GenerateMFAtokenRequest 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 NewGenerateMFAtokenRequestWithDefaults() *GenerateMFAtokenRequest { + this := GenerateMFAtokenRequest{} + var reusable bool = false + this.Reusable = &reusable + return &this +} + +// GetExpiresIn returns the ExpiresIn field value if set, zero value otherwise. +func (o *GenerateMFAtokenRequest) GetExpiresIn() int32 { + if o == nil || isNil(o.ExpiresIn) { + var ret int32 + return ret + } + return *o.ExpiresIn +} + +// GetExpiresInOk returns a tuple with the ExpiresIn field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GenerateMFAtokenRequest) GetExpiresInOk() (*int32, bool) { + if o == nil || isNil(o.ExpiresIn) { + return nil, false + } + return o.ExpiresIn, true +} + +// HasExpiresIn returns a boolean if a field has been set. +func (o *GenerateMFAtokenRequest) HasExpiresIn() bool { + if o != nil && !isNil(o.ExpiresIn) { + return true + } + + return false +} + +// SetExpiresIn gets a reference to the given int32 and assigns it to the ExpiresIn field. +func (o *GenerateMFAtokenRequest) SetExpiresIn(v int32) { + o.ExpiresIn = &v +} + +// GetReusable returns the Reusable field value if set, zero value otherwise. +func (o *GenerateMFAtokenRequest) GetReusable() bool { + if o == nil || isNil(o.Reusable) { + var ret bool + return ret + } + return *o.Reusable +} + +// GetReusableOk returns a tuple with the Reusable field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GenerateMFAtokenRequest) GetReusableOk() (*bool, bool) { + if o == nil || isNil(o.Reusable) { + return nil, false + } + return o.Reusable, true +} + +// HasReusable returns a boolean if a field has been set. +func (o *GenerateMFAtokenRequest) HasReusable() bool { + if o != nil && !isNil(o.Reusable) { + return true + } + + return false +} + +// SetReusable gets a reference to the given bool and assigns it to the Reusable field. +func (o *GenerateMFAtokenRequest) SetReusable(v bool) { + o.Reusable = &v +} + +func (o GenerateMFAtokenRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GenerateMFAtokenRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.ExpiresIn) { + toSerialize["expires_in"] = o.ExpiresIn + } + if !isNil(o.Reusable) { + toSerialize["reusable"] = o.Reusable + } + return toSerialize, nil +} + +type NullableGenerateMFAtokenRequest struct { + value *GenerateMFAtokenRequest + isSet bool +} + +func (v NullableGenerateMFAtokenRequest) Get() *GenerateMFAtokenRequest { + return v.value +} + +func (v *NullableGenerateMFAtokenRequest) Set(val *GenerateMFAtokenRequest) { + v.value = val + v.isSet = true +} + +func (v NullableGenerateMFAtokenRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableGenerateMFAtokenRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGenerateMFAtokenRequest(val *GenerateMFAtokenRequest) *NullableGenerateMFAtokenRequest { + return &NullableGenerateMFAtokenRequest{value: val, isSet: true} +} + +func (v NullableGenerateMFAtokenRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGenerateMFAtokenRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_generate_mfa_token_422_response.go b/model_generate_mfa_token_422_response.go deleted file mode 100644 index 7eb7332..0000000 --- a/model_generate_mfa_token_422_response.go +++ /dev/null @@ -1,223 +0,0 @@ -/* -OneLogin API - -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -API version: 3.0.0-alpha.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package openapi - -import ( - "encoding/json" -) - -// GenerateMfaToken422Response struct for GenerateMfaToken422Response -type GenerateMfaToken422Response struct { - StatusCode *int32 `json:"statusCode,omitempty"` - Name *string `json:"name,omitempty"` - Message *string `json:"message,omitempty"` - Details *GenerateMfaToken422ResponseDetails `json:"details,omitempty"` -} - -// NewGenerateMfaToken422Response instantiates a new GenerateMfaToken422Response 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 NewGenerateMfaToken422Response() *GenerateMfaToken422Response { - this := GenerateMfaToken422Response{} - return &this -} - -// NewGenerateMfaToken422ResponseWithDefaults instantiates a new GenerateMfaToken422Response 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 NewGenerateMfaToken422ResponseWithDefaults() *GenerateMfaToken422Response { - this := GenerateMfaToken422Response{} - return &this -} - -// GetStatusCode returns the StatusCode field value if set, zero value otherwise. -func (o *GenerateMfaToken422Response) GetStatusCode() int32 { - if o == nil || o.StatusCode == nil { - var ret int32 - return ret - } - return *o.StatusCode -} - -// GetStatusCodeOk returns a tuple with the StatusCode field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GenerateMfaToken422Response) GetStatusCodeOk() (*int32, bool) { - if o == nil || o.StatusCode == nil { - return nil, false - } - return o.StatusCode, true -} - -// HasStatusCode returns a boolean if a field has been set. -func (o *GenerateMfaToken422Response) HasStatusCode() bool { - if o != nil && o.StatusCode != nil { - return true - } - - return false -} - -// SetStatusCode gets a reference to the given int32 and assigns it to the StatusCode field. -func (o *GenerateMfaToken422Response) SetStatusCode(v int32) { - o.StatusCode = &v -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *GenerateMfaToken422Response) GetName() string { - if o == nil || o.Name == nil { - var ret string - return ret - } - return *o.Name -} - -// 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 *GenerateMfaToken422Response) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *GenerateMfaToken422Response) HasName() bool { - if o != nil && o.Name != nil { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *GenerateMfaToken422Response) SetName(v string) { - o.Name = &v -} - -// GetMessage returns the Message field value if set, zero value otherwise. -func (o *GenerateMfaToken422Response) GetMessage() string { - if o == nil || o.Message == nil { - var ret string - return ret - } - return *o.Message -} - -// GetMessageOk returns a tuple with the Message field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GenerateMfaToken422Response) GetMessageOk() (*string, bool) { - if o == nil || o.Message == nil { - return nil, false - } - return o.Message, true -} - -// HasMessage returns a boolean if a field has been set. -func (o *GenerateMfaToken422Response) HasMessage() bool { - if o != nil && o.Message != nil { - return true - } - - return false -} - -// SetMessage gets a reference to the given string and assigns it to the Message field. -func (o *GenerateMfaToken422Response) SetMessage(v string) { - o.Message = &v -} - -// GetDetails returns the Details field value if set, zero value otherwise. -func (o *GenerateMfaToken422Response) GetDetails() GenerateMfaToken422ResponseDetails { - if o == nil || o.Details == nil { - var ret GenerateMfaToken422ResponseDetails - return ret - } - return *o.Details -} - -// GetDetailsOk returns a tuple with the Details field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GenerateMfaToken422Response) GetDetailsOk() (*GenerateMfaToken422ResponseDetails, bool) { - if o == nil || o.Details == nil { - return nil, false - } - return o.Details, true -} - -// HasDetails returns a boolean if a field has been set. -func (o *GenerateMfaToken422Response) HasDetails() bool { - if o != nil && o.Details != nil { - return true - } - - return false -} - -// SetDetails gets a reference to the given GenerateMfaToken422ResponseDetails and assigns it to the Details field. -func (o *GenerateMfaToken422Response) SetDetails(v GenerateMfaToken422ResponseDetails) { - o.Details = &v -} - -func (o GenerateMfaToken422Response) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.StatusCode != nil { - toSerialize["statusCode"] = o.StatusCode - } - if o.Name != nil { - toSerialize["name"] = o.Name - } - if o.Message != nil { - toSerialize["message"] = o.Message - } - if o.Details != nil { - toSerialize["details"] = o.Details - } - return json.Marshal(toSerialize) -} - -type NullableGenerateMfaToken422Response struct { - value *GenerateMfaToken422Response - isSet bool -} - -func (v NullableGenerateMfaToken422Response) Get() *GenerateMfaToken422Response { - return v.value -} - -func (v *NullableGenerateMfaToken422Response) Set(val *GenerateMfaToken422Response) { - v.value = val - v.isSet = true -} - -func (v NullableGenerateMfaToken422Response) IsSet() bool { - return v.isSet -} - -func (v *NullableGenerateMfaToken422Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGenerateMfaToken422Response(val *GenerateMfaToken422Response) *NullableGenerateMfaToken422Response { - return &NullableGenerateMfaToken422Response{value: val, isSet: true} -} - -func (v NullableGenerateMfaToken422Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGenerateMfaToken422Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_generate_mfa_token_422_response_details.go b/model_generate_mfa_token_422_response_details.go deleted file mode 100644 index 5130e2b..0000000 --- a/model_generate_mfa_token_422_response_details.go +++ /dev/null @@ -1,115 +0,0 @@ -/* -OneLogin API - -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -API version: 3.0.0-alpha.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package openapi - -import ( - "encoding/json" -) - -// GenerateMfaToken422ResponseDetails struct for GenerateMfaToken422ResponseDetails -type GenerateMfaToken422ResponseDetails struct { - Parameters []string `json:"parameters,omitempty"` -} - -// NewGenerateMfaToken422ResponseDetails instantiates a new GenerateMfaToken422ResponseDetails 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 NewGenerateMfaToken422ResponseDetails() *GenerateMfaToken422ResponseDetails { - this := GenerateMfaToken422ResponseDetails{} - return &this -} - -// NewGenerateMfaToken422ResponseDetailsWithDefaults instantiates a new GenerateMfaToken422ResponseDetails 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 NewGenerateMfaToken422ResponseDetailsWithDefaults() *GenerateMfaToken422ResponseDetails { - this := GenerateMfaToken422ResponseDetails{} - return &this -} - -// GetParameters returns the Parameters field value if set, zero value otherwise. -func (o *GenerateMfaToken422ResponseDetails) GetParameters() []string { - if o == nil || o.Parameters == nil { - var ret []string - return ret - } - return o.Parameters -} - -// GetParametersOk returns a tuple with the Parameters field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GenerateMfaToken422ResponseDetails) GetParametersOk() ([]string, bool) { - if o == nil || o.Parameters == nil { - return nil, false - } - return o.Parameters, true -} - -// HasParameters returns a boolean if a field has been set. -func (o *GenerateMfaToken422ResponseDetails) HasParameters() bool { - if o != nil && o.Parameters != nil { - return true - } - - return false -} - -// SetParameters gets a reference to the given []string and assigns it to the Parameters field. -func (o *GenerateMfaToken422ResponseDetails) SetParameters(v []string) { - o.Parameters = v -} - -func (o GenerateMfaToken422ResponseDetails) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Parameters != nil { - toSerialize["parameters"] = o.Parameters - } - return json.Marshal(toSerialize) -} - -type NullableGenerateMfaToken422ResponseDetails struct { - value *GenerateMfaToken422ResponseDetails - isSet bool -} - -func (v NullableGenerateMfaToken422ResponseDetails) Get() *GenerateMfaToken422ResponseDetails { - return v.value -} - -func (v *NullableGenerateMfaToken422ResponseDetails) Set(val *GenerateMfaToken422ResponseDetails) { - v.value = val - v.isSet = true -} - -func (v NullableGenerateMfaToken422ResponseDetails) IsSet() bool { - return v.isSet -} - -func (v *NullableGenerateMfaToken422ResponseDetails) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGenerateMfaToken422ResponseDetails(val *GenerateMfaToken422ResponseDetails) *NullableGenerateMfaToken422ResponseDetails { - return &NullableGenerateMfaToken422ResponseDetails{value: val, isSet: true} -} - -func (v NullableGenerateMfaToken422ResponseDetails) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGenerateMfaToken422ResponseDetails) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_generate_mfa_token_request.go b/model_generate_mfa_token_request.go deleted file mode 100644 index 4d3a698..0000000 --- a/model_generate_mfa_token_request.go +++ /dev/null @@ -1,153 +0,0 @@ -/* -OneLogin API - -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -API version: 3.0.0-alpha.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package openapi - -import ( - "encoding/json" -) - -// GenerateMfaTokenRequest struct for GenerateMfaTokenRequest -type GenerateMfaTokenRequest struct { - // Set the duration of the token in seconds. - ExpiresIn *string `json:"expires_in,omitempty"` - // Defines if the token is reusable multiple times within the expiry window. - Reusable *bool `json:"reusable,omitempty"` -} - -// NewGenerateMfaTokenRequest instantiates a new GenerateMfaTokenRequest 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 NewGenerateMfaTokenRequest() *GenerateMfaTokenRequest { - this := GenerateMfaTokenRequest{} - return &this -} - -// NewGenerateMfaTokenRequestWithDefaults instantiates a new GenerateMfaTokenRequest 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 NewGenerateMfaTokenRequestWithDefaults() *GenerateMfaTokenRequest { - this := GenerateMfaTokenRequest{} - return &this -} - -// GetExpiresIn returns the ExpiresIn field value if set, zero value otherwise. -func (o *GenerateMfaTokenRequest) GetExpiresIn() string { - if o == nil || o.ExpiresIn == nil { - var ret string - return ret - } - return *o.ExpiresIn -} - -// GetExpiresInOk returns a tuple with the ExpiresIn field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GenerateMfaTokenRequest) GetExpiresInOk() (*string, bool) { - if o == nil || o.ExpiresIn == nil { - return nil, false - } - return o.ExpiresIn, true -} - -// HasExpiresIn returns a boolean if a field has been set. -func (o *GenerateMfaTokenRequest) HasExpiresIn() bool { - if o != nil && o.ExpiresIn != nil { - return true - } - - return false -} - -// SetExpiresIn gets a reference to the given string and assigns it to the ExpiresIn field. -func (o *GenerateMfaTokenRequest) SetExpiresIn(v string) { - o.ExpiresIn = &v -} - -// GetReusable returns the Reusable field value if set, zero value otherwise. -func (o *GenerateMfaTokenRequest) GetReusable() bool { - if o == nil || o.Reusable == nil { - var ret bool - return ret - } - return *o.Reusable -} - -// GetReusableOk returns a tuple with the Reusable field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GenerateMfaTokenRequest) GetReusableOk() (*bool, bool) { - if o == nil || o.Reusable == nil { - return nil, false - } - return o.Reusable, true -} - -// HasReusable returns a boolean if a field has been set. -func (o *GenerateMfaTokenRequest) HasReusable() bool { - if o != nil && o.Reusable != nil { - return true - } - - return false -} - -// SetReusable gets a reference to the given bool and assigns it to the Reusable field. -func (o *GenerateMfaTokenRequest) SetReusable(v bool) { - o.Reusable = &v -} - -func (o GenerateMfaTokenRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.ExpiresIn != nil { - toSerialize["expires_in"] = o.ExpiresIn - } - if o.Reusable != nil { - toSerialize["reusable"] = o.Reusable - } - return json.Marshal(toSerialize) -} - -type NullableGenerateMfaTokenRequest struct { - value *GenerateMfaTokenRequest - isSet bool -} - -func (v NullableGenerateMfaTokenRequest) Get() *GenerateMfaTokenRequest { - return v.value -} - -func (v *NullableGenerateMfaTokenRequest) Set(val *GenerateMfaTokenRequest) { - v.value = val - v.isSet = true -} - -func (v NullableGenerateMfaTokenRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableGenerateMfaTokenRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGenerateMfaTokenRequest(val *GenerateMfaTokenRequest) *NullableGenerateMfaTokenRequest { - return &NullableGenerateMfaTokenRequest{value: val, isSet: true} -} - -func (v NullableGenerateMfaTokenRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGenerateMfaTokenRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_generate_mfa_token_200_response.go b/model_generate_otp_201_response.go similarity index 50% rename from model_generate_mfa_token_200_response.go rename to model_generate_otp_201_response.go index fb7be4a..ea0873b 100644 --- a/model_generate_mfa_token_200_response.go +++ b/model_generate_otp_201_response.go @@ -1,51 +1,58 @@ /* OneLogin API -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) +OpenAPI Specification for OneLogin -API version: 3.0.0-alpha.1 +API version: 3.1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package openapi +package onelogin import ( "encoding/json" ) -// GenerateMfaToken200Response struct for GenerateMfaToken200Response -type GenerateMfaToken200Response struct { +// checks if the GenerateOTP201Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GenerateOTP201Response{} + +// GenerateOTP201Response struct for GenerateOTP201Response +type GenerateOTP201Response struct { // Token can function as a temporary MFA token. It can be used to authenticate for any app when valid. MfaToken *string `json:"mfa_token,omitempty"` - // true indcates the token can be used multiple times. false indicates the token is invalid after a single use + // true indcates the token can be used multiple times, until it expires. false indicates the token is invalid after a single use or once it expires. Defaults to false. Reusable *bool `json:"reusable,omitempty"` // Defines the expiration time and date for the token. Format is UTC time. ExpiresAt *string `json:"expires_at,omitempty"` - // Defines the expiration time and date for the token. Format is UTC time. + // A unique identifier for the temp otp device that has been created for this token. DeviceId *string `json:"device_id,omitempty"` } -// NewGenerateMfaToken200Response instantiates a new GenerateMfaToken200Response object +// NewGenerateOTP201Response instantiates a new GenerateOTP201Response 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 NewGenerateMfaToken200Response() *GenerateMfaToken200Response { - this := GenerateMfaToken200Response{} +func NewGenerateOTP201Response() *GenerateOTP201Response { + this := GenerateOTP201Response{} + var reusable bool = false + this.Reusable = &reusable return &this } -// NewGenerateMfaToken200ResponseWithDefaults instantiates a new GenerateMfaToken200Response object +// NewGenerateOTP201ResponseWithDefaults instantiates a new GenerateOTP201Response 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 NewGenerateMfaToken200ResponseWithDefaults() *GenerateMfaToken200Response { - this := GenerateMfaToken200Response{} +func NewGenerateOTP201ResponseWithDefaults() *GenerateOTP201Response { + this := GenerateOTP201Response{} + var reusable bool = false + this.Reusable = &reusable return &this } // GetMfaToken returns the MfaToken field value if set, zero value otherwise. -func (o *GenerateMfaToken200Response) GetMfaToken() string { - if o == nil || o.MfaToken == nil { +func (o *GenerateOTP201Response) GetMfaToken() string { + if o == nil || isNil(o.MfaToken) { var ret string return ret } @@ -54,16 +61,16 @@ func (o *GenerateMfaToken200Response) GetMfaToken() string { // GetMfaTokenOk returns a tuple with the MfaToken field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *GenerateMfaToken200Response) GetMfaTokenOk() (*string, bool) { - if o == nil || o.MfaToken == nil { +func (o *GenerateOTP201Response) GetMfaTokenOk() (*string, bool) { + if o == nil || isNil(o.MfaToken) { return nil, false } return o.MfaToken, true } // HasMfaToken returns a boolean if a field has been set. -func (o *GenerateMfaToken200Response) HasMfaToken() bool { - if o != nil && o.MfaToken != nil { +func (o *GenerateOTP201Response) HasMfaToken() bool { + if o != nil && !isNil(o.MfaToken) { return true } @@ -71,13 +78,13 @@ func (o *GenerateMfaToken200Response) HasMfaToken() bool { } // SetMfaToken gets a reference to the given string and assigns it to the MfaToken field. -func (o *GenerateMfaToken200Response) SetMfaToken(v string) { +func (o *GenerateOTP201Response) SetMfaToken(v string) { o.MfaToken = &v } // GetReusable returns the Reusable field value if set, zero value otherwise. -func (o *GenerateMfaToken200Response) GetReusable() bool { - if o == nil || o.Reusable == nil { +func (o *GenerateOTP201Response) GetReusable() bool { + if o == nil || isNil(o.Reusable) { var ret bool return ret } @@ -86,16 +93,16 @@ func (o *GenerateMfaToken200Response) GetReusable() bool { // GetReusableOk returns a tuple with the Reusable field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *GenerateMfaToken200Response) GetReusableOk() (*bool, bool) { - if o == nil || o.Reusable == nil { +func (o *GenerateOTP201Response) GetReusableOk() (*bool, bool) { + if o == nil || isNil(o.Reusable) { return nil, false } return o.Reusable, true } // HasReusable returns a boolean if a field has been set. -func (o *GenerateMfaToken200Response) HasReusable() bool { - if o != nil && o.Reusable != nil { +func (o *GenerateOTP201Response) HasReusable() bool { + if o != nil && !isNil(o.Reusable) { return true } @@ -103,13 +110,13 @@ func (o *GenerateMfaToken200Response) HasReusable() bool { } // SetReusable gets a reference to the given bool and assigns it to the Reusable field. -func (o *GenerateMfaToken200Response) SetReusable(v bool) { +func (o *GenerateOTP201Response) SetReusable(v bool) { o.Reusable = &v } // GetExpiresAt returns the ExpiresAt field value if set, zero value otherwise. -func (o *GenerateMfaToken200Response) GetExpiresAt() string { - if o == nil || o.ExpiresAt == nil { +func (o *GenerateOTP201Response) GetExpiresAt() string { + if o == nil || isNil(o.ExpiresAt) { var ret string return ret } @@ -118,16 +125,16 @@ func (o *GenerateMfaToken200Response) GetExpiresAt() string { // GetExpiresAtOk returns a tuple with the ExpiresAt field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *GenerateMfaToken200Response) GetExpiresAtOk() (*string, bool) { - if o == nil || o.ExpiresAt == nil { +func (o *GenerateOTP201Response) GetExpiresAtOk() (*string, bool) { + if o == nil || isNil(o.ExpiresAt) { return nil, false } return o.ExpiresAt, true } // HasExpiresAt returns a boolean if a field has been set. -func (o *GenerateMfaToken200Response) HasExpiresAt() bool { - if o != nil && o.ExpiresAt != nil { +func (o *GenerateOTP201Response) HasExpiresAt() bool { + if o != nil && !isNil(o.ExpiresAt) { return true } @@ -135,13 +142,13 @@ func (o *GenerateMfaToken200Response) HasExpiresAt() bool { } // SetExpiresAt gets a reference to the given string and assigns it to the ExpiresAt field. -func (o *GenerateMfaToken200Response) SetExpiresAt(v string) { +func (o *GenerateOTP201Response) SetExpiresAt(v string) { o.ExpiresAt = &v } // GetDeviceId returns the DeviceId field value if set, zero value otherwise. -func (o *GenerateMfaToken200Response) GetDeviceId() string { - if o == nil || o.DeviceId == nil { +func (o *GenerateOTP201Response) GetDeviceId() string { + if o == nil || isNil(o.DeviceId) { var ret string return ret } @@ -150,16 +157,16 @@ func (o *GenerateMfaToken200Response) GetDeviceId() string { // GetDeviceIdOk returns a tuple with the DeviceId field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *GenerateMfaToken200Response) GetDeviceIdOk() (*string, bool) { - if o == nil || o.DeviceId == nil { +func (o *GenerateOTP201Response) GetDeviceIdOk() (*string, bool) { + if o == nil || isNil(o.DeviceId) { return nil, false } return o.DeviceId, true } // HasDeviceId returns a boolean if a field has been set. -func (o *GenerateMfaToken200Response) HasDeviceId() bool { - if o != nil && o.DeviceId != nil { +func (o *GenerateOTP201Response) HasDeviceId() bool { + if o != nil && !isNil(o.DeviceId) { return true } @@ -167,59 +174,67 @@ func (o *GenerateMfaToken200Response) HasDeviceId() bool { } // SetDeviceId gets a reference to the given string and assigns it to the DeviceId field. -func (o *GenerateMfaToken200Response) SetDeviceId(v string) { +func (o *GenerateOTP201Response) SetDeviceId(v string) { o.DeviceId = &v } -func (o GenerateMfaToken200Response) MarshalJSON() ([]byte, error) { +func (o GenerateOTP201Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GenerateOTP201Response) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.MfaToken != nil { + if !isNil(o.MfaToken) { toSerialize["mfa_token"] = o.MfaToken } - if o.Reusable != nil { + if !isNil(o.Reusable) { toSerialize["reusable"] = o.Reusable } - if o.ExpiresAt != nil { + if !isNil(o.ExpiresAt) { toSerialize["expires_at"] = o.ExpiresAt } - if o.DeviceId != nil { + if !isNil(o.DeviceId) { toSerialize["device_id"] = o.DeviceId } - return json.Marshal(toSerialize) + return toSerialize, nil } -type NullableGenerateMfaToken200Response struct { - value *GenerateMfaToken200Response +type NullableGenerateOTP201Response struct { + value *GenerateOTP201Response isSet bool } -func (v NullableGenerateMfaToken200Response) Get() *GenerateMfaToken200Response { +func (v NullableGenerateOTP201Response) Get() *GenerateOTP201Response { return v.value } -func (v *NullableGenerateMfaToken200Response) Set(val *GenerateMfaToken200Response) { +func (v *NullableGenerateOTP201Response) Set(val *GenerateOTP201Response) { v.value = val v.isSet = true } -func (v NullableGenerateMfaToken200Response) IsSet() bool { +func (v NullableGenerateOTP201Response) IsSet() bool { return v.isSet } -func (v *NullableGenerateMfaToken200Response) Unset() { +func (v *NullableGenerateOTP201Response) Unset() { v.value = nil v.isSet = false } -func NewNullableGenerateMfaToken200Response(val *GenerateMfaToken200Response) *NullableGenerateMfaToken200Response { - return &NullableGenerateMfaToken200Response{value: val, isSet: true} +func NewNullableGenerateOTP201Response(val *GenerateOTP201Response) *NullableGenerateOTP201Response { + return &NullableGenerateOTP201Response{value: val, isSet: true} } -func (v NullableGenerateMfaToken200Response) MarshalJSON() ([]byte, error) { +func (v NullableGenerateOTP201Response) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } -func (v *NullableGenerateMfaToken200Response) UnmarshalJSON(src []byte) error { +func (v *NullableGenerateOTP201Response) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/model_generate_otp_request.go b/model_generate_otp_request.go new file mode 100644 index 0000000..bdef0a8 --- /dev/null +++ b/model_generate_otp_request.go @@ -0,0 +1,168 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the GenerateOTPRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GenerateOTPRequest{} + +// GenerateOTPRequest struct for GenerateOTPRequest +type GenerateOTPRequest struct { + // Set the duration of the token in seconds. Token expiration defaults to 259200 seconds = 72 hours. 72 hours is the max value. + ExpiresIn *int32 `json:"expires_in,omitempty"` + // Defines if the token is reusable multiple times within the expiry window. Value defaults to false. If set to true, token can be used multiple times, until it expires. + Reusable *bool `json:"reusable,omitempty"` +} + +// NewGenerateOTPRequest instantiates a new GenerateOTPRequest 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 NewGenerateOTPRequest() *GenerateOTPRequest { + this := GenerateOTPRequest{} + var reusable bool = false + this.Reusable = &reusable + return &this +} + +// NewGenerateOTPRequestWithDefaults instantiates a new GenerateOTPRequest 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 NewGenerateOTPRequestWithDefaults() *GenerateOTPRequest { + this := GenerateOTPRequest{} + var reusable bool = false + this.Reusable = &reusable + return &this +} + +// GetExpiresIn returns the ExpiresIn field value if set, zero value otherwise. +func (o *GenerateOTPRequest) GetExpiresIn() int32 { + if o == nil || isNil(o.ExpiresIn) { + var ret int32 + return ret + } + return *o.ExpiresIn +} + +// GetExpiresInOk returns a tuple with the ExpiresIn field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GenerateOTPRequest) GetExpiresInOk() (*int32, bool) { + if o == nil || isNil(o.ExpiresIn) { + return nil, false + } + return o.ExpiresIn, true +} + +// HasExpiresIn returns a boolean if a field has been set. +func (o *GenerateOTPRequest) HasExpiresIn() bool { + if o != nil && !isNil(o.ExpiresIn) { + return true + } + + return false +} + +// SetExpiresIn gets a reference to the given int32 and assigns it to the ExpiresIn field. +func (o *GenerateOTPRequest) SetExpiresIn(v int32) { + o.ExpiresIn = &v +} + +// GetReusable returns the Reusable field value if set, zero value otherwise. +func (o *GenerateOTPRequest) GetReusable() bool { + if o == nil || isNil(o.Reusable) { + var ret bool + return ret + } + return *o.Reusable +} + +// GetReusableOk returns a tuple with the Reusable field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GenerateOTPRequest) GetReusableOk() (*bool, bool) { + if o == nil || isNil(o.Reusable) { + return nil, false + } + return o.Reusable, true +} + +// HasReusable returns a boolean if a field has been set. +func (o *GenerateOTPRequest) HasReusable() bool { + if o != nil && !isNil(o.Reusable) { + return true + } + + return false +} + +// SetReusable gets a reference to the given bool and assigns it to the Reusable field. +func (o *GenerateOTPRequest) SetReusable(v bool) { + o.Reusable = &v +} + +func (o GenerateOTPRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GenerateOTPRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.ExpiresIn) { + toSerialize["expires_in"] = o.ExpiresIn + } + if !isNil(o.Reusable) { + toSerialize["reusable"] = o.Reusable + } + return toSerialize, nil +} + +type NullableGenerateOTPRequest struct { + value *GenerateOTPRequest + isSet bool +} + +func (v NullableGenerateOTPRequest) Get() *GenerateOTPRequest { + return v.value +} + +func (v *NullableGenerateOTPRequest) Set(val *GenerateOTPRequest) { + v.value = val + v.isSet = true +} + +func (v NullableGenerateOTPRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableGenerateOTPRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGenerateOTPRequest(val *GenerateOTPRequest) *NullableGenerateOTPRequest { + return &NullableGenerateOTPRequest{value: val, isSet: true} +} + +func (v NullableGenerateOTPRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGenerateOTPRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_generate_saml_assert_200_response.go b/model_generate_saml_assert_200_response.go new file mode 100644 index 0000000..30930d5 --- /dev/null +++ b/model_generate_saml_assert_200_response.go @@ -0,0 +1,162 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the GenerateSamlAssert200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GenerateSamlAssert200Response{} + +// GenerateSamlAssert200Response struct for GenerateSamlAssert200Response +type GenerateSamlAssert200Response struct { + Status *Error `json:"status,omitempty"` + Data []map[string]interface{} `json:"data,omitempty"` +} + +// NewGenerateSamlAssert200Response instantiates a new GenerateSamlAssert200Response 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 NewGenerateSamlAssert200Response() *GenerateSamlAssert200Response { + this := GenerateSamlAssert200Response{} + return &this +} + +// NewGenerateSamlAssert200ResponseWithDefaults instantiates a new GenerateSamlAssert200Response 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 NewGenerateSamlAssert200ResponseWithDefaults() *GenerateSamlAssert200Response { + this := GenerateSamlAssert200Response{} + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *GenerateSamlAssert200Response) GetStatus() Error { + if o == nil || isNil(o.Status) { + var ret Error + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GenerateSamlAssert200Response) GetStatusOk() (*Error, bool) { + if o == nil || isNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *GenerateSamlAssert200Response) HasStatus() bool { + if o != nil && !isNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given Error and assigns it to the Status field. +func (o *GenerateSamlAssert200Response) SetStatus(v Error) { + o.Status = &v +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *GenerateSamlAssert200Response) GetData() []map[string]interface{} { + if o == nil || isNil(o.Data) { + var ret []map[string]interface{} + return ret + } + return o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GenerateSamlAssert200Response) GetDataOk() ([]map[string]interface{}, bool) { + if o == nil || isNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *GenerateSamlAssert200Response) HasData() bool { + if o != nil && !isNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given []map[string]interface{} and assigns it to the Data field. +func (o *GenerateSamlAssert200Response) SetData(v []map[string]interface{}) { + o.Data = v +} + +func (o GenerateSamlAssert200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GenerateSamlAssert200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.Status) { + toSerialize["status"] = o.Status + } + if !isNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullableGenerateSamlAssert200Response struct { + value *GenerateSamlAssert200Response + isSet bool +} + +func (v NullableGenerateSamlAssert200Response) Get() *GenerateSamlAssert200Response { + return v.value +} + +func (v *NullableGenerateSamlAssert200Response) Set(val *GenerateSamlAssert200Response) { + v.value = val + v.isSet = true +} + +func (v NullableGenerateSamlAssert200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableGenerateSamlAssert200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGenerateSamlAssert200Response(val *GenerateSamlAssert200Response) *NullableGenerateSamlAssert200Response { + return &NullableGenerateSamlAssert200Response{value: val, isSet: true} +} + +func (v NullableGenerateSamlAssert200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGenerateSamlAssert200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_generate_token_200_response.go b/model_generate_token_200_response.go deleted file mode 100644 index 908f827..0000000 --- a/model_generate_token_200_response.go +++ /dev/null @@ -1,295 +0,0 @@ -/* -OneLogin API - -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -API version: 3.0.0-alpha.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package openapi - -import ( - "encoding/json" -) - -// GenerateToken200Response struct for GenerateToken200Response -type GenerateToken200Response struct { - AccessToken *string `json:"access_token,omitempty"` - CreatedAt *string `json:"created_at,omitempty"` - ExpiresIn *int32 `json:"expires_in,omitempty"` - RefreshToken *string `json:"refresh_token,omitempty"` - TokenType *string `json:"token_type,omitempty"` - AccounttId *int32 `json:"accountt_id,omitempty"` -} - -// NewGenerateToken200Response instantiates a new GenerateToken200Response 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 NewGenerateToken200Response() *GenerateToken200Response { - this := GenerateToken200Response{} - return &this -} - -// NewGenerateToken200ResponseWithDefaults instantiates a new GenerateToken200Response 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 NewGenerateToken200ResponseWithDefaults() *GenerateToken200Response { - this := GenerateToken200Response{} - return &this -} - -// GetAccessToken returns the AccessToken field value if set, zero value otherwise. -func (o *GenerateToken200Response) GetAccessToken() string { - if o == nil || o.AccessToken == nil { - var ret string - return ret - } - return *o.AccessToken -} - -// GetAccessTokenOk returns a tuple with the AccessToken field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GenerateToken200Response) GetAccessTokenOk() (*string, bool) { - if o == nil || o.AccessToken == nil { - return nil, false - } - return o.AccessToken, true -} - -// HasAccessToken returns a boolean if a field has been set. -func (o *GenerateToken200Response) HasAccessToken() bool { - if o != nil && o.AccessToken != nil { - return true - } - - return false -} - -// SetAccessToken gets a reference to the given string and assigns it to the AccessToken field. -func (o *GenerateToken200Response) SetAccessToken(v string) { - o.AccessToken = &v -} - -// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. -func (o *GenerateToken200Response) GetCreatedAt() string { - if o == nil || o.CreatedAt == nil { - var ret string - return ret - } - return *o.CreatedAt -} - -// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GenerateToken200Response) GetCreatedAtOk() (*string, bool) { - if o == nil || o.CreatedAt == nil { - return nil, false - } - return o.CreatedAt, true -} - -// HasCreatedAt returns a boolean if a field has been set. -func (o *GenerateToken200Response) HasCreatedAt() bool { - if o != nil && o.CreatedAt != nil { - return true - } - - return false -} - -// SetCreatedAt gets a reference to the given string and assigns it to the CreatedAt field. -func (o *GenerateToken200Response) SetCreatedAt(v string) { - o.CreatedAt = &v -} - -// GetExpiresIn returns the ExpiresIn field value if set, zero value otherwise. -func (o *GenerateToken200Response) GetExpiresIn() int32 { - if o == nil || o.ExpiresIn == nil { - var ret int32 - return ret - } - return *o.ExpiresIn -} - -// GetExpiresInOk returns a tuple with the ExpiresIn field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GenerateToken200Response) GetExpiresInOk() (*int32, bool) { - if o == nil || o.ExpiresIn == nil { - return nil, false - } - return o.ExpiresIn, true -} - -// HasExpiresIn returns a boolean if a field has been set. -func (o *GenerateToken200Response) HasExpiresIn() bool { - if o != nil && o.ExpiresIn != nil { - return true - } - - return false -} - -// SetExpiresIn gets a reference to the given int32 and assigns it to the ExpiresIn field. -func (o *GenerateToken200Response) SetExpiresIn(v int32) { - o.ExpiresIn = &v -} - -// GetRefreshToken returns the RefreshToken field value if set, zero value otherwise. -func (o *GenerateToken200Response) GetRefreshToken() string { - if o == nil || o.RefreshToken == nil { - var ret string - return ret - } - return *o.RefreshToken -} - -// GetRefreshTokenOk returns a tuple with the RefreshToken field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GenerateToken200Response) GetRefreshTokenOk() (*string, bool) { - if o == nil || o.RefreshToken == nil { - return nil, false - } - return o.RefreshToken, true -} - -// HasRefreshToken returns a boolean if a field has been set. -func (o *GenerateToken200Response) HasRefreshToken() bool { - if o != nil && o.RefreshToken != nil { - return true - } - - return false -} - -// SetRefreshToken gets a reference to the given string and assigns it to the RefreshToken field. -func (o *GenerateToken200Response) SetRefreshToken(v string) { - o.RefreshToken = &v -} - -// GetTokenType returns the TokenType field value if set, zero value otherwise. -func (o *GenerateToken200Response) GetTokenType() string { - if o == nil || o.TokenType == nil { - var ret string - return ret - } - return *o.TokenType -} - -// GetTokenTypeOk returns a tuple with the TokenType field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GenerateToken200Response) GetTokenTypeOk() (*string, bool) { - if o == nil || o.TokenType == nil { - return nil, false - } - return o.TokenType, true -} - -// HasTokenType returns a boolean if a field has been set. -func (o *GenerateToken200Response) HasTokenType() bool { - if o != nil && o.TokenType != nil { - return true - } - - return false -} - -// SetTokenType gets a reference to the given string and assigns it to the TokenType field. -func (o *GenerateToken200Response) SetTokenType(v string) { - o.TokenType = &v -} - -// GetAccounttId returns the AccounttId field value if set, zero value otherwise. -func (o *GenerateToken200Response) GetAccounttId() int32 { - if o == nil || o.AccounttId == nil { - var ret int32 - return ret - } - return *o.AccounttId -} - -// GetAccounttIdOk returns a tuple with the AccounttId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GenerateToken200Response) GetAccounttIdOk() (*int32, bool) { - if o == nil || o.AccounttId == nil { - return nil, false - } - return o.AccounttId, true -} - -// HasAccounttId returns a boolean if a field has been set. -func (o *GenerateToken200Response) HasAccounttId() bool { - if o != nil && o.AccounttId != nil { - return true - } - - return false -} - -// SetAccounttId gets a reference to the given int32 and assigns it to the AccounttId field. -func (o *GenerateToken200Response) SetAccounttId(v int32) { - o.AccounttId = &v -} - -func (o GenerateToken200Response) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.AccessToken != nil { - toSerialize["access_token"] = o.AccessToken - } - if o.CreatedAt != nil { - toSerialize["created_at"] = o.CreatedAt - } - if o.ExpiresIn != nil { - toSerialize["expires_in"] = o.ExpiresIn - } - if o.RefreshToken != nil { - toSerialize["refresh_token"] = o.RefreshToken - } - if o.TokenType != nil { - toSerialize["token_type"] = o.TokenType - } - if o.AccounttId != nil { - toSerialize["accountt_id"] = o.AccounttId - } - return json.Marshal(toSerialize) -} - -type NullableGenerateToken200Response struct { - value *GenerateToken200Response - isSet bool -} - -func (v NullableGenerateToken200Response) Get() *GenerateToken200Response { - return v.value -} - -func (v *NullableGenerateToken200Response) Set(val *GenerateToken200Response) { - v.value = val - v.isSet = true -} - -func (v NullableGenerateToken200Response) IsSet() bool { - return v.isSet -} - -func (v *NullableGenerateToken200Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGenerateToken200Response(val *GenerateToken200Response) *NullableGenerateToken200Response { - return &NullableGenerateToken200Response{value: val, isSet: true} -} - -func (v NullableGenerateToken200Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGenerateToken200Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_generate_token_400_response.go b/model_generate_token_400_response.go deleted file mode 100644 index 2a22ac2..0000000 --- a/model_generate_token_400_response.go +++ /dev/null @@ -1,115 +0,0 @@ -/* -OneLogin API - -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -API version: 3.0.0-alpha.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package openapi - -import ( - "encoding/json" -) - -// GenerateToken400Response struct for GenerateToken400Response -type GenerateToken400Response struct { - Status *Status `json:"status,omitempty"` -} - -// NewGenerateToken400Response instantiates a new GenerateToken400Response 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 NewGenerateToken400Response() *GenerateToken400Response { - this := GenerateToken400Response{} - return &this -} - -// NewGenerateToken400ResponseWithDefaults instantiates a new GenerateToken400Response 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 NewGenerateToken400ResponseWithDefaults() *GenerateToken400Response { - this := GenerateToken400Response{} - return &this -} - -// GetStatus returns the Status field value if set, zero value otherwise. -func (o *GenerateToken400Response) GetStatus() Status { - if o == nil || o.Status == nil { - var ret Status - return ret - } - return *o.Status -} - -// GetStatusOk returns a tuple with the Status field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GenerateToken400Response) GetStatusOk() (*Status, bool) { - if o == nil || o.Status == nil { - return nil, false - } - return o.Status, true -} - -// HasStatus returns a boolean if a field has been set. -func (o *GenerateToken400Response) HasStatus() bool { - if o != nil && o.Status != nil { - return true - } - - return false -} - -// SetStatus gets a reference to the given Status and assigns it to the Status field. -func (o *GenerateToken400Response) SetStatus(v Status) { - o.Status = &v -} - -func (o GenerateToken400Response) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Status != nil { - toSerialize["status"] = o.Status - } - return json.Marshal(toSerialize) -} - -type NullableGenerateToken400Response struct { - value *GenerateToken400Response - isSet bool -} - -func (v NullableGenerateToken400Response) Get() *GenerateToken400Response { - return v.value -} - -func (v *NullableGenerateToken400Response) Set(val *GenerateToken400Response) { - v.value = val - v.isSet = true -} - -func (v NullableGenerateToken400Response) IsSet() bool { - return v.isSet -} - -func (v *NullableGenerateToken400Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGenerateToken400Response(val *GenerateToken400Response) *NullableGenerateToken400Response { - return &NullableGenerateToken400Response{value: val, isSet: true} -} - -func (v NullableGenerateToken400Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGenerateToken400Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_generate_token_request.go b/model_generate_token_request.go index bba34fa..e7e84c7 100644 --- a/model_generate_token_request.go +++ b/model_generate_token_request.go @@ -1,30 +1,35 @@ /* OneLogin API -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) +OpenAPI Specification for OneLogin -API version: 3.0.0-alpha.1 +API version: 3.1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package openapi +package onelogin import ( "encoding/json" ) +// checks if the GenerateTokenRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GenerateTokenRequest{} + // GenerateTokenRequest struct for GenerateTokenRequest type GenerateTokenRequest struct { - GrantType *string `json:"grant_type,omitempty"` + // Set to client_credentials. + GrantType string `json:"grant_type"` } // NewGenerateTokenRequest instantiates a new GenerateTokenRequest 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 NewGenerateTokenRequest() *GenerateTokenRequest { +func NewGenerateTokenRequest(grantType string) *GenerateTokenRequest { this := GenerateTokenRequest{} + this.GrantType = grantType return &this } @@ -33,49 +38,49 @@ func NewGenerateTokenRequest() *GenerateTokenRequest { // but it doesn't guarantee that properties required by API are set func NewGenerateTokenRequestWithDefaults() *GenerateTokenRequest { this := GenerateTokenRequest{} + var grantType string = "client_credentials" + this.GrantType = grantType return &this } -// GetGrantType returns the GrantType field value if set, zero value otherwise. +// GetGrantType returns the GrantType field value func (o *GenerateTokenRequest) GetGrantType() string { - if o == nil || o.GrantType == nil { + if o == nil { var ret string return ret } - return *o.GrantType + + return o.GrantType } -// GetGrantTypeOk returns a tuple with the GrantType field value if set, nil otherwise +// GetGrantTypeOk returns a tuple with the GrantType field value // and a boolean to check if the value has been set. func (o *GenerateTokenRequest) GetGrantTypeOk() (*string, bool) { - if o == nil || o.GrantType == nil { + if o == nil { return nil, false } - return o.GrantType, true -} - -// HasGrantType returns a boolean if a field has been set. -func (o *GenerateTokenRequest) HasGrantType() bool { - if o != nil && o.GrantType != nil { - return true - } - - return false + return &o.GrantType, true } -// SetGrantType gets a reference to the given string and assigns it to the GrantType field. +// SetGrantType sets field value func (o *GenerateTokenRequest) SetGrantType(v string) { - o.GrantType = &v + o.GrantType = v } func (o GenerateTokenRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.GrantType != nil { - toSerialize["grant_type"] = o.GrantType + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o GenerateTokenRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["grant_type"] = o.GrantType + return toSerialize, nil +} + type NullableGenerateTokenRequest struct { value *GenerateTokenRequest isSet bool diff --git a/model_schema.go b/model_generic_app.go similarity index 52% rename from model_schema.go rename to model_generic_app.go index 9ce1d1a..1735c99 100644 --- a/model_schema.go +++ b/model_generic_app.go @@ -1,78 +1,79 @@ /* OneLogin API -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) +OpenAPI Specification for OneLogin -API version: 3.0.0-alpha.1 +API version: 3.1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package openapi +package onelogin import ( "encoding/json" ) -// Schema struct for Schema -type Schema struct { +// checks if the GenericApp type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GenericApp{} + +// GenericApp struct for GenericApp +type GenericApp struct { // Apps unique ID in OneLogin. Id *int32 `json:"id,omitempty"` - // ID of the apps underlying connector. - ConnectorId *int32 `json:"connector_id,omitempty"` - // App name. + // The name of the app. Name *string `json:"name,omitempty"` + // Indicates if the app is visible in the OneLogin portal. + Visible *bool `json:"visible,omitempty"` // Freeform description of the app. Description *string `json:"description,omitempty"` // Freeform notes about the app. Notes *string `json:"notes,omitempty"` + // A link to the apps icon url + IconUrl *string `json:"icon_url,omitempty"` + AuthMethod *AuthMethod `json:"auth_method,omitempty"` // The security policy assigned to the app. PolicyId *int32 `json:"policy_id,omitempty"` - // The custom login page branding to use for this app. Applies to app initiated logins via OIDC or SAML. - BrandId *int32 `json:"brand_id,omitempty"` - // A link to the apps icon url. - IconUrl *string `json:"icon_url,omitempty"` - // Indicates if the app is visible in the OneLogin portal. - Visible *bool `json:"visible,omitempty"` - // An ID indicating the type of app. - AuthMethod *int32 `json:"auth_method,omitempty"` + // Indicates whether or not administrators can access the app as a user that they have assumed control over. + AllowAssumedSignin *bool `json:"allow_assumed_signin,omitempty"` // ID of the OneLogin portal tab that the app is assigned to. TabId *int32 `json:"tab_id,omitempty"` - // The date the app was created. + // ID of the connector to base the app from. + ConnectorId *int32 `json:"connector_id,omitempty"` + // the date the app was created CreatedAt *string `json:"created_at,omitempty"` - // The date the app was last updated. + // the date the app was last updated UpdatedAt *string `json:"updated_at,omitempty"` // List of Role IDs that are assigned to the app. On App Create or Update the entire array is replaced with the values provided. RoleIds []int32 `json:"role_ids,omitempty"` - // Indicates whether or not administrators can access the app as a user that they have assumed control over. - AllowAssumedSignin *bool `json:"allow_assumed_signin,omitempty"` - Provisioning *SchemaProvisioning `json:"provisioning,omitempty"` - Sso map[string]interface{} `json:"sso,omitempty"` - Configuration map[string]interface{} `json:"configuration,omitempty"` - Parameters map[string]interface{} `json:"parameters,omitempty"` - EnforcementPoint map[string]interface{} `json:"enforcement_point,omitempty"` + Provisioning *GenericAppProvisioning `json:"provisioning,omitempty"` + Parameters *AppParameters `json:"parameters,omitempty"` + EnforcementPoint *EnforcementPoint `json:"enforcement_point,omitempty"` + AdditionalProperties map[string]interface{} } -// NewSchema instantiates a new Schema object +type _GenericApp GenericApp + +// NewGenericApp instantiates a new GenericApp 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 NewSchema() *Schema { - this := Schema{} +func NewGenericApp() *GenericApp { + this := GenericApp{} return &this } -// NewSchemaWithDefaults instantiates a new Schema object +// NewGenericAppWithDefaults instantiates a new GenericApp 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 NewSchemaWithDefaults() *Schema { - this := Schema{} +func NewGenericAppWithDefaults() *GenericApp { + this := GenericApp{} return &this } // GetId returns the Id field value if set, zero value otherwise. -func (o *Schema) GetId() int32 { - if o == nil || o.Id == nil { +func (o *GenericApp) GetId() int32 { + if o == nil || isNil(o.Id) { var ret int32 return ret } @@ -81,16 +82,16 @@ func (o *Schema) GetId() int32 { // GetIdOk returns a tuple with the Id field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Schema) GetIdOk() (*int32, bool) { - if o == nil || o.Id == nil { +func (o *GenericApp) GetIdOk() (*int32, bool) { + if o == nil || isNil(o.Id) { return nil, false } return o.Id, true } // HasId returns a boolean if a field has been set. -func (o *Schema) HasId() bool { - if o != nil && o.Id != nil { +func (o *GenericApp) HasId() bool { + if o != nil && !isNil(o.Id) { return true } @@ -98,77 +99,77 @@ func (o *Schema) HasId() bool { } // SetId gets a reference to the given int32 and assigns it to the Id field. -func (o *Schema) SetId(v int32) { +func (o *GenericApp) SetId(v int32) { o.Id = &v } -// GetConnectorId returns the ConnectorId field value if set, zero value otherwise. -func (o *Schema) GetConnectorId() int32 { - if o == nil || o.ConnectorId == nil { - var ret int32 +// GetName returns the Name field value if set, zero value otherwise. +func (o *GenericApp) GetName() string { + if o == nil || isNil(o.Name) { + var ret string return ret } - return *o.ConnectorId + return *o.Name } -// GetConnectorIdOk returns a tuple with the ConnectorId field value if set, nil otherwise +// 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 *Schema) GetConnectorIdOk() (*int32, bool) { - if o == nil || o.ConnectorId == nil { +func (o *GenericApp) GetNameOk() (*string, bool) { + if o == nil || isNil(o.Name) { return nil, false } - return o.ConnectorId, true + return o.Name, true } -// HasConnectorId returns a boolean if a field has been set. -func (o *Schema) HasConnectorId() bool { - if o != nil && o.ConnectorId != nil { +// HasName returns a boolean if a field has been set. +func (o *GenericApp) HasName() bool { + if o != nil && !isNil(o.Name) { return true } return false } -// SetConnectorId gets a reference to the given int32 and assigns it to the ConnectorId field. -func (o *Schema) SetConnectorId(v int32) { - o.ConnectorId = &v +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *GenericApp) SetName(v string) { + o.Name = &v } -// GetName returns the Name field value if set, zero value otherwise. -func (o *Schema) GetName() string { - if o == nil || o.Name == nil { - var ret string +// GetVisible returns the Visible field value if set, zero value otherwise. +func (o *GenericApp) GetVisible() bool { + if o == nil || isNil(o.Visible) { + var ret bool return ret } - return *o.Name + return *o.Visible } -// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// GetVisibleOk returns a tuple with the Visible field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Schema) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { +func (o *GenericApp) GetVisibleOk() (*bool, bool) { + if o == nil || isNil(o.Visible) { return nil, false } - return o.Name, true + return o.Visible, true } -// HasName returns a boolean if a field has been set. -func (o *Schema) HasName() bool { - if o != nil && o.Name != nil { +// HasVisible returns a boolean if a field has been set. +func (o *GenericApp) HasVisible() bool { + if o != nil && !isNil(o.Visible) { return true } return false } -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *Schema) SetName(v string) { - o.Name = &v +// SetVisible gets a reference to the given bool and assigns it to the Visible field. +func (o *GenericApp) SetVisible(v bool) { + o.Visible = &v } // GetDescription returns the Description field value if set, zero value otherwise. -func (o *Schema) GetDescription() string { - if o == nil || o.Description == nil { +func (o *GenericApp) GetDescription() string { + if o == nil || isNil(o.Description) { var ret string return ret } @@ -177,16 +178,16 @@ func (o *Schema) 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 *Schema) GetDescriptionOk() (*string, bool) { - if o == nil || o.Description == nil { +func (o *GenericApp) GetDescriptionOk() (*string, bool) { + if o == nil || isNil(o.Description) { return nil, false } return o.Description, true } // HasDescription returns a boolean if a field has been set. -func (o *Schema) HasDescription() bool { - if o != nil && o.Description != nil { +func (o *GenericApp) HasDescription() bool { + if o != nil && !isNil(o.Description) { return true } @@ -194,13 +195,13 @@ func (o *Schema) HasDescription() bool { } // SetDescription gets a reference to the given string and assigns it to the Description field. -func (o *Schema) SetDescription(v string) { +func (o *GenericApp) SetDescription(v string) { o.Description = &v } // GetNotes returns the Notes field value if set, zero value otherwise. -func (o *Schema) GetNotes() string { - if o == nil || o.Notes == nil { +func (o *GenericApp) GetNotes() string { + if o == nil || isNil(o.Notes) { var ret string return ret } @@ -209,16 +210,16 @@ func (o *Schema) GetNotes() string { // GetNotesOk returns a tuple with the Notes field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Schema) GetNotesOk() (*string, bool) { - if o == nil || o.Notes == nil { +func (o *GenericApp) GetNotesOk() (*string, bool) { + if o == nil || isNil(o.Notes) { return nil, false } return o.Notes, true } // HasNotes returns a boolean if a field has been set. -func (o *Schema) HasNotes() bool { - if o != nil && o.Notes != nil { +func (o *GenericApp) HasNotes() bool { + if o != nil && !isNil(o.Notes) { return true } @@ -226,205 +227,205 @@ func (o *Schema) HasNotes() bool { } // SetNotes gets a reference to the given string and assigns it to the Notes field. -func (o *Schema) SetNotes(v string) { +func (o *GenericApp) SetNotes(v string) { o.Notes = &v } -// GetPolicyId returns the PolicyId field value if set, zero value otherwise. -func (o *Schema) GetPolicyId() int32 { - if o == nil || o.PolicyId == nil { - var ret int32 +// GetIconUrl returns the IconUrl field value if set, zero value otherwise. +func (o *GenericApp) GetIconUrl() string { + if o == nil || isNil(o.IconUrl) { + var ret string return ret } - return *o.PolicyId + return *o.IconUrl } -// GetPolicyIdOk returns a tuple with the PolicyId field value if set, nil otherwise +// 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 *Schema) GetPolicyIdOk() (*int32, bool) { - if o == nil || o.PolicyId == nil { +func (o *GenericApp) GetIconUrlOk() (*string, bool) { + if o == nil || isNil(o.IconUrl) { return nil, false } - return o.PolicyId, true + return o.IconUrl, true } -// HasPolicyId returns a boolean if a field has been set. -func (o *Schema) HasPolicyId() bool { - if o != nil && o.PolicyId != nil { +// HasIconUrl returns a boolean if a field has been set. +func (o *GenericApp) HasIconUrl() bool { + if o != nil && !isNil(o.IconUrl) { return true } return false } -// SetPolicyId gets a reference to the given int32 and assigns it to the PolicyId field. -func (o *Schema) SetPolicyId(v int32) { - o.PolicyId = &v +// SetIconUrl gets a reference to the given string and assigns it to the IconUrl field. +func (o *GenericApp) SetIconUrl(v string) { + o.IconUrl = &v } -// GetBrandId returns the BrandId field value if set, zero value otherwise. -func (o *Schema) GetBrandId() int32 { - if o == nil || o.BrandId == nil { - var ret int32 +// GetAuthMethod returns the AuthMethod field value if set, zero value otherwise. +func (o *GenericApp) GetAuthMethod() AuthMethod { + if o == nil || isNil(o.AuthMethod) { + var ret AuthMethod return ret } - return *o.BrandId + return *o.AuthMethod } -// GetBrandIdOk returns a tuple with the BrandId field value if set, nil otherwise +// GetAuthMethodOk returns a tuple with the AuthMethod field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Schema) GetBrandIdOk() (*int32, bool) { - if o == nil || o.BrandId == nil { +func (o *GenericApp) GetAuthMethodOk() (*AuthMethod, bool) { + if o == nil || isNil(o.AuthMethod) { return nil, false } - return o.BrandId, true + return o.AuthMethod, true } -// HasBrandId returns a boolean if a field has been set. -func (o *Schema) HasBrandId() bool { - if o != nil && o.BrandId != nil { +// HasAuthMethod returns a boolean if a field has been set. +func (o *GenericApp) HasAuthMethod() bool { + if o != nil && !isNil(o.AuthMethod) { return true } return false } -// SetBrandId gets a reference to the given int32 and assigns it to the BrandId field. -func (o *Schema) SetBrandId(v int32) { - o.BrandId = &v +// SetAuthMethod gets a reference to the given AuthMethod and assigns it to the AuthMethod field. +func (o *GenericApp) SetAuthMethod(v AuthMethod) { + o.AuthMethod = &v } -// GetIconUrl returns the IconUrl field value if set, zero value otherwise. -func (o *Schema) GetIconUrl() string { - if o == nil || o.IconUrl == nil { - var ret string +// GetPolicyId returns the PolicyId field value if set, zero value otherwise. +func (o *GenericApp) GetPolicyId() int32 { + if o == nil || isNil(o.PolicyId) { + var ret int32 return ret } - return *o.IconUrl + return *o.PolicyId } -// GetIconUrlOk returns a tuple with the IconUrl field value if set, nil otherwise +// GetPolicyIdOk returns a tuple with the PolicyId field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Schema) GetIconUrlOk() (*string, bool) { - if o == nil || o.IconUrl == nil { +func (o *GenericApp) GetPolicyIdOk() (*int32, bool) { + if o == nil || isNil(o.PolicyId) { return nil, false } - return o.IconUrl, true + return o.PolicyId, true } -// HasIconUrl returns a boolean if a field has been set. -func (o *Schema) HasIconUrl() bool { - if o != nil && o.IconUrl != nil { +// HasPolicyId returns a boolean if a field has been set. +func (o *GenericApp) HasPolicyId() bool { + if o != nil && !isNil(o.PolicyId) { return true } return false } -// SetIconUrl gets a reference to the given string and assigns it to the IconUrl field. -func (o *Schema) SetIconUrl(v string) { - o.IconUrl = &v +// SetPolicyId gets a reference to the given int32 and assigns it to the PolicyId field. +func (o *GenericApp) SetPolicyId(v int32) { + o.PolicyId = &v } -// GetVisible returns the Visible field value if set, zero value otherwise. -func (o *Schema) GetVisible() bool { - if o == nil || o.Visible == nil { +// GetAllowAssumedSignin returns the AllowAssumedSignin field value if set, zero value otherwise. +func (o *GenericApp) GetAllowAssumedSignin() bool { + if o == nil || isNil(o.AllowAssumedSignin) { var ret bool return ret } - return *o.Visible + return *o.AllowAssumedSignin } -// GetVisibleOk returns a tuple with the Visible field value if set, nil otherwise +// GetAllowAssumedSigninOk returns a tuple with the AllowAssumedSignin field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Schema) GetVisibleOk() (*bool, bool) { - if o == nil || o.Visible == nil { +func (o *GenericApp) GetAllowAssumedSigninOk() (*bool, bool) { + if o == nil || isNil(o.AllowAssumedSignin) { return nil, false } - return o.Visible, true + return o.AllowAssumedSignin, true } -// HasVisible returns a boolean if a field has been set. -func (o *Schema) HasVisible() bool { - if o != nil && o.Visible != nil { +// HasAllowAssumedSignin returns a boolean if a field has been set. +func (o *GenericApp) HasAllowAssumedSignin() bool { + if o != nil && !isNil(o.AllowAssumedSignin) { return true } return false } -// SetVisible gets a reference to the given bool and assigns it to the Visible field. -func (o *Schema) SetVisible(v bool) { - o.Visible = &v +// SetAllowAssumedSignin gets a reference to the given bool and assigns it to the AllowAssumedSignin field. +func (o *GenericApp) SetAllowAssumedSignin(v bool) { + o.AllowAssumedSignin = &v } -// GetAuthMethod returns the AuthMethod field value if set, zero value otherwise. -func (o *Schema) GetAuthMethod() int32 { - if o == nil || o.AuthMethod == nil { +// GetTabId returns the TabId field value if set, zero value otherwise. +func (o *GenericApp) GetTabId() int32 { + if o == nil || isNil(o.TabId) { var ret int32 return ret } - return *o.AuthMethod + return *o.TabId } -// GetAuthMethodOk returns a tuple with the AuthMethod field value if set, nil otherwise +// GetTabIdOk returns a tuple with the TabId field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Schema) GetAuthMethodOk() (*int32, bool) { - if o == nil || o.AuthMethod == nil { +func (o *GenericApp) GetTabIdOk() (*int32, bool) { + if o == nil || isNil(o.TabId) { return nil, false } - return o.AuthMethod, true + return o.TabId, true } -// HasAuthMethod returns a boolean if a field has been set. -func (o *Schema) HasAuthMethod() bool { - if o != nil && o.AuthMethod != nil { +// HasTabId returns a boolean if a field has been set. +func (o *GenericApp) HasTabId() bool { + if o != nil && !isNil(o.TabId) { return true } return false } -// SetAuthMethod gets a reference to the given int32 and assigns it to the AuthMethod field. -func (o *Schema) SetAuthMethod(v int32) { - o.AuthMethod = &v +// SetTabId gets a reference to the given int32 and assigns it to the TabId field. +func (o *GenericApp) SetTabId(v int32) { + o.TabId = &v } -// GetTabId returns the TabId field value if set, zero value otherwise. -func (o *Schema) GetTabId() int32 { - if o == nil || o.TabId == nil { +// GetConnectorId returns the ConnectorId field value if set, zero value otherwise. +func (o *GenericApp) GetConnectorId() int32 { + if o == nil || isNil(o.ConnectorId) { var ret int32 return ret } - return *o.TabId + return *o.ConnectorId } -// GetTabIdOk returns a tuple with the TabId field value if set, nil otherwise +// GetConnectorIdOk returns a tuple with the ConnectorId field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Schema) GetTabIdOk() (*int32, bool) { - if o == nil || o.TabId == nil { +func (o *GenericApp) GetConnectorIdOk() (*int32, bool) { + if o == nil || isNil(o.ConnectorId) { return nil, false } - return o.TabId, true + return o.ConnectorId, true } -// HasTabId returns a boolean if a field has been set. -func (o *Schema) HasTabId() bool { - if o != nil && o.TabId != nil { +// HasConnectorId returns a boolean if a field has been set. +func (o *GenericApp) HasConnectorId() bool { + if o != nil && !isNil(o.ConnectorId) { return true } return false } -// SetTabId gets a reference to the given int32 and assigns it to the TabId field. -func (o *Schema) SetTabId(v int32) { - o.TabId = &v +// SetConnectorId gets a reference to the given int32 and assigns it to the ConnectorId field. +func (o *GenericApp) SetConnectorId(v int32) { + o.ConnectorId = &v } // GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. -func (o *Schema) GetCreatedAt() string { - if o == nil || o.CreatedAt == nil { +func (o *GenericApp) GetCreatedAt() string { + if o == nil || isNil(o.CreatedAt) { var ret string return ret } @@ -433,16 +434,16 @@ func (o *Schema) GetCreatedAt() string { // GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Schema) GetCreatedAtOk() (*string, bool) { - if o == nil || o.CreatedAt == nil { +func (o *GenericApp) GetCreatedAtOk() (*string, bool) { + if o == nil || isNil(o.CreatedAt) { return nil, false } return o.CreatedAt, true } // HasCreatedAt returns a boolean if a field has been set. -func (o *Schema) HasCreatedAt() bool { - if o != nil && o.CreatedAt != nil { +func (o *GenericApp) HasCreatedAt() bool { + if o != nil && !isNil(o.CreatedAt) { return true } @@ -450,13 +451,13 @@ func (o *Schema) HasCreatedAt() bool { } // SetCreatedAt gets a reference to the given string and assigns it to the CreatedAt field. -func (o *Schema) SetCreatedAt(v string) { +func (o *GenericApp) SetCreatedAt(v string) { o.CreatedAt = &v } // GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. -func (o *Schema) GetUpdatedAt() string { - if o == nil || o.UpdatedAt == nil { +func (o *GenericApp) GetUpdatedAt() string { + if o == nil || isNil(o.UpdatedAt) { var ret string return ret } @@ -465,16 +466,16 @@ func (o *Schema) GetUpdatedAt() string { // GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Schema) GetUpdatedAtOk() (*string, bool) { - if o == nil || o.UpdatedAt == nil { +func (o *GenericApp) GetUpdatedAtOk() (*string, bool) { + if o == nil || isNil(o.UpdatedAt) { return nil, false } return o.UpdatedAt, true } // HasUpdatedAt returns a boolean if a field has been set. -func (o *Schema) HasUpdatedAt() bool { - if o != nil && o.UpdatedAt != nil { +func (o *GenericApp) HasUpdatedAt() bool { + if o != nil && !isNil(o.UpdatedAt) { return true } @@ -482,13 +483,13 @@ func (o *Schema) HasUpdatedAt() bool { } // SetUpdatedAt gets a reference to the given string and assigns it to the UpdatedAt field. -func (o *Schema) SetUpdatedAt(v string) { +func (o *GenericApp) SetUpdatedAt(v string) { o.UpdatedAt = &v } // GetRoleIds returns the RoleIds field value if set, zero value otherwise. -func (o *Schema) GetRoleIds() []int32 { - if o == nil || o.RoleIds == nil { +func (o *GenericApp) GetRoleIds() []int32 { + if o == nil || isNil(o.RoleIds) { var ret []int32 return ret } @@ -497,16 +498,16 @@ func (o *Schema) GetRoleIds() []int32 { // GetRoleIdsOk returns a tuple with the RoleIds field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Schema) GetRoleIdsOk() ([]int32, bool) { - if o == nil || o.RoleIds == nil { +func (o *GenericApp) GetRoleIdsOk() ([]int32, bool) { + if o == nil || isNil(o.RoleIds) { return nil, false } return o.RoleIds, true } // HasRoleIds returns a boolean if a field has been set. -func (o *Schema) HasRoleIds() bool { - if o != nil && o.RoleIds != nil { +func (o *GenericApp) HasRoleIds() bool { + if o != nil && !isNil(o.RoleIds) { return true } @@ -514,46 +515,14 @@ func (o *Schema) HasRoleIds() bool { } // SetRoleIds gets a reference to the given []int32 and assigns it to the RoleIds field. -func (o *Schema) SetRoleIds(v []int32) { +func (o *GenericApp) SetRoleIds(v []int32) { o.RoleIds = v } -// GetAllowAssumedSignin returns the AllowAssumedSignin field value if set, zero value otherwise. -func (o *Schema) GetAllowAssumedSignin() bool { - if o == nil || o.AllowAssumedSignin == nil { - var ret bool - return ret - } - return *o.AllowAssumedSignin -} - -// GetAllowAssumedSigninOk returns a tuple with the AllowAssumedSignin field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Schema) GetAllowAssumedSigninOk() (*bool, bool) { - if o == nil || o.AllowAssumedSignin == nil { - return nil, false - } - return o.AllowAssumedSignin, true -} - -// HasAllowAssumedSignin returns a boolean if a field has been set. -func (o *Schema) HasAllowAssumedSignin() bool { - if o != nil && o.AllowAssumedSignin != nil { - return true - } - - return false -} - -// SetAllowAssumedSignin gets a reference to the given bool and assigns it to the AllowAssumedSignin field. -func (o *Schema) SetAllowAssumedSignin(v bool) { - o.AllowAssumedSignin = &v -} - // GetProvisioning returns the Provisioning field value if set, zero value otherwise. -func (o *Schema) GetProvisioning() SchemaProvisioning { - if o == nil || o.Provisioning == nil { - var ret SchemaProvisioning +func (o *GenericApp) GetProvisioning() GenericAppProvisioning { + if o == nil || isNil(o.Provisioning) { + var ret GenericAppProvisioning return ret } return *o.Provisioning @@ -561,252 +530,223 @@ func (o *Schema) GetProvisioning() SchemaProvisioning { // GetProvisioningOk returns a tuple with the Provisioning field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Schema) GetProvisioningOk() (*SchemaProvisioning, bool) { - if o == nil || o.Provisioning == nil { +func (o *GenericApp) GetProvisioningOk() (*GenericAppProvisioning, bool) { + if o == nil || isNil(o.Provisioning) { return nil, false } return o.Provisioning, true } // HasProvisioning returns a boolean if a field has been set. -func (o *Schema) HasProvisioning() bool { - if o != nil && o.Provisioning != nil { +func (o *GenericApp) HasProvisioning() bool { + if o != nil && !isNil(o.Provisioning) { return true } return false } -// SetProvisioning gets a reference to the given SchemaProvisioning and assigns it to the Provisioning field. -func (o *Schema) SetProvisioning(v SchemaProvisioning) { +// SetProvisioning gets a reference to the given GenericAppProvisioning and assigns it to the Provisioning field. +func (o *GenericApp) SetProvisioning(v GenericAppProvisioning) { o.Provisioning = &v } -// GetSso returns the Sso field value if set, zero value otherwise. -func (o *Schema) GetSso() map[string]interface{} { - if o == nil || o.Sso == nil { - var ret map[string]interface{} - return ret - } - return o.Sso -} - -// GetSsoOk returns a tuple with the Sso field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Schema) GetSsoOk() (map[string]interface{}, bool) { - if o == nil || o.Sso == nil { - return nil, false - } - return o.Sso, true -} - -// HasSso returns a boolean if a field has been set. -func (o *Schema) HasSso() bool { - if o != nil && o.Sso != nil { - return true - } - - return false -} - -// SetSso gets a reference to the given map[string]interface{} and assigns it to the Sso field. -func (o *Schema) SetSso(v map[string]interface{}) { - o.Sso = v -} - -// GetConfiguration returns the Configuration field value if set, zero value otherwise. -func (o *Schema) GetConfiguration() map[string]interface{} { - if o == nil || o.Configuration == nil { - var ret map[string]interface{} - return ret - } - return o.Configuration -} - -// GetConfigurationOk returns a tuple with the Configuration field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Schema) GetConfigurationOk() (map[string]interface{}, bool) { - if o == nil || o.Configuration == nil { - return nil, false - } - return o.Configuration, true -} - -// HasConfiguration returns a boolean if a field has been set. -func (o *Schema) HasConfiguration() bool { - if o != nil && o.Configuration != nil { - return true - } - - return false -} - -// SetConfiguration gets a reference to the given map[string]interface{} and assigns it to the Configuration field. -func (o *Schema) SetConfiguration(v map[string]interface{}) { - o.Configuration = v -} - // GetParameters returns the Parameters field value if set, zero value otherwise. -func (o *Schema) GetParameters() map[string]interface{} { - if o == nil || o.Parameters == nil { - var ret map[string]interface{} +func (o *GenericApp) GetParameters() AppParameters { + if o == nil || isNil(o.Parameters) { + var ret AppParameters return ret } - return o.Parameters + return *o.Parameters } // GetParametersOk returns a tuple with the Parameters field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Schema) GetParametersOk() (map[string]interface{}, bool) { - if o == nil || o.Parameters == nil { +func (o *GenericApp) GetParametersOk() (*AppParameters, bool) { + if o == nil || isNil(o.Parameters) { return nil, false } return o.Parameters, true } // HasParameters returns a boolean if a field has been set. -func (o *Schema) HasParameters() bool { - if o != nil && o.Parameters != nil { +func (o *GenericApp) HasParameters() bool { + if o != nil && !isNil(o.Parameters) { return true } return false } -// SetParameters gets a reference to the given map[string]interface{} and assigns it to the Parameters field. -func (o *Schema) SetParameters(v map[string]interface{}) { - o.Parameters = v +// SetParameters gets a reference to the given AppParameters and assigns it to the Parameters field. +func (o *GenericApp) SetParameters(v AppParameters) { + o.Parameters = &v } // GetEnforcementPoint returns the EnforcementPoint field value if set, zero value otherwise. -func (o *Schema) GetEnforcementPoint() map[string]interface{} { - if o == nil || o.EnforcementPoint == nil { - var ret map[string]interface{} +func (o *GenericApp) GetEnforcementPoint() EnforcementPoint { + if o == nil || isNil(o.EnforcementPoint) { + var ret EnforcementPoint return ret } - return o.EnforcementPoint + return *o.EnforcementPoint } // GetEnforcementPointOk returns a tuple with the EnforcementPoint field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Schema) GetEnforcementPointOk() (map[string]interface{}, bool) { - if o == nil || o.EnforcementPoint == nil { +func (o *GenericApp) GetEnforcementPointOk() (*EnforcementPoint, bool) { + if o == nil || isNil(o.EnforcementPoint) { return nil, false } return o.EnforcementPoint, true } // HasEnforcementPoint returns a boolean if a field has been set. -func (o *Schema) HasEnforcementPoint() bool { - if o != nil && o.EnforcementPoint != nil { +func (o *GenericApp) HasEnforcementPoint() bool { + if o != nil && !isNil(o.EnforcementPoint) { return true } return false } -// SetEnforcementPoint gets a reference to the given map[string]interface{} and assigns it to the EnforcementPoint field. -func (o *Schema) SetEnforcementPoint(v map[string]interface{}) { - o.EnforcementPoint = v +// SetEnforcementPoint gets a reference to the given EnforcementPoint and assigns it to the EnforcementPoint field. +func (o *GenericApp) SetEnforcementPoint(v EnforcementPoint) { + o.EnforcementPoint = &v } -func (o Schema) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.ConnectorId != nil { - toSerialize["connector_id"] = o.ConnectorId +func (o GenericApp) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.Name != nil { + return json.Marshal(toSerialize) +} + +func (o GenericApp) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: id is readOnly + if !isNil(o.Name) { toSerialize["name"] = o.Name } - if o.Description != nil { + if !isNil(o.Visible) { + toSerialize["visible"] = o.Visible + } + if !isNil(o.Description) { toSerialize["description"] = o.Description } - if o.Notes != nil { + if !isNil(o.Notes) { toSerialize["notes"] = o.Notes } - if o.PolicyId != nil { - toSerialize["policy_id"] = o.PolicyId - } - if o.BrandId != nil { - toSerialize["brand_id"] = o.BrandId - } - if o.IconUrl != nil { + if !isNil(o.IconUrl) { toSerialize["icon_url"] = o.IconUrl } - if o.Visible != nil { - toSerialize["visible"] = o.Visible - } - if o.AuthMethod != nil { + if !isNil(o.AuthMethod) { toSerialize["auth_method"] = o.AuthMethod } - if o.TabId != nil { + if !isNil(o.PolicyId) { + toSerialize["policy_id"] = o.PolicyId + } + if !isNil(o.AllowAssumedSignin) { + toSerialize["allow_assumed_signin"] = o.AllowAssumedSignin + } + if !isNil(o.TabId) { toSerialize["tab_id"] = o.TabId } - if o.CreatedAt != nil { + if !isNil(o.ConnectorId) { + toSerialize["connector_id"] = o.ConnectorId + } + if !isNil(o.CreatedAt) { toSerialize["created_at"] = o.CreatedAt } - if o.UpdatedAt != nil { + if !isNil(o.UpdatedAt) { toSerialize["updated_at"] = o.UpdatedAt } - if o.RoleIds != nil { + if !isNil(o.RoleIds) { toSerialize["role_ids"] = o.RoleIds } - if o.AllowAssumedSignin != nil { - toSerialize["allow_assumed_signin"] = o.AllowAssumedSignin - } - if o.Provisioning != nil { + if !isNil(o.Provisioning) { toSerialize["provisioning"] = o.Provisioning } - if o.Sso != nil { - toSerialize["sso"] = o.Sso - } - if o.Configuration != nil { - toSerialize["configuration"] = o.Configuration - } - if o.Parameters != nil { + if !isNil(o.Parameters) { toSerialize["parameters"] = o.Parameters } - if o.EnforcementPoint != nil { + if !isNil(o.EnforcementPoint) { toSerialize["enforcement_point"] = o.EnforcementPoint } - return json.Marshal(toSerialize) + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *GenericApp) UnmarshalJSON(bytes []byte) (err error) { + varGenericApp := _GenericApp{} + + if err = json.Unmarshal(bytes, &varGenericApp); err == nil { + *o = GenericApp(varGenericApp) + } + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(bytes, &additionalProperties); err == nil { + delete(additionalProperties, "id") + delete(additionalProperties, "name") + delete(additionalProperties, "visible") + delete(additionalProperties, "description") + delete(additionalProperties, "notes") + delete(additionalProperties, "icon_url") + delete(additionalProperties, "auth_method") + delete(additionalProperties, "policy_id") + delete(additionalProperties, "allow_assumed_signin") + delete(additionalProperties, "tab_id") + delete(additionalProperties, "connector_id") + delete(additionalProperties, "created_at") + delete(additionalProperties, "updated_at") + delete(additionalProperties, "role_ids") + delete(additionalProperties, "provisioning") + delete(additionalProperties, "parameters") + delete(additionalProperties, "enforcement_point") + o.AdditionalProperties = additionalProperties + } + + return err } -type NullableSchema struct { - value *Schema +type NullableGenericApp struct { + value *GenericApp isSet bool } -func (v NullableSchema) Get() *Schema { +func (v NullableGenericApp) Get() *GenericApp { return v.value } -func (v *NullableSchema) Set(val *Schema) { +func (v *NullableGenericApp) Set(val *GenericApp) { v.value = val v.isSet = true } -func (v NullableSchema) IsSet() bool { +func (v NullableGenericApp) IsSet() bool { return v.isSet } -func (v *NullableSchema) Unset() { +func (v *NullableGenericApp) Unset() { v.value = nil v.isSet = false } -func NewNullableSchema(val *Schema) *NullableSchema { - return &NullableSchema{value: val, isSet: true} +func NewNullableGenericApp(val *GenericApp) *NullableGenericApp { + return &NullableGenericApp{value: val, isSet: true} } -func (v NullableSchema) MarshalJSON() ([]byte, error) { +func (v NullableGenericApp) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } -func (v *NullableSchema) UnmarshalJSON(src []byte) error { +func (v *NullableGenericApp) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/model_generic_app_provisioning.go b/model_generic_app_provisioning.go new file mode 100644 index 0000000..daa86a0 --- /dev/null +++ b/model_generic_app_provisioning.go @@ -0,0 +1,126 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the GenericAppProvisioning type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GenericAppProvisioning{} + +// GenericAppProvisioning Indicates if provisioning is enabled for this app. +type GenericAppProvisioning struct { + Enabled *bool `json:"enabled,omitempty"` +} + +// NewGenericAppProvisioning instantiates a new GenericAppProvisioning 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 NewGenericAppProvisioning() *GenericAppProvisioning { + this := GenericAppProvisioning{} + return &this +} + +// NewGenericAppProvisioningWithDefaults instantiates a new GenericAppProvisioning 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 NewGenericAppProvisioningWithDefaults() *GenericAppProvisioning { + this := GenericAppProvisioning{} + return &this +} + +// GetEnabled returns the Enabled field value if set, zero value otherwise. +func (o *GenericAppProvisioning) GetEnabled() bool { + if o == nil || isNil(o.Enabled) { + 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 *GenericAppProvisioning) GetEnabledOk() (*bool, bool) { + if o == nil || isNil(o.Enabled) { + return nil, false + } + return o.Enabled, true +} + +// HasEnabled returns a boolean if a field has been set. +func (o *GenericAppProvisioning) HasEnabled() bool { + if o != nil && !isNil(o.Enabled) { + return true + } + + return false +} + +// SetEnabled gets a reference to the given bool and assigns it to the Enabled field. +func (o *GenericAppProvisioning) SetEnabled(v bool) { + o.Enabled = &v +} + +func (o GenericAppProvisioning) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GenericAppProvisioning) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.Enabled) { + toSerialize["enabled"] = o.Enabled + } + return toSerialize, nil +} + +type NullableGenericAppProvisioning struct { + value *GenericAppProvisioning + isSet bool +} + +func (v NullableGenericAppProvisioning) Get() *GenericAppProvisioning { + return v.value +} + +func (v *NullableGenericAppProvisioning) Set(val *GenericAppProvisioning) { + v.value = val + v.isSet = true +} + +func (v NullableGenericAppProvisioning) IsSet() bool { + return v.isSet +} + +func (v *NullableGenericAppProvisioning) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGenericAppProvisioning(val *GenericAppProvisioning) *NullableGenericAppProvisioning { + return &NullableGenericAppProvisioning{value: val, isSet: true} +} + +func (v NullableGenericAppProvisioning) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGenericAppProvisioning) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_get_assigned_user_200_response.go b/model_get_assigned_user_200_response.go new file mode 100644 index 0000000..365655e --- /dev/null +++ b/model_get_assigned_user_200_response.go @@ -0,0 +1,346 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the GetAssignedUser200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetAssignedUser200Response{} + +// GetAssignedUser200Response struct for GetAssignedUser200Response +type GetAssignedUser200Response struct { + Total *int32 `json:"total,omitempty"` + Users []int32 `json:"users,omitempty"` + BeforeCursor NullableInt32 `json:"beforeCursor,omitempty"` + PreviousLink NullableString `json:"previousLink,omitempty"` + AfterCursor NullableInt32 `json:"afterCursor,omitempty"` + NextLink NullableString `json:"nextLink,omitempty"` +} + +// NewGetAssignedUser200Response instantiates a new GetAssignedUser200Response 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 NewGetAssignedUser200Response() *GetAssignedUser200Response { + this := GetAssignedUser200Response{} + return &this +} + +// NewGetAssignedUser200ResponseWithDefaults instantiates a new GetAssignedUser200Response 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 NewGetAssignedUser200ResponseWithDefaults() *GetAssignedUser200Response { + this := GetAssignedUser200Response{} + return &this +} + +// GetTotal returns the Total field value if set, zero value otherwise. +func (o *GetAssignedUser200Response) GetTotal() int32 { + if o == nil || isNil(o.Total) { + var ret int32 + return ret + } + return *o.Total +} + +// GetTotalOk returns a tuple with the Total field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetAssignedUser200Response) GetTotalOk() (*int32, bool) { + if o == nil || isNil(o.Total) { + return nil, false + } + return o.Total, true +} + +// HasTotal returns a boolean if a field has been set. +func (o *GetAssignedUser200Response) HasTotal() bool { + if o != nil && !isNil(o.Total) { + return true + } + + return false +} + +// SetTotal gets a reference to the given int32 and assigns it to the Total field. +func (o *GetAssignedUser200Response) SetTotal(v int32) { + o.Total = &v +} + +// GetUsers returns the Users field value if set, zero value otherwise. +func (o *GetAssignedUser200Response) GetUsers() []int32 { + if o == nil || isNil(o.Users) { + 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 *GetAssignedUser200Response) GetUsersOk() ([]int32, bool) { + if o == nil || isNil(o.Users) { + return nil, false + } + return o.Users, true +} + +// HasUsers returns a boolean if a field has been set. +func (o *GetAssignedUser200Response) HasUsers() bool { + if o != nil && !isNil(o.Users) { + return true + } + + return false +} + +// SetUsers gets a reference to the given []int32 and assigns it to the Users field. +func (o *GetAssignedUser200Response) SetUsers(v []int32) { + o.Users = v +} + +// GetBeforeCursor returns the BeforeCursor field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GetAssignedUser200Response) GetBeforeCursor() int32 { + if o == nil || isNil(o.BeforeCursor.Get()) { + var ret int32 + return ret + } + return *o.BeforeCursor.Get() +} + +// GetBeforeCursorOk returns a tuple with the BeforeCursor 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 *GetAssignedUser200Response) GetBeforeCursorOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.BeforeCursor.Get(), o.BeforeCursor.IsSet() +} + +// HasBeforeCursor returns a boolean if a field has been set. +func (o *GetAssignedUser200Response) HasBeforeCursor() bool { + if o != nil && o.BeforeCursor.IsSet() { + return true + } + + return false +} + +// SetBeforeCursor gets a reference to the given NullableInt32 and assigns it to the BeforeCursor field. +func (o *GetAssignedUser200Response) SetBeforeCursor(v int32) { + o.BeforeCursor.Set(&v) +} +// SetBeforeCursorNil sets the value for BeforeCursor to be an explicit nil +func (o *GetAssignedUser200Response) SetBeforeCursorNil() { + o.BeforeCursor.Set(nil) +} + +// UnsetBeforeCursor ensures that no value is present for BeforeCursor, not even an explicit nil +func (o *GetAssignedUser200Response) UnsetBeforeCursor() { + o.BeforeCursor.Unset() +} + +// GetPreviousLink returns the PreviousLink field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GetAssignedUser200Response) GetPreviousLink() string { + if o == nil || isNil(o.PreviousLink.Get()) { + var ret string + return ret + } + return *o.PreviousLink.Get() +} + +// GetPreviousLinkOk returns a tuple with the PreviousLink 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 *GetAssignedUser200Response) GetPreviousLinkOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.PreviousLink.Get(), o.PreviousLink.IsSet() +} + +// HasPreviousLink returns a boolean if a field has been set. +func (o *GetAssignedUser200Response) HasPreviousLink() bool { + if o != nil && o.PreviousLink.IsSet() { + return true + } + + return false +} + +// SetPreviousLink gets a reference to the given NullableString and assigns it to the PreviousLink field. +func (o *GetAssignedUser200Response) SetPreviousLink(v string) { + o.PreviousLink.Set(&v) +} +// SetPreviousLinkNil sets the value for PreviousLink to be an explicit nil +func (o *GetAssignedUser200Response) SetPreviousLinkNil() { + o.PreviousLink.Set(nil) +} + +// UnsetPreviousLink ensures that no value is present for PreviousLink, not even an explicit nil +func (o *GetAssignedUser200Response) UnsetPreviousLink() { + o.PreviousLink.Unset() +} + +// GetAfterCursor returns the AfterCursor field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GetAssignedUser200Response) GetAfterCursor() int32 { + if o == nil || isNil(o.AfterCursor.Get()) { + var ret int32 + return ret + } + return *o.AfterCursor.Get() +} + +// GetAfterCursorOk returns a tuple with the AfterCursor 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 *GetAssignedUser200Response) GetAfterCursorOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.AfterCursor.Get(), o.AfterCursor.IsSet() +} + +// HasAfterCursor returns a boolean if a field has been set. +func (o *GetAssignedUser200Response) HasAfterCursor() bool { + if o != nil && o.AfterCursor.IsSet() { + return true + } + + return false +} + +// SetAfterCursor gets a reference to the given NullableInt32 and assigns it to the AfterCursor field. +func (o *GetAssignedUser200Response) SetAfterCursor(v int32) { + o.AfterCursor.Set(&v) +} +// SetAfterCursorNil sets the value for AfterCursor to be an explicit nil +func (o *GetAssignedUser200Response) SetAfterCursorNil() { + o.AfterCursor.Set(nil) +} + +// UnsetAfterCursor ensures that no value is present for AfterCursor, not even an explicit nil +func (o *GetAssignedUser200Response) UnsetAfterCursor() { + o.AfterCursor.Unset() +} + +// GetNextLink returns the NextLink field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GetAssignedUser200Response) GetNextLink() string { + if o == nil || isNil(o.NextLink.Get()) { + var ret string + return ret + } + return *o.NextLink.Get() +} + +// GetNextLinkOk returns a tuple with the NextLink 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 *GetAssignedUser200Response) GetNextLinkOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.NextLink.Get(), o.NextLink.IsSet() +} + +// HasNextLink returns a boolean if a field has been set. +func (o *GetAssignedUser200Response) HasNextLink() bool { + if o != nil && o.NextLink.IsSet() { + return true + } + + return false +} + +// SetNextLink gets a reference to the given NullableString and assigns it to the NextLink field. +func (o *GetAssignedUser200Response) SetNextLink(v string) { + o.NextLink.Set(&v) +} +// SetNextLinkNil sets the value for NextLink to be an explicit nil +func (o *GetAssignedUser200Response) SetNextLinkNil() { + o.NextLink.Set(nil) +} + +// UnsetNextLink ensures that no value is present for NextLink, not even an explicit nil +func (o *GetAssignedUser200Response) UnsetNextLink() { + o.NextLink.Unset() +} + +func (o GetAssignedUser200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetAssignedUser200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.Total) { + toSerialize["total"] = o.Total + } + if !isNil(o.Users) { + toSerialize["users"] = o.Users + } + if o.BeforeCursor.IsSet() { + toSerialize["beforeCursor"] = o.BeforeCursor.Get() + } + if o.PreviousLink.IsSet() { + toSerialize["previousLink"] = o.PreviousLink.Get() + } + if o.AfterCursor.IsSet() { + toSerialize["afterCursor"] = o.AfterCursor.Get() + } + if o.NextLink.IsSet() { + toSerialize["nextLink"] = o.NextLink.Get() + } + return toSerialize, nil +} + +type NullableGetAssignedUser200Response struct { + value *GetAssignedUser200Response + isSet bool +} + +func (v NullableGetAssignedUser200Response) Get() *GetAssignedUser200Response { + return v.value +} + +func (v *NullableGetAssignedUser200Response) Set(val *GetAssignedUser200Response) { + v.value = val + v.isSet = true +} + +func (v NullableGetAssignedUser200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableGetAssignedUser200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetAssignedUser200Response(val *GetAssignedUser200Response) *NullableGetAssignedUser200Response { + return &NullableGetAssignedUser200Response{value: val, isSet: true} +} + +func (v NullableGetAssignedUser200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetAssignedUser200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_get_auth_factors_200_response.go b/model_get_auth_factors_200_response.go new file mode 100644 index 0000000..ecd508b --- /dev/null +++ b/model_get_auth_factors_200_response.go @@ -0,0 +1,201 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the GetAuthFactors200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetAuthFactors200Response{} + +// GetAuthFactors200Response struct for GetAuthFactors200Response +type GetAuthFactors200Response struct { + // Identifier for the factor which will be used for user enrollment + FactorId *int32 `json:"factor_id,omitempty"` + // Authentication factor name, as it appears to administrators in OneLogin. + Name *string `json:"name,omitempty"` + // Internal use only + AuthFactorName *string `json:"auth_factor_name,omitempty"` +} + +// NewGetAuthFactors200Response instantiates a new GetAuthFactors200Response 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 NewGetAuthFactors200Response() *GetAuthFactors200Response { + this := GetAuthFactors200Response{} + return &this +} + +// NewGetAuthFactors200ResponseWithDefaults instantiates a new GetAuthFactors200Response 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 NewGetAuthFactors200ResponseWithDefaults() *GetAuthFactors200Response { + this := GetAuthFactors200Response{} + return &this +} + +// GetFactorId returns the FactorId field value if set, zero value otherwise. +func (o *GetAuthFactors200Response) GetFactorId() int32 { + if o == nil || isNil(o.FactorId) { + var ret int32 + return ret + } + return *o.FactorId +} + +// GetFactorIdOk returns a tuple with the FactorId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetAuthFactors200Response) GetFactorIdOk() (*int32, bool) { + if o == nil || isNil(o.FactorId) { + return nil, false + } + return o.FactorId, true +} + +// HasFactorId returns a boolean if a field has been set. +func (o *GetAuthFactors200Response) HasFactorId() bool { + if o != nil && !isNil(o.FactorId) { + return true + } + + return false +} + +// SetFactorId gets a reference to the given int32 and assigns it to the FactorId field. +func (o *GetAuthFactors200Response) SetFactorId(v int32) { + o.FactorId = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *GetAuthFactors200Response) GetName() string { + if o == nil || isNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// 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 *GetAuthFactors200Response) GetNameOk() (*string, bool) { + if o == nil || isNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *GetAuthFactors200Response) HasName() bool { + if o != nil && !isNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *GetAuthFactors200Response) SetName(v string) { + o.Name = &v +} + +// GetAuthFactorName returns the AuthFactorName field value if set, zero value otherwise. +func (o *GetAuthFactors200Response) GetAuthFactorName() string { + if o == nil || isNil(o.AuthFactorName) { + var ret string + return ret + } + return *o.AuthFactorName +} + +// GetAuthFactorNameOk returns a tuple with the AuthFactorName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetAuthFactors200Response) GetAuthFactorNameOk() (*string, bool) { + if o == nil || isNil(o.AuthFactorName) { + return nil, false + } + return o.AuthFactorName, true +} + +// HasAuthFactorName returns a boolean if a field has been set. +func (o *GetAuthFactors200Response) HasAuthFactorName() bool { + if o != nil && !isNil(o.AuthFactorName) { + return true + } + + return false +} + +// SetAuthFactorName gets a reference to the given string and assigns it to the AuthFactorName field. +func (o *GetAuthFactors200Response) SetAuthFactorName(v string) { + o.AuthFactorName = &v +} + +func (o GetAuthFactors200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetAuthFactors200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.FactorId) { + toSerialize["factor_id"] = o.FactorId + } + if !isNil(o.Name) { + toSerialize["name"] = o.Name + } + if !isNil(o.AuthFactorName) { + toSerialize["auth_factor_name"] = o.AuthFactorName + } + return toSerialize, nil +} + +type NullableGetAuthFactors200Response struct { + value *GetAuthFactors200Response + isSet bool +} + +func (v NullableGetAuthFactors200Response) Get() *GetAuthFactors200Response { + return v.value +} + +func (v *NullableGetAuthFactors200Response) Set(val *GetAuthFactors200Response) { + v.value = val + v.isSet = true +} + +func (v NullableGetAuthFactors200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableGetAuthFactors200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetAuthFactors200Response(val *GetAuthFactors200Response) *NullableGetAuthFactors200Response { + return &NullableGetAuthFactors200Response{value: val, isSet: true} +} + +func (v NullableGetAuthFactors200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetAuthFactors200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_get_authentication_devices_200_response_inner.go b/model_get_authentication_devices_200_response_inner.go new file mode 100644 index 0000000..011c338 --- /dev/null +++ b/model_get_authentication_devices_200_response_inner.go @@ -0,0 +1,279 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the GetAuthenticationDevices200ResponseInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetAuthenticationDevices200ResponseInner{} + +// GetAuthenticationDevices200ResponseInner struct for GetAuthenticationDevices200ResponseInner +type GetAuthenticationDevices200ResponseInner struct { + // MFA device identifier. + DeviceId *string `json:"device_id,omitempty"` + // Authentication factor display name assigned by users when they register the device. + UserDisplayName *string `json:"user_display_name,omitempty"` + // Authentication factor display name as it appears to users upon initial registration, as defined by admins at Settings > Authentication Factors. + TypeDisplayName *string `json:"type_display_name,omitempty"` + // Authentication factor name, as it appears to administrators in OneLogin. + AuthFactorName *string `json:"auth_factor_name,omitempty"` + // true = is user’s default MFA device for OneLogin. + Default *bool `json:"default,omitempty"` +} + +// NewGetAuthenticationDevices200ResponseInner instantiates a new GetAuthenticationDevices200ResponseInner 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 NewGetAuthenticationDevices200ResponseInner() *GetAuthenticationDevices200ResponseInner { + this := GetAuthenticationDevices200ResponseInner{} + var default_ bool = false + this.Default = &default_ + return &this +} + +// NewGetAuthenticationDevices200ResponseInnerWithDefaults instantiates a new GetAuthenticationDevices200ResponseInner 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 NewGetAuthenticationDevices200ResponseInnerWithDefaults() *GetAuthenticationDevices200ResponseInner { + this := GetAuthenticationDevices200ResponseInner{} + var default_ bool = false + this.Default = &default_ + return &this +} + +// GetDeviceId returns the DeviceId field value if set, zero value otherwise. +func (o *GetAuthenticationDevices200ResponseInner) GetDeviceId() string { + if o == nil || isNil(o.DeviceId) { + var ret string + return ret + } + return *o.DeviceId +} + +// GetDeviceIdOk returns a tuple with the DeviceId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetAuthenticationDevices200ResponseInner) GetDeviceIdOk() (*string, bool) { + if o == nil || isNil(o.DeviceId) { + return nil, false + } + return o.DeviceId, true +} + +// HasDeviceId returns a boolean if a field has been set. +func (o *GetAuthenticationDevices200ResponseInner) HasDeviceId() bool { + if o != nil && !isNil(o.DeviceId) { + return true + } + + return false +} + +// SetDeviceId gets a reference to the given string and assigns it to the DeviceId field. +func (o *GetAuthenticationDevices200ResponseInner) SetDeviceId(v string) { + o.DeviceId = &v +} + +// GetUserDisplayName returns the UserDisplayName field value if set, zero value otherwise. +func (o *GetAuthenticationDevices200ResponseInner) GetUserDisplayName() string { + if o == nil || isNil(o.UserDisplayName) { + var ret string + return ret + } + return *o.UserDisplayName +} + +// GetUserDisplayNameOk returns a tuple with the UserDisplayName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetAuthenticationDevices200ResponseInner) GetUserDisplayNameOk() (*string, bool) { + if o == nil || isNil(o.UserDisplayName) { + return nil, false + } + return o.UserDisplayName, true +} + +// HasUserDisplayName returns a boolean if a field has been set. +func (o *GetAuthenticationDevices200ResponseInner) HasUserDisplayName() bool { + if o != nil && !isNil(o.UserDisplayName) { + return true + } + + return false +} + +// SetUserDisplayName gets a reference to the given string and assigns it to the UserDisplayName field. +func (o *GetAuthenticationDevices200ResponseInner) SetUserDisplayName(v string) { + o.UserDisplayName = &v +} + +// GetTypeDisplayName returns the TypeDisplayName field value if set, zero value otherwise. +func (o *GetAuthenticationDevices200ResponseInner) GetTypeDisplayName() string { + if o == nil || isNil(o.TypeDisplayName) { + var ret string + return ret + } + return *o.TypeDisplayName +} + +// GetTypeDisplayNameOk returns a tuple with the TypeDisplayName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetAuthenticationDevices200ResponseInner) GetTypeDisplayNameOk() (*string, bool) { + if o == nil || isNil(o.TypeDisplayName) { + return nil, false + } + return o.TypeDisplayName, true +} + +// HasTypeDisplayName returns a boolean if a field has been set. +func (o *GetAuthenticationDevices200ResponseInner) HasTypeDisplayName() bool { + if o != nil && !isNil(o.TypeDisplayName) { + return true + } + + return false +} + +// SetTypeDisplayName gets a reference to the given string and assigns it to the TypeDisplayName field. +func (o *GetAuthenticationDevices200ResponseInner) SetTypeDisplayName(v string) { + o.TypeDisplayName = &v +} + +// GetAuthFactorName returns the AuthFactorName field value if set, zero value otherwise. +func (o *GetAuthenticationDevices200ResponseInner) GetAuthFactorName() string { + if o == nil || isNil(o.AuthFactorName) { + var ret string + return ret + } + return *o.AuthFactorName +} + +// GetAuthFactorNameOk returns a tuple with the AuthFactorName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetAuthenticationDevices200ResponseInner) GetAuthFactorNameOk() (*string, bool) { + if o == nil || isNil(o.AuthFactorName) { + return nil, false + } + return o.AuthFactorName, true +} + +// HasAuthFactorName returns a boolean if a field has been set. +func (o *GetAuthenticationDevices200ResponseInner) HasAuthFactorName() bool { + if o != nil && !isNil(o.AuthFactorName) { + return true + } + + return false +} + +// SetAuthFactorName gets a reference to the given string and assigns it to the AuthFactorName field. +func (o *GetAuthenticationDevices200ResponseInner) SetAuthFactorName(v string) { + o.AuthFactorName = &v +} + +// GetDefault returns the Default field value if set, zero value otherwise. +func (o *GetAuthenticationDevices200ResponseInner) GetDefault() bool { + if o == nil || isNil(o.Default) { + var ret bool + return ret + } + return *o.Default +} + +// 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 *GetAuthenticationDevices200ResponseInner) GetDefaultOk() (*bool, bool) { + if o == nil || isNil(o.Default) { + return nil, false + } + return o.Default, true +} + +// HasDefault returns a boolean if a field has been set. +func (o *GetAuthenticationDevices200ResponseInner) HasDefault() bool { + if o != nil && !isNil(o.Default) { + return true + } + + return false +} + +// SetDefault gets a reference to the given bool and assigns it to the Default field. +func (o *GetAuthenticationDevices200ResponseInner) SetDefault(v bool) { + o.Default = &v +} + +func (o GetAuthenticationDevices200ResponseInner) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetAuthenticationDevices200ResponseInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.DeviceId) { + toSerialize["device_id"] = o.DeviceId + } + if !isNil(o.UserDisplayName) { + toSerialize["user_display_name"] = o.UserDisplayName + } + if !isNil(o.TypeDisplayName) { + toSerialize["type_display_name"] = o.TypeDisplayName + } + if !isNil(o.AuthFactorName) { + toSerialize["auth_factor_name"] = o.AuthFactorName + } + if !isNil(o.Default) { + toSerialize["default"] = o.Default + } + return toSerialize, nil +} + +type NullableGetAuthenticationDevices200ResponseInner struct { + value *GetAuthenticationDevices200ResponseInner + isSet bool +} + +func (v NullableGetAuthenticationDevices200ResponseInner) Get() *GetAuthenticationDevices200ResponseInner { + return v.value +} + +func (v *NullableGetAuthenticationDevices200ResponseInner) Set(val *GetAuthenticationDevices200ResponseInner) { + v.value = val + v.isSet = true +} + +func (v NullableGetAuthenticationDevices200ResponseInner) IsSet() bool { + return v.isSet +} + +func (v *NullableGetAuthenticationDevices200ResponseInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetAuthenticationDevices200ResponseInner(val *GetAuthenticationDevices200ResponseInner) *NullableGetAuthenticationDevices200ResponseInner { + return &NullableGetAuthenticationDevices200ResponseInner{value: val, isSet: true} +} + +func (v NullableGetAuthenticationDevices200ResponseInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetAuthenticationDevices200ResponseInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_get_authorization_server_200_response.go b/model_get_authorization_server_200_response.go deleted file mode 100644 index 913da1a..0000000 --- a/model_get_authorization_server_200_response.go +++ /dev/null @@ -1,223 +0,0 @@ -/* -OneLogin API - -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -API version: 3.0.0-alpha.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package openapi - -import ( - "encoding/json" -) - -// GetAuthorizationServer200Response struct for GetAuthorizationServer200Response -type GetAuthorizationServer200Response struct { - Configuration *AuthServerConfiguration `json:"configuration,omitempty"` - Id *int32 `json:"id,omitempty"` - Description *string `json:"description,omitempty"` - Name *string `json:"name,omitempty"` -} - -// NewGetAuthorizationServer200Response instantiates a new GetAuthorizationServer200Response 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 NewGetAuthorizationServer200Response() *GetAuthorizationServer200Response { - this := GetAuthorizationServer200Response{} - return &this -} - -// NewGetAuthorizationServer200ResponseWithDefaults instantiates a new GetAuthorizationServer200Response 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 NewGetAuthorizationServer200ResponseWithDefaults() *GetAuthorizationServer200Response { - this := GetAuthorizationServer200Response{} - return &this -} - -// GetConfiguration returns the Configuration field value if set, zero value otherwise. -func (o *GetAuthorizationServer200Response) GetConfiguration() AuthServerConfiguration { - if o == nil || o.Configuration == nil { - var ret AuthServerConfiguration - return ret - } - return *o.Configuration -} - -// GetConfigurationOk returns a tuple with the Configuration field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetAuthorizationServer200Response) GetConfigurationOk() (*AuthServerConfiguration, bool) { - if o == nil || o.Configuration == nil { - return nil, false - } - return o.Configuration, true -} - -// HasConfiguration returns a boolean if a field has been set. -func (o *GetAuthorizationServer200Response) HasConfiguration() bool { - if o != nil && o.Configuration != nil { - return true - } - - return false -} - -// SetConfiguration gets a reference to the given AuthServerConfiguration and assigns it to the Configuration field. -func (o *GetAuthorizationServer200Response) SetConfiguration(v AuthServerConfiguration) { - o.Configuration = &v -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *GetAuthorizationServer200Response) GetId() int32 { - if o == nil || o.Id == nil { - var ret int32 - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetAuthorizationServer200Response) GetIdOk() (*int32, bool) { - if o == nil || o.Id == nil { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *GetAuthorizationServer200Response) HasId() bool { - if o != nil && o.Id != nil { - return true - } - - return false -} - -// SetId gets a reference to the given int32 and assigns it to the Id field. -func (o *GetAuthorizationServer200Response) SetId(v int32) { - o.Id = &v -} - -// GetDescription returns the Description field value if set, zero value otherwise. -func (o *GetAuthorizationServer200Response) GetDescription() string { - if o == nil || o.Description == nil { - var ret string - return ret - } - return *o.Description -} - -// 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 *GetAuthorizationServer200Response) GetDescriptionOk() (*string, bool) { - if o == nil || o.Description == nil { - return nil, false - } - return o.Description, true -} - -// HasDescription returns a boolean if a field has been set. -func (o *GetAuthorizationServer200Response) HasDescription() bool { - if o != nil && o.Description != nil { - return true - } - - return false -} - -// SetDescription gets a reference to the given string and assigns it to the Description field. -func (o *GetAuthorizationServer200Response) SetDescription(v string) { - o.Description = &v -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *GetAuthorizationServer200Response) GetName() string { - if o == nil || o.Name == nil { - var ret string - return ret - } - return *o.Name -} - -// 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 *GetAuthorizationServer200Response) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *GetAuthorizationServer200Response) HasName() bool { - if o != nil && o.Name != nil { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *GetAuthorizationServer200Response) SetName(v string) { - o.Name = &v -} - -func (o GetAuthorizationServer200Response) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Configuration != nil { - toSerialize["configuration"] = o.Configuration - } - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Description != nil { - toSerialize["description"] = o.Description - } - if o.Name != nil { - toSerialize["name"] = o.Name - } - return json.Marshal(toSerialize) -} - -type NullableGetAuthorizationServer200Response struct { - value *GetAuthorizationServer200Response - isSet bool -} - -func (v NullableGetAuthorizationServer200Response) Get() *GetAuthorizationServer200Response { - return v.value -} - -func (v *NullableGetAuthorizationServer200Response) Set(val *GetAuthorizationServer200Response) { - v.value = val - v.isSet = true -} - -func (v NullableGetAuthorizationServer200Response) IsSet() bool { - return v.isSet -} - -func (v *NullableGetAuthorizationServer200Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetAuthorizationServer200Response(val *GetAuthorizationServer200Response) *NullableGetAuthorizationServer200Response { - return &NullableGetAuthorizationServer200Response{value: val, isSet: true} -} - -func (v NullableGetAuthorizationServer200Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetAuthorizationServer200Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_get_available_factors_200_response_inner.go b/model_get_available_factors_200_response_inner.go deleted file mode 100644 index a786d0b..0000000 --- a/model_get_available_factors_200_response_inner.go +++ /dev/null @@ -1,190 +0,0 @@ -/* -OneLogin API - -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -API version: 3.0.0-alpha.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package openapi - -import ( - "encoding/json" -) - -// GetAvailableFactors200ResponseInner struct for GetAvailableFactors200ResponseInner -type GetAvailableFactors200ResponseInner struct { - // Identifier for the factor which will be used for user enrollment - FactorId *int32 `json:"factor_id,omitempty"` - // Authentication factor name, as it appears to administrators in OneLogin. - Name *string `json:"name,omitempty"` - // Internal use only - AuthFactorName *string `json:"auth_factor_name,omitempty"` -} - -// NewGetAvailableFactors200ResponseInner instantiates a new GetAvailableFactors200ResponseInner 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 NewGetAvailableFactors200ResponseInner() *GetAvailableFactors200ResponseInner { - this := GetAvailableFactors200ResponseInner{} - return &this -} - -// NewGetAvailableFactors200ResponseInnerWithDefaults instantiates a new GetAvailableFactors200ResponseInner 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 NewGetAvailableFactors200ResponseInnerWithDefaults() *GetAvailableFactors200ResponseInner { - this := GetAvailableFactors200ResponseInner{} - return &this -} - -// GetFactorId returns the FactorId field value if set, zero value otherwise. -func (o *GetAvailableFactors200ResponseInner) GetFactorId() int32 { - if o == nil || o.FactorId == nil { - var ret int32 - return ret - } - return *o.FactorId -} - -// GetFactorIdOk returns a tuple with the FactorId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetAvailableFactors200ResponseInner) GetFactorIdOk() (*int32, bool) { - if o == nil || o.FactorId == nil { - return nil, false - } - return o.FactorId, true -} - -// HasFactorId returns a boolean if a field has been set. -func (o *GetAvailableFactors200ResponseInner) HasFactorId() bool { - if o != nil && o.FactorId != nil { - return true - } - - return false -} - -// SetFactorId gets a reference to the given int32 and assigns it to the FactorId field. -func (o *GetAvailableFactors200ResponseInner) SetFactorId(v int32) { - o.FactorId = &v -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *GetAvailableFactors200ResponseInner) GetName() string { - if o == nil || o.Name == nil { - var ret string - return ret - } - return *o.Name -} - -// 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 *GetAvailableFactors200ResponseInner) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *GetAvailableFactors200ResponseInner) HasName() bool { - if o != nil && o.Name != nil { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *GetAvailableFactors200ResponseInner) SetName(v string) { - o.Name = &v -} - -// GetAuthFactorName returns the AuthFactorName field value if set, zero value otherwise. -func (o *GetAvailableFactors200ResponseInner) GetAuthFactorName() string { - if o == nil || o.AuthFactorName == nil { - var ret string - return ret - } - return *o.AuthFactorName -} - -// GetAuthFactorNameOk returns a tuple with the AuthFactorName field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetAvailableFactors200ResponseInner) GetAuthFactorNameOk() (*string, bool) { - if o == nil || o.AuthFactorName == nil { - return nil, false - } - return o.AuthFactorName, true -} - -// HasAuthFactorName returns a boolean if a field has been set. -func (o *GetAvailableFactors200ResponseInner) HasAuthFactorName() bool { - if o != nil && o.AuthFactorName != nil { - return true - } - - return false -} - -// SetAuthFactorName gets a reference to the given string and assigns it to the AuthFactorName field. -func (o *GetAvailableFactors200ResponseInner) SetAuthFactorName(v string) { - o.AuthFactorName = &v -} - -func (o GetAvailableFactors200ResponseInner) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.FactorId != nil { - toSerialize["factor_id"] = o.FactorId - } - if o.Name != nil { - toSerialize["name"] = o.Name - } - if o.AuthFactorName != nil { - toSerialize["auth_factor_name"] = o.AuthFactorName - } - return json.Marshal(toSerialize) -} - -type NullableGetAvailableFactors200ResponseInner struct { - value *GetAvailableFactors200ResponseInner - isSet bool -} - -func (v NullableGetAvailableFactors200ResponseInner) Get() *GetAvailableFactors200ResponseInner { - return v.value -} - -func (v *NullableGetAvailableFactors200ResponseInner) Set(val *GetAvailableFactors200ResponseInner) { - v.value = val - v.isSet = true -} - -func (v NullableGetAvailableFactors200ResponseInner) IsSet() bool { - return v.isSet -} - -func (v *NullableGetAvailableFactors200ResponseInner) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetAvailableFactors200ResponseInner(val *GetAvailableFactors200ResponseInner) *NullableGetAvailableFactors200ResponseInner { - return &NullableGetAvailableFactors200ResponseInner{value: val, isSet: true} -} - -func (v NullableGetAvailableFactors200ResponseInner) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetAvailableFactors200ResponseInner) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_get_client_apps_200_response_inner.go b/model_get_client_apps_200_response_inner.go deleted file mode 100644 index fd594f1..0000000 --- a/model_get_client_apps_200_response_inner.go +++ /dev/null @@ -1,223 +0,0 @@ -/* -OneLogin API - -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -API version: 3.0.0-alpha.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package openapi - -import ( - "encoding/json" -) - -// GetClientApps200ResponseInner struct for GetClientApps200ResponseInner -type GetClientApps200ResponseInner struct { - Scopes []GetClientApps200ResponseInnerScopesInner `json:"scopes,omitempty"` - AppId *int32 `json:"app_id,omitempty"` - Name *string `json:"name,omitempty"` - ApiAuthId *int32 `json:"api_auth_id,omitempty"` -} - -// NewGetClientApps200ResponseInner instantiates a new GetClientApps200ResponseInner 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 NewGetClientApps200ResponseInner() *GetClientApps200ResponseInner { - this := GetClientApps200ResponseInner{} - return &this -} - -// NewGetClientApps200ResponseInnerWithDefaults instantiates a new GetClientApps200ResponseInner 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 NewGetClientApps200ResponseInnerWithDefaults() *GetClientApps200ResponseInner { - this := GetClientApps200ResponseInner{} - return &this -} - -// GetScopes returns the Scopes field value if set, zero value otherwise. -func (o *GetClientApps200ResponseInner) GetScopes() []GetClientApps200ResponseInnerScopesInner { - if o == nil || o.Scopes == nil { - var ret []GetClientApps200ResponseInnerScopesInner - return ret - } - return o.Scopes -} - -// GetScopesOk returns a tuple with the Scopes field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetClientApps200ResponseInner) GetScopesOk() ([]GetClientApps200ResponseInnerScopesInner, bool) { - if o == nil || o.Scopes == nil { - return nil, false - } - return o.Scopes, true -} - -// HasScopes returns a boolean if a field has been set. -func (o *GetClientApps200ResponseInner) HasScopes() bool { - if o != nil && o.Scopes != nil { - return true - } - - return false -} - -// SetScopes gets a reference to the given []GetClientApps200ResponseInnerScopesInner and assigns it to the Scopes field. -func (o *GetClientApps200ResponseInner) SetScopes(v []GetClientApps200ResponseInnerScopesInner) { - o.Scopes = v -} - -// GetAppId returns the AppId field value if set, zero value otherwise. -func (o *GetClientApps200ResponseInner) GetAppId() int32 { - if o == nil || o.AppId == nil { - var ret int32 - return ret - } - return *o.AppId -} - -// GetAppIdOk returns a tuple with the AppId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetClientApps200ResponseInner) GetAppIdOk() (*int32, bool) { - if o == nil || o.AppId == nil { - return nil, false - } - return o.AppId, true -} - -// HasAppId returns a boolean if a field has been set. -func (o *GetClientApps200ResponseInner) HasAppId() bool { - if o != nil && o.AppId != nil { - return true - } - - return false -} - -// SetAppId gets a reference to the given int32 and assigns it to the AppId field. -func (o *GetClientApps200ResponseInner) SetAppId(v int32) { - o.AppId = &v -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *GetClientApps200ResponseInner) GetName() string { - if o == nil || o.Name == nil { - var ret string - return ret - } - return *o.Name -} - -// 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 *GetClientApps200ResponseInner) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *GetClientApps200ResponseInner) HasName() bool { - if o != nil && o.Name != nil { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *GetClientApps200ResponseInner) SetName(v string) { - o.Name = &v -} - -// GetApiAuthId returns the ApiAuthId field value if set, zero value otherwise. -func (o *GetClientApps200ResponseInner) GetApiAuthId() int32 { - if o == nil || o.ApiAuthId == nil { - var ret int32 - return ret - } - return *o.ApiAuthId -} - -// GetApiAuthIdOk returns a tuple with the ApiAuthId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetClientApps200ResponseInner) GetApiAuthIdOk() (*int32, bool) { - if o == nil || o.ApiAuthId == nil { - return nil, false - } - return o.ApiAuthId, true -} - -// HasApiAuthId returns a boolean if a field has been set. -func (o *GetClientApps200ResponseInner) HasApiAuthId() bool { - if o != nil && o.ApiAuthId != nil { - return true - } - - return false -} - -// SetApiAuthId gets a reference to the given int32 and assigns it to the ApiAuthId field. -func (o *GetClientApps200ResponseInner) SetApiAuthId(v int32) { - o.ApiAuthId = &v -} - -func (o GetClientApps200ResponseInner) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Scopes != nil { - toSerialize["scopes"] = o.Scopes - } - if o.AppId != nil { - toSerialize["app_id"] = o.AppId - } - if o.Name != nil { - toSerialize["name"] = o.Name - } - if o.ApiAuthId != nil { - toSerialize["api_auth_id"] = o.ApiAuthId - } - return json.Marshal(toSerialize) -} - -type NullableGetClientApps200ResponseInner struct { - value *GetClientApps200ResponseInner - isSet bool -} - -func (v NullableGetClientApps200ResponseInner) Get() *GetClientApps200ResponseInner { - return v.value -} - -func (v *NullableGetClientApps200ResponseInner) Set(val *GetClientApps200ResponseInner) { - v.value = val - v.isSet = true -} - -func (v NullableGetClientApps200ResponseInner) IsSet() bool { - return v.isSet -} - -func (v *NullableGetClientApps200ResponseInner) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetClientApps200ResponseInner(val *GetClientApps200ResponseInner) *NullableGetClientApps200ResponseInner { - return &NullableGetClientApps200ResponseInner{value: val, isSet: true} -} - -func (v NullableGetClientApps200ResponseInner) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetClientApps200ResponseInner) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_get_client_apps_200_response_inner_scopes_inner.go b/model_get_client_apps_200_response_inner_scopes_inner.go deleted file mode 100644 index 9038a7e..0000000 --- a/model_get_client_apps_200_response_inner_scopes_inner.go +++ /dev/null @@ -1,187 +0,0 @@ -/* -OneLogin API - -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -API version: 3.0.0-alpha.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package openapi - -import ( - "encoding/json" -) - -// GetClientApps200ResponseInnerScopesInner struct for GetClientApps200ResponseInnerScopesInner -type GetClientApps200ResponseInnerScopesInner struct { - Description *string `json:"description,omitempty"` - Value *string `json:"value,omitempty"` - Id *int32 `json:"id,omitempty"` -} - -// NewGetClientApps200ResponseInnerScopesInner instantiates a new GetClientApps200ResponseInnerScopesInner 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 NewGetClientApps200ResponseInnerScopesInner() *GetClientApps200ResponseInnerScopesInner { - this := GetClientApps200ResponseInnerScopesInner{} - return &this -} - -// NewGetClientApps200ResponseInnerScopesInnerWithDefaults instantiates a new GetClientApps200ResponseInnerScopesInner 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 NewGetClientApps200ResponseInnerScopesInnerWithDefaults() *GetClientApps200ResponseInnerScopesInner { - this := GetClientApps200ResponseInnerScopesInner{} - return &this -} - -// GetDescription returns the Description field value if set, zero value otherwise. -func (o *GetClientApps200ResponseInnerScopesInner) GetDescription() string { - if o == nil || o.Description == nil { - var ret string - return ret - } - return *o.Description -} - -// 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 *GetClientApps200ResponseInnerScopesInner) GetDescriptionOk() (*string, bool) { - if o == nil || o.Description == nil { - return nil, false - } - return o.Description, true -} - -// HasDescription returns a boolean if a field has been set. -func (o *GetClientApps200ResponseInnerScopesInner) HasDescription() bool { - if o != nil && o.Description != nil { - return true - } - - return false -} - -// SetDescription gets a reference to the given string and assigns it to the Description field. -func (o *GetClientApps200ResponseInnerScopesInner) SetDescription(v string) { - o.Description = &v -} - -// GetValue returns the Value field value if set, zero value otherwise. -func (o *GetClientApps200ResponseInnerScopesInner) GetValue() string { - if o == nil || o.Value == nil { - var ret string - return ret - } - return *o.Value -} - -// GetValueOk returns a tuple with the Value field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetClientApps200ResponseInnerScopesInner) GetValueOk() (*string, bool) { - if o == nil || o.Value == nil { - return nil, false - } - return o.Value, true -} - -// HasValue returns a boolean if a field has been set. -func (o *GetClientApps200ResponseInnerScopesInner) HasValue() bool { - if o != nil && o.Value != nil { - return true - } - - return false -} - -// SetValue gets a reference to the given string and assigns it to the Value field. -func (o *GetClientApps200ResponseInnerScopesInner) SetValue(v string) { - o.Value = &v -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *GetClientApps200ResponseInnerScopesInner) GetId() int32 { - if o == nil || o.Id == nil { - var ret int32 - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetClientApps200ResponseInnerScopesInner) GetIdOk() (*int32, bool) { - if o == nil || o.Id == nil { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *GetClientApps200ResponseInnerScopesInner) HasId() bool { - if o != nil && o.Id != nil { - return true - } - - return false -} - -// SetId gets a reference to the given int32 and assigns it to the Id field. -func (o *GetClientApps200ResponseInnerScopesInner) SetId(v int32) { - o.Id = &v -} - -func (o GetClientApps200ResponseInnerScopesInner) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Description != nil { - toSerialize["description"] = o.Description - } - if o.Value != nil { - toSerialize["value"] = o.Value - } - if o.Id != nil { - toSerialize["id"] = o.Id - } - return json.Marshal(toSerialize) -} - -type NullableGetClientApps200ResponseInnerScopesInner struct { - value *GetClientApps200ResponseInnerScopesInner - isSet bool -} - -func (v NullableGetClientApps200ResponseInnerScopesInner) Get() *GetClientApps200ResponseInnerScopesInner { - return v.value -} - -func (v *NullableGetClientApps200ResponseInnerScopesInner) Set(val *GetClientApps200ResponseInnerScopesInner) { - v.value = val - v.isSet = true -} - -func (v NullableGetClientApps200ResponseInnerScopesInner) IsSet() bool { - return v.isSet -} - -func (v *NullableGetClientApps200ResponseInnerScopesInner) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetClientApps200ResponseInnerScopesInner(val *GetClientApps200ResponseInnerScopesInner) *NullableGetClientApps200ResponseInnerScopesInner { - return &NullableGetClientApps200ResponseInnerScopesInner{value: val, isSet: true} -} - -func (v NullableGetClientApps200ResponseInnerScopesInner) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetClientApps200ResponseInnerScopesInner) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_get_custom_attributes_200_response.go b/model_get_custom_attributes_200_response.go new file mode 100644 index 0000000..abbde4d --- /dev/null +++ b/model_get_custom_attributes_200_response.go @@ -0,0 +1,163 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the GetCustomAttributes200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetCustomAttributes200Response{} + +// GetCustomAttributes200Response struct for GetCustomAttributes200Response +type GetCustomAttributes200Response struct { + Status *Error `json:"status,omitempty"` + // Provides a list of custom attribute fields (also known as custom user fields) that are available for your account. The values returned correspond to the values you provided in the Shortname field when you defined the custom user field. For details about defining custom user fields, see Custom User Fields. + Data [][]string `json:"data,omitempty"` +} + +// NewGetCustomAttributes200Response instantiates a new GetCustomAttributes200Response 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 NewGetCustomAttributes200Response() *GetCustomAttributes200Response { + this := GetCustomAttributes200Response{} + return &this +} + +// NewGetCustomAttributes200ResponseWithDefaults instantiates a new GetCustomAttributes200Response 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 NewGetCustomAttributes200ResponseWithDefaults() *GetCustomAttributes200Response { + this := GetCustomAttributes200Response{} + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *GetCustomAttributes200Response) GetStatus() Error { + if o == nil || isNil(o.Status) { + var ret Error + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetCustomAttributes200Response) GetStatusOk() (*Error, bool) { + if o == nil || isNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *GetCustomAttributes200Response) HasStatus() bool { + if o != nil && !isNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given Error and assigns it to the Status field. +func (o *GetCustomAttributes200Response) SetStatus(v Error) { + o.Status = &v +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *GetCustomAttributes200Response) GetData() [][]string { + if o == nil || isNil(o.Data) { + var ret [][]string + return ret + } + return o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetCustomAttributes200Response) GetDataOk() ([][]string, bool) { + if o == nil || isNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *GetCustomAttributes200Response) HasData() bool { + if o != nil && !isNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given [][]string and assigns it to the Data field. +func (o *GetCustomAttributes200Response) SetData(v [][]string) { + o.Data = v +} + +func (o GetCustomAttributes200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetCustomAttributes200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.Status) { + toSerialize["status"] = o.Status + } + if !isNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullableGetCustomAttributes200Response struct { + value *GetCustomAttributes200Response + isSet bool +} + +func (v NullableGetCustomAttributes200Response) Get() *GetCustomAttributes200Response { + return v.value +} + +func (v *NullableGetCustomAttributes200Response) Set(val *GetCustomAttributes200Response) { + v.value = val + v.isSet = true +} + +func (v NullableGetCustomAttributes200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableGetCustomAttributes200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetCustomAttributes200Response(val *GetCustomAttributes200Response) *NullableGetCustomAttributes200Response { + return &NullableGetCustomAttributes200Response{value: val, isSet: true} +} + +func (v NullableGetCustomAttributes200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetCustomAttributes200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_get_email_settings_200_response.go b/model_get_email_settings_200_response.go new file mode 100644 index 0000000..93b2767 --- /dev/null +++ b/model_get_email_settings_200_response.go @@ -0,0 +1,148 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" + "fmt" +) + +// GetEmailSettings200Response - struct for GetEmailSettings200Response +type GetEmailSettings200Response struct { + EmailConfig *EmailConfig + GetEmailSettings200ResponseOneOf *GetEmailSettings200ResponseOneOf +} + +// EmailConfigAsGetEmailSettings200Response is a convenience function that returns EmailConfig wrapped in GetEmailSettings200Response +func EmailConfigAsGetEmailSettings200Response(v *EmailConfig) GetEmailSettings200Response { + return GetEmailSettings200Response{ + EmailConfig: v, + } +} + +// GetEmailSettings200ResponseOneOfAsGetEmailSettings200Response is a convenience function that returns GetEmailSettings200ResponseOneOf wrapped in GetEmailSettings200Response +func GetEmailSettings200ResponseOneOfAsGetEmailSettings200Response(v *GetEmailSettings200ResponseOneOf) GetEmailSettings200Response { + return GetEmailSettings200Response{ + GetEmailSettings200ResponseOneOf: v, + } +} + + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *GetEmailSettings200Response) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into EmailConfig + err = newStrictDecoder(data).Decode(&dst.EmailConfig) + if err == nil { + jsonEmailConfig, _ := json.Marshal(dst.EmailConfig) + if string(jsonEmailConfig) == "{}" { // empty struct + dst.EmailConfig = nil + } else { + match++ + } + } else { + dst.EmailConfig = nil + } + + // try to unmarshal data into GetEmailSettings200ResponseOneOf + err = newStrictDecoder(data).Decode(&dst.GetEmailSettings200ResponseOneOf) + if err == nil { + jsonGetEmailSettings200ResponseOneOf, _ := json.Marshal(dst.GetEmailSettings200ResponseOneOf) + if string(jsonGetEmailSettings200ResponseOneOf) == "{}" { // empty struct + dst.GetEmailSettings200ResponseOneOf = nil + } else { + match++ + } + } else { + dst.GetEmailSettings200ResponseOneOf = nil + } + + if match > 1 { // more than 1 match + // reset to nil + dst.EmailConfig = nil + dst.GetEmailSettings200ResponseOneOf = nil + + return fmt.Errorf("data matches more than one schema in oneOf(GetEmailSettings200Response)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("data failed to match schemas in oneOf(GetEmailSettings200Response)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src GetEmailSettings200Response) MarshalJSON() ([]byte, error) { + if src.EmailConfig != nil { + return json.Marshal(&src.EmailConfig) + } + + if src.GetEmailSettings200ResponseOneOf != nil { + return json.Marshal(&src.GetEmailSettings200ResponseOneOf) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *GetEmailSettings200Response) GetActualInstance() (interface{}) { + if obj == nil { + return nil + } + if obj.EmailConfig != nil { + return obj.EmailConfig + } + + if obj.GetEmailSettings200ResponseOneOf != nil { + return obj.GetEmailSettings200ResponseOneOf + } + + // all schemas are nil + return nil +} + +type NullableGetEmailSettings200Response struct { + value *GetEmailSettings200Response + isSet bool +} + +func (v NullableGetEmailSettings200Response) Get() *GetEmailSettings200Response { + return v.value +} + +func (v *NullableGetEmailSettings200Response) Set(val *GetEmailSettings200Response) { + v.value = val + v.isSet = true +} + +func (v NullableGetEmailSettings200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableGetEmailSettings200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetEmailSettings200Response(val *GetEmailSettings200Response) *NullableGetEmailSettings200Response { + return &NullableGetEmailSettings200Response{value: val, isSet: true} +} + +func (v NullableGetEmailSettings200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetEmailSettings200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_get_email_settings_200_response_one_of.go b/model_get_email_settings_200_response_one_of.go new file mode 100644 index 0000000..e31245d --- /dev/null +++ b/model_get_email_settings_200_response_one_of.go @@ -0,0 +1,126 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the GetEmailSettings200ResponseOneOf type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetEmailSettings200ResponseOneOf{} + +// GetEmailSettings200ResponseOneOf struct for GetEmailSettings200ResponseOneOf +type GetEmailSettings200ResponseOneOf struct { + Mode *string `json:"mode,omitempty"` +} + +// NewGetEmailSettings200ResponseOneOf instantiates a new GetEmailSettings200ResponseOneOf 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 NewGetEmailSettings200ResponseOneOf() *GetEmailSettings200ResponseOneOf { + this := GetEmailSettings200ResponseOneOf{} + return &this +} + +// NewGetEmailSettings200ResponseOneOfWithDefaults instantiates a new GetEmailSettings200ResponseOneOf 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 NewGetEmailSettings200ResponseOneOfWithDefaults() *GetEmailSettings200ResponseOneOf { + this := GetEmailSettings200ResponseOneOf{} + return &this +} + +// GetMode returns the Mode field value if set, zero value otherwise. +func (o *GetEmailSettings200ResponseOneOf) GetMode() string { + if o == nil || isNil(o.Mode) { + var ret string + return ret + } + 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. +func (o *GetEmailSettings200ResponseOneOf) GetModeOk() (*string, bool) { + if o == nil || isNil(o.Mode) { + return nil, false + } + return o.Mode, true +} + +// HasMode returns a boolean if a field has been set. +func (o *GetEmailSettings200ResponseOneOf) HasMode() bool { + if o != nil && !isNil(o.Mode) { + return true + } + + return false +} + +// SetMode gets a reference to the given string and assigns it to the Mode field. +func (o *GetEmailSettings200ResponseOneOf) SetMode(v string) { + o.Mode = &v +} + +func (o GetEmailSettings200ResponseOneOf) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetEmailSettings200ResponseOneOf) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.Mode) { + toSerialize["mode"] = o.Mode + } + return toSerialize, nil +} + +type NullableGetEmailSettings200ResponseOneOf struct { + value *GetEmailSettings200ResponseOneOf + isSet bool +} + +func (v NullableGetEmailSettings200ResponseOneOf) Get() *GetEmailSettings200ResponseOneOf { + return v.value +} + +func (v *NullableGetEmailSettings200ResponseOneOf) Set(val *GetEmailSettings200ResponseOneOf) { + v.value = val + v.isSet = true +} + +func (v NullableGetEmailSettings200ResponseOneOf) IsSet() bool { + return v.isSet +} + +func (v *NullableGetEmailSettings200ResponseOneOf) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetEmailSettings200ResponseOneOf(val *GetEmailSettings200ResponseOneOf) *NullableGetEmailSettings200ResponseOneOf { + return &NullableGetEmailSettings200ResponseOneOf{value: val, isSet: true} +} + +func (v NullableGetEmailSettings200ResponseOneOf) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetEmailSettings200ResponseOneOf) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_get_enrolled_factors_200_response.go b/model_get_enrolled_factors_200_response.go new file mode 100644 index 0000000..04c78e4 --- /dev/null +++ b/model_get_enrolled_factors_200_response.go @@ -0,0 +1,162 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the GetEnrolledFactors200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetEnrolledFactors200Response{} + +// GetEnrolledFactors200Response struct for GetEnrolledFactors200Response +type GetEnrolledFactors200Response struct { + Status *Error `json:"status,omitempty"` + Data *GetEnrolledFactors200ResponseData `json:"data,omitempty"` +} + +// NewGetEnrolledFactors200Response instantiates a new GetEnrolledFactors200Response 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 NewGetEnrolledFactors200Response() *GetEnrolledFactors200Response { + this := GetEnrolledFactors200Response{} + return &this +} + +// NewGetEnrolledFactors200ResponseWithDefaults instantiates a new GetEnrolledFactors200Response 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 NewGetEnrolledFactors200ResponseWithDefaults() *GetEnrolledFactors200Response { + this := GetEnrolledFactors200Response{} + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *GetEnrolledFactors200Response) GetStatus() Error { + if o == nil || isNil(o.Status) { + var ret Error + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetEnrolledFactors200Response) GetStatusOk() (*Error, bool) { + if o == nil || isNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *GetEnrolledFactors200Response) HasStatus() bool { + if o != nil && !isNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given Error and assigns it to the Status field. +func (o *GetEnrolledFactors200Response) SetStatus(v Error) { + o.Status = &v +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *GetEnrolledFactors200Response) GetData() GetEnrolledFactors200ResponseData { + if o == nil || isNil(o.Data) { + var ret GetEnrolledFactors200ResponseData + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetEnrolledFactors200Response) GetDataOk() (*GetEnrolledFactors200ResponseData, bool) { + if o == nil || isNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *GetEnrolledFactors200Response) HasData() bool { + if o != nil && !isNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given GetEnrolledFactors200ResponseData and assigns it to the Data field. +func (o *GetEnrolledFactors200Response) SetData(v GetEnrolledFactors200ResponseData) { + o.Data = &v +} + +func (o GetEnrolledFactors200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetEnrolledFactors200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.Status) { + toSerialize["status"] = o.Status + } + if !isNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullableGetEnrolledFactors200Response struct { + value *GetEnrolledFactors200Response + isSet bool +} + +func (v NullableGetEnrolledFactors200Response) Get() *GetEnrolledFactors200Response { + return v.value +} + +func (v *NullableGetEnrolledFactors200Response) Set(val *GetEnrolledFactors200Response) { + v.value = val + v.isSet = true +} + +func (v NullableGetEnrolledFactors200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableGetEnrolledFactors200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetEnrolledFactors200Response(val *GetEnrolledFactors200Response) *NullableGetEnrolledFactors200Response { + return &NullableGetEnrolledFactors200Response{value: val, isSet: true} +} + +func (v NullableGetEnrolledFactors200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetEnrolledFactors200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_get_enrolled_factors_200_response_data.go b/model_get_enrolled_factors_200_response_data.go new file mode 100644 index 0000000..44e2409 --- /dev/null +++ b/model_get_enrolled_factors_200_response_data.go @@ -0,0 +1,126 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the GetEnrolledFactors200ResponseData type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetEnrolledFactors200ResponseData{} + +// GetEnrolledFactors200ResponseData struct for GetEnrolledFactors200ResponseData +type GetEnrolledFactors200ResponseData struct { + OtpDevices []GetEnrolledFactors200ResponseDataOtpDevicesInner `json:"otp_devices,omitempty"` +} + +// NewGetEnrolledFactors200ResponseData instantiates a new GetEnrolledFactors200ResponseData 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 NewGetEnrolledFactors200ResponseData() *GetEnrolledFactors200ResponseData { + this := GetEnrolledFactors200ResponseData{} + return &this +} + +// NewGetEnrolledFactors200ResponseDataWithDefaults instantiates a new GetEnrolledFactors200ResponseData 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 NewGetEnrolledFactors200ResponseDataWithDefaults() *GetEnrolledFactors200ResponseData { + this := GetEnrolledFactors200ResponseData{} + return &this +} + +// GetOtpDevices returns the OtpDevices field value if set, zero value otherwise. +func (o *GetEnrolledFactors200ResponseData) GetOtpDevices() []GetEnrolledFactors200ResponseDataOtpDevicesInner { + if o == nil || isNil(o.OtpDevices) { + var ret []GetEnrolledFactors200ResponseDataOtpDevicesInner + return ret + } + return o.OtpDevices +} + +// GetOtpDevicesOk returns a tuple with the OtpDevices field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetEnrolledFactors200ResponseData) GetOtpDevicesOk() ([]GetEnrolledFactors200ResponseDataOtpDevicesInner, bool) { + if o == nil || isNil(o.OtpDevices) { + return nil, false + } + return o.OtpDevices, true +} + +// HasOtpDevices returns a boolean if a field has been set. +func (o *GetEnrolledFactors200ResponseData) HasOtpDevices() bool { + if o != nil && !isNil(o.OtpDevices) { + return true + } + + return false +} + +// SetOtpDevices gets a reference to the given []GetEnrolledFactors200ResponseDataOtpDevicesInner and assigns it to the OtpDevices field. +func (o *GetEnrolledFactors200ResponseData) SetOtpDevices(v []GetEnrolledFactors200ResponseDataOtpDevicesInner) { + o.OtpDevices = v +} + +func (o GetEnrolledFactors200ResponseData) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetEnrolledFactors200ResponseData) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.OtpDevices) { + toSerialize["otp_devices"] = o.OtpDevices + } + return toSerialize, nil +} + +type NullableGetEnrolledFactors200ResponseData struct { + value *GetEnrolledFactors200ResponseData + isSet bool +} + +func (v NullableGetEnrolledFactors200ResponseData) Get() *GetEnrolledFactors200ResponseData { + return v.value +} + +func (v *NullableGetEnrolledFactors200ResponseData) Set(val *GetEnrolledFactors200ResponseData) { + v.value = val + v.isSet = true +} + +func (v NullableGetEnrolledFactors200ResponseData) IsSet() bool { + return v.isSet +} + +func (v *NullableGetEnrolledFactors200ResponseData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetEnrolledFactors200ResponseData(val *GetEnrolledFactors200ResponseData) *NullableGetEnrolledFactors200ResponseData { + return &NullableGetEnrolledFactors200ResponseData{value: val, isSet: true} +} + +func (v NullableGetEnrolledFactors200ResponseData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetEnrolledFactors200ResponseData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_get_enrolled_factors_200_response_data_otp_devices_inner.go b/model_get_enrolled_factors_200_response_data_otp_devices_inner.go new file mode 100644 index 0000000..a3266c5 --- /dev/null +++ b/model_get_enrolled_factors_200_response_data_otp_devices_inner.go @@ -0,0 +1,423 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the GetEnrolledFactors200ResponseDataOtpDevicesInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetEnrolledFactors200ResponseDataOtpDevicesInner{} + +// GetEnrolledFactors200ResponseDataOtpDevicesInner struct for GetEnrolledFactors200ResponseDataOtpDevicesInner +type GetEnrolledFactors200ResponseDataOtpDevicesInner struct { + // True = enabled (used successfully for authentication at least once). False = pending (registered but never used). + Active *bool `json:"active,omitempty"` + // True = is user’s default MFA device for OneLogin. + Default *bool `json:"default,omitempty"` + // A short lived token that is required to Verify the Factor. This token expires in 120 seconds. + StateToken *string `json:"state_token,omitempty"` + // \"Official\" authentication factor name, as it appears to administrators in OneLogin. + AuthFactorName *string `json:"auth_factor_name,omitempty"` + // For OTP codes sent via SMS, the phone number receiving the SMS message. + PhoneNumber *string `json:"phone_number,omitempty"` + // Authentication factor display name as it appears to users upon initial registration, as defined by admins at Settings > Authentication Factors. + TypeDisplayName *string `json:"type_display_name,omitempty"` + // true: You MUST Activate this Factor to trigger an SMS or Push notification before Verifying the OTP code. false: No Activation required. You can Verify the OTP immediately. MFA factors that provide both push notifications (user accepts notification) and pull code submission (user initiates code submission from device or enters it manually) should appear twice; once with needs_trigger: true and once with needs_trigger: false. + NeedsTrigger *bool `json:"needs_trigger,omitempty"` + // Authentication factor display name assigned by users when they enroll the device. + UserDisplayName *string `json:"user_display_name,omitempty"` + // MFA device identifier. + Id *int32 `json:"id,omitempty"` +} + +// NewGetEnrolledFactors200ResponseDataOtpDevicesInner instantiates a new GetEnrolledFactors200ResponseDataOtpDevicesInner 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 NewGetEnrolledFactors200ResponseDataOtpDevicesInner() *GetEnrolledFactors200ResponseDataOtpDevicesInner { + this := GetEnrolledFactors200ResponseDataOtpDevicesInner{} + return &this +} + +// NewGetEnrolledFactors200ResponseDataOtpDevicesInnerWithDefaults instantiates a new GetEnrolledFactors200ResponseDataOtpDevicesInner 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 NewGetEnrolledFactors200ResponseDataOtpDevicesInnerWithDefaults() *GetEnrolledFactors200ResponseDataOtpDevicesInner { + this := GetEnrolledFactors200ResponseDataOtpDevicesInner{} + return &this +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) GetActive() bool { + if o == nil || isNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) GetActiveOk() (*bool, bool) { + if o == nil || isNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) HasActive() bool { + if o != nil && !isNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) SetActive(v bool) { + o.Active = &v +} + +// GetDefault returns the Default field value if set, zero value otherwise. +func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) GetDefault() bool { + if o == nil || isNil(o.Default) { + var ret bool + return ret + } + return *o.Default +} + +// 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 *GetEnrolledFactors200ResponseDataOtpDevicesInner) GetDefaultOk() (*bool, bool) { + if o == nil || isNil(o.Default) { + return nil, false + } + return o.Default, true +} + +// HasDefault returns a boolean if a field has been set. +func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) HasDefault() bool { + if o != nil && !isNil(o.Default) { + return true + } + + return false +} + +// SetDefault gets a reference to the given bool and assigns it to the Default field. +func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) SetDefault(v bool) { + o.Default = &v +} + +// GetStateToken returns the StateToken field value if set, zero value otherwise. +func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) GetStateToken() string { + if o == nil || isNil(o.StateToken) { + var ret string + return ret + } + return *o.StateToken +} + +// GetStateTokenOk returns a tuple with the StateToken field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) GetStateTokenOk() (*string, bool) { + if o == nil || isNil(o.StateToken) { + return nil, false + } + return o.StateToken, true +} + +// HasStateToken returns a boolean if a field has been set. +func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) HasStateToken() bool { + if o != nil && !isNil(o.StateToken) { + return true + } + + return false +} + +// SetStateToken gets a reference to the given string and assigns it to the StateToken field. +func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) SetStateToken(v string) { + o.StateToken = &v +} + +// GetAuthFactorName returns the AuthFactorName field value if set, zero value otherwise. +func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) GetAuthFactorName() string { + if o == nil || isNil(o.AuthFactorName) { + var ret string + return ret + } + return *o.AuthFactorName +} + +// GetAuthFactorNameOk returns a tuple with the AuthFactorName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) GetAuthFactorNameOk() (*string, bool) { + if o == nil || isNil(o.AuthFactorName) { + return nil, false + } + return o.AuthFactorName, true +} + +// HasAuthFactorName returns a boolean if a field has been set. +func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) HasAuthFactorName() bool { + if o != nil && !isNil(o.AuthFactorName) { + return true + } + + return false +} + +// SetAuthFactorName gets a reference to the given string and assigns it to the AuthFactorName field. +func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) SetAuthFactorName(v string) { + o.AuthFactorName = &v +} + +// GetPhoneNumber returns the PhoneNumber field value if set, zero value otherwise. +func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) GetPhoneNumber() string { + if o == nil || isNil(o.PhoneNumber) { + var ret string + return ret + } + return *o.PhoneNumber +} + +// 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 *GetEnrolledFactors200ResponseDataOtpDevicesInner) GetPhoneNumberOk() (*string, bool) { + if o == nil || isNil(o.PhoneNumber) { + return nil, false + } + return o.PhoneNumber, true +} + +// HasPhoneNumber returns a boolean if a field has been set. +func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) HasPhoneNumber() bool { + if o != nil && !isNil(o.PhoneNumber) { + return true + } + + return false +} + +// SetPhoneNumber gets a reference to the given string and assigns it to the PhoneNumber field. +func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) SetPhoneNumber(v string) { + o.PhoneNumber = &v +} + +// GetTypeDisplayName returns the TypeDisplayName field value if set, zero value otherwise. +func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) GetTypeDisplayName() string { + if o == nil || isNil(o.TypeDisplayName) { + var ret string + return ret + } + return *o.TypeDisplayName +} + +// GetTypeDisplayNameOk returns a tuple with the TypeDisplayName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) GetTypeDisplayNameOk() (*string, bool) { + if o == nil || isNil(o.TypeDisplayName) { + return nil, false + } + return o.TypeDisplayName, true +} + +// HasTypeDisplayName returns a boolean if a field has been set. +func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) HasTypeDisplayName() bool { + if o != nil && !isNil(o.TypeDisplayName) { + return true + } + + return false +} + +// SetTypeDisplayName gets a reference to the given string and assigns it to the TypeDisplayName field. +func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) SetTypeDisplayName(v string) { + o.TypeDisplayName = &v +} + +// GetNeedsTrigger returns the NeedsTrigger field value if set, zero value otherwise. +func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) GetNeedsTrigger() bool { + if o == nil || isNil(o.NeedsTrigger) { + var ret bool + return ret + } + return *o.NeedsTrigger +} + +// GetNeedsTriggerOk returns a tuple with the NeedsTrigger field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) GetNeedsTriggerOk() (*bool, bool) { + if o == nil || isNil(o.NeedsTrigger) { + return nil, false + } + return o.NeedsTrigger, true +} + +// HasNeedsTrigger returns a boolean if a field has been set. +func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) HasNeedsTrigger() bool { + if o != nil && !isNil(o.NeedsTrigger) { + return true + } + + return false +} + +// SetNeedsTrigger gets a reference to the given bool and assigns it to the NeedsTrigger field. +func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) SetNeedsTrigger(v bool) { + o.NeedsTrigger = &v +} + +// GetUserDisplayName returns the UserDisplayName field value if set, zero value otherwise. +func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) GetUserDisplayName() string { + if o == nil || isNil(o.UserDisplayName) { + var ret string + return ret + } + return *o.UserDisplayName +} + +// GetUserDisplayNameOk returns a tuple with the UserDisplayName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) GetUserDisplayNameOk() (*string, bool) { + if o == nil || isNil(o.UserDisplayName) { + return nil, false + } + return o.UserDisplayName, true +} + +// HasUserDisplayName returns a boolean if a field has been set. +func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) HasUserDisplayName() bool { + if o != nil && !isNil(o.UserDisplayName) { + return true + } + + return false +} + +// SetUserDisplayName gets a reference to the given string and assigns it to the UserDisplayName field. +func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) SetUserDisplayName(v string) { + o.UserDisplayName = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) GetId() int32 { + if o == nil || isNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) GetIdOk() (*int32, bool) { + if o == nil || isNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) HasId() bool { + if o != nil && !isNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) SetId(v int32) { + o.Id = &v +} + +func (o GetEnrolledFactors200ResponseDataOtpDevicesInner) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetEnrolledFactors200ResponseDataOtpDevicesInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.Active) { + toSerialize["active"] = o.Active + } + if !isNil(o.Default) { + toSerialize["default"] = o.Default + } + if !isNil(o.StateToken) { + toSerialize["state_token"] = o.StateToken + } + if !isNil(o.AuthFactorName) { + toSerialize["auth_factor_name"] = o.AuthFactorName + } + if !isNil(o.PhoneNumber) { + toSerialize["phone_number"] = o.PhoneNumber + } + if !isNil(o.TypeDisplayName) { + toSerialize["type_display_name"] = o.TypeDisplayName + } + if !isNil(o.NeedsTrigger) { + toSerialize["needs_trigger"] = o.NeedsTrigger + } + if !isNil(o.UserDisplayName) { + toSerialize["user_display_name"] = o.UserDisplayName + } + if !isNil(o.Id) { + toSerialize["id"] = o.Id + } + return toSerialize, nil +} + +type NullableGetEnrolledFactors200ResponseDataOtpDevicesInner struct { + value *GetEnrolledFactors200ResponseDataOtpDevicesInner + isSet bool +} + +func (v NullableGetEnrolledFactors200ResponseDataOtpDevicesInner) Get() *GetEnrolledFactors200ResponseDataOtpDevicesInner { + return v.value +} + +func (v *NullableGetEnrolledFactors200ResponseDataOtpDevicesInner) Set(val *GetEnrolledFactors200ResponseDataOtpDevicesInner) { + v.value = val + v.isSet = true +} + +func (v NullableGetEnrolledFactors200ResponseDataOtpDevicesInner) IsSet() bool { + return v.isSet +} + +func (v *NullableGetEnrolledFactors200ResponseDataOtpDevicesInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetEnrolledFactors200ResponseDataOtpDevicesInner(val *GetEnrolledFactors200ResponseDataOtpDevicesInner) *NullableGetEnrolledFactors200ResponseDataOtpDevicesInner { + return &NullableGetEnrolledFactors200ResponseDataOtpDevicesInner{value: val, isSet: true} +} + +func (v NullableGetEnrolledFactors200ResponseDataOtpDevicesInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetEnrolledFactors200ResponseDataOtpDevicesInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_get_event_by_id_200_response.go b/model_get_event_by_id_200_response.go new file mode 100644 index 0000000..c2eeee2 --- /dev/null +++ b/model_get_event_by_id_200_response.go @@ -0,0 +1,162 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the GetEventById200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetEventById200Response{} + +// GetEventById200Response struct for GetEventById200Response +type GetEventById200Response struct { + Status *Error `json:"status,omitempty"` + Data *Event `json:"data,omitempty"` +} + +// NewGetEventById200Response instantiates a new GetEventById200Response 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 NewGetEventById200Response() *GetEventById200Response { + this := GetEventById200Response{} + return &this +} + +// NewGetEventById200ResponseWithDefaults instantiates a new GetEventById200Response 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 NewGetEventById200ResponseWithDefaults() *GetEventById200Response { + this := GetEventById200Response{} + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *GetEventById200Response) GetStatus() Error { + if o == nil || isNil(o.Status) { + var ret Error + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetEventById200Response) GetStatusOk() (*Error, bool) { + if o == nil || isNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *GetEventById200Response) HasStatus() bool { + if o != nil && !isNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given Error and assigns it to the Status field. +func (o *GetEventById200Response) SetStatus(v Error) { + o.Status = &v +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *GetEventById200Response) GetData() Event { + if o == nil || isNil(o.Data) { + var ret Event + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetEventById200Response) GetDataOk() (*Event, bool) { + if o == nil || isNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *GetEventById200Response) HasData() bool { + if o != nil && !isNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given Event and assigns it to the Data field. +func (o *GetEventById200Response) SetData(v Event) { + o.Data = &v +} + +func (o GetEventById200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetEventById200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.Status) { + toSerialize["status"] = o.Status + } + if !isNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullableGetEventById200Response struct { + value *GetEventById200Response + isSet bool +} + +func (v NullableGetEventById200Response) Get() *GetEventById200Response { + return v.value +} + +func (v *NullableGetEventById200Response) Set(val *GetEventById200Response) { + v.value = val + v.isSet = true +} + +func (v NullableGetEventById200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableGetEventById200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetEventById200Response(val *GetEventById200Response) *NullableGetEventById200Response { + return &NullableGetEventById200Response{value: val, isSet: true} +} + +func (v NullableGetEventById200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetEventById200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_get_event_types_200_response.go b/model_get_event_types_200_response.go new file mode 100644 index 0000000..4e6ad74 --- /dev/null +++ b/model_get_event_types_200_response.go @@ -0,0 +1,162 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the GetEventTypes200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetEventTypes200Response{} + +// GetEventTypes200Response struct for GetEventTypes200Response +type GetEventTypes200Response struct { + Status *Error `json:"status,omitempty"` + Data []GetEventTypes200ResponseDataInner `json:"data,omitempty"` +} + +// NewGetEventTypes200Response instantiates a new GetEventTypes200Response 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 NewGetEventTypes200Response() *GetEventTypes200Response { + this := GetEventTypes200Response{} + return &this +} + +// NewGetEventTypes200ResponseWithDefaults instantiates a new GetEventTypes200Response 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 NewGetEventTypes200ResponseWithDefaults() *GetEventTypes200Response { + this := GetEventTypes200Response{} + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *GetEventTypes200Response) GetStatus() Error { + if o == nil || isNil(o.Status) { + var ret Error + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetEventTypes200Response) GetStatusOk() (*Error, bool) { + if o == nil || isNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *GetEventTypes200Response) HasStatus() bool { + if o != nil && !isNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given Error and assigns it to the Status field. +func (o *GetEventTypes200Response) SetStatus(v Error) { + o.Status = &v +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *GetEventTypes200Response) GetData() []GetEventTypes200ResponseDataInner { + if o == nil || isNil(o.Data) { + var ret []GetEventTypes200ResponseDataInner + return ret + } + return o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetEventTypes200Response) GetDataOk() ([]GetEventTypes200ResponseDataInner, bool) { + if o == nil || isNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *GetEventTypes200Response) HasData() bool { + if o != nil && !isNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given []GetEventTypes200ResponseDataInner and assigns it to the Data field. +func (o *GetEventTypes200Response) SetData(v []GetEventTypes200ResponseDataInner) { + o.Data = v +} + +func (o GetEventTypes200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetEventTypes200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.Status) { + toSerialize["status"] = o.Status + } + if !isNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullableGetEventTypes200Response struct { + value *GetEventTypes200Response + isSet bool +} + +func (v NullableGetEventTypes200Response) Get() *GetEventTypes200Response { + return v.value +} + +func (v *NullableGetEventTypes200Response) Set(val *GetEventTypes200Response) { + v.value = val + v.isSet = true +} + +func (v NullableGetEventTypes200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableGetEventTypes200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetEventTypes200Response(val *GetEventTypes200Response) *NullableGetEventTypes200Response { + return &NullableGetEventTypes200Response{value: val, isSet: true} +} + +func (v NullableGetEventTypes200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetEventTypes200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_get_event_types_200_response_data_inner.go b/model_get_event_types_200_response_data_inner.go new file mode 100644 index 0000000..b8f9d4f --- /dev/null +++ b/model_get_event_types_200_response_data_inner.go @@ -0,0 +1,198 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the GetEventTypes200ResponseDataInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetEventTypes200ResponseDataInner{} + +// GetEventTypes200ResponseDataInner struct for GetEventTypes200ResponseDataInner +type GetEventTypes200ResponseDataInner struct { + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Id *int32 `json:"id,omitempty"` +} + +// NewGetEventTypes200ResponseDataInner instantiates a new GetEventTypes200ResponseDataInner 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 NewGetEventTypes200ResponseDataInner() *GetEventTypes200ResponseDataInner { + this := GetEventTypes200ResponseDataInner{} + return &this +} + +// NewGetEventTypes200ResponseDataInnerWithDefaults instantiates a new GetEventTypes200ResponseDataInner 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 NewGetEventTypes200ResponseDataInnerWithDefaults() *GetEventTypes200ResponseDataInner { + this := GetEventTypes200ResponseDataInner{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *GetEventTypes200ResponseDataInner) GetName() string { + if o == nil || isNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// 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 *GetEventTypes200ResponseDataInner) GetNameOk() (*string, bool) { + if o == nil || isNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *GetEventTypes200ResponseDataInner) HasName() bool { + if o != nil && !isNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *GetEventTypes200ResponseDataInner) SetName(v string) { + o.Name = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *GetEventTypes200ResponseDataInner) GetDescription() string { + if o == nil || isNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// 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 *GetEventTypes200ResponseDataInner) GetDescriptionOk() (*string, bool) { + if o == nil || isNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *GetEventTypes200ResponseDataInner) HasDescription() bool { + if o != nil && !isNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *GetEventTypes200ResponseDataInner) SetDescription(v string) { + o.Description = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *GetEventTypes200ResponseDataInner) GetId() int32 { + if o == nil || isNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetEventTypes200ResponseDataInner) GetIdOk() (*int32, bool) { + if o == nil || isNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *GetEventTypes200ResponseDataInner) HasId() bool { + if o != nil && !isNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *GetEventTypes200ResponseDataInner) SetId(v int32) { + o.Id = &v +} + +func (o GetEventTypes200ResponseDataInner) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetEventTypes200ResponseDataInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.Name) { + toSerialize["name"] = o.Name + } + if !isNil(o.Description) { + toSerialize["description"] = o.Description + } + if !isNil(o.Id) { + toSerialize["id"] = o.Id + } + return toSerialize, nil +} + +type NullableGetEventTypes200ResponseDataInner struct { + value *GetEventTypes200ResponseDataInner + isSet bool +} + +func (v NullableGetEventTypes200ResponseDataInner) Get() *GetEventTypes200ResponseDataInner { + return v.value +} + +func (v *NullableGetEventTypes200ResponseDataInner) Set(val *GetEventTypes200ResponseDataInner) { + v.value = val + v.isSet = true +} + +func (v NullableGetEventTypes200ResponseDataInner) IsSet() bool { + return v.isSet +} + +func (v *NullableGetEventTypes200ResponseDataInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetEventTypes200ResponseDataInner(val *GetEventTypes200ResponseDataInner) *NullableGetEventTypes200ResponseDataInner { + return &NullableGetEventTypes200ResponseDataInner{value: val, isSet: true} +} + +func (v NullableGetEventTypes200ResponseDataInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetEventTypes200ResponseDataInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_get_events_200_response.go b/model_get_events_200_response.go new file mode 100644 index 0000000..2173fe7 --- /dev/null +++ b/model_get_events_200_response.go @@ -0,0 +1,198 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the GetEvents200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetEvents200Response{} + +// GetEvents200Response struct for GetEvents200Response +type GetEvents200Response struct { + Status *Error `json:"status,omitempty"` + Pagination *GetEvents200ResponsePagination `json:"pagination,omitempty"` + Data []Event `json:"data,omitempty"` +} + +// NewGetEvents200Response instantiates a new GetEvents200Response 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 NewGetEvents200Response() *GetEvents200Response { + this := GetEvents200Response{} + return &this +} + +// NewGetEvents200ResponseWithDefaults instantiates a new GetEvents200Response 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 NewGetEvents200ResponseWithDefaults() *GetEvents200Response { + this := GetEvents200Response{} + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *GetEvents200Response) GetStatus() Error { + if o == nil || isNil(o.Status) { + var ret Error + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetEvents200Response) GetStatusOk() (*Error, bool) { + if o == nil || isNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *GetEvents200Response) HasStatus() bool { + if o != nil && !isNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given Error and assigns it to the Status field. +func (o *GetEvents200Response) SetStatus(v Error) { + o.Status = &v +} + +// GetPagination returns the Pagination field value if set, zero value otherwise. +func (o *GetEvents200Response) GetPagination() GetEvents200ResponsePagination { + if o == nil || isNil(o.Pagination) { + var ret GetEvents200ResponsePagination + return ret + } + return *o.Pagination +} + +// GetPaginationOk returns a tuple with the Pagination field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetEvents200Response) GetPaginationOk() (*GetEvents200ResponsePagination, bool) { + if o == nil || isNil(o.Pagination) { + return nil, false + } + return o.Pagination, true +} + +// HasPagination returns a boolean if a field has been set. +func (o *GetEvents200Response) HasPagination() bool { + if o != nil && !isNil(o.Pagination) { + return true + } + + return false +} + +// SetPagination gets a reference to the given GetEvents200ResponsePagination and assigns it to the Pagination field. +func (o *GetEvents200Response) SetPagination(v GetEvents200ResponsePagination) { + o.Pagination = &v +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *GetEvents200Response) GetData() []Event { + if o == nil || isNil(o.Data) { + var ret []Event + return ret + } + return o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetEvents200Response) GetDataOk() ([]Event, bool) { + if o == nil || isNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *GetEvents200Response) HasData() bool { + if o != nil && !isNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given []Event and assigns it to the Data field. +func (o *GetEvents200Response) SetData(v []Event) { + o.Data = v +} + +func (o GetEvents200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetEvents200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.Status) { + toSerialize["status"] = o.Status + } + if !isNil(o.Pagination) { + toSerialize["pagination"] = o.Pagination + } + if !isNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullableGetEvents200Response struct { + value *GetEvents200Response + isSet bool +} + +func (v NullableGetEvents200Response) Get() *GetEvents200Response { + return v.value +} + +func (v *NullableGetEvents200Response) Set(val *GetEvents200Response) { + v.value = val + v.isSet = true +} + +func (v NullableGetEvents200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableGetEvents200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetEvents200Response(val *GetEvents200Response) *NullableGetEvents200Response { + return &NullableGetEvents200Response{value: val, isSet: true} +} + +func (v NullableGetEvents200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetEvents200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_get_events_200_response_pagination.go b/model_get_events_200_response_pagination.go new file mode 100644 index 0000000..313c584 --- /dev/null +++ b/model_get_events_200_response_pagination.go @@ -0,0 +1,234 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the GetEvents200ResponsePagination type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetEvents200ResponsePagination{} + +// GetEvents200ResponsePagination struct for GetEvents200ResponsePagination +type GetEvents200ResponsePagination struct { + BeforeCursor *string `json:"before_cursor,omitempty"` + AfterCursor *string `json:"after_cursor,omitempty"` + PreviousLink *string `json:"previous_link,omitempty"` + NextLink *string `json:"next_link,omitempty"` +} + +// NewGetEvents200ResponsePagination instantiates a new GetEvents200ResponsePagination 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 NewGetEvents200ResponsePagination() *GetEvents200ResponsePagination { + this := GetEvents200ResponsePagination{} + return &this +} + +// NewGetEvents200ResponsePaginationWithDefaults instantiates a new GetEvents200ResponsePagination 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 NewGetEvents200ResponsePaginationWithDefaults() *GetEvents200ResponsePagination { + this := GetEvents200ResponsePagination{} + return &this +} + +// GetBeforeCursor returns the BeforeCursor field value if set, zero value otherwise. +func (o *GetEvents200ResponsePagination) GetBeforeCursor() string { + if o == nil || isNil(o.BeforeCursor) { + var ret string + return ret + } + return *o.BeforeCursor +} + +// GetBeforeCursorOk returns a tuple with the BeforeCursor field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetEvents200ResponsePagination) GetBeforeCursorOk() (*string, bool) { + if o == nil || isNil(o.BeforeCursor) { + return nil, false + } + return o.BeforeCursor, true +} + +// HasBeforeCursor returns a boolean if a field has been set. +func (o *GetEvents200ResponsePagination) HasBeforeCursor() bool { + if o != nil && !isNil(o.BeforeCursor) { + return true + } + + return false +} + +// SetBeforeCursor gets a reference to the given string and assigns it to the BeforeCursor field. +func (o *GetEvents200ResponsePagination) SetBeforeCursor(v string) { + o.BeforeCursor = &v +} + +// GetAfterCursor returns the AfterCursor field value if set, zero value otherwise. +func (o *GetEvents200ResponsePagination) GetAfterCursor() string { + if o == nil || isNil(o.AfterCursor) { + var ret string + return ret + } + return *o.AfterCursor +} + +// GetAfterCursorOk returns a tuple with the AfterCursor field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetEvents200ResponsePagination) GetAfterCursorOk() (*string, bool) { + if o == nil || isNil(o.AfterCursor) { + return nil, false + } + return o.AfterCursor, true +} + +// HasAfterCursor returns a boolean if a field has been set. +func (o *GetEvents200ResponsePagination) HasAfterCursor() bool { + if o != nil && !isNil(o.AfterCursor) { + return true + } + + return false +} + +// SetAfterCursor gets a reference to the given string and assigns it to the AfterCursor field. +func (o *GetEvents200ResponsePagination) SetAfterCursor(v string) { + o.AfterCursor = &v +} + +// GetPreviousLink returns the PreviousLink field value if set, zero value otherwise. +func (o *GetEvents200ResponsePagination) GetPreviousLink() string { + if o == nil || isNil(o.PreviousLink) { + var ret string + return ret + } + return *o.PreviousLink +} + +// GetPreviousLinkOk returns a tuple with the PreviousLink field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetEvents200ResponsePagination) GetPreviousLinkOk() (*string, bool) { + if o == nil || isNil(o.PreviousLink) { + return nil, false + } + return o.PreviousLink, true +} + +// HasPreviousLink returns a boolean if a field has been set. +func (o *GetEvents200ResponsePagination) HasPreviousLink() bool { + if o != nil && !isNil(o.PreviousLink) { + return true + } + + return false +} + +// SetPreviousLink gets a reference to the given string and assigns it to the PreviousLink field. +func (o *GetEvents200ResponsePagination) SetPreviousLink(v string) { + o.PreviousLink = &v +} + +// GetNextLink returns the NextLink field value if set, zero value otherwise. +func (o *GetEvents200ResponsePagination) GetNextLink() string { + if o == nil || isNil(o.NextLink) { + var ret string + return ret + } + return *o.NextLink +} + +// GetNextLinkOk returns a tuple with the NextLink field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetEvents200ResponsePagination) GetNextLinkOk() (*string, bool) { + if o == nil || isNil(o.NextLink) { + return nil, false + } + return o.NextLink, true +} + +// HasNextLink returns a boolean if a field has been set. +func (o *GetEvents200ResponsePagination) HasNextLink() bool { + if o != nil && !isNil(o.NextLink) { + return true + } + + return false +} + +// SetNextLink gets a reference to the given string and assigns it to the NextLink field. +func (o *GetEvents200ResponsePagination) SetNextLink(v string) { + o.NextLink = &v +} + +func (o GetEvents200ResponsePagination) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetEvents200ResponsePagination) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.BeforeCursor) { + toSerialize["before_cursor"] = o.BeforeCursor + } + if !isNil(o.AfterCursor) { + toSerialize["after_cursor"] = o.AfterCursor + } + if !isNil(o.PreviousLink) { + toSerialize["previous_link"] = o.PreviousLink + } + if !isNil(o.NextLink) { + toSerialize["next_link"] = o.NextLink + } + return toSerialize, nil +} + +type NullableGetEvents200ResponsePagination struct { + value *GetEvents200ResponsePagination + isSet bool +} + +func (v NullableGetEvents200ResponsePagination) Get() *GetEvents200ResponsePagination { + return v.value +} + +func (v *NullableGetEvents200ResponsePagination) Set(val *GetEvents200ResponsePagination) { + v.value = val + v.isSet = true +} + +func (v NullableGetEvents200ResponsePagination) IsSet() bool { + return v.isSet +} + +func (v *NullableGetEvents200ResponsePagination) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetEvents200ResponsePagination(val *GetEvents200ResponsePagination) *NullableGetEvents200ResponsePagination { + return &NullableGetEvents200ResponsePagination{value: val, isSet: true} +} + +func (v NullableGetEvents200ResponsePagination) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetEvents200ResponsePagination) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_get_groups_200_response.go b/model_get_groups_200_response.go new file mode 100644 index 0000000..724cb64 --- /dev/null +++ b/model_get_groups_200_response.go @@ -0,0 +1,162 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the GetGroups200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetGroups200Response{} + +// GetGroups200Response struct for GetGroups200Response +type GetGroups200Response struct { + Status *Error `json:"status,omitempty"` + Data []Group `json:"data,omitempty"` +} + +// NewGetGroups200Response instantiates a new GetGroups200Response 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 NewGetGroups200Response() *GetGroups200Response { + this := GetGroups200Response{} + return &this +} + +// NewGetGroups200ResponseWithDefaults instantiates a new GetGroups200Response 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 NewGetGroups200ResponseWithDefaults() *GetGroups200Response { + this := GetGroups200Response{} + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *GetGroups200Response) GetStatus() Error { + if o == nil || isNil(o.Status) { + var ret Error + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetGroups200Response) GetStatusOk() (*Error, bool) { + if o == nil || isNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *GetGroups200Response) HasStatus() bool { + if o != nil && !isNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given Error and assigns it to the Status field. +func (o *GetGroups200Response) SetStatus(v Error) { + o.Status = &v +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *GetGroups200Response) GetData() []Group { + if o == nil || isNil(o.Data) { + var ret []Group + return ret + } + return o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetGroups200Response) GetDataOk() ([]Group, bool) { + if o == nil || isNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *GetGroups200Response) HasData() bool { + if o != nil && !isNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given []Group and assigns it to the Data field. +func (o *GetGroups200Response) SetData(v []Group) { + o.Data = v +} + +func (o GetGroups200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetGroups200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.Status) { + toSerialize["status"] = o.Status + } + if !isNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullableGetGroups200Response struct { + value *GetGroups200Response + isSet bool +} + +func (v NullableGetGroups200Response) Get() *GetGroups200Response { + return v.value +} + +func (v *NullableGetGroups200Response) Set(val *GetGroups200Response) { + v.value = val + v.isSet = true +} + +func (v NullableGetGroups200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableGetGroups200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetGroups200Response(val *GetGroups200Response) *NullableGetGroups200Response { + return &NullableGetGroups200Response{value: val, isSet: true} +} + +func (v NullableGetGroups200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetGroups200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_get_invite_link_200_response.go b/model_get_invite_link_200_response.go new file mode 100644 index 0000000..c9757aa --- /dev/null +++ b/model_get_invite_link_200_response.go @@ -0,0 +1,163 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the GetInviteLink200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetInviteLink200Response{} + +// GetInviteLink200Response struct for GetInviteLink200Response +type GetInviteLink200Response struct { + Status *Error `json:"status,omitempty"` + // Provides reset password link + Data []string `json:"data,omitempty"` +} + +// NewGetInviteLink200Response instantiates a new GetInviteLink200Response 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 NewGetInviteLink200Response() *GetInviteLink200Response { + this := GetInviteLink200Response{} + return &this +} + +// NewGetInviteLink200ResponseWithDefaults instantiates a new GetInviteLink200Response 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 NewGetInviteLink200ResponseWithDefaults() *GetInviteLink200Response { + this := GetInviteLink200Response{} + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *GetInviteLink200Response) GetStatus() Error { + if o == nil || isNil(o.Status) { + var ret Error + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetInviteLink200Response) GetStatusOk() (*Error, bool) { + if o == nil || isNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *GetInviteLink200Response) HasStatus() bool { + if o != nil && !isNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given Error and assigns it to the Status field. +func (o *GetInviteLink200Response) SetStatus(v Error) { + o.Status = &v +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *GetInviteLink200Response) GetData() []string { + if o == nil || isNil(o.Data) { + var ret []string + return ret + } + return o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetInviteLink200Response) GetDataOk() ([]string, bool) { + if o == nil || isNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *GetInviteLink200Response) HasData() bool { + if o != nil && !isNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given []string and assigns it to the Data field. +func (o *GetInviteLink200Response) SetData(v []string) { + o.Data = v +} + +func (o GetInviteLink200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetInviteLink200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.Status) { + toSerialize["status"] = o.Status + } + if !isNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullableGetInviteLink200Response struct { + value *GetInviteLink200Response + isSet bool +} + +func (v NullableGetInviteLink200Response) Get() *GetInviteLink200Response { + return v.value +} + +func (v *NullableGetInviteLink200Response) Set(val *GetInviteLink200Response) { + v.value = val + v.isSet = true +} + +func (v NullableGetInviteLink200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableGetInviteLink200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetInviteLink200Response(val *GetInviteLink200Response) *NullableGetInviteLink200Response { + return &NullableGetInviteLink200Response{value: val, isSet: true} +} + +func (v NullableGetInviteLink200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetInviteLink200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_get_invite_link_request.go b/model_get_invite_link_request.go new file mode 100644 index 0000000..09ff7c3 --- /dev/null +++ b/model_get_invite_link_request.go @@ -0,0 +1,127 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the GetInviteLinkRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetInviteLinkRequest{} + +// GetInviteLinkRequest struct for GetInviteLinkRequest +type GetInviteLinkRequest struct { + // Set to the user email address to generate an invite link. The value is case sensitive. + Email *string `json:"email,omitempty"` +} + +// NewGetInviteLinkRequest instantiates a new GetInviteLinkRequest 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 NewGetInviteLinkRequest() *GetInviteLinkRequest { + this := GetInviteLinkRequest{} + return &this +} + +// NewGetInviteLinkRequestWithDefaults instantiates a new GetInviteLinkRequest 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 NewGetInviteLinkRequestWithDefaults() *GetInviteLinkRequest { + this := GetInviteLinkRequest{} + return &this +} + +// GetEmail returns the Email field value if set, zero value otherwise. +func (o *GetInviteLinkRequest) GetEmail() string { + if o == nil || isNil(o.Email) { + 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 *GetInviteLinkRequest) GetEmailOk() (*string, bool) { + if o == nil || isNil(o.Email) { + return nil, false + } + return o.Email, true +} + +// HasEmail returns a boolean if a field has been set. +func (o *GetInviteLinkRequest) HasEmail() bool { + if o != nil && !isNil(o.Email) { + return true + } + + return false +} + +// SetEmail gets a reference to the given string and assigns it to the Email field. +func (o *GetInviteLinkRequest) SetEmail(v string) { + o.Email = &v +} + +func (o GetInviteLinkRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetInviteLinkRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.Email) { + toSerialize["email"] = o.Email + } + return toSerialize, nil +} + +type NullableGetInviteLinkRequest struct { + value *GetInviteLinkRequest + isSet bool +} + +func (v NullableGetInviteLinkRequest) Get() *GetInviteLinkRequest { + return v.value +} + +func (v *NullableGetInviteLinkRequest) Set(val *GetInviteLinkRequest) { + v.value = val + v.isSet = true +} + +func (v NullableGetInviteLinkRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableGetInviteLinkRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetInviteLinkRequest(val *GetInviteLinkRequest) *NullableGetInviteLinkRequest { + return &NullableGetInviteLinkRequest{value: val, isSet: true} +} + +func (v NullableGetInviteLinkRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetInviteLinkRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_get_mfa_factors_200_response.go b/model_get_mfa_factors_200_response.go new file mode 100644 index 0000000..cdc4c02 --- /dev/null +++ b/model_get_mfa_factors_200_response.go @@ -0,0 +1,162 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the GetMFAFactors200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetMFAFactors200Response{} + +// GetMFAFactors200Response struct for GetMFAFactors200Response +type GetMFAFactors200Response struct { + Status *Error `json:"status,omitempty"` + Data *GetMFAFactors200ResponseData `json:"data,omitempty"` +} + +// NewGetMFAFactors200Response instantiates a new GetMFAFactors200Response 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 NewGetMFAFactors200Response() *GetMFAFactors200Response { + this := GetMFAFactors200Response{} + return &this +} + +// NewGetMFAFactors200ResponseWithDefaults instantiates a new GetMFAFactors200Response 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 NewGetMFAFactors200ResponseWithDefaults() *GetMFAFactors200Response { + this := GetMFAFactors200Response{} + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *GetMFAFactors200Response) GetStatus() Error { + if o == nil || isNil(o.Status) { + var ret Error + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetMFAFactors200Response) GetStatusOk() (*Error, bool) { + if o == nil || isNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *GetMFAFactors200Response) HasStatus() bool { + if o != nil && !isNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given Error and assigns it to the Status field. +func (o *GetMFAFactors200Response) SetStatus(v Error) { + o.Status = &v +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *GetMFAFactors200Response) GetData() GetMFAFactors200ResponseData { + if o == nil || isNil(o.Data) { + var ret GetMFAFactors200ResponseData + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetMFAFactors200Response) GetDataOk() (*GetMFAFactors200ResponseData, bool) { + if o == nil || isNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *GetMFAFactors200Response) HasData() bool { + if o != nil && !isNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given GetMFAFactors200ResponseData and assigns it to the Data field. +func (o *GetMFAFactors200Response) SetData(v GetMFAFactors200ResponseData) { + o.Data = &v +} + +func (o GetMFAFactors200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetMFAFactors200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.Status) { + toSerialize["status"] = o.Status + } + if !isNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullableGetMFAFactors200Response struct { + value *GetMFAFactors200Response + isSet bool +} + +func (v NullableGetMFAFactors200Response) Get() *GetMFAFactors200Response { + return v.value +} + +func (v *NullableGetMFAFactors200Response) Set(val *GetMFAFactors200Response) { + v.value = val + v.isSet = true +} + +func (v NullableGetMFAFactors200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableGetMFAFactors200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetMFAFactors200Response(val *GetMFAFactors200Response) *NullableGetMFAFactors200Response { + return &NullableGetMFAFactors200Response{value: val, isSet: true} +} + +func (v NullableGetMFAFactors200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetMFAFactors200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_get_mfa_factors_200_response_data.go b/model_get_mfa_factors_200_response_data.go new file mode 100644 index 0000000..fb495dd --- /dev/null +++ b/model_get_mfa_factors_200_response_data.go @@ -0,0 +1,126 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the GetMFAFactors200ResponseData type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetMFAFactors200ResponseData{} + +// GetMFAFactors200ResponseData struct for GetMFAFactors200ResponseData +type GetMFAFactors200ResponseData struct { + AuthFactors []GetMFAFactors200ResponseDataAuthFactorsInner `json:"auth_factors,omitempty"` +} + +// NewGetMFAFactors200ResponseData instantiates a new GetMFAFactors200ResponseData 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 NewGetMFAFactors200ResponseData() *GetMFAFactors200ResponseData { + this := GetMFAFactors200ResponseData{} + return &this +} + +// NewGetMFAFactors200ResponseDataWithDefaults instantiates a new GetMFAFactors200ResponseData 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 NewGetMFAFactors200ResponseDataWithDefaults() *GetMFAFactors200ResponseData { + this := GetMFAFactors200ResponseData{} + return &this +} + +// GetAuthFactors returns the AuthFactors field value if set, zero value otherwise. +func (o *GetMFAFactors200ResponseData) GetAuthFactors() []GetMFAFactors200ResponseDataAuthFactorsInner { + if o == nil || isNil(o.AuthFactors) { + var ret []GetMFAFactors200ResponseDataAuthFactorsInner + return ret + } + return o.AuthFactors +} + +// GetAuthFactorsOk returns a tuple with the AuthFactors field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetMFAFactors200ResponseData) GetAuthFactorsOk() ([]GetMFAFactors200ResponseDataAuthFactorsInner, bool) { + if o == nil || isNil(o.AuthFactors) { + return nil, false + } + return o.AuthFactors, true +} + +// HasAuthFactors returns a boolean if a field has been set. +func (o *GetMFAFactors200ResponseData) HasAuthFactors() bool { + if o != nil && !isNil(o.AuthFactors) { + return true + } + + return false +} + +// SetAuthFactors gets a reference to the given []GetMFAFactors200ResponseDataAuthFactorsInner and assigns it to the AuthFactors field. +func (o *GetMFAFactors200ResponseData) SetAuthFactors(v []GetMFAFactors200ResponseDataAuthFactorsInner) { + o.AuthFactors = v +} + +func (o GetMFAFactors200ResponseData) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetMFAFactors200ResponseData) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.AuthFactors) { + toSerialize["auth_factors"] = o.AuthFactors + } + return toSerialize, nil +} + +type NullableGetMFAFactors200ResponseData struct { + value *GetMFAFactors200ResponseData + isSet bool +} + +func (v NullableGetMFAFactors200ResponseData) Get() *GetMFAFactors200ResponseData { + return v.value +} + +func (v *NullableGetMFAFactors200ResponseData) Set(val *GetMFAFactors200ResponseData) { + v.value = val + v.isSet = true +} + +func (v NullableGetMFAFactors200ResponseData) IsSet() bool { + return v.isSet +} + +func (v *NullableGetMFAFactors200ResponseData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetMFAFactors200ResponseData(val *GetMFAFactors200ResponseData) *NullableGetMFAFactors200ResponseData { + return &NullableGetMFAFactors200ResponseData{value: val, isSet: true} +} + +func (v NullableGetMFAFactors200ResponseData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetMFAFactors200ResponseData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_get_mfa_factors_200_response_data_auth_factors_inner.go b/model_get_mfa_factors_200_response_data_auth_factors_inner.go new file mode 100644 index 0000000..b7a1e36 --- /dev/null +++ b/model_get_mfa_factors_200_response_data_auth_factors_inner.go @@ -0,0 +1,164 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the GetMFAFactors200ResponseDataAuthFactorsInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetMFAFactors200ResponseDataAuthFactorsInner{} + +// GetMFAFactors200ResponseDataAuthFactorsInner struct for GetMFAFactors200ResponseDataAuthFactorsInner +type GetMFAFactors200ResponseDataAuthFactorsInner struct { + // Official authentication factor name, as it appears to administrators in OneLogin. + Name *string `json:"name,omitempty"` + // Identifier for the factor which will be used for user enrollment + FactorId *int32 `json:"factor_id,omitempty"` +} + +// NewGetMFAFactors200ResponseDataAuthFactorsInner instantiates a new GetMFAFactors200ResponseDataAuthFactorsInner 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 NewGetMFAFactors200ResponseDataAuthFactorsInner() *GetMFAFactors200ResponseDataAuthFactorsInner { + this := GetMFAFactors200ResponseDataAuthFactorsInner{} + return &this +} + +// NewGetMFAFactors200ResponseDataAuthFactorsInnerWithDefaults instantiates a new GetMFAFactors200ResponseDataAuthFactorsInner 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 NewGetMFAFactors200ResponseDataAuthFactorsInnerWithDefaults() *GetMFAFactors200ResponseDataAuthFactorsInner { + this := GetMFAFactors200ResponseDataAuthFactorsInner{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *GetMFAFactors200ResponseDataAuthFactorsInner) GetName() string { + if o == nil || isNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// 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 *GetMFAFactors200ResponseDataAuthFactorsInner) GetNameOk() (*string, bool) { + if o == nil || isNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *GetMFAFactors200ResponseDataAuthFactorsInner) HasName() bool { + if o != nil && !isNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *GetMFAFactors200ResponseDataAuthFactorsInner) SetName(v string) { + o.Name = &v +} + +// GetFactorId returns the FactorId field value if set, zero value otherwise. +func (o *GetMFAFactors200ResponseDataAuthFactorsInner) GetFactorId() int32 { + if o == nil || isNil(o.FactorId) { + var ret int32 + return ret + } + return *o.FactorId +} + +// GetFactorIdOk returns a tuple with the FactorId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetMFAFactors200ResponseDataAuthFactorsInner) GetFactorIdOk() (*int32, bool) { + if o == nil || isNil(o.FactorId) { + return nil, false + } + return o.FactorId, true +} + +// HasFactorId returns a boolean if a field has been set. +func (o *GetMFAFactors200ResponseDataAuthFactorsInner) HasFactorId() bool { + if o != nil && !isNil(o.FactorId) { + return true + } + + return false +} + +// SetFactorId gets a reference to the given int32 and assigns it to the FactorId field. +func (o *GetMFAFactors200ResponseDataAuthFactorsInner) SetFactorId(v int32) { + o.FactorId = &v +} + +func (o GetMFAFactors200ResponseDataAuthFactorsInner) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetMFAFactors200ResponseDataAuthFactorsInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.Name) { + toSerialize["name"] = o.Name + } + if !isNil(o.FactorId) { + toSerialize["factor_id"] = o.FactorId + } + return toSerialize, nil +} + +type NullableGetMFAFactors200ResponseDataAuthFactorsInner struct { + value *GetMFAFactors200ResponseDataAuthFactorsInner + isSet bool +} + +func (v NullableGetMFAFactors200ResponseDataAuthFactorsInner) Get() *GetMFAFactors200ResponseDataAuthFactorsInner { + return v.value +} + +func (v *NullableGetMFAFactors200ResponseDataAuthFactorsInner) Set(val *GetMFAFactors200ResponseDataAuthFactorsInner) { + v.value = val + v.isSet = true +} + +func (v NullableGetMFAFactors200ResponseDataAuthFactorsInner) IsSet() bool { + return v.isSet +} + +func (v *NullableGetMFAFactors200ResponseDataAuthFactorsInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetMFAFactors200ResponseDataAuthFactorsInner(val *GetMFAFactors200ResponseDataAuthFactorsInner) *NullableGetMFAFactors200ResponseDataAuthFactorsInner { + return &NullableGetMFAFactors200ResponseDataAuthFactorsInner{value: val, isSet: true} +} + +func (v NullableGetMFAFactors200ResponseDataAuthFactorsInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetMFAFactors200ResponseDataAuthFactorsInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_get_rate_limit_200_response.go b/model_get_rate_limit_200_response.go index 2a13518..469bdeb 100644 --- a/model_get_rate_limit_200_response.go +++ b/model_get_rate_limit_200_response.go @@ -1,23 +1,26 @@ /* OneLogin API -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) +OpenAPI Specification for OneLogin -API version: 3.0.0-alpha.1 +API version: 3.1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package openapi +package onelogin import ( "encoding/json" ) +// checks if the GetRateLimit200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetRateLimit200Response{} + // GetRateLimit200Response struct for GetRateLimit200Response type GetRateLimit200Response struct { - Status *Status `json:"status,omitempty"` - Data *GetRateLimit200ResponseData `json:"data,omitempty"` + Status *Error `json:"status,omitempty"` + Data *RateLimit `json:"data,omitempty"` } // NewGetRateLimit200Response instantiates a new GetRateLimit200Response object @@ -38,9 +41,9 @@ func NewGetRateLimit200ResponseWithDefaults() *GetRateLimit200Response { } // GetStatus returns the Status field value if set, zero value otherwise. -func (o *GetRateLimit200Response) GetStatus() Status { - if o == nil || o.Status == nil { - var ret Status +func (o *GetRateLimit200Response) GetStatus() Error { + if o == nil || isNil(o.Status) { + var ret Error return ret } return *o.Status @@ -48,8 +51,8 @@ func (o *GetRateLimit200Response) GetStatus() Status { // GetStatusOk returns a tuple with the Status field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *GetRateLimit200Response) GetStatusOk() (*Status, bool) { - if o == nil || o.Status == nil { +func (o *GetRateLimit200Response) GetStatusOk() (*Error, bool) { + if o == nil || isNil(o.Status) { return nil, false } return o.Status, true @@ -57,22 +60,22 @@ func (o *GetRateLimit200Response) GetStatusOk() (*Status, bool) { // HasStatus returns a boolean if a field has been set. func (o *GetRateLimit200Response) HasStatus() bool { - if o != nil && o.Status != nil { + if o != nil && !isNil(o.Status) { return true } return false } -// SetStatus gets a reference to the given Status and assigns it to the Status field. -func (o *GetRateLimit200Response) SetStatus(v Status) { +// SetStatus gets a reference to the given Error and assigns it to the Status field. +func (o *GetRateLimit200Response) SetStatus(v Error) { o.Status = &v } // GetData returns the Data field value if set, zero value otherwise. -func (o *GetRateLimit200Response) GetData() GetRateLimit200ResponseData { - if o == nil || o.Data == nil { - var ret GetRateLimit200ResponseData +func (o *GetRateLimit200Response) GetData() RateLimit { + if o == nil || isNil(o.Data) { + var ret RateLimit return ret } return *o.Data @@ -80,8 +83,8 @@ func (o *GetRateLimit200Response) GetData() GetRateLimit200ResponseData { // GetDataOk returns a tuple with the Data field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *GetRateLimit200Response) GetDataOk() (*GetRateLimit200ResponseData, bool) { - if o == nil || o.Data == nil { +func (o *GetRateLimit200Response) GetDataOk() (*RateLimit, bool) { + if o == nil || isNil(o.Data) { return nil, false } return o.Data, true @@ -89,27 +92,35 @@ func (o *GetRateLimit200Response) GetDataOk() (*GetRateLimit200ResponseData, boo // HasData returns a boolean if a field has been set. func (o *GetRateLimit200Response) HasData() bool { - if o != nil && o.Data != nil { + if o != nil && !isNil(o.Data) { return true } return false } -// SetData gets a reference to the given GetRateLimit200ResponseData and assigns it to the Data field. -func (o *GetRateLimit200Response) SetData(v GetRateLimit200ResponseData) { +// SetData gets a reference to the given RateLimit and assigns it to the Data field. +func (o *GetRateLimit200Response) SetData(v RateLimit) { o.Data = &v } func (o GetRateLimit200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetRateLimit200Response) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Status != nil { + if !isNil(o.Status) { toSerialize["status"] = o.Status } - if o.Data != nil { + if !isNil(o.Data) { toSerialize["data"] = o.Data } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableGetRateLimit200Response struct { diff --git a/model_get_risk_score_200_response.go b/model_get_risk_score_200_response.go index 6594068..f7ca01d 100644 --- a/model_get_risk_score_200_response.go +++ b/model_get_risk_score_200_response.go @@ -1,19 +1,22 @@ /* OneLogin API -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) +OpenAPI Specification for OneLogin -API version: 3.0.0-alpha.1 +API version: 3.1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package openapi +package onelogin import ( "encoding/json" ) +// checks if the GetRiskScore200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetRiskScore200Response{} + // GetRiskScore200Response struct for GetRiskScore200Response type GetRiskScore200Response struct { // A risk score 0 is low risk and 100 is the highest risk level possible. @@ -41,7 +44,7 @@ func NewGetRiskScore200ResponseWithDefaults() *GetRiskScore200Response { // GetScore returns the Score field value if set, zero value otherwise. func (o *GetRiskScore200Response) GetScore() float32 { - if o == nil || o.Score == nil { + if o == nil || isNil(o.Score) { var ret float32 return ret } @@ -51,7 +54,7 @@ func (o *GetRiskScore200Response) GetScore() float32 { // 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 *GetRiskScore200Response) GetScoreOk() (*float32, bool) { - if o == nil || o.Score == nil { + if o == nil || isNil(o.Score) { return nil, false } return o.Score, true @@ -59,7 +62,7 @@ func (o *GetRiskScore200Response) GetScoreOk() (*float32, bool) { // HasScore returns a boolean if a field has been set. func (o *GetRiskScore200Response) HasScore() bool { - if o != nil && o.Score != nil { + if o != nil && !isNil(o.Score) { return true } @@ -73,7 +76,7 @@ func (o *GetRiskScore200Response) SetScore(v float32) { // GetTriggers returns the Triggers field value if set, zero value otherwise. func (o *GetRiskScore200Response) GetTriggers() []string { - if o == nil || o.Triggers == nil { + if o == nil || isNil(o.Triggers) { var ret []string return ret } @@ -83,7 +86,7 @@ func (o *GetRiskScore200Response) GetTriggers() []string { // GetTriggersOk returns a tuple with the Triggers field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *GetRiskScore200Response) GetTriggersOk() ([]string, bool) { - if o == nil || o.Triggers == nil { + if o == nil || isNil(o.Triggers) { return nil, false } return o.Triggers, true @@ -91,7 +94,7 @@ func (o *GetRiskScore200Response) GetTriggersOk() ([]string, bool) { // HasTriggers returns a boolean if a field has been set. func (o *GetRiskScore200Response) HasTriggers() bool { - if o != nil && o.Triggers != nil { + if o != nil && !isNil(o.Triggers) { return true } @@ -104,14 +107,22 @@ func (o *GetRiskScore200Response) SetTriggers(v []string) { } func (o GetRiskScore200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetRiskScore200Response) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Score != nil { + if !isNil(o.Score) { toSerialize["score"] = o.Score } - if o.Triggers != nil { + if !isNil(o.Triggers) { toSerialize["triggers"] = o.Triggers } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableGetRiskScore200Response struct { diff --git a/model_get_risk_score_400_response.go b/model_get_risk_score_400_response.go deleted file mode 100644 index b7bc964..0000000 --- a/model_get_risk_score_400_response.go +++ /dev/null @@ -1,115 +0,0 @@ -/* -OneLogin API - -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -API version: 3.0.0-alpha.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package openapi - -import ( - "encoding/json" -) - -// GetRiskScore400Response struct for GetRiskScore400Response -type GetRiskScore400Response struct { - Messages []string `json:"messages,omitempty"` -} - -// NewGetRiskScore400Response instantiates a new GetRiskScore400Response 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 NewGetRiskScore400Response() *GetRiskScore400Response { - this := GetRiskScore400Response{} - return &this -} - -// NewGetRiskScore400ResponseWithDefaults instantiates a new GetRiskScore400Response 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 NewGetRiskScore400ResponseWithDefaults() *GetRiskScore400Response { - this := GetRiskScore400Response{} - return &this -} - -// GetMessages returns the Messages field value if set, zero value otherwise. -func (o *GetRiskScore400Response) GetMessages() []string { - if o == nil || o.Messages == nil { - var ret []string - return ret - } - return o.Messages -} - -// GetMessagesOk returns a tuple with the Messages field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRiskScore400Response) GetMessagesOk() ([]string, bool) { - if o == nil || o.Messages == nil { - return nil, false - } - return o.Messages, true -} - -// HasMessages returns a boolean if a field has been set. -func (o *GetRiskScore400Response) HasMessages() bool { - if o != nil && o.Messages != nil { - return true - } - - return false -} - -// SetMessages gets a reference to the given []string and assigns it to the Messages field. -func (o *GetRiskScore400Response) SetMessages(v []string) { - o.Messages = v -} - -func (o GetRiskScore400Response) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Messages != nil { - toSerialize["messages"] = o.Messages - } - return json.Marshal(toSerialize) -} - -type NullableGetRiskScore400Response struct { - value *GetRiskScore400Response - isSet bool -} - -func (v NullableGetRiskScore400Response) Get() *GetRiskScore400Response { - return v.value -} - -func (v *NullableGetRiskScore400Response) Set(val *GetRiskScore400Response) { - v.value = val - v.isSet = true -} - -func (v NullableGetRiskScore400Response) IsSet() bool { - return v.isSet -} - -func (v *NullableGetRiskScore400Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetRiskScore400Response(val *GetRiskScore400Response) *NullableGetRiskScore400Response { - return &NullableGetRiskScore400Response{value: val, isSet: true} -} - -func (v NullableGetRiskScore400Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetRiskScore400Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_get_risk_score_request.go b/model_get_risk_score_request.go index 7cc1382..c6d8a1c 100644 --- a/model_get_risk_score_request.go +++ b/model_get_risk_score_request.go @@ -1,19 +1,22 @@ /* OneLogin API -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) +OpenAPI Specification for OneLogin -API version: 3.0.0-alpha.1 +API version: 3.1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package openapi +package onelogin import ( "encoding/json" ) +// checks if the GetRiskScoreRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetRiskScoreRequest{} + // GetRiskScoreRequest struct for GetRiskScoreRequest type GetRiskScoreRequest struct { // The IP address of the User's request. @@ -122,7 +125,7 @@ func (o *GetRiskScoreRequest) SetUser(v RiskUser) { // GetSource returns the Source field value if set, zero value otherwise. func (o *GetRiskScoreRequest) GetSource() Source { - if o == nil || o.Source == nil { + if o == nil || isNil(o.Source) { var ret Source return ret } @@ -132,7 +135,7 @@ func (o *GetRiskScoreRequest) GetSource() Source { // GetSourceOk returns a tuple with the Source field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *GetRiskScoreRequest) GetSourceOk() (*Source, bool) { - if o == nil || o.Source == nil { + if o == nil || isNil(o.Source) { return nil, false } return o.Source, true @@ -140,7 +143,7 @@ func (o *GetRiskScoreRequest) GetSourceOk() (*Source, bool) { // HasSource returns a boolean if a field has been set. func (o *GetRiskScoreRequest) HasSource() bool { - if o != nil && o.Source != nil { + if o != nil && !isNil(o.Source) { return true } @@ -154,7 +157,7 @@ func (o *GetRiskScoreRequest) SetSource(v Source) { // GetSession returns the Session field value if set, zero value otherwise. func (o *GetRiskScoreRequest) GetSession() Session { - if o == nil || o.Session == nil { + if o == nil || isNil(o.Session) { var ret Session return ret } @@ -164,7 +167,7 @@ func (o *GetRiskScoreRequest) GetSession() Session { // GetSessionOk returns a tuple with the Session field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *GetRiskScoreRequest) GetSessionOk() (*Session, bool) { - if o == nil || o.Session == nil { + if o == nil || isNil(o.Session) { return nil, false } return o.Session, true @@ -172,7 +175,7 @@ func (o *GetRiskScoreRequest) GetSessionOk() (*Session, bool) { // HasSession returns a boolean if a field has been set. func (o *GetRiskScoreRequest) HasSession() bool { - if o != nil && o.Session != nil { + if o != nil && !isNil(o.Session) { return true } @@ -186,7 +189,7 @@ func (o *GetRiskScoreRequest) SetSession(v Session) { // GetDevice returns the Device field value if set, zero value otherwise. func (o *GetRiskScoreRequest) GetDevice() RiskDevice { - if o == nil || o.Device == nil { + if o == nil || isNil(o.Device) { var ret RiskDevice return ret } @@ -196,7 +199,7 @@ func (o *GetRiskScoreRequest) GetDevice() RiskDevice { // GetDeviceOk returns a tuple with the Device field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *GetRiskScoreRequest) GetDeviceOk() (*RiskDevice, bool) { - if o == nil || o.Device == nil { + if o == nil || isNil(o.Device) { return nil, false } return o.Device, true @@ -204,7 +207,7 @@ func (o *GetRiskScoreRequest) GetDeviceOk() (*RiskDevice, bool) { // HasDevice returns a boolean if a field has been set. func (o *GetRiskScoreRequest) HasDevice() bool { - if o != nil && o.Device != nil { + if o != nil && !isNil(o.Device) { return true } @@ -218,7 +221,7 @@ func (o *GetRiskScoreRequest) SetDevice(v RiskDevice) { // GetFp returns the Fp field value if set, zero value otherwise. func (o *GetRiskScoreRequest) GetFp() string { - if o == nil || o.Fp == nil { + if o == nil || isNil(o.Fp) { var ret string return ret } @@ -228,7 +231,7 @@ func (o *GetRiskScoreRequest) GetFp() string { // GetFpOk returns a tuple with the Fp field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *GetRiskScoreRequest) GetFpOk() (*string, bool) { - if o == nil || o.Fp == nil { + if o == nil || isNil(o.Fp) { return nil, false } return o.Fp, true @@ -236,7 +239,7 @@ func (o *GetRiskScoreRequest) GetFpOk() (*string, bool) { // HasFp returns a boolean if a field has been set. func (o *GetRiskScoreRequest) HasFp() bool { - if o != nil && o.Fp != nil { + if o != nil && !isNil(o.Fp) { return true } @@ -249,29 +252,31 @@ func (o *GetRiskScoreRequest) SetFp(v string) { } func (o GetRiskScoreRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["ip"] = o.Ip - } - if true { - toSerialize["user_agent"] = o.UserAgent + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err } - if true { - toSerialize["user"] = o.User - } - if o.Source != nil { + return json.Marshal(toSerialize) +} + +func (o GetRiskScoreRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["ip"] = o.Ip + toSerialize["user_agent"] = o.UserAgent + toSerialize["user"] = o.User + if !isNil(o.Source) { toSerialize["source"] = o.Source } - if o.Session != nil { + if !isNil(o.Session) { toSerialize["session"] = o.Session } - if o.Device != nil { + if !isNil(o.Device) { toSerialize["device"] = o.Device } - if o.Fp != nil { + if !isNil(o.Fp) { toSerialize["fp"] = o.Fp } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableGetRiskScoreRequest struct { diff --git a/model_get_risk_scores_200_response.go b/model_get_risk_scores_200_response.go new file mode 100644 index 0000000..82f45ce --- /dev/null +++ b/model_get_risk_scores_200_response.go @@ -0,0 +1,162 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the GetRiskScores200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetRiskScores200Response{} + +// GetRiskScores200Response struct for GetRiskScores200Response +type GetRiskScores200Response struct { + Scores *GetRiskScores200ResponseScores `json:"scores,omitempty"` + Total *int32 `json:"total,omitempty"` +} + +// NewGetRiskScores200Response instantiates a new GetRiskScores200Response 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 NewGetRiskScores200Response() *GetRiskScores200Response { + this := GetRiskScores200Response{} + return &this +} + +// NewGetRiskScores200ResponseWithDefaults instantiates a new GetRiskScores200Response 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 NewGetRiskScores200ResponseWithDefaults() *GetRiskScores200Response { + this := GetRiskScores200Response{} + return &this +} + +// GetScores returns the Scores field value if set, zero value otherwise. +func (o *GetRiskScores200Response) GetScores() GetRiskScores200ResponseScores { + if o == nil || isNil(o.Scores) { + var ret GetRiskScores200ResponseScores + return ret + } + return *o.Scores +} + +// GetScoresOk returns a tuple with the Scores field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRiskScores200Response) GetScoresOk() (*GetRiskScores200ResponseScores, bool) { + if o == nil || isNil(o.Scores) { + return nil, false + } + return o.Scores, true +} + +// HasScores returns a boolean if a field has been set. +func (o *GetRiskScores200Response) HasScores() bool { + if o != nil && !isNil(o.Scores) { + return true + } + + return false +} + +// SetScores gets a reference to the given GetRiskScores200ResponseScores and assigns it to the Scores field. +func (o *GetRiskScores200Response) SetScores(v GetRiskScores200ResponseScores) { + o.Scores = &v +} + +// GetTotal returns the Total field value if set, zero value otherwise. +func (o *GetRiskScores200Response) GetTotal() int32 { + if o == nil || isNil(o.Total) { + var ret int32 + return ret + } + return *o.Total +} + +// GetTotalOk returns a tuple with the Total field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRiskScores200Response) GetTotalOk() (*int32, bool) { + if o == nil || isNil(o.Total) { + return nil, false + } + return o.Total, true +} + +// HasTotal returns a boolean if a field has been set. +func (o *GetRiskScores200Response) HasTotal() bool { + if o != nil && !isNil(o.Total) { + return true + } + + return false +} + +// SetTotal gets a reference to the given int32 and assigns it to the Total field. +func (o *GetRiskScores200Response) SetTotal(v int32) { + o.Total = &v +} + +func (o GetRiskScores200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetRiskScores200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.Scores) { + toSerialize["scores"] = o.Scores + } + if !isNil(o.Total) { + toSerialize["total"] = o.Total + } + return toSerialize, nil +} + +type NullableGetRiskScores200Response struct { + value *GetRiskScores200Response + isSet bool +} + +func (v NullableGetRiskScores200Response) Get() *GetRiskScores200Response { + return v.value +} + +func (v *NullableGetRiskScores200Response) Set(val *GetRiskScores200Response) { + v.value = val + v.isSet = true +} + +func (v NullableGetRiskScores200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableGetRiskScores200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetRiskScores200Response(val *GetRiskScores200Response) *NullableGetRiskScores200Response { + return &NullableGetRiskScores200Response{value: val, isSet: true} +} + +func (v NullableGetRiskScores200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetRiskScores200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_get_score_insights_200_response_scores.go b/model_get_risk_scores_200_response_scores.go similarity index 50% rename from model_get_score_insights_200_response_scores.go rename to model_get_risk_scores_200_response_scores.go index ed8c9cf..c7be6a0 100644 --- a/model_get_score_insights_200_response_scores.go +++ b/model_get_risk_scores_200_response_scores.go @@ -1,21 +1,24 @@ /* OneLogin API -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) +OpenAPI Specification for OneLogin -API version: 3.0.0-alpha.1 +API version: 3.1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package openapi +package onelogin import ( "encoding/json" ) -// GetScoreInsights200ResponseScores struct for GetScoreInsights200ResponseScores -type GetScoreInsights200ResponseScores struct { +// checks if the GetRiskScores200ResponseScores type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetRiskScores200ResponseScores{} + +// GetRiskScores200ResponseScores struct for GetRiskScores200ResponseScores +type GetRiskScores200ResponseScores struct { Minimal *int32 `json:"minimal,omitempty"` Low *int32 `json:"low,omitempty"` Medium *int32 `json:"medium,omitempty"` @@ -23,26 +26,26 @@ type GetScoreInsights200ResponseScores struct { VeryHigh *int32 `json:"very_high,omitempty"` } -// NewGetScoreInsights200ResponseScores instantiates a new GetScoreInsights200ResponseScores object +// NewGetRiskScores200ResponseScores instantiates a new GetRiskScores200ResponseScores 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 NewGetScoreInsights200ResponseScores() *GetScoreInsights200ResponseScores { - this := GetScoreInsights200ResponseScores{} +func NewGetRiskScores200ResponseScores() *GetRiskScores200ResponseScores { + this := GetRiskScores200ResponseScores{} return &this } -// NewGetScoreInsights200ResponseScoresWithDefaults instantiates a new GetScoreInsights200ResponseScores object +// NewGetRiskScores200ResponseScoresWithDefaults instantiates a new GetRiskScores200ResponseScores 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 NewGetScoreInsights200ResponseScoresWithDefaults() *GetScoreInsights200ResponseScores { - this := GetScoreInsights200ResponseScores{} +func NewGetRiskScores200ResponseScoresWithDefaults() *GetRiskScores200ResponseScores { + this := GetRiskScores200ResponseScores{} return &this } // GetMinimal returns the Minimal field value if set, zero value otherwise. -func (o *GetScoreInsights200ResponseScores) GetMinimal() int32 { - if o == nil || o.Minimal == nil { +func (o *GetRiskScores200ResponseScores) GetMinimal() int32 { + if o == nil || isNil(o.Minimal) { var ret int32 return ret } @@ -51,16 +54,16 @@ func (o *GetScoreInsights200ResponseScores) GetMinimal() int32 { // GetMinimalOk returns a tuple with the Minimal field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *GetScoreInsights200ResponseScores) GetMinimalOk() (*int32, bool) { - if o == nil || o.Minimal == nil { +func (o *GetRiskScores200ResponseScores) GetMinimalOk() (*int32, bool) { + if o == nil || isNil(o.Minimal) { return nil, false } return o.Minimal, true } // HasMinimal returns a boolean if a field has been set. -func (o *GetScoreInsights200ResponseScores) HasMinimal() bool { - if o != nil && o.Minimal != nil { +func (o *GetRiskScores200ResponseScores) HasMinimal() bool { + if o != nil && !isNil(o.Minimal) { return true } @@ -68,13 +71,13 @@ func (o *GetScoreInsights200ResponseScores) HasMinimal() bool { } // SetMinimal gets a reference to the given int32 and assigns it to the Minimal field. -func (o *GetScoreInsights200ResponseScores) SetMinimal(v int32) { +func (o *GetRiskScores200ResponseScores) SetMinimal(v int32) { o.Minimal = &v } // GetLow returns the Low field value if set, zero value otherwise. -func (o *GetScoreInsights200ResponseScores) GetLow() int32 { - if o == nil || o.Low == nil { +func (o *GetRiskScores200ResponseScores) GetLow() int32 { + if o == nil || isNil(o.Low) { var ret int32 return ret } @@ -83,16 +86,16 @@ func (o *GetScoreInsights200ResponseScores) GetLow() int32 { // GetLowOk returns a tuple with the Low field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *GetScoreInsights200ResponseScores) GetLowOk() (*int32, bool) { - if o == nil || o.Low == nil { +func (o *GetRiskScores200ResponseScores) GetLowOk() (*int32, bool) { + if o == nil || isNil(o.Low) { return nil, false } return o.Low, true } // HasLow returns a boolean if a field has been set. -func (o *GetScoreInsights200ResponseScores) HasLow() bool { - if o != nil && o.Low != nil { +func (o *GetRiskScores200ResponseScores) HasLow() bool { + if o != nil && !isNil(o.Low) { return true } @@ -100,13 +103,13 @@ func (o *GetScoreInsights200ResponseScores) HasLow() bool { } // SetLow gets a reference to the given int32 and assigns it to the Low field. -func (o *GetScoreInsights200ResponseScores) SetLow(v int32) { +func (o *GetRiskScores200ResponseScores) SetLow(v int32) { o.Low = &v } // GetMedium returns the Medium field value if set, zero value otherwise. -func (o *GetScoreInsights200ResponseScores) GetMedium() int32 { - if o == nil || o.Medium == nil { +func (o *GetRiskScores200ResponseScores) GetMedium() int32 { + if o == nil || isNil(o.Medium) { var ret int32 return ret } @@ -115,16 +118,16 @@ func (o *GetScoreInsights200ResponseScores) GetMedium() int32 { // GetMediumOk returns a tuple with the Medium field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *GetScoreInsights200ResponseScores) GetMediumOk() (*int32, bool) { - if o == nil || o.Medium == nil { +func (o *GetRiskScores200ResponseScores) GetMediumOk() (*int32, bool) { + if o == nil || isNil(o.Medium) { return nil, false } return o.Medium, true } // HasMedium returns a boolean if a field has been set. -func (o *GetScoreInsights200ResponseScores) HasMedium() bool { - if o != nil && o.Medium != nil { +func (o *GetRiskScores200ResponseScores) HasMedium() bool { + if o != nil && !isNil(o.Medium) { return true } @@ -132,13 +135,13 @@ func (o *GetScoreInsights200ResponseScores) HasMedium() bool { } // SetMedium gets a reference to the given int32 and assigns it to the Medium field. -func (o *GetScoreInsights200ResponseScores) SetMedium(v int32) { +func (o *GetRiskScores200ResponseScores) SetMedium(v int32) { o.Medium = &v } // GetHigh returns the High field value if set, zero value otherwise. -func (o *GetScoreInsights200ResponseScores) GetHigh() int32 { - if o == nil || o.High == nil { +func (o *GetRiskScores200ResponseScores) GetHigh() int32 { + if o == nil || isNil(o.High) { var ret int32 return ret } @@ -147,16 +150,16 @@ func (o *GetScoreInsights200ResponseScores) GetHigh() int32 { // GetHighOk returns a tuple with the High field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *GetScoreInsights200ResponseScores) GetHighOk() (*int32, bool) { - if o == nil || o.High == nil { +func (o *GetRiskScores200ResponseScores) GetHighOk() (*int32, bool) { + if o == nil || isNil(o.High) { return nil, false } return o.High, true } // HasHigh returns a boolean if a field has been set. -func (o *GetScoreInsights200ResponseScores) HasHigh() bool { - if o != nil && o.High != nil { +func (o *GetRiskScores200ResponseScores) HasHigh() bool { + if o != nil && !isNil(o.High) { return true } @@ -164,13 +167,13 @@ func (o *GetScoreInsights200ResponseScores) HasHigh() bool { } // SetHigh gets a reference to the given int32 and assigns it to the High field. -func (o *GetScoreInsights200ResponseScores) SetHigh(v int32) { +func (o *GetRiskScores200ResponseScores) SetHigh(v int32) { o.High = &v } // GetVeryHigh returns the VeryHigh field value if set, zero value otherwise. -func (o *GetScoreInsights200ResponseScores) GetVeryHigh() int32 { - if o == nil || o.VeryHigh == nil { +func (o *GetRiskScores200ResponseScores) GetVeryHigh() int32 { + if o == nil || isNil(o.VeryHigh) { var ret int32 return ret } @@ -179,16 +182,16 @@ func (o *GetScoreInsights200ResponseScores) GetVeryHigh() int32 { // GetVeryHighOk returns a tuple with the VeryHigh field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *GetScoreInsights200ResponseScores) GetVeryHighOk() (*int32, bool) { - if o == nil || o.VeryHigh == nil { +func (o *GetRiskScores200ResponseScores) GetVeryHighOk() (*int32, bool) { + if o == nil || isNil(o.VeryHigh) { return nil, false } return o.VeryHigh, true } // HasVeryHigh returns a boolean if a field has been set. -func (o *GetScoreInsights200ResponseScores) HasVeryHigh() bool { - if o != nil && o.VeryHigh != nil { +func (o *GetRiskScores200ResponseScores) HasVeryHigh() bool { + if o != nil && !isNil(o.VeryHigh) { return true } @@ -196,62 +199,70 @@ func (o *GetScoreInsights200ResponseScores) HasVeryHigh() bool { } // SetVeryHigh gets a reference to the given int32 and assigns it to the VeryHigh field. -func (o *GetScoreInsights200ResponseScores) SetVeryHigh(v int32) { +func (o *GetRiskScores200ResponseScores) SetVeryHigh(v int32) { o.VeryHigh = &v } -func (o GetScoreInsights200ResponseScores) MarshalJSON() ([]byte, error) { +func (o GetRiskScores200ResponseScores) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetRiskScores200ResponseScores) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Minimal != nil { + if !isNil(o.Minimal) { toSerialize["minimal"] = o.Minimal } - if o.Low != nil { + if !isNil(o.Low) { toSerialize["low"] = o.Low } - if o.Medium != nil { + if !isNil(o.Medium) { toSerialize["medium"] = o.Medium } - if o.High != nil { + if !isNil(o.High) { toSerialize["high"] = o.High } - if o.VeryHigh != nil { + if !isNil(o.VeryHigh) { toSerialize["very_high"] = o.VeryHigh } - return json.Marshal(toSerialize) + return toSerialize, nil } -type NullableGetScoreInsights200ResponseScores struct { - value *GetScoreInsights200ResponseScores +type NullableGetRiskScores200ResponseScores struct { + value *GetRiskScores200ResponseScores isSet bool } -func (v NullableGetScoreInsights200ResponseScores) Get() *GetScoreInsights200ResponseScores { +func (v NullableGetRiskScores200ResponseScores) Get() *GetRiskScores200ResponseScores { return v.value } -func (v *NullableGetScoreInsights200ResponseScores) Set(val *GetScoreInsights200ResponseScores) { +func (v *NullableGetRiskScores200ResponseScores) Set(val *GetRiskScores200ResponseScores) { v.value = val v.isSet = true } -func (v NullableGetScoreInsights200ResponseScores) IsSet() bool { +func (v NullableGetRiskScores200ResponseScores) IsSet() bool { return v.isSet } -func (v *NullableGetScoreInsights200ResponseScores) Unset() { +func (v *NullableGetRiskScores200ResponseScores) Unset() { v.value = nil v.isSet = false } -func NewNullableGetScoreInsights200ResponseScores(val *GetScoreInsights200ResponseScores) *NullableGetScoreInsights200ResponseScores { - return &NullableGetScoreInsights200ResponseScores{value: val, isSet: true} +func NewNullableGetRiskScores200ResponseScores(val *GetRiskScores200ResponseScores) *NullableGetRiskScores200ResponseScores { + return &NullableGetRiskScores200ResponseScores{value: val, isSet: true} } -func (v NullableGetScoreInsights200ResponseScores) MarshalJSON() ([]byte, error) { +func (v NullableGetRiskScores200ResponseScores) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } -func (v *NullableGetScoreInsights200ResponseScores) UnmarshalJSON(src []byte) error { +func (v *NullableGetRiskScores200ResponseScores) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/model_get_role_apps_200_response_inner.go b/model_get_role_apps_200_response_inner.go new file mode 100644 index 0000000..264da47 --- /dev/null +++ b/model_get_role_apps_200_response_inner.go @@ -0,0 +1,201 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the GetRoleApps200ResponseInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetRoleApps200ResponseInner{} + +// GetRoleApps200ResponseInner struct for GetRoleApps200ResponseInner +type GetRoleApps200ResponseInner struct { + // app id + Id *int32 `json:"id,omitempty"` + // app name + Name *string `json:"name,omitempty"` + // url of Icon + IconUrl *string `json:"icon_url,omitempty"` +} + +// NewGetRoleApps200ResponseInner instantiates a new GetRoleApps200ResponseInner 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 NewGetRoleApps200ResponseInner() *GetRoleApps200ResponseInner { + this := GetRoleApps200ResponseInner{} + return &this +} + +// NewGetRoleApps200ResponseInnerWithDefaults instantiates a new GetRoleApps200ResponseInner 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 NewGetRoleApps200ResponseInnerWithDefaults() *GetRoleApps200ResponseInner { + this := GetRoleApps200ResponseInner{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *GetRoleApps200ResponseInner) GetId() int32 { + if o == nil || isNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRoleApps200ResponseInner) GetIdOk() (*int32, bool) { + if o == nil || isNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *GetRoleApps200ResponseInner) HasId() bool { + if o != nil && !isNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *GetRoleApps200ResponseInner) SetId(v int32) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *GetRoleApps200ResponseInner) GetName() string { + if o == nil || isNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// 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 *GetRoleApps200ResponseInner) GetNameOk() (*string, bool) { + if o == nil || isNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *GetRoleApps200ResponseInner) HasName() bool { + if o != nil && !isNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *GetRoleApps200ResponseInner) SetName(v string) { + o.Name = &v +} + +// GetIconUrl returns the IconUrl field value if set, zero value otherwise. +func (o *GetRoleApps200ResponseInner) GetIconUrl() string { + if o == nil || isNil(o.IconUrl) { + var ret string + return ret + } + return *o.IconUrl +} + +// 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 *GetRoleApps200ResponseInner) GetIconUrlOk() (*string, bool) { + if o == nil || isNil(o.IconUrl) { + return nil, false + } + return o.IconUrl, true +} + +// HasIconUrl returns a boolean if a field has been set. +func (o *GetRoleApps200ResponseInner) HasIconUrl() bool { + if o != nil && !isNil(o.IconUrl) { + return true + } + + return false +} + +// SetIconUrl gets a reference to the given string and assigns it to the IconUrl field. +func (o *GetRoleApps200ResponseInner) SetIconUrl(v string) { + o.IconUrl = &v +} + +func (o GetRoleApps200ResponseInner) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetRoleApps200ResponseInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.Id) { + toSerialize["id"] = o.Id + } + if !isNil(o.Name) { + toSerialize["name"] = o.Name + } + if !isNil(o.IconUrl) { + toSerialize["icon_url"] = o.IconUrl + } + return toSerialize, nil +} + +type NullableGetRoleApps200ResponseInner struct { + value *GetRoleApps200ResponseInner + isSet bool +} + +func (v NullableGetRoleApps200ResponseInner) Get() *GetRoleApps200ResponseInner { + return v.value +} + +func (v *NullableGetRoleApps200ResponseInner) Set(val *GetRoleApps200ResponseInner) { + v.value = val + v.isSet = true +} + +func (v NullableGetRoleApps200ResponseInner) IsSet() bool { + return v.isSet +} + +func (v *NullableGetRoleApps200ResponseInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetRoleApps200ResponseInner(val *GetRoleApps200ResponseInner) *NullableGetRoleApps200ResponseInner { + return &NullableGetRoleApps200ResponseInner{value: val, isSet: true} +} + +func (v NullableGetRoleApps200ResponseInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetRoleApps200ResponseInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_get_role_by_id_200_response.go b/model_get_role_by_id_200_response.go new file mode 100644 index 0000000..9d67307 --- /dev/null +++ b/model_get_role_by_id_200_response.go @@ -0,0 +1,162 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the GetRoleById200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetRoleById200Response{} + +// GetRoleById200Response struct for GetRoleById200Response +type GetRoleById200Response struct { + Status *Error `json:"status,omitempty"` + Data []GetRoleById200ResponseDataInner `json:"data,omitempty"` +} + +// NewGetRoleById200Response instantiates a new GetRoleById200Response 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 NewGetRoleById200Response() *GetRoleById200Response { + this := GetRoleById200Response{} + return &this +} + +// NewGetRoleById200ResponseWithDefaults instantiates a new GetRoleById200Response 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 NewGetRoleById200ResponseWithDefaults() *GetRoleById200Response { + this := GetRoleById200Response{} + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *GetRoleById200Response) GetStatus() Error { + if o == nil || isNil(o.Status) { + var ret Error + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRoleById200Response) GetStatusOk() (*Error, bool) { + if o == nil || isNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *GetRoleById200Response) HasStatus() bool { + if o != nil && !isNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given Error and assigns it to the Status field. +func (o *GetRoleById200Response) SetStatus(v Error) { + o.Status = &v +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *GetRoleById200Response) GetData() []GetRoleById200ResponseDataInner { + if o == nil || isNil(o.Data) { + var ret []GetRoleById200ResponseDataInner + return ret + } + return o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRoleById200Response) GetDataOk() ([]GetRoleById200ResponseDataInner, bool) { + if o == nil || isNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *GetRoleById200Response) HasData() bool { + if o != nil && !isNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given []GetRoleById200ResponseDataInner and assigns it to the Data field. +func (o *GetRoleById200Response) SetData(v []GetRoleById200ResponseDataInner) { + o.Data = v +} + +func (o GetRoleById200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetRoleById200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.Status) { + toSerialize["status"] = o.Status + } + if !isNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullableGetRoleById200Response struct { + value *GetRoleById200Response + isSet bool +} + +func (v NullableGetRoleById200Response) Get() *GetRoleById200Response { + return v.value +} + +func (v *NullableGetRoleById200Response) Set(val *GetRoleById200Response) { + v.value = val + v.isSet = true +} + +func (v NullableGetRoleById200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableGetRoleById200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetRoleById200Response(val *GetRoleById200Response) *NullableGetRoleById200Response { + return &NullableGetRoleById200Response{value: val, isSet: true} +} + +func (v NullableGetRoleById200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetRoleById200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_get_role_by_id_200_response_data_inner.go b/model_get_role_by_id_200_response_data_inner.go new file mode 100644 index 0000000..f977ed3 --- /dev/null +++ b/model_get_role_by_id_200_response_data_inner.go @@ -0,0 +1,164 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the GetRoleById200ResponseDataInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetRoleById200ResponseDataInner{} + +// GetRoleById200ResponseDataInner struct for GetRoleById200ResponseDataInner +type GetRoleById200ResponseDataInner struct { + // role's unique ID in Onelogin + Id *int32 `json:"id,omitempty"` + // Role name + Name *string `json:"name,omitempty"` +} + +// NewGetRoleById200ResponseDataInner instantiates a new GetRoleById200ResponseDataInner 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 NewGetRoleById200ResponseDataInner() *GetRoleById200ResponseDataInner { + this := GetRoleById200ResponseDataInner{} + return &this +} + +// NewGetRoleById200ResponseDataInnerWithDefaults instantiates a new GetRoleById200ResponseDataInner 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 NewGetRoleById200ResponseDataInnerWithDefaults() *GetRoleById200ResponseDataInner { + this := GetRoleById200ResponseDataInner{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *GetRoleById200ResponseDataInner) GetId() int32 { + if o == nil || isNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRoleById200ResponseDataInner) GetIdOk() (*int32, bool) { + if o == nil || isNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *GetRoleById200ResponseDataInner) HasId() bool { + if o != nil && !isNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *GetRoleById200ResponseDataInner) SetId(v int32) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *GetRoleById200ResponseDataInner) GetName() string { + if o == nil || isNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// 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 *GetRoleById200ResponseDataInner) GetNameOk() (*string, bool) { + if o == nil || isNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *GetRoleById200ResponseDataInner) HasName() bool { + if o != nil && !isNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *GetRoleById200ResponseDataInner) SetName(v string) { + o.Name = &v +} + +func (o GetRoleById200ResponseDataInner) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetRoleById200ResponseDataInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.Id) { + toSerialize["id"] = o.Id + } + if !isNil(o.Name) { + toSerialize["name"] = o.Name + } + return toSerialize, nil +} + +type NullableGetRoleById200ResponseDataInner struct { + value *GetRoleById200ResponseDataInner + isSet bool +} + +func (v NullableGetRoleById200ResponseDataInner) Get() *GetRoleById200ResponseDataInner { + return v.value +} + +func (v *NullableGetRoleById200ResponseDataInner) Set(val *GetRoleById200ResponseDataInner) { + v.value = val + v.isSet = true +} + +func (v NullableGetRoleById200ResponseDataInner) IsSet() bool { + return v.isSet +} + +func (v *NullableGetRoleById200ResponseDataInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetRoleById200ResponseDataInner(val *GetRoleById200ResponseDataInner) *NullableGetRoleById200ResponseDataInner { + return &NullableGetRoleById200ResponseDataInner{value: val, isSet: true} +} + +func (v NullableGetRoleById200ResponseDataInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetRoleById200ResponseDataInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_get_role_by_name_200_response.go b/model_get_role_by_name_200_response.go new file mode 100644 index 0000000..5828542 --- /dev/null +++ b/model_get_role_by_name_200_response.go @@ -0,0 +1,198 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the GetRoleByName200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetRoleByName200Response{} + +// GetRoleByName200Response struct for GetRoleByName200Response +type GetRoleByName200Response struct { + Status *Error `json:"status,omitempty"` + Pagination *GetRoleByName200ResponsePagination `json:"pagination,omitempty"` + Data []GetRoleByName200ResponseDataInner `json:"data,omitempty"` +} + +// NewGetRoleByName200Response instantiates a new GetRoleByName200Response 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 NewGetRoleByName200Response() *GetRoleByName200Response { + this := GetRoleByName200Response{} + return &this +} + +// NewGetRoleByName200ResponseWithDefaults instantiates a new GetRoleByName200Response 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 NewGetRoleByName200ResponseWithDefaults() *GetRoleByName200Response { + this := GetRoleByName200Response{} + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *GetRoleByName200Response) GetStatus() Error { + if o == nil || isNil(o.Status) { + var ret Error + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRoleByName200Response) GetStatusOk() (*Error, bool) { + if o == nil || isNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *GetRoleByName200Response) HasStatus() bool { + if o != nil && !isNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given Error and assigns it to the Status field. +func (o *GetRoleByName200Response) SetStatus(v Error) { + o.Status = &v +} + +// GetPagination returns the Pagination field value if set, zero value otherwise. +func (o *GetRoleByName200Response) GetPagination() GetRoleByName200ResponsePagination { + if o == nil || isNil(o.Pagination) { + var ret GetRoleByName200ResponsePagination + return ret + } + return *o.Pagination +} + +// GetPaginationOk returns a tuple with the Pagination field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRoleByName200Response) GetPaginationOk() (*GetRoleByName200ResponsePagination, bool) { + if o == nil || isNil(o.Pagination) { + return nil, false + } + return o.Pagination, true +} + +// HasPagination returns a boolean if a field has been set. +func (o *GetRoleByName200Response) HasPagination() bool { + if o != nil && !isNil(o.Pagination) { + return true + } + + return false +} + +// SetPagination gets a reference to the given GetRoleByName200ResponsePagination and assigns it to the Pagination field. +func (o *GetRoleByName200Response) SetPagination(v GetRoleByName200ResponsePagination) { + o.Pagination = &v +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *GetRoleByName200Response) GetData() []GetRoleByName200ResponseDataInner { + if o == nil || isNil(o.Data) { + var ret []GetRoleByName200ResponseDataInner + return ret + } + return o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRoleByName200Response) GetDataOk() ([]GetRoleByName200ResponseDataInner, bool) { + if o == nil || isNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *GetRoleByName200Response) HasData() bool { + if o != nil && !isNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given []GetRoleByName200ResponseDataInner and assigns it to the Data field. +func (o *GetRoleByName200Response) SetData(v []GetRoleByName200ResponseDataInner) { + o.Data = v +} + +func (o GetRoleByName200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetRoleByName200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.Status) { + toSerialize["status"] = o.Status + } + if !isNil(o.Pagination) { + toSerialize["pagination"] = o.Pagination + } + if !isNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullableGetRoleByName200Response struct { + value *GetRoleByName200Response + isSet bool +} + +func (v NullableGetRoleByName200Response) Get() *GetRoleByName200Response { + return v.value +} + +func (v *NullableGetRoleByName200Response) Set(val *GetRoleByName200Response) { + v.value = val + v.isSet = true +} + +func (v NullableGetRoleByName200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableGetRoleByName200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetRoleByName200Response(val *GetRoleByName200Response) *NullableGetRoleByName200Response { + return &NullableGetRoleByName200Response{value: val, isSet: true} +} + +func (v NullableGetRoleByName200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetRoleByName200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_get_role_by_name_200_response_data_inner.go b/model_get_role_by_name_200_response_data_inner.go new file mode 100644 index 0000000..037f047 --- /dev/null +++ b/model_get_role_by_name_200_response_data_inner.go @@ -0,0 +1,164 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the GetRoleByName200ResponseDataInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetRoleByName200ResponseDataInner{} + +// GetRoleByName200ResponseDataInner struct for GetRoleByName200ResponseDataInner +type GetRoleByName200ResponseDataInner struct { + // Role ID + Id *int32 `json:"id,omitempty"` + // Role Name + Name *string `json:"name,omitempty"` +} + +// NewGetRoleByName200ResponseDataInner instantiates a new GetRoleByName200ResponseDataInner 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 NewGetRoleByName200ResponseDataInner() *GetRoleByName200ResponseDataInner { + this := GetRoleByName200ResponseDataInner{} + return &this +} + +// NewGetRoleByName200ResponseDataInnerWithDefaults instantiates a new GetRoleByName200ResponseDataInner 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 NewGetRoleByName200ResponseDataInnerWithDefaults() *GetRoleByName200ResponseDataInner { + this := GetRoleByName200ResponseDataInner{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *GetRoleByName200ResponseDataInner) GetId() int32 { + if o == nil || isNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRoleByName200ResponseDataInner) GetIdOk() (*int32, bool) { + if o == nil || isNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *GetRoleByName200ResponseDataInner) HasId() bool { + if o != nil && !isNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *GetRoleByName200ResponseDataInner) SetId(v int32) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *GetRoleByName200ResponseDataInner) GetName() string { + if o == nil || isNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// 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 *GetRoleByName200ResponseDataInner) GetNameOk() (*string, bool) { + if o == nil || isNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *GetRoleByName200ResponseDataInner) HasName() bool { + if o != nil && !isNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *GetRoleByName200ResponseDataInner) SetName(v string) { + o.Name = &v +} + +func (o GetRoleByName200ResponseDataInner) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetRoleByName200ResponseDataInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.Id) { + toSerialize["id"] = o.Id + } + if !isNil(o.Name) { + toSerialize["name"] = o.Name + } + return toSerialize, nil +} + +type NullableGetRoleByName200ResponseDataInner struct { + value *GetRoleByName200ResponseDataInner + isSet bool +} + +func (v NullableGetRoleByName200ResponseDataInner) Get() *GetRoleByName200ResponseDataInner { + return v.value +} + +func (v *NullableGetRoleByName200ResponseDataInner) Set(val *GetRoleByName200ResponseDataInner) { + v.value = val + v.isSet = true +} + +func (v NullableGetRoleByName200ResponseDataInner) IsSet() bool { + return v.isSet +} + +func (v *NullableGetRoleByName200ResponseDataInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetRoleByName200ResponseDataInner(val *GetRoleByName200ResponseDataInner) *NullableGetRoleByName200ResponseDataInner { + return &NullableGetRoleByName200ResponseDataInner{value: val, isSet: true} +} + +func (v NullableGetRoleByName200ResponseDataInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetRoleByName200ResponseDataInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_get_role_by_name_200_response_pagination.go b/model_get_role_by_name_200_response_pagination.go new file mode 100644 index 0000000..df044a9 --- /dev/null +++ b/model_get_role_by_name_200_response_pagination.go @@ -0,0 +1,234 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the GetRoleByName200ResponsePagination type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetRoleByName200ResponsePagination{} + +// GetRoleByName200ResponsePagination struct for GetRoleByName200ResponsePagination +type GetRoleByName200ResponsePagination struct { + AfterCursor *string `json:"after_cursor,omitempty"` + BeforeCursor *string `json:"before_cursor,omitempty"` + NextLink *string `json:"next_link,omitempty"` + PreviousLink *string `json:"previous_link,omitempty"` +} + +// NewGetRoleByName200ResponsePagination instantiates a new GetRoleByName200ResponsePagination 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 NewGetRoleByName200ResponsePagination() *GetRoleByName200ResponsePagination { + this := GetRoleByName200ResponsePagination{} + return &this +} + +// NewGetRoleByName200ResponsePaginationWithDefaults instantiates a new GetRoleByName200ResponsePagination 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 NewGetRoleByName200ResponsePaginationWithDefaults() *GetRoleByName200ResponsePagination { + this := GetRoleByName200ResponsePagination{} + return &this +} + +// GetAfterCursor returns the AfterCursor field value if set, zero value otherwise. +func (o *GetRoleByName200ResponsePagination) GetAfterCursor() string { + if o == nil || isNil(o.AfterCursor) { + var ret string + return ret + } + return *o.AfterCursor +} + +// GetAfterCursorOk returns a tuple with the AfterCursor field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRoleByName200ResponsePagination) GetAfterCursorOk() (*string, bool) { + if o == nil || isNil(o.AfterCursor) { + return nil, false + } + return o.AfterCursor, true +} + +// HasAfterCursor returns a boolean if a field has been set. +func (o *GetRoleByName200ResponsePagination) HasAfterCursor() bool { + if o != nil && !isNil(o.AfterCursor) { + return true + } + + return false +} + +// SetAfterCursor gets a reference to the given string and assigns it to the AfterCursor field. +func (o *GetRoleByName200ResponsePagination) SetAfterCursor(v string) { + o.AfterCursor = &v +} + +// GetBeforeCursor returns the BeforeCursor field value if set, zero value otherwise. +func (o *GetRoleByName200ResponsePagination) GetBeforeCursor() string { + if o == nil || isNil(o.BeforeCursor) { + var ret string + return ret + } + return *o.BeforeCursor +} + +// GetBeforeCursorOk returns a tuple with the BeforeCursor field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRoleByName200ResponsePagination) GetBeforeCursorOk() (*string, bool) { + if o == nil || isNil(o.BeforeCursor) { + return nil, false + } + return o.BeforeCursor, true +} + +// HasBeforeCursor returns a boolean if a field has been set. +func (o *GetRoleByName200ResponsePagination) HasBeforeCursor() bool { + if o != nil && !isNil(o.BeforeCursor) { + return true + } + + return false +} + +// SetBeforeCursor gets a reference to the given string and assigns it to the BeforeCursor field. +func (o *GetRoleByName200ResponsePagination) SetBeforeCursor(v string) { + o.BeforeCursor = &v +} + +// GetNextLink returns the NextLink field value if set, zero value otherwise. +func (o *GetRoleByName200ResponsePagination) GetNextLink() string { + if o == nil || isNil(o.NextLink) { + var ret string + return ret + } + return *o.NextLink +} + +// GetNextLinkOk returns a tuple with the NextLink field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRoleByName200ResponsePagination) GetNextLinkOk() (*string, bool) { + if o == nil || isNil(o.NextLink) { + return nil, false + } + return o.NextLink, true +} + +// HasNextLink returns a boolean if a field has been set. +func (o *GetRoleByName200ResponsePagination) HasNextLink() bool { + if o != nil && !isNil(o.NextLink) { + return true + } + + return false +} + +// SetNextLink gets a reference to the given string and assigns it to the NextLink field. +func (o *GetRoleByName200ResponsePagination) SetNextLink(v string) { + o.NextLink = &v +} + +// GetPreviousLink returns the PreviousLink field value if set, zero value otherwise. +func (o *GetRoleByName200ResponsePagination) GetPreviousLink() string { + if o == nil || isNil(o.PreviousLink) { + var ret string + return ret + } + return *o.PreviousLink +} + +// GetPreviousLinkOk returns a tuple with the PreviousLink field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetRoleByName200ResponsePagination) GetPreviousLinkOk() (*string, bool) { + if o == nil || isNil(o.PreviousLink) { + return nil, false + } + return o.PreviousLink, true +} + +// HasPreviousLink returns a boolean if a field has been set. +func (o *GetRoleByName200ResponsePagination) HasPreviousLink() bool { + if o != nil && !isNil(o.PreviousLink) { + return true + } + + return false +} + +// SetPreviousLink gets a reference to the given string and assigns it to the PreviousLink field. +func (o *GetRoleByName200ResponsePagination) SetPreviousLink(v string) { + o.PreviousLink = &v +} + +func (o GetRoleByName200ResponsePagination) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetRoleByName200ResponsePagination) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.AfterCursor) { + toSerialize["after_cursor"] = o.AfterCursor + } + if !isNil(o.BeforeCursor) { + toSerialize["before_cursor"] = o.BeforeCursor + } + if !isNil(o.NextLink) { + toSerialize["next_link"] = o.NextLink + } + if !isNil(o.PreviousLink) { + toSerialize["previous_link"] = o.PreviousLink + } + return toSerialize, nil +} + +type NullableGetRoleByName200ResponsePagination struct { + value *GetRoleByName200ResponsePagination + isSet bool +} + +func (v NullableGetRoleByName200ResponsePagination) Get() *GetRoleByName200ResponsePagination { + return v.value +} + +func (v *NullableGetRoleByName200ResponsePagination) Set(val *GetRoleByName200ResponsePagination) { + v.value = val + v.isSet = true +} + +func (v NullableGetRoleByName200ResponsePagination) IsSet() bool { + return v.isSet +} + +func (v *NullableGetRoleByName200ResponsePagination) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetRoleByName200ResponsePagination(val *GetRoleByName200ResponsePagination) *NullableGetRoleByName200ResponsePagination { + return &NullableGetRoleByName200ResponsePagination{value: val, isSet: true} +} + +func (v NullableGetRoleByName200ResponsePagination) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetRoleByName200ResponsePagination) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_get_score_insights_200_response.go b/model_get_score_insights_200_response.go deleted file mode 100644 index 3c88cb8..0000000 --- a/model_get_score_insights_200_response.go +++ /dev/null @@ -1,151 +0,0 @@ -/* -OneLogin API - -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -API version: 3.0.0-alpha.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package openapi - -import ( - "encoding/json" -) - -// GetScoreInsights200Response struct for GetScoreInsights200Response -type GetScoreInsights200Response struct { - Scores *GetScoreInsights200ResponseScores `json:"scores,omitempty"` - Total *int32 `json:"total,omitempty"` -} - -// NewGetScoreInsights200Response instantiates a new GetScoreInsights200Response 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 NewGetScoreInsights200Response() *GetScoreInsights200Response { - this := GetScoreInsights200Response{} - return &this -} - -// NewGetScoreInsights200ResponseWithDefaults instantiates a new GetScoreInsights200Response 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 NewGetScoreInsights200ResponseWithDefaults() *GetScoreInsights200Response { - this := GetScoreInsights200Response{} - return &this -} - -// GetScores returns the Scores field value if set, zero value otherwise. -func (o *GetScoreInsights200Response) GetScores() GetScoreInsights200ResponseScores { - if o == nil || o.Scores == nil { - var ret GetScoreInsights200ResponseScores - return ret - } - return *o.Scores -} - -// GetScoresOk returns a tuple with the Scores field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetScoreInsights200Response) GetScoresOk() (*GetScoreInsights200ResponseScores, bool) { - if o == nil || o.Scores == nil { - return nil, false - } - return o.Scores, true -} - -// HasScores returns a boolean if a field has been set. -func (o *GetScoreInsights200Response) HasScores() bool { - if o != nil && o.Scores != nil { - return true - } - - return false -} - -// SetScores gets a reference to the given GetScoreInsights200ResponseScores and assigns it to the Scores field. -func (o *GetScoreInsights200Response) SetScores(v GetScoreInsights200ResponseScores) { - o.Scores = &v -} - -// GetTotal returns the Total field value if set, zero value otherwise. -func (o *GetScoreInsights200Response) GetTotal() int32 { - if o == nil || o.Total == nil { - var ret int32 - return ret - } - return *o.Total -} - -// GetTotalOk returns a tuple with the Total field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetScoreInsights200Response) GetTotalOk() (*int32, bool) { - if o == nil || o.Total == nil { - return nil, false - } - return o.Total, true -} - -// HasTotal returns a boolean if a field has been set. -func (o *GetScoreInsights200Response) HasTotal() bool { - if o != nil && o.Total != nil { - return true - } - - return false -} - -// SetTotal gets a reference to the given int32 and assigns it to the Total field. -func (o *GetScoreInsights200Response) SetTotal(v int32) { - o.Total = &v -} - -func (o GetScoreInsights200Response) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Scores != nil { - toSerialize["scores"] = o.Scores - } - if o.Total != nil { - toSerialize["total"] = o.Total - } - return json.Marshal(toSerialize) -} - -type NullableGetScoreInsights200Response struct { - value *GetScoreInsights200Response - isSet bool -} - -func (v NullableGetScoreInsights200Response) Get() *GetScoreInsights200Response { - return v.value -} - -func (v *NullableGetScoreInsights200Response) Set(val *GetScoreInsights200Response) { - v.value = val - v.isSet = true -} - -func (v NullableGetScoreInsights200Response) IsSet() bool { - return v.isSet -} - -func (v *NullableGetScoreInsights200Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetScoreInsights200Response(val *GetScoreInsights200Response) *NullableGetScoreInsights200Response { - return &NullableGetScoreInsights200Response{value: val, isSet: true} -} - -func (v NullableGetScoreInsights200Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetScoreInsights200Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_get_user_apps_200_response_inner.go b/model_get_user_apps_200_response_inner.go index 4416fa0..03a111c 100644 --- a/model_get_user_apps_200_response_inner.go +++ b/model_get_user_apps_200_response_inner.go @@ -1,19 +1,22 @@ /* OneLogin API -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) +OpenAPI Specification for OneLogin -API version: 3.0.0-alpha.1 +API version: 3.1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package openapi +package onelogin import ( "encoding/json" ) +// checks if the GetUserApps200ResponseInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetUserApps200ResponseInner{} + // GetUserApps200ResponseInner struct for GetUserApps200ResponseInner type GetUserApps200ResponseInner struct { // The App ID @@ -52,7 +55,7 @@ func NewGetUserApps200ResponseInnerWithDefaults() *GetUserApps200ResponseInner { // GetId returns the Id field value if set, zero value otherwise. func (o *GetUserApps200ResponseInner) GetId() int32 { - if o == nil || o.Id == nil { + if o == nil || isNil(o.Id) { var ret int32 return ret } @@ -62,7 +65,7 @@ func (o *GetUserApps200ResponseInner) GetId() int32 { // GetIdOk returns a tuple with the Id field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *GetUserApps200ResponseInner) GetIdOk() (*int32, bool) { - if o == nil || o.Id == nil { + if o == nil || isNil(o.Id) { return nil, false } return o.Id, true @@ -70,7 +73,7 @@ func (o *GetUserApps200ResponseInner) GetIdOk() (*int32, bool) { // HasId returns a boolean if a field has been set. func (o *GetUserApps200ResponseInner) HasId() bool { - if o != nil && o.Id != nil { + if o != nil && !isNil(o.Id) { return true } @@ -84,7 +87,7 @@ func (o *GetUserApps200ResponseInner) SetId(v int32) { // GetIconUrl returns the IconUrl field value if set, zero value otherwise. func (o *GetUserApps200ResponseInner) GetIconUrl() string { - if o == nil || o.IconUrl == nil { + if o == nil || isNil(o.IconUrl) { var ret string return ret } @@ -94,7 +97,7 @@ func (o *GetUserApps200ResponseInner) 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 *GetUserApps200ResponseInner) GetIconUrlOk() (*string, bool) { - if o == nil || o.IconUrl == nil { + if o == nil || isNil(o.IconUrl) { return nil, false } return o.IconUrl, true @@ -102,7 +105,7 @@ func (o *GetUserApps200ResponseInner) GetIconUrlOk() (*string, bool) { // HasIconUrl returns a boolean if a field has been set. func (o *GetUserApps200ResponseInner) HasIconUrl() bool { - if o != nil && o.IconUrl != nil { + if o != nil && !isNil(o.IconUrl) { return true } @@ -116,7 +119,7 @@ func (o *GetUserApps200ResponseInner) SetIconUrl(v string) { // GetExtension returns the Extension field value if set, zero value otherwise. func (o *GetUserApps200ResponseInner) GetExtension() bool { - if o == nil || o.Extension == nil { + if o == nil || isNil(o.Extension) { var ret bool return ret } @@ -126,7 +129,7 @@ func (o *GetUserApps200ResponseInner) GetExtension() bool { // GetExtensionOk returns a tuple with the Extension field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *GetUserApps200ResponseInner) GetExtensionOk() (*bool, bool) { - if o == nil || o.Extension == nil { + if o == nil || isNil(o.Extension) { return nil, false } return o.Extension, true @@ -134,7 +137,7 @@ func (o *GetUserApps200ResponseInner) GetExtensionOk() (*bool, bool) { // HasExtension returns a boolean if a field has been set. func (o *GetUserApps200ResponseInner) HasExtension() bool { - if o != nil && o.Extension != nil { + if o != nil && !isNil(o.Extension) { return true } @@ -148,7 +151,7 @@ func (o *GetUserApps200ResponseInner) SetExtension(v bool) { // GetLoginId returns the LoginId field value if set, zero value otherwise. func (o *GetUserApps200ResponseInner) GetLoginId() int32 { - if o == nil || o.LoginId == nil { + if o == nil || isNil(o.LoginId) { var ret int32 return ret } @@ -158,7 +161,7 @@ func (o *GetUserApps200ResponseInner) GetLoginId() int32 { // GetLoginIdOk returns a tuple with the LoginId field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *GetUserApps200ResponseInner) GetLoginIdOk() (*int32, bool) { - if o == nil || o.LoginId == nil { + if o == nil || isNil(o.LoginId) { return nil, false } return o.LoginId, true @@ -166,7 +169,7 @@ func (o *GetUserApps200ResponseInner) GetLoginIdOk() (*int32, bool) { // HasLoginId returns a boolean if a field has been set. func (o *GetUserApps200ResponseInner) HasLoginId() bool { - if o != nil && o.LoginId != nil { + if o != nil && !isNil(o.LoginId) { return true } @@ -180,7 +183,7 @@ func (o *GetUserApps200ResponseInner) SetLoginId(v int32) { // GetName returns the Name field value if set, zero value otherwise. func (o *GetUserApps200ResponseInner) GetName() string { - if o == nil || o.Name == nil { + if o == nil || isNil(o.Name) { var ret string return ret } @@ -190,7 +193,7 @@ func (o *GetUserApps200ResponseInner) 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 *GetUserApps200ResponseInner) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { + if o == nil || isNil(o.Name) { return nil, false } return o.Name, true @@ -198,7 +201,7 @@ func (o *GetUserApps200ResponseInner) GetNameOk() (*string, bool) { // HasName returns a boolean if a field has been set. func (o *GetUserApps200ResponseInner) HasName() bool { - if o != nil && o.Name != nil { + if o != nil && !isNil(o.Name) { return true } @@ -212,7 +215,7 @@ func (o *GetUserApps200ResponseInner) SetName(v string) { // GetProvisioningStatus returns the ProvisioningStatus field value if set, zero value otherwise. func (o *GetUserApps200ResponseInner) GetProvisioningStatus() string { - if o == nil || o.ProvisioningStatus == nil { + if o == nil || isNil(o.ProvisioningStatus) { var ret string return ret } @@ -222,7 +225,7 @@ func (o *GetUserApps200ResponseInner) GetProvisioningStatus() string { // GetProvisioningStatusOk returns a tuple with the ProvisioningStatus field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *GetUserApps200ResponseInner) GetProvisioningStatusOk() (*string, bool) { - if o == nil || o.ProvisioningStatus == nil { + if o == nil || isNil(o.ProvisioningStatus) { return nil, false } return o.ProvisioningStatus, true @@ -230,7 +233,7 @@ func (o *GetUserApps200ResponseInner) GetProvisioningStatusOk() (*string, bool) // HasProvisioningStatus returns a boolean if a field has been set. func (o *GetUserApps200ResponseInner) HasProvisioningStatus() bool { - if o != nil && o.ProvisioningStatus != nil { + if o != nil && !isNil(o.ProvisioningStatus) { return true } @@ -244,7 +247,7 @@ func (o *GetUserApps200ResponseInner) SetProvisioningStatus(v string) { // GetProvisioningState returns the ProvisioningState field value if set, zero value otherwise. func (o *GetUserApps200ResponseInner) GetProvisioningState() string { - if o == nil || o.ProvisioningState == nil { + if o == nil || isNil(o.ProvisioningState) { var ret string return ret } @@ -254,7 +257,7 @@ func (o *GetUserApps200ResponseInner) GetProvisioningState() string { // GetProvisioningStateOk returns a tuple with the ProvisioningState field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *GetUserApps200ResponseInner) GetProvisioningStateOk() (*string, bool) { - if o == nil || o.ProvisioningState == nil { + if o == nil || isNil(o.ProvisioningState) { return nil, false } return o.ProvisioningState, true @@ -262,7 +265,7 @@ func (o *GetUserApps200ResponseInner) GetProvisioningStateOk() (*string, bool) { // HasProvisioningState returns a boolean if a field has been set. func (o *GetUserApps200ResponseInner) HasProvisioningState() bool { - if o != nil && o.ProvisioningState != nil { + if o != nil && !isNil(o.ProvisioningState) { return true } @@ -276,7 +279,7 @@ func (o *GetUserApps200ResponseInner) SetProvisioningState(v string) { // GetProvisioningEnabled returns the ProvisioningEnabled field value if set, zero value otherwise. func (o *GetUserApps200ResponseInner) GetProvisioningEnabled() bool { - if o == nil || o.ProvisioningEnabled == nil { + if o == nil || isNil(o.ProvisioningEnabled) { var ret bool return ret } @@ -286,7 +289,7 @@ func (o *GetUserApps200ResponseInner) GetProvisioningEnabled() bool { // GetProvisioningEnabledOk returns a tuple with the ProvisioningEnabled field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *GetUserApps200ResponseInner) GetProvisioningEnabledOk() (*bool, bool) { - if o == nil || o.ProvisioningEnabled == nil { + if o == nil || isNil(o.ProvisioningEnabled) { return nil, false } return o.ProvisioningEnabled, true @@ -294,7 +297,7 @@ func (o *GetUserApps200ResponseInner) GetProvisioningEnabledOk() (*bool, bool) { // HasProvisioningEnabled returns a boolean if a field has been set. func (o *GetUserApps200ResponseInner) HasProvisioningEnabled() bool { - if o != nil && o.ProvisioningEnabled != nil { + if o != nil && !isNil(o.ProvisioningEnabled) { return true } @@ -307,32 +310,40 @@ func (o *GetUserApps200ResponseInner) SetProvisioningEnabled(v bool) { } func (o GetUserApps200ResponseInner) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetUserApps200ResponseInner) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { + if !isNil(o.Id) { toSerialize["id"] = o.Id } - if o.IconUrl != nil { + if !isNil(o.IconUrl) { toSerialize["icon_url"] = o.IconUrl } - if o.Extension != nil { + if !isNil(o.Extension) { toSerialize["extension"] = o.Extension } - if o.LoginId != nil { + if !isNil(o.LoginId) { toSerialize["login_id"] = o.LoginId } - if o.Name != nil { + if !isNil(o.Name) { toSerialize["name"] = o.Name } - if o.ProvisioningStatus != nil { + if !isNil(o.ProvisioningStatus) { toSerialize["provisioning_status"] = o.ProvisioningStatus } - if o.ProvisioningState != nil { + if !isNil(o.ProvisioningState) { toSerialize["provisioning_state"] = o.ProvisioningState } - if o.ProvisioningEnabled != nil { + if !isNil(o.ProvisioningEnabled) { toSerialize["provisioning_enabled"] = o.ProvisioningEnabled } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableGetUserApps200ResponseInner struct { diff --git a/model_get_user_roles_200_response.go b/model_get_user_roles_200_response.go new file mode 100644 index 0000000..c3ae05d --- /dev/null +++ b/model_get_user_roles_200_response.go @@ -0,0 +1,163 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the GetUserRoles200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetUserRoles200Response{} + +// GetUserRoles200Response struct for GetUserRoles200Response +type GetUserRoles200Response struct { + Status *Error `json:"status,omitempty"` + // List of Role IDs that are assigned to the User + Data []int32 `json:"data,omitempty"` +} + +// NewGetUserRoles200Response instantiates a new GetUserRoles200Response 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 NewGetUserRoles200Response() *GetUserRoles200Response { + this := GetUserRoles200Response{} + return &this +} + +// NewGetUserRoles200ResponseWithDefaults instantiates a new GetUserRoles200Response 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 NewGetUserRoles200ResponseWithDefaults() *GetUserRoles200Response { + this := GetUserRoles200Response{} + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *GetUserRoles200Response) GetStatus() Error { + if o == nil || isNil(o.Status) { + var ret Error + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetUserRoles200Response) GetStatusOk() (*Error, bool) { + if o == nil || isNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *GetUserRoles200Response) HasStatus() bool { + if o != nil && !isNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given Error and assigns it to the Status field. +func (o *GetUserRoles200Response) SetStatus(v Error) { + o.Status = &v +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *GetUserRoles200Response) GetData() []int32 { + if o == nil || isNil(o.Data) { + var ret []int32 + return ret + } + return o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetUserRoles200Response) GetDataOk() ([]int32, bool) { + if o == nil || isNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *GetUserRoles200Response) HasData() bool { + if o != nil && !isNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given []int32 and assigns it to the Data field. +func (o *GetUserRoles200Response) SetData(v []int32) { + o.Data = v +} + +func (o GetUserRoles200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetUserRoles200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.Status) { + toSerialize["status"] = o.Status + } + if !isNil(o.Data) { + toSerialize["data"] = o.Data + } + return toSerialize, nil +} + +type NullableGetUserRoles200Response struct { + value *GetUserRoles200Response + isSet bool +} + +func (v NullableGetUserRoles200Response) Get() *GetUserRoles200Response { + return v.value +} + +func (v *NullableGetUserRoles200Response) Set(val *GetUserRoles200Response) { + v.value = val + v.isSet = true +} + +func (v NullableGetUserRoles200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableGetUserRoles200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetUserRoles200Response(val *GetUserRoles200Response) *NullableGetUserRoles200Response { + return &NullableGetUserRoles200Response{value: val, isSet: true} +} + +func (v NullableGetUserRoles200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetUserRoles200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_get_user_verification_200_response.go b/model_get_user_verification_200_response.go new file mode 100644 index 0000000..a29d7bf --- /dev/null +++ b/model_get_user_verification_200_response.go @@ -0,0 +1,201 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the GetUserVerification200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetUserVerification200Response{} + +// GetUserVerification200Response struct for GetUserVerification200Response +type GetUserVerification200Response struct { + // registration identifier + Id *string `json:"id,omitempty"` + // pending = has not been completed. accepted registration has successfully completed, rejected user has denied the MFA attempt or incorrectly provided the OneLogin Voice OTP code. + Status *string `json:"status,omitempty"` + // Device Id to be used with verify factor + DeviceId *string `json:"device_id,omitempty"` +} + +// NewGetUserVerification200Response instantiates a new GetUserVerification200Response 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 NewGetUserVerification200Response() *GetUserVerification200Response { + this := GetUserVerification200Response{} + return &this +} + +// NewGetUserVerification200ResponseWithDefaults instantiates a new GetUserVerification200Response 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 NewGetUserVerification200ResponseWithDefaults() *GetUserVerification200Response { + this := GetUserVerification200Response{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *GetUserVerification200Response) GetId() string { + if o == nil || isNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetUserVerification200Response) GetIdOk() (*string, bool) { + if o == nil || isNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *GetUserVerification200Response) HasId() bool { + if o != nil && !isNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *GetUserVerification200Response) SetId(v string) { + o.Id = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *GetUserVerification200Response) GetStatus() string { + if o == nil || isNil(o.Status) { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetUserVerification200Response) GetStatusOk() (*string, bool) { + if o == nil || isNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *GetUserVerification200Response) HasStatus() bool { + if o != nil && !isNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *GetUserVerification200Response) SetStatus(v string) { + o.Status = &v +} + +// GetDeviceId returns the DeviceId field value if set, zero value otherwise. +func (o *GetUserVerification200Response) GetDeviceId() string { + if o == nil || isNil(o.DeviceId) { + var ret string + return ret + } + return *o.DeviceId +} + +// GetDeviceIdOk returns a tuple with the DeviceId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetUserVerification200Response) GetDeviceIdOk() (*string, bool) { + if o == nil || isNil(o.DeviceId) { + return nil, false + } + return o.DeviceId, true +} + +// HasDeviceId returns a boolean if a field has been set. +func (o *GetUserVerification200Response) HasDeviceId() bool { + if o != nil && !isNil(o.DeviceId) { + return true + } + + return false +} + +// SetDeviceId gets a reference to the given string and assigns it to the DeviceId field. +func (o *GetUserVerification200Response) SetDeviceId(v string) { + o.DeviceId = &v +} + +func (o GetUserVerification200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetUserVerification200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.Id) { + toSerialize["id"] = o.Id + } + if !isNil(o.Status) { + toSerialize["status"] = o.Status + } + if !isNil(o.DeviceId) { + toSerialize["device_id"] = o.DeviceId + } + return toSerialize, nil +} + +type NullableGetUserVerification200Response struct { + value *GetUserVerification200Response + isSet bool +} + +func (v NullableGetUserVerification200Response) Get() *GetUserVerification200Response { + return v.value +} + +func (v *NullableGetUserVerification200Response) Set(val *GetUserVerification200Response) { + v.value = val + v.isSet = true +} + +func (v NullableGetUserVerification200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableGetUserVerification200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetUserVerification200Response(val *GetUserVerification200Response) *NullableGetUserVerification200Response { + return &NullableGetUserVerification200Response{value: val, isSet: true} +} + +func (v NullableGetUserVerification200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetUserVerification200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_group.go b/model_group.go new file mode 100644 index 0000000..87ce04f --- /dev/null +++ b/model_group.go @@ -0,0 +1,201 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the Group type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Group{} + +// Group struct for Group +type Group struct { + // Group's unique Onelogin ID + Id *int32 `json:"id,omitempty"` + // Group name + Name *string `json:"name,omitempty"` + // Deprecated. Will always show the attribute nil=\"true\". + Reference *string `json:"reference,omitempty"` +} + +// NewGroup instantiates a new Group 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 NewGroup() *Group { + this := Group{} + return &this +} + +// NewGroupWithDefaults instantiates a new Group 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 NewGroupWithDefaults() *Group { + this := Group{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *Group) GetId() int32 { + if o == nil || isNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Group) GetIdOk() (*int32, bool) { + if o == nil || isNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *Group) HasId() bool { + if o != nil && !isNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *Group) SetId(v int32) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *Group) GetName() string { + if o == nil || isNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// 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 *Group) GetNameOk() (*string, bool) { + if o == nil || isNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *Group) HasName() bool { + if o != nil && !isNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *Group) SetName(v string) { + o.Name = &v +} + +// GetReference returns the Reference field value if set, zero value otherwise. +func (o *Group) GetReference() string { + if o == nil || isNil(o.Reference) { + var ret string + return ret + } + return *o.Reference +} + +// GetReferenceOk returns a tuple with the Reference field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Group) GetReferenceOk() (*string, bool) { + if o == nil || isNil(o.Reference) { + return nil, false + } + return o.Reference, true +} + +// HasReference returns a boolean if a field has been set. +func (o *Group) HasReference() bool { + if o != nil && !isNil(o.Reference) { + return true + } + + return false +} + +// SetReference gets a reference to the given string and assigns it to the Reference field. +func (o *Group) SetReference(v string) { + o.Reference = &v +} + +func (o Group) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Group) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.Id) { + toSerialize["id"] = o.Id + } + if !isNil(o.Name) { + toSerialize["name"] = o.Name + } + if !isNil(o.Reference) { + toSerialize["reference"] = o.Reference + } + return toSerialize, nil +} + +type NullableGroup struct { + value *Group + isSet bool +} + +func (v NullableGroup) Get() *Group { + return v.value +} + +func (v *NullableGroup) Set(val *Group) { + v.value = val + v.isSet = true +} + +func (v NullableGroup) IsSet() bool { + return v.isSet +} + +func (v *NullableGroup) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGroup(val *Group) *NullableGroup { + return &NullableGroup{value: val, isSet: true} +} + +func (v NullableGroup) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGroup) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_hook.go b/model_hook.go index da3838b..56d1dec 100644 --- a/model_hook.go +++ b/model_hook.go @@ -1,19 +1,22 @@ /* OneLogin API -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) +OpenAPI Specification for OneLogin -API version: 3.0.0-alpha.1 +API version: 3.1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package openapi +package onelogin import ( "encoding/json" ) +// checks if the Hook type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Hook{} + // Hook struct for Hook type Hook struct { // The Hook unique ID in OneLogin. @@ -31,7 +34,7 @@ type Hook struct { // Number of retries if execution fails. Retries int32 `json:"retries"` // An object containing NPM packages that are bundled with the hook function. - Packages map[string]interface{} `json:"packages"` + Packages map[string]string `json:"packages"` // A base64 encoded string containing the javascript function code. Function string `json:"function"` // The semantic version of the content that will be injected into this hook. @@ -40,7 +43,7 @@ type Hook struct { Status *string `json:"status,omitempty"` Options *HookOptions `json:"options,omitempty"` // An array of objects that let you limit the execution of a hook to users in specific roles. - Conditions []HookConditionsInner `json:"conditions,omitempty"` + Conditions []Condition `json:"conditions,omitempty"` // ISO8601 format date that they hook function was created. CreatedAt *string `json:"created_at,omitempty"` // ISO8601 format date that they hook function was last updated. @@ -51,7 +54,7 @@ type Hook 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 NewHook(type_ string, disabled bool, timeout int32, envVars []string, runtime string, retries int32, packages map[string]interface{}, function string) *Hook { +func NewHook(type_ string, disabled bool, timeout int32, envVars []string, runtime string, retries int32, packages map[string]string, function string) *Hook { this := Hook{} this.Type = type_ this.Disabled = disabled @@ -80,7 +83,7 @@ func NewHookWithDefaults() *Hook { // GetId returns the Id field value if set, zero value otherwise. func (o *Hook) GetId() string { - if o == nil || o.Id == nil { + if o == nil || isNil(o.Id) { var ret string return ret } @@ -90,7 +93,7 @@ func (o *Hook) GetId() string { // GetIdOk returns a tuple with the Id field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Hook) GetIdOk() (*string, bool) { - if o == nil || o.Id == nil { + if o == nil || isNil(o.Id) { return nil, false } return o.Id, true @@ -98,7 +101,7 @@ func (o *Hook) GetIdOk() (*string, bool) { // HasId returns a boolean if a field has been set. func (o *Hook) HasId() bool { - if o != nil && o.Id != nil { + if o != nil && !isNil(o.Id) { return true } @@ -255,9 +258,9 @@ func (o *Hook) SetRetries(v int32) { } // GetPackages returns the Packages field value -func (o *Hook) GetPackages() map[string]interface{} { +func (o *Hook) GetPackages() map[string]string { if o == nil { - var ret map[string]interface{} + var ret map[string]string return ret } @@ -266,15 +269,15 @@ func (o *Hook) GetPackages() map[string]interface{} { // GetPackagesOk returns a tuple with the Packages field value // and a boolean to check if the value has been set. -func (o *Hook) GetPackagesOk() (map[string]interface{}, bool) { +func (o *Hook) GetPackagesOk() (*map[string]string, bool) { if o == nil { return nil, false } - return o.Packages, true + return &o.Packages, true } // SetPackages sets field value -func (o *Hook) SetPackages(v map[string]interface{}) { +func (o *Hook) SetPackages(v map[string]string) { o.Packages = v } @@ -304,7 +307,7 @@ func (o *Hook) SetFunction(v string) { // GetContextVersion returns the ContextVersion field value if set, zero value otherwise. func (o *Hook) GetContextVersion() string { - if o == nil || o.ContextVersion == nil { + if o == nil || isNil(o.ContextVersion) { var ret string return ret } @@ -314,7 +317,7 @@ func (o *Hook) GetContextVersion() string { // GetContextVersionOk returns a tuple with the ContextVersion field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Hook) GetContextVersionOk() (*string, bool) { - if o == nil || o.ContextVersion == nil { + if o == nil || isNil(o.ContextVersion) { return nil, false } return o.ContextVersion, true @@ -322,7 +325,7 @@ func (o *Hook) GetContextVersionOk() (*string, bool) { // HasContextVersion returns a boolean if a field has been set. func (o *Hook) HasContextVersion() bool { - if o != nil && o.ContextVersion != nil { + if o != nil && !isNil(o.ContextVersion) { return true } @@ -336,7 +339,7 @@ func (o *Hook) SetContextVersion(v string) { // GetStatus returns the Status field value if set, zero value otherwise. func (o *Hook) GetStatus() string { - if o == nil || o.Status == nil { + if o == nil || isNil(o.Status) { var ret string return ret } @@ -346,7 +349,7 @@ func (o *Hook) GetStatus() string { // GetStatusOk returns a tuple with the Status field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Hook) GetStatusOk() (*string, bool) { - if o == nil || o.Status == nil { + if o == nil || isNil(o.Status) { return nil, false } return o.Status, true @@ -354,7 +357,7 @@ func (o *Hook) GetStatusOk() (*string, bool) { // HasStatus returns a boolean if a field has been set. func (o *Hook) HasStatus() bool { - if o != nil && o.Status != nil { + if o != nil && !isNil(o.Status) { return true } @@ -368,7 +371,7 @@ func (o *Hook) SetStatus(v string) { // GetOptions returns the Options field value if set, zero value otherwise. func (o *Hook) GetOptions() HookOptions { - if o == nil || o.Options == nil { + if o == nil || isNil(o.Options) { var ret HookOptions return ret } @@ -378,7 +381,7 @@ func (o *Hook) GetOptions() HookOptions { // GetOptionsOk returns a tuple with the Options field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Hook) GetOptionsOk() (*HookOptions, bool) { - if o == nil || o.Options == nil { + if o == nil || isNil(o.Options) { return nil, false } return o.Options, true @@ -386,7 +389,7 @@ func (o *Hook) GetOptionsOk() (*HookOptions, bool) { // HasOptions returns a boolean if a field has been set. func (o *Hook) HasOptions() bool { - if o != nil && o.Options != nil { + if o != nil && !isNil(o.Options) { return true } @@ -399,9 +402,9 @@ func (o *Hook) SetOptions(v HookOptions) { } // GetConditions returns the Conditions field value if set, zero value otherwise. -func (o *Hook) GetConditions() []HookConditionsInner { - if o == nil || o.Conditions == nil { - var ret []HookConditionsInner +func (o *Hook) GetConditions() []Condition { + if o == nil || isNil(o.Conditions) { + var ret []Condition return ret } return o.Conditions @@ -409,8 +412,8 @@ func (o *Hook) GetConditions() []HookConditionsInner { // GetConditionsOk returns a tuple with the Conditions field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Hook) GetConditionsOk() ([]HookConditionsInner, bool) { - if o == nil || o.Conditions == nil { +func (o *Hook) GetConditionsOk() ([]Condition, bool) { + if o == nil || isNil(o.Conditions) { return nil, false } return o.Conditions, true @@ -418,21 +421,21 @@ func (o *Hook) GetConditionsOk() ([]HookConditionsInner, bool) { // HasConditions returns a boolean if a field has been set. func (o *Hook) HasConditions() bool { - if o != nil && o.Conditions != nil { + if o != nil && !isNil(o.Conditions) { return true } return false } -// SetConditions gets a reference to the given []HookConditionsInner and assigns it to the Conditions field. -func (o *Hook) SetConditions(v []HookConditionsInner) { +// SetConditions gets a reference to the given []Condition and assigns it to the Conditions field. +func (o *Hook) SetConditions(v []Condition) { o.Conditions = v } // GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. func (o *Hook) GetCreatedAt() string { - if o == nil || o.CreatedAt == nil { + if o == nil || isNil(o.CreatedAt) { var ret string return ret } @@ -442,7 +445,7 @@ func (o *Hook) GetCreatedAt() string { // GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Hook) GetCreatedAtOk() (*string, bool) { - if o == nil || o.CreatedAt == nil { + if o == nil || isNil(o.CreatedAt) { return nil, false } return o.CreatedAt, true @@ -450,7 +453,7 @@ func (o *Hook) GetCreatedAtOk() (*string, bool) { // HasCreatedAt returns a boolean if a field has been set. func (o *Hook) HasCreatedAt() bool { - if o != nil && o.CreatedAt != nil { + if o != nil && !isNil(o.CreatedAt) { return true } @@ -464,7 +467,7 @@ func (o *Hook) SetCreatedAt(v string) { // GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. func (o *Hook) GetUpdatedAt() string { - if o == nil || o.UpdatedAt == nil { + if o == nil || isNil(o.UpdatedAt) { var ret string return ret } @@ -474,7 +477,7 @@ func (o *Hook) GetUpdatedAt() string { // GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Hook) GetUpdatedAtOk() (*string, bool) { - if o == nil || o.UpdatedAt == nil { + if o == nil || isNil(o.UpdatedAt) { return nil, false } return o.UpdatedAt, true @@ -482,7 +485,7 @@ func (o *Hook) GetUpdatedAtOk() (*string, bool) { // HasUpdatedAt returns a boolean if a field has been set. func (o *Hook) HasUpdatedAt() bool { - if o != nil && o.UpdatedAt != nil { + if o != nil && !isNil(o.UpdatedAt) { return true } @@ -495,53 +498,45 @@ func (o *Hook) SetUpdatedAt(v string) { } func (o Hook) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Hook) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { + if !isNil(o.Id) { toSerialize["id"] = o.Id } - if true { - toSerialize["type"] = o.Type - } - if true { - toSerialize["disabled"] = o.Disabled - } - if true { - toSerialize["timeout"] = o.Timeout - } - if true { - toSerialize["env_vars"] = o.EnvVars - } - if true { - toSerialize["runtime"] = o.Runtime - } - if true { - toSerialize["retries"] = o.Retries - } - if true { - toSerialize["packages"] = o.Packages - } - if true { - toSerialize["function"] = o.Function - } - if o.ContextVersion != nil { + toSerialize["type"] = o.Type + toSerialize["disabled"] = o.Disabled + toSerialize["timeout"] = o.Timeout + toSerialize["env_vars"] = o.EnvVars + toSerialize["runtime"] = o.Runtime + toSerialize["retries"] = o.Retries + toSerialize["packages"] = o.Packages + toSerialize["function"] = o.Function + if !isNil(o.ContextVersion) { toSerialize["context_version"] = o.ContextVersion } - if o.Status != nil { + if !isNil(o.Status) { toSerialize["status"] = o.Status } - if o.Options != nil { + if !isNil(o.Options) { toSerialize["options"] = o.Options } - if o.Conditions != nil { + if !isNil(o.Conditions) { toSerialize["conditions"] = o.Conditions } - if o.CreatedAt != nil { + if !isNil(o.CreatedAt) { toSerialize["created_at"] = o.CreatedAt } - if o.UpdatedAt != nil { + if !isNil(o.UpdatedAt) { toSerialize["updated_at"] = o.UpdatedAt } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableHook struct { diff --git a/model_hook_conditions_inner.go b/model_hook_conditions_inner.go deleted file mode 100644 index 05431e6..0000000 --- a/model_hook_conditions_inner.go +++ /dev/null @@ -1,187 +0,0 @@ -/* -OneLogin API - -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -API version: 3.0.0-alpha.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package openapi - -import ( - "encoding/json" -) - -// HookConditionsInner struct for HookConditionsInner -type HookConditionsInner struct { - Source *string `json:"source,omitempty"` - Operator *string `json:"operator,omitempty"` - Value *string `json:"value,omitempty"` -} - -// NewHookConditionsInner instantiates a new HookConditionsInner 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 NewHookConditionsInner() *HookConditionsInner { - this := HookConditionsInner{} - return &this -} - -// NewHookConditionsInnerWithDefaults instantiates a new HookConditionsInner 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 NewHookConditionsInnerWithDefaults() *HookConditionsInner { - this := HookConditionsInner{} - return &this -} - -// GetSource returns the Source field value if set, zero value otherwise. -func (o *HookConditionsInner) GetSource() string { - if o == nil || o.Source == nil { - var ret string - return ret - } - return *o.Source -} - -// GetSourceOk returns a tuple with the Source field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *HookConditionsInner) GetSourceOk() (*string, bool) { - if o == nil || o.Source == nil { - return nil, false - } - return o.Source, true -} - -// HasSource returns a boolean if a field has been set. -func (o *HookConditionsInner) HasSource() bool { - if o != nil && o.Source != nil { - return true - } - - return false -} - -// SetSource gets a reference to the given string and assigns it to the Source field. -func (o *HookConditionsInner) SetSource(v string) { - o.Source = &v -} - -// GetOperator returns the Operator field value if set, zero value otherwise. -func (o *HookConditionsInner) GetOperator() string { - if o == nil || o.Operator == nil { - var ret string - return ret - } - return *o.Operator -} - -// GetOperatorOk returns a tuple with the Operator field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *HookConditionsInner) GetOperatorOk() (*string, bool) { - if o == nil || o.Operator == nil { - return nil, false - } - return o.Operator, true -} - -// HasOperator returns a boolean if a field has been set. -func (o *HookConditionsInner) HasOperator() bool { - if o != nil && o.Operator != nil { - return true - } - - return false -} - -// SetOperator gets a reference to the given string and assigns it to the Operator field. -func (o *HookConditionsInner) SetOperator(v string) { - o.Operator = &v -} - -// GetValue returns the Value field value if set, zero value otherwise. -func (o *HookConditionsInner) GetValue() string { - if o == nil || o.Value == nil { - var ret string - return ret - } - return *o.Value -} - -// GetValueOk returns a tuple with the Value field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *HookConditionsInner) GetValueOk() (*string, bool) { - if o == nil || o.Value == nil { - return nil, false - } - return o.Value, true -} - -// HasValue returns a boolean if a field has been set. -func (o *HookConditionsInner) HasValue() bool { - if o != nil && o.Value != nil { - return true - } - - return false -} - -// SetValue gets a reference to the given string and assigns it to the Value field. -func (o *HookConditionsInner) SetValue(v string) { - o.Value = &v -} - -func (o HookConditionsInner) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Source != nil { - toSerialize["source"] = o.Source - } - if o.Operator != nil { - toSerialize["operator"] = o.Operator - } - if o.Value != nil { - toSerialize["value"] = o.Value - } - return json.Marshal(toSerialize) -} - -type NullableHookConditionsInner struct { - value *HookConditionsInner - isSet bool -} - -func (v NullableHookConditionsInner) Get() *HookConditionsInner { - return v.value -} - -func (v *NullableHookConditionsInner) Set(val *HookConditionsInner) { - v.value = val - v.isSet = true -} - -func (v NullableHookConditionsInner) IsSet() bool { - return v.isSet -} - -func (v *NullableHookConditionsInner) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableHookConditionsInner(val *HookConditionsInner) *NullableHookConditionsInner { - return &NullableHookConditionsInner{value: val, isSet: true} -} - -func (v NullableHookConditionsInner) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableHookConditionsInner) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_hook_envvar.go b/model_hook_envvar.go new file mode 100644 index 0000000..84d2edd --- /dev/null +++ b/model_hook_envvar.go @@ -0,0 +1,255 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the HookEnvvar type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &HookEnvvar{} + +// HookEnvvar struct for HookEnvvar +type HookEnvvar struct { + // A unique identifier for the Hook Environment Variable + Id *string `json:"id,omitempty"` + // The name of the environment variable. + Name string `json:"name"` + // The ISO8601 formatted date that the environment variable was created. + CreatedAt *string `json:"created_at,omitempty"` + // The ISO8601 formatted date that the environment variable was last updated. + UpdatedAt *string `json:"updated_at,omitempty"` + // The secret value that will be encrypted at rest and injected in applicable hook functions at run time. + Value string `json:"value"` +} + +// NewHookEnvvar instantiates a new HookEnvvar 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 NewHookEnvvar(name string, value string) *HookEnvvar { + this := HookEnvvar{} + this.Name = name + this.Value = value + return &this +} + +// NewHookEnvvarWithDefaults instantiates a new HookEnvvar 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 NewHookEnvvarWithDefaults() *HookEnvvar { + this := HookEnvvar{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *HookEnvvar) GetId() string { + if o == nil || isNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HookEnvvar) GetIdOk() (*string, bool) { + if o == nil || isNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *HookEnvvar) HasId() bool { + if o != nil && !isNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *HookEnvvar) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value +func (o *HookEnvvar) 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 *HookEnvvar) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *HookEnvvar) SetName(v string) { + o.Name = v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *HookEnvvar) GetCreatedAt() string { + if o == nil || isNil(o.CreatedAt) { + var ret string + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HookEnvvar) GetCreatedAtOk() (*string, bool) { + if o == nil || isNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *HookEnvvar) HasCreatedAt() bool { + if o != nil && !isNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given string and assigns it to the CreatedAt field. +func (o *HookEnvvar) SetCreatedAt(v string) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *HookEnvvar) GetUpdatedAt() string { + if o == nil || isNil(o.UpdatedAt) { + var ret string + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HookEnvvar) GetUpdatedAtOk() (*string, bool) { + if o == nil || isNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *HookEnvvar) HasUpdatedAt() bool { + if o != nil && !isNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given string and assigns it to the UpdatedAt field. +func (o *HookEnvvar) SetUpdatedAt(v string) { + o.UpdatedAt = &v +} + +// GetValue returns the Value field value +func (o *HookEnvvar) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *HookEnvvar) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *HookEnvvar) SetValue(v string) { + o.Value = v +} + +func (o HookEnvvar) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o HookEnvvar) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: id is readOnly + toSerialize["name"] = o.Name + if !isNil(o.CreatedAt) { + toSerialize["created_at"] = o.CreatedAt + } + if !isNil(o.UpdatedAt) { + toSerialize["updated_at"] = o.UpdatedAt + } + toSerialize["value"] = o.Value + return toSerialize, nil +} + +type NullableHookEnvvar struct { + value *HookEnvvar + isSet bool +} + +func (v NullableHookEnvvar) Get() *HookEnvvar { + return v.value +} + +func (v *NullableHookEnvvar) Set(val *HookEnvvar) { + v.value = val + v.isSet = true +} + +func (v NullableHookEnvvar) IsSet() bool { + return v.isSet +} + +func (v *NullableHookEnvvar) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHookEnvvar(val *HookEnvvar) *NullableHookEnvvar { + return &NullableHookEnvvar{value: val, isSet: true} +} + +func (v NullableHookEnvvar) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHookEnvvar) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_log.go b/model_hook_log.go similarity index 58% rename from model_log.go rename to model_hook_log.go index 2f63481..b8edfb8 100644 --- a/model_log.go +++ b/model_hook_log.go @@ -1,47 +1,50 @@ /* OneLogin API -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) +OpenAPI Specification for OneLogin -API version: 3.0.0-alpha.1 +API version: 3.1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package openapi +package onelogin import ( "encoding/json" ) -// Log struct for Log -type Log struct { +// checks if the HookLog type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &HookLog{} + +// HookLog struct for HookLog +type HookLog struct { RequestId *string `json:"request_id,omitempty"` CorrelationId *string `json:"correlation_id,omitempty"` CreatedAt *string `json:"created_at,omitempty"` Events []string `json:"events,omitempty"` } -// NewLog instantiates a new Log object +// NewHookLog instantiates a new HookLog 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 NewLog() *Log { - this := Log{} +func NewHookLog() *HookLog { + this := HookLog{} return &this } -// NewLogWithDefaults instantiates a new Log object +// NewHookLogWithDefaults instantiates a new HookLog 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 NewLogWithDefaults() *Log { - this := Log{} +func NewHookLogWithDefaults() *HookLog { + this := HookLog{} return &this } // GetRequestId returns the RequestId field value if set, zero value otherwise. -func (o *Log) GetRequestId() string { - if o == nil || o.RequestId == nil { +func (o *HookLog) GetRequestId() string { + if o == nil || isNil(o.RequestId) { var ret string return ret } @@ -50,16 +53,16 @@ func (o *Log) GetRequestId() string { // GetRequestIdOk returns a tuple with the RequestId field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Log) GetRequestIdOk() (*string, bool) { - if o == nil || o.RequestId == nil { +func (o *HookLog) GetRequestIdOk() (*string, bool) { + if o == nil || isNil(o.RequestId) { return nil, false } return o.RequestId, true } // HasRequestId returns a boolean if a field has been set. -func (o *Log) HasRequestId() bool { - if o != nil && o.RequestId != nil { +func (o *HookLog) HasRequestId() bool { + if o != nil && !isNil(o.RequestId) { return true } @@ -67,13 +70,13 @@ func (o *Log) HasRequestId() bool { } // SetRequestId gets a reference to the given string and assigns it to the RequestId field. -func (o *Log) SetRequestId(v string) { +func (o *HookLog) SetRequestId(v string) { o.RequestId = &v } // GetCorrelationId returns the CorrelationId field value if set, zero value otherwise. -func (o *Log) GetCorrelationId() string { - if o == nil || o.CorrelationId == nil { +func (o *HookLog) GetCorrelationId() string { + if o == nil || isNil(o.CorrelationId) { var ret string return ret } @@ -82,16 +85,16 @@ func (o *Log) GetCorrelationId() string { // GetCorrelationIdOk returns a tuple with the CorrelationId field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Log) GetCorrelationIdOk() (*string, bool) { - if o == nil || o.CorrelationId == nil { +func (o *HookLog) GetCorrelationIdOk() (*string, bool) { + if o == nil || isNil(o.CorrelationId) { return nil, false } return o.CorrelationId, true } // HasCorrelationId returns a boolean if a field has been set. -func (o *Log) HasCorrelationId() bool { - if o != nil && o.CorrelationId != nil { +func (o *HookLog) HasCorrelationId() bool { + if o != nil && !isNil(o.CorrelationId) { return true } @@ -99,13 +102,13 @@ func (o *Log) HasCorrelationId() bool { } // SetCorrelationId gets a reference to the given string and assigns it to the CorrelationId field. -func (o *Log) SetCorrelationId(v string) { +func (o *HookLog) SetCorrelationId(v string) { o.CorrelationId = &v } // GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. -func (o *Log) GetCreatedAt() string { - if o == nil || o.CreatedAt == nil { +func (o *HookLog) GetCreatedAt() string { + if o == nil || isNil(o.CreatedAt) { var ret string return ret } @@ -114,16 +117,16 @@ func (o *Log) GetCreatedAt() string { // GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Log) GetCreatedAtOk() (*string, bool) { - if o == nil || o.CreatedAt == nil { +func (o *HookLog) GetCreatedAtOk() (*string, bool) { + if o == nil || isNil(o.CreatedAt) { return nil, false } return o.CreatedAt, true } // HasCreatedAt returns a boolean if a field has been set. -func (o *Log) HasCreatedAt() bool { - if o != nil && o.CreatedAt != nil { +func (o *HookLog) HasCreatedAt() bool { + if o != nil && !isNil(o.CreatedAt) { return true } @@ -131,13 +134,13 @@ func (o *Log) HasCreatedAt() bool { } // SetCreatedAt gets a reference to the given string and assigns it to the CreatedAt field. -func (o *Log) SetCreatedAt(v string) { +func (o *HookLog) SetCreatedAt(v string) { o.CreatedAt = &v } // GetEvents returns the Events field value if set, zero value otherwise. -func (o *Log) GetEvents() []string { - if o == nil || o.Events == nil { +func (o *HookLog) GetEvents() []string { + if o == nil || isNil(o.Events) { var ret []string return ret } @@ -146,16 +149,16 @@ func (o *Log) GetEvents() []string { // GetEventsOk returns a tuple with the Events field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Log) GetEventsOk() ([]string, bool) { - if o == nil || o.Events == nil { +func (o *HookLog) GetEventsOk() ([]string, bool) { + if o == nil || isNil(o.Events) { return nil, false } return o.Events, true } // HasEvents returns a boolean if a field has been set. -func (o *Log) HasEvents() bool { - if o != nil && o.Events != nil { +func (o *HookLog) HasEvents() bool { + if o != nil && !isNil(o.Events) { return true } @@ -163,59 +166,67 @@ func (o *Log) HasEvents() bool { } // SetEvents gets a reference to the given []string and assigns it to the Events field. -func (o *Log) SetEvents(v []string) { +func (o *HookLog) SetEvents(v []string) { o.Events = v } -func (o Log) MarshalJSON() ([]byte, error) { +func (o HookLog) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o HookLog) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.RequestId != nil { + if !isNil(o.RequestId) { toSerialize["request_id"] = o.RequestId } - if o.CorrelationId != nil { + if !isNil(o.CorrelationId) { toSerialize["correlation_id"] = o.CorrelationId } - if o.CreatedAt != nil { + if !isNil(o.CreatedAt) { toSerialize["created_at"] = o.CreatedAt } - if o.Events != nil { + if !isNil(o.Events) { toSerialize["events"] = o.Events } - return json.Marshal(toSerialize) + return toSerialize, nil } -type NullableLog struct { - value *Log +type NullableHookLog struct { + value *HookLog isSet bool } -func (v NullableLog) Get() *Log { +func (v NullableHookLog) Get() *HookLog { return v.value } -func (v *NullableLog) Set(val *Log) { +func (v *NullableHookLog) Set(val *HookLog) { v.value = val v.isSet = true } -func (v NullableLog) IsSet() bool { +func (v NullableHookLog) IsSet() bool { return v.isSet } -func (v *NullableLog) Unset() { +func (v *NullableHookLog) Unset() { v.value = nil v.isSet = false } -func NewNullableLog(val *Log) *NullableLog { - return &NullableLog{value: val, isSet: true} +func NewNullableHookLog(val *HookLog) *NullableHookLog { + return &NullableHookLog{value: val, isSet: true} } -func (v NullableLog) MarshalJSON() ([]byte, error) { +func (v NullableHookLog) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } -func (v *NullableLog) UnmarshalJSON(src []byte) error { +func (v *NullableHookLog) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/model_hook_options.go b/model_hook_options.go index c57501c..eb12251 100644 --- a/model_hook_options.go +++ b/model_hook_options.go @@ -1,19 +1,22 @@ /* OneLogin API -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) +OpenAPI Specification for OneLogin -API version: 3.0.0-alpha.1 +API version: 3.1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package openapi +package onelogin import ( "encoding/json" ) +// checks if the HookOptions type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &HookOptions{} + // HookOptions A set of attributes allow control over the information that is included in the hook context. type HookOptions struct { RiskEnabled *bool `json:"risk_enabled,omitempty"` @@ -40,7 +43,7 @@ func NewHookOptionsWithDefaults() *HookOptions { // GetRiskEnabled returns the RiskEnabled field value if set, zero value otherwise. func (o *HookOptions) GetRiskEnabled() bool { - if o == nil || o.RiskEnabled == nil { + if o == nil || isNil(o.RiskEnabled) { var ret bool return ret } @@ -50,7 +53,7 @@ func (o *HookOptions) GetRiskEnabled() bool { // GetRiskEnabledOk returns a tuple with the RiskEnabled field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *HookOptions) GetRiskEnabledOk() (*bool, bool) { - if o == nil || o.RiskEnabled == nil { + if o == nil || isNil(o.RiskEnabled) { return nil, false } return o.RiskEnabled, true @@ -58,7 +61,7 @@ func (o *HookOptions) GetRiskEnabledOk() (*bool, bool) { // HasRiskEnabled returns a boolean if a field has been set. func (o *HookOptions) HasRiskEnabled() bool { - if o != nil && o.RiskEnabled != nil { + if o != nil && !isNil(o.RiskEnabled) { return true } @@ -72,7 +75,7 @@ func (o *HookOptions) SetRiskEnabled(v bool) { // GetLocationEnabled returns the LocationEnabled field value if set, zero value otherwise. func (o *HookOptions) GetLocationEnabled() bool { - if o == nil || o.LocationEnabled == nil { + if o == nil || isNil(o.LocationEnabled) { var ret bool return ret } @@ -82,7 +85,7 @@ func (o *HookOptions) GetLocationEnabled() bool { // GetLocationEnabledOk returns a tuple with the LocationEnabled field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *HookOptions) GetLocationEnabledOk() (*bool, bool) { - if o == nil || o.LocationEnabled == nil { + if o == nil || isNil(o.LocationEnabled) { return nil, false } return o.LocationEnabled, true @@ -90,7 +93,7 @@ func (o *HookOptions) GetLocationEnabledOk() (*bool, bool) { // HasLocationEnabled returns a boolean if a field has been set. func (o *HookOptions) HasLocationEnabled() bool { - if o != nil && o.LocationEnabled != nil { + if o != nil && !isNil(o.LocationEnabled) { return true } @@ -104,7 +107,7 @@ func (o *HookOptions) SetLocationEnabled(v bool) { // GetMfaDeviceInfoEnabled returns the MfaDeviceInfoEnabled field value if set, zero value otherwise. func (o *HookOptions) GetMfaDeviceInfoEnabled() bool { - if o == nil || o.MfaDeviceInfoEnabled == nil { + if o == nil || isNil(o.MfaDeviceInfoEnabled) { var ret bool return ret } @@ -114,7 +117,7 @@ func (o *HookOptions) GetMfaDeviceInfoEnabled() bool { // GetMfaDeviceInfoEnabledOk returns a tuple with the MfaDeviceInfoEnabled field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *HookOptions) GetMfaDeviceInfoEnabledOk() (*bool, bool) { - if o == nil || o.MfaDeviceInfoEnabled == nil { + if o == nil || isNil(o.MfaDeviceInfoEnabled) { return nil, false } return o.MfaDeviceInfoEnabled, true @@ -122,7 +125,7 @@ func (o *HookOptions) GetMfaDeviceInfoEnabledOk() (*bool, bool) { // HasMfaDeviceInfoEnabled returns a boolean if a field has been set. func (o *HookOptions) HasMfaDeviceInfoEnabled() bool { - if o != nil && o.MfaDeviceInfoEnabled != nil { + if o != nil && !isNil(o.MfaDeviceInfoEnabled) { return true } @@ -135,17 +138,25 @@ func (o *HookOptions) SetMfaDeviceInfoEnabled(v bool) { } func (o HookOptions) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o HookOptions) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.RiskEnabled != nil { + if !isNil(o.RiskEnabled) { toSerialize["risk_enabled"] = o.RiskEnabled } - if o.LocationEnabled != nil { + if !isNil(o.LocationEnabled) { toSerialize["location_enabled"] = o.LocationEnabled } - if o.MfaDeviceInfoEnabled != nil { + if !isNil(o.MfaDeviceInfoEnabled) { toSerialize["mfa_device_info_enabled"] = o.MfaDeviceInfoEnabled } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableHookOptions struct { diff --git a/model_hook_status.go b/model_hook_status.go index 64fc457..6f51c3d 100644 --- a/model_hook_status.go +++ b/model_hook_status.go @@ -1,22 +1,27 @@ /* OneLogin API -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) +OpenAPI Specification for OneLogin -API version: 3.0.0-alpha.1 +API version: 3.1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package openapi +package onelogin import ( "encoding/json" ) +// checks if the HookStatus type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &HookStatus{} + // HookStatus struct for HookStatus type HookStatus struct { + // responses status nam Name *string `json:"name,omitempty"` + // your operation was successful Message *string `json:"message,omitempty"` } @@ -39,7 +44,7 @@ func NewHookStatusWithDefaults() *HookStatus { // GetName returns the Name field value if set, zero value otherwise. func (o *HookStatus) GetName() string { - if o == nil || o.Name == nil { + if o == nil || isNil(o.Name) { var ret string return ret } @@ -49,7 +54,7 @@ func (o *HookStatus) 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 *HookStatus) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { + if o == nil || isNil(o.Name) { return nil, false } return o.Name, true @@ -57,7 +62,7 @@ func (o *HookStatus) GetNameOk() (*string, bool) { // HasName returns a boolean if a field has been set. func (o *HookStatus) HasName() bool { - if o != nil && o.Name != nil { + if o != nil && !isNil(o.Name) { return true } @@ -71,7 +76,7 @@ func (o *HookStatus) SetName(v string) { // GetMessage returns the Message field value if set, zero value otherwise. func (o *HookStatus) GetMessage() string { - if o == nil || o.Message == nil { + if o == nil || isNil(o.Message) { var ret string return ret } @@ -81,7 +86,7 @@ func (o *HookStatus) GetMessage() string { // GetMessageOk returns a tuple with the Message field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *HookStatus) GetMessageOk() (*string, bool) { - if o == nil || o.Message == nil { + if o == nil || isNil(o.Message) { return nil, false } return o.Message, true @@ -89,7 +94,7 @@ func (o *HookStatus) GetMessageOk() (*string, bool) { // HasMessage returns a boolean if a field has been set. func (o *HookStatus) HasMessage() bool { - if o != nil && o.Message != nil { + if o != nil && !isNil(o.Message) { return true } @@ -102,14 +107,22 @@ func (o *HookStatus) SetMessage(v string) { } func (o HookStatus) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o HookStatus) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Name != nil { + if !isNil(o.Name) { toSerialize["name"] = o.Name } - if o.Message != nil { + if !isNil(o.Message) { toSerialize["message"] = o.Message } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableHookStatus struct { diff --git a/model_id.go b/model_id.go deleted file mode 100644 index bb869e5..0000000 --- a/model_id.go +++ /dev/null @@ -1,115 +0,0 @@ -/* -OneLogin API - -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -API version: 3.0.0-alpha.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package openapi - -import ( - "encoding/json" -) - -// Id struct for Id -type Id struct { - Id *string `json:"id,omitempty"` -} - -// NewId instantiates a new Id 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 NewId() *Id { - this := Id{} - return &this -} - -// NewIdWithDefaults instantiates a new Id 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 NewIdWithDefaults() *Id { - this := Id{} - return &this -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *Id) GetId() string { - if o == nil || o.Id == nil { - var ret string - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Id) GetIdOk() (*string, bool) { - if o == nil || o.Id == nil { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *Id) HasId() bool { - if o != nil && o.Id != nil { - return true - } - - return false -} - -// SetId gets a reference to the given string and assigns it to the Id field. -func (o *Id) SetId(v string) { - o.Id = &v -} - -func (o Id) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - return json.Marshal(toSerialize) -} - -type NullableId struct { - value *Id - isSet bool -} - -func (v NullableId) Get() *Id { - return v.value -} - -func (v *NullableId) Set(val *Id) { - v.value = val - v.isSet = true -} - -func (v NullableId) IsSet() bool { - return v.isSet -} - -func (v *NullableId) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableId(val *Id) *NullableId { - return &NullableId{value: val, isSet: true} -} - -func (v NullableId) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableId) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_list_access_token_claims_200_response_inner.go b/model_list_access_token_claims_200_response_inner.go deleted file mode 100644 index 413e3db..0000000 --- a/model_list_access_token_claims_200_response_inner.go +++ /dev/null @@ -1,403 +0,0 @@ -/* -OneLogin API - -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -API version: 3.0.0-alpha.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package openapi - -import ( - "encoding/json" -) - -// ListAccessTokenClaims200ResponseInner struct for ListAccessTokenClaims200ResponseInner -type ListAccessTokenClaims200ResponseInner struct { - Id *int32 `json:"id,omitempty"` - Label *string `json:"label,omitempty"` - UserAttributeMappings *string `json:"user_attribute_mappings,omitempty"` - UserAttributeMacros *string `json:"user_attribute_macros,omitempty"` - AttributesTransformations *string `json:"attributes_transformations,omitempty"` - SkipIfBlank *bool `json:"skip_if_blank,omitempty"` - Values []string `json:"values,omitempty"` - DefaultValues *string `json:"default_values,omitempty"` - ProvisionedEntitlements *bool `json:"provisioned_entitlements,omitempty"` -} - -// NewListAccessTokenClaims200ResponseInner instantiates a new ListAccessTokenClaims200ResponseInner 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 NewListAccessTokenClaims200ResponseInner() *ListAccessTokenClaims200ResponseInner { - this := ListAccessTokenClaims200ResponseInner{} - return &this -} - -// NewListAccessTokenClaims200ResponseInnerWithDefaults instantiates a new ListAccessTokenClaims200ResponseInner 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 NewListAccessTokenClaims200ResponseInnerWithDefaults() *ListAccessTokenClaims200ResponseInner { - this := ListAccessTokenClaims200ResponseInner{} - return &this -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *ListAccessTokenClaims200ResponseInner) GetId() int32 { - if o == nil || o.Id == nil { - var ret int32 - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ListAccessTokenClaims200ResponseInner) GetIdOk() (*int32, bool) { - if o == nil || o.Id == nil { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *ListAccessTokenClaims200ResponseInner) HasId() bool { - if o != nil && o.Id != nil { - return true - } - - return false -} - -// SetId gets a reference to the given int32 and assigns it to the Id field. -func (o *ListAccessTokenClaims200ResponseInner) SetId(v int32) { - o.Id = &v -} - -// GetLabel returns the Label field value if set, zero value otherwise. -func (o *ListAccessTokenClaims200ResponseInner) GetLabel() string { - if o == nil || o.Label == nil { - var ret string - return ret - } - return *o.Label -} - -// 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 *ListAccessTokenClaims200ResponseInner) GetLabelOk() (*string, bool) { - if o == nil || o.Label == nil { - return nil, false - } - return o.Label, true -} - -// HasLabel returns a boolean if a field has been set. -func (o *ListAccessTokenClaims200ResponseInner) HasLabel() bool { - if o != nil && o.Label != nil { - return true - } - - return false -} - -// SetLabel gets a reference to the given string and assigns it to the Label field. -func (o *ListAccessTokenClaims200ResponseInner) SetLabel(v string) { - o.Label = &v -} - -// GetUserAttributeMappings returns the UserAttributeMappings field value if set, zero value otherwise. -func (o *ListAccessTokenClaims200ResponseInner) GetUserAttributeMappings() string { - if o == nil || o.UserAttributeMappings == nil { - var ret string - return ret - } - return *o.UserAttributeMappings -} - -// GetUserAttributeMappingsOk returns a tuple with the UserAttributeMappings field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ListAccessTokenClaims200ResponseInner) GetUserAttributeMappingsOk() (*string, bool) { - if o == nil || o.UserAttributeMappings == nil { - return nil, false - } - return o.UserAttributeMappings, true -} - -// HasUserAttributeMappings returns a boolean if a field has been set. -func (o *ListAccessTokenClaims200ResponseInner) HasUserAttributeMappings() bool { - if o != nil && o.UserAttributeMappings != nil { - return true - } - - return false -} - -// SetUserAttributeMappings gets a reference to the given string and assigns it to the UserAttributeMappings field. -func (o *ListAccessTokenClaims200ResponseInner) SetUserAttributeMappings(v string) { - o.UserAttributeMappings = &v -} - -// GetUserAttributeMacros returns the UserAttributeMacros field value if set, zero value otherwise. -func (o *ListAccessTokenClaims200ResponseInner) GetUserAttributeMacros() string { - if o == nil || o.UserAttributeMacros == nil { - var ret string - return ret - } - return *o.UserAttributeMacros -} - -// GetUserAttributeMacrosOk returns a tuple with the UserAttributeMacros field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ListAccessTokenClaims200ResponseInner) GetUserAttributeMacrosOk() (*string, bool) { - if o == nil || o.UserAttributeMacros == nil { - return nil, false - } - return o.UserAttributeMacros, true -} - -// HasUserAttributeMacros returns a boolean if a field has been set. -func (o *ListAccessTokenClaims200ResponseInner) HasUserAttributeMacros() bool { - if o != nil && o.UserAttributeMacros != nil { - return true - } - - return false -} - -// SetUserAttributeMacros gets a reference to the given string and assigns it to the UserAttributeMacros field. -func (o *ListAccessTokenClaims200ResponseInner) SetUserAttributeMacros(v string) { - o.UserAttributeMacros = &v -} - -// GetAttributesTransformations returns the AttributesTransformations field value if set, zero value otherwise. -func (o *ListAccessTokenClaims200ResponseInner) GetAttributesTransformations() string { - if o == nil || o.AttributesTransformations == nil { - var ret string - return ret - } - return *o.AttributesTransformations -} - -// GetAttributesTransformationsOk returns a tuple with the AttributesTransformations field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ListAccessTokenClaims200ResponseInner) GetAttributesTransformationsOk() (*string, bool) { - if o == nil || o.AttributesTransformations == nil { - return nil, false - } - return o.AttributesTransformations, true -} - -// HasAttributesTransformations returns a boolean if a field has been set. -func (o *ListAccessTokenClaims200ResponseInner) HasAttributesTransformations() bool { - if o != nil && o.AttributesTransformations != nil { - return true - } - - return false -} - -// SetAttributesTransformations gets a reference to the given string and assigns it to the AttributesTransformations field. -func (o *ListAccessTokenClaims200ResponseInner) SetAttributesTransformations(v string) { - o.AttributesTransformations = &v -} - -// GetSkipIfBlank returns the SkipIfBlank field value if set, zero value otherwise. -func (o *ListAccessTokenClaims200ResponseInner) GetSkipIfBlank() bool { - if o == nil || o.SkipIfBlank == nil { - var ret bool - return ret - } - return *o.SkipIfBlank -} - -// GetSkipIfBlankOk returns a tuple with the SkipIfBlank field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ListAccessTokenClaims200ResponseInner) GetSkipIfBlankOk() (*bool, bool) { - if o == nil || o.SkipIfBlank == nil { - return nil, false - } - return o.SkipIfBlank, true -} - -// HasSkipIfBlank returns a boolean if a field has been set. -func (o *ListAccessTokenClaims200ResponseInner) HasSkipIfBlank() bool { - if o != nil && o.SkipIfBlank != nil { - return true - } - - return false -} - -// SetSkipIfBlank gets a reference to the given bool and assigns it to the SkipIfBlank field. -func (o *ListAccessTokenClaims200ResponseInner) SetSkipIfBlank(v bool) { - o.SkipIfBlank = &v -} - -// GetValues returns the Values field value if set, zero value otherwise. -func (o *ListAccessTokenClaims200ResponseInner) GetValues() []string { - if o == nil || o.Values == nil { - var ret []string - return ret - } - return o.Values -} - -// GetValuesOk returns a tuple with the Values field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ListAccessTokenClaims200ResponseInner) GetValuesOk() ([]string, bool) { - if o == nil || o.Values == nil { - return nil, false - } - return o.Values, true -} - -// HasValues returns a boolean if a field has been set. -func (o *ListAccessTokenClaims200ResponseInner) HasValues() bool { - if o != nil && o.Values != nil { - return true - } - - return false -} - -// SetValues gets a reference to the given []string and assigns it to the Values field. -func (o *ListAccessTokenClaims200ResponseInner) SetValues(v []string) { - o.Values = v -} - -// GetDefaultValues returns the DefaultValues field value if set, zero value otherwise. -func (o *ListAccessTokenClaims200ResponseInner) GetDefaultValues() string { - if o == nil || o.DefaultValues == nil { - var ret string - return ret - } - return *o.DefaultValues -} - -// GetDefaultValuesOk returns a tuple with the DefaultValues field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ListAccessTokenClaims200ResponseInner) GetDefaultValuesOk() (*string, bool) { - if o == nil || o.DefaultValues == nil { - return nil, false - } - return o.DefaultValues, true -} - -// HasDefaultValues returns a boolean if a field has been set. -func (o *ListAccessTokenClaims200ResponseInner) HasDefaultValues() bool { - if o != nil && o.DefaultValues != nil { - return true - } - - return false -} - -// SetDefaultValues gets a reference to the given string and assigns it to the DefaultValues field. -func (o *ListAccessTokenClaims200ResponseInner) SetDefaultValues(v string) { - o.DefaultValues = &v -} - -// GetProvisionedEntitlements returns the ProvisionedEntitlements field value if set, zero value otherwise. -func (o *ListAccessTokenClaims200ResponseInner) GetProvisionedEntitlements() bool { - if o == nil || o.ProvisionedEntitlements == nil { - var ret bool - return ret - } - return *o.ProvisionedEntitlements -} - -// GetProvisionedEntitlementsOk returns a tuple with the ProvisionedEntitlements field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ListAccessTokenClaims200ResponseInner) GetProvisionedEntitlementsOk() (*bool, bool) { - if o == nil || o.ProvisionedEntitlements == nil { - return nil, false - } - return o.ProvisionedEntitlements, true -} - -// HasProvisionedEntitlements returns a boolean if a field has been set. -func (o *ListAccessTokenClaims200ResponseInner) HasProvisionedEntitlements() bool { - if o != nil && o.ProvisionedEntitlements != nil { - return true - } - - return false -} - -// SetProvisionedEntitlements gets a reference to the given bool and assigns it to the ProvisionedEntitlements field. -func (o *ListAccessTokenClaims200ResponseInner) SetProvisionedEntitlements(v bool) { - o.ProvisionedEntitlements = &v -} - -func (o ListAccessTokenClaims200ResponseInner) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Label != nil { - toSerialize["label"] = o.Label - } - if o.UserAttributeMappings != nil { - toSerialize["user_attribute_mappings"] = o.UserAttributeMappings - } - if o.UserAttributeMacros != nil { - toSerialize["user_attribute_macros"] = o.UserAttributeMacros - } - if o.AttributesTransformations != nil { - toSerialize["attributes_transformations"] = o.AttributesTransformations - } - if o.SkipIfBlank != nil { - toSerialize["skip_if_blank"] = o.SkipIfBlank - } - if o.Values != nil { - toSerialize["values"] = o.Values - } - if o.DefaultValues != nil { - toSerialize["default_values"] = o.DefaultValues - } - if o.ProvisionedEntitlements != nil { - toSerialize["provisioned_entitlements"] = o.ProvisionedEntitlements - } - return json.Marshal(toSerialize) -} - -type NullableListAccessTokenClaims200ResponseInner struct { - value *ListAccessTokenClaims200ResponseInner - isSet bool -} - -func (v NullableListAccessTokenClaims200ResponseInner) Get() *ListAccessTokenClaims200ResponseInner { - return v.value -} - -func (v *NullableListAccessTokenClaims200ResponseInner) Set(val *ListAccessTokenClaims200ResponseInner) { - v.value = val - v.isSet = true -} - -func (v NullableListAccessTokenClaims200ResponseInner) IsSet() bool { - return v.isSet -} - -func (v *NullableListAccessTokenClaims200ResponseInner) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableListAccessTokenClaims200ResponseInner(val *ListAccessTokenClaims200ResponseInner) *NullableListAccessTokenClaims200ResponseInner { - return &NullableListAccessTokenClaims200ResponseInner{value: val, isSet: true} -} - -func (v NullableListAccessTokenClaims200ResponseInner) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableListAccessTokenClaims200ResponseInner) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_list_actions_200_response_inner.go b/model_list_actions_200_response_inner.go deleted file mode 100644 index 947c467..0000000 --- a/model_list_actions_200_response_inner.go +++ /dev/null @@ -1,153 +0,0 @@ -/* -OneLogin API - -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -API version: 3.0.0-alpha.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package openapi - -import ( - "encoding/json" -) - -// ListActions200ResponseInner struct for ListActions200ResponseInner -type ListActions200ResponseInner struct { - // The name of the Action. - Name *string `json:"name,omitempty"` - // The unique identifier of the action. This should be used when defining actions for a User Mapping. - Value *string `json:"value,omitempty"` -} - -// NewListActions200ResponseInner instantiates a new ListActions200ResponseInner 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 NewListActions200ResponseInner() *ListActions200ResponseInner { - this := ListActions200ResponseInner{} - return &this -} - -// NewListActions200ResponseInnerWithDefaults instantiates a new ListActions200ResponseInner 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 NewListActions200ResponseInnerWithDefaults() *ListActions200ResponseInner { - this := ListActions200ResponseInner{} - return &this -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *ListActions200ResponseInner) GetName() string { - if o == nil || o.Name == nil { - var ret string - return ret - } - return *o.Name -} - -// 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 *ListActions200ResponseInner) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *ListActions200ResponseInner) HasName() bool { - if o != nil && o.Name != nil { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *ListActions200ResponseInner) SetName(v string) { - o.Name = &v -} - -// GetValue returns the Value field value if set, zero value otherwise. -func (o *ListActions200ResponseInner) GetValue() string { - if o == nil || o.Value == nil { - var ret string - return ret - } - return *o.Value -} - -// GetValueOk returns a tuple with the Value field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ListActions200ResponseInner) GetValueOk() (*string, bool) { - if o == nil || o.Value == nil { - return nil, false - } - return o.Value, true -} - -// HasValue returns a boolean if a field has been set. -func (o *ListActions200ResponseInner) HasValue() bool { - if o != nil && o.Value != nil { - return true - } - - return false -} - -// SetValue gets a reference to the given string and assigns it to the Value field. -func (o *ListActions200ResponseInner) SetValue(v string) { - o.Value = &v -} - -func (o ListActions200ResponseInner) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Name != nil { - toSerialize["name"] = o.Name - } - if o.Value != nil { - toSerialize["value"] = o.Value - } - return json.Marshal(toSerialize) -} - -type NullableListActions200ResponseInner struct { - value *ListActions200ResponseInner - isSet bool -} - -func (v NullableListActions200ResponseInner) Get() *ListActions200ResponseInner { - return v.value -} - -func (v *NullableListActions200ResponseInner) Set(val *ListActions200ResponseInner) { - v.value = val - v.isSet = true -} - -func (v NullableListActions200ResponseInner) IsSet() bool { - return v.isSet -} - -func (v *NullableListActions200ResponseInner) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableListActions200ResponseInner(val *ListActions200ResponseInner) *NullableListActions200ResponseInner { - return &NullableListActions200ResponseInner{value: val, isSet: true} -} - -func (v NullableListActions200ResponseInner) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableListActions200ResponseInner) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_list_app_users_200_response_inner.go b/model_list_app_users_200_response_inner.go deleted file mode 100644 index 77dea54..0000000 --- a/model_list_app_users_200_response_inner.go +++ /dev/null @@ -1,259 +0,0 @@ -/* -OneLogin API - -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -API version: 3.0.0-alpha.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package openapi - -import ( - "encoding/json" -) - -// ListAppUsers200ResponseInner struct for ListAppUsers200ResponseInner -type ListAppUsers200ResponseInner struct { - Firstname *string `json:"firstname,omitempty"` - Id *int32 `json:"id,omitempty"` - Email *string `json:"email,omitempty"` - Lastname *string `json:"lastname,omitempty"` - Username *string `json:"username,omitempty"` -} - -// NewListAppUsers200ResponseInner instantiates a new ListAppUsers200ResponseInner 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 NewListAppUsers200ResponseInner() *ListAppUsers200ResponseInner { - this := ListAppUsers200ResponseInner{} - return &this -} - -// NewListAppUsers200ResponseInnerWithDefaults instantiates a new ListAppUsers200ResponseInner 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 NewListAppUsers200ResponseInnerWithDefaults() *ListAppUsers200ResponseInner { - this := ListAppUsers200ResponseInner{} - return &this -} - -// GetFirstname returns the Firstname field value if set, zero value otherwise. -func (o *ListAppUsers200ResponseInner) GetFirstname() string { - if o == nil || o.Firstname == nil { - var ret string - return ret - } - return *o.Firstname -} - -// GetFirstnameOk returns a tuple with the Firstname field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ListAppUsers200ResponseInner) GetFirstnameOk() (*string, bool) { - if o == nil || o.Firstname == nil { - return nil, false - } - return o.Firstname, true -} - -// HasFirstname returns a boolean if a field has been set. -func (o *ListAppUsers200ResponseInner) HasFirstname() bool { - if o != nil && o.Firstname != nil { - return true - } - - return false -} - -// SetFirstname gets a reference to the given string and assigns it to the Firstname field. -func (o *ListAppUsers200ResponseInner) SetFirstname(v string) { - o.Firstname = &v -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *ListAppUsers200ResponseInner) GetId() int32 { - if o == nil || o.Id == nil { - var ret int32 - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ListAppUsers200ResponseInner) GetIdOk() (*int32, bool) { - if o == nil || o.Id == nil { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *ListAppUsers200ResponseInner) HasId() bool { - if o != nil && o.Id != nil { - return true - } - - return false -} - -// SetId gets a reference to the given int32 and assigns it to the Id field. -func (o *ListAppUsers200ResponseInner) SetId(v int32) { - o.Id = &v -} - -// GetEmail returns the Email field value if set, zero value otherwise. -func (o *ListAppUsers200ResponseInner) 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 *ListAppUsers200ResponseInner) 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 *ListAppUsers200ResponseInner) 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 *ListAppUsers200ResponseInner) SetEmail(v string) { - o.Email = &v -} - -// GetLastname returns the Lastname field value if set, zero value otherwise. -func (o *ListAppUsers200ResponseInner) GetLastname() string { - if o == nil || o.Lastname == nil { - var ret string - return ret - } - return *o.Lastname -} - -// GetLastnameOk returns a tuple with the Lastname field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ListAppUsers200ResponseInner) GetLastnameOk() (*string, bool) { - if o == nil || o.Lastname == nil { - return nil, false - } - return o.Lastname, true -} - -// HasLastname returns a boolean if a field has been set. -func (o *ListAppUsers200ResponseInner) HasLastname() bool { - if o != nil && o.Lastname != nil { - return true - } - - return false -} - -// SetLastname gets a reference to the given string and assigns it to the Lastname field. -func (o *ListAppUsers200ResponseInner) SetLastname(v string) { - o.Lastname = &v -} - -// GetUsername returns the Username field value if set, zero value otherwise. -func (o *ListAppUsers200ResponseInner) GetUsername() string { - if o == nil || o.Username == nil { - var ret string - return ret - } - return *o.Username -} - -// 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 *ListAppUsers200ResponseInner) GetUsernameOk() (*string, bool) { - if o == nil || o.Username == nil { - return nil, false - } - return o.Username, true -} - -// HasUsername returns a boolean if a field has been set. -func (o *ListAppUsers200ResponseInner) HasUsername() bool { - if o != nil && o.Username != nil { - return true - } - - return false -} - -// SetUsername gets a reference to the given string and assigns it to the Username field. -func (o *ListAppUsers200ResponseInner) SetUsername(v string) { - o.Username = &v -} - -func (o ListAppUsers200ResponseInner) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Firstname != nil { - toSerialize["firstname"] = o.Firstname - } - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Email != nil { - toSerialize["email"] = o.Email - } - if o.Lastname != nil { - toSerialize["lastname"] = o.Lastname - } - if o.Username != nil { - toSerialize["username"] = o.Username - } - return json.Marshal(toSerialize) -} - -type NullableListAppUsers200ResponseInner struct { - value *ListAppUsers200ResponseInner - isSet bool -} - -func (v NullableListAppUsers200ResponseInner) Get() *ListAppUsers200ResponseInner { - return v.value -} - -func (v *NullableListAppUsers200ResponseInner) Set(val *ListAppUsers200ResponseInner) { - v.value = val - v.isSet = true -} - -func (v NullableListAppUsers200ResponseInner) IsSet() bool { - return v.isSet -} - -func (v *NullableListAppUsers200ResponseInner) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableListAppUsers200ResponseInner(val *ListAppUsers200ResponseInner) *NullableListAppUsers200ResponseInner { - return &NullableListAppUsers200ResponseInner{value: val, isSet: true} -} - -func (v NullableListAppUsers200ResponseInner) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableListAppUsers200ResponseInner) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_list_authorization_servers_200_response_inner.go b/model_list_authorization_servers_200_response_inner.go deleted file mode 100644 index dcc4189..0000000 --- a/model_list_authorization_servers_200_response_inner.go +++ /dev/null @@ -1,223 +0,0 @@ -/* -OneLogin API - -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -API version: 3.0.0-alpha.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package openapi - -import ( - "encoding/json" -) - -// ListAuthorizationServers200ResponseInner struct for ListAuthorizationServers200ResponseInner -type ListAuthorizationServers200ResponseInner struct { - Id *int32 `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Configuration *ListAuthorizationServers200ResponseInnerConfiguration `json:"configuration,omitempty"` - Description *string `json:"description,omitempty"` -} - -// NewListAuthorizationServers200ResponseInner instantiates a new ListAuthorizationServers200ResponseInner 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 NewListAuthorizationServers200ResponseInner() *ListAuthorizationServers200ResponseInner { - this := ListAuthorizationServers200ResponseInner{} - return &this -} - -// NewListAuthorizationServers200ResponseInnerWithDefaults instantiates a new ListAuthorizationServers200ResponseInner 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 NewListAuthorizationServers200ResponseInnerWithDefaults() *ListAuthorizationServers200ResponseInner { - this := ListAuthorizationServers200ResponseInner{} - return &this -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *ListAuthorizationServers200ResponseInner) GetId() int32 { - if o == nil || o.Id == nil { - var ret int32 - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ListAuthorizationServers200ResponseInner) GetIdOk() (*int32, bool) { - if o == nil || o.Id == nil { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *ListAuthorizationServers200ResponseInner) HasId() bool { - if o != nil && o.Id != nil { - return true - } - - return false -} - -// SetId gets a reference to the given int32 and assigns it to the Id field. -func (o *ListAuthorizationServers200ResponseInner) SetId(v int32) { - o.Id = &v -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *ListAuthorizationServers200ResponseInner) GetName() string { - if o == nil || o.Name == nil { - var ret string - return ret - } - return *o.Name -} - -// 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 *ListAuthorizationServers200ResponseInner) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *ListAuthorizationServers200ResponseInner) HasName() bool { - if o != nil && o.Name != nil { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *ListAuthorizationServers200ResponseInner) SetName(v string) { - o.Name = &v -} - -// GetConfiguration returns the Configuration field value if set, zero value otherwise. -func (o *ListAuthorizationServers200ResponseInner) GetConfiguration() ListAuthorizationServers200ResponseInnerConfiguration { - if o == nil || o.Configuration == nil { - var ret ListAuthorizationServers200ResponseInnerConfiguration - return ret - } - return *o.Configuration -} - -// GetConfigurationOk returns a tuple with the Configuration field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ListAuthorizationServers200ResponseInner) GetConfigurationOk() (*ListAuthorizationServers200ResponseInnerConfiguration, bool) { - if o == nil || o.Configuration == nil { - return nil, false - } - return o.Configuration, true -} - -// HasConfiguration returns a boolean if a field has been set. -func (o *ListAuthorizationServers200ResponseInner) HasConfiguration() bool { - if o != nil && o.Configuration != nil { - return true - } - - return false -} - -// SetConfiguration gets a reference to the given ListAuthorizationServers200ResponseInnerConfiguration and assigns it to the Configuration field. -func (o *ListAuthorizationServers200ResponseInner) SetConfiguration(v ListAuthorizationServers200ResponseInnerConfiguration) { - o.Configuration = &v -} - -// GetDescription returns the Description field value if set, zero value otherwise. -func (o *ListAuthorizationServers200ResponseInner) GetDescription() string { - if o == nil || o.Description == nil { - var ret string - return ret - } - return *o.Description -} - -// 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 *ListAuthorizationServers200ResponseInner) GetDescriptionOk() (*string, bool) { - if o == nil || o.Description == nil { - return nil, false - } - return o.Description, true -} - -// HasDescription returns a boolean if a field has been set. -func (o *ListAuthorizationServers200ResponseInner) HasDescription() bool { - if o != nil && o.Description != nil { - return true - } - - return false -} - -// SetDescription gets a reference to the given string and assigns it to the Description field. -func (o *ListAuthorizationServers200ResponseInner) SetDescription(v string) { - o.Description = &v -} - -func (o ListAuthorizationServers200ResponseInner) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Name != nil { - toSerialize["name"] = o.Name - } - if o.Configuration != nil { - toSerialize["configuration"] = o.Configuration - } - if o.Description != nil { - toSerialize["description"] = o.Description - } - return json.Marshal(toSerialize) -} - -type NullableListAuthorizationServers200ResponseInner struct { - value *ListAuthorizationServers200ResponseInner - isSet bool -} - -func (v NullableListAuthorizationServers200ResponseInner) Get() *ListAuthorizationServers200ResponseInner { - return v.value -} - -func (v *NullableListAuthorizationServers200ResponseInner) Set(val *ListAuthorizationServers200ResponseInner) { - v.value = val - v.isSet = true -} - -func (v NullableListAuthorizationServers200ResponseInner) IsSet() bool { - return v.isSet -} - -func (v *NullableListAuthorizationServers200ResponseInner) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableListAuthorizationServers200ResponseInner(val *ListAuthorizationServers200ResponseInner) *NullableListAuthorizationServers200ResponseInner { - return &NullableListAuthorizationServers200ResponseInner{value: val, isSet: true} -} - -func (v NullableListAuthorizationServers200ResponseInner) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableListAuthorizationServers200ResponseInner) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_list_authorization_servers_200_response_inner_configuration.go b/model_list_authorization_servers_200_response_inner_configuration.go deleted file mode 100644 index ce0e5ef..0000000 --- a/model_list_authorization_servers_200_response_inner_configuration.go +++ /dev/null @@ -1,151 +0,0 @@ -/* -OneLogin API - -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -API version: 3.0.0-alpha.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package openapi - -import ( - "encoding/json" -) - -// ListAuthorizationServers200ResponseInnerConfiguration struct for ListAuthorizationServers200ResponseInnerConfiguration -type ListAuthorizationServers200ResponseInnerConfiguration struct { - ResourceIdentifier *string `json:"resource_identifier,omitempty"` - Audiences []string `json:"audiences,omitempty"` -} - -// NewListAuthorizationServers200ResponseInnerConfiguration instantiates a new ListAuthorizationServers200ResponseInnerConfiguration 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 NewListAuthorizationServers200ResponseInnerConfiguration() *ListAuthorizationServers200ResponseInnerConfiguration { - this := ListAuthorizationServers200ResponseInnerConfiguration{} - return &this -} - -// NewListAuthorizationServers200ResponseInnerConfigurationWithDefaults instantiates a new ListAuthorizationServers200ResponseInnerConfiguration 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 NewListAuthorizationServers200ResponseInnerConfigurationWithDefaults() *ListAuthorizationServers200ResponseInnerConfiguration { - this := ListAuthorizationServers200ResponseInnerConfiguration{} - return &this -} - -// GetResourceIdentifier returns the ResourceIdentifier field value if set, zero value otherwise. -func (o *ListAuthorizationServers200ResponseInnerConfiguration) GetResourceIdentifier() string { - if o == nil || o.ResourceIdentifier == nil { - var ret string - return ret - } - return *o.ResourceIdentifier -} - -// GetResourceIdentifierOk returns a tuple with the ResourceIdentifier field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ListAuthorizationServers200ResponseInnerConfiguration) GetResourceIdentifierOk() (*string, bool) { - if o == nil || o.ResourceIdentifier == nil { - return nil, false - } - return o.ResourceIdentifier, true -} - -// HasResourceIdentifier returns a boolean if a field has been set. -func (o *ListAuthorizationServers200ResponseInnerConfiguration) HasResourceIdentifier() bool { - if o != nil && o.ResourceIdentifier != nil { - return true - } - - return false -} - -// SetResourceIdentifier gets a reference to the given string and assigns it to the ResourceIdentifier field. -func (o *ListAuthorizationServers200ResponseInnerConfiguration) SetResourceIdentifier(v string) { - o.ResourceIdentifier = &v -} - -// GetAudiences returns the Audiences field value if set, zero value otherwise. -func (o *ListAuthorizationServers200ResponseInnerConfiguration) GetAudiences() []string { - if o == nil || o.Audiences == nil { - var ret []string - return ret - } - return o.Audiences -} - -// GetAudiencesOk returns a tuple with the Audiences field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ListAuthorizationServers200ResponseInnerConfiguration) GetAudiencesOk() ([]string, bool) { - if o == nil || o.Audiences == nil { - return nil, false - } - return o.Audiences, true -} - -// HasAudiences returns a boolean if a field has been set. -func (o *ListAuthorizationServers200ResponseInnerConfiguration) HasAudiences() bool { - if o != nil && o.Audiences != nil { - return true - } - - return false -} - -// SetAudiences gets a reference to the given []string and assigns it to the Audiences field. -func (o *ListAuthorizationServers200ResponseInnerConfiguration) SetAudiences(v []string) { - o.Audiences = v -} - -func (o ListAuthorizationServers200ResponseInnerConfiguration) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.ResourceIdentifier != nil { - toSerialize["resource_identifier"] = o.ResourceIdentifier - } - if o.Audiences != nil { - toSerialize["audiences"] = o.Audiences - } - return json.Marshal(toSerialize) -} - -type NullableListAuthorizationServers200ResponseInnerConfiguration struct { - value *ListAuthorizationServers200ResponseInnerConfiguration - isSet bool -} - -func (v NullableListAuthorizationServers200ResponseInnerConfiguration) Get() *ListAuthorizationServers200ResponseInnerConfiguration { - return v.value -} - -func (v *NullableListAuthorizationServers200ResponseInnerConfiguration) Set(val *ListAuthorizationServers200ResponseInnerConfiguration) { - v.value = val - v.isSet = true -} - -func (v NullableListAuthorizationServers200ResponseInnerConfiguration) IsSet() bool { - return v.isSet -} - -func (v *NullableListAuthorizationServers200ResponseInnerConfiguration) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableListAuthorizationServers200ResponseInnerConfiguration(val *ListAuthorizationServers200ResponseInnerConfiguration) *NullableListAuthorizationServers200ResponseInnerConfiguration { - return &NullableListAuthorizationServers200ResponseInnerConfiguration{value: val, isSet: true} -} - -func (v NullableListAuthorizationServers200ResponseInnerConfiguration) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableListAuthorizationServers200ResponseInnerConfiguration) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_list_condition_operators_200_response_inner.go b/model_list_condition_operators_200_response_inner.go deleted file mode 100644 index 6bd8b9b..0000000 --- a/model_list_condition_operators_200_response_inner.go +++ /dev/null @@ -1,153 +0,0 @@ -/* -OneLogin API - -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -API version: 3.0.0-alpha.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package openapi - -import ( - "encoding/json" -) - -// ListConditionOperators200ResponseInner struct for ListConditionOperators200ResponseInner -type ListConditionOperators200ResponseInner struct { - // The name or description of the operator. - Name *string `json:"name,omitempty"` - // The condition operator value to use when creating or updating App Rules. - Value *string `json:"value,omitempty"` -} - -// NewListConditionOperators200ResponseInner instantiates a new ListConditionOperators200ResponseInner 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 NewListConditionOperators200ResponseInner() *ListConditionOperators200ResponseInner { - this := ListConditionOperators200ResponseInner{} - return &this -} - -// NewListConditionOperators200ResponseInnerWithDefaults instantiates a new ListConditionOperators200ResponseInner 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 NewListConditionOperators200ResponseInnerWithDefaults() *ListConditionOperators200ResponseInner { - this := ListConditionOperators200ResponseInner{} - return &this -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *ListConditionOperators200ResponseInner) GetName() string { - if o == nil || o.Name == nil { - var ret string - return ret - } - return *o.Name -} - -// 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 *ListConditionOperators200ResponseInner) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *ListConditionOperators200ResponseInner) HasName() bool { - if o != nil && o.Name != nil { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *ListConditionOperators200ResponseInner) SetName(v string) { - o.Name = &v -} - -// GetValue returns the Value field value if set, zero value otherwise. -func (o *ListConditionOperators200ResponseInner) GetValue() string { - if o == nil || o.Value == nil { - var ret string - return ret - } - return *o.Value -} - -// GetValueOk returns a tuple with the Value field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ListConditionOperators200ResponseInner) GetValueOk() (*string, bool) { - if o == nil || o.Value == nil { - return nil, false - } - return o.Value, true -} - -// HasValue returns a boolean if a field has been set. -func (o *ListConditionOperators200ResponseInner) HasValue() bool { - if o != nil && o.Value != nil { - return true - } - - return false -} - -// SetValue gets a reference to the given string and assigns it to the Value field. -func (o *ListConditionOperators200ResponseInner) SetValue(v string) { - o.Value = &v -} - -func (o ListConditionOperators200ResponseInner) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Name != nil { - toSerialize["name"] = o.Name - } - if o.Value != nil { - toSerialize["value"] = o.Value - } - return json.Marshal(toSerialize) -} - -type NullableListConditionOperators200ResponseInner struct { - value *ListConditionOperators200ResponseInner - isSet bool -} - -func (v NullableListConditionOperators200ResponseInner) Get() *ListConditionOperators200ResponseInner { - return v.value -} - -func (v *NullableListConditionOperators200ResponseInner) Set(val *ListConditionOperators200ResponseInner) { - v.value = val - v.isSet = true -} - -func (v NullableListConditionOperators200ResponseInner) IsSet() bool { - return v.isSet -} - -func (v *NullableListConditionOperators200ResponseInner) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableListConditionOperators200ResponseInner(val *ListConditionOperators200ResponseInner) *NullableListConditionOperators200ResponseInner { - return &NullableListConditionOperators200ResponseInner{value: val, isSet: true} -} - -func (v NullableListConditionOperators200ResponseInner) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableListConditionOperators200ResponseInner) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_list_condition_values_200_response_inner.go b/model_list_condition_values_200_response_inner.go deleted file mode 100644 index 64281f0..0000000 --- a/model_list_condition_values_200_response_inner.go +++ /dev/null @@ -1,151 +0,0 @@ -/* -OneLogin API - -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -API version: 3.0.0-alpha.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package openapi - -import ( - "encoding/json" -) - -// ListConditionValues200ResponseInner struct for ListConditionValues200ResponseInner -type ListConditionValues200ResponseInner struct { - Name *string `json:"name,omitempty"` - Value *string `json:"value,omitempty"` -} - -// NewListConditionValues200ResponseInner instantiates a new ListConditionValues200ResponseInner 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 NewListConditionValues200ResponseInner() *ListConditionValues200ResponseInner { - this := ListConditionValues200ResponseInner{} - return &this -} - -// NewListConditionValues200ResponseInnerWithDefaults instantiates a new ListConditionValues200ResponseInner 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 NewListConditionValues200ResponseInnerWithDefaults() *ListConditionValues200ResponseInner { - this := ListConditionValues200ResponseInner{} - return &this -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *ListConditionValues200ResponseInner) GetName() string { - if o == nil || o.Name == nil { - var ret string - return ret - } - return *o.Name -} - -// 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 *ListConditionValues200ResponseInner) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *ListConditionValues200ResponseInner) HasName() bool { - if o != nil && o.Name != nil { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *ListConditionValues200ResponseInner) SetName(v string) { - o.Name = &v -} - -// GetValue returns the Value field value if set, zero value otherwise. -func (o *ListConditionValues200ResponseInner) GetValue() string { - if o == nil || o.Value == nil { - var ret string - return ret - } - return *o.Value -} - -// GetValueOk returns a tuple with the Value field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ListConditionValues200ResponseInner) GetValueOk() (*string, bool) { - if o == nil || o.Value == nil { - return nil, false - } - return o.Value, true -} - -// HasValue returns a boolean if a field has been set. -func (o *ListConditionValues200ResponseInner) HasValue() bool { - if o != nil && o.Value != nil { - return true - } - - return false -} - -// SetValue gets a reference to the given string and assigns it to the Value field. -func (o *ListConditionValues200ResponseInner) SetValue(v string) { - o.Value = &v -} - -func (o ListConditionValues200ResponseInner) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Name != nil { - toSerialize["name"] = o.Name - } - if o.Value != nil { - toSerialize["value"] = o.Value - } - return json.Marshal(toSerialize) -} - -type NullableListConditionValues200ResponseInner struct { - value *ListConditionValues200ResponseInner - isSet bool -} - -func (v NullableListConditionValues200ResponseInner) Get() *ListConditionValues200ResponseInner { - return v.value -} - -func (v *NullableListConditionValues200ResponseInner) Set(val *ListConditionValues200ResponseInner) { - v.value = val - v.isSet = true -} - -func (v NullableListConditionValues200ResponseInner) IsSet() bool { - return v.isSet -} - -func (v *NullableListConditionValues200ResponseInner) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableListConditionValues200ResponseInner(val *ListConditionValues200ResponseInner) *NullableListConditionValues200ResponseInner { - return &NullableListConditionValues200ResponseInner{value: val, isSet: true} -} - -func (v NullableListConditionValues200ResponseInner) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableListConditionValues200ResponseInner) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_list_conditions_200_response_inner.go b/model_list_conditions_200_response_inner.go index 3d16c80..473233c 100644 --- a/model_list_conditions_200_response_inner.go +++ b/model_list_conditions_200_response_inner.go @@ -1,22 +1,25 @@ /* OneLogin API -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) +OpenAPI Specification for OneLogin -API version: 3.0.0-alpha.1 +API version: 3.1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package openapi +package onelogin import ( "encoding/json" ) +// checks if the ListConditions200ResponseInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListConditions200ResponseInner{} + // ListConditions200ResponseInner struct for ListConditions200ResponseInner type ListConditions200ResponseInner struct { - // The name of the Condition. + // Name of the rule condition Name *string `json:"name,omitempty"` // The unique identifier of the condition. This should be used when defining conditions for a rule. Value *string `json:"value,omitempty"` @@ -41,7 +44,7 @@ func NewListConditions200ResponseInnerWithDefaults() *ListConditions200ResponseI // GetName returns the Name field value if set, zero value otherwise. func (o *ListConditions200ResponseInner) 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 *ListConditions200ResponseInner) 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 *ListConditions200ResponseInner) 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 *ListConditions200ResponseInner) GetNameOk() (*string, bool) { // HasName returns a boolean if a field has been set. func (o *ListConditions200ResponseInner) HasName() bool { - if o != nil && o.Name != nil { + if o != nil && !isNil(o.Name) { return true } @@ -73,7 +76,7 @@ func (o *ListConditions200ResponseInner) SetName(v string) { // GetValue returns the Value field value if set, zero value otherwise. func (o *ListConditions200ResponseInner) GetValue() string { - if o == nil || o.Value == nil { + if o == nil || isNil(o.Value) { var ret string return ret } @@ -83,7 +86,7 @@ func (o *ListConditions200ResponseInner) GetValue() string { // GetValueOk returns a tuple with the Value field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ListConditions200ResponseInner) GetValueOk() (*string, bool) { - if o == nil || o.Value == nil { + if o == nil || isNil(o.Value) { return nil, false } return o.Value, true @@ -91,7 +94,7 @@ func (o *ListConditions200ResponseInner) GetValueOk() (*string, bool) { // HasValue returns a boolean if a field has been set. func (o *ListConditions200ResponseInner) HasValue() bool { - if o != nil && o.Value != nil { + if o != nil && !isNil(o.Value) { return true } @@ -104,14 +107,22 @@ func (o *ListConditions200ResponseInner) SetValue(v string) { } func (o ListConditions200ResponseInner) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListConditions200ResponseInner) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Name != nil { + if !isNil(o.Name) { toSerialize["name"] = o.Name } - if o.Value != nil { + if !isNil(o.Value) { toSerialize["value"] = o.Value } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableListConditions200ResponseInner struct { diff --git a/model_list_mapping_action_values_200_response_inner.go b/model_list_mapping_action_values_200_response_inner.go new file mode 100644 index 0000000..5c5e3f1 --- /dev/null +++ b/model_list_mapping_action_values_200_response_inner.go @@ -0,0 +1,164 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the ListMappingActionValues200ResponseInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListMappingActionValues200ResponseInner{} + +// ListMappingActionValues200ResponseInner struct for ListMappingActionValues200ResponseInner +type ListMappingActionValues200ResponseInner struct { + // Name or description of operator + Name *string `json:"name,omitempty"` + // The action operator value to use when creating or updating User Mappings. + Value *int32 `json:"value,omitempty"` +} + +// NewListMappingActionValues200ResponseInner instantiates a new ListMappingActionValues200ResponseInner 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 NewListMappingActionValues200ResponseInner() *ListMappingActionValues200ResponseInner { + this := ListMappingActionValues200ResponseInner{} + return &this +} + +// NewListMappingActionValues200ResponseInnerWithDefaults instantiates a new ListMappingActionValues200ResponseInner 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 NewListMappingActionValues200ResponseInnerWithDefaults() *ListMappingActionValues200ResponseInner { + this := ListMappingActionValues200ResponseInner{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *ListMappingActionValues200ResponseInner) GetName() string { + if o == nil || isNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// 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 *ListMappingActionValues200ResponseInner) GetNameOk() (*string, bool) { + if o == nil || isNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *ListMappingActionValues200ResponseInner) HasName() bool { + if o != nil && !isNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *ListMappingActionValues200ResponseInner) SetName(v string) { + o.Name = &v +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *ListMappingActionValues200ResponseInner) GetValue() int32 { + if o == nil || isNil(o.Value) { + var ret int32 + return ret + } + return *o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListMappingActionValues200ResponseInner) GetValueOk() (*int32, bool) { + if o == nil || isNil(o.Value) { + return nil, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *ListMappingActionValues200ResponseInner) HasValue() bool { + if o != nil && !isNil(o.Value) { + return true + } + + return false +} + +// SetValue gets a reference to the given int32 and assigns it to the Value field. +func (o *ListMappingActionValues200ResponseInner) SetValue(v int32) { + o.Value = &v +} + +func (o ListMappingActionValues200ResponseInner) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListMappingActionValues200ResponseInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.Name) { + toSerialize["name"] = o.Name + } + if !isNil(o.Value) { + toSerialize["value"] = o.Value + } + return toSerialize, nil +} + +type NullableListMappingActionValues200ResponseInner struct { + value *ListMappingActionValues200ResponseInner + isSet bool +} + +func (v NullableListMappingActionValues200ResponseInner) Get() *ListMappingActionValues200ResponseInner { + return v.value +} + +func (v *NullableListMappingActionValues200ResponseInner) Set(val *ListMappingActionValues200ResponseInner) { + v.value = val + v.isSet = true +} + +func (v NullableListMappingActionValues200ResponseInner) IsSet() bool { + return v.isSet +} + +func (v *NullableListMappingActionValues200ResponseInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListMappingActionValues200ResponseInner(val *ListMappingActionValues200ResponseInner) *NullableListMappingActionValues200ResponseInner { + return &NullableListMappingActionValues200ResponseInner{value: val, isSet: true} +} + +func (v NullableListMappingActionValues200ResponseInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListMappingActionValues200ResponseInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_list_mapping_condition_operators_200_response_inner.go b/model_list_mapping_condition_operators_200_response_inner.go deleted file mode 100644 index 1dbcbe5..0000000 --- a/model_list_mapping_condition_operators_200_response_inner.go +++ /dev/null @@ -1,153 +0,0 @@ -/* -OneLogin API - -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -API version: 3.0.0-alpha.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package openapi - -import ( - "encoding/json" -) - -// ListMappingConditionOperators200ResponseInner struct for ListMappingConditionOperators200ResponseInner -type ListMappingConditionOperators200ResponseInner struct { - // The name or description of the operator. - Name *string `json:"name,omitempty"` - // The condition operator value to use when creating or updating User Mappings. - Value *string `json:"value,omitempty"` -} - -// NewListMappingConditionOperators200ResponseInner instantiates a new ListMappingConditionOperators200ResponseInner 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 NewListMappingConditionOperators200ResponseInner() *ListMappingConditionOperators200ResponseInner { - this := ListMappingConditionOperators200ResponseInner{} - return &this -} - -// NewListMappingConditionOperators200ResponseInnerWithDefaults instantiates a new ListMappingConditionOperators200ResponseInner 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 NewListMappingConditionOperators200ResponseInnerWithDefaults() *ListMappingConditionOperators200ResponseInner { - this := ListMappingConditionOperators200ResponseInner{} - return &this -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *ListMappingConditionOperators200ResponseInner) GetName() string { - if o == nil || o.Name == nil { - var ret string - return ret - } - return *o.Name -} - -// 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 *ListMappingConditionOperators200ResponseInner) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *ListMappingConditionOperators200ResponseInner) HasName() bool { - if o != nil && o.Name != nil { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *ListMappingConditionOperators200ResponseInner) SetName(v string) { - o.Name = &v -} - -// GetValue returns the Value field value if set, zero value otherwise. -func (o *ListMappingConditionOperators200ResponseInner) GetValue() string { - if o == nil || o.Value == nil { - var ret string - return ret - } - return *o.Value -} - -// GetValueOk returns a tuple with the Value field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ListMappingConditionOperators200ResponseInner) GetValueOk() (*string, bool) { - if o == nil || o.Value == nil { - return nil, false - } - return o.Value, true -} - -// HasValue returns a boolean if a field has been set. -func (o *ListMappingConditionOperators200ResponseInner) HasValue() bool { - if o != nil && o.Value != nil { - return true - } - - return false -} - -// SetValue gets a reference to the given string and assigns it to the Value field. -func (o *ListMappingConditionOperators200ResponseInner) SetValue(v string) { - o.Value = &v -} - -func (o ListMappingConditionOperators200ResponseInner) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Name != nil { - toSerialize["name"] = o.Name - } - if o.Value != nil { - toSerialize["value"] = o.Value - } - return json.Marshal(toSerialize) -} - -type NullableListMappingConditionOperators200ResponseInner struct { - value *ListMappingConditionOperators200ResponseInner - isSet bool -} - -func (v NullableListMappingConditionOperators200ResponseInner) Get() *ListMappingConditionOperators200ResponseInner { - return v.value -} - -func (v *NullableListMappingConditionOperators200ResponseInner) Set(val *ListMappingConditionOperators200ResponseInner) { - v.value = val - v.isSet = true -} - -func (v NullableListMappingConditionOperators200ResponseInner) IsSet() bool { - return v.isSet -} - -func (v *NullableListMappingConditionOperators200ResponseInner) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableListMappingConditionOperators200ResponseInner(val *ListMappingConditionOperators200ResponseInner) *NullableListMappingConditionOperators200ResponseInner { - return &NullableListMappingConditionOperators200ResponseInner{value: val, isSet: true} -} - -func (v NullableListMappingConditionOperators200ResponseInner) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableListMappingConditionOperators200ResponseInner) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_list_mapping_conditions_200_response.go b/model_list_mapping_conditions_200_response.go new file mode 100644 index 0000000..b3b76c6 --- /dev/null +++ b/model_list_mapping_conditions_200_response.go @@ -0,0 +1,164 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the ListMappingConditions200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListMappingConditions200Response{} + +// ListMappingConditions200Response struct for ListMappingConditions200Response +type ListMappingConditions200Response struct { + // Name of Condition + Name *string `json:"name,omitempty"` + // The unique identifier of the condition. This should be used when defining conditions for a User Mapping + Value *string `json:"value,omitempty"` +} + +// NewListMappingConditions200Response instantiates a new ListMappingConditions200Response 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 NewListMappingConditions200Response() *ListMappingConditions200Response { + this := ListMappingConditions200Response{} + return &this +} + +// NewListMappingConditions200ResponseWithDefaults instantiates a new ListMappingConditions200Response 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 NewListMappingConditions200ResponseWithDefaults() *ListMappingConditions200Response { + this := ListMappingConditions200Response{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *ListMappingConditions200Response) GetName() string { + if o == nil || isNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// 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 *ListMappingConditions200Response) GetNameOk() (*string, bool) { + if o == nil || isNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *ListMappingConditions200Response) HasName() bool { + if o != nil && !isNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *ListMappingConditions200Response) SetName(v string) { + o.Name = &v +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *ListMappingConditions200Response) GetValue() string { + if o == nil || isNil(o.Value) { + var ret string + return ret + } + return *o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListMappingConditions200Response) GetValueOk() (*string, bool) { + if o == nil || isNil(o.Value) { + return nil, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *ListMappingConditions200Response) HasValue() bool { + if o != nil && !isNil(o.Value) { + return true + } + + return false +} + +// SetValue gets a reference to the given string and assigns it to the Value field. +func (o *ListMappingConditions200Response) SetValue(v string) { + o.Value = &v +} + +func (o ListMappingConditions200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListMappingConditions200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.Name) { + toSerialize["name"] = o.Name + } + if !isNil(o.Value) { + toSerialize["value"] = o.Value + } + return toSerialize, nil +} + +type NullableListMappingConditions200Response struct { + value *ListMappingConditions200Response + isSet bool +} + +func (v NullableListMappingConditions200Response) Get() *ListMappingConditions200Response { + return v.value +} + +func (v *NullableListMappingConditions200Response) Set(val *ListMappingConditions200Response) { + v.value = val + v.isSet = true +} + +func (v NullableListMappingConditions200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableListMappingConditions200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListMappingConditions200Response(val *ListMappingConditions200Response) *NullableListMappingConditions200Response { + return &NullableListMappingConditions200Response{value: val, isSet: true} +} + +func (v NullableListMappingConditions200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListMappingConditions200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_list_mapping_conditions_200_response_inner.go b/model_list_mapping_conditions_200_response_inner.go deleted file mode 100644 index 09a1326..0000000 --- a/model_list_mapping_conditions_200_response_inner.go +++ /dev/null @@ -1,153 +0,0 @@ -/* -OneLogin API - -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -API version: 3.0.0-alpha.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package openapi - -import ( - "encoding/json" -) - -// ListMappingConditions200ResponseInner struct for ListMappingConditions200ResponseInner -type ListMappingConditions200ResponseInner struct { - // The name of the Condition. - Name *string `json:"name,omitempty"` - // The unique identifier of the condition. This should be used when defining conditions for a User Mapping. - Value *string `json:"value,omitempty"` -} - -// NewListMappingConditions200ResponseInner instantiates a new ListMappingConditions200ResponseInner 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 NewListMappingConditions200ResponseInner() *ListMappingConditions200ResponseInner { - this := ListMappingConditions200ResponseInner{} - return &this -} - -// NewListMappingConditions200ResponseInnerWithDefaults instantiates a new ListMappingConditions200ResponseInner 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 NewListMappingConditions200ResponseInnerWithDefaults() *ListMappingConditions200ResponseInner { - this := ListMappingConditions200ResponseInner{} - return &this -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *ListMappingConditions200ResponseInner) GetName() string { - if o == nil || o.Name == nil { - var ret string - return ret - } - return *o.Name -} - -// 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 *ListMappingConditions200ResponseInner) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *ListMappingConditions200ResponseInner) HasName() bool { - if o != nil && o.Name != nil { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *ListMappingConditions200ResponseInner) SetName(v string) { - o.Name = &v -} - -// GetValue returns the Value field value if set, zero value otherwise. -func (o *ListMappingConditions200ResponseInner) GetValue() string { - if o == nil || o.Value == nil { - var ret string - return ret - } - return *o.Value -} - -// GetValueOk returns a tuple with the Value field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ListMappingConditions200ResponseInner) GetValueOk() (*string, bool) { - if o == nil || o.Value == nil { - return nil, false - } - return o.Value, true -} - -// HasValue returns a boolean if a field has been set. -func (o *ListMappingConditions200ResponseInner) HasValue() bool { - if o != nil && o.Value != nil { - return true - } - - return false -} - -// SetValue gets a reference to the given string and assigns it to the Value field. -func (o *ListMappingConditions200ResponseInner) SetValue(v string) { - o.Value = &v -} - -func (o ListMappingConditions200ResponseInner) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Name != nil { - toSerialize["name"] = o.Name - } - if o.Value != nil { - toSerialize["value"] = o.Value - } - return json.Marshal(toSerialize) -} - -type NullableListMappingConditions200ResponseInner struct { - value *ListMappingConditions200ResponseInner - isSet bool -} - -func (v NullableListMappingConditions200ResponseInner) Get() *ListMappingConditions200ResponseInner { - return v.value -} - -func (v *NullableListMappingConditions200ResponseInner) Set(val *ListMappingConditions200ResponseInner) { - v.value = val - v.isSet = true -} - -func (v NullableListMappingConditions200ResponseInner) IsSet() bool { - return v.isSet -} - -func (v *NullableListMappingConditions200ResponseInner) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableListMappingConditions200ResponseInner(val *ListMappingConditions200ResponseInner) *NullableListMappingConditions200ResponseInner { - return &NullableListMappingConditions200ResponseInner{value: val, isSet: true} -} - -func (v NullableListMappingConditions200ResponseInner) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableListMappingConditions200ResponseInner) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_list_mapping_conditions_operators_200_response_inner.go b/model_list_mapping_conditions_operators_200_response_inner.go new file mode 100644 index 0000000..99f58ba --- /dev/null +++ b/model_list_mapping_conditions_operators_200_response_inner.go @@ -0,0 +1,164 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the ListMappingConditionsOperators200ResponseInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListMappingConditionsOperators200ResponseInner{} + +// ListMappingConditionsOperators200ResponseInner struct for ListMappingConditionsOperators200ResponseInner +type ListMappingConditionsOperators200ResponseInner struct { + // Name or description of operator + Name *string `json:"name,omitempty"` + // The condition operator value to use when creating or updating User Mappings. + Value *string `json:"value,omitempty"` +} + +// NewListMappingConditionsOperators200ResponseInner instantiates a new ListMappingConditionsOperators200ResponseInner 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 NewListMappingConditionsOperators200ResponseInner() *ListMappingConditionsOperators200ResponseInner { + this := ListMappingConditionsOperators200ResponseInner{} + return &this +} + +// NewListMappingConditionsOperators200ResponseInnerWithDefaults instantiates a new ListMappingConditionsOperators200ResponseInner 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 NewListMappingConditionsOperators200ResponseInnerWithDefaults() *ListMappingConditionsOperators200ResponseInner { + this := ListMappingConditionsOperators200ResponseInner{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *ListMappingConditionsOperators200ResponseInner) GetName() string { + if o == nil || isNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// 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 *ListMappingConditionsOperators200ResponseInner) GetNameOk() (*string, bool) { + if o == nil || isNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *ListMappingConditionsOperators200ResponseInner) HasName() bool { + if o != nil && !isNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *ListMappingConditionsOperators200ResponseInner) SetName(v string) { + o.Name = &v +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *ListMappingConditionsOperators200ResponseInner) GetValue() string { + if o == nil || isNil(o.Value) { + var ret string + return ret + } + return *o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListMappingConditionsOperators200ResponseInner) GetValueOk() (*string, bool) { + if o == nil || isNil(o.Value) { + return nil, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *ListMappingConditionsOperators200ResponseInner) HasValue() bool { + if o != nil && !isNil(o.Value) { + return true + } + + return false +} + +// SetValue gets a reference to the given string and assigns it to the Value field. +func (o *ListMappingConditionsOperators200ResponseInner) SetValue(v string) { + o.Value = &v +} + +func (o ListMappingConditionsOperators200ResponseInner) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListMappingConditionsOperators200ResponseInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.Name) { + toSerialize["name"] = o.Name + } + if !isNil(o.Value) { + toSerialize["value"] = o.Value + } + return toSerialize, nil +} + +type NullableListMappingConditionsOperators200ResponseInner struct { + value *ListMappingConditionsOperators200ResponseInner + isSet bool +} + +func (v NullableListMappingConditionsOperators200ResponseInner) Get() *ListMappingConditionsOperators200ResponseInner { + return v.value +} + +func (v *NullableListMappingConditionsOperators200ResponseInner) Set(val *ListMappingConditionsOperators200ResponseInner) { + v.value = val + v.isSet = true +} + +func (v NullableListMappingConditionsOperators200ResponseInner) IsSet() bool { + return v.isSet +} + +func (v *NullableListMappingConditionsOperators200ResponseInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListMappingConditionsOperators200ResponseInner(val *ListMappingConditionsOperators200ResponseInner) *NullableListMappingConditionsOperators200ResponseInner { + return &NullableListMappingConditionsOperators200ResponseInner{value: val, isSet: true} +} + +func (v NullableListMappingConditionsOperators200ResponseInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListMappingConditionsOperators200ResponseInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_list_mapping_contion_values_200_response_inner.go b/model_list_mapping_contion_values_200_response_inner.go new file mode 100644 index 0000000..8bd5735 --- /dev/null +++ b/model_list_mapping_contion_values_200_response_inner.go @@ -0,0 +1,164 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the ListMappingContionValues200ResponseInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListMappingContionValues200ResponseInner{} + +// ListMappingContionValues200ResponseInner struct for ListMappingContionValues200ResponseInner +type ListMappingContionValues200ResponseInner struct { + // Name or description of operator + Name *string `json:"name,omitempty"` + // The condition operator value to use when creating or updating User Mappings. + Value *int32 `json:"value,omitempty"` +} + +// NewListMappingContionValues200ResponseInner instantiates a new ListMappingContionValues200ResponseInner 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 NewListMappingContionValues200ResponseInner() *ListMappingContionValues200ResponseInner { + this := ListMappingContionValues200ResponseInner{} + return &this +} + +// NewListMappingContionValues200ResponseInnerWithDefaults instantiates a new ListMappingContionValues200ResponseInner 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 NewListMappingContionValues200ResponseInnerWithDefaults() *ListMappingContionValues200ResponseInner { + this := ListMappingContionValues200ResponseInner{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *ListMappingContionValues200ResponseInner) GetName() string { + if o == nil || isNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// 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 *ListMappingContionValues200ResponseInner) GetNameOk() (*string, bool) { + if o == nil || isNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *ListMappingContionValues200ResponseInner) HasName() bool { + if o != nil && !isNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *ListMappingContionValues200ResponseInner) SetName(v string) { + o.Name = &v +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *ListMappingContionValues200ResponseInner) GetValue() int32 { + if o == nil || isNil(o.Value) { + var ret int32 + return ret + } + return *o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListMappingContionValues200ResponseInner) GetValueOk() (*int32, bool) { + if o == nil || isNil(o.Value) { + return nil, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *ListMappingContionValues200ResponseInner) HasValue() bool { + if o != nil && !isNil(o.Value) { + return true + } + + return false +} + +// SetValue gets a reference to the given int32 and assigns it to the Value field. +func (o *ListMappingContionValues200ResponseInner) SetValue(v int32) { + o.Value = &v +} + +func (o ListMappingContionValues200ResponseInner) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListMappingContionValues200ResponseInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.Name) { + toSerialize["name"] = o.Name + } + if !isNil(o.Value) { + toSerialize["value"] = o.Value + } + return toSerialize, nil +} + +type NullableListMappingContionValues200ResponseInner struct { + value *ListMappingContionValues200ResponseInner + isSet bool +} + +func (v NullableListMappingContionValues200ResponseInner) Get() *ListMappingContionValues200ResponseInner { + return v.value +} + +func (v *NullableListMappingContionValues200ResponseInner) Set(val *ListMappingContionValues200ResponseInner) { + v.value = val + v.isSet = true +} + +func (v NullableListMappingContionValues200ResponseInner) IsSet() bool { + return v.isSet +} + +func (v *NullableListMappingContionValues200ResponseInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListMappingContionValues200ResponseInner(val *ListMappingContionValues200ResponseInner) *NullableListMappingContionValues200ResponseInner { + return &NullableListMappingContionValues200ResponseInner{value: val, isSet: true} +} + +func (v NullableListMappingContionValues200ResponseInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListMappingContionValues200ResponseInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_list_mappings_actions_200_response_inner.go b/model_list_mappings_actions_200_response_inner.go new file mode 100644 index 0000000..fe6ed51 --- /dev/null +++ b/model_list_mappings_actions_200_response_inner.go @@ -0,0 +1,164 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the ListMappingsActions200ResponseInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListMappingsActions200ResponseInner{} + +// ListMappingsActions200ResponseInner struct for ListMappingsActions200ResponseInner +type ListMappingsActions200ResponseInner struct { + // Name of the action + Name *string `json:"name,omitempty"` + // The unique identifier of the action. This should be used when defining actions for a User Mapping. + Value *string `json:"value,omitempty"` +} + +// NewListMappingsActions200ResponseInner instantiates a new ListMappingsActions200ResponseInner 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 NewListMappingsActions200ResponseInner() *ListMappingsActions200ResponseInner { + this := ListMappingsActions200ResponseInner{} + return &this +} + +// NewListMappingsActions200ResponseInnerWithDefaults instantiates a new ListMappingsActions200ResponseInner 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 NewListMappingsActions200ResponseInnerWithDefaults() *ListMappingsActions200ResponseInner { + this := ListMappingsActions200ResponseInner{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *ListMappingsActions200ResponseInner) GetName() string { + if o == nil || isNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// 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 *ListMappingsActions200ResponseInner) GetNameOk() (*string, bool) { + if o == nil || isNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *ListMappingsActions200ResponseInner) HasName() bool { + if o != nil && !isNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *ListMappingsActions200ResponseInner) SetName(v string) { + o.Name = &v +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *ListMappingsActions200ResponseInner) GetValue() string { + if o == nil || isNil(o.Value) { + var ret string + return ret + } + return *o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListMappingsActions200ResponseInner) GetValueOk() (*string, bool) { + if o == nil || isNil(o.Value) { + return nil, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *ListMappingsActions200ResponseInner) HasValue() bool { + if o != nil && !isNil(o.Value) { + return true + } + + return false +} + +// SetValue gets a reference to the given string and assigns it to the Value field. +func (o *ListMappingsActions200ResponseInner) SetValue(v string) { + o.Value = &v +} + +func (o ListMappingsActions200ResponseInner) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListMappingsActions200ResponseInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.Name) { + toSerialize["name"] = o.Name + } + if !isNil(o.Value) { + toSerialize["value"] = o.Value + } + return toSerialize, nil +} + +type NullableListMappingsActions200ResponseInner struct { + value *ListMappingsActions200ResponseInner + isSet bool +} + +func (v NullableListMappingsActions200ResponseInner) Get() *ListMappingsActions200ResponseInner { + return v.value +} + +func (v *NullableListMappingsActions200ResponseInner) Set(val *ListMappingsActions200ResponseInner) { + v.value = val + v.isSet = true +} + +func (v NullableListMappingsActions200ResponseInner) IsSet() bool { + return v.isSet +} + +func (v *NullableListMappingsActions200ResponseInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListMappingsActions200ResponseInner(val *ListMappingsActions200ResponseInner) *NullableListMappingsActions200ResponseInner { + return &NullableListMappingsActions200ResponseInner{value: val, isSet: true} +} + +func (v NullableListMappingsActions200ResponseInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListMappingsActions200ResponseInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_list_message_templates_200_response_inner.go b/model_list_message_templates_200_response_inner.go new file mode 100644 index 0000000..e53de3a --- /dev/null +++ b/model_list_message_templates_200_response_inner.go @@ -0,0 +1,201 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the ListMessageTemplates200ResponseInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListMessageTemplates200ResponseInner{} + +// ListMessageTemplates200ResponseInner struct for ListMessageTemplates200ResponseInner +type ListMessageTemplates200ResponseInner struct { + // template ID + Id *int32 `json:"id,omitempty"` + // indicator if template is enabled + Enabled *bool `json:"enabled,omitempty"` + // name of message template + Name *string `json:"name,omitempty"` +} + +// NewListMessageTemplates200ResponseInner instantiates a new ListMessageTemplates200ResponseInner 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 NewListMessageTemplates200ResponseInner() *ListMessageTemplates200ResponseInner { + this := ListMessageTemplates200ResponseInner{} + return &this +} + +// NewListMessageTemplates200ResponseInnerWithDefaults instantiates a new ListMessageTemplates200ResponseInner 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 NewListMessageTemplates200ResponseInnerWithDefaults() *ListMessageTemplates200ResponseInner { + this := ListMessageTemplates200ResponseInner{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *ListMessageTemplates200ResponseInner) GetId() int32 { + if o == nil || isNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListMessageTemplates200ResponseInner) GetIdOk() (*int32, bool) { + if o == nil || isNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *ListMessageTemplates200ResponseInner) HasId() bool { + if o != nil && !isNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *ListMessageTemplates200ResponseInner) SetId(v int32) { + o.Id = &v +} + +// GetEnabled returns the Enabled field value if set, zero value otherwise. +func (o *ListMessageTemplates200ResponseInner) GetEnabled() bool { + if o == nil || isNil(o.Enabled) { + 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 *ListMessageTemplates200ResponseInner) GetEnabledOk() (*bool, bool) { + if o == nil || isNil(o.Enabled) { + return nil, false + } + return o.Enabled, true +} + +// HasEnabled returns a boolean if a field has been set. +func (o *ListMessageTemplates200ResponseInner) HasEnabled() bool { + if o != nil && !isNil(o.Enabled) { + return true + } + + return false +} + +// SetEnabled gets a reference to the given bool and assigns it to the Enabled field. +func (o *ListMessageTemplates200ResponseInner) SetEnabled(v bool) { + o.Enabled = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *ListMessageTemplates200ResponseInner) GetName() string { + if o == nil || isNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// 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 *ListMessageTemplates200ResponseInner) GetNameOk() (*string, bool) { + if o == nil || isNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *ListMessageTemplates200ResponseInner) HasName() bool { + if o != nil && !isNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *ListMessageTemplates200ResponseInner) SetName(v string) { + o.Name = &v +} + +func (o ListMessageTemplates200ResponseInner) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListMessageTemplates200ResponseInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.Id) { + toSerialize["id"] = o.Id + } + if !isNil(o.Enabled) { + toSerialize["enabled"] = o.Enabled + } + if !isNil(o.Name) { + toSerialize["name"] = o.Name + } + return toSerialize, nil +} + +type NullableListMessageTemplates200ResponseInner struct { + value *ListMessageTemplates200ResponseInner + isSet bool +} + +func (v NullableListMessageTemplates200ResponseInner) Get() *ListMessageTemplates200ResponseInner { + return v.value +} + +func (v *NullableListMessageTemplates200ResponseInner) Set(val *ListMessageTemplates200ResponseInner) { + v.value = val + v.isSet = true +} + +func (v NullableListMessageTemplates200ResponseInner) IsSet() bool { + return v.isSet +} + +func (v *NullableListMessageTemplates200ResponseInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListMessageTemplates200ResponseInner(val *ListMessageTemplates200ResponseInner) *NullableListMessageTemplates200ResponseInner { + return &NullableListMessageTemplates200ResponseInner{value: val, isSet: true} +} + +func (v NullableListMessageTemplates200ResponseInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListMessageTemplates200ResponseInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_list_privelege_roles_200_response.go b/model_list_privelege_roles_200_response.go new file mode 100644 index 0000000..84d8de1 --- /dev/null +++ b/model_list_privelege_roles_200_response.go @@ -0,0 +1,346 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the ListPrivelegeRoles200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListPrivelegeRoles200Response{} + +// ListPrivelegeRoles200Response struct for ListPrivelegeRoles200Response +type ListPrivelegeRoles200Response struct { + Total *int32 `json:"total,omitempty"` + Roles []int32 `json:"roles,omitempty"` + BeforeCursor NullableInt32 `json:"beforeCursor,omitempty"` + PreviousLink NullableString `json:"previousLink,omitempty"` + AfterCursor NullableInt32 `json:"afterCursor,omitempty"` + NextLink NullableString `json:"nextLink,omitempty"` +} + +// NewListPrivelegeRoles200Response instantiates a new ListPrivelegeRoles200Response 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 NewListPrivelegeRoles200Response() *ListPrivelegeRoles200Response { + this := ListPrivelegeRoles200Response{} + return &this +} + +// NewListPrivelegeRoles200ResponseWithDefaults instantiates a new ListPrivelegeRoles200Response 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 NewListPrivelegeRoles200ResponseWithDefaults() *ListPrivelegeRoles200Response { + this := ListPrivelegeRoles200Response{} + return &this +} + +// GetTotal returns the Total field value if set, zero value otherwise. +func (o *ListPrivelegeRoles200Response) GetTotal() int32 { + if o == nil || isNil(o.Total) { + var ret int32 + return ret + } + return *o.Total +} + +// GetTotalOk returns a tuple with the Total field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListPrivelegeRoles200Response) GetTotalOk() (*int32, bool) { + if o == nil || isNil(o.Total) { + return nil, false + } + return o.Total, true +} + +// HasTotal returns a boolean if a field has been set. +func (o *ListPrivelegeRoles200Response) HasTotal() bool { + if o != nil && !isNil(o.Total) { + return true + } + + return false +} + +// SetTotal gets a reference to the given int32 and assigns it to the Total field. +func (o *ListPrivelegeRoles200Response) SetTotal(v int32) { + o.Total = &v +} + +// GetRoles returns the Roles field value if set, zero value otherwise. +func (o *ListPrivelegeRoles200Response) GetRoles() []int32 { + if o == nil || isNil(o.Roles) { + var ret []int32 + return ret + } + return o.Roles +} + +// GetRolesOk returns a tuple with the Roles field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListPrivelegeRoles200Response) GetRolesOk() ([]int32, bool) { + if o == nil || isNil(o.Roles) { + return nil, false + } + return o.Roles, true +} + +// HasRoles returns a boolean if a field has been set. +func (o *ListPrivelegeRoles200Response) HasRoles() bool { + if o != nil && !isNil(o.Roles) { + return true + } + + return false +} + +// SetRoles gets a reference to the given []int32 and assigns it to the Roles field. +func (o *ListPrivelegeRoles200Response) SetRoles(v []int32) { + o.Roles = v +} + +// GetBeforeCursor returns the BeforeCursor field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ListPrivelegeRoles200Response) GetBeforeCursor() int32 { + if o == nil || isNil(o.BeforeCursor.Get()) { + var ret int32 + return ret + } + return *o.BeforeCursor.Get() +} + +// GetBeforeCursorOk returns a tuple with the BeforeCursor 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 *ListPrivelegeRoles200Response) GetBeforeCursorOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.BeforeCursor.Get(), o.BeforeCursor.IsSet() +} + +// HasBeforeCursor returns a boolean if a field has been set. +func (o *ListPrivelegeRoles200Response) HasBeforeCursor() bool { + if o != nil && o.BeforeCursor.IsSet() { + return true + } + + return false +} + +// SetBeforeCursor gets a reference to the given NullableInt32 and assigns it to the BeforeCursor field. +func (o *ListPrivelegeRoles200Response) SetBeforeCursor(v int32) { + o.BeforeCursor.Set(&v) +} +// SetBeforeCursorNil sets the value for BeforeCursor to be an explicit nil +func (o *ListPrivelegeRoles200Response) SetBeforeCursorNil() { + o.BeforeCursor.Set(nil) +} + +// UnsetBeforeCursor ensures that no value is present for BeforeCursor, not even an explicit nil +func (o *ListPrivelegeRoles200Response) UnsetBeforeCursor() { + o.BeforeCursor.Unset() +} + +// GetPreviousLink returns the PreviousLink field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ListPrivelegeRoles200Response) GetPreviousLink() string { + if o == nil || isNil(o.PreviousLink.Get()) { + var ret string + return ret + } + return *o.PreviousLink.Get() +} + +// GetPreviousLinkOk returns a tuple with the PreviousLink 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 *ListPrivelegeRoles200Response) GetPreviousLinkOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.PreviousLink.Get(), o.PreviousLink.IsSet() +} + +// HasPreviousLink returns a boolean if a field has been set. +func (o *ListPrivelegeRoles200Response) HasPreviousLink() bool { + if o != nil && o.PreviousLink.IsSet() { + return true + } + + return false +} + +// SetPreviousLink gets a reference to the given NullableString and assigns it to the PreviousLink field. +func (o *ListPrivelegeRoles200Response) SetPreviousLink(v string) { + o.PreviousLink.Set(&v) +} +// SetPreviousLinkNil sets the value for PreviousLink to be an explicit nil +func (o *ListPrivelegeRoles200Response) SetPreviousLinkNil() { + o.PreviousLink.Set(nil) +} + +// UnsetPreviousLink ensures that no value is present for PreviousLink, not even an explicit nil +func (o *ListPrivelegeRoles200Response) UnsetPreviousLink() { + o.PreviousLink.Unset() +} + +// GetAfterCursor returns the AfterCursor field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ListPrivelegeRoles200Response) GetAfterCursor() int32 { + if o == nil || isNil(o.AfterCursor.Get()) { + var ret int32 + return ret + } + return *o.AfterCursor.Get() +} + +// GetAfterCursorOk returns a tuple with the AfterCursor 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 *ListPrivelegeRoles200Response) GetAfterCursorOk() (*int32, bool) { + if o == nil { + return nil, false + } + return o.AfterCursor.Get(), o.AfterCursor.IsSet() +} + +// HasAfterCursor returns a boolean if a field has been set. +func (o *ListPrivelegeRoles200Response) HasAfterCursor() bool { + if o != nil && o.AfterCursor.IsSet() { + return true + } + + return false +} + +// SetAfterCursor gets a reference to the given NullableInt32 and assigns it to the AfterCursor field. +func (o *ListPrivelegeRoles200Response) SetAfterCursor(v int32) { + o.AfterCursor.Set(&v) +} +// SetAfterCursorNil sets the value for AfterCursor to be an explicit nil +func (o *ListPrivelegeRoles200Response) SetAfterCursorNil() { + o.AfterCursor.Set(nil) +} + +// UnsetAfterCursor ensures that no value is present for AfterCursor, not even an explicit nil +func (o *ListPrivelegeRoles200Response) UnsetAfterCursor() { + o.AfterCursor.Unset() +} + +// GetNextLink returns the NextLink field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ListPrivelegeRoles200Response) GetNextLink() string { + if o == nil || isNil(o.NextLink.Get()) { + var ret string + return ret + } + return *o.NextLink.Get() +} + +// GetNextLinkOk returns a tuple with the NextLink 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 *ListPrivelegeRoles200Response) GetNextLinkOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.NextLink.Get(), o.NextLink.IsSet() +} + +// HasNextLink returns a boolean if a field has been set. +func (o *ListPrivelegeRoles200Response) HasNextLink() bool { + if o != nil && o.NextLink.IsSet() { + return true + } + + return false +} + +// SetNextLink gets a reference to the given NullableString and assigns it to the NextLink field. +func (o *ListPrivelegeRoles200Response) SetNextLink(v string) { + o.NextLink.Set(&v) +} +// SetNextLinkNil sets the value for NextLink to be an explicit nil +func (o *ListPrivelegeRoles200Response) SetNextLinkNil() { + o.NextLink.Set(nil) +} + +// UnsetNextLink ensures that no value is present for NextLink, not even an explicit nil +func (o *ListPrivelegeRoles200Response) UnsetNextLink() { + o.NextLink.Unset() +} + +func (o ListPrivelegeRoles200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListPrivelegeRoles200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.Total) { + toSerialize["total"] = o.Total + } + if !isNil(o.Roles) { + toSerialize["roles"] = o.Roles + } + if o.BeforeCursor.IsSet() { + toSerialize["beforeCursor"] = o.BeforeCursor.Get() + } + if o.PreviousLink.IsSet() { + toSerialize["previousLink"] = o.PreviousLink.Get() + } + if o.AfterCursor.IsSet() { + toSerialize["afterCursor"] = o.AfterCursor.Get() + } + if o.NextLink.IsSet() { + toSerialize["nextLink"] = o.NextLink.Get() + } + return toSerialize, nil +} + +type NullableListPrivelegeRoles200Response struct { + value *ListPrivelegeRoles200Response + isSet bool +} + +func (v NullableListPrivelegeRoles200Response) Get() *ListPrivelegeRoles200Response { + return v.value +} + +func (v *NullableListPrivelegeRoles200Response) Set(val *ListPrivelegeRoles200Response) { + v.value = val + v.isSet = true +} + +func (v NullableListPrivelegeRoles200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableListPrivelegeRoles200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListPrivelegeRoles200Response(val *ListPrivelegeRoles200Response) *NullableListPrivelegeRoles200Response { + return &NullableListPrivelegeRoles200Response{value: val, isSet: true} +} + +func (v NullableListPrivelegeRoles200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListPrivelegeRoles200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_locale.go b/model_locale.go new file mode 100644 index 0000000..5f2af70 --- /dev/null +++ b/model_locale.go @@ -0,0 +1,164 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the Locale type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Locale{} + +// Locale struct for Locale +type Locale struct { + // locale string + Language *string `json:"language,omitempty"` + // indicator if language is default + IsDefault *bool `json:"is_default,omitempty"` +} + +// NewLocale instantiates a new Locale 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 NewLocale() *Locale { + this := Locale{} + return &this +} + +// NewLocaleWithDefaults instantiates a new Locale 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 NewLocaleWithDefaults() *Locale { + this := Locale{} + return &this +} + +// GetLanguage returns the Language field value if set, zero value otherwise. +func (o *Locale) GetLanguage() string { + if o == nil || isNil(o.Language) { + var ret string + return ret + } + return *o.Language +} + +// GetLanguageOk returns a tuple with the Language field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Locale) GetLanguageOk() (*string, bool) { + if o == nil || isNil(o.Language) { + return nil, false + } + return o.Language, true +} + +// HasLanguage returns a boolean if a field has been set. +func (o *Locale) HasLanguage() bool { + if o != nil && !isNil(o.Language) { + return true + } + + return false +} + +// SetLanguage gets a reference to the given string and assigns it to the Language field. +func (o *Locale) SetLanguage(v string) { + o.Language = &v +} + +// GetIsDefault returns the IsDefault field value if set, zero value otherwise. +func (o *Locale) GetIsDefault() bool { + if o == nil || isNil(o.IsDefault) { + var ret bool + return ret + } + return *o.IsDefault +} + +// GetIsDefaultOk returns a tuple with the IsDefault field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Locale) GetIsDefaultOk() (*bool, bool) { + if o == nil || isNil(o.IsDefault) { + return nil, false + } + return o.IsDefault, true +} + +// HasIsDefault returns a boolean if a field has been set. +func (o *Locale) HasIsDefault() bool { + if o != nil && !isNil(o.IsDefault) { + return true + } + + return false +} + +// SetIsDefault gets a reference to the given bool and assigns it to the IsDefault field. +func (o *Locale) SetIsDefault(v bool) { + o.IsDefault = &v +} + +func (o Locale) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Locale) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.Language) { + toSerialize["language"] = o.Language + } + if !isNil(o.IsDefault) { + toSerialize["is_default"] = o.IsDefault + } + return toSerialize, nil +} + +type NullableLocale struct { + value *Locale + isSet bool +} + +func (v NullableLocale) Get() *Locale { + return v.value +} + +func (v *NullableLocale) Set(val *Locale) { + v.value = val + v.isSet = true +} + +func (v NullableLocale) IsSet() bool { + return v.isSet +} + +func (v *NullableLocale) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLocale(val *Locale) *NullableLocale { + return &NullableLocale{value: val, isSet: true} +} + +func (v NullableLocale) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLocale) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_lock_account_user_request.go b/model_lock_account_user_request.go new file mode 100644 index 0000000..508c978 --- /dev/null +++ b/model_lock_account_user_request.go @@ -0,0 +1,118 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the LockAccountUserRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LockAccountUserRequest{} + +// LockAccountUserRequest struct for LockAccountUserRequest +type LockAccountUserRequest struct { + // Set to the number of minutes for which you want to lock the user account. Set to 0 if you want to lock the user account based on the Lock effective period set in the policy assigned to the user. If no policy is assigned to the user, setting this value to 0 will lock the user’s account until you unlock it Note that this value can not be less time that the Lock Effective Period specified on a user policy. + LockedUntil int32 `json:"locked_until"` +} + +// NewLockAccountUserRequest instantiates a new LockAccountUserRequest 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 NewLockAccountUserRequest(lockedUntil int32) *LockAccountUserRequest { + this := LockAccountUserRequest{} + this.LockedUntil = lockedUntil + return &this +} + +// NewLockAccountUserRequestWithDefaults instantiates a new LockAccountUserRequest 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 NewLockAccountUserRequestWithDefaults() *LockAccountUserRequest { + this := LockAccountUserRequest{} + return &this +} + +// GetLockedUntil returns the LockedUntil field value +func (o *LockAccountUserRequest) GetLockedUntil() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.LockedUntil +} + +// GetLockedUntilOk returns a tuple with the LockedUntil field value +// and a boolean to check if the value has been set. +func (o *LockAccountUserRequest) GetLockedUntilOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.LockedUntil, true +} + +// SetLockedUntil sets field value +func (o *LockAccountUserRequest) SetLockedUntil(v int32) { + o.LockedUntil = v +} + +func (o LockAccountUserRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LockAccountUserRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["locked_until"] = o.LockedUntil + return toSerialize, nil +} + +type NullableLockAccountUserRequest struct { + value *LockAccountUserRequest + isSet bool +} + +func (v NullableLockAccountUserRequest) Get() *LockAccountUserRequest { + return v.value +} + +func (v *NullableLockAccountUserRequest) Set(val *LockAccountUserRequest) { + v.value = val + v.isSet = true +} + +func (v NullableLockAccountUserRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableLockAccountUserRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLockAccountUserRequest(val *LockAccountUserRequest) *NullableLockAccountUserRequest { + return &NullableLockAccountUserRequest{value: val, isSet: true} +} + +func (v NullableLockAccountUserRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLockAccountUserRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_mapping.go b/model_mapping.go index cdb39f4..03d7ef7 100644 --- a/model_mapping.go +++ b/model_mapping.go @@ -1,19 +1,22 @@ /* OneLogin API -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) +OpenAPI Specification for OneLogin -API version: 3.0.0-alpha.1 +API version: 3.1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package openapi +package onelogin import ( "encoding/json" ) +// checks if the Mapping type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Mapping{} + // Mapping struct for Mapping type Mapping struct { Id *int32 `json:"id,omitempty"` @@ -26,21 +29,22 @@ type Mapping struct { // Indicates the order of the mapping. When `null` this will default to last position. Position int32 `json:"position"` // An array of conditions that the user must meet in order for the mapping to be applied. - Conditions []Condition `json:"conditions,omitempty"` + Conditions []Condition `json:"conditions"` // An array of actions that will be applied to the users that are matched by the conditions. - Actions []Action `json:"actions"` + Actions []ActionObj `json:"actions"` } // NewMapping instantiates a new Mapping 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 NewMapping(name string, enabled bool, match string, position int32, actions []Action) *Mapping { +func NewMapping(name string, enabled bool, match string, position int32, conditions []Condition, actions []ActionObj) *Mapping { this := Mapping{} this.Name = name this.Enabled = enabled this.Match = match this.Position = position + this.Conditions = conditions this.Actions = actions return &this } @@ -55,7 +59,7 @@ func NewMappingWithDefaults() *Mapping { // GetId returns the Id field value if set, zero value otherwise. func (o *Mapping) GetId() int32 { - if o == nil || o.Id == nil { + if o == nil || isNil(o.Id) { var ret int32 return ret } @@ -65,7 +69,7 @@ func (o *Mapping) GetId() int32 { // GetIdOk returns a tuple with the Id field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Mapping) GetIdOk() (*int32, bool) { - if o == nil || o.Id == nil { + if o == nil || isNil(o.Id) { return nil, false } return o.Id, true @@ -73,7 +77,7 @@ func (o *Mapping) GetIdOk() (*int32, bool) { // HasId returns a boolean if a field has been set. func (o *Mapping) HasId() bool { - if o != nil && o.Id != nil { + if o != nil && !isNil(o.Id) { return true } @@ -181,42 +185,34 @@ func (o *Mapping) SetPosition(v int32) { o.Position = v } -// GetConditions returns the Conditions field value if set, zero value otherwise. +// GetConditions returns the Conditions field value func (o *Mapping) GetConditions() []Condition { - if o == nil || o.Conditions == nil { + if o == nil { var ret []Condition return ret } + return o.Conditions } -// GetConditionsOk returns a tuple with the Conditions field value if set, nil otherwise +// GetConditionsOk returns a tuple with the Conditions field value // and a boolean to check if the value has been set. func (o *Mapping) GetConditionsOk() ([]Condition, bool) { - if o == nil || o.Conditions == nil { + if o == nil { return nil, false } return o.Conditions, true } -// HasConditions returns a boolean if a field has been set. -func (o *Mapping) HasConditions() bool { - if o != nil && o.Conditions != nil { - return true - } - - return false -} - -// SetConditions gets a reference to the given []Condition and assigns it to the Conditions field. +// SetConditions sets field value func (o *Mapping) SetConditions(v []Condition) { o.Conditions = v } // GetActions returns the Actions field value -func (o *Mapping) GetActions() []Action { +func (o *Mapping) GetActions() []ActionObj { if o == nil { - var ret []Action + var ret []ActionObj return ret } @@ -225,7 +221,7 @@ func (o *Mapping) GetActions() []Action { // GetActionsOk returns a tuple with the Actions field value // and a boolean to check if the value has been set. -func (o *Mapping) GetActionsOk() ([]Action, bool) { +func (o *Mapping) GetActionsOk() ([]ActionObj, bool) { if o == nil { return nil, false } @@ -233,34 +229,30 @@ func (o *Mapping) GetActionsOk() ([]Action, bool) { } // SetActions sets field value -func (o *Mapping) SetActions(v []Action) { +func (o *Mapping) SetActions(v []ActionObj) { o.Actions = v } func (o Mapping) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Mapping) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { + if !isNil(o.Id) { toSerialize["id"] = o.Id } - if true { - toSerialize["name"] = o.Name - } - if true { - toSerialize["enabled"] = o.Enabled - } - if true { - toSerialize["match"] = o.Match - } - if true { - toSerialize["position"] = o.Position - } - if o.Conditions != nil { - toSerialize["conditions"] = o.Conditions - } - if true { - toSerialize["actions"] = o.Actions - } - return json.Marshal(toSerialize) + toSerialize["name"] = o.Name + toSerialize["enabled"] = o.Enabled + toSerialize["match"] = o.Match + toSerialize["position"] = o.Position + toSerialize["conditions"] = o.Conditions + toSerialize["actions"] = o.Actions + return toSerialize, nil } type NullableMapping struct { diff --git a/model_message_template.go b/model_message_template.go new file mode 100644 index 0000000..120626b --- /dev/null +++ b/model_message_template.go @@ -0,0 +1,345 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the MessageTemplate type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MessageTemplate{} + +// MessageTemplate struct for MessageTemplate +type MessageTemplate struct { + Id *int32 `json:"id,omitempty"` + AccountId *int32 `json:"account_id,omitempty"` + // Template type that describes the source (sms, voice, email) and purpose (registration, invite, etc) + Type string `json:"type"` + // The 2 character language locale for the template. e.g. en = English, es = Spanish + Locale string `json:"locale"` + Template MessageTemplateTemplate `json:"template"` + TemplateClass *string `json:"template_class,omitempty"` + // Last time template was updated + UpdatedAt *string `json:"updated_at,omitempty"` + // brand id number + BrandId *int32 `json:"brand_id,omitempty"` +} + +// NewMessageTemplate instantiates a new MessageTemplate 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 NewMessageTemplate(type_ string, locale string, template MessageTemplateTemplate) *MessageTemplate { + this := MessageTemplate{} + this.Type = type_ + this.Locale = locale + this.Template = template + return &this +} + +// NewMessageTemplateWithDefaults instantiates a new MessageTemplate 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 NewMessageTemplateWithDefaults() *MessageTemplate { + this := MessageTemplate{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *MessageTemplate) GetId() int32 { + if o == nil || isNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MessageTemplate) GetIdOk() (*int32, bool) { + if o == nil || isNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *MessageTemplate) HasId() bool { + if o != nil && !isNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *MessageTemplate) SetId(v int32) { + o.Id = &v +} + +// GetAccountId returns the AccountId field value if set, zero value otherwise. +func (o *MessageTemplate) GetAccountId() int32 { + if o == nil || isNil(o.AccountId) { + var ret int32 + return ret + } + return *o.AccountId +} + +// GetAccountIdOk returns a tuple with the AccountId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MessageTemplate) GetAccountIdOk() (*int32, bool) { + if o == nil || isNil(o.AccountId) { + return nil, false + } + return o.AccountId, true +} + +// HasAccountId returns a boolean if a field has been set. +func (o *MessageTemplate) HasAccountId() bool { + if o != nil && !isNil(o.AccountId) { + return true + } + + return false +} + +// SetAccountId gets a reference to the given int32 and assigns it to the AccountId field. +func (o *MessageTemplate) SetAccountId(v int32) { + o.AccountId = &v +} + +// GetType returns the Type field value +func (o *MessageTemplate) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *MessageTemplate) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *MessageTemplate) SetType(v string) { + o.Type = v +} + +// GetLocale returns the Locale field value +func (o *MessageTemplate) GetLocale() string { + if o == nil { + var ret string + return ret + } + + return o.Locale +} + +// GetLocaleOk returns a tuple with the Locale field value +// and a boolean to check if the value has been set. +func (o *MessageTemplate) GetLocaleOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Locale, true +} + +// SetLocale sets field value +func (o *MessageTemplate) SetLocale(v string) { + o.Locale = v +} + +// GetTemplate returns the Template field value +func (o *MessageTemplate) GetTemplate() MessageTemplateTemplate { + if o == nil { + var ret MessageTemplateTemplate + return ret + } + + return o.Template +} + +// GetTemplateOk returns a tuple with the Template field value +// and a boolean to check if the value has been set. +func (o *MessageTemplate) GetTemplateOk() (*MessageTemplateTemplate, bool) { + if o == nil { + return nil, false + } + return &o.Template, true +} + +// SetTemplate sets field value +func (o *MessageTemplate) SetTemplate(v MessageTemplateTemplate) { + o.Template = v +} + +// GetTemplateClass returns the TemplateClass field value if set, zero value otherwise. +func (o *MessageTemplate) GetTemplateClass() string { + if o == nil || isNil(o.TemplateClass) { + var ret string + return ret + } + return *o.TemplateClass +} + +// GetTemplateClassOk returns a tuple with the TemplateClass field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MessageTemplate) GetTemplateClassOk() (*string, bool) { + if o == nil || isNil(o.TemplateClass) { + return nil, false + } + return o.TemplateClass, true +} + +// HasTemplateClass returns a boolean if a field has been set. +func (o *MessageTemplate) HasTemplateClass() bool { + if o != nil && !isNil(o.TemplateClass) { + return true + } + + return false +} + +// SetTemplateClass gets a reference to the given string and assigns it to the TemplateClass field. +func (o *MessageTemplate) SetTemplateClass(v string) { + o.TemplateClass = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *MessageTemplate) GetUpdatedAt() string { + if o == nil || isNil(o.UpdatedAt) { + var ret string + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MessageTemplate) GetUpdatedAtOk() (*string, bool) { + if o == nil || isNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *MessageTemplate) HasUpdatedAt() bool { + if o != nil && !isNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given string and assigns it to the UpdatedAt field. +func (o *MessageTemplate) SetUpdatedAt(v string) { + o.UpdatedAt = &v +} + +// GetBrandId returns the BrandId field value if set, zero value otherwise. +func (o *MessageTemplate) GetBrandId() int32 { + if o == nil || isNil(o.BrandId) { + var ret int32 + return ret + } + return *o.BrandId +} + +// GetBrandIdOk returns a tuple with the BrandId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MessageTemplate) GetBrandIdOk() (*int32, bool) { + if o == nil || isNil(o.BrandId) { + return nil, false + } + return o.BrandId, true +} + +// HasBrandId returns a boolean if a field has been set. +func (o *MessageTemplate) HasBrandId() bool { + if o != nil && !isNil(o.BrandId) { + return true + } + + return false +} + +// SetBrandId gets a reference to the given int32 and assigns it to the BrandId field. +func (o *MessageTemplate) SetBrandId(v int32) { + o.BrandId = &v +} + +func (o MessageTemplate) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MessageTemplate) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: id is readOnly + // skip: account_id is readOnly + toSerialize["type"] = o.Type + toSerialize["locale"] = o.Locale + toSerialize["template"] = o.Template + // skip: template_class is readOnly + // skip: updated_at is readOnly + // skip: brand_id is readOnly + return toSerialize, nil +} + +type NullableMessageTemplate struct { + value *MessageTemplate + isSet bool +} + +func (v NullableMessageTemplate) Get() *MessageTemplate { + return v.value +} + +func (v *NullableMessageTemplate) Set(val *MessageTemplate) { + v.value = val + v.isSet = true +} + +func (v NullableMessageTemplate) IsSet() bool { + return v.isSet +} + +func (v *NullableMessageTemplate) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMessageTemplate(val *MessageTemplate) *NullableMessageTemplate { + return &NullableMessageTemplate{value: val, isSet: true} +} + +func (v NullableMessageTemplate) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMessageTemplate) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_message_template_template.go b/model_message_template_template.go new file mode 100644 index 0000000..8ed9aaf --- /dev/null +++ b/model_message_template_template.go @@ -0,0 +1,148 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" + "fmt" +) + +// MessageTemplateTemplate - struct for MessageTemplateTemplate +type MessageTemplateTemplate struct { + MessageTemplateTemplateOneOf *MessageTemplateTemplateOneOf + MessageTemplateTemplateOneOf1 *MessageTemplateTemplateOneOf1 +} + +// MessageTemplateTemplateOneOfAsMessageTemplateTemplate is a convenience function that returns MessageTemplateTemplateOneOf wrapped in MessageTemplateTemplate +func MessageTemplateTemplateOneOfAsMessageTemplateTemplate(v *MessageTemplateTemplateOneOf) MessageTemplateTemplate { + return MessageTemplateTemplate{ + MessageTemplateTemplateOneOf: v, + } +} + +// MessageTemplateTemplateOneOf1AsMessageTemplateTemplate is a convenience function that returns MessageTemplateTemplateOneOf1 wrapped in MessageTemplateTemplate +func MessageTemplateTemplateOneOf1AsMessageTemplateTemplate(v *MessageTemplateTemplateOneOf1) MessageTemplateTemplate { + return MessageTemplateTemplate{ + MessageTemplateTemplateOneOf1: v, + } +} + + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *MessageTemplateTemplate) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into MessageTemplateTemplateOneOf + err = newStrictDecoder(data).Decode(&dst.MessageTemplateTemplateOneOf) + if err == nil { + jsonMessageTemplateTemplateOneOf, _ := json.Marshal(dst.MessageTemplateTemplateOneOf) + if string(jsonMessageTemplateTemplateOneOf) == "{}" { // empty struct + dst.MessageTemplateTemplateOneOf = nil + } else { + match++ + } + } else { + dst.MessageTemplateTemplateOneOf = nil + } + + // try to unmarshal data into MessageTemplateTemplateOneOf1 + err = newStrictDecoder(data).Decode(&dst.MessageTemplateTemplateOneOf1) + if err == nil { + jsonMessageTemplateTemplateOneOf1, _ := json.Marshal(dst.MessageTemplateTemplateOneOf1) + if string(jsonMessageTemplateTemplateOneOf1) == "{}" { // empty struct + dst.MessageTemplateTemplateOneOf1 = nil + } else { + match++ + } + } else { + dst.MessageTemplateTemplateOneOf1 = nil + } + + if match > 1 { // more than 1 match + // reset to nil + dst.MessageTemplateTemplateOneOf = nil + dst.MessageTemplateTemplateOneOf1 = nil + + return fmt.Errorf("data matches more than one schema in oneOf(MessageTemplateTemplate)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("data failed to match schemas in oneOf(MessageTemplateTemplate)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src MessageTemplateTemplate) MarshalJSON() ([]byte, error) { + if src.MessageTemplateTemplateOneOf != nil { + return json.Marshal(&src.MessageTemplateTemplateOneOf) + } + + if src.MessageTemplateTemplateOneOf1 != nil { + return json.Marshal(&src.MessageTemplateTemplateOneOf1) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *MessageTemplateTemplate) GetActualInstance() (interface{}) { + if obj == nil { + return nil + } + if obj.MessageTemplateTemplateOneOf != nil { + return obj.MessageTemplateTemplateOneOf + } + + if obj.MessageTemplateTemplateOneOf1 != nil { + return obj.MessageTemplateTemplateOneOf1 + } + + // all schemas are nil + return nil +} + +type NullableMessageTemplateTemplate struct { + value *MessageTemplateTemplate + isSet bool +} + +func (v NullableMessageTemplateTemplate) Get() *MessageTemplateTemplate { + return v.value +} + +func (v *NullableMessageTemplateTemplate) Set(val *MessageTemplateTemplate) { + v.value = val + v.isSet = true +} + +func (v NullableMessageTemplateTemplate) IsSet() bool { + return v.isSet +} + +func (v *NullableMessageTemplateTemplate) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMessageTemplateTemplate(val *MessageTemplateTemplate) *NullableMessageTemplateTemplate { + return &NullableMessageTemplateTemplate{value: val, isSet: true} +} + +func (v NullableMessageTemplateTemplate) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMessageTemplateTemplate) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_message_template_template_one_of.go b/model_message_template_template_one_of.go new file mode 100644 index 0000000..c1857c0 --- /dev/null +++ b/model_message_template_template_one_of.go @@ -0,0 +1,174 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the MessageTemplateTemplateOneOf type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MessageTemplateTemplateOneOf{} + +// MessageTemplateTemplateOneOf struct for MessageTemplateTemplateOneOf +type MessageTemplateTemplateOneOf struct { + // Custom Email Subject + Subject string `json:"subject"` + // The HTML body of the Custom Email + Html string `json:"html"` + // The Plain text body of the email + Plain string `json:"plain"` +} + +// NewMessageTemplateTemplateOneOf instantiates a new MessageTemplateTemplateOneOf 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 NewMessageTemplateTemplateOneOf(subject string, html string, plain string) *MessageTemplateTemplateOneOf { + this := MessageTemplateTemplateOneOf{} + this.Subject = subject + this.Html = html + this.Plain = plain + return &this +} + +// NewMessageTemplateTemplateOneOfWithDefaults instantiates a new MessageTemplateTemplateOneOf 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 NewMessageTemplateTemplateOneOfWithDefaults() *MessageTemplateTemplateOneOf { + this := MessageTemplateTemplateOneOf{} + return &this +} + +// GetSubject returns the Subject field value +func (o *MessageTemplateTemplateOneOf) GetSubject() string { + if o == nil { + var ret string + return ret + } + + return o.Subject +} + +// GetSubjectOk returns a tuple with the Subject field value +// and a boolean to check if the value has been set. +func (o *MessageTemplateTemplateOneOf) GetSubjectOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Subject, true +} + +// SetSubject sets field value +func (o *MessageTemplateTemplateOneOf) SetSubject(v string) { + o.Subject = v +} + +// GetHtml returns the Html field value +func (o *MessageTemplateTemplateOneOf) GetHtml() string { + if o == nil { + var ret string + return ret + } + + return o.Html +} + +// GetHtmlOk returns a tuple with the Html field value +// and a boolean to check if the value has been set. +func (o *MessageTemplateTemplateOneOf) GetHtmlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Html, true +} + +// SetHtml sets field value +func (o *MessageTemplateTemplateOneOf) SetHtml(v string) { + o.Html = v +} + +// GetPlain returns the Plain field value +func (o *MessageTemplateTemplateOneOf) GetPlain() string { + if o == nil { + var ret string + return ret + } + + return o.Plain +} + +// GetPlainOk returns a tuple with the Plain field value +// and a boolean to check if the value has been set. +func (o *MessageTemplateTemplateOneOf) GetPlainOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Plain, true +} + +// SetPlain sets field value +func (o *MessageTemplateTemplateOneOf) SetPlain(v string) { + o.Plain = v +} + +func (o MessageTemplateTemplateOneOf) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MessageTemplateTemplateOneOf) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["subject"] = o.Subject + toSerialize["html"] = o.Html + toSerialize["plain"] = o.Plain + return toSerialize, nil +} + +type NullableMessageTemplateTemplateOneOf struct { + value *MessageTemplateTemplateOneOf + isSet bool +} + +func (v NullableMessageTemplateTemplateOneOf) Get() *MessageTemplateTemplateOneOf { + return v.value +} + +func (v *NullableMessageTemplateTemplateOneOf) Set(val *MessageTemplateTemplateOneOf) { + v.value = val + v.isSet = true +} + +func (v NullableMessageTemplateTemplateOneOf) IsSet() bool { + return v.isSet +} + +func (v *NullableMessageTemplateTemplateOneOf) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMessageTemplateTemplateOneOf(val *MessageTemplateTemplateOneOf) *NullableMessageTemplateTemplateOneOf { + return &NullableMessageTemplateTemplateOneOf{value: val, isSet: true} +} + +func (v NullableMessageTemplateTemplateOneOf) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMessageTemplateTemplateOneOf) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_message_template_template_one_of_1.go b/model_message_template_template_one_of_1.go new file mode 100644 index 0000000..247d557 --- /dev/null +++ b/model_message_template_template_one_of_1.go @@ -0,0 +1,118 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the MessageTemplateTemplateOneOf1 type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MessageTemplateTemplateOneOf1{} + +// MessageTemplateTemplateOneOf1 struct for MessageTemplateTemplateOneOf1 +type MessageTemplateTemplateOneOf1 struct { + // The body of the SMS message. Max length 160 characters. + Message string `json:"message"` +} + +// NewMessageTemplateTemplateOneOf1 instantiates a new MessageTemplateTemplateOneOf1 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 NewMessageTemplateTemplateOneOf1(message string) *MessageTemplateTemplateOneOf1 { + this := MessageTemplateTemplateOneOf1{} + this.Message = message + return &this +} + +// NewMessageTemplateTemplateOneOf1WithDefaults instantiates a new MessageTemplateTemplateOneOf1 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 NewMessageTemplateTemplateOneOf1WithDefaults() *MessageTemplateTemplateOneOf1 { + this := MessageTemplateTemplateOneOf1{} + return &this +} + +// GetMessage returns the Message field value +func (o *MessageTemplateTemplateOneOf1) GetMessage() string { + if o == nil { + var ret string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *MessageTemplateTemplateOneOf1) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Message, true +} + +// SetMessage sets field value +func (o *MessageTemplateTemplateOneOf1) SetMessage(v string) { + o.Message = v +} + +func (o MessageTemplateTemplateOneOf1) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MessageTemplateTemplateOneOf1) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["message"] = o.Message + return toSerialize, nil +} + +type NullableMessageTemplateTemplateOneOf1 struct { + value *MessageTemplateTemplateOneOf1 + isSet bool +} + +func (v NullableMessageTemplateTemplateOneOf1) Get() *MessageTemplateTemplateOneOf1 { + return v.value +} + +func (v *NullableMessageTemplateTemplateOneOf1) Set(val *MessageTemplateTemplateOneOf1) { + v.value = val + v.isSet = true +} + +func (v NullableMessageTemplateTemplateOneOf1) IsSet() bool { + return v.isSet +} + +func (v *NullableMessageTemplateTemplateOneOf1) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMessageTemplateTemplateOneOf1(val *MessageTemplateTemplateOneOf1) *NullableMessageTemplateTemplateOneOf1 { + return &NullableMessageTemplateTemplateOneOf1{value: val, isSet: true} +} + +func (v NullableMessageTemplateTemplateOneOf1) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMessageTemplateTemplateOneOf1) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_oauth_token.go b/model_oauth_token.go new file mode 100644 index 0000000..405700c --- /dev/null +++ b/model_oauth_token.go @@ -0,0 +1,312 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the OauthToken type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OauthToken{} + +// OauthToken struct for OauthToken +type OauthToken struct { + // Provides the requested access token. You can use this token to call our resource APIs. + AccessToken *string `json:"access_token,omitempty"` + // Time at which the access token was generated. + CreatedAt *string `json:"created_at,omitempty"` + // Indicates that the generated access token expires in 36,000 seconds, 600 minutes, or 10 hours. An expired access token cannot be used to make resource API calls, but it can still be used along with its associated refresh token to call the Refresh Tokens v2 API. + ExpiresIn *int32 `json:"expires_in,omitempty"` + // deprecated No longer in use + RefreshToken *string `json:"refresh_token,omitempty"` + // Indicates that the generated access token is a bearer token. + TokenType *string `json:"token_type,omitempty"` + // Account ID associated with the API credentials used to generate the token. + AccountId *int32 `json:"account_id,omitempty"` +} + +// NewOauthToken instantiates a new OauthToken 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 NewOauthToken() *OauthToken { + this := OauthToken{} + return &this +} + +// NewOauthTokenWithDefaults instantiates a new OauthToken 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 NewOauthTokenWithDefaults() *OauthToken { + this := OauthToken{} + return &this +} + +// GetAccessToken returns the AccessToken field value if set, zero value otherwise. +func (o *OauthToken) GetAccessToken() string { + if o == nil || isNil(o.AccessToken) { + var ret string + return ret + } + return *o.AccessToken +} + +// GetAccessTokenOk returns a tuple with the AccessToken field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OauthToken) GetAccessTokenOk() (*string, bool) { + if o == nil || isNil(o.AccessToken) { + return nil, false + } + return o.AccessToken, true +} + +// HasAccessToken returns a boolean if a field has been set. +func (o *OauthToken) HasAccessToken() bool { + if o != nil && !isNil(o.AccessToken) { + return true + } + + return false +} + +// SetAccessToken gets a reference to the given string and assigns it to the AccessToken field. +func (o *OauthToken) SetAccessToken(v string) { + o.AccessToken = &v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *OauthToken) GetCreatedAt() string { + if o == nil || isNil(o.CreatedAt) { + var ret string + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OauthToken) GetCreatedAtOk() (*string, bool) { + if o == nil || isNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *OauthToken) HasCreatedAt() bool { + if o != nil && !isNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given string and assigns it to the CreatedAt field. +func (o *OauthToken) SetCreatedAt(v string) { + o.CreatedAt = &v +} + +// GetExpiresIn returns the ExpiresIn field value if set, zero value otherwise. +func (o *OauthToken) GetExpiresIn() int32 { + if o == nil || isNil(o.ExpiresIn) { + var ret int32 + return ret + } + return *o.ExpiresIn +} + +// GetExpiresInOk returns a tuple with the ExpiresIn field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OauthToken) GetExpiresInOk() (*int32, bool) { + if o == nil || isNil(o.ExpiresIn) { + return nil, false + } + return o.ExpiresIn, true +} + +// HasExpiresIn returns a boolean if a field has been set. +func (o *OauthToken) HasExpiresIn() bool { + if o != nil && !isNil(o.ExpiresIn) { + return true + } + + return false +} + +// SetExpiresIn gets a reference to the given int32 and assigns it to the ExpiresIn field. +func (o *OauthToken) SetExpiresIn(v int32) { + o.ExpiresIn = &v +} + +// GetRefreshToken returns the RefreshToken field value if set, zero value otherwise. +func (o *OauthToken) GetRefreshToken() string { + if o == nil || isNil(o.RefreshToken) { + var ret string + return ret + } + return *o.RefreshToken +} + +// GetRefreshTokenOk returns a tuple with the RefreshToken field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OauthToken) GetRefreshTokenOk() (*string, bool) { + if o == nil || isNil(o.RefreshToken) { + return nil, false + } + return o.RefreshToken, true +} + +// HasRefreshToken returns a boolean if a field has been set. +func (o *OauthToken) HasRefreshToken() bool { + if o != nil && !isNil(o.RefreshToken) { + return true + } + + return false +} + +// SetRefreshToken gets a reference to the given string and assigns it to the RefreshToken field. +func (o *OauthToken) SetRefreshToken(v string) { + o.RefreshToken = &v +} + +// GetTokenType returns the TokenType field value if set, zero value otherwise. +func (o *OauthToken) GetTokenType() string { + if o == nil || isNil(o.TokenType) { + var ret string + return ret + } + return *o.TokenType +} + +// GetTokenTypeOk returns a tuple with the TokenType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OauthToken) GetTokenTypeOk() (*string, bool) { + if o == nil || isNil(o.TokenType) { + return nil, false + } + return o.TokenType, true +} + +// HasTokenType returns a boolean if a field has been set. +func (o *OauthToken) HasTokenType() bool { + if o != nil && !isNil(o.TokenType) { + return true + } + + return false +} + +// SetTokenType gets a reference to the given string and assigns it to the TokenType field. +func (o *OauthToken) SetTokenType(v string) { + o.TokenType = &v +} + +// GetAccountId returns the AccountId field value if set, zero value otherwise. +func (o *OauthToken) GetAccountId() int32 { + if o == nil || isNil(o.AccountId) { + var ret int32 + return ret + } + return *o.AccountId +} + +// GetAccountIdOk returns a tuple with the AccountId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OauthToken) GetAccountIdOk() (*int32, bool) { + if o == nil || isNil(o.AccountId) { + return nil, false + } + return o.AccountId, true +} + +// HasAccountId returns a boolean if a field has been set. +func (o *OauthToken) HasAccountId() bool { + if o != nil && !isNil(o.AccountId) { + return true + } + + return false +} + +// SetAccountId gets a reference to the given int32 and assigns it to the AccountId field. +func (o *OauthToken) SetAccountId(v int32) { + o.AccountId = &v +} + +func (o OauthToken) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o OauthToken) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.AccessToken) { + toSerialize["access_token"] = o.AccessToken + } + if !isNil(o.CreatedAt) { + toSerialize["created_at"] = o.CreatedAt + } + if !isNil(o.ExpiresIn) { + toSerialize["expires_in"] = o.ExpiresIn + } + if !isNil(o.RefreshToken) { + toSerialize["refresh_token"] = o.RefreshToken + } + if !isNil(o.TokenType) { + toSerialize["token_type"] = o.TokenType + } + if !isNil(o.AccountId) { + toSerialize["account_id"] = o.AccountId + } + return toSerialize, nil +} + +type NullableOauthToken struct { + value *OauthToken + isSet bool +} + +func (v NullableOauthToken) Get() *OauthToken { + return v.value +} + +func (v *NullableOauthToken) Set(val *OauthToken) { + v.value = val + v.isSet = true +} + +func (v NullableOauthToken) IsSet() bool { + return v.isSet +} + +func (v *NullableOauthToken) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOauthToken(val *OauthToken) *NullableOauthToken { + return &NullableOauthToken{value: val, isSet: true} +} + +func (v NullableOauthToken) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOauthToken) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_oidc_app.go b/model_oidc_app.go new file mode 100644 index 0000000..94828a2 --- /dev/null +++ b/model_oidc_app.go @@ -0,0 +1,731 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the OidcApp type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OidcApp{} + +// OidcApp struct for OidcApp +type OidcApp struct { + // Apps unique ID in OneLogin. + Id *int32 `json:"id,omitempty"` + // The name of the app. + Name string `json:"name"` + // Indicates if the app is visible in the OneLogin portal. + Visible bool `json:"visible"` + // Freeform description of the app. + Description string `json:"description"` + // Freeform notes about the app. + Notes *string `json:"notes,omitempty"` + // A link to the apps icon url + IconUrl *string `json:"icon_url,omitempty"` + AuthMethod *AuthMethod `json:"auth_method,omitempty"` + // The security policy assigned to the app. + PolicyId int32 `json:"policy_id"` + // Indicates whether or not administrators can access the app as a user that they have assumed control over. + AllowAssumedSignin *bool `json:"allow_assumed_signin,omitempty"` + // ID of the OneLogin portal tab that the app is assigned to. + TabId *int32 `json:"tab_id,omitempty"` + // ID of the connector to base the app from. + ConnectorId int32 `json:"connector_id"` + // the date the app was created + CreatedAt *string `json:"created_at,omitempty"` + // the date the app was last updated + UpdatedAt *string `json:"updated_at,omitempty"` + // List of Role IDs that are assigned to the app. On App Create or Update the entire array is replaced with the values provided. + RoleIds []int32 `json:"role_ids,omitempty"` + Provisioning *GenericAppProvisioning `json:"provisioning,omitempty"` + Parameters *AppParameters `json:"parameters,omitempty"` + EnforcementPoint *EnforcementPoint `json:"enforcement_point,omitempty"` + Configuration ConfigurationOidc `json:"configuration"` + Sso *SsoOidc `json:"sso,omitempty"` +} + +// NewOidcApp instantiates a new OidcApp 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 NewOidcApp(name string, visible bool, description string, policyId int32, connectorId int32, configuration ConfigurationOidc) *OidcApp { + this := OidcApp{} + this.Name = name + this.Visible = visible + this.Description = description + this.PolicyId = policyId + this.ConnectorId = connectorId + this.Configuration = configuration + return &this +} + +// NewOidcAppWithDefaults instantiates a new OidcApp 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 NewOidcAppWithDefaults() *OidcApp { + this := OidcApp{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *OidcApp) GetId() int32 { + if o == nil || isNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OidcApp) GetIdOk() (*int32, bool) { + if o == nil || isNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *OidcApp) HasId() bool { + if o != nil && !isNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *OidcApp) SetId(v int32) { + o.Id = &v +} + +// GetName returns the Name field value +func (o *OidcApp) 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 *OidcApp) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *OidcApp) SetName(v string) { + o.Name = v +} + +// GetVisible returns the Visible field value +func (o *OidcApp) GetVisible() bool { + if o == nil { + var ret bool + return ret + } + + return o.Visible +} + +// GetVisibleOk returns a tuple with the Visible field value +// and a boolean to check if the value has been set. +func (o *OidcApp) GetVisibleOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Visible, true +} + +// SetVisible sets field value +func (o *OidcApp) SetVisible(v bool) { + o.Visible = v +} + +// GetDescription returns the Description field value +func (o *OidcApp) GetDescription() string { + if o == nil { + var ret string + return ret + } + + return o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value +// and a boolean to check if the value has been set. +func (o *OidcApp) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Description, true +} + +// SetDescription sets field value +func (o *OidcApp) SetDescription(v string) { + o.Description = v +} + +// GetNotes returns the Notes field value if set, zero value otherwise. +func (o *OidcApp) GetNotes() string { + if o == nil || isNil(o.Notes) { + var ret string + return ret + } + return *o.Notes +} + +// GetNotesOk returns a tuple with the Notes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OidcApp) GetNotesOk() (*string, bool) { + if o == nil || isNil(o.Notes) { + return nil, false + } + return o.Notes, true +} + +// HasNotes returns a boolean if a field has been set. +func (o *OidcApp) HasNotes() bool { + if o != nil && !isNil(o.Notes) { + return true + } + + return false +} + +// SetNotes gets a reference to the given string and assigns it to the Notes field. +func (o *OidcApp) SetNotes(v string) { + o.Notes = &v +} + +// GetIconUrl returns the IconUrl field value if set, zero value otherwise. +func (o *OidcApp) GetIconUrl() string { + if o == nil || isNil(o.IconUrl) { + var ret string + return ret + } + return *o.IconUrl +} + +// 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 *OidcApp) GetIconUrlOk() (*string, bool) { + if o == nil || isNil(o.IconUrl) { + return nil, false + } + return o.IconUrl, true +} + +// HasIconUrl returns a boolean if a field has been set. +func (o *OidcApp) HasIconUrl() bool { + if o != nil && !isNil(o.IconUrl) { + return true + } + + return false +} + +// SetIconUrl gets a reference to the given string and assigns it to the IconUrl field. +func (o *OidcApp) SetIconUrl(v string) { + o.IconUrl = &v +} + +// GetAuthMethod returns the AuthMethod field value if set, zero value otherwise. +func (o *OidcApp) GetAuthMethod() AuthMethod { + if o == nil || isNil(o.AuthMethod) { + var ret AuthMethod + return ret + } + return *o.AuthMethod +} + +// GetAuthMethodOk returns a tuple with the AuthMethod field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OidcApp) GetAuthMethodOk() (*AuthMethod, bool) { + if o == nil || isNil(o.AuthMethod) { + return nil, false + } + return o.AuthMethod, true +} + +// HasAuthMethod returns a boolean if a field has been set. +func (o *OidcApp) HasAuthMethod() bool { + if o != nil && !isNil(o.AuthMethod) { + return true + } + + return false +} + +// SetAuthMethod gets a reference to the given AuthMethod and assigns it to the AuthMethod field. +func (o *OidcApp) SetAuthMethod(v AuthMethod) { + o.AuthMethod = &v +} + +// GetPolicyId returns the PolicyId field value +func (o *OidcApp) GetPolicyId() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.PolicyId +} + +// GetPolicyIdOk returns a tuple with the PolicyId field value +// and a boolean to check if the value has been set. +func (o *OidcApp) GetPolicyIdOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.PolicyId, true +} + +// SetPolicyId sets field value +func (o *OidcApp) SetPolicyId(v int32) { + o.PolicyId = v +} + +// GetAllowAssumedSignin returns the AllowAssumedSignin field value if set, zero value otherwise. +func (o *OidcApp) GetAllowAssumedSignin() bool { + if o == nil || isNil(o.AllowAssumedSignin) { + var ret bool + return ret + } + return *o.AllowAssumedSignin +} + +// GetAllowAssumedSigninOk returns a tuple with the AllowAssumedSignin field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OidcApp) GetAllowAssumedSigninOk() (*bool, bool) { + if o == nil || isNil(o.AllowAssumedSignin) { + return nil, false + } + return o.AllowAssumedSignin, true +} + +// HasAllowAssumedSignin returns a boolean if a field has been set. +func (o *OidcApp) HasAllowAssumedSignin() bool { + if o != nil && !isNil(o.AllowAssumedSignin) { + return true + } + + return false +} + +// SetAllowAssumedSignin gets a reference to the given bool and assigns it to the AllowAssumedSignin field. +func (o *OidcApp) SetAllowAssumedSignin(v bool) { + o.AllowAssumedSignin = &v +} + +// GetTabId returns the TabId field value if set, zero value otherwise. +func (o *OidcApp) GetTabId() int32 { + if o == nil || isNil(o.TabId) { + var ret int32 + return ret + } + return *o.TabId +} + +// GetTabIdOk returns a tuple with the TabId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OidcApp) GetTabIdOk() (*int32, bool) { + if o == nil || isNil(o.TabId) { + return nil, false + } + return o.TabId, true +} + +// HasTabId returns a boolean if a field has been set. +func (o *OidcApp) HasTabId() bool { + if o != nil && !isNil(o.TabId) { + return true + } + + return false +} + +// SetTabId gets a reference to the given int32 and assigns it to the TabId field. +func (o *OidcApp) SetTabId(v int32) { + o.TabId = &v +} + +// GetConnectorId returns the ConnectorId field value +func (o *OidcApp) GetConnectorId() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.ConnectorId +} + +// GetConnectorIdOk returns a tuple with the ConnectorId field value +// and a boolean to check if the value has been set. +func (o *OidcApp) GetConnectorIdOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.ConnectorId, true +} + +// SetConnectorId sets field value +func (o *OidcApp) SetConnectorId(v int32) { + o.ConnectorId = v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *OidcApp) GetCreatedAt() string { + if o == nil || isNil(o.CreatedAt) { + var ret string + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OidcApp) GetCreatedAtOk() (*string, bool) { + if o == nil || isNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *OidcApp) HasCreatedAt() bool { + if o != nil && !isNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given string and assigns it to the CreatedAt field. +func (o *OidcApp) SetCreatedAt(v string) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *OidcApp) GetUpdatedAt() string { + if o == nil || isNil(o.UpdatedAt) { + var ret string + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OidcApp) GetUpdatedAtOk() (*string, bool) { + if o == nil || isNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *OidcApp) HasUpdatedAt() bool { + if o != nil && !isNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given string and assigns it to the UpdatedAt field. +func (o *OidcApp) SetUpdatedAt(v string) { + o.UpdatedAt = &v +} + +// GetRoleIds returns the RoleIds field value if set, zero value otherwise. +func (o *OidcApp) GetRoleIds() []int32 { + if o == nil || isNil(o.RoleIds) { + var ret []int32 + return ret + } + return o.RoleIds +} + +// GetRoleIdsOk returns a tuple with the RoleIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OidcApp) GetRoleIdsOk() ([]int32, bool) { + if o == nil || isNil(o.RoleIds) { + return nil, false + } + return o.RoleIds, true +} + +// HasRoleIds returns a boolean if a field has been set. +func (o *OidcApp) HasRoleIds() bool { + if o != nil && !isNil(o.RoleIds) { + return true + } + + return false +} + +// SetRoleIds gets a reference to the given []int32 and assigns it to the RoleIds field. +func (o *OidcApp) SetRoleIds(v []int32) { + o.RoleIds = v +} + +// GetProvisioning returns the Provisioning field value if set, zero value otherwise. +func (o *OidcApp) GetProvisioning() GenericAppProvisioning { + if o == nil || isNil(o.Provisioning) { + var ret GenericAppProvisioning + return ret + } + return *o.Provisioning +} + +// GetProvisioningOk returns a tuple with the Provisioning field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OidcApp) GetProvisioningOk() (*GenericAppProvisioning, bool) { + if o == nil || isNil(o.Provisioning) { + return nil, false + } + return o.Provisioning, true +} + +// HasProvisioning returns a boolean if a field has been set. +func (o *OidcApp) HasProvisioning() bool { + if o != nil && !isNil(o.Provisioning) { + return true + } + + return false +} + +// SetProvisioning gets a reference to the given GenericAppProvisioning and assigns it to the Provisioning field. +func (o *OidcApp) SetProvisioning(v GenericAppProvisioning) { + o.Provisioning = &v +} + +// GetParameters returns the Parameters field value if set, zero value otherwise. +func (o *OidcApp) GetParameters() AppParameters { + if o == nil || isNil(o.Parameters) { + var ret AppParameters + return ret + } + return *o.Parameters +} + +// GetParametersOk returns a tuple with the Parameters field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OidcApp) GetParametersOk() (*AppParameters, bool) { + if o == nil || isNil(o.Parameters) { + return nil, false + } + return o.Parameters, true +} + +// HasParameters returns a boolean if a field has been set. +func (o *OidcApp) HasParameters() bool { + if o != nil && !isNil(o.Parameters) { + return true + } + + return false +} + +// SetParameters gets a reference to the given AppParameters and assigns it to the Parameters field. +func (o *OidcApp) SetParameters(v AppParameters) { + o.Parameters = &v +} + +// GetEnforcementPoint returns the EnforcementPoint field value if set, zero value otherwise. +func (o *OidcApp) GetEnforcementPoint() EnforcementPoint { + if o == nil || isNil(o.EnforcementPoint) { + var ret EnforcementPoint + return ret + } + return *o.EnforcementPoint +} + +// GetEnforcementPointOk returns a tuple with the EnforcementPoint field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OidcApp) GetEnforcementPointOk() (*EnforcementPoint, bool) { + if o == nil || isNil(o.EnforcementPoint) { + return nil, false + } + return o.EnforcementPoint, true +} + +// HasEnforcementPoint returns a boolean if a field has been set. +func (o *OidcApp) HasEnforcementPoint() bool { + if o != nil && !isNil(o.EnforcementPoint) { + return true + } + + return false +} + +// SetEnforcementPoint gets a reference to the given EnforcementPoint and assigns it to the EnforcementPoint field. +func (o *OidcApp) SetEnforcementPoint(v EnforcementPoint) { + o.EnforcementPoint = &v +} + +// GetConfiguration returns the Configuration field value +func (o *OidcApp) GetConfiguration() ConfigurationOidc { + if o == nil { + var ret ConfigurationOidc + return ret + } + + return o.Configuration +} + +// GetConfigurationOk returns a tuple with the Configuration field value +// and a boolean to check if the value has been set. +func (o *OidcApp) GetConfigurationOk() (*ConfigurationOidc, bool) { + if o == nil { + return nil, false + } + return &o.Configuration, true +} + +// SetConfiguration sets field value +func (o *OidcApp) SetConfiguration(v ConfigurationOidc) { + o.Configuration = v +} + +// GetSso returns the Sso field value if set, zero value otherwise. +func (o *OidcApp) GetSso() SsoOidc { + if o == nil || isNil(o.Sso) { + var ret SsoOidc + return ret + } + return *o.Sso +} + +// GetSsoOk returns a tuple with the Sso field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OidcApp) GetSsoOk() (*SsoOidc, bool) { + if o == nil || isNil(o.Sso) { + return nil, false + } + return o.Sso, true +} + +// HasSso returns a boolean if a field has been set. +func (o *OidcApp) HasSso() bool { + if o != nil && !isNil(o.Sso) { + return true + } + + return false +} + +// SetSso gets a reference to the given SsoOidc and assigns it to the Sso field. +func (o *OidcApp) SetSso(v SsoOidc) { + o.Sso = &v +} + +func (o OidcApp) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o OidcApp) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: id is readOnly + toSerialize["name"] = o.Name + toSerialize["visible"] = o.Visible + toSerialize["description"] = o.Description + if !isNil(o.Notes) { + toSerialize["notes"] = o.Notes + } + if !isNil(o.IconUrl) { + toSerialize["icon_url"] = o.IconUrl + } + if !isNil(o.AuthMethod) { + toSerialize["auth_method"] = o.AuthMethod + } + toSerialize["policy_id"] = o.PolicyId + if !isNil(o.AllowAssumedSignin) { + toSerialize["allow_assumed_signin"] = o.AllowAssumedSignin + } + if !isNil(o.TabId) { + toSerialize["tab_id"] = o.TabId + } + toSerialize["connector_id"] = o.ConnectorId + if !isNil(o.CreatedAt) { + toSerialize["created_at"] = o.CreatedAt + } + if !isNil(o.UpdatedAt) { + toSerialize["updated_at"] = o.UpdatedAt + } + if !isNil(o.RoleIds) { + toSerialize["role_ids"] = o.RoleIds + } + if !isNil(o.Provisioning) { + toSerialize["provisioning"] = o.Provisioning + } + if !isNil(o.Parameters) { + toSerialize["parameters"] = o.Parameters + } + if !isNil(o.EnforcementPoint) { + toSerialize["enforcement_point"] = o.EnforcementPoint + } + toSerialize["configuration"] = o.Configuration + if !isNil(o.Sso) { + toSerialize["sso"] = o.Sso + } + return toSerialize, nil +} + +type NullableOidcApp struct { + value *OidcApp + isSet bool +} + +func (v NullableOidcApp) Get() *OidcApp { + return v.value +} + +func (v *NullableOidcApp) Set(val *OidcApp) { + v.value = val + v.isSet = true +} + +func (v NullableOidcApp) IsSet() bool { + return v.isSet +} + +func (v *NullableOidcApp) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOidcApp(val *OidcApp) *NullableOidcApp { + return &NullableOidcApp{value: val, isSet: true} +} + +func (v NullableOidcApp) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOidcApp) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_oidc_app_all_of.go b/model_oidc_app_all_of.go new file mode 100644 index 0000000..ad3795d --- /dev/null +++ b/model_oidc_app_all_of.go @@ -0,0 +1,153 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the OidcAppAllOf type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OidcAppAllOf{} + +// OidcAppAllOf struct for OidcAppAllOf +type OidcAppAllOf struct { + Configuration ConfigurationOidc `json:"configuration"` + Sso *SsoOidc `json:"sso,omitempty"` +} + +// NewOidcAppAllOf instantiates a new OidcAppAllOf 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 NewOidcAppAllOf(configuration ConfigurationOidc) *OidcAppAllOf { + this := OidcAppAllOf{} + this.Configuration = configuration + return &this +} + +// NewOidcAppAllOfWithDefaults instantiates a new OidcAppAllOf 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 NewOidcAppAllOfWithDefaults() *OidcAppAllOf { + this := OidcAppAllOf{} + return &this +} + +// GetConfiguration returns the Configuration field value +func (o *OidcAppAllOf) GetConfiguration() ConfigurationOidc { + if o == nil { + var ret ConfigurationOidc + return ret + } + + return o.Configuration +} + +// GetConfigurationOk returns a tuple with the Configuration field value +// and a boolean to check if the value has been set. +func (o *OidcAppAllOf) GetConfigurationOk() (*ConfigurationOidc, bool) { + if o == nil { + return nil, false + } + return &o.Configuration, true +} + +// SetConfiguration sets field value +func (o *OidcAppAllOf) SetConfiguration(v ConfigurationOidc) { + o.Configuration = v +} + +// GetSso returns the Sso field value if set, zero value otherwise. +func (o *OidcAppAllOf) GetSso() SsoOidc { + if o == nil || isNil(o.Sso) { + var ret SsoOidc + return ret + } + return *o.Sso +} + +// GetSsoOk returns a tuple with the Sso field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OidcAppAllOf) GetSsoOk() (*SsoOidc, bool) { + if o == nil || isNil(o.Sso) { + return nil, false + } + return o.Sso, true +} + +// HasSso returns a boolean if a field has been set. +func (o *OidcAppAllOf) HasSso() bool { + if o != nil && !isNil(o.Sso) { + return true + } + + return false +} + +// SetSso gets a reference to the given SsoOidc and assigns it to the Sso field. +func (o *OidcAppAllOf) SetSso(v SsoOidc) { + o.Sso = &v +} + +func (o OidcAppAllOf) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o OidcAppAllOf) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["configuration"] = o.Configuration + if !isNil(o.Sso) { + toSerialize["sso"] = o.Sso + } + return toSerialize, nil +} + +type NullableOidcAppAllOf struct { + value *OidcAppAllOf + isSet bool +} + +func (v NullableOidcAppAllOf) Get() *OidcAppAllOf { + return v.value +} + +func (v *NullableOidcAppAllOf) Set(val *OidcAppAllOf) { + v.value = val + v.isSet = true +} + +func (v NullableOidcAppAllOf) IsSet() bool { + return v.isSet +} + +func (v *NullableOidcAppAllOf) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOidcAppAllOf(val *OidcAppAllOf) *NullableOidcAppAllOf { + return &NullableOidcAppAllOf{value: val, isSet: true} +} + +func (v NullableOidcAppAllOf) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOidcAppAllOf) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_otp_device.go b/model_otp_device.go new file mode 100644 index 0000000..dc8cf5a --- /dev/null +++ b/model_otp_device.go @@ -0,0 +1,211 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the OtpDevice type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OtpDevice{} + +// OtpDevice struct for OtpDevice +type OtpDevice struct { + // The identifier of the factor to enroll the user with. + FactorId int32 `json:"factor_id"` + // A name for the users device + DisplayName string `json:"display_name"` + // The phone number of the user in E.164 format. + Number string `json:"number"` + // Defaults to false. Some factors like SMS or Voice require that a user recieve a token and then that token is supplied to the Verify endpoint before the device is considered active. You can set verfied to `true` which indicates the the users phone number is pre verified and the device can be immediately activated. + Verified *bool `json:"verified,omitempty"` +} + +// NewOtpDevice instantiates a new OtpDevice 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 NewOtpDevice(factorId int32, displayName string, number string) *OtpDevice { + this := OtpDevice{} + this.FactorId = factorId + this.DisplayName = displayName + this.Number = number + return &this +} + +// NewOtpDeviceWithDefaults instantiates a new OtpDevice 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 NewOtpDeviceWithDefaults() *OtpDevice { + this := OtpDevice{} + return &this +} + +// GetFactorId returns the FactorId field value +func (o *OtpDevice) GetFactorId() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.FactorId +} + +// GetFactorIdOk returns a tuple with the FactorId field value +// and a boolean to check if the value has been set. +func (o *OtpDevice) GetFactorIdOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.FactorId, true +} + +// SetFactorId sets field value +func (o *OtpDevice) SetFactorId(v int32) { + o.FactorId = v +} + +// GetDisplayName returns the DisplayName field value +func (o *OtpDevice) GetDisplayName() string { + if o == nil { + var ret string + return ret + } + + return o.DisplayName +} + +// GetDisplayNameOk returns a tuple with the DisplayName field value +// and a boolean to check if the value has been set. +func (o *OtpDevice) GetDisplayNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DisplayName, true +} + +// SetDisplayName sets field value +func (o *OtpDevice) SetDisplayName(v string) { + o.DisplayName = v +} + +// GetNumber returns the Number field value +func (o *OtpDevice) GetNumber() string { + if o == nil { + var ret string + return ret + } + + return o.Number +} + +// GetNumberOk returns a tuple with the Number field value +// and a boolean to check if the value has been set. +func (o *OtpDevice) GetNumberOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Number, true +} + +// SetNumber sets field value +func (o *OtpDevice) SetNumber(v string) { + o.Number = v +} + +// GetVerified returns the Verified field value if set, zero value otherwise. +func (o *OtpDevice) GetVerified() bool { + if o == nil || isNil(o.Verified) { + var ret bool + return ret + } + return *o.Verified +} + +// GetVerifiedOk returns a tuple with the Verified field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OtpDevice) GetVerifiedOk() (*bool, bool) { + if o == nil || isNil(o.Verified) { + return nil, false + } + return o.Verified, true +} + +// HasVerified returns a boolean if a field has been set. +func (o *OtpDevice) HasVerified() bool { + if o != nil && !isNil(o.Verified) { + return true + } + + return false +} + +// SetVerified gets a reference to the given bool and assigns it to the Verified field. +func (o *OtpDevice) SetVerified(v bool) { + o.Verified = &v +} + +func (o OtpDevice) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o OtpDevice) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: factor_id is readOnly + toSerialize["display_name"] = o.DisplayName + toSerialize["number"] = o.Number + if !isNil(o.Verified) { + toSerialize["verified"] = o.Verified + } + return toSerialize, nil +} + +type NullableOtpDevice struct { + value *OtpDevice + isSet bool +} + +func (v NullableOtpDevice) Get() *OtpDevice { + return v.value +} + +func (v *NullableOtpDevice) Set(val *OtpDevice) { + v.value = val + v.isSet = true +} + +func (v NullableOtpDevice) IsSet() bool { + return v.isSet +} + +func (v *NullableOtpDevice) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOtpDevice(val *OtpDevice) *NullableOtpDevice { + return &NullableOtpDevice{value: val, isSet: true} +} + +func (v NullableOtpDevice) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOtpDevice) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_privilege.go b/model_privilege.go new file mode 100644 index 0000000..f5707c3 --- /dev/null +++ b/model_privilege.go @@ -0,0 +1,216 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the Privilege type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Privilege{} + +// Privilege struct for Privilege +type Privilege struct { + Id *string `json:"id,omitempty"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Privilege PrivilegePrivilege `json:"privilege"` +} + +// NewPrivilege instantiates a new Privilege 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 NewPrivilege(name string, privilege PrivilegePrivilege) *Privilege { + this := Privilege{} + this.Name = name + this.Privilege = privilege + return &this +} + +// NewPrivilegeWithDefaults instantiates a new Privilege 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 NewPrivilegeWithDefaults() *Privilege { + this := Privilege{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *Privilege) GetId() string { + if o == nil || isNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Privilege) GetIdOk() (*string, bool) { + if o == nil || isNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *Privilege) HasId() bool { + if o != nil && !isNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *Privilege) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value +func (o *Privilege) 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 *Privilege) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *Privilege) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *Privilege) GetDescription() string { + if o == nil || isNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// 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 *Privilege) GetDescriptionOk() (*string, bool) { + if o == nil || isNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *Privilege) HasDescription() bool { + if o != nil && !isNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *Privilege) SetDescription(v string) { + o.Description = &v +} + +// GetPrivilege returns the Privilege field value +func (o *Privilege) GetPrivilege() PrivilegePrivilege { + if o == nil { + var ret PrivilegePrivilege + return ret + } + + return o.Privilege +} + +// GetPrivilegeOk returns a tuple with the Privilege field value +// and a boolean to check if the value has been set. +func (o *Privilege) GetPrivilegeOk() (*PrivilegePrivilege, bool) { + if o == nil { + return nil, false + } + return &o.Privilege, true +} + +// SetPrivilege sets field value +func (o *Privilege) SetPrivilege(v PrivilegePrivilege) { + o.Privilege = v +} + +func (o Privilege) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Privilege) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.Id) { + toSerialize["id"] = o.Id + } + toSerialize["name"] = o.Name + if !isNil(o.Description) { + toSerialize["description"] = o.Description + } + toSerialize["privilege"] = o.Privilege + return toSerialize, nil +} + +type NullablePrivilege struct { + value *Privilege + isSet bool +} + +func (v NullablePrivilege) Get() *Privilege { + return v.value +} + +func (v *NullablePrivilege) Set(val *Privilege) { + v.value = val + v.isSet = true +} + +func (v NullablePrivilege) IsSet() bool { + return v.isSet +} + +func (v *NullablePrivilege) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePrivilege(val *Privilege) *NullablePrivilege { + return &NullablePrivilege{value: val, isSet: true} +} + +func (v NullablePrivilege) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePrivilege) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_privilege_privilege.go b/model_privilege_privilege.go new file mode 100644 index 0000000..eaef0ea --- /dev/null +++ b/model_privilege_privilege.go @@ -0,0 +1,162 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the PrivilegePrivilege type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PrivilegePrivilege{} + +// PrivilegePrivilege struct for PrivilegePrivilege +type PrivilegePrivilege struct { + Version *string `json:"Version,omitempty"` + Statement []PrivilegePrivilegeStatementInner `json:"Statement,omitempty"` +} + +// NewPrivilegePrivilege instantiates a new PrivilegePrivilege 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 NewPrivilegePrivilege() *PrivilegePrivilege { + this := PrivilegePrivilege{} + return &this +} + +// NewPrivilegePrivilegeWithDefaults instantiates a new PrivilegePrivilege 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 NewPrivilegePrivilegeWithDefaults() *PrivilegePrivilege { + this := PrivilegePrivilege{} + return &this +} + +// GetVersion returns the Version field value if set, zero value otherwise. +func (o *PrivilegePrivilege) GetVersion() string { + if o == nil || isNil(o.Version) { + var ret string + return ret + } + return *o.Version +} + +// GetVersionOk returns a tuple with the Version field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PrivilegePrivilege) GetVersionOk() (*string, bool) { + if o == nil || isNil(o.Version) { + return nil, false + } + return o.Version, true +} + +// HasVersion returns a boolean if a field has been set. +func (o *PrivilegePrivilege) HasVersion() bool { + if o != nil && !isNil(o.Version) { + return true + } + + return false +} + +// SetVersion gets a reference to the given string and assigns it to the Version field. +func (o *PrivilegePrivilege) SetVersion(v string) { + o.Version = &v +} + +// GetStatement returns the Statement field value if set, zero value otherwise. +func (o *PrivilegePrivilege) GetStatement() []PrivilegePrivilegeStatementInner { + if o == nil || isNil(o.Statement) { + var ret []PrivilegePrivilegeStatementInner + return ret + } + return o.Statement +} + +// GetStatementOk returns a tuple with the Statement field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PrivilegePrivilege) GetStatementOk() ([]PrivilegePrivilegeStatementInner, bool) { + if o == nil || isNil(o.Statement) { + return nil, false + } + return o.Statement, true +} + +// HasStatement returns a boolean if a field has been set. +func (o *PrivilegePrivilege) HasStatement() bool { + if o != nil && !isNil(o.Statement) { + return true + } + + return false +} + +// SetStatement gets a reference to the given []PrivilegePrivilegeStatementInner and assigns it to the Statement field. +func (o *PrivilegePrivilege) SetStatement(v []PrivilegePrivilegeStatementInner) { + o.Statement = v +} + +func (o PrivilegePrivilege) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PrivilegePrivilege) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.Version) { + toSerialize["Version"] = o.Version + } + if !isNil(o.Statement) { + toSerialize["Statement"] = o.Statement + } + return toSerialize, nil +} + +type NullablePrivilegePrivilege struct { + value *PrivilegePrivilege + isSet bool +} + +func (v NullablePrivilegePrivilege) Get() *PrivilegePrivilege { + return v.value +} + +func (v *NullablePrivilegePrivilege) Set(val *PrivilegePrivilege) { + v.value = val + v.isSet = true +} + +func (v NullablePrivilegePrivilege) IsSet() bool { + return v.isSet +} + +func (v *NullablePrivilegePrivilege) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePrivilegePrivilege(val *PrivilegePrivilege) *NullablePrivilegePrivilege { + return &NullablePrivilegePrivilege{value: val, isSet: true} +} + +func (v NullablePrivilegePrivilege) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePrivilegePrivilege) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_privilege_privilege_statement_inner.go b/model_privilege_privilege_statement_inner.go new file mode 100644 index 0000000..fc5bdc9 --- /dev/null +++ b/model_privilege_privilege_statement_inner.go @@ -0,0 +1,174 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the PrivilegePrivilegeStatementInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PrivilegePrivilegeStatementInner{} + +// PrivilegePrivilegeStatementInner struct for PrivilegePrivilegeStatementInner +type PrivilegePrivilegeStatementInner struct { + // Set to “Allow.” By default, all actions are denied, this Statement allows the listed actions to be executed. + Effect string `json:"Effect"` + // An array of strings that represent actions within OneLogin. Actions are prefixed with the class of object they are related to and followed by a specific action for the given class. e.g. users:List, where the class is users and the specific action is List. Don’t mix classes within an Action array. To create a privilege that includes multiple different classes, create multiple statements. A wildcard * that includes all actions is supported. Use wildcards to create a Super User privilege. + Action []string `json:"Action"` + // Target the privileged action against specific resources with the scope. The scope pattern is the class of object used by the Action, followed by an ID that represents a resource in OneLogin. e.g. apps/1234, where apps is the class and 1234 is the ID of an app. The wildcard * is supported and indicates that all resources of the class type declared, in the Action, are in scope. The Action and Scope classes must match. However, there is an exception, a scope of roles/{role_id} can be combined with Actions on the user or app class. The exception allows you to target groups of users or apps with specific actions. + Scope []string `json:"Scope"` +} + +// NewPrivilegePrivilegeStatementInner instantiates a new PrivilegePrivilegeStatementInner 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 NewPrivilegePrivilegeStatementInner(effect string, action []string, scope []string) *PrivilegePrivilegeStatementInner { + this := PrivilegePrivilegeStatementInner{} + this.Effect = effect + this.Action = action + this.Scope = scope + return &this +} + +// NewPrivilegePrivilegeStatementInnerWithDefaults instantiates a new PrivilegePrivilegeStatementInner 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 NewPrivilegePrivilegeStatementInnerWithDefaults() *PrivilegePrivilegeStatementInner { + this := PrivilegePrivilegeStatementInner{} + return &this +} + +// GetEffect returns the Effect field value +func (o *PrivilegePrivilegeStatementInner) GetEffect() string { + if o == nil { + var ret string + return ret + } + + return o.Effect +} + +// GetEffectOk returns a tuple with the Effect field value +// and a boolean to check if the value has been set. +func (o *PrivilegePrivilegeStatementInner) GetEffectOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Effect, true +} + +// SetEffect sets field value +func (o *PrivilegePrivilegeStatementInner) SetEffect(v string) { + o.Effect = v +} + +// GetAction returns the Action field value +func (o *PrivilegePrivilegeStatementInner) GetAction() []string { + if o == nil { + var ret []string + return ret + } + + return o.Action +} + +// GetActionOk returns a tuple with the Action field value +// and a boolean to check if the value has been set. +func (o *PrivilegePrivilegeStatementInner) GetActionOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Action, true +} + +// SetAction sets field value +func (o *PrivilegePrivilegeStatementInner) SetAction(v []string) { + o.Action = v +} + +// GetScope returns the Scope field value +func (o *PrivilegePrivilegeStatementInner) GetScope() []string { + if o == nil { + var ret []string + return ret + } + + return o.Scope +} + +// GetScopeOk returns a tuple with the Scope field value +// and a boolean to check if the value has been set. +func (o *PrivilegePrivilegeStatementInner) GetScopeOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Scope, true +} + +// SetScope sets field value +func (o *PrivilegePrivilegeStatementInner) SetScope(v []string) { + o.Scope = v +} + +func (o PrivilegePrivilegeStatementInner) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PrivilegePrivilegeStatementInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["Effect"] = o.Effect + toSerialize["Action"] = o.Action + toSerialize["Scope"] = o.Scope + return toSerialize, nil +} + +type NullablePrivilegePrivilegeStatementInner struct { + value *PrivilegePrivilegeStatementInner + isSet bool +} + +func (v NullablePrivilegePrivilegeStatementInner) Get() *PrivilegePrivilegeStatementInner { + return v.value +} + +func (v *NullablePrivilegePrivilegeStatementInner) Set(val *PrivilegePrivilegeStatementInner) { + v.value = val + v.isSet = true +} + +func (v NullablePrivilegePrivilegeStatementInner) IsSet() bool { + return v.isSet +} + +func (v *NullablePrivilegePrivilegeStatementInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePrivilegePrivilegeStatementInner(val *PrivilegePrivilegeStatementInner) *NullablePrivilegePrivilegeStatementInner { + return &NullablePrivilegePrivilegeStatementInner{value: val, isSet: true} +} + +func (v NullablePrivilegePrivilegeStatementInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePrivilegePrivilegeStatementInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_get_rate_limit_200_response_data.go b/model_rate_limit.go similarity index 52% rename from model_get_rate_limit_200_response_data.go rename to model_rate_limit.go index ffa0310..3b93acd 100644 --- a/model_get_rate_limit_200_response_data.go +++ b/model_rate_limit.go @@ -1,46 +1,52 @@ /* OneLogin API -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) +OpenAPI Specification for OneLogin -API version: 3.0.0-alpha.1 +API version: 3.1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package openapi +package onelogin import ( "encoding/json" ) -// GetRateLimit200ResponseData struct for GetRateLimit200ResponseData -type GetRateLimit200ResponseData struct { +// checks if the RateLimit type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RateLimit{} + +// RateLimit struct for RateLimit +type RateLimit struct { + // Rate Limit Limit XRateLimitLimit *int32 `json:"X-RateLimit-Limit,omitempty"` + // Rate Limit Remaining XRateLimitRemaining *int32 `json:"X-RateLimit-Remaining,omitempty"` + // Rate Limit Reset XRateLimitReset *int32 `json:"X-RateLimit-Reset,omitempty"` } -// NewGetRateLimit200ResponseData instantiates a new GetRateLimit200ResponseData object +// NewRateLimit instantiates a new RateLimit 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 NewGetRateLimit200ResponseData() *GetRateLimit200ResponseData { - this := GetRateLimit200ResponseData{} +func NewRateLimit() *RateLimit { + this := RateLimit{} return &this } -// NewGetRateLimit200ResponseDataWithDefaults instantiates a new GetRateLimit200ResponseData object +// NewRateLimitWithDefaults instantiates a new RateLimit 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 NewGetRateLimit200ResponseDataWithDefaults() *GetRateLimit200ResponseData { - this := GetRateLimit200ResponseData{} +func NewRateLimitWithDefaults() *RateLimit { + this := RateLimit{} return &this } // GetXRateLimitLimit returns the XRateLimitLimit field value if set, zero value otherwise. -func (o *GetRateLimit200ResponseData) GetXRateLimitLimit() int32 { - if o == nil || o.XRateLimitLimit == nil { +func (o *RateLimit) GetXRateLimitLimit() int32 { + if o == nil || isNil(o.XRateLimitLimit) { var ret int32 return ret } @@ -49,16 +55,16 @@ func (o *GetRateLimit200ResponseData) GetXRateLimitLimit() int32 { // GetXRateLimitLimitOk returns a tuple with the XRateLimitLimit field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *GetRateLimit200ResponseData) GetXRateLimitLimitOk() (*int32, bool) { - if o == nil || o.XRateLimitLimit == nil { +func (o *RateLimit) GetXRateLimitLimitOk() (*int32, bool) { + if o == nil || isNil(o.XRateLimitLimit) { return nil, false } return o.XRateLimitLimit, true } // HasXRateLimitLimit returns a boolean if a field has been set. -func (o *GetRateLimit200ResponseData) HasXRateLimitLimit() bool { - if o != nil && o.XRateLimitLimit != nil { +func (o *RateLimit) HasXRateLimitLimit() bool { + if o != nil && !isNil(o.XRateLimitLimit) { return true } @@ -66,13 +72,13 @@ func (o *GetRateLimit200ResponseData) HasXRateLimitLimit() bool { } // SetXRateLimitLimit gets a reference to the given int32 and assigns it to the XRateLimitLimit field. -func (o *GetRateLimit200ResponseData) SetXRateLimitLimit(v int32) { +func (o *RateLimit) SetXRateLimitLimit(v int32) { o.XRateLimitLimit = &v } // GetXRateLimitRemaining returns the XRateLimitRemaining field value if set, zero value otherwise. -func (o *GetRateLimit200ResponseData) GetXRateLimitRemaining() int32 { - if o == nil || o.XRateLimitRemaining == nil { +func (o *RateLimit) GetXRateLimitRemaining() int32 { + if o == nil || isNil(o.XRateLimitRemaining) { var ret int32 return ret } @@ -81,16 +87,16 @@ func (o *GetRateLimit200ResponseData) GetXRateLimitRemaining() int32 { // GetXRateLimitRemainingOk returns a tuple with the XRateLimitRemaining field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *GetRateLimit200ResponseData) GetXRateLimitRemainingOk() (*int32, bool) { - if o == nil || o.XRateLimitRemaining == nil { +func (o *RateLimit) GetXRateLimitRemainingOk() (*int32, bool) { + if o == nil || isNil(o.XRateLimitRemaining) { return nil, false } return o.XRateLimitRemaining, true } // HasXRateLimitRemaining returns a boolean if a field has been set. -func (o *GetRateLimit200ResponseData) HasXRateLimitRemaining() bool { - if o != nil && o.XRateLimitRemaining != nil { +func (o *RateLimit) HasXRateLimitRemaining() bool { + if o != nil && !isNil(o.XRateLimitRemaining) { return true } @@ -98,13 +104,13 @@ func (o *GetRateLimit200ResponseData) HasXRateLimitRemaining() bool { } // SetXRateLimitRemaining gets a reference to the given int32 and assigns it to the XRateLimitRemaining field. -func (o *GetRateLimit200ResponseData) SetXRateLimitRemaining(v int32) { +func (o *RateLimit) SetXRateLimitRemaining(v int32) { o.XRateLimitRemaining = &v } // GetXRateLimitReset returns the XRateLimitReset field value if set, zero value otherwise. -func (o *GetRateLimit200ResponseData) GetXRateLimitReset() int32 { - if o == nil || o.XRateLimitReset == nil { +func (o *RateLimit) GetXRateLimitReset() int32 { + if o == nil || isNil(o.XRateLimitReset) { var ret int32 return ret } @@ -113,16 +119,16 @@ func (o *GetRateLimit200ResponseData) GetXRateLimitReset() int32 { // GetXRateLimitResetOk returns a tuple with the XRateLimitReset field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *GetRateLimit200ResponseData) GetXRateLimitResetOk() (*int32, bool) { - if o == nil || o.XRateLimitReset == nil { +func (o *RateLimit) GetXRateLimitResetOk() (*int32, bool) { + if o == nil || isNil(o.XRateLimitReset) { return nil, false } return o.XRateLimitReset, true } // HasXRateLimitReset returns a boolean if a field has been set. -func (o *GetRateLimit200ResponseData) HasXRateLimitReset() bool { - if o != nil && o.XRateLimitReset != nil { +func (o *RateLimit) HasXRateLimitReset() bool { + if o != nil && !isNil(o.XRateLimitReset) { return true } @@ -130,56 +136,64 @@ func (o *GetRateLimit200ResponseData) HasXRateLimitReset() bool { } // SetXRateLimitReset gets a reference to the given int32 and assigns it to the XRateLimitReset field. -func (o *GetRateLimit200ResponseData) SetXRateLimitReset(v int32) { +func (o *RateLimit) SetXRateLimitReset(v int32) { o.XRateLimitReset = &v } -func (o GetRateLimit200ResponseData) MarshalJSON() ([]byte, error) { +func (o RateLimit) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RateLimit) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.XRateLimitLimit != nil { + if !isNil(o.XRateLimitLimit) { toSerialize["X-RateLimit-Limit"] = o.XRateLimitLimit } - if o.XRateLimitRemaining != nil { + if !isNil(o.XRateLimitRemaining) { toSerialize["X-RateLimit-Remaining"] = o.XRateLimitRemaining } - if o.XRateLimitReset != nil { + if !isNil(o.XRateLimitReset) { toSerialize["X-RateLimit-Reset"] = o.XRateLimitReset } - return json.Marshal(toSerialize) + return toSerialize, nil } -type NullableGetRateLimit200ResponseData struct { - value *GetRateLimit200ResponseData +type NullableRateLimit struct { + value *RateLimit isSet bool } -func (v NullableGetRateLimit200ResponseData) Get() *GetRateLimit200ResponseData { +func (v NullableRateLimit) Get() *RateLimit { return v.value } -func (v *NullableGetRateLimit200ResponseData) Set(val *GetRateLimit200ResponseData) { +func (v *NullableRateLimit) Set(val *RateLimit) { v.value = val v.isSet = true } -func (v NullableGetRateLimit200ResponseData) IsSet() bool { +func (v NullableRateLimit) IsSet() bool { return v.isSet } -func (v *NullableGetRateLimit200ResponseData) Unset() { +func (v *NullableRateLimit) Unset() { v.value = nil v.isSet = false } -func NewNullableGetRateLimit200ResponseData(val *GetRateLimit200ResponseData) *NullableGetRateLimit200ResponseData { - return &NullableGetRateLimit200ResponseData{value: val, isSet: true} +func NewNullableRateLimit(val *RateLimit) *NullableRateLimit { + return &NullableRateLimit{value: val, isSet: true} } -func (v NullableGetRateLimit200ResponseData) MarshalJSON() ([]byte, error) { +func (v NullableRateLimit) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } -func (v *NullableGetRateLimit200ResponseData) UnmarshalJSON(src []byte) error { +func (v *NullableRateLimit) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/model_registration.go b/model_registration.go deleted file mode 100644 index 7cfabda..0000000 --- a/model_registration.go +++ /dev/null @@ -1,190 +0,0 @@ -/* -OneLogin API - -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -API version: 3.0.0-alpha.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package openapi - -import ( - "encoding/json" -) - -// Registration struct for Registration -type Registration struct { - // Registration identifier. - Id *string `json:"id,omitempty"` - // pending registration has not been completed successfully. accepted registration has successfully completed. - Status *string `json:"status,omitempty"` - // Device id to be used with Verify the Factor. - DeviceId *string `json:"device_id,omitempty"` -} - -// NewRegistration instantiates a new Registration 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 NewRegistration() *Registration { - this := Registration{} - return &this -} - -// NewRegistrationWithDefaults instantiates a new Registration 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 NewRegistrationWithDefaults() *Registration { - this := Registration{} - return &this -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *Registration) GetId() string { - if o == nil || o.Id == nil { - var ret string - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Registration) GetIdOk() (*string, bool) { - if o == nil || o.Id == nil { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *Registration) HasId() bool { - if o != nil && o.Id != nil { - return true - } - - return false -} - -// SetId gets a reference to the given string and assigns it to the Id field. -func (o *Registration) SetId(v string) { - o.Id = &v -} - -// GetStatus returns the Status field value if set, zero value otherwise. -func (o *Registration) GetStatus() string { - if o == nil || o.Status == nil { - var ret string - return ret - } - return *o.Status -} - -// GetStatusOk returns a tuple with the Status field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Registration) GetStatusOk() (*string, bool) { - if o == nil || o.Status == nil { - return nil, false - } - return o.Status, true -} - -// HasStatus returns a boolean if a field has been set. -func (o *Registration) HasStatus() bool { - if o != nil && o.Status != nil { - return true - } - - return false -} - -// SetStatus gets a reference to the given string and assigns it to the Status field. -func (o *Registration) SetStatus(v string) { - o.Status = &v -} - -// GetDeviceId returns the DeviceId field value if set, zero value otherwise. -func (o *Registration) GetDeviceId() string { - if o == nil || o.DeviceId == nil { - var ret string - return ret - } - return *o.DeviceId -} - -// GetDeviceIdOk returns a tuple with the DeviceId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Registration) GetDeviceIdOk() (*string, bool) { - if o == nil || o.DeviceId == nil { - return nil, false - } - return o.DeviceId, true -} - -// HasDeviceId returns a boolean if a field has been set. -func (o *Registration) HasDeviceId() bool { - if o != nil && o.DeviceId != nil { - return true - } - - return false -} - -// SetDeviceId gets a reference to the given string and assigns it to the DeviceId field. -func (o *Registration) SetDeviceId(v string) { - o.DeviceId = &v -} - -func (o Registration) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Status != nil { - toSerialize["status"] = o.Status - } - if o.DeviceId != nil { - toSerialize["device_id"] = o.DeviceId - } - return json.Marshal(toSerialize) -} - -type NullableRegistration struct { - value *Registration - isSet bool -} - -func (v NullableRegistration) Get() *Registration { - return v.value -} - -func (v *NullableRegistration) Set(val *Registration) { - v.value = val - v.isSet = true -} - -func (v NullableRegistration) IsSet() bool { - return v.isSet -} - -func (v *NullableRegistration) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRegistration(val *Registration) *NullableRegistration { - return &NullableRegistration{value: val, isSet: true} -} - -func (v NullableRegistration) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRegistration) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_remove_role_users_request.go b/model_remove_role_users_request.go index b26b106..47892ec 100644 --- a/model_remove_role_users_request.go +++ b/model_remove_role_users_request.go @@ -1,19 +1,22 @@ /* OneLogin API -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) +OpenAPI Specification for OneLogin -API version: 3.0.0-alpha.1 +API version: 3.1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package openapi +package onelogin import ( "encoding/json" ) +// checks if the RemoveRoleUsersRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RemoveRoleUsersRequest{} + // RemoveRoleUsersRequest struct for RemoveRoleUsersRequest type RemoveRoleUsersRequest struct { UserId []int32 `json:"user_id,omitempty"` @@ -38,7 +41,7 @@ func NewRemoveRoleUsersRequestWithDefaults() *RemoveRoleUsersRequest { // GetUserId returns the UserId field value if set, zero value otherwise. func (o *RemoveRoleUsersRequest) GetUserId() []int32 { - if o == nil || o.UserId == nil { + if o == nil || isNil(o.UserId) { var ret []int32 return ret } @@ -48,7 +51,7 @@ func (o *RemoveRoleUsersRequest) GetUserId() []int32 { // GetUserIdOk returns a tuple with the UserId field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *RemoveRoleUsersRequest) GetUserIdOk() ([]int32, bool) { - if o == nil || o.UserId == nil { + if o == nil || isNil(o.UserId) { return nil, false } return o.UserId, true @@ -56,7 +59,7 @@ func (o *RemoveRoleUsersRequest) GetUserIdOk() ([]int32, bool) { // HasUserId returns a boolean if a field has been set. func (o *RemoveRoleUsersRequest) HasUserId() bool { - if o != nil && o.UserId != nil { + if o != nil && !isNil(o.UserId) { return true } @@ -69,11 +72,19 @@ func (o *RemoveRoleUsersRequest) SetUserId(v []int32) { } func (o RemoveRoleUsersRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RemoveRoleUsersRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.UserId != nil { + if !isNil(o.UserId) { toSerialize["user_id"] = o.UserId } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableRemoveRoleUsersRequest struct { diff --git a/model_remove_user_role_request.go b/model_remove_user_role_request.go new file mode 100644 index 0000000..098435d --- /dev/null +++ b/model_remove_user_role_request.go @@ -0,0 +1,117 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the RemoveUserRoleRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RemoveUserRoleRequest{} + +// RemoveUserRoleRequest struct for RemoveUserRoleRequest +type RemoveUserRoleRequest struct { + RoleIdArray []RemoveUserRoleRequestRoleIdArrayInner `json:"role_id_array"` +} + +// NewRemoveUserRoleRequest instantiates a new RemoveUserRoleRequest 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 NewRemoveUserRoleRequest(roleIdArray []RemoveUserRoleRequestRoleIdArrayInner) *RemoveUserRoleRequest { + this := RemoveUserRoleRequest{} + this.RoleIdArray = roleIdArray + return &this +} + +// NewRemoveUserRoleRequestWithDefaults instantiates a new RemoveUserRoleRequest 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 NewRemoveUserRoleRequestWithDefaults() *RemoveUserRoleRequest { + this := RemoveUserRoleRequest{} + return &this +} + +// GetRoleIdArray returns the RoleIdArray field value +func (o *RemoveUserRoleRequest) GetRoleIdArray() []RemoveUserRoleRequestRoleIdArrayInner { + if o == nil { + var ret []RemoveUserRoleRequestRoleIdArrayInner + return ret + } + + return o.RoleIdArray +} + +// GetRoleIdArrayOk returns a tuple with the RoleIdArray field value +// and a boolean to check if the value has been set. +func (o *RemoveUserRoleRequest) GetRoleIdArrayOk() ([]RemoveUserRoleRequestRoleIdArrayInner, bool) { + if o == nil { + return nil, false + } + return o.RoleIdArray, true +} + +// SetRoleIdArray sets field value +func (o *RemoveUserRoleRequest) SetRoleIdArray(v []RemoveUserRoleRequestRoleIdArrayInner) { + o.RoleIdArray = v +} + +func (o RemoveUserRoleRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RemoveUserRoleRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["role_id_array"] = o.RoleIdArray + return toSerialize, nil +} + +type NullableRemoveUserRoleRequest struct { + value *RemoveUserRoleRequest + isSet bool +} + +func (v NullableRemoveUserRoleRequest) Get() *RemoveUserRoleRequest { + return v.value +} + +func (v *NullableRemoveUserRoleRequest) Set(val *RemoveUserRoleRequest) { + v.value = val + v.isSet = true +} + +func (v NullableRemoveUserRoleRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableRemoveUserRoleRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRemoveUserRoleRequest(val *RemoveUserRoleRequest) *NullableRemoveUserRoleRequest { + return &NullableRemoveUserRoleRequest{value: val, isSet: true} +} + +func (v NullableRemoveUserRoleRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRemoveUserRoleRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_remove_user_role_request_role_id_array_inner.go b/model_remove_user_role_request_role_id_array_inner.go new file mode 100644 index 0000000..479c319 --- /dev/null +++ b/model_remove_user_role_request_role_id_array_inner.go @@ -0,0 +1,126 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the RemoveUserRoleRequestRoleIdArrayInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RemoveUserRoleRequestRoleIdArrayInner{} + +// RemoveUserRoleRequestRoleIdArrayInner struct for RemoveUserRoleRequestRoleIdArrayInner +type RemoveUserRoleRequestRoleIdArrayInner struct { + RoleId *int32 `json:"role_id,omitempty"` +} + +// NewRemoveUserRoleRequestRoleIdArrayInner instantiates a new RemoveUserRoleRequestRoleIdArrayInner 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 NewRemoveUserRoleRequestRoleIdArrayInner() *RemoveUserRoleRequestRoleIdArrayInner { + this := RemoveUserRoleRequestRoleIdArrayInner{} + return &this +} + +// NewRemoveUserRoleRequestRoleIdArrayInnerWithDefaults instantiates a new RemoveUserRoleRequestRoleIdArrayInner 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 NewRemoveUserRoleRequestRoleIdArrayInnerWithDefaults() *RemoveUserRoleRequestRoleIdArrayInner { + this := RemoveUserRoleRequestRoleIdArrayInner{} + return &this +} + +// GetRoleId returns the RoleId field value if set, zero value otherwise. +func (o *RemoveUserRoleRequestRoleIdArrayInner) GetRoleId() int32 { + if o == nil || isNil(o.RoleId) { + var ret int32 + return ret + } + return *o.RoleId +} + +// GetRoleIdOk returns a tuple with the RoleId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RemoveUserRoleRequestRoleIdArrayInner) GetRoleIdOk() (*int32, bool) { + if o == nil || isNil(o.RoleId) { + return nil, false + } + return o.RoleId, true +} + +// HasRoleId returns a boolean if a field has been set. +func (o *RemoveUserRoleRequestRoleIdArrayInner) HasRoleId() bool { + if o != nil && !isNil(o.RoleId) { + return true + } + + return false +} + +// SetRoleId gets a reference to the given int32 and assigns it to the RoleId field. +func (o *RemoveUserRoleRequestRoleIdArrayInner) SetRoleId(v int32) { + o.RoleId = &v +} + +func (o RemoveUserRoleRequestRoleIdArrayInner) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RemoveUserRoleRequestRoleIdArrayInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.RoleId) { + toSerialize["role_id"] = o.RoleId + } + return toSerialize, nil +} + +type NullableRemoveUserRoleRequestRoleIdArrayInner struct { + value *RemoveUserRoleRequestRoleIdArrayInner + isSet bool +} + +func (v NullableRemoveUserRoleRequestRoleIdArrayInner) Get() *RemoveUserRoleRequestRoleIdArrayInner { + return v.value +} + +func (v *NullableRemoveUserRoleRequestRoleIdArrayInner) Set(val *RemoveUserRoleRequestRoleIdArrayInner) { + v.value = val + v.isSet = true +} + +func (v NullableRemoveUserRoleRequestRoleIdArrayInner) IsSet() bool { + return v.isSet +} + +func (v *NullableRemoveUserRoleRequestRoleIdArrayInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRemoveUserRoleRequestRoleIdArrayInner(val *RemoveUserRoleRequestRoleIdArrayInner) *NullableRemoveUserRoleRequestRoleIdArrayInner { + return &NullableRemoveUserRoleRequestRoleIdArrayInner{value: val, isSet: true} +} + +func (v NullableRemoveUserRoleRequestRoleIdArrayInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRemoveUserRoleRequestRoleIdArrayInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_request_brand.go b/model_request_brand.go new file mode 100644 index 0000000..7fa7ec1 --- /dev/null +++ b/model_request_brand.go @@ -0,0 +1,640 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the RequestBrand type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RequestBrand{} + +// RequestBrand struct for RequestBrand +type RequestBrand struct { + // Indicates if the brand is enabled or not + Enabled *bool `json:"enabled,omitempty"` + // Brand’s name for humans. This isn’t related to subdomains. + Name string `json:"name"` + // Indicates if the custom support is enabled. If enabled, the login page includes the ability to submit a support request. + CustomSupportEnabled *bool `json:"custom_support_enabled,omitempty"` + // Primary brand color + CustomColor *string `json:"custom_color,omitempty"` + // Secondary brand color + CustomAccentColor *string `json:"custom_accent_color,omitempty"` + // Color for the masking layer above the background image of the branded login screen. + CustomMaskingColor *string `json:"custom_masking_color,omitempty"` + // Opacity for the custom_masking_color. + CustomMaskingOpacity *int32 `json:"custom_masking_opacity,omitempty"` + // Indicates if the custom Username/Email field label is enabled or not + EnableCustomLabelForLoginScreen *bool `json:"enable_custom_label_for_login_screen,omitempty"` + // Custom label for the Username/Email field on the login screen. See example here. + CustomLabelTextForLoginScreen *string `json:"custom_label_text_for_login_screen,omitempty"` + // Link text to show login instruction screen. + LoginInstructionTitle *string `json:"login_instruction_title,omitempty"` + // Text for the login instruction screen, styled in Markdown. + LoginInstruction *string `json:"login_instruction,omitempty"` + // Indicates if the OneLogin footer will appear at the bottom of the login page. + HideOneloginFooter *bool `json:"hide_onelogin_footer,omitempty"` + // Text that replaces the default text displayed on the initial screen of the MFA Registration. + MfaEnrollmentMessage *string `json:"mfa_enrollment_message,omitempty"` + // Base64 encoded image data (JPG/PNG, <5MB) + Background *string `json:"background,omitempty"` + // Base64 encoded image data (PNG, <1MB) + Logo *string `json:"logo,omitempty"` +} + +// NewRequestBrand instantiates a new RequestBrand 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 NewRequestBrand(name string) *RequestBrand { + this := RequestBrand{} + var enabled bool = false + this.Enabled = &enabled + this.Name = name + return &this +} + +// NewRequestBrandWithDefaults instantiates a new RequestBrand 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 NewRequestBrandWithDefaults() *RequestBrand { + this := RequestBrand{} + var enabled bool = false + this.Enabled = &enabled + return &this +} + +// GetEnabled returns the Enabled field value if set, zero value otherwise. +func (o *RequestBrand) GetEnabled() bool { + if o == nil || isNil(o.Enabled) { + 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 *RequestBrand) GetEnabledOk() (*bool, bool) { + if o == nil || isNil(o.Enabled) { + return nil, false + } + return o.Enabled, true +} + +// HasEnabled returns a boolean if a field has been set. +func (o *RequestBrand) HasEnabled() bool { + if o != nil && !isNil(o.Enabled) { + return true + } + + return false +} + +// SetEnabled gets a reference to the given bool and assigns it to the Enabled field. +func (o *RequestBrand) SetEnabled(v bool) { + o.Enabled = &v +} + +// GetName returns the Name field value +func (o *RequestBrand) 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 *RequestBrand) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *RequestBrand) SetName(v string) { + o.Name = v +} + +// GetCustomSupportEnabled returns the CustomSupportEnabled field value if set, zero value otherwise. +func (o *RequestBrand) GetCustomSupportEnabled() bool { + if o == nil || isNil(o.CustomSupportEnabled) { + var ret bool + return ret + } + return *o.CustomSupportEnabled +} + +// GetCustomSupportEnabledOk returns a tuple with the CustomSupportEnabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RequestBrand) GetCustomSupportEnabledOk() (*bool, bool) { + if o == nil || isNil(o.CustomSupportEnabled) { + return nil, false + } + return o.CustomSupportEnabled, true +} + +// HasCustomSupportEnabled returns a boolean if a field has been set. +func (o *RequestBrand) HasCustomSupportEnabled() bool { + if o != nil && !isNil(o.CustomSupportEnabled) { + return true + } + + return false +} + +// SetCustomSupportEnabled gets a reference to the given bool and assigns it to the CustomSupportEnabled field. +func (o *RequestBrand) SetCustomSupportEnabled(v bool) { + o.CustomSupportEnabled = &v +} + +// GetCustomColor returns the CustomColor field value if set, zero value otherwise. +func (o *RequestBrand) GetCustomColor() string { + if o == nil || isNil(o.CustomColor) { + var ret string + return ret + } + return *o.CustomColor +} + +// GetCustomColorOk returns a tuple with the CustomColor field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RequestBrand) GetCustomColorOk() (*string, bool) { + if o == nil || isNil(o.CustomColor) { + return nil, false + } + return o.CustomColor, true +} + +// HasCustomColor returns a boolean if a field has been set. +func (o *RequestBrand) HasCustomColor() bool { + if o != nil && !isNil(o.CustomColor) { + return true + } + + return false +} + +// SetCustomColor gets a reference to the given string and assigns it to the CustomColor field. +func (o *RequestBrand) SetCustomColor(v string) { + o.CustomColor = &v +} + +// GetCustomAccentColor returns the CustomAccentColor field value if set, zero value otherwise. +func (o *RequestBrand) GetCustomAccentColor() string { + if o == nil || isNil(o.CustomAccentColor) { + var ret string + return ret + } + return *o.CustomAccentColor +} + +// GetCustomAccentColorOk returns a tuple with the CustomAccentColor field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RequestBrand) GetCustomAccentColorOk() (*string, bool) { + if o == nil || isNil(o.CustomAccentColor) { + return nil, false + } + return o.CustomAccentColor, true +} + +// HasCustomAccentColor returns a boolean if a field has been set. +func (o *RequestBrand) HasCustomAccentColor() bool { + if o != nil && !isNil(o.CustomAccentColor) { + return true + } + + return false +} + +// SetCustomAccentColor gets a reference to the given string and assigns it to the CustomAccentColor field. +func (o *RequestBrand) SetCustomAccentColor(v string) { + o.CustomAccentColor = &v +} + +// GetCustomMaskingColor returns the CustomMaskingColor field value if set, zero value otherwise. +func (o *RequestBrand) GetCustomMaskingColor() string { + if o == nil || isNil(o.CustomMaskingColor) { + var ret string + return ret + } + return *o.CustomMaskingColor +} + +// GetCustomMaskingColorOk returns a tuple with the CustomMaskingColor field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RequestBrand) GetCustomMaskingColorOk() (*string, bool) { + if o == nil || isNil(o.CustomMaskingColor) { + return nil, false + } + return o.CustomMaskingColor, true +} + +// HasCustomMaskingColor returns a boolean if a field has been set. +func (o *RequestBrand) HasCustomMaskingColor() bool { + if o != nil && !isNil(o.CustomMaskingColor) { + return true + } + + return false +} + +// SetCustomMaskingColor gets a reference to the given string and assigns it to the CustomMaskingColor field. +func (o *RequestBrand) SetCustomMaskingColor(v string) { + o.CustomMaskingColor = &v +} + +// GetCustomMaskingOpacity returns the CustomMaskingOpacity field value if set, zero value otherwise. +func (o *RequestBrand) GetCustomMaskingOpacity() int32 { + if o == nil || isNil(o.CustomMaskingOpacity) { + var ret int32 + return ret + } + return *o.CustomMaskingOpacity +} + +// GetCustomMaskingOpacityOk returns a tuple with the CustomMaskingOpacity field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RequestBrand) GetCustomMaskingOpacityOk() (*int32, bool) { + if o == nil || isNil(o.CustomMaskingOpacity) { + return nil, false + } + return o.CustomMaskingOpacity, true +} + +// HasCustomMaskingOpacity returns a boolean if a field has been set. +func (o *RequestBrand) HasCustomMaskingOpacity() bool { + if o != nil && !isNil(o.CustomMaskingOpacity) { + return true + } + + return false +} + +// SetCustomMaskingOpacity gets a reference to the given int32 and assigns it to the CustomMaskingOpacity field. +func (o *RequestBrand) SetCustomMaskingOpacity(v int32) { + o.CustomMaskingOpacity = &v +} + +// GetEnableCustomLabelForLoginScreen returns the EnableCustomLabelForLoginScreen field value if set, zero value otherwise. +func (o *RequestBrand) GetEnableCustomLabelForLoginScreen() bool { + if o == nil || isNil(o.EnableCustomLabelForLoginScreen) { + var ret bool + return ret + } + return *o.EnableCustomLabelForLoginScreen +} + +// GetEnableCustomLabelForLoginScreenOk returns a tuple with the EnableCustomLabelForLoginScreen field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RequestBrand) GetEnableCustomLabelForLoginScreenOk() (*bool, bool) { + if o == nil || isNil(o.EnableCustomLabelForLoginScreen) { + return nil, false + } + return o.EnableCustomLabelForLoginScreen, true +} + +// HasEnableCustomLabelForLoginScreen returns a boolean if a field has been set. +func (o *RequestBrand) HasEnableCustomLabelForLoginScreen() bool { + if o != nil && !isNil(o.EnableCustomLabelForLoginScreen) { + return true + } + + return false +} + +// SetEnableCustomLabelForLoginScreen gets a reference to the given bool and assigns it to the EnableCustomLabelForLoginScreen field. +func (o *RequestBrand) SetEnableCustomLabelForLoginScreen(v bool) { + o.EnableCustomLabelForLoginScreen = &v +} + +// GetCustomLabelTextForLoginScreen returns the CustomLabelTextForLoginScreen field value if set, zero value otherwise. +func (o *RequestBrand) GetCustomLabelTextForLoginScreen() string { + if o == nil || isNil(o.CustomLabelTextForLoginScreen) { + var ret string + return ret + } + return *o.CustomLabelTextForLoginScreen +} + +// GetCustomLabelTextForLoginScreenOk returns a tuple with the CustomLabelTextForLoginScreen field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RequestBrand) GetCustomLabelTextForLoginScreenOk() (*string, bool) { + if o == nil || isNil(o.CustomLabelTextForLoginScreen) { + return nil, false + } + return o.CustomLabelTextForLoginScreen, true +} + +// HasCustomLabelTextForLoginScreen returns a boolean if a field has been set. +func (o *RequestBrand) HasCustomLabelTextForLoginScreen() bool { + if o != nil && !isNil(o.CustomLabelTextForLoginScreen) { + return true + } + + return false +} + +// SetCustomLabelTextForLoginScreen gets a reference to the given string and assigns it to the CustomLabelTextForLoginScreen field. +func (o *RequestBrand) SetCustomLabelTextForLoginScreen(v string) { + o.CustomLabelTextForLoginScreen = &v +} + +// GetLoginInstructionTitle returns the LoginInstructionTitle field value if set, zero value otherwise. +func (o *RequestBrand) GetLoginInstructionTitle() string { + if o == nil || isNil(o.LoginInstructionTitle) { + var ret string + return ret + } + return *o.LoginInstructionTitle +} + +// GetLoginInstructionTitleOk returns a tuple with the LoginInstructionTitle field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RequestBrand) GetLoginInstructionTitleOk() (*string, bool) { + if o == nil || isNil(o.LoginInstructionTitle) { + return nil, false + } + return o.LoginInstructionTitle, true +} + +// HasLoginInstructionTitle returns a boolean if a field has been set. +func (o *RequestBrand) HasLoginInstructionTitle() bool { + if o != nil && !isNil(o.LoginInstructionTitle) { + return true + } + + return false +} + +// SetLoginInstructionTitle gets a reference to the given string and assigns it to the LoginInstructionTitle field. +func (o *RequestBrand) SetLoginInstructionTitle(v string) { + o.LoginInstructionTitle = &v +} + +// GetLoginInstruction returns the LoginInstruction field value if set, zero value otherwise. +func (o *RequestBrand) GetLoginInstruction() string { + if o == nil || isNil(o.LoginInstruction) { + var ret string + return ret + } + return *o.LoginInstruction +} + +// GetLoginInstructionOk returns a tuple with the LoginInstruction field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RequestBrand) GetLoginInstructionOk() (*string, bool) { + if o == nil || isNil(o.LoginInstruction) { + return nil, false + } + return o.LoginInstruction, true +} + +// HasLoginInstruction returns a boolean if a field has been set. +func (o *RequestBrand) HasLoginInstruction() bool { + if o != nil && !isNil(o.LoginInstruction) { + return true + } + + return false +} + +// SetLoginInstruction gets a reference to the given string and assigns it to the LoginInstruction field. +func (o *RequestBrand) SetLoginInstruction(v string) { + o.LoginInstruction = &v +} + +// GetHideOneloginFooter returns the HideOneloginFooter field value if set, zero value otherwise. +func (o *RequestBrand) GetHideOneloginFooter() bool { + if o == nil || isNil(o.HideOneloginFooter) { + var ret bool + return ret + } + return *o.HideOneloginFooter +} + +// GetHideOneloginFooterOk returns a tuple with the HideOneloginFooter field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RequestBrand) GetHideOneloginFooterOk() (*bool, bool) { + if o == nil || isNil(o.HideOneloginFooter) { + return nil, false + } + return o.HideOneloginFooter, true +} + +// HasHideOneloginFooter returns a boolean if a field has been set. +func (o *RequestBrand) HasHideOneloginFooter() bool { + if o != nil && !isNil(o.HideOneloginFooter) { + return true + } + + return false +} + +// SetHideOneloginFooter gets a reference to the given bool and assigns it to the HideOneloginFooter field. +func (o *RequestBrand) SetHideOneloginFooter(v bool) { + o.HideOneloginFooter = &v +} + +// GetMfaEnrollmentMessage returns the MfaEnrollmentMessage field value if set, zero value otherwise. +func (o *RequestBrand) GetMfaEnrollmentMessage() string { + if o == nil || isNil(o.MfaEnrollmentMessage) { + var ret string + return ret + } + return *o.MfaEnrollmentMessage +} + +// GetMfaEnrollmentMessageOk returns a tuple with the MfaEnrollmentMessage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RequestBrand) GetMfaEnrollmentMessageOk() (*string, bool) { + if o == nil || isNil(o.MfaEnrollmentMessage) { + return nil, false + } + return o.MfaEnrollmentMessage, true +} + +// HasMfaEnrollmentMessage returns a boolean if a field has been set. +func (o *RequestBrand) HasMfaEnrollmentMessage() bool { + if o != nil && !isNil(o.MfaEnrollmentMessage) { + return true + } + + return false +} + +// SetMfaEnrollmentMessage gets a reference to the given string and assigns it to the MfaEnrollmentMessage field. +func (o *RequestBrand) SetMfaEnrollmentMessage(v string) { + o.MfaEnrollmentMessage = &v +} + +// GetBackground returns the Background field value if set, zero value otherwise. +func (o *RequestBrand) GetBackground() string { + if o == nil || isNil(o.Background) { + var ret string + return ret + } + return *o.Background +} + +// 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 *RequestBrand) GetBackgroundOk() (*string, bool) { + if o == nil || isNil(o.Background) { + return nil, false + } + return o.Background, true +} + +// HasBackground returns a boolean if a field has been set. +func (o *RequestBrand) HasBackground() bool { + if o != nil && !isNil(o.Background) { + return true + } + + return false +} + +// SetBackground gets a reference to the given string and assigns it to the Background field. +func (o *RequestBrand) SetBackground(v string) { + o.Background = &v +} + +// GetLogo returns the Logo field value if set, zero value otherwise. +func (o *RequestBrand) GetLogo() string { + if o == nil || isNil(o.Logo) { + var ret string + return ret + } + return *o.Logo +} + +// GetLogoOk returns a tuple with the Logo field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RequestBrand) GetLogoOk() (*string, bool) { + if o == nil || isNil(o.Logo) { + return nil, false + } + return o.Logo, true +} + +// HasLogo returns a boolean if a field has been set. +func (o *RequestBrand) HasLogo() bool { + if o != nil && !isNil(o.Logo) { + return true + } + + return false +} + +// SetLogo gets a reference to the given string and assigns it to the Logo field. +func (o *RequestBrand) SetLogo(v string) { + o.Logo = &v +} + +func (o RequestBrand) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RequestBrand) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.Enabled) { + toSerialize["enabled"] = o.Enabled + } + toSerialize["name"] = o.Name + if !isNil(o.CustomSupportEnabled) { + toSerialize["custom_support_enabled"] = o.CustomSupportEnabled + } + if !isNil(o.CustomColor) { + toSerialize["custom_color"] = o.CustomColor + } + if !isNil(o.CustomAccentColor) { + toSerialize["custom_accent_color"] = o.CustomAccentColor + } + if !isNil(o.CustomMaskingColor) { + toSerialize["custom_masking_color"] = o.CustomMaskingColor + } + if !isNil(o.CustomMaskingOpacity) { + toSerialize["custom_masking_opacity"] = o.CustomMaskingOpacity + } + if !isNil(o.EnableCustomLabelForLoginScreen) { + toSerialize["enable_custom_label_for_login_screen"] = o.EnableCustomLabelForLoginScreen + } + if !isNil(o.CustomLabelTextForLoginScreen) { + toSerialize["custom_label_text_for_login_screen"] = o.CustomLabelTextForLoginScreen + } + if !isNil(o.LoginInstructionTitle) { + toSerialize["login_instruction_title"] = o.LoginInstructionTitle + } + if !isNil(o.LoginInstruction) { + toSerialize["login_instruction"] = o.LoginInstruction + } + if !isNil(o.HideOneloginFooter) { + toSerialize["hide_onelogin_footer"] = o.HideOneloginFooter + } + if !isNil(o.MfaEnrollmentMessage) { + toSerialize["mfa_enrollment_message"] = o.MfaEnrollmentMessage + } + if !isNil(o.Background) { + toSerialize["background"] = o.Background + } + if !isNil(o.Logo) { + toSerialize["logo"] = o.Logo + } + return toSerialize, nil +} + +type NullableRequestBrand struct { + value *RequestBrand + isSet bool +} + +func (v NullableRequestBrand) Get() *RequestBrand { + return v.value +} + +func (v *NullableRequestBrand) Set(val *RequestBrand) { + v.value = val + v.isSet = true +} + +func (v NullableRequestBrand) IsSet() bool { + return v.isSet +} + +func (v *NullableRequestBrand) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRequestBrand(val *RequestBrand) *NullableRequestBrand { + return &NullableRequestBrand{value: val, isSet: true} +} + +func (v NullableRequestBrand) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRequestBrand) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_revoke_token_request.go b/model_revoke_token_request.go deleted file mode 100644 index 30a27cb..0000000 --- a/model_revoke_token_request.go +++ /dev/null @@ -1,115 +0,0 @@ -/* -OneLogin API - -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -API version: 3.0.0-alpha.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package openapi - -import ( - "encoding/json" -) - -// RevokeTokenRequest struct for RevokeTokenRequest -type RevokeTokenRequest struct { - AccessToken *string `json:"access_token,omitempty"` -} - -// NewRevokeTokenRequest instantiates a new RevokeTokenRequest 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 NewRevokeTokenRequest() *RevokeTokenRequest { - this := RevokeTokenRequest{} - return &this -} - -// NewRevokeTokenRequestWithDefaults instantiates a new RevokeTokenRequest 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 NewRevokeTokenRequestWithDefaults() *RevokeTokenRequest { - this := RevokeTokenRequest{} - return &this -} - -// GetAccessToken returns the AccessToken field value if set, zero value otherwise. -func (o *RevokeTokenRequest) GetAccessToken() string { - if o == nil || o.AccessToken == nil { - var ret string - return ret - } - return *o.AccessToken -} - -// GetAccessTokenOk returns a tuple with the AccessToken field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RevokeTokenRequest) GetAccessTokenOk() (*string, bool) { - if o == nil || o.AccessToken == nil { - return nil, false - } - return o.AccessToken, true -} - -// HasAccessToken returns a boolean if a field has been set. -func (o *RevokeTokenRequest) HasAccessToken() bool { - if o != nil && o.AccessToken != nil { - return true - } - - return false -} - -// SetAccessToken gets a reference to the given string and assigns it to the AccessToken field. -func (o *RevokeTokenRequest) SetAccessToken(v string) { - o.AccessToken = &v -} - -func (o RevokeTokenRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.AccessToken != nil { - toSerialize["access_token"] = o.AccessToken - } - return json.Marshal(toSerialize) -} - -type NullableRevokeTokenRequest struct { - value *RevokeTokenRequest - isSet bool -} - -func (v NullableRevokeTokenRequest) Get() *RevokeTokenRequest { - return v.value -} - -func (v *NullableRevokeTokenRequest) Set(val *RevokeTokenRequest) { - v.value = val - v.isSet = true -} - -func (v NullableRevokeTokenRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableRevokeTokenRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRevokeTokenRequest(val *RevokeTokenRequest) *NullableRevokeTokenRequest { - return &NullableRevokeTokenRequest{value: val, isSet: true} -} - -func (v NullableRevokeTokenRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRevokeTokenRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_revoke_tokens_request.go b/model_revoke_tokens_request.go new file mode 100644 index 0000000..e9e62c1 --- /dev/null +++ b/model_revoke_tokens_request.go @@ -0,0 +1,118 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the RevokeTokensRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RevokeTokensRequest{} + +// RevokeTokensRequest struct for RevokeTokensRequest +type RevokeTokensRequest struct { + // Set to the access token you want to revoke. This access token must have been generated using the client_id and client_secret provided in the Authorization header. + AccessToken string `json:"access_token"` +} + +// NewRevokeTokensRequest instantiates a new RevokeTokensRequest 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 NewRevokeTokensRequest(accessToken string) *RevokeTokensRequest { + this := RevokeTokensRequest{} + this.AccessToken = accessToken + return &this +} + +// NewRevokeTokensRequestWithDefaults instantiates a new RevokeTokensRequest 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 NewRevokeTokensRequestWithDefaults() *RevokeTokensRequest { + this := RevokeTokensRequest{} + return &this +} + +// GetAccessToken returns the AccessToken field value +func (o *RevokeTokensRequest) GetAccessToken() string { + if o == nil { + var ret string + return ret + } + + return o.AccessToken +} + +// GetAccessTokenOk returns a tuple with the AccessToken field value +// and a boolean to check if the value has been set. +func (o *RevokeTokensRequest) GetAccessTokenOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.AccessToken, true +} + +// SetAccessToken sets field value +func (o *RevokeTokensRequest) SetAccessToken(v string) { + o.AccessToken = v +} + +func (o RevokeTokensRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RevokeTokensRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["access_token"] = o.AccessToken + return toSerialize, nil +} + +type NullableRevokeTokensRequest struct { + value *RevokeTokensRequest + isSet bool +} + +func (v NullableRevokeTokensRequest) Get() *RevokeTokensRequest { + return v.value +} + +func (v *NullableRevokeTokensRequest) Set(val *RevokeTokensRequest) { + v.value = val + v.isSet = true +} + +func (v NullableRevokeTokensRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableRevokeTokensRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRevokeTokensRequest(val *RevokeTokensRequest) *NullableRevokeTokensRequest { + return &NullableRevokeTokensRequest{value: val, isSet: true} +} + +func (v NullableRevokeTokensRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRevokeTokensRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_risk_device.go b/model_risk_device.go index 7eecc70..469f0e4 100644 --- a/model_risk_device.go +++ b/model_risk_device.go @@ -1,19 +1,22 @@ /* OneLogin API -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) +OpenAPI Specification for OneLogin -API version: 3.0.0-alpha.1 +API version: 3.1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package openapi +package onelogin import ( "encoding/json" ) +// checks if the RiskDevice type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RiskDevice{} + // RiskDevice Information about the device being used. type RiskDevice struct { // This device's unique identifier @@ -39,7 +42,7 @@ func NewRiskDeviceWithDefaults() *RiskDevice { // GetId returns the Id field value if set, zero value otherwise. func (o *RiskDevice) GetId() string { - if o == nil || o.Id == nil { + if o == nil || isNil(o.Id) { var ret string return ret } @@ -49,7 +52,7 @@ func (o *RiskDevice) GetId() string { // GetIdOk returns a tuple with the Id field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *RiskDevice) GetIdOk() (*string, bool) { - if o == nil || o.Id == nil { + if o == nil || isNil(o.Id) { return nil, false } return o.Id, true @@ -57,7 +60,7 @@ func (o *RiskDevice) GetIdOk() (*string, bool) { // HasId returns a boolean if a field has been set. func (o *RiskDevice) HasId() bool { - if o != nil && o.Id != nil { + if o != nil && !isNil(o.Id) { return true } @@ -70,11 +73,19 @@ func (o *RiskDevice) SetId(v string) { } func (o RiskDevice) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RiskDevice) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { + if !isNil(o.Id) { toSerialize["id"] = o.Id } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableRiskDevice struct { diff --git a/model_risk_rule.go b/model_risk_rule.go index 84b6e1f..08d7498 100644 --- a/model_risk_rule.go +++ b/model_risk_rule.go @@ -1,19 +1,22 @@ /* OneLogin API -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) +OpenAPI Specification for OneLogin -API version: 3.0.0-alpha.1 +API version: 3.1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package openapi +package onelogin import ( "encoding/json" ) +// checks if the RiskRule type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RiskRule{} + // RiskRule struct for RiskRule type RiskRule struct { Id *string `json:"id,omitempty"` @@ -48,7 +51,7 @@ func NewRiskRuleWithDefaults() *RiskRule { // GetId returns the Id field value if set, zero value otherwise. func (o *RiskRule) GetId() string { - if o == nil || o.Id == nil { + if o == nil || isNil(o.Id) { var ret string return ret } @@ -58,7 +61,7 @@ func (o *RiskRule) GetId() string { // GetIdOk returns a tuple with the Id field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *RiskRule) GetIdOk() (*string, bool) { - if o == nil || o.Id == nil { + if o == nil || isNil(o.Id) { return nil, false } return o.Id, true @@ -66,7 +69,7 @@ func (o *RiskRule) GetIdOk() (*string, bool) { // HasId returns a boolean if a field has been set. func (o *RiskRule) HasId() bool { - if o != nil && o.Id != nil { + if o != nil && !isNil(o.Id) { return true } @@ -80,7 +83,7 @@ func (o *RiskRule) SetId(v string) { // GetName returns the Name field value if set, zero value otherwise. func (o *RiskRule) GetName() string { - if o == nil || o.Name == nil { + if o == nil || isNil(o.Name) { var ret string return ret } @@ -90,7 +93,7 @@ func (o *RiskRule) 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 *RiskRule) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { + if o == nil || isNil(o.Name) { return nil, false } return o.Name, true @@ -98,7 +101,7 @@ func (o *RiskRule) GetNameOk() (*string, bool) { // HasName returns a boolean if a field has been set. func (o *RiskRule) HasName() bool { - if o != nil && o.Name != nil { + if o != nil && !isNil(o.Name) { return true } @@ -112,7 +115,7 @@ func (o *RiskRule) SetName(v string) { // GetDescription returns the Description field value if set, zero value otherwise. func (o *RiskRule) GetDescription() string { - if o == nil || o.Description == nil { + if o == nil || isNil(o.Description) { var ret string return ret } @@ -122,7 +125,7 @@ func (o *RiskRule) 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 *RiskRule) GetDescriptionOk() (*string, bool) { - if o == nil || o.Description == nil { + if o == nil || isNil(o.Description) { return nil, false } return o.Description, true @@ -130,7 +133,7 @@ func (o *RiskRule) GetDescriptionOk() (*string, bool) { // HasDescription returns a boolean if a field has been set. func (o *RiskRule) HasDescription() bool { - if o != nil && o.Description != nil { + if o != nil && !isNil(o.Description) { return true } @@ -144,7 +147,7 @@ func (o *RiskRule) SetDescription(v string) { // GetType returns the Type field value if set, zero value otherwise. func (o *RiskRule) GetType() string { - if o == nil || o.Type == nil { + if o == nil || isNil(o.Type) { var ret string return ret } @@ -154,7 +157,7 @@ func (o *RiskRule) 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 *RiskRule) GetTypeOk() (*string, bool) { - if o == nil || o.Type == nil { + if o == nil || isNil(o.Type) { return nil, false } return o.Type, true @@ -162,7 +165,7 @@ func (o *RiskRule) GetTypeOk() (*string, bool) { // HasType returns a boolean if a field has been set. func (o *RiskRule) HasType() bool { - if o != nil && o.Type != nil { + if o != nil && !isNil(o.Type) { return true } @@ -176,7 +179,7 @@ func (o *RiskRule) SetType(v string) { // GetTarget returns the Target field value if set, zero value otherwise. func (o *RiskRule) GetTarget() string { - if o == nil || o.Target == nil { + if o == nil || isNil(o.Target) { var ret string return ret } @@ -186,7 +189,7 @@ func (o *RiskRule) 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 *RiskRule) GetTargetOk() (*string, bool) { - if o == nil || o.Target == nil { + if o == nil || isNil(o.Target) { return nil, false } return o.Target, true @@ -194,7 +197,7 @@ func (o *RiskRule) GetTargetOk() (*string, bool) { // HasTarget returns a boolean if a field has been set. func (o *RiskRule) HasTarget() bool { - if o != nil && o.Target != nil { + if o != nil && !isNil(o.Target) { return true } @@ -208,7 +211,7 @@ func (o *RiskRule) SetTarget(v string) { // GetFilters returns the Filters field value if set, zero value otherwise. func (o *RiskRule) GetFilters() []string { - if o == nil || o.Filters == nil { + if o == nil || isNil(o.Filters) { var ret []string return ret } @@ -218,7 +221,7 @@ func (o *RiskRule) GetFilters() []string { // GetFiltersOk returns a tuple with the Filters field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *RiskRule) GetFiltersOk() ([]string, bool) { - if o == nil || o.Filters == nil { + if o == nil || isNil(o.Filters) { return nil, false } return o.Filters, true @@ -226,7 +229,7 @@ func (o *RiskRule) GetFiltersOk() ([]string, bool) { // HasFilters returns a boolean if a field has been set. func (o *RiskRule) HasFilters() bool { - if o != nil && o.Filters != nil { + if o != nil && !isNil(o.Filters) { return true } @@ -240,7 +243,7 @@ func (o *RiskRule) SetFilters(v []string) { // GetSource returns the Source field value if set, zero value otherwise. func (o *RiskRule) GetSource() Source { - if o == nil || o.Source == nil { + if o == nil || isNil(o.Source) { var ret Source return ret } @@ -250,7 +253,7 @@ func (o *RiskRule) GetSource() Source { // GetSourceOk returns a tuple with the Source field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *RiskRule) GetSourceOk() (*Source, bool) { - if o == nil || o.Source == nil { + if o == nil || isNil(o.Source) { return nil, false } return o.Source, true @@ -258,7 +261,7 @@ func (o *RiskRule) GetSourceOk() (*Source, bool) { // HasSource returns a boolean if a field has been set. func (o *RiskRule) HasSource() bool { - if o != nil && o.Source != nil { + if o != nil && !isNil(o.Source) { return true } @@ -271,29 +274,37 @@ func (o *RiskRule) SetSource(v Source) { } func (o RiskRule) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RiskRule) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { + if !isNil(o.Id) { toSerialize["id"] = o.Id } - if o.Name != nil { + if !isNil(o.Name) { toSerialize["name"] = o.Name } - if o.Description != nil { + if !isNil(o.Description) { toSerialize["description"] = o.Description } - if o.Type != nil { + if !isNil(o.Type) { toSerialize["type"] = o.Type } - if o.Target != nil { + if !isNil(o.Target) { toSerialize["target"] = o.Target } - if o.Filters != nil { + if !isNil(o.Filters) { toSerialize["filters"] = o.Filters } - if o.Source != nil { + if !isNil(o.Source) { toSerialize["source"] = o.Source } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableRiskRule struct { diff --git a/model_risk_user.go b/model_risk_user.go index 9fb824f..f920100 100644 --- a/model_risk_user.go +++ b/model_risk_user.go @@ -1,19 +1,22 @@ /* OneLogin API -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) +OpenAPI Specification for OneLogin -API version: 3.0.0-alpha.1 +API version: 3.1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package openapi +package onelogin import ( "encoding/json" ) +// checks if the RiskUser type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RiskUser{} + // RiskUser An Object containing User details. type RiskUser struct { // A unique identifier for the user. @@ -72,7 +75,7 @@ func (o *RiskUser) SetId(v string) { // GetName returns the Name field value if set, zero value otherwise. func (o *RiskUser) GetName() string { - if o == nil || o.Name == nil { + if o == nil || isNil(o.Name) { var ret string return ret } @@ -82,7 +85,7 @@ func (o *RiskUser) 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 *RiskUser) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { + if o == nil || isNil(o.Name) { return nil, false } return o.Name, true @@ -90,7 +93,7 @@ func (o *RiskUser) GetNameOk() (*string, bool) { // HasName returns a boolean if a field has been set. func (o *RiskUser) HasName() bool { - if o != nil && o.Name != nil { + if o != nil && !isNil(o.Name) { return true } @@ -104,7 +107,7 @@ func (o *RiskUser) SetName(v string) { // GetAuthenticated returns the Authenticated field value if set, zero value otherwise. func (o *RiskUser) GetAuthenticated() bool { - if o == nil || o.Authenticated == nil { + if o == nil || isNil(o.Authenticated) { var ret bool return ret } @@ -114,7 +117,7 @@ func (o *RiskUser) GetAuthenticated() bool { // GetAuthenticatedOk returns a tuple with the Authenticated field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *RiskUser) GetAuthenticatedOk() (*bool, bool) { - if o == nil || o.Authenticated == nil { + if o == nil || isNil(o.Authenticated) { return nil, false } return o.Authenticated, true @@ -122,7 +125,7 @@ func (o *RiskUser) GetAuthenticatedOk() (*bool, bool) { // HasAuthenticated returns a boolean if a field has been set. func (o *RiskUser) HasAuthenticated() bool { - if o != nil && o.Authenticated != nil { + if o != nil && !isNil(o.Authenticated) { return true } @@ -135,17 +138,23 @@ func (o *RiskUser) SetAuthenticated(v bool) { } func (o RiskUser) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["id"] = o.Id + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.Name != nil { + return json.Marshal(toSerialize) +} + +func (o RiskUser) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + if !isNil(o.Name) { toSerialize["name"] = o.Name } - if o.Authenticated != nil { + if !isNil(o.Authenticated) { toSerialize["authenticated"] = o.Authenticated } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableRiskUser struct { diff --git a/model_role.go b/model_role.go index 0d0fc1f..96f2aa9 100644 --- a/model_role.go +++ b/model_role.go @@ -1,25 +1,33 @@ /* OneLogin API -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) +OpenAPI Specification for OneLogin -API version: 3.0.0-alpha.1 +API version: 3.1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package openapi +package onelogin import ( "encoding/json" ) +// checks if the Role type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Role{} + // Role struct for Role type Role struct { + // Role ID Id *int32 `json:"id,omitempty"` + // The name of the role. Name string `json:"name"` + // A list of app IDs that will be assigned to the role. Apps []int32 `json:"apps,omitempty"` + // A list of user IDs to assign to the role. Users []int32 `json:"users,omitempty"` + // A list of user IDs to assign as role administrators. Admins []int32 `json:"admins,omitempty"` } @@ -43,7 +51,7 @@ func NewRoleWithDefaults() *Role { // GetId returns the Id field value if set, zero value otherwise. func (o *Role) GetId() int32 { - if o == nil || o.Id == nil { + if o == nil || isNil(o.Id) { var ret int32 return ret } @@ -53,7 +61,7 @@ func (o *Role) GetId() int32 { // GetIdOk returns a tuple with the Id field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Role) GetIdOk() (*int32, bool) { - if o == nil || o.Id == nil { + if o == nil || isNil(o.Id) { return nil, false } return o.Id, true @@ -61,7 +69,7 @@ func (o *Role) GetIdOk() (*int32, bool) { // HasId returns a boolean if a field has been set. func (o *Role) HasId() bool { - if o != nil && o.Id != nil { + if o != nil && !isNil(o.Id) { return true } @@ -99,7 +107,7 @@ func (o *Role) SetName(v string) { // GetApps returns the Apps field value if set, zero value otherwise. func (o *Role) GetApps() []int32 { - if o == nil || o.Apps == nil { + if o == nil || isNil(o.Apps) { var ret []int32 return ret } @@ -109,7 +117,7 @@ func (o *Role) GetApps() []int32 { // GetAppsOk returns a tuple with the Apps field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Role) GetAppsOk() ([]int32, bool) { - if o == nil || o.Apps == nil { + if o == nil || isNil(o.Apps) { return nil, false } return o.Apps, true @@ -117,7 +125,7 @@ func (o *Role) GetAppsOk() ([]int32, bool) { // HasApps returns a boolean if a field has been set. func (o *Role) HasApps() bool { - if o != nil && o.Apps != nil { + if o != nil && !isNil(o.Apps) { return true } @@ -131,7 +139,7 @@ func (o *Role) SetApps(v []int32) { // GetUsers returns the Users field value if set, zero value otherwise. func (o *Role) GetUsers() []int32 { - if o == nil || o.Users == nil { + if o == nil || isNil(o.Users) { var ret []int32 return ret } @@ -141,7 +149,7 @@ func (o *Role) 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 *Role) GetUsersOk() ([]int32, bool) { - if o == nil || o.Users == nil { + if o == nil || isNil(o.Users) { return nil, false } return o.Users, true @@ -149,7 +157,7 @@ func (o *Role) GetUsersOk() ([]int32, bool) { // HasUsers returns a boolean if a field has been set. func (o *Role) HasUsers() bool { - if o != nil && o.Users != nil { + if o != nil && !isNil(o.Users) { return true } @@ -163,7 +171,7 @@ func (o *Role) SetUsers(v []int32) { // GetAdmins returns the Admins field value if set, zero value otherwise. func (o *Role) GetAdmins() []int32 { - if o == nil || o.Admins == nil { + if o == nil || isNil(o.Admins) { var ret []int32 return ret } @@ -173,7 +181,7 @@ func (o *Role) GetAdmins() []int32 { // GetAdminsOk returns a tuple with the Admins field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Role) GetAdminsOk() ([]int32, bool) { - if o == nil || o.Admins == nil { + if o == nil || isNil(o.Admins) { return nil, false } return o.Admins, true @@ -181,7 +189,7 @@ func (o *Role) GetAdminsOk() ([]int32, bool) { // HasAdmins returns a boolean if a field has been set. func (o *Role) HasAdmins() bool { - if o != nil && o.Admins != nil { + if o != nil && !isNil(o.Admins) { return true } @@ -194,23 +202,27 @@ func (o *Role) SetAdmins(v []int32) { } func (o Role) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err } - if true { - toSerialize["name"] = o.Name - } - if o.Apps != nil { + return json.Marshal(toSerialize) +} + +func (o Role) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: id is readOnly + toSerialize["name"] = o.Name + if !isNil(o.Apps) { toSerialize["apps"] = o.Apps } - if o.Users != nil { + if !isNil(o.Users) { toSerialize["users"] = o.Users } - if o.Admins != nil { + if !isNil(o.Admins) { toSerialize["admins"] = o.Admins } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableRole struct { diff --git a/model_rule_action.go b/model_rule_action.go new file mode 100644 index 0000000..bd8cd73 --- /dev/null +++ b/model_rule_action.go @@ -0,0 +1,164 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the RuleAction type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RuleAction{} + +// RuleAction struct for RuleAction +type RuleAction struct { + // Name of the Action + Name *string `json:"name,omitempty"` + // The unique identifier of the action. This should be used when defining actions for a User Mapping. + Value *string `json:"value,omitempty"` +} + +// NewRuleAction instantiates a new RuleAction 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 NewRuleAction() *RuleAction { + this := RuleAction{} + return &this +} + +// NewRuleActionWithDefaults instantiates a new RuleAction 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 NewRuleActionWithDefaults() *RuleAction { + this := RuleAction{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *RuleAction) GetName() string { + if o == nil || isNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// 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 *RuleAction) GetNameOk() (*string, bool) { + if o == nil || isNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *RuleAction) HasName() bool { + if o != nil && !isNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *RuleAction) SetName(v string) { + o.Name = &v +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *RuleAction) GetValue() string { + if o == nil || isNil(o.Value) { + var ret string + return ret + } + return *o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RuleAction) GetValueOk() (*string, bool) { + if o == nil || isNil(o.Value) { + return nil, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *RuleAction) HasValue() bool { + if o != nil && !isNil(o.Value) { + return true + } + + return false +} + +// SetValue gets a reference to the given string and assigns it to the Value field. +func (o *RuleAction) SetValue(v string) { + o.Value = &v +} + +func (o RuleAction) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RuleAction) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.Name) { + toSerialize["name"] = o.Name + } + if !isNil(o.Value) { + toSerialize["value"] = o.Value + } + return toSerialize, nil +} + +type NullableRuleAction struct { + value *RuleAction + isSet bool +} + +func (v NullableRuleAction) Get() *RuleAction { + return v.value +} + +func (v *NullableRuleAction) Set(val *RuleAction) { + v.value = val + v.isSet = true +} + +func (v NullableRuleAction) IsSet() bool { + return v.isSet +} + +func (v *NullableRuleAction) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRuleAction(val *RuleAction) *NullableRuleAction { + return &NullableRuleAction{value: val, isSet: true} +} + +func (v NullableRuleAction) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRuleAction) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_rule_condition.go b/model_rule_condition.go new file mode 100644 index 0000000..8fce1fa --- /dev/null +++ b/model_rule_condition.go @@ -0,0 +1,164 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the RuleCondition type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RuleCondition{} + +// RuleCondition struct for RuleCondition +type RuleCondition struct { + // Name of the operator + Name *string `json:"name,omitempty"` + // The condition operator value to use when creating or updating rules. + Value *string `json:"value,omitempty"` +} + +// NewRuleCondition instantiates a new RuleCondition 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 NewRuleCondition() *RuleCondition { + this := RuleCondition{} + return &this +} + +// NewRuleConditionWithDefaults instantiates a new RuleCondition 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 NewRuleConditionWithDefaults() *RuleCondition { + this := RuleCondition{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *RuleCondition) GetName() string { + if o == nil || isNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// 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 *RuleCondition) GetNameOk() (*string, bool) { + if o == nil || isNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *RuleCondition) HasName() bool { + if o != nil && !isNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *RuleCondition) SetName(v string) { + o.Name = &v +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *RuleCondition) GetValue() string { + if o == nil || isNil(o.Value) { + var ret string + return ret + } + return *o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RuleCondition) GetValueOk() (*string, bool) { + if o == nil || isNil(o.Value) { + return nil, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *RuleCondition) HasValue() bool { + if o != nil && !isNil(o.Value) { + return true + } + + return false +} + +// SetValue gets a reference to the given string and assigns it to the Value field. +func (o *RuleCondition) SetValue(v string) { + o.Value = &v +} + +func (o RuleCondition) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RuleCondition) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.Name) { + toSerialize["name"] = o.Name + } + if !isNil(o.Value) { + toSerialize["value"] = o.Value + } + return toSerialize, nil +} + +type NullableRuleCondition struct { + value *RuleCondition + isSet bool +} + +func (v NullableRuleCondition) Get() *RuleCondition { + return v.value +} + +func (v *NullableRuleCondition) Set(val *RuleCondition) { + v.value = val + v.isSet = true +} + +func (v NullableRuleCondition) IsSet() bool { + return v.isSet +} + +func (v *NullableRuleCondition) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRuleCondition(val *RuleCondition) *NullableRuleCondition { + return &NullableRuleCondition{value: val, isSet: true} +} + +func (v NullableRuleCondition) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRuleCondition) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_saml_app.go b/model_saml_app.go new file mode 100644 index 0000000..527ae5c --- /dev/null +++ b/model_saml_app.go @@ -0,0 +1,722 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the SamlApp type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SamlApp{} + +// SamlApp struct for SamlApp +type SamlApp struct { + // Apps unique ID in OneLogin. + Id *int32 `json:"id,omitempty"` + // The name of the app. + Name string `json:"name"` + // Indicates if the app is visible in the OneLogin portal. + Visible bool `json:"visible"` + // Freeform description of the app. + Description string `json:"description"` + // Freeform notes about the app. + Notes *string `json:"notes,omitempty"` + // A link to the apps icon url + IconUrl *string `json:"icon_url,omitempty"` + AuthMethod *AuthMethod `json:"auth_method,omitempty"` + // The security policy assigned to the app. + PolicyId int32 `json:"policy_id"` + // Indicates whether or not administrators can access the app as a user that they have assumed control over. + AllowAssumedSignin *bool `json:"allow_assumed_signin,omitempty"` + // ID of the OneLogin portal tab that the app is assigned to. + TabId *int32 `json:"tab_id,omitempty"` + // ID of the connector to base the app from. + ConnectorId int32 `json:"connector_id"` + // the date the app was created + CreatedAt *string `json:"created_at,omitempty"` + // the date the app was last updated + UpdatedAt *string `json:"updated_at,omitempty"` + // List of Role IDs that are assigned to the app. On App Create or Update the entire array is replaced with the values provided. + RoleIds []int32 `json:"role_ids,omitempty"` + Provisioning *GenericAppProvisioning `json:"provisioning,omitempty"` + Parameters SamlAppAllOfParameters `json:"parameters"` + EnforcementPoint *EnforcementPoint `json:"enforcement_point,omitempty"` + Configuration ConfigurationSaml `json:"configuration"` + Sso *SsoSaml `json:"sso,omitempty"` +} + +// NewSamlApp instantiates a new SamlApp 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 NewSamlApp(name string, visible bool, description string, policyId int32, connectorId int32, parameters SamlAppAllOfParameters, configuration ConfigurationSaml) *SamlApp { + this := SamlApp{} + this.Name = name + this.Visible = visible + this.Description = description + this.PolicyId = policyId + this.ConnectorId = connectorId + this.Parameters = parameters + this.Configuration = configuration + return &this +} + +// NewSamlAppWithDefaults instantiates a new SamlApp 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 NewSamlAppWithDefaults() *SamlApp { + this := SamlApp{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *SamlApp) GetId() int32 { + if o == nil || isNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SamlApp) GetIdOk() (*int32, bool) { + if o == nil || isNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *SamlApp) HasId() bool { + if o != nil && !isNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *SamlApp) SetId(v int32) { + o.Id = &v +} + +// GetName returns the Name field value +func (o *SamlApp) 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 *SamlApp) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *SamlApp) SetName(v string) { + o.Name = v +} + +// GetVisible returns the Visible field value +func (o *SamlApp) GetVisible() bool { + if o == nil { + var ret bool + return ret + } + + return o.Visible +} + +// GetVisibleOk returns a tuple with the Visible field value +// and a boolean to check if the value has been set. +func (o *SamlApp) GetVisibleOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Visible, true +} + +// SetVisible sets field value +func (o *SamlApp) SetVisible(v bool) { + o.Visible = v +} + +// GetDescription returns the Description field value +func (o *SamlApp) GetDescription() string { + if o == nil { + var ret string + return ret + } + + return o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value +// and a boolean to check if the value has been set. +func (o *SamlApp) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Description, true +} + +// SetDescription sets field value +func (o *SamlApp) SetDescription(v string) { + o.Description = v +} + +// GetNotes returns the Notes field value if set, zero value otherwise. +func (o *SamlApp) GetNotes() string { + if o == nil || isNil(o.Notes) { + var ret string + return ret + } + return *o.Notes +} + +// GetNotesOk returns a tuple with the Notes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SamlApp) GetNotesOk() (*string, bool) { + if o == nil || isNil(o.Notes) { + return nil, false + } + return o.Notes, true +} + +// HasNotes returns a boolean if a field has been set. +func (o *SamlApp) HasNotes() bool { + if o != nil && !isNil(o.Notes) { + return true + } + + return false +} + +// SetNotes gets a reference to the given string and assigns it to the Notes field. +func (o *SamlApp) SetNotes(v string) { + o.Notes = &v +} + +// GetIconUrl returns the IconUrl field value if set, zero value otherwise. +func (o *SamlApp) GetIconUrl() string { + if o == nil || isNil(o.IconUrl) { + var ret string + return ret + } + return *o.IconUrl +} + +// 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 *SamlApp) GetIconUrlOk() (*string, bool) { + if o == nil || isNil(o.IconUrl) { + return nil, false + } + return o.IconUrl, true +} + +// HasIconUrl returns a boolean if a field has been set. +func (o *SamlApp) HasIconUrl() bool { + if o != nil && !isNil(o.IconUrl) { + return true + } + + return false +} + +// SetIconUrl gets a reference to the given string and assigns it to the IconUrl field. +func (o *SamlApp) SetIconUrl(v string) { + o.IconUrl = &v +} + +// GetAuthMethod returns the AuthMethod field value if set, zero value otherwise. +func (o *SamlApp) GetAuthMethod() AuthMethod { + if o == nil || isNil(o.AuthMethod) { + var ret AuthMethod + return ret + } + return *o.AuthMethod +} + +// GetAuthMethodOk returns a tuple with the AuthMethod field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SamlApp) GetAuthMethodOk() (*AuthMethod, bool) { + if o == nil || isNil(o.AuthMethod) { + return nil, false + } + return o.AuthMethod, true +} + +// HasAuthMethod returns a boolean if a field has been set. +func (o *SamlApp) HasAuthMethod() bool { + if o != nil && !isNil(o.AuthMethod) { + return true + } + + return false +} + +// SetAuthMethod gets a reference to the given AuthMethod and assigns it to the AuthMethod field. +func (o *SamlApp) SetAuthMethod(v AuthMethod) { + o.AuthMethod = &v +} + +// GetPolicyId returns the PolicyId field value +func (o *SamlApp) GetPolicyId() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.PolicyId +} + +// GetPolicyIdOk returns a tuple with the PolicyId field value +// and a boolean to check if the value has been set. +func (o *SamlApp) GetPolicyIdOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.PolicyId, true +} + +// SetPolicyId sets field value +func (o *SamlApp) SetPolicyId(v int32) { + o.PolicyId = v +} + +// GetAllowAssumedSignin returns the AllowAssumedSignin field value if set, zero value otherwise. +func (o *SamlApp) GetAllowAssumedSignin() bool { + if o == nil || isNil(o.AllowAssumedSignin) { + var ret bool + return ret + } + return *o.AllowAssumedSignin +} + +// GetAllowAssumedSigninOk returns a tuple with the AllowAssumedSignin field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SamlApp) GetAllowAssumedSigninOk() (*bool, bool) { + if o == nil || isNil(o.AllowAssumedSignin) { + return nil, false + } + return o.AllowAssumedSignin, true +} + +// HasAllowAssumedSignin returns a boolean if a field has been set. +func (o *SamlApp) HasAllowAssumedSignin() bool { + if o != nil && !isNil(o.AllowAssumedSignin) { + return true + } + + return false +} + +// SetAllowAssumedSignin gets a reference to the given bool and assigns it to the AllowAssumedSignin field. +func (o *SamlApp) SetAllowAssumedSignin(v bool) { + o.AllowAssumedSignin = &v +} + +// GetTabId returns the TabId field value if set, zero value otherwise. +func (o *SamlApp) GetTabId() int32 { + if o == nil || isNil(o.TabId) { + var ret int32 + return ret + } + return *o.TabId +} + +// GetTabIdOk returns a tuple with the TabId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SamlApp) GetTabIdOk() (*int32, bool) { + if o == nil || isNil(o.TabId) { + return nil, false + } + return o.TabId, true +} + +// HasTabId returns a boolean if a field has been set. +func (o *SamlApp) HasTabId() bool { + if o != nil && !isNil(o.TabId) { + return true + } + + return false +} + +// SetTabId gets a reference to the given int32 and assigns it to the TabId field. +func (o *SamlApp) SetTabId(v int32) { + o.TabId = &v +} + +// GetConnectorId returns the ConnectorId field value +func (o *SamlApp) GetConnectorId() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.ConnectorId +} + +// GetConnectorIdOk returns a tuple with the ConnectorId field value +// and a boolean to check if the value has been set. +func (o *SamlApp) GetConnectorIdOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.ConnectorId, true +} + +// SetConnectorId sets field value +func (o *SamlApp) SetConnectorId(v int32) { + o.ConnectorId = v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *SamlApp) GetCreatedAt() string { + if o == nil || isNil(o.CreatedAt) { + var ret string + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SamlApp) GetCreatedAtOk() (*string, bool) { + if o == nil || isNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *SamlApp) HasCreatedAt() bool { + if o != nil && !isNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given string and assigns it to the CreatedAt field. +func (o *SamlApp) SetCreatedAt(v string) { + o.CreatedAt = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *SamlApp) GetUpdatedAt() string { + if o == nil || isNil(o.UpdatedAt) { + var ret string + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SamlApp) GetUpdatedAtOk() (*string, bool) { + if o == nil || isNil(o.UpdatedAt) { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *SamlApp) HasUpdatedAt() bool { + if o != nil && !isNil(o.UpdatedAt) { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given string and assigns it to the UpdatedAt field. +func (o *SamlApp) SetUpdatedAt(v string) { + o.UpdatedAt = &v +} + +// GetRoleIds returns the RoleIds field value if set, zero value otherwise. +func (o *SamlApp) GetRoleIds() []int32 { + if o == nil || isNil(o.RoleIds) { + var ret []int32 + return ret + } + return o.RoleIds +} + +// GetRoleIdsOk returns a tuple with the RoleIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SamlApp) GetRoleIdsOk() ([]int32, bool) { + if o == nil || isNil(o.RoleIds) { + return nil, false + } + return o.RoleIds, true +} + +// HasRoleIds returns a boolean if a field has been set. +func (o *SamlApp) HasRoleIds() bool { + if o != nil && !isNil(o.RoleIds) { + return true + } + + return false +} + +// SetRoleIds gets a reference to the given []int32 and assigns it to the RoleIds field. +func (o *SamlApp) SetRoleIds(v []int32) { + o.RoleIds = v +} + +// GetProvisioning returns the Provisioning field value if set, zero value otherwise. +func (o *SamlApp) GetProvisioning() GenericAppProvisioning { + if o == nil || isNil(o.Provisioning) { + var ret GenericAppProvisioning + return ret + } + return *o.Provisioning +} + +// GetProvisioningOk returns a tuple with the Provisioning field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SamlApp) GetProvisioningOk() (*GenericAppProvisioning, bool) { + if o == nil || isNil(o.Provisioning) { + return nil, false + } + return o.Provisioning, true +} + +// HasProvisioning returns a boolean if a field has been set. +func (o *SamlApp) HasProvisioning() bool { + if o != nil && !isNil(o.Provisioning) { + return true + } + + return false +} + +// SetProvisioning gets a reference to the given GenericAppProvisioning and assigns it to the Provisioning field. +func (o *SamlApp) SetProvisioning(v GenericAppProvisioning) { + o.Provisioning = &v +} + +// GetParameters returns the Parameters field value +func (o *SamlApp) GetParameters() SamlAppAllOfParameters { + if o == nil { + var ret SamlAppAllOfParameters + return ret + } + + return o.Parameters +} + +// GetParametersOk returns a tuple with the Parameters field value +// and a boolean to check if the value has been set. +func (o *SamlApp) GetParametersOk() (*SamlAppAllOfParameters, bool) { + if o == nil { + return nil, false + } + return &o.Parameters, true +} + +// SetParameters sets field value +func (o *SamlApp) SetParameters(v SamlAppAllOfParameters) { + o.Parameters = v +} + +// GetEnforcementPoint returns the EnforcementPoint field value if set, zero value otherwise. +func (o *SamlApp) GetEnforcementPoint() EnforcementPoint { + if o == nil || isNil(o.EnforcementPoint) { + var ret EnforcementPoint + return ret + } + return *o.EnforcementPoint +} + +// GetEnforcementPointOk returns a tuple with the EnforcementPoint field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SamlApp) GetEnforcementPointOk() (*EnforcementPoint, bool) { + if o == nil || isNil(o.EnforcementPoint) { + return nil, false + } + return o.EnforcementPoint, true +} + +// HasEnforcementPoint returns a boolean if a field has been set. +func (o *SamlApp) HasEnforcementPoint() bool { + if o != nil && !isNil(o.EnforcementPoint) { + return true + } + + return false +} + +// SetEnforcementPoint gets a reference to the given EnforcementPoint and assigns it to the EnforcementPoint field. +func (o *SamlApp) SetEnforcementPoint(v EnforcementPoint) { + o.EnforcementPoint = &v +} + +// GetConfiguration returns the Configuration field value +func (o *SamlApp) GetConfiguration() ConfigurationSaml { + if o == nil { + var ret ConfigurationSaml + return ret + } + + return o.Configuration +} + +// GetConfigurationOk returns a tuple with the Configuration field value +// and a boolean to check if the value has been set. +func (o *SamlApp) GetConfigurationOk() (*ConfigurationSaml, bool) { + if o == nil { + return nil, false + } + return &o.Configuration, true +} + +// SetConfiguration sets field value +func (o *SamlApp) SetConfiguration(v ConfigurationSaml) { + o.Configuration = v +} + +// GetSso returns the Sso field value if set, zero value otherwise. +func (o *SamlApp) GetSso() SsoSaml { + if o == nil || isNil(o.Sso) { + var ret SsoSaml + return ret + } + return *o.Sso +} + +// GetSsoOk returns a tuple with the Sso field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SamlApp) GetSsoOk() (*SsoSaml, bool) { + if o == nil || isNil(o.Sso) { + return nil, false + } + return o.Sso, true +} + +// HasSso returns a boolean if a field has been set. +func (o *SamlApp) HasSso() bool { + if o != nil && !isNil(o.Sso) { + return true + } + + return false +} + +// SetSso gets a reference to the given SsoSaml and assigns it to the Sso field. +func (o *SamlApp) SetSso(v SsoSaml) { + o.Sso = &v +} + +func (o SamlApp) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SamlApp) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + // skip: id is readOnly + toSerialize["name"] = o.Name + toSerialize["visible"] = o.Visible + toSerialize["description"] = o.Description + if !isNil(o.Notes) { + toSerialize["notes"] = o.Notes + } + if !isNil(o.IconUrl) { + toSerialize["icon_url"] = o.IconUrl + } + if !isNil(o.AuthMethod) { + toSerialize["auth_method"] = o.AuthMethod + } + toSerialize["policy_id"] = o.PolicyId + if !isNil(o.AllowAssumedSignin) { + toSerialize["allow_assumed_signin"] = o.AllowAssumedSignin + } + if !isNil(o.TabId) { + toSerialize["tab_id"] = o.TabId + } + toSerialize["connector_id"] = o.ConnectorId + if !isNil(o.CreatedAt) { + toSerialize["created_at"] = o.CreatedAt + } + if !isNil(o.UpdatedAt) { + toSerialize["updated_at"] = o.UpdatedAt + } + if !isNil(o.RoleIds) { + toSerialize["role_ids"] = o.RoleIds + } + if !isNil(o.Provisioning) { + toSerialize["provisioning"] = o.Provisioning + } + toSerialize["parameters"] = o.Parameters + if !isNil(o.EnforcementPoint) { + toSerialize["enforcement_point"] = o.EnforcementPoint + } + toSerialize["configuration"] = o.Configuration + if !isNil(o.Sso) { + toSerialize["sso"] = o.Sso + } + return toSerialize, nil +} + +type NullableSamlApp struct { + value *SamlApp + isSet bool +} + +func (v NullableSamlApp) Get() *SamlApp { + return v.value +} + +func (v *NullableSamlApp) Set(val *SamlApp) { + v.value = val + v.isSet = true +} + +func (v NullableSamlApp) IsSet() bool { + return v.isSet +} + +func (v *NullableSamlApp) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSamlApp(val *SamlApp) *NullableSamlApp { + return &NullableSamlApp{value: val, isSet: true} +} + +func (v NullableSamlApp) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSamlApp) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_saml_app_all_of.go b/model_saml_app_all_of.go new file mode 100644 index 0000000..167af2a --- /dev/null +++ b/model_saml_app_all_of.go @@ -0,0 +1,180 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the SamlAppAllOf type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SamlAppAllOf{} + +// SamlAppAllOf struct for SamlAppAllOf +type SamlAppAllOf struct { + Configuration ConfigurationSaml `json:"configuration"` + Sso *SsoSaml `json:"sso,omitempty"` + Parameters SamlAppAllOfParameters `json:"parameters"` +} + +// NewSamlAppAllOf instantiates a new SamlAppAllOf 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 NewSamlAppAllOf(configuration ConfigurationSaml, parameters SamlAppAllOfParameters) *SamlAppAllOf { + this := SamlAppAllOf{} + this.Configuration = configuration + this.Parameters = parameters + return &this +} + +// NewSamlAppAllOfWithDefaults instantiates a new SamlAppAllOf 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 NewSamlAppAllOfWithDefaults() *SamlAppAllOf { + this := SamlAppAllOf{} + return &this +} + +// GetConfiguration returns the Configuration field value +func (o *SamlAppAllOf) GetConfiguration() ConfigurationSaml { + if o == nil { + var ret ConfigurationSaml + return ret + } + + return o.Configuration +} + +// GetConfigurationOk returns a tuple with the Configuration field value +// and a boolean to check if the value has been set. +func (o *SamlAppAllOf) GetConfigurationOk() (*ConfigurationSaml, bool) { + if o == nil { + return nil, false + } + return &o.Configuration, true +} + +// SetConfiguration sets field value +func (o *SamlAppAllOf) SetConfiguration(v ConfigurationSaml) { + o.Configuration = v +} + +// GetSso returns the Sso field value if set, zero value otherwise. +func (o *SamlAppAllOf) GetSso() SsoSaml { + if o == nil || isNil(o.Sso) { + var ret SsoSaml + return ret + } + return *o.Sso +} + +// GetSsoOk returns a tuple with the Sso field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SamlAppAllOf) GetSsoOk() (*SsoSaml, bool) { + if o == nil || isNil(o.Sso) { + return nil, false + } + return o.Sso, true +} + +// HasSso returns a boolean if a field has been set. +func (o *SamlAppAllOf) HasSso() bool { + if o != nil && !isNil(o.Sso) { + return true + } + + return false +} + +// SetSso gets a reference to the given SsoSaml and assigns it to the Sso field. +func (o *SamlAppAllOf) SetSso(v SsoSaml) { + o.Sso = &v +} + +// GetParameters returns the Parameters field value +func (o *SamlAppAllOf) GetParameters() SamlAppAllOfParameters { + if o == nil { + var ret SamlAppAllOfParameters + return ret + } + + return o.Parameters +} + +// GetParametersOk returns a tuple with the Parameters field value +// and a boolean to check if the value has been set. +func (o *SamlAppAllOf) GetParametersOk() (*SamlAppAllOfParameters, bool) { + if o == nil { + return nil, false + } + return &o.Parameters, true +} + +// SetParameters sets field value +func (o *SamlAppAllOf) SetParameters(v SamlAppAllOfParameters) { + o.Parameters = v +} + +func (o SamlAppAllOf) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SamlAppAllOf) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["configuration"] = o.Configuration + if !isNil(o.Sso) { + toSerialize["sso"] = o.Sso + } + toSerialize["parameters"] = o.Parameters + return toSerialize, nil +} + +type NullableSamlAppAllOf struct { + value *SamlAppAllOf + isSet bool +} + +func (v NullableSamlAppAllOf) Get() *SamlAppAllOf { + return v.value +} + +func (v *NullableSamlAppAllOf) Set(val *SamlAppAllOf) { + v.value = val + v.isSet = true +} + +func (v NullableSamlAppAllOf) IsSet() bool { + return v.isSet +} + +func (v *NullableSamlAppAllOf) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSamlAppAllOf(val *SamlAppAllOf) *NullableSamlAppAllOf { + return &NullableSamlAppAllOf{value: val, isSet: true} +} + +func (v NullableSamlAppAllOf) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSamlAppAllOf) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_saml_app_all_of_parameters.go b/model_saml_app_all_of_parameters.go new file mode 100644 index 0000000..fc24f88 --- /dev/null +++ b/model_saml_app_all_of_parameters.go @@ -0,0 +1,117 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the SamlAppAllOfParameters type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SamlAppAllOfParameters{} + +// SamlAppAllOfParameters struct for SamlAppAllOfParameters +type SamlAppAllOfParameters struct { + SamlUsername SamlAppAllOfParametersSamlUsername `json:"saml_username"` +} + +// NewSamlAppAllOfParameters instantiates a new SamlAppAllOfParameters 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 NewSamlAppAllOfParameters(samlUsername SamlAppAllOfParametersSamlUsername) *SamlAppAllOfParameters { + this := SamlAppAllOfParameters{} + this.SamlUsername = samlUsername + return &this +} + +// NewSamlAppAllOfParametersWithDefaults instantiates a new SamlAppAllOfParameters 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 NewSamlAppAllOfParametersWithDefaults() *SamlAppAllOfParameters { + this := SamlAppAllOfParameters{} + return &this +} + +// GetSamlUsername returns the SamlUsername field value +func (o *SamlAppAllOfParameters) GetSamlUsername() SamlAppAllOfParametersSamlUsername { + if o == nil { + var ret SamlAppAllOfParametersSamlUsername + return ret + } + + return o.SamlUsername +} + +// GetSamlUsernameOk returns a tuple with the SamlUsername field value +// and a boolean to check if the value has been set. +func (o *SamlAppAllOfParameters) GetSamlUsernameOk() (*SamlAppAllOfParametersSamlUsername, bool) { + if o == nil { + return nil, false + } + return &o.SamlUsername, true +} + +// SetSamlUsername sets field value +func (o *SamlAppAllOfParameters) SetSamlUsername(v SamlAppAllOfParametersSamlUsername) { + o.SamlUsername = v +} + +func (o SamlAppAllOfParameters) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SamlAppAllOfParameters) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["saml_username"] = o.SamlUsername + return toSerialize, nil +} + +type NullableSamlAppAllOfParameters struct { + value *SamlAppAllOfParameters + isSet bool +} + +func (v NullableSamlAppAllOfParameters) Get() *SamlAppAllOfParameters { + return v.value +} + +func (v *NullableSamlAppAllOfParameters) Set(val *SamlAppAllOfParameters) { + v.value = val + v.isSet = true +} + +func (v NullableSamlAppAllOfParameters) IsSet() bool { + return v.isSet +} + +func (v *NullableSamlAppAllOfParameters) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSamlAppAllOfParameters(val *SamlAppAllOfParameters) *NullableSamlAppAllOfParameters { + return &NullableSamlAppAllOfParameters{value: val, isSet: true} +} + +func (v NullableSamlAppAllOfParameters) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSamlAppAllOfParameters) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_saml_app_all_of_parameters_saml_username.go b/model_saml_app_all_of_parameters_saml_username.go new file mode 100644 index 0000000..ec0c2c2 --- /dev/null +++ b/model_saml_app_all_of_parameters_saml_username.go @@ -0,0 +1,117 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the SamlAppAllOfParametersSamlUsername type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SamlAppAllOfParametersSamlUsername{} + +// SamlAppAllOfParametersSamlUsername struct for SamlAppAllOfParametersSamlUsername +type SamlAppAllOfParametersSamlUsername struct { + UserAttributeMappings string `json:"user_attribute_mappings"` +} + +// NewSamlAppAllOfParametersSamlUsername instantiates a new SamlAppAllOfParametersSamlUsername 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 NewSamlAppAllOfParametersSamlUsername(userAttributeMappings string) *SamlAppAllOfParametersSamlUsername { + this := SamlAppAllOfParametersSamlUsername{} + this.UserAttributeMappings = userAttributeMappings + return &this +} + +// NewSamlAppAllOfParametersSamlUsernameWithDefaults instantiates a new SamlAppAllOfParametersSamlUsername 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 NewSamlAppAllOfParametersSamlUsernameWithDefaults() *SamlAppAllOfParametersSamlUsername { + this := SamlAppAllOfParametersSamlUsername{} + return &this +} + +// GetUserAttributeMappings returns the UserAttributeMappings field value +func (o *SamlAppAllOfParametersSamlUsername) GetUserAttributeMappings() string { + if o == nil { + var ret string + return ret + } + + return o.UserAttributeMappings +} + +// GetUserAttributeMappingsOk returns a tuple with the UserAttributeMappings field value +// and a boolean to check if the value has been set. +func (o *SamlAppAllOfParametersSamlUsername) GetUserAttributeMappingsOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.UserAttributeMappings, true +} + +// SetUserAttributeMappings sets field value +func (o *SamlAppAllOfParametersSamlUsername) SetUserAttributeMappings(v string) { + o.UserAttributeMappings = v +} + +func (o SamlAppAllOfParametersSamlUsername) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SamlAppAllOfParametersSamlUsername) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["user_attribute_mappings"] = o.UserAttributeMappings + return toSerialize, nil +} + +type NullableSamlAppAllOfParametersSamlUsername struct { + value *SamlAppAllOfParametersSamlUsername + isSet bool +} + +func (v NullableSamlAppAllOfParametersSamlUsername) Get() *SamlAppAllOfParametersSamlUsername { + return v.value +} + +func (v *NullableSamlAppAllOfParametersSamlUsername) Set(val *SamlAppAllOfParametersSamlUsername) { + v.value = val + v.isSet = true +} + +func (v NullableSamlAppAllOfParametersSamlUsername) IsSet() bool { + return v.isSet +} + +func (v *NullableSamlAppAllOfParametersSamlUsername) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSamlAppAllOfParametersSamlUsername(val *SamlAppAllOfParametersSamlUsername) *NullableSamlAppAllOfParametersSamlUsername { + return &NullableSamlAppAllOfParametersSamlUsername{value: val, isSet: true} +} + +func (v NullableSamlAppAllOfParametersSamlUsername) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSamlAppAllOfParametersSamlUsername) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_generate_saml_assertion_request.go b/model_saml_assert.go similarity index 53% rename from model_generate_saml_assertion_request.go rename to model_saml_assert.go index 1658d8f..74ced65 100644 --- a/model_generate_saml_assertion_request.go +++ b/model_saml_assert.go @@ -1,21 +1,24 @@ /* OneLogin API -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) +OpenAPI Specification for OneLogin -API version: 3.0.0-alpha.1 +API version: 3.1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package openapi +package onelogin import ( "encoding/json" ) -// GenerateSamlAssertionRequest struct for GenerateSamlAssertionRequest -type GenerateSamlAssertionRequest struct { +// checks if the SamlAssert type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SamlAssert{} + +// SamlAssert struct for SamlAssert +type SamlAssert struct { // Set this to the username or email of the OneLogin user accessing the app for which you want to generate a SAML token. UsernameOrEmail string `json:"username_or_email"` // Password of the OneLogin user accessing the app for which you want to generate a SAML token. @@ -24,16 +27,16 @@ type GenerateSamlAssertionRequest struct { AppId string `json:"app_id"` // Set to the subdomain of the OneLogin user accessing the app for which you want to generate a SAML token. Subdomain string `json:"subdomain"` - // Whitelisted IP address, if MFA is required and you need to honor IP address whitelisting defined in MFA policies. + // If you are using this API in a scenario in which MFA is required and you’ll need to be able to honor IP address whitelisting defined in MFA policies, provide this parameter and set its value to the whitelisted IP address that needs to be bypassed. IpAddress *string `json:"ip_address,omitempty"` } -// NewGenerateSamlAssertionRequest instantiates a new GenerateSamlAssertionRequest object +// NewSamlAssert instantiates a new SamlAssert 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 NewGenerateSamlAssertionRequest(usernameOrEmail string, password string, appId string, subdomain string) *GenerateSamlAssertionRequest { - this := GenerateSamlAssertionRequest{} +func NewSamlAssert(usernameOrEmail string, password string, appId string, subdomain string) *SamlAssert { + this := SamlAssert{} this.UsernameOrEmail = usernameOrEmail this.Password = password this.AppId = appId @@ -41,16 +44,16 @@ func NewGenerateSamlAssertionRequest(usernameOrEmail string, password string, ap return &this } -// NewGenerateSamlAssertionRequestWithDefaults instantiates a new GenerateSamlAssertionRequest object +// NewSamlAssertWithDefaults instantiates a new SamlAssert 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 NewGenerateSamlAssertionRequestWithDefaults() *GenerateSamlAssertionRequest { - this := GenerateSamlAssertionRequest{} +func NewSamlAssertWithDefaults() *SamlAssert { + this := SamlAssert{} return &this } // GetUsernameOrEmail returns the UsernameOrEmail field value -func (o *GenerateSamlAssertionRequest) GetUsernameOrEmail() string { +func (o *SamlAssert) GetUsernameOrEmail() string { if o == nil { var ret string return ret @@ -61,7 +64,7 @@ func (o *GenerateSamlAssertionRequest) GetUsernameOrEmail() string { // GetUsernameOrEmailOk returns a tuple with the UsernameOrEmail field value // and a boolean to check if the value has been set. -func (o *GenerateSamlAssertionRequest) GetUsernameOrEmailOk() (*string, bool) { +func (o *SamlAssert) GetUsernameOrEmailOk() (*string, bool) { if o == nil { return nil, false } @@ -69,12 +72,12 @@ func (o *GenerateSamlAssertionRequest) GetUsernameOrEmailOk() (*string, bool) { } // SetUsernameOrEmail sets field value -func (o *GenerateSamlAssertionRequest) SetUsernameOrEmail(v string) { +func (o *SamlAssert) SetUsernameOrEmail(v string) { o.UsernameOrEmail = v } // GetPassword returns the Password field value -func (o *GenerateSamlAssertionRequest) GetPassword() string { +func (o *SamlAssert) GetPassword() string { if o == nil { var ret string return ret @@ -85,7 +88,7 @@ func (o *GenerateSamlAssertionRequest) GetPassword() string { // GetPasswordOk returns a tuple with the Password field value // and a boolean to check if the value has been set. -func (o *GenerateSamlAssertionRequest) GetPasswordOk() (*string, bool) { +func (o *SamlAssert) GetPasswordOk() (*string, bool) { if o == nil { return nil, false } @@ -93,12 +96,12 @@ func (o *GenerateSamlAssertionRequest) GetPasswordOk() (*string, bool) { } // SetPassword sets field value -func (o *GenerateSamlAssertionRequest) SetPassword(v string) { +func (o *SamlAssert) SetPassword(v string) { o.Password = v } // GetAppId returns the AppId field value -func (o *GenerateSamlAssertionRequest) GetAppId() string { +func (o *SamlAssert) GetAppId() string { if o == nil { var ret string return ret @@ -109,7 +112,7 @@ func (o *GenerateSamlAssertionRequest) GetAppId() string { // GetAppIdOk returns a tuple with the AppId field value // and a boolean to check if the value has been set. -func (o *GenerateSamlAssertionRequest) GetAppIdOk() (*string, bool) { +func (o *SamlAssert) GetAppIdOk() (*string, bool) { if o == nil { return nil, false } @@ -117,12 +120,12 @@ func (o *GenerateSamlAssertionRequest) GetAppIdOk() (*string, bool) { } // SetAppId sets field value -func (o *GenerateSamlAssertionRequest) SetAppId(v string) { +func (o *SamlAssert) SetAppId(v string) { o.AppId = v } // GetSubdomain returns the Subdomain field value -func (o *GenerateSamlAssertionRequest) GetSubdomain() string { +func (o *SamlAssert) GetSubdomain() string { if o == nil { var ret string return ret @@ -133,7 +136,7 @@ func (o *GenerateSamlAssertionRequest) GetSubdomain() string { // GetSubdomainOk returns a tuple with the Subdomain field value // and a boolean to check if the value has been set. -func (o *GenerateSamlAssertionRequest) GetSubdomainOk() (*string, bool) { +func (o *SamlAssert) GetSubdomainOk() (*string, bool) { if o == nil { return nil, false } @@ -141,13 +144,13 @@ func (o *GenerateSamlAssertionRequest) GetSubdomainOk() (*string, bool) { } // SetSubdomain sets field value -func (o *GenerateSamlAssertionRequest) SetSubdomain(v string) { +func (o *SamlAssert) SetSubdomain(v string) { o.Subdomain = v } // GetIpAddress returns the IpAddress field value if set, zero value otherwise. -func (o *GenerateSamlAssertionRequest) GetIpAddress() string { - if o == nil || o.IpAddress == nil { +func (o *SamlAssert) GetIpAddress() string { + if o == nil || isNil(o.IpAddress) { var ret string return ret } @@ -156,16 +159,16 @@ func (o *GenerateSamlAssertionRequest) GetIpAddress() string { // GetIpAddressOk returns a tuple with the IpAddress field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *GenerateSamlAssertionRequest) GetIpAddressOk() (*string, bool) { - if o == nil || o.IpAddress == nil { +func (o *SamlAssert) GetIpAddressOk() (*string, bool) { + if o == nil || isNil(o.IpAddress) { return nil, false } return o.IpAddress, true } // HasIpAddress returns a boolean if a field has been set. -func (o *GenerateSamlAssertionRequest) HasIpAddress() bool { - if o != nil && o.IpAddress != nil { +func (o *SamlAssert) HasIpAddress() bool { + if o != nil && !isNil(o.IpAddress) { return true } @@ -173,62 +176,62 @@ func (o *GenerateSamlAssertionRequest) HasIpAddress() bool { } // SetIpAddress gets a reference to the given string and assigns it to the IpAddress field. -func (o *GenerateSamlAssertionRequest) SetIpAddress(v string) { +func (o *SamlAssert) SetIpAddress(v string) { o.IpAddress = &v } -func (o GenerateSamlAssertionRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["username_or_email"] = o.UsernameOrEmail - } - if true { - toSerialize["password"] = o.Password - } - if true { - toSerialize["app_id"] = o.AppId - } - if true { - toSerialize["subdomain"] = o.Subdomain +func (o SamlAssert) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.IpAddress != nil { + return json.Marshal(toSerialize) +} + +func (o SamlAssert) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["username_or_email"] = o.UsernameOrEmail + toSerialize["password"] = o.Password + toSerialize["app_id"] = o.AppId + toSerialize["subdomain"] = o.Subdomain + if !isNil(o.IpAddress) { toSerialize["ip_address"] = o.IpAddress } - return json.Marshal(toSerialize) + return toSerialize, nil } -type NullableGenerateSamlAssertionRequest struct { - value *GenerateSamlAssertionRequest +type NullableSamlAssert struct { + value *SamlAssert isSet bool } -func (v NullableGenerateSamlAssertionRequest) Get() *GenerateSamlAssertionRequest { +func (v NullableSamlAssert) Get() *SamlAssert { return v.value } -func (v *NullableGenerateSamlAssertionRequest) Set(val *GenerateSamlAssertionRequest) { +func (v *NullableSamlAssert) Set(val *SamlAssert) { v.value = val v.isSet = true } -func (v NullableGenerateSamlAssertionRequest) IsSet() bool { +func (v NullableSamlAssert) IsSet() bool { return v.isSet } -func (v *NullableGenerateSamlAssertionRequest) Unset() { +func (v *NullableSamlAssert) Unset() { v.value = nil v.isSet = false } -func NewNullableGenerateSamlAssertionRequest(val *GenerateSamlAssertionRequest) *NullableGenerateSamlAssertionRequest { - return &NullableGenerateSamlAssertionRequest{value: val, isSet: true} +func NewNullableSamlAssert(val *SamlAssert) *NullableSamlAssert { + return &NullableSamlAssert{value: val, isSet: true} } -func (v NullableGenerateSamlAssertionRequest) MarshalJSON() ([]byte, error) { +func (v NullableSamlAssert) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } -func (v *NullableGenerateSamlAssertionRequest) UnmarshalJSON(src []byte) error { +func (v *NullableSamlAssert) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/model_verify_factor_saml_request.go b/model_saml_factor.go similarity index 55% rename from model_verify_factor_saml_request.go rename to model_saml_factor.go index 5b2ca4f..7d0f95c 100644 --- a/model_verify_factor_saml_request.go +++ b/model_saml_factor.go @@ -1,55 +1,58 @@ /* OneLogin API -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) +OpenAPI Specification for OneLogin -API version: 3.0.0-alpha.1 +API version: 3.1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package openapi +package onelogin import ( "encoding/json" ) -// VerifyFactorSamlRequest struct for VerifyFactorSamlRequest -type VerifyFactorSamlRequest struct { +// checks if the SamlFactor type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SamlFactor{} + +// SamlFactor struct for SamlFactor +type SamlFactor struct { // App ID of the app for which you want to generate a SAML token. This is the app ID in OneLogin. AppId string `json:"app_id"` // Provide the MFA device_id you are submitting for verification. The device_id is supplied by the Generate SAML Assertion API. DeviceId string `json:"device_id"` - // state_token associated with the MFA device_id you are submitting. The state_token is supplied by the Generate SAML Assertion API. + // Provide the state_token associated with the MFA device_id you are submitting for verification. The state_token is supplied by the Generate SAML Assertion API. StateToken string `json:"state_token"` - // Provide the OTP value for the MFA factor you are submitting for verification. + // Provide the OTP value for the MFA factor you are submitting for verification. For some MFA factors; such as OneLogin OTP SMS, which requires the user to request an OTP; the otp_token value is not required, and if not included, returns a 200 OK - Pending result. You’ll make a subsequent Verify Factor API call to provide the otp_token value once it has been provided to the user. OtpToken *string `json:"otp_token,omitempty"` // When verifying MFA via Protect Push, set this to true to stop additional push notifications being sent to the OneLogin Protect device. DoNotNotify *bool `json:"do_not_notify,omitempty"` } -// NewVerifyFactorSamlRequest instantiates a new VerifyFactorSamlRequest object +// NewSamlFactor instantiates a new SamlFactor 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 NewVerifyFactorSamlRequest(appId string, deviceId string, stateToken string) *VerifyFactorSamlRequest { - this := VerifyFactorSamlRequest{} +func NewSamlFactor(appId string, deviceId string, stateToken string) *SamlFactor { + this := SamlFactor{} this.AppId = appId this.DeviceId = deviceId this.StateToken = stateToken return &this } -// NewVerifyFactorSamlRequestWithDefaults instantiates a new VerifyFactorSamlRequest object +// NewSamlFactorWithDefaults instantiates a new SamlFactor 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 NewVerifyFactorSamlRequestWithDefaults() *VerifyFactorSamlRequest { - this := VerifyFactorSamlRequest{} +func NewSamlFactorWithDefaults() *SamlFactor { + this := SamlFactor{} return &this } // GetAppId returns the AppId field value -func (o *VerifyFactorSamlRequest) GetAppId() string { +func (o *SamlFactor) GetAppId() string { if o == nil { var ret string return ret @@ -60,7 +63,7 @@ func (o *VerifyFactorSamlRequest) GetAppId() string { // GetAppIdOk returns a tuple with the AppId field value // and a boolean to check if the value has been set. -func (o *VerifyFactorSamlRequest) GetAppIdOk() (*string, bool) { +func (o *SamlFactor) GetAppIdOk() (*string, bool) { if o == nil { return nil, false } @@ -68,12 +71,12 @@ func (o *VerifyFactorSamlRequest) GetAppIdOk() (*string, bool) { } // SetAppId sets field value -func (o *VerifyFactorSamlRequest) SetAppId(v string) { +func (o *SamlFactor) SetAppId(v string) { o.AppId = v } // GetDeviceId returns the DeviceId field value -func (o *VerifyFactorSamlRequest) GetDeviceId() string { +func (o *SamlFactor) GetDeviceId() string { if o == nil { var ret string return ret @@ -84,7 +87,7 @@ func (o *VerifyFactorSamlRequest) GetDeviceId() string { // GetDeviceIdOk returns a tuple with the DeviceId field value // and a boolean to check if the value has been set. -func (o *VerifyFactorSamlRequest) GetDeviceIdOk() (*string, bool) { +func (o *SamlFactor) GetDeviceIdOk() (*string, bool) { if o == nil { return nil, false } @@ -92,12 +95,12 @@ func (o *VerifyFactorSamlRequest) GetDeviceIdOk() (*string, bool) { } // SetDeviceId sets field value -func (o *VerifyFactorSamlRequest) SetDeviceId(v string) { +func (o *SamlFactor) SetDeviceId(v string) { o.DeviceId = v } // GetStateToken returns the StateToken field value -func (o *VerifyFactorSamlRequest) GetStateToken() string { +func (o *SamlFactor) GetStateToken() string { if o == nil { var ret string return ret @@ -108,7 +111,7 @@ func (o *VerifyFactorSamlRequest) GetStateToken() string { // GetStateTokenOk returns a tuple with the StateToken field value // and a boolean to check if the value has been set. -func (o *VerifyFactorSamlRequest) GetStateTokenOk() (*string, bool) { +func (o *SamlFactor) GetStateTokenOk() (*string, bool) { if o == nil { return nil, false } @@ -116,13 +119,13 @@ func (o *VerifyFactorSamlRequest) GetStateTokenOk() (*string, bool) { } // SetStateToken sets field value -func (o *VerifyFactorSamlRequest) SetStateToken(v string) { +func (o *SamlFactor) SetStateToken(v string) { o.StateToken = v } // GetOtpToken returns the OtpToken field value if set, zero value otherwise. -func (o *VerifyFactorSamlRequest) GetOtpToken() string { - if o == nil || o.OtpToken == nil { +func (o *SamlFactor) GetOtpToken() string { + if o == nil || isNil(o.OtpToken) { var ret string return ret } @@ -131,16 +134,16 @@ func (o *VerifyFactorSamlRequest) GetOtpToken() string { // GetOtpTokenOk returns a tuple with the OtpToken field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *VerifyFactorSamlRequest) GetOtpTokenOk() (*string, bool) { - if o == nil || o.OtpToken == nil { +func (o *SamlFactor) GetOtpTokenOk() (*string, bool) { + if o == nil || isNil(o.OtpToken) { return nil, false } return o.OtpToken, true } // HasOtpToken returns a boolean if a field has been set. -func (o *VerifyFactorSamlRequest) HasOtpToken() bool { - if o != nil && o.OtpToken != nil { +func (o *SamlFactor) HasOtpToken() bool { + if o != nil && !isNil(o.OtpToken) { return true } @@ -148,13 +151,13 @@ func (o *VerifyFactorSamlRequest) HasOtpToken() bool { } // SetOtpToken gets a reference to the given string and assigns it to the OtpToken field. -func (o *VerifyFactorSamlRequest) SetOtpToken(v string) { +func (o *SamlFactor) SetOtpToken(v string) { o.OtpToken = &v } // GetDoNotNotify returns the DoNotNotify field value if set, zero value otherwise. -func (o *VerifyFactorSamlRequest) GetDoNotNotify() bool { - if o == nil || o.DoNotNotify == nil { +func (o *SamlFactor) GetDoNotNotify() bool { + if o == nil || isNil(o.DoNotNotify) { var ret bool return ret } @@ -163,16 +166,16 @@ func (o *VerifyFactorSamlRequest) GetDoNotNotify() bool { // GetDoNotNotifyOk returns a tuple with the DoNotNotify field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *VerifyFactorSamlRequest) GetDoNotNotifyOk() (*bool, bool) { - if o == nil || o.DoNotNotify == nil { +func (o *SamlFactor) GetDoNotNotifyOk() (*bool, bool) { + if o == nil || isNil(o.DoNotNotify) { return nil, false } return o.DoNotNotify, true } // HasDoNotNotify returns a boolean if a field has been set. -func (o *VerifyFactorSamlRequest) HasDoNotNotify() bool { - if o != nil && o.DoNotNotify != nil { +func (o *SamlFactor) HasDoNotNotify() bool { + if o != nil && !isNil(o.DoNotNotify) { return true } @@ -180,62 +183,64 @@ func (o *VerifyFactorSamlRequest) HasDoNotNotify() bool { } // SetDoNotNotify gets a reference to the given bool and assigns it to the DoNotNotify field. -func (o *VerifyFactorSamlRequest) SetDoNotNotify(v bool) { +func (o *SamlFactor) SetDoNotNotify(v bool) { o.DoNotNotify = &v } -func (o VerifyFactorSamlRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["app_id"] = o.AppId - } - if true { - toSerialize["device_id"] = o.DeviceId +func (o SamlFactor) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err } - if true { - toSerialize["state_token"] = o.StateToken - } - if o.OtpToken != nil { + return json.Marshal(toSerialize) +} + +func (o SamlFactor) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["app_id"] = o.AppId + toSerialize["device_id"] = o.DeviceId + toSerialize["state_token"] = o.StateToken + if !isNil(o.OtpToken) { toSerialize["otp_token"] = o.OtpToken } - if o.DoNotNotify != nil { + if !isNil(o.DoNotNotify) { toSerialize["do_not_notify"] = o.DoNotNotify } - return json.Marshal(toSerialize) + return toSerialize, nil } -type NullableVerifyFactorSamlRequest struct { - value *VerifyFactorSamlRequest +type NullableSamlFactor struct { + value *SamlFactor isSet bool } -func (v NullableVerifyFactorSamlRequest) Get() *VerifyFactorSamlRequest { +func (v NullableSamlFactor) Get() *SamlFactor { return v.value } -func (v *NullableVerifyFactorSamlRequest) Set(val *VerifyFactorSamlRequest) { +func (v *NullableSamlFactor) Set(val *SamlFactor) { v.value = val v.isSet = true } -func (v NullableVerifyFactorSamlRequest) IsSet() bool { +func (v NullableSamlFactor) IsSet() bool { return v.isSet } -func (v *NullableVerifyFactorSamlRequest) Unset() { +func (v *NullableSamlFactor) Unset() { v.value = nil v.isSet = false } -func NewNullableVerifyFactorSamlRequest(val *VerifyFactorSamlRequest) *NullableVerifyFactorSamlRequest { - return &NullableVerifyFactorSamlRequest{value: val, isSet: true} +func NewNullableSamlFactor(val *SamlFactor) *NullableSamlFactor { + return &NullableSamlFactor{value: val, isSet: true} } -func (v NullableVerifyFactorSamlRequest) MarshalJSON() ([]byte, error) { +func (v NullableSamlFactor) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } -func (v *NullableVerifyFactorSamlRequest) UnmarshalJSON(src []byte) error { +func (v *NullableSamlFactor) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/model_schema_1.go b/model_schema_1.go deleted file mode 100644 index fcf3c57..0000000 --- a/model_schema_1.go +++ /dev/null @@ -1,296 +0,0 @@ -/* -OneLogin API - -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -API version: 3.0.0-alpha.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package openapi - -import ( - "encoding/json" -) - -// Schema1 struct for Schema1 -type Schema1 struct { - Id *int32 `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Username *string `json:"username,omitempty"` - AddedBy *Schema1AddedBy `json:"added_by,omitempty"` - AddedAt *string `json:"added_at,omitempty"` - // Indicates if assigned to role or not. Defaults to true. - Assigned *bool `json:"assigned,omitempty"` -} - -// NewSchema1 instantiates a new Schema1 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 NewSchema1() *Schema1 { - this := Schema1{} - return &this -} - -// NewSchema1WithDefaults instantiates a new Schema1 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 NewSchema1WithDefaults() *Schema1 { - this := Schema1{} - return &this -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *Schema1) GetId() int32 { - if o == nil || o.Id == nil { - var ret int32 - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Schema1) GetIdOk() (*int32, bool) { - if o == nil || o.Id == nil { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *Schema1) HasId() bool { - if o != nil && o.Id != nil { - return true - } - - return false -} - -// SetId gets a reference to the given int32 and assigns it to the Id field. -func (o *Schema1) SetId(v int32) { - o.Id = &v -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *Schema1) GetName() string { - if o == nil || o.Name == nil { - var ret string - return ret - } - return *o.Name -} - -// 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 *Schema1) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *Schema1) HasName() bool { - if o != nil && o.Name != nil { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *Schema1) SetName(v string) { - o.Name = &v -} - -// GetUsername returns the Username field value if set, zero value otherwise. -func (o *Schema1) GetUsername() string { - if o == nil || o.Username == nil { - var ret string - return ret - } - return *o.Username -} - -// 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 *Schema1) GetUsernameOk() (*string, bool) { - if o == nil || o.Username == nil { - return nil, false - } - return o.Username, true -} - -// HasUsername returns a boolean if a field has been set. -func (o *Schema1) HasUsername() bool { - if o != nil && o.Username != nil { - return true - } - - return false -} - -// SetUsername gets a reference to the given string and assigns it to the Username field. -func (o *Schema1) SetUsername(v string) { - o.Username = &v -} - -// GetAddedBy returns the AddedBy field value if set, zero value otherwise. -func (o *Schema1) GetAddedBy() Schema1AddedBy { - if o == nil || o.AddedBy == nil { - var ret Schema1AddedBy - return ret - } - return *o.AddedBy -} - -// GetAddedByOk returns a tuple with the AddedBy field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Schema1) GetAddedByOk() (*Schema1AddedBy, bool) { - if o == nil || o.AddedBy == nil { - return nil, false - } - return o.AddedBy, true -} - -// HasAddedBy returns a boolean if a field has been set. -func (o *Schema1) HasAddedBy() bool { - if o != nil && o.AddedBy != nil { - return true - } - - return false -} - -// SetAddedBy gets a reference to the given Schema1AddedBy and assigns it to the AddedBy field. -func (o *Schema1) SetAddedBy(v Schema1AddedBy) { - o.AddedBy = &v -} - -// GetAddedAt returns the AddedAt field value if set, zero value otherwise. -func (o *Schema1) GetAddedAt() string { - if o == nil || o.AddedAt == nil { - var ret string - return ret - } - return *o.AddedAt -} - -// GetAddedAtOk returns a tuple with the AddedAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Schema1) GetAddedAtOk() (*string, bool) { - if o == nil || o.AddedAt == nil { - return nil, false - } - return o.AddedAt, true -} - -// HasAddedAt returns a boolean if a field has been set. -func (o *Schema1) HasAddedAt() bool { - if o != nil && o.AddedAt != nil { - return true - } - - return false -} - -// SetAddedAt gets a reference to the given string and assigns it to the AddedAt field. -func (o *Schema1) SetAddedAt(v string) { - o.AddedAt = &v -} - -// GetAssigned returns the Assigned field value if set, zero value otherwise. -func (o *Schema1) GetAssigned() bool { - if o == nil || o.Assigned == nil { - var ret bool - return ret - } - return *o.Assigned -} - -// GetAssignedOk returns a tuple with the Assigned field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Schema1) GetAssignedOk() (*bool, bool) { - if o == nil || o.Assigned == nil { - return nil, false - } - return o.Assigned, true -} - -// HasAssigned returns a boolean if a field has been set. -func (o *Schema1) HasAssigned() bool { - if o != nil && o.Assigned != nil { - return true - } - - return false -} - -// SetAssigned gets a reference to the given bool and assigns it to the Assigned field. -func (o *Schema1) SetAssigned(v bool) { - o.Assigned = &v -} - -func (o Schema1) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Name != nil { - toSerialize["name"] = o.Name - } - if o.Username != nil { - toSerialize["username"] = o.Username - } - if o.AddedBy != nil { - toSerialize["added_by"] = o.AddedBy - } - if o.AddedAt != nil { - toSerialize["added_at"] = o.AddedAt - } - if o.Assigned != nil { - toSerialize["assigned"] = o.Assigned - } - return json.Marshal(toSerialize) -} - -type NullableSchema1 struct { - value *Schema1 - isSet bool -} - -func (v NullableSchema1) Get() *Schema1 { - return v.value -} - -func (v *NullableSchema1) Set(val *Schema1) { - v.value = val - v.isSet = true -} - -func (v NullableSchema1) IsSet() bool { - return v.isSet -} - -func (v *NullableSchema1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSchema1(val *Schema1) *NullableSchema1 { - return &NullableSchema1{value: val, isSet: true} -} - -func (v NullableSchema1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSchema1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_schema_1_added_by.go b/model_schema_1_added_by.go deleted file mode 100644 index d667697..0000000 --- a/model_schema_1_added_by.go +++ /dev/null @@ -1,151 +0,0 @@ -/* -OneLogin API - -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -API version: 3.0.0-alpha.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package openapi - -import ( - "encoding/json" -) - -// Schema1AddedBy struct for Schema1AddedBy -type Schema1AddedBy struct { - Id *int32 `json:"id,omitempty"` - Name *string `json:"name,omitempty"` -} - -// NewSchema1AddedBy instantiates a new Schema1AddedBy 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 NewSchema1AddedBy() *Schema1AddedBy { - this := Schema1AddedBy{} - return &this -} - -// NewSchema1AddedByWithDefaults instantiates a new Schema1AddedBy 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 NewSchema1AddedByWithDefaults() *Schema1AddedBy { - this := Schema1AddedBy{} - return &this -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *Schema1AddedBy) GetId() int32 { - if o == nil || o.Id == nil { - var ret int32 - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Schema1AddedBy) GetIdOk() (*int32, bool) { - if o == nil || o.Id == nil { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *Schema1AddedBy) HasId() bool { - if o != nil && o.Id != nil { - return true - } - - return false -} - -// SetId gets a reference to the given int32 and assigns it to the Id field. -func (o *Schema1AddedBy) SetId(v int32) { - o.Id = &v -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *Schema1AddedBy) GetName() string { - if o == nil || o.Name == nil { - var ret string - return ret - } - return *o.Name -} - -// 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 *Schema1AddedBy) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *Schema1AddedBy) HasName() bool { - if o != nil && o.Name != nil { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *Schema1AddedBy) SetName(v string) { - o.Name = &v -} - -func (o Schema1AddedBy) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Name != nil { - toSerialize["name"] = o.Name - } - return json.Marshal(toSerialize) -} - -type NullableSchema1AddedBy struct { - value *Schema1AddedBy - isSet bool -} - -func (v NullableSchema1AddedBy) Get() *Schema1AddedBy { - return v.value -} - -func (v *NullableSchema1AddedBy) Set(val *Schema1AddedBy) { - v.value = val - v.isSet = true -} - -func (v NullableSchema1AddedBy) IsSet() bool { - return v.isSet -} - -func (v *NullableSchema1AddedBy) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSchema1AddedBy(val *Schema1AddedBy) *NullableSchema1AddedBy { - return &NullableSchema1AddedBy{value: val, isSet: true} -} - -func (v NullableSchema1AddedBy) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSchema1AddedBy) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_schema_provisioning.go b/model_schema_provisioning.go deleted file mode 100644 index 8878afd..0000000 --- a/model_schema_provisioning.go +++ /dev/null @@ -1,116 +0,0 @@ -/* -OneLogin API - -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -API version: 3.0.0-alpha.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package openapi - -import ( - "encoding/json" -) - -// SchemaProvisioning struct for SchemaProvisioning -type SchemaProvisioning struct { - // Indicates if provisioning is enabled for this app. - Enabled *bool `json:"enabled,omitempty"` -} - -// NewSchemaProvisioning instantiates a new SchemaProvisioning 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 NewSchemaProvisioning() *SchemaProvisioning { - this := SchemaProvisioning{} - return &this -} - -// NewSchemaProvisioningWithDefaults instantiates a new SchemaProvisioning 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 NewSchemaProvisioningWithDefaults() *SchemaProvisioning { - this := SchemaProvisioning{} - return &this -} - -// GetEnabled returns the Enabled field value if set, zero value otherwise. -func (o *SchemaProvisioning) 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 *SchemaProvisioning) 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 *SchemaProvisioning) 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 *SchemaProvisioning) SetEnabled(v bool) { - o.Enabled = &v -} - -func (o SchemaProvisioning) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Enabled != nil { - toSerialize["enabled"] = o.Enabled - } - return json.Marshal(toSerialize) -} - -type NullableSchemaProvisioning struct { - value *SchemaProvisioning - isSet bool -} - -func (v NullableSchemaProvisioning) Get() *SchemaProvisioning { - return v.value -} - -func (v *NullableSchemaProvisioning) Set(val *SchemaProvisioning) { - v.value = val - v.isSet = true -} - -func (v NullableSchemaProvisioning) IsSet() bool { - return v.isSet -} - -func (v *NullableSchemaProvisioning) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSchemaProvisioning(val *SchemaProvisioning) *NullableSchemaProvisioning { - return &NullableSchemaProvisioning{value: val, isSet: true} -} - -func (v NullableSchemaProvisioning) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSchemaProvisioning) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_list_scopes_200_response_inner.go b/model_scope.go similarity index 50% rename from model_list_scopes_200_response_inner.go rename to model_scope.go index b4e6e26..131593b 100644 --- a/model_list_scopes_200_response_inner.go +++ b/model_scope.go @@ -1,46 +1,52 @@ /* OneLogin API -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) +OpenAPI Specification for OneLogin -API version: 3.0.0-alpha.1 +API version: 3.1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package openapi +package onelogin import ( "encoding/json" ) -// ListScopes200ResponseInner struct for ListScopes200ResponseInner -type ListScopes200ResponseInner struct { +// checks if the Scope type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Scope{} + +// Scope struct for Scope +type Scope struct { + // Unique Scope ID value Id *int32 `json:"id,omitempty"` + // Scope Value Value *string `json:"value,omitempty"` + // Description of the scope Description *string `json:"description,omitempty"` } -// NewListScopes200ResponseInner instantiates a new ListScopes200ResponseInner object +// NewScope instantiates a new Scope 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 NewListScopes200ResponseInner() *ListScopes200ResponseInner { - this := ListScopes200ResponseInner{} +func NewScope() *Scope { + this := Scope{} return &this } -// NewListScopes200ResponseInnerWithDefaults instantiates a new ListScopes200ResponseInner object +// NewScopeWithDefaults instantiates a new Scope 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 NewListScopes200ResponseInnerWithDefaults() *ListScopes200ResponseInner { - this := ListScopes200ResponseInner{} +func NewScopeWithDefaults() *Scope { + this := Scope{} return &this } // GetId returns the Id field value if set, zero value otherwise. -func (o *ListScopes200ResponseInner) GetId() int32 { - if o == nil || o.Id == nil { +func (o *Scope) GetId() int32 { + if o == nil || isNil(o.Id) { var ret int32 return ret } @@ -49,16 +55,16 @@ func (o *ListScopes200ResponseInner) GetId() int32 { // GetIdOk returns a tuple with the Id field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ListScopes200ResponseInner) GetIdOk() (*int32, bool) { - if o == nil || o.Id == nil { +func (o *Scope) GetIdOk() (*int32, bool) { + if o == nil || isNil(o.Id) { return nil, false } return o.Id, true } // HasId returns a boolean if a field has been set. -func (o *ListScopes200ResponseInner) HasId() bool { - if o != nil && o.Id != nil { +func (o *Scope) HasId() bool { + if o != nil && !isNil(o.Id) { return true } @@ -66,13 +72,13 @@ func (o *ListScopes200ResponseInner) HasId() bool { } // SetId gets a reference to the given int32 and assigns it to the Id field. -func (o *ListScopes200ResponseInner) SetId(v int32) { +func (o *Scope) SetId(v int32) { o.Id = &v } // GetValue returns the Value field value if set, zero value otherwise. -func (o *ListScopes200ResponseInner) GetValue() string { - if o == nil || o.Value == nil { +func (o *Scope) GetValue() string { + if o == nil || isNil(o.Value) { var ret string return ret } @@ -81,16 +87,16 @@ func (o *ListScopes200ResponseInner) GetValue() string { // GetValueOk returns a tuple with the Value field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ListScopes200ResponseInner) GetValueOk() (*string, bool) { - if o == nil || o.Value == nil { +func (o *Scope) GetValueOk() (*string, bool) { + if o == nil || isNil(o.Value) { return nil, false } return o.Value, true } // HasValue returns a boolean if a field has been set. -func (o *ListScopes200ResponseInner) HasValue() bool { - if o != nil && o.Value != nil { +func (o *Scope) HasValue() bool { + if o != nil && !isNil(o.Value) { return true } @@ -98,13 +104,13 @@ func (o *ListScopes200ResponseInner) HasValue() bool { } // SetValue gets a reference to the given string and assigns it to the Value field. -func (o *ListScopes200ResponseInner) SetValue(v string) { +func (o *Scope) SetValue(v string) { o.Value = &v } // GetDescription returns the Description field value if set, zero value otherwise. -func (o *ListScopes200ResponseInner) GetDescription() string { - if o == nil || o.Description == nil { +func (o *Scope) GetDescription() string { + if o == nil || isNil(o.Description) { var ret string return ret } @@ -113,16 +119,16 @@ func (o *ListScopes200ResponseInner) 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 *ListScopes200ResponseInner) GetDescriptionOk() (*string, bool) { - if o == nil || o.Description == nil { +func (o *Scope) GetDescriptionOk() (*string, bool) { + if o == nil || isNil(o.Description) { return nil, false } return o.Description, true } // HasDescription returns a boolean if a field has been set. -func (o *ListScopes200ResponseInner) HasDescription() bool { - if o != nil && o.Description != nil { +func (o *Scope) HasDescription() bool { + if o != nil && !isNil(o.Description) { return true } @@ -130,56 +136,64 @@ func (o *ListScopes200ResponseInner) HasDescription() bool { } // SetDescription gets a reference to the given string and assigns it to the Description field. -func (o *ListScopes200ResponseInner) SetDescription(v string) { +func (o *Scope) SetDescription(v string) { o.Description = &v } -func (o ListScopes200ResponseInner) MarshalJSON() ([]byte, error) { +func (o Scope) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Scope) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { + if !isNil(o.Id) { toSerialize["id"] = o.Id } - if o.Value != nil { + if !isNil(o.Value) { toSerialize["value"] = o.Value } - if o.Description != nil { + if !isNil(o.Description) { toSerialize["description"] = o.Description } - return json.Marshal(toSerialize) + return toSerialize, nil } -type NullableListScopes200ResponseInner struct { - value *ListScopes200ResponseInner +type NullableScope struct { + value *Scope isSet bool } -func (v NullableListScopes200ResponseInner) Get() *ListScopes200ResponseInner { +func (v NullableScope) Get() *Scope { return v.value } -func (v *NullableListScopes200ResponseInner) Set(val *ListScopes200ResponseInner) { +func (v *NullableScope) Set(val *Scope) { v.value = val v.isSet = true } -func (v NullableListScopes200ResponseInner) IsSet() bool { +func (v NullableScope) IsSet() bool { return v.isSet } -func (v *NullableListScopes200ResponseInner) Unset() { +func (v *NullableScope) Unset() { v.value = nil v.isSet = false } -func NewNullableListScopes200ResponseInner(val *ListScopes200ResponseInner) *NullableListScopes200ResponseInner { - return &NullableListScopes200ResponseInner{value: val, isSet: true} +func NewNullableScope(val *Scope) *NullableScope { + return &NullableScope{value: val, isSet: true} } -func (v NullableListScopes200ResponseInner) MarshalJSON() ([]byte, error) { +func (v NullableScope) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } -func (v *NullableListScopes200ResponseInner) UnmarshalJSON(src []byte) error { +func (v *NullableScope) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/model_send_invite_link_200_response.go b/model_send_invite_link_200_response.go new file mode 100644 index 0000000..4f4ed4d --- /dev/null +++ b/model_send_invite_link_200_response.go @@ -0,0 +1,126 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the SendInviteLink200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SendInviteLink200Response{} + +// SendInviteLink200Response struct for SendInviteLink200Response +type SendInviteLink200Response struct { + Status *Error `json:"status,omitempty"` +} + +// NewSendInviteLink200Response instantiates a new SendInviteLink200Response 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 NewSendInviteLink200Response() *SendInviteLink200Response { + this := SendInviteLink200Response{} + return &this +} + +// NewSendInviteLink200ResponseWithDefaults instantiates a new SendInviteLink200Response 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 NewSendInviteLink200ResponseWithDefaults() *SendInviteLink200Response { + this := SendInviteLink200Response{} + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *SendInviteLink200Response) GetStatus() Error { + if o == nil || isNil(o.Status) { + var ret Error + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SendInviteLink200Response) GetStatusOk() (*Error, bool) { + if o == nil || isNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *SendInviteLink200Response) HasStatus() bool { + if o != nil && !isNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given Error and assigns it to the Status field. +func (o *SendInviteLink200Response) SetStatus(v Error) { + o.Status = &v +} + +func (o SendInviteLink200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SendInviteLink200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.Status) { + toSerialize["status"] = o.Status + } + return toSerialize, nil +} + +type NullableSendInviteLink200Response struct { + value *SendInviteLink200Response + isSet bool +} + +func (v NullableSendInviteLink200Response) Get() *SendInviteLink200Response { + return v.value +} + +func (v *NullableSendInviteLink200Response) Set(val *SendInviteLink200Response) { + v.value = val + v.isSet = true +} + +func (v NullableSendInviteLink200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableSendInviteLink200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSendInviteLink200Response(val *SendInviteLink200Response) *NullableSendInviteLink200Response { + return &NullableSendInviteLink200Response{value: val, isSet: true} +} + +func (v NullableSendInviteLink200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSendInviteLink200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_send_invite_link_request.go b/model_send_invite_link_request.go new file mode 100644 index 0000000..148dad4 --- /dev/null +++ b/model_send_invite_link_request.go @@ -0,0 +1,164 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the SendInviteLinkRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SendInviteLinkRequest{} + +// SendInviteLinkRequest struct for SendInviteLinkRequest +type SendInviteLinkRequest struct { + // Set to the user email address to generate an invite link. The value is case sensitive. + Email *string `json:"email,omitempty"` + // To send an invite email to a different address than the one provided in email, provide it here. The invite link is sent to this address instead. + PersonalEmail *string `json:"personal_email,omitempty"` +} + +// NewSendInviteLinkRequest instantiates a new SendInviteLinkRequest 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 NewSendInviteLinkRequest() *SendInviteLinkRequest { + this := SendInviteLinkRequest{} + return &this +} + +// NewSendInviteLinkRequestWithDefaults instantiates a new SendInviteLinkRequest 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 NewSendInviteLinkRequestWithDefaults() *SendInviteLinkRequest { + this := SendInviteLinkRequest{} + return &this +} + +// GetEmail returns the Email field value if set, zero value otherwise. +func (o *SendInviteLinkRequest) GetEmail() string { + if o == nil || isNil(o.Email) { + 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 *SendInviteLinkRequest) GetEmailOk() (*string, bool) { + if o == nil || isNil(o.Email) { + return nil, false + } + return o.Email, true +} + +// HasEmail returns a boolean if a field has been set. +func (o *SendInviteLinkRequest) HasEmail() bool { + if o != nil && !isNil(o.Email) { + return true + } + + return false +} + +// SetEmail gets a reference to the given string and assigns it to the Email field. +func (o *SendInviteLinkRequest) SetEmail(v string) { + o.Email = &v +} + +// GetPersonalEmail returns the PersonalEmail field value if set, zero value otherwise. +func (o *SendInviteLinkRequest) GetPersonalEmail() string { + if o == nil || isNil(o.PersonalEmail) { + var ret string + return ret + } + return *o.PersonalEmail +} + +// GetPersonalEmailOk returns a tuple with the PersonalEmail field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SendInviteLinkRequest) GetPersonalEmailOk() (*string, bool) { + if o == nil || isNil(o.PersonalEmail) { + return nil, false + } + return o.PersonalEmail, true +} + +// HasPersonalEmail returns a boolean if a field has been set. +func (o *SendInviteLinkRequest) HasPersonalEmail() bool { + if o != nil && !isNil(o.PersonalEmail) { + return true + } + + return false +} + +// SetPersonalEmail gets a reference to the given string and assigns it to the PersonalEmail field. +func (o *SendInviteLinkRequest) SetPersonalEmail(v string) { + o.PersonalEmail = &v +} + +func (o SendInviteLinkRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SendInviteLinkRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.Email) { + toSerialize["email"] = o.Email + } + if !isNil(o.PersonalEmail) { + toSerialize["personal_email"] = o.PersonalEmail + } + return toSerialize, nil +} + +type NullableSendInviteLinkRequest struct { + value *SendInviteLinkRequest + isSet bool +} + +func (v NullableSendInviteLinkRequest) Get() *SendInviteLinkRequest { + return v.value +} + +func (v *NullableSendInviteLinkRequest) Set(val *SendInviteLinkRequest) { + v.value = val + v.isSet = true +} + +func (v NullableSendInviteLinkRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableSendInviteLinkRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSendInviteLinkRequest(val *SendInviteLinkRequest) *NullableSendInviteLinkRequest { + return &NullableSendInviteLinkRequest{value: val, isSet: true} +} + +func (v NullableSendInviteLinkRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSendInviteLinkRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_session.go b/model_session.go index 432c7da..620655b 100644 --- a/model_session.go +++ b/model_session.go @@ -1,19 +1,22 @@ /* OneLogin API -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) +OpenAPI Specification for OneLogin -API version: 3.0.0-alpha.1 +API version: 3.1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package openapi +package onelogin import ( "encoding/json" ) +// checks if the Session type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Session{} + // Session A dictionary of extra information that provides useful context about the session, for example the session ID, or some cookie information. type Session struct { // If you use a database to track sessions, you can send us the session ID. @@ -39,7 +42,7 @@ func NewSessionWithDefaults() *Session { // GetId returns the Id field value if set, zero value otherwise. func (o *Session) GetId() string { - if o == nil || o.Id == nil { + if o == nil || isNil(o.Id) { var ret string return ret } @@ -49,7 +52,7 @@ func (o *Session) GetId() string { // GetIdOk returns a tuple with the Id field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Session) GetIdOk() (*string, bool) { - if o == nil || o.Id == nil { + if o == nil || isNil(o.Id) { return nil, false } return o.Id, true @@ -57,7 +60,7 @@ func (o *Session) GetIdOk() (*string, bool) { // HasId returns a boolean if a field has been set. func (o *Session) HasId() bool { - if o != nil && o.Id != nil { + if o != nil && !isNil(o.Id) { return true } @@ -70,11 +73,19 @@ func (o *Session) SetId(v string) { } func (o Session) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Session) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { + if !isNil(o.Id) { toSerialize["id"] = o.Id } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableSession struct { diff --git a/model_set_role_apps_200_response_inner.go b/model_set_role_apps_200_response_inner.go deleted file mode 100644 index 6bc8dbd..0000000 --- a/model_set_role_apps_200_response_inner.go +++ /dev/null @@ -1,116 +0,0 @@ -/* -OneLogin API - -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -API version: 3.0.0-alpha.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package openapi - -import ( - "encoding/json" -) - -// SetRoleApps200ResponseInner struct for SetRoleApps200ResponseInner -type SetRoleApps200ResponseInner struct { - // Apps unique ID in OneLogin. - Id *int32 `json:"id,omitempty"` -} - -// NewSetRoleApps200ResponseInner instantiates a new SetRoleApps200ResponseInner 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 NewSetRoleApps200ResponseInner() *SetRoleApps200ResponseInner { - this := SetRoleApps200ResponseInner{} - return &this -} - -// NewSetRoleApps200ResponseInnerWithDefaults instantiates a new SetRoleApps200ResponseInner 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 NewSetRoleApps200ResponseInnerWithDefaults() *SetRoleApps200ResponseInner { - this := SetRoleApps200ResponseInner{} - return &this -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *SetRoleApps200ResponseInner) GetId() int32 { - if o == nil || o.Id == nil { - var ret int32 - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SetRoleApps200ResponseInner) GetIdOk() (*int32, bool) { - if o == nil || o.Id == nil { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *SetRoleApps200ResponseInner) HasId() bool { - if o != nil && o.Id != nil { - return true - } - - return false -} - -// SetId gets a reference to the given int32 and assigns it to the Id field. -func (o *SetRoleApps200ResponseInner) SetId(v int32) { - o.Id = &v -} - -func (o SetRoleApps200ResponseInner) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - return json.Marshal(toSerialize) -} - -type NullableSetRoleApps200ResponseInner struct { - value *SetRoleApps200ResponseInner - isSet bool -} - -func (v NullableSetRoleApps200ResponseInner) Get() *SetRoleApps200ResponseInner { - return v.value -} - -func (v *NullableSetRoleApps200ResponseInner) Set(val *SetRoleApps200ResponseInner) { - v.value = val - v.isSet = true -} - -func (v NullableSetRoleApps200ResponseInner) IsSet() bool { - return v.isSet -} - -func (v *NullableSetRoleApps200ResponseInner) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSetRoleApps200ResponseInner(val *SetRoleApps200ResponseInner) *NullableSetRoleApps200ResponseInner { - return &NullableSetRoleApps200ResponseInner{value: val, isSet: true} -} - -func (v NullableSetRoleApps200ResponseInner) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSetRoleApps200ResponseInner) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_set_user_state_request.go b/model_set_user_state_request.go new file mode 100644 index 0000000..5d4794e --- /dev/null +++ b/model_set_user_state_request.go @@ -0,0 +1,118 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the SetUserStateRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SetUserStateRequest{} + +// SetUserStateRequest struct for SetUserStateRequest +type SetUserStateRequest struct { + // Set to the state value. Valid values include: - 0 : Unapproved - 1 : Approved - 2 : Rejected - 3 : Unlicensed + State int32 `json:"state"` +} + +// NewSetUserStateRequest instantiates a new SetUserStateRequest 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 NewSetUserStateRequest(state int32) *SetUserStateRequest { + this := SetUserStateRequest{} + this.State = state + return &this +} + +// NewSetUserStateRequestWithDefaults instantiates a new SetUserStateRequest 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 NewSetUserStateRequestWithDefaults() *SetUserStateRequest { + this := SetUserStateRequest{} + return &this +} + +// GetState returns the State field value +func (o *SetUserStateRequest) GetState() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.State +} + +// GetStateOk returns a tuple with the State field value +// and a boolean to check if the value has been set. +func (o *SetUserStateRequest) GetStateOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.State, true +} + +// SetState sets field value +func (o *SetUserStateRequest) SetState(v int32) { + o.State = v +} + +func (o SetUserStateRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SetUserStateRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["state"] = o.State + return toSerialize, nil +} + +type NullableSetUserStateRequest struct { + value *SetUserStateRequest + isSet bool +} + +func (v NullableSetUserStateRequest) Get() *SetUserStateRequest { + return v.value +} + +func (v *NullableSetUserStateRequest) Set(val *SetUserStateRequest) { + v.value = val + v.isSet = true +} + +func (v NullableSetUserStateRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableSetUserStateRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSetUserStateRequest(val *SetUserStateRequest) *NullableSetUserStateRequest { + return &NullableSetUserStateRequest{value: val, isSet: true} +} + +func (v NullableSetUserStateRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSetUserStateRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_source.go b/model_source.go index ad2d82d..195fe96 100644 --- a/model_source.go +++ b/model_source.go @@ -1,21 +1,25 @@ /* OneLogin API -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) +OpenAPI Specification for OneLogin -API version: 3.0.0-alpha.1 +API version: 3.1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package openapi +package onelogin import ( "encoding/json" ) +// checks if the Source type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Source{} + // Source Used for targeting custom rules based on a group of people, customers, accounts, or even a single user. type Source struct { + // A unique id that represents the source of the event. Id *string `json:"id,omitempty"` // The name of the source Name *string `json:"name,omitempty"` @@ -40,7 +44,7 @@ func NewSourceWithDefaults() *Source { // GetId returns the Id field value if set, zero value otherwise. func (o *Source) GetId() string { - if o == nil || o.Id == nil { + if o == nil || isNil(o.Id) { var ret string return ret } @@ -50,7 +54,7 @@ func (o *Source) GetId() string { // GetIdOk returns a tuple with the Id field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Source) GetIdOk() (*string, bool) { - if o == nil || o.Id == nil { + if o == nil || isNil(o.Id) { return nil, false } return o.Id, true @@ -58,7 +62,7 @@ func (o *Source) GetIdOk() (*string, bool) { // HasId returns a boolean if a field has been set. func (o *Source) HasId() bool { - if o != nil && o.Id != nil { + if o != nil && !isNil(o.Id) { return true } @@ -72,7 +76,7 @@ func (o *Source) SetId(v string) { // GetName returns the Name field value if set, zero value otherwise. func (o *Source) GetName() string { - if o == nil || o.Name == nil { + if o == nil || isNil(o.Name) { var ret string return ret } @@ -82,7 +86,7 @@ func (o *Source) 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 *Source) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { + if o == nil || isNil(o.Name) { return nil, false } return o.Name, true @@ -90,7 +94,7 @@ func (o *Source) GetNameOk() (*string, bool) { // HasName returns a boolean if a field has been set. func (o *Source) HasName() bool { - if o != nil && o.Name != nil { + if o != nil && !isNil(o.Name) { return true } @@ -103,14 +107,22 @@ func (o *Source) SetName(v string) { } func (o Source) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Source) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { + if !isNil(o.Id) { toSerialize["id"] = o.Id } - if o.Name != nil { + if !isNil(o.Name) { toSerialize["name"] = o.Name } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableSource struct { diff --git a/model_sso_oidc.go b/model_sso_oidc.go new file mode 100644 index 0000000..7232616 --- /dev/null +++ b/model_sso_oidc.go @@ -0,0 +1,127 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the SsoOidc type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SsoOidc{} + +// SsoOidc struct for SsoOidc +type SsoOidc struct { + // OIDC: The OpenId Connect Client Id. Note that client_secret is only returned after Creating an App + ClientId *string `json:"client_id,omitempty"` +} + +// NewSsoOidc instantiates a new SsoOidc 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 NewSsoOidc() *SsoOidc { + this := SsoOidc{} + return &this +} + +// NewSsoOidcWithDefaults instantiates a new SsoOidc 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 NewSsoOidcWithDefaults() *SsoOidc { + this := SsoOidc{} + return &this +} + +// GetClientId returns the ClientId field value if set, zero value otherwise. +func (o *SsoOidc) GetClientId() string { + if o == nil || isNil(o.ClientId) { + var ret string + return ret + } + return *o.ClientId +} + +// 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 *SsoOidc) GetClientIdOk() (*string, bool) { + if o == nil || isNil(o.ClientId) { + return nil, false + } + return o.ClientId, true +} + +// HasClientId returns a boolean if a field has been set. +func (o *SsoOidc) HasClientId() bool { + if o != nil && !isNil(o.ClientId) { + return true + } + + return false +} + +// SetClientId gets a reference to the given string and assigns it to the ClientId field. +func (o *SsoOidc) SetClientId(v string) { + o.ClientId = &v +} + +func (o SsoOidc) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SsoOidc) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.ClientId) { + toSerialize["client_id"] = o.ClientId + } + return toSerialize, nil +} + +type NullableSsoOidc struct { + value *SsoOidc + isSet bool +} + +func (v NullableSsoOidc) Get() *SsoOidc { + return v.value +} + +func (v *NullableSsoOidc) Set(val *SsoOidc) { + v.value = val + v.isSet = true +} + +func (v NullableSsoOidc) IsSet() bool { + return v.isSet +} + +func (v *NullableSsoOidc) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSsoOidc(val *SsoOidc) *NullableSsoOidc { + return &NullableSsoOidc{value: val, isSet: true} +} + +func (v NullableSsoOidc) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSsoOidc) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_sso_saml.go b/model_sso_saml.go new file mode 100644 index 0000000..8ba7049 --- /dev/null +++ b/model_sso_saml.go @@ -0,0 +1,270 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the SsoSaml type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SsoSaml{} + +// SsoSaml struct for SsoSaml +type SsoSaml struct { + MetadataUrl *string `json:"metadata_url,omitempty"` + AcsUrl *string `json:"acs_url,omitempty"` + SlsUrl *string `json:"sls_url,omitempty"` + Issuer *string `json:"issuer,omitempty"` + Certificate *SsoSamlCertificate `json:"certificate,omitempty"` +} + +// NewSsoSaml instantiates a new SsoSaml 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 NewSsoSaml() *SsoSaml { + this := SsoSaml{} + return &this +} + +// NewSsoSamlWithDefaults instantiates a new SsoSaml 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 NewSsoSamlWithDefaults() *SsoSaml { + this := SsoSaml{} + return &this +} + +// GetMetadataUrl returns the MetadataUrl field value if set, zero value otherwise. +func (o *SsoSaml) GetMetadataUrl() string { + if o == nil || isNil(o.MetadataUrl) { + var ret string + return ret + } + return *o.MetadataUrl +} + +// GetMetadataUrlOk returns a tuple with the MetadataUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SsoSaml) GetMetadataUrlOk() (*string, bool) { + if o == nil || isNil(o.MetadataUrl) { + return nil, false + } + return o.MetadataUrl, true +} + +// HasMetadataUrl returns a boolean if a field has been set. +func (o *SsoSaml) HasMetadataUrl() bool { + if o != nil && !isNil(o.MetadataUrl) { + return true + } + + return false +} + +// SetMetadataUrl gets a reference to the given string and assigns it to the MetadataUrl field. +func (o *SsoSaml) SetMetadataUrl(v string) { + o.MetadataUrl = &v +} + +// GetAcsUrl returns the AcsUrl field value if set, zero value otherwise. +func (o *SsoSaml) GetAcsUrl() string { + if o == nil || isNil(o.AcsUrl) { + var ret string + return ret + } + return *o.AcsUrl +} + +// 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 *SsoSaml) GetAcsUrlOk() (*string, bool) { + if o == nil || isNil(o.AcsUrl) { + return nil, false + } + return o.AcsUrl, true +} + +// HasAcsUrl returns a boolean if a field has been set. +func (o *SsoSaml) HasAcsUrl() bool { + if o != nil && !isNil(o.AcsUrl) { + return true + } + + return false +} + +// SetAcsUrl gets a reference to the given string and assigns it to the AcsUrl field. +func (o *SsoSaml) SetAcsUrl(v string) { + o.AcsUrl = &v +} + +// GetSlsUrl returns the SlsUrl field value if set, zero value otherwise. +func (o *SsoSaml) GetSlsUrl() string { + if o == nil || isNil(o.SlsUrl) { + var ret string + return ret + } + return *o.SlsUrl +} + +// GetSlsUrlOk returns a tuple with the SlsUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SsoSaml) GetSlsUrlOk() (*string, bool) { + if o == nil || isNil(o.SlsUrl) { + return nil, false + } + return o.SlsUrl, true +} + +// HasSlsUrl returns a boolean if a field has been set. +func (o *SsoSaml) HasSlsUrl() bool { + if o != nil && !isNil(o.SlsUrl) { + return true + } + + return false +} + +// SetSlsUrl gets a reference to the given string and assigns it to the SlsUrl field. +func (o *SsoSaml) SetSlsUrl(v string) { + o.SlsUrl = &v +} + +// GetIssuer returns the Issuer field value if set, zero value otherwise. +func (o *SsoSaml) GetIssuer() string { + if o == nil || isNil(o.Issuer) { + var ret string + return ret + } + return *o.Issuer +} + +// 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 *SsoSaml) GetIssuerOk() (*string, bool) { + if o == nil || isNil(o.Issuer) { + return nil, false + } + return o.Issuer, true +} + +// HasIssuer returns a boolean if a field has been set. +func (o *SsoSaml) HasIssuer() bool { + if o != nil && !isNil(o.Issuer) { + return true + } + + return false +} + +// SetIssuer gets a reference to the given string and assigns it to the Issuer field. +func (o *SsoSaml) SetIssuer(v string) { + o.Issuer = &v +} + +// GetCertificate returns the Certificate field value if set, zero value otherwise. +func (o *SsoSaml) GetCertificate() SsoSamlCertificate { + if o == nil || isNil(o.Certificate) { + var ret SsoSamlCertificate + return ret + } + return *o.Certificate +} + +// GetCertificateOk returns a tuple with the Certificate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SsoSaml) GetCertificateOk() (*SsoSamlCertificate, bool) { + if o == nil || isNil(o.Certificate) { + return nil, false + } + return o.Certificate, true +} + +// HasCertificate returns a boolean if a field has been set. +func (o *SsoSaml) HasCertificate() bool { + if o != nil && !isNil(o.Certificate) { + return true + } + + return false +} + +// SetCertificate gets a reference to the given SsoSamlCertificate and assigns it to the Certificate field. +func (o *SsoSaml) SetCertificate(v SsoSamlCertificate) { + o.Certificate = &v +} + +func (o SsoSaml) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SsoSaml) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.MetadataUrl) { + toSerialize["metadata_url"] = o.MetadataUrl + } + if !isNil(o.AcsUrl) { + toSerialize["acs_url"] = o.AcsUrl + } + if !isNil(o.SlsUrl) { + toSerialize["sls_url"] = o.SlsUrl + } + if !isNil(o.Issuer) { + toSerialize["issuer"] = o.Issuer + } + if !isNil(o.Certificate) { + toSerialize["certificate"] = o.Certificate + } + return toSerialize, nil +} + +type NullableSsoSaml struct { + value *SsoSaml + isSet bool +} + +func (v NullableSsoSaml) Get() *SsoSaml { + return v.value +} + +func (v *NullableSsoSaml) Set(val *SsoSaml) { + v.value = val + v.isSet = true +} + +func (v NullableSsoSaml) IsSet() bool { + return v.isSet +} + +func (v *NullableSsoSaml) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSsoSaml(val *SsoSaml) *NullableSsoSaml { + return &NullableSsoSaml{value: val, isSet: true} +} + +func (v NullableSsoSaml) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSsoSaml) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_sso_saml_certificate.go b/model_sso_saml_certificate.go new file mode 100644 index 0000000..548a234 --- /dev/null +++ b/model_sso_saml_certificate.go @@ -0,0 +1,201 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the SsoSamlCertificate type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SsoSamlCertificate{} + +// SsoSamlCertificate The Certificate used for signing +type SsoSamlCertificate struct { + // SAML Certificate ID + Id *int32 `json:"id,omitempty"` + // SAML Certificate Name + Name *string `json:"name,omitempty"` + // SAML Certificate Value + Value *string `json:"value,omitempty"` +} + +// NewSsoSamlCertificate instantiates a new SsoSamlCertificate 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 NewSsoSamlCertificate() *SsoSamlCertificate { + this := SsoSamlCertificate{} + return &this +} + +// NewSsoSamlCertificateWithDefaults instantiates a new SsoSamlCertificate 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 NewSsoSamlCertificateWithDefaults() *SsoSamlCertificate { + this := SsoSamlCertificate{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *SsoSamlCertificate) GetId() int32 { + if o == nil || isNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SsoSamlCertificate) GetIdOk() (*int32, bool) { + if o == nil || isNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *SsoSamlCertificate) HasId() bool { + if o != nil && !isNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *SsoSamlCertificate) SetId(v int32) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *SsoSamlCertificate) GetName() string { + if o == nil || isNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// 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 *SsoSamlCertificate) GetNameOk() (*string, bool) { + if o == nil || isNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *SsoSamlCertificate) HasName() bool { + if o != nil && !isNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *SsoSamlCertificate) SetName(v string) { + o.Name = &v +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *SsoSamlCertificate) GetValue() string { + if o == nil || isNil(o.Value) { + var ret string + return ret + } + return *o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SsoSamlCertificate) GetValueOk() (*string, bool) { + if o == nil || isNil(o.Value) { + return nil, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *SsoSamlCertificate) HasValue() bool { + if o != nil && !isNil(o.Value) { + return true + } + + return false +} + +// SetValue gets a reference to the given string and assigns it to the Value field. +func (o *SsoSamlCertificate) SetValue(v string) { + o.Value = &v +} + +func (o SsoSamlCertificate) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SsoSamlCertificate) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.Id) { + toSerialize["id"] = o.Id + } + if !isNil(o.Name) { + toSerialize["name"] = o.Name + } + if !isNil(o.Value) { + toSerialize["value"] = o.Value + } + return toSerialize, nil +} + +type NullableSsoSamlCertificate struct { + value *SsoSamlCertificate + isSet bool +} + +func (v NullableSsoSamlCertificate) Get() *SsoSamlCertificate { + return v.value +} + +func (v *NullableSsoSamlCertificate) Set(val *SsoSamlCertificate) { + v.value = val + v.isSet = true +} + +func (v NullableSsoSamlCertificate) IsSet() bool { + return v.isSet +} + +func (v *NullableSsoSamlCertificate) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSsoSamlCertificate(val *SsoSamlCertificate) *NullableSsoSamlCertificate { + return &NullableSsoSamlCertificate{value: val, isSet: true} +} + +func (v NullableSsoSamlCertificate) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSsoSamlCertificate) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_status.go b/model_status.go deleted file mode 100644 index dfc9e38..0000000 --- a/model_status.go +++ /dev/null @@ -1,223 +0,0 @@ -/* -OneLogin API - -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -API version: 3.0.0-alpha.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package openapi - -import ( - "encoding/json" -) - -// Status struct for Status -type Status struct { - Error *bool `json:"error,omitempty"` - Code *int32 `json:"code,omitempty"` - Type *string `json:"type,omitempty"` - Message *string `json:"message,omitempty"` -} - -// NewStatus instantiates a new Status 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 NewStatus() *Status { - this := Status{} - return &this -} - -// NewStatusWithDefaults instantiates a new Status 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 NewStatusWithDefaults() *Status { - this := Status{} - return &this -} - -// GetError returns the Error field value if set, zero value otherwise. -func (o *Status) GetError() bool { - if o == nil || o.Error == nil { - var ret bool - return ret - } - return *o.Error -} - -// 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 *Status) GetErrorOk() (*bool, bool) { - if o == nil || o.Error == nil { - return nil, false - } - return o.Error, true -} - -// HasError returns a boolean if a field has been set. -func (o *Status) HasError() bool { - if o != nil && o.Error != nil { - return true - } - - return false -} - -// SetError gets a reference to the given bool and assigns it to the Error field. -func (o *Status) SetError(v bool) { - o.Error = &v -} - -// GetCode returns the Code field value if set, zero value otherwise. -func (o *Status) GetCode() int32 { - if o == nil || o.Code == nil { - var ret int32 - return ret - } - return *o.Code -} - -// 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 *Status) GetCodeOk() (*int32, bool) { - if o == nil || o.Code == nil { - return nil, false - } - return o.Code, true -} - -// HasCode returns a boolean if a field has been set. -func (o *Status) HasCode() bool { - if o != nil && o.Code != nil { - return true - } - - return false -} - -// SetCode gets a reference to the given int32 and assigns it to the Code field. -func (o *Status) SetCode(v int32) { - o.Code = &v -} - -// GetType returns the Type field value if set, zero value otherwise. -func (o *Status) GetType() string { - if o == nil || o.Type == nil { - var ret string - return ret - } - return *o.Type -} - -// 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 *Status) GetTypeOk() (*string, bool) { - if o == nil || o.Type == nil { - return nil, false - } - return o.Type, true -} - -// HasType returns a boolean if a field has been set. -func (o *Status) HasType() bool { - if o != nil && o.Type != nil { - return true - } - - return false -} - -// SetType gets a reference to the given string and assigns it to the Type field. -func (o *Status) SetType(v string) { - o.Type = &v -} - -// GetMessage returns the Message field value if set, zero value otherwise. -func (o *Status) GetMessage() string { - if o == nil || o.Message == nil { - var ret string - return ret - } - return *o.Message -} - -// GetMessageOk returns a tuple with the Message field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Status) GetMessageOk() (*string, bool) { - if o == nil || o.Message == nil { - return nil, false - } - return o.Message, true -} - -// HasMessage returns a boolean if a field has been set. -func (o *Status) HasMessage() bool { - if o != nil && o.Message != nil { - return true - } - - return false -} - -// SetMessage gets a reference to the given string and assigns it to the Message field. -func (o *Status) SetMessage(v string) { - o.Message = &v -} - -func (o Status) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Error != nil { - toSerialize["error"] = o.Error - } - if o.Code != nil { - toSerialize["code"] = o.Code - } - if o.Type != nil { - toSerialize["type"] = o.Type - } - if o.Message != nil { - toSerialize["message"] = o.Message - } - return json.Marshal(toSerialize) -} - -type NullableStatus struct { - value *Status - isSet bool -} - -func (v NullableStatus) Get() *Status { - return v.value -} - -func (v *NullableStatus) Set(val *Status) { - v.value = val - v.isSet = true -} - -func (v NullableStatus) IsSet() bool { - return v.isSet -} - -func (v *NullableStatus) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableStatus(val *Status) *NullableStatus { - return &NullableStatus{value: val, isSet: true} -} - -func (v NullableStatus) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableStatus) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_status_2.go b/model_status_2.go deleted file mode 100644 index 1116313..0000000 --- a/model_status_2.go +++ /dev/null @@ -1,115 +0,0 @@ -/* -OneLogin API - -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -API version: 3.0.0-alpha.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package openapi - -import ( - "encoding/json" -) - -// Status2 struct for Status2 -type Status2 struct { - Status *Status2Status `json:"status,omitempty"` -} - -// NewStatus2 instantiates a new Status2 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 NewStatus2() *Status2 { - this := Status2{} - return &this -} - -// NewStatus2WithDefaults instantiates a new Status2 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 NewStatus2WithDefaults() *Status2 { - this := Status2{} - return &this -} - -// GetStatus returns the Status field value if set, zero value otherwise. -func (o *Status2) GetStatus() Status2Status { - if o == nil || o.Status == nil { - var ret Status2Status - return ret - } - return *o.Status -} - -// GetStatusOk returns a tuple with the Status field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Status2) GetStatusOk() (*Status2Status, bool) { - if o == nil || o.Status == nil { - return nil, false - } - return o.Status, true -} - -// HasStatus returns a boolean if a field has been set. -func (o *Status2) HasStatus() bool { - if o != nil && o.Status != nil { - return true - } - - return false -} - -// SetStatus gets a reference to the given Status2Status and assigns it to the Status field. -func (o *Status2) SetStatus(v Status2Status) { - o.Status = &v -} - -func (o Status2) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Status != nil { - toSerialize["status"] = o.Status - } - return json.Marshal(toSerialize) -} - -type NullableStatus2 struct { - value *Status2 - isSet bool -} - -func (v NullableStatus2) Get() *Status2 { - return v.value -} - -func (v *NullableStatus2) Set(val *Status2) { - v.value = val - v.isSet = true -} - -func (v NullableStatus2) IsSet() bool { - return v.isSet -} - -func (v *NullableStatus2) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableStatus2(val *Status2) *NullableStatus2 { - return &NullableStatus2{value: val, isSet: true} -} - -func (v NullableStatus2) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableStatus2) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_status_2_status.go b/model_status_2_status.go deleted file mode 100644 index 6f0ffaf..0000000 --- a/model_status_2_status.go +++ /dev/null @@ -1,223 +0,0 @@ -/* -OneLogin API - -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -API version: 3.0.0-alpha.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package openapi - -import ( - "encoding/json" -) - -// Status2Status struct for Status2Status -type Status2Status struct { - Type *string `json:"type,omitempty"` - Code *int32 `json:"code,omitempty"` - Message *string `json:"message,omitempty"` - Error *bool `json:"error,omitempty"` -} - -// NewStatus2Status instantiates a new Status2Status 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 NewStatus2Status() *Status2Status { - this := Status2Status{} - return &this -} - -// NewStatus2StatusWithDefaults instantiates a new Status2Status 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 NewStatus2StatusWithDefaults() *Status2Status { - this := Status2Status{} - return &this -} - -// GetType returns the Type field value if set, zero value otherwise. -func (o *Status2Status) GetType() string { - if o == nil || o.Type == nil { - var ret string - return ret - } - return *o.Type -} - -// 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 *Status2Status) GetTypeOk() (*string, bool) { - if o == nil || o.Type == nil { - return nil, false - } - return o.Type, true -} - -// HasType returns a boolean if a field has been set. -func (o *Status2Status) HasType() bool { - if o != nil && o.Type != nil { - return true - } - - return false -} - -// SetType gets a reference to the given string and assigns it to the Type field. -func (o *Status2Status) SetType(v string) { - o.Type = &v -} - -// GetCode returns the Code field value if set, zero value otherwise. -func (o *Status2Status) GetCode() int32 { - if o == nil || o.Code == nil { - var ret int32 - return ret - } - return *o.Code -} - -// 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 *Status2Status) GetCodeOk() (*int32, bool) { - if o == nil || o.Code == nil { - return nil, false - } - return o.Code, true -} - -// HasCode returns a boolean if a field has been set. -func (o *Status2Status) HasCode() bool { - if o != nil && o.Code != nil { - return true - } - - return false -} - -// SetCode gets a reference to the given int32 and assigns it to the Code field. -func (o *Status2Status) SetCode(v int32) { - o.Code = &v -} - -// GetMessage returns the Message field value if set, zero value otherwise. -func (o *Status2Status) GetMessage() string { - if o == nil || o.Message == nil { - var ret string - return ret - } - return *o.Message -} - -// GetMessageOk returns a tuple with the Message field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Status2Status) GetMessageOk() (*string, bool) { - if o == nil || o.Message == nil { - return nil, false - } - return o.Message, true -} - -// HasMessage returns a boolean if a field has been set. -func (o *Status2Status) HasMessage() bool { - if o != nil && o.Message != nil { - return true - } - - return false -} - -// SetMessage gets a reference to the given string and assigns it to the Message field. -func (o *Status2Status) SetMessage(v string) { - o.Message = &v -} - -// GetError returns the Error field value if set, zero value otherwise. -func (o *Status2Status) GetError() bool { - if o == nil || o.Error == nil { - var ret bool - return ret - } - return *o.Error -} - -// 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 *Status2Status) GetErrorOk() (*bool, bool) { - if o == nil || o.Error == nil { - return nil, false - } - return o.Error, true -} - -// HasError returns a boolean if a field has been set. -func (o *Status2Status) HasError() bool { - if o != nil && o.Error != nil { - return true - } - - return false -} - -// SetError gets a reference to the given bool and assigns it to the Error field. -func (o *Status2Status) SetError(v bool) { - o.Error = &v -} - -func (o Status2Status) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Type != nil { - toSerialize["type"] = o.Type - } - if o.Code != nil { - toSerialize["code"] = o.Code - } - if o.Message != nil { - toSerialize["message"] = o.Message - } - if o.Error != nil { - toSerialize["error"] = o.Error - } - return json.Marshal(toSerialize) -} - -type NullableStatus2Status struct { - value *Status2Status - isSet bool -} - -func (v NullableStatus2Status) Get() *Status2Status { - return v.value -} - -func (v *NullableStatus2Status) Set(val *Status2Status) { - v.value = val - v.isSet = true -} - -func (v NullableStatus2Status) IsSet() bool { - return v.isSet -} - -func (v *NullableStatus2Status) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableStatus2Status(val *Status2Status) *NullableStatus2Status { - return &NullableStatus2Status{value: val, isSet: true} -} - -func (v NullableStatus2Status) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableStatus2Status) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_token_claim.go b/model_token_claim.go new file mode 100644 index 0000000..8c0e1f3 --- /dev/null +++ b/model_token_claim.go @@ -0,0 +1,423 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the TokenClaim type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TokenClaim{} + +// TokenClaim struct for TokenClaim +type TokenClaim struct { + // The unique ID of the claim. + Id *int32 `json:"id,omitempty"` + // The UI label for the claims. + Label *string `json:"label,omitempty"` + // A user attribute to map values from. + UserAttributeMappings *string `json:"user_attribute_mappings,omitempty"` + // When `user_attribute_mappings` is set to `_macro_` this macro will be used to assign the claims value. + UserAttributeMacros *string `json:"user_attribute_macros,omitempty"` + // The type of transformation to perform on multi valued attributes. + AttributeTransformations *string `json:"attribute_transformations,omitempty"` + // not used + SkipIfBlank *bool `json:"skip_if_blank,omitempty"` + // Relates to Rules/Entitlements. Not supported yet. + Values []string `json:"values,omitempty"` + // Relates to Rules/Entitlements. Not supported yet. + DefaultValues *string `json:"default_values,omitempty"` + // Relates to Rules/Entitlements. Not supported yet. + ProvisionedEntitlements *bool `json:"provisioned_entitlements,omitempty"` +} + +// NewTokenClaim instantiates a new TokenClaim 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 NewTokenClaim() *TokenClaim { + this := TokenClaim{} + return &this +} + +// NewTokenClaimWithDefaults instantiates a new TokenClaim 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 NewTokenClaimWithDefaults() *TokenClaim { + this := TokenClaim{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *TokenClaim) GetId() int32 { + if o == nil || isNil(o.Id) { + var ret int32 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TokenClaim) GetIdOk() (*int32, bool) { + if o == nil || isNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *TokenClaim) HasId() bool { + if o != nil && !isNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int32 and assigns it to the Id field. +func (o *TokenClaim) SetId(v int32) { + o.Id = &v +} + +// GetLabel returns the Label field value if set, zero value otherwise. +func (o *TokenClaim) GetLabel() string { + if o == nil || isNil(o.Label) { + var ret string + return ret + } + return *o.Label +} + +// 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 *TokenClaim) GetLabelOk() (*string, bool) { + if o == nil || isNil(o.Label) { + return nil, false + } + return o.Label, true +} + +// HasLabel returns a boolean if a field has been set. +func (o *TokenClaim) HasLabel() bool { + if o != nil && !isNil(o.Label) { + return true + } + + return false +} + +// SetLabel gets a reference to the given string and assigns it to the Label field. +func (o *TokenClaim) SetLabel(v string) { + o.Label = &v +} + +// GetUserAttributeMappings returns the UserAttributeMappings field value if set, zero value otherwise. +func (o *TokenClaim) GetUserAttributeMappings() string { + if o == nil || isNil(o.UserAttributeMappings) { + var ret string + return ret + } + return *o.UserAttributeMappings +} + +// GetUserAttributeMappingsOk returns a tuple with the UserAttributeMappings field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TokenClaim) GetUserAttributeMappingsOk() (*string, bool) { + if o == nil || isNil(o.UserAttributeMappings) { + return nil, false + } + return o.UserAttributeMappings, true +} + +// HasUserAttributeMappings returns a boolean if a field has been set. +func (o *TokenClaim) HasUserAttributeMappings() bool { + if o != nil && !isNil(o.UserAttributeMappings) { + return true + } + + return false +} + +// SetUserAttributeMappings gets a reference to the given string and assigns it to the UserAttributeMappings field. +func (o *TokenClaim) SetUserAttributeMappings(v string) { + o.UserAttributeMappings = &v +} + +// GetUserAttributeMacros returns the UserAttributeMacros field value if set, zero value otherwise. +func (o *TokenClaim) GetUserAttributeMacros() string { + if o == nil || isNil(o.UserAttributeMacros) { + var ret string + return ret + } + return *o.UserAttributeMacros +} + +// GetUserAttributeMacrosOk returns a tuple with the UserAttributeMacros field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TokenClaim) GetUserAttributeMacrosOk() (*string, bool) { + if o == nil || isNil(o.UserAttributeMacros) { + return nil, false + } + return o.UserAttributeMacros, true +} + +// HasUserAttributeMacros returns a boolean if a field has been set. +func (o *TokenClaim) HasUserAttributeMacros() bool { + if o != nil && !isNil(o.UserAttributeMacros) { + return true + } + + return false +} + +// SetUserAttributeMacros gets a reference to the given string and assigns it to the UserAttributeMacros field. +func (o *TokenClaim) SetUserAttributeMacros(v string) { + o.UserAttributeMacros = &v +} + +// GetAttributeTransformations returns the AttributeTransformations field value if set, zero value otherwise. +func (o *TokenClaim) GetAttributeTransformations() string { + if o == nil || isNil(o.AttributeTransformations) { + var ret string + return ret + } + return *o.AttributeTransformations +} + +// GetAttributeTransformationsOk returns a tuple with the AttributeTransformations field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TokenClaim) GetAttributeTransformationsOk() (*string, bool) { + if o == nil || isNil(o.AttributeTransformations) { + return nil, false + } + return o.AttributeTransformations, true +} + +// HasAttributeTransformations returns a boolean if a field has been set. +func (o *TokenClaim) HasAttributeTransformations() bool { + if o != nil && !isNil(o.AttributeTransformations) { + return true + } + + return false +} + +// SetAttributeTransformations gets a reference to the given string and assigns it to the AttributeTransformations field. +func (o *TokenClaim) SetAttributeTransformations(v string) { + o.AttributeTransformations = &v +} + +// GetSkipIfBlank returns the SkipIfBlank field value if set, zero value otherwise. +func (o *TokenClaim) GetSkipIfBlank() bool { + if o == nil || isNil(o.SkipIfBlank) { + var ret bool + return ret + } + return *o.SkipIfBlank +} + +// GetSkipIfBlankOk returns a tuple with the SkipIfBlank field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TokenClaim) GetSkipIfBlankOk() (*bool, bool) { + if o == nil || isNil(o.SkipIfBlank) { + return nil, false + } + return o.SkipIfBlank, true +} + +// HasSkipIfBlank returns a boolean if a field has been set. +func (o *TokenClaim) HasSkipIfBlank() bool { + if o != nil && !isNil(o.SkipIfBlank) { + return true + } + + return false +} + +// SetSkipIfBlank gets a reference to the given bool and assigns it to the SkipIfBlank field. +func (o *TokenClaim) SetSkipIfBlank(v bool) { + o.SkipIfBlank = &v +} + +// GetValues returns the Values field value if set, zero value otherwise. +func (o *TokenClaim) GetValues() []string { + if o == nil || isNil(o.Values) { + var ret []string + return ret + } + return o.Values +} + +// GetValuesOk returns a tuple with the Values field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TokenClaim) GetValuesOk() ([]string, bool) { + if o == nil || isNil(o.Values) { + return nil, false + } + return o.Values, true +} + +// HasValues returns a boolean if a field has been set. +func (o *TokenClaim) HasValues() bool { + if o != nil && !isNil(o.Values) { + return true + } + + return false +} + +// SetValues gets a reference to the given []string and assigns it to the Values field. +func (o *TokenClaim) SetValues(v []string) { + o.Values = v +} + +// GetDefaultValues returns the DefaultValues field value if set, zero value otherwise. +func (o *TokenClaim) GetDefaultValues() string { + if o == nil || isNil(o.DefaultValues) { + var ret string + return ret + } + return *o.DefaultValues +} + +// GetDefaultValuesOk returns a tuple with the DefaultValues field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TokenClaim) GetDefaultValuesOk() (*string, bool) { + if o == nil || isNil(o.DefaultValues) { + return nil, false + } + return o.DefaultValues, true +} + +// HasDefaultValues returns a boolean if a field has been set. +func (o *TokenClaim) HasDefaultValues() bool { + if o != nil && !isNil(o.DefaultValues) { + return true + } + + return false +} + +// SetDefaultValues gets a reference to the given string and assigns it to the DefaultValues field. +func (o *TokenClaim) SetDefaultValues(v string) { + o.DefaultValues = &v +} + +// GetProvisionedEntitlements returns the ProvisionedEntitlements field value if set, zero value otherwise. +func (o *TokenClaim) GetProvisionedEntitlements() bool { + if o == nil || isNil(o.ProvisionedEntitlements) { + var ret bool + return ret + } + return *o.ProvisionedEntitlements +} + +// GetProvisionedEntitlementsOk returns a tuple with the ProvisionedEntitlements field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TokenClaim) GetProvisionedEntitlementsOk() (*bool, bool) { + if o == nil || isNil(o.ProvisionedEntitlements) { + return nil, false + } + return o.ProvisionedEntitlements, true +} + +// HasProvisionedEntitlements returns a boolean if a field has been set. +func (o *TokenClaim) HasProvisionedEntitlements() bool { + if o != nil && !isNil(o.ProvisionedEntitlements) { + return true + } + + return false +} + +// SetProvisionedEntitlements gets a reference to the given bool and assigns it to the ProvisionedEntitlements field. +func (o *TokenClaim) SetProvisionedEntitlements(v bool) { + o.ProvisionedEntitlements = &v +} + +func (o TokenClaim) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TokenClaim) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.Id) { + toSerialize["id"] = o.Id + } + if !isNil(o.Label) { + toSerialize["label"] = o.Label + } + if !isNil(o.UserAttributeMappings) { + toSerialize["user_attribute_mappings"] = o.UserAttributeMappings + } + if !isNil(o.UserAttributeMacros) { + toSerialize["user_attribute_macros"] = o.UserAttributeMacros + } + if !isNil(o.AttributeTransformations) { + toSerialize["attribute_transformations"] = o.AttributeTransformations + } + if !isNil(o.SkipIfBlank) { + toSerialize["skip_if_blank"] = o.SkipIfBlank + } + if !isNil(o.Values) { + toSerialize["values"] = o.Values + } + if !isNil(o.DefaultValues) { + toSerialize["default_values"] = o.DefaultValues + } + if !isNil(o.ProvisionedEntitlements) { + toSerialize["provisioned_entitlements"] = o.ProvisionedEntitlements + } + return toSerialize, nil +} + +type NullableTokenClaim struct { + value *TokenClaim + isSet bool +} + +func (v NullableTokenClaim) Get() *TokenClaim { + return v.value +} + +func (v *NullableTokenClaim) Set(val *TokenClaim) { + v.value = val + v.isSet = true +} + +func (v NullableTokenClaim) IsSet() bool { + return v.isSet +} + +func (v *NullableTokenClaim) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTokenClaim(val *TokenClaim) *NullableTokenClaim { + return &NullableTokenClaim{value: val, isSet: true} +} + +func (v NullableTokenClaim) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTokenClaim) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_track_event_request.go b/model_track_risk_event_request.go similarity index 57% rename from model_track_event_request.go rename to model_track_risk_event_request.go index c55e877..4048851 100644 --- a/model_track_event_request.go +++ b/model_track_risk_event_request.go @@ -1,21 +1,24 @@ /* OneLogin API -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) +OpenAPI Specification for OneLogin -API version: 3.0.0-alpha.1 +API version: 3.1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package openapi +package onelogin import ( "encoding/json" ) -// TrackEventRequest struct for TrackEventRequest -type TrackEventRequest struct { +// checks if the TrackRiskEventRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TrackRiskEventRequest{} + +// TrackRiskEventRequest struct for TrackRiskEventRequest +type TrackRiskEventRequest struct { // Verbs are used to distinguish between different types of events. Verb string `json:"verb"` // The IP address of the User's request. @@ -32,12 +35,12 @@ type TrackEventRequest struct { Published *string `json:"published,omitempty"` } -// NewTrackEventRequest instantiates a new TrackEventRequest object +// NewTrackRiskEventRequest instantiates a new TrackRiskEventRequest 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 NewTrackEventRequest(verb string, ip string, userAgent string, user RiskUser) *TrackEventRequest { - this := TrackEventRequest{} +func NewTrackRiskEventRequest(verb string, ip string, userAgent string, user RiskUser) *TrackRiskEventRequest { + this := TrackRiskEventRequest{} this.Verb = verb this.Ip = ip this.UserAgent = userAgent @@ -45,16 +48,16 @@ func NewTrackEventRequest(verb string, ip string, userAgent string, user RiskUse return &this } -// NewTrackEventRequestWithDefaults instantiates a new TrackEventRequest object +// NewTrackRiskEventRequestWithDefaults instantiates a new TrackRiskEventRequest 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 NewTrackEventRequestWithDefaults() *TrackEventRequest { - this := TrackEventRequest{} +func NewTrackRiskEventRequestWithDefaults() *TrackRiskEventRequest { + this := TrackRiskEventRequest{} return &this } // GetVerb returns the Verb field value -func (o *TrackEventRequest) GetVerb() string { +func (o *TrackRiskEventRequest) GetVerb() string { if o == nil { var ret string return ret @@ -65,7 +68,7 @@ func (o *TrackEventRequest) GetVerb() string { // GetVerbOk returns a tuple with the Verb field value // and a boolean to check if the value has been set. -func (o *TrackEventRequest) GetVerbOk() (*string, bool) { +func (o *TrackRiskEventRequest) GetVerbOk() (*string, bool) { if o == nil { return nil, false } @@ -73,12 +76,12 @@ func (o *TrackEventRequest) GetVerbOk() (*string, bool) { } // SetVerb sets field value -func (o *TrackEventRequest) SetVerb(v string) { +func (o *TrackRiskEventRequest) SetVerb(v string) { o.Verb = v } // GetIp returns the Ip field value -func (o *TrackEventRequest) GetIp() string { +func (o *TrackRiskEventRequest) GetIp() string { if o == nil { var ret string return ret @@ -89,7 +92,7 @@ func (o *TrackEventRequest) GetIp() string { // GetIpOk returns a tuple with the Ip field value // and a boolean to check if the value has been set. -func (o *TrackEventRequest) GetIpOk() (*string, bool) { +func (o *TrackRiskEventRequest) GetIpOk() (*string, bool) { if o == nil { return nil, false } @@ -97,12 +100,12 @@ func (o *TrackEventRequest) GetIpOk() (*string, bool) { } // SetIp sets field value -func (o *TrackEventRequest) SetIp(v string) { +func (o *TrackRiskEventRequest) SetIp(v string) { o.Ip = v } // GetUserAgent returns the UserAgent field value -func (o *TrackEventRequest) GetUserAgent() string { +func (o *TrackRiskEventRequest) GetUserAgent() string { if o == nil { var ret string return ret @@ -113,7 +116,7 @@ func (o *TrackEventRequest) GetUserAgent() string { // GetUserAgentOk returns a tuple with the UserAgent field value // and a boolean to check if the value has been set. -func (o *TrackEventRequest) GetUserAgentOk() (*string, bool) { +func (o *TrackRiskEventRequest) GetUserAgentOk() (*string, bool) { if o == nil { return nil, false } @@ -121,12 +124,12 @@ func (o *TrackEventRequest) GetUserAgentOk() (*string, bool) { } // SetUserAgent sets field value -func (o *TrackEventRequest) SetUserAgent(v string) { +func (o *TrackRiskEventRequest) SetUserAgent(v string) { o.UserAgent = v } // GetUser returns the User field value -func (o *TrackEventRequest) GetUser() RiskUser { +func (o *TrackRiskEventRequest) GetUser() RiskUser { if o == nil { var ret RiskUser return ret @@ -137,7 +140,7 @@ func (o *TrackEventRequest) GetUser() RiskUser { // GetUserOk returns a tuple with the User field value // and a boolean to check if the value has been set. -func (o *TrackEventRequest) GetUserOk() (*RiskUser, bool) { +func (o *TrackRiskEventRequest) GetUserOk() (*RiskUser, bool) { if o == nil { return nil, false } @@ -145,13 +148,13 @@ func (o *TrackEventRequest) GetUserOk() (*RiskUser, bool) { } // SetUser sets field value -func (o *TrackEventRequest) SetUser(v RiskUser) { +func (o *TrackRiskEventRequest) SetUser(v RiskUser) { o.User = v } // GetSource returns the Source field value if set, zero value otherwise. -func (o *TrackEventRequest) GetSource() Source { - if o == nil || o.Source == nil { +func (o *TrackRiskEventRequest) GetSource() Source { + if o == nil || isNil(o.Source) { var ret Source return ret } @@ -160,16 +163,16 @@ func (o *TrackEventRequest) GetSource() Source { // GetSourceOk returns a tuple with the Source field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *TrackEventRequest) GetSourceOk() (*Source, bool) { - if o == nil || o.Source == nil { +func (o *TrackRiskEventRequest) GetSourceOk() (*Source, bool) { + if o == nil || isNil(o.Source) { return nil, false } return o.Source, true } // HasSource returns a boolean if a field has been set. -func (o *TrackEventRequest) HasSource() bool { - if o != nil && o.Source != nil { +func (o *TrackRiskEventRequest) HasSource() bool { + if o != nil && !isNil(o.Source) { return true } @@ -177,13 +180,13 @@ func (o *TrackEventRequest) HasSource() bool { } // SetSource gets a reference to the given Source and assigns it to the Source field. -func (o *TrackEventRequest) SetSource(v Source) { +func (o *TrackRiskEventRequest) SetSource(v Source) { o.Source = &v } // GetSession returns the Session field value if set, zero value otherwise. -func (o *TrackEventRequest) GetSession() Session { - if o == nil || o.Session == nil { +func (o *TrackRiskEventRequest) GetSession() Session { + if o == nil || isNil(o.Session) { var ret Session return ret } @@ -192,16 +195,16 @@ func (o *TrackEventRequest) GetSession() Session { // GetSessionOk returns a tuple with the Session field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *TrackEventRequest) GetSessionOk() (*Session, bool) { - if o == nil || o.Session == nil { +func (o *TrackRiskEventRequest) GetSessionOk() (*Session, bool) { + if o == nil || isNil(o.Session) { return nil, false } return o.Session, true } // HasSession returns a boolean if a field has been set. -func (o *TrackEventRequest) HasSession() bool { - if o != nil && o.Session != nil { +func (o *TrackRiskEventRequest) HasSession() bool { + if o != nil && !isNil(o.Session) { return true } @@ -209,13 +212,13 @@ func (o *TrackEventRequest) HasSession() bool { } // SetSession gets a reference to the given Session and assigns it to the Session field. -func (o *TrackEventRequest) SetSession(v Session) { +func (o *TrackRiskEventRequest) SetSession(v Session) { o.Session = &v } // GetDevice returns the Device field value if set, zero value otherwise. -func (o *TrackEventRequest) GetDevice() RiskDevice { - if o == nil || o.Device == nil { +func (o *TrackRiskEventRequest) GetDevice() RiskDevice { + if o == nil || isNil(o.Device) { var ret RiskDevice return ret } @@ -224,16 +227,16 @@ func (o *TrackEventRequest) GetDevice() RiskDevice { // GetDeviceOk returns a tuple with the Device field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *TrackEventRequest) GetDeviceOk() (*RiskDevice, bool) { - if o == nil || o.Device == nil { +func (o *TrackRiskEventRequest) GetDeviceOk() (*RiskDevice, bool) { + if o == nil || isNil(o.Device) { return nil, false } return o.Device, true } // HasDevice returns a boolean if a field has been set. -func (o *TrackEventRequest) HasDevice() bool { - if o != nil && o.Device != nil { +func (o *TrackRiskEventRequest) HasDevice() bool { + if o != nil && !isNil(o.Device) { return true } @@ -241,13 +244,13 @@ func (o *TrackEventRequest) HasDevice() bool { } // SetDevice gets a reference to the given RiskDevice and assigns it to the Device field. -func (o *TrackEventRequest) SetDevice(v RiskDevice) { +func (o *TrackRiskEventRequest) SetDevice(v RiskDevice) { o.Device = &v } // GetFp returns the Fp field value if set, zero value otherwise. -func (o *TrackEventRequest) GetFp() string { - if o == nil || o.Fp == nil { +func (o *TrackRiskEventRequest) GetFp() string { + if o == nil || isNil(o.Fp) { var ret string return ret } @@ -256,16 +259,16 @@ func (o *TrackEventRequest) GetFp() string { // GetFpOk returns a tuple with the Fp field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *TrackEventRequest) GetFpOk() (*string, bool) { - if o == nil || o.Fp == nil { +func (o *TrackRiskEventRequest) GetFpOk() (*string, bool) { + if o == nil || isNil(o.Fp) { return nil, false } return o.Fp, true } // HasFp returns a boolean if a field has been set. -func (o *TrackEventRequest) HasFp() bool { - if o != nil && o.Fp != nil { +func (o *TrackRiskEventRequest) HasFp() bool { + if o != nil && !isNil(o.Fp) { return true } @@ -273,13 +276,13 @@ func (o *TrackEventRequest) HasFp() bool { } // SetFp gets a reference to the given string and assigns it to the Fp field. -func (o *TrackEventRequest) SetFp(v string) { +func (o *TrackRiskEventRequest) SetFp(v string) { o.Fp = &v } // GetPublished returns the Published field value if set, zero value otherwise. -func (o *TrackEventRequest) GetPublished() string { - if o == nil || o.Published == nil { +func (o *TrackRiskEventRequest) GetPublished() string { + if o == nil || isNil(o.Published) { var ret string return ret } @@ -288,16 +291,16 @@ func (o *TrackEventRequest) GetPublished() string { // GetPublishedOk returns a tuple with the Published field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *TrackEventRequest) GetPublishedOk() (*string, bool) { - if o == nil || o.Published == nil { +func (o *TrackRiskEventRequest) GetPublishedOk() (*string, bool) { + if o == nil || isNil(o.Published) { return nil, false } return o.Published, true } // HasPublished returns a boolean if a field has been set. -func (o *TrackEventRequest) HasPublished() bool { - if o != nil && o.Published != nil { +func (o *TrackRiskEventRequest) HasPublished() bool { + if o != nil && !isNil(o.Published) { return true } @@ -305,74 +308,74 @@ func (o *TrackEventRequest) HasPublished() bool { } // SetPublished gets a reference to the given string and assigns it to the Published field. -func (o *TrackEventRequest) SetPublished(v string) { +func (o *TrackRiskEventRequest) SetPublished(v string) { o.Published = &v } -func (o TrackEventRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["verb"] = o.Verb - } - if true { - toSerialize["ip"] = o.Ip - } - if true { - toSerialize["user_agent"] = o.UserAgent - } - if true { - toSerialize["user"] = o.User +func (o TrackRiskEventRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err } - if o.Source != nil { + return json.Marshal(toSerialize) +} + +func (o TrackRiskEventRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["verb"] = o.Verb + toSerialize["ip"] = o.Ip + toSerialize["user_agent"] = o.UserAgent + toSerialize["user"] = o.User + if !isNil(o.Source) { toSerialize["source"] = o.Source } - if o.Session != nil { + if !isNil(o.Session) { toSerialize["session"] = o.Session } - if o.Device != nil { + if !isNil(o.Device) { toSerialize["device"] = o.Device } - if o.Fp != nil { + if !isNil(o.Fp) { toSerialize["fp"] = o.Fp } - if o.Published != nil { + if !isNil(o.Published) { toSerialize["published"] = o.Published } - return json.Marshal(toSerialize) + return toSerialize, nil } -type NullableTrackEventRequest struct { - value *TrackEventRequest +type NullableTrackRiskEventRequest struct { + value *TrackRiskEventRequest isSet bool } -func (v NullableTrackEventRequest) Get() *TrackEventRequest { +func (v NullableTrackRiskEventRequest) Get() *TrackRiskEventRequest { return v.value } -func (v *NullableTrackEventRequest) Set(val *TrackEventRequest) { +func (v *NullableTrackRiskEventRequest) Set(val *TrackRiskEventRequest) { v.value = val v.isSet = true } -func (v NullableTrackEventRequest) IsSet() bool { +func (v NullableTrackRiskEventRequest) IsSet() bool { return v.isSet } -func (v *NullableTrackEventRequest) Unset() { +func (v *NullableTrackRiskEventRequest) Unset() { v.value = nil v.isSet = false } -func NewNullableTrackEventRequest(val *TrackEventRequest) *NullableTrackEventRequest { - return &NullableTrackEventRequest{value: val, isSet: true} +func NewNullableTrackRiskEventRequest(val *TrackRiskEventRequest) *NullableTrackRiskEventRequest { + return &NullableTrackRiskEventRequest{value: val, isSet: true} } -func (v NullableTrackEventRequest) MarshalJSON() ([]byte, error) { +func (v NullableTrackRiskEventRequest) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } -func (v *NullableTrackEventRequest) UnmarshalJSON(src []byte) error { +func (v *NullableTrackRiskEventRequest) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/model_update_authorization_server_400_response.go b/model_update_authorization_server_400_response.go deleted file mode 100644 index 397bb4b..0000000 --- a/model_update_authorization_server_400_response.go +++ /dev/null @@ -1,223 +0,0 @@ -/* -OneLogin API - -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -API version: 3.0.0-alpha.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package openapi - -import ( - "encoding/json" -) - -// UpdateAuthorizationServer400Response struct for UpdateAuthorizationServer400Response -type UpdateAuthorizationServer400Response struct { - Field *string `json:"field,omitempty"` - Message *string `json:"message,omitempty"` - StatusCode *int32 `json:"statusCode,omitempty"` - Name *string `json:"name,omitempty"` -} - -// NewUpdateAuthorizationServer400Response instantiates a new UpdateAuthorizationServer400Response 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 NewUpdateAuthorizationServer400Response() *UpdateAuthorizationServer400Response { - this := UpdateAuthorizationServer400Response{} - return &this -} - -// NewUpdateAuthorizationServer400ResponseWithDefaults instantiates a new UpdateAuthorizationServer400Response 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 NewUpdateAuthorizationServer400ResponseWithDefaults() *UpdateAuthorizationServer400Response { - this := UpdateAuthorizationServer400Response{} - return &this -} - -// GetField returns the Field field value if set, zero value otherwise. -func (o *UpdateAuthorizationServer400Response) GetField() string { - if o == nil || o.Field == nil { - var ret string - return ret - } - return *o.Field -} - -// GetFieldOk returns a tuple with the Field field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateAuthorizationServer400Response) GetFieldOk() (*string, bool) { - if o == nil || o.Field == nil { - return nil, false - } - return o.Field, true -} - -// HasField returns a boolean if a field has been set. -func (o *UpdateAuthorizationServer400Response) HasField() bool { - if o != nil && o.Field != nil { - return true - } - - return false -} - -// SetField gets a reference to the given string and assigns it to the Field field. -func (o *UpdateAuthorizationServer400Response) SetField(v string) { - o.Field = &v -} - -// GetMessage returns the Message field value if set, zero value otherwise. -func (o *UpdateAuthorizationServer400Response) GetMessage() string { - if o == nil || o.Message == nil { - var ret string - return ret - } - return *o.Message -} - -// GetMessageOk returns a tuple with the Message field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateAuthorizationServer400Response) GetMessageOk() (*string, bool) { - if o == nil || o.Message == nil { - return nil, false - } - return o.Message, true -} - -// HasMessage returns a boolean if a field has been set. -func (o *UpdateAuthorizationServer400Response) HasMessage() bool { - if o != nil && o.Message != nil { - return true - } - - return false -} - -// SetMessage gets a reference to the given string and assigns it to the Message field. -func (o *UpdateAuthorizationServer400Response) SetMessage(v string) { - o.Message = &v -} - -// GetStatusCode returns the StatusCode field value if set, zero value otherwise. -func (o *UpdateAuthorizationServer400Response) GetStatusCode() int32 { - if o == nil || o.StatusCode == nil { - var ret int32 - return ret - } - return *o.StatusCode -} - -// GetStatusCodeOk returns a tuple with the StatusCode field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateAuthorizationServer400Response) GetStatusCodeOk() (*int32, bool) { - if o == nil || o.StatusCode == nil { - return nil, false - } - return o.StatusCode, true -} - -// HasStatusCode returns a boolean if a field has been set. -func (o *UpdateAuthorizationServer400Response) HasStatusCode() bool { - if o != nil && o.StatusCode != nil { - return true - } - - return false -} - -// SetStatusCode gets a reference to the given int32 and assigns it to the StatusCode field. -func (o *UpdateAuthorizationServer400Response) SetStatusCode(v int32) { - o.StatusCode = &v -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *UpdateAuthorizationServer400Response) GetName() string { - if o == nil || o.Name == nil { - var ret string - return ret - } - return *o.Name -} - -// 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 *UpdateAuthorizationServer400Response) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *UpdateAuthorizationServer400Response) HasName() bool { - if o != nil && o.Name != nil { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *UpdateAuthorizationServer400Response) SetName(v string) { - o.Name = &v -} - -func (o UpdateAuthorizationServer400Response) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Field != nil { - toSerialize["field"] = o.Field - } - if o.Message != nil { - toSerialize["message"] = o.Message - } - if o.StatusCode != nil { - toSerialize["statusCode"] = o.StatusCode - } - if o.Name != nil { - toSerialize["name"] = o.Name - } - return json.Marshal(toSerialize) -} - -type NullableUpdateAuthorizationServer400Response struct { - value *UpdateAuthorizationServer400Response - isSet bool -} - -func (v NullableUpdateAuthorizationServer400Response) Get() *UpdateAuthorizationServer400Response { - return v.value -} - -func (v *NullableUpdateAuthorizationServer400Response) Set(val *UpdateAuthorizationServer400Response) { - v.value = val - v.isSet = true -} - -func (v NullableUpdateAuthorizationServer400Response) IsSet() bool { - return v.isSet -} - -func (v *NullableUpdateAuthorizationServer400Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableUpdateAuthorizationServer400Response(val *UpdateAuthorizationServer400Response) *NullableUpdateAuthorizationServer400Response { - return &NullableUpdateAuthorizationServer400Response{value: val, isSet: true} -} - -func (v NullableUpdateAuthorizationServer400Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableUpdateAuthorizationServer400Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_update_client_app_request.go b/model_update_client_app_request.go index 2550360..5f4de77 100644 --- a/model_update_client_app_request.go +++ b/model_update_client_app_request.go @@ -1,21 +1,25 @@ /* OneLogin API -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) +OpenAPI Specification for OneLogin -API version: 3.0.0-alpha.1 +API version: 3.1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package openapi +package onelogin import ( "encoding/json" ) +// checks if the UpdateClientAppRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateClientAppRequest{} + // UpdateClientAppRequest struct for UpdateClientAppRequest type UpdateClientAppRequest struct { + // An array of Scope IDs the scopes the app can request Scopes []int32 `json:"scopes,omitempty"` } @@ -38,7 +42,7 @@ func NewUpdateClientAppRequestWithDefaults() *UpdateClientAppRequest { // GetScopes returns the Scopes field value if set, zero value otherwise. func (o *UpdateClientAppRequest) GetScopes() []int32 { - if o == nil || o.Scopes == nil { + if o == nil || isNil(o.Scopes) { var ret []int32 return ret } @@ -48,7 +52,7 @@ func (o *UpdateClientAppRequest) GetScopes() []int32 { // GetScopesOk returns a tuple with the Scopes field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *UpdateClientAppRequest) GetScopesOk() ([]int32, bool) { - if o == nil || o.Scopes == nil { + if o == nil || isNil(o.Scopes) { return nil, false } return o.Scopes, true @@ -56,7 +60,7 @@ func (o *UpdateClientAppRequest) GetScopesOk() ([]int32, bool) { // HasScopes returns a boolean if a field has been set. func (o *UpdateClientAppRequest) HasScopes() bool { - if o != nil && o.Scopes != nil { + if o != nil && !isNil(o.Scopes) { return true } @@ -69,11 +73,19 @@ func (o *UpdateClientAppRequest) SetScopes(v []int32) { } func (o UpdateClientAppRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateClientAppRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Scopes != nil { + if !isNil(o.Scopes) { toSerialize["scopes"] = o.Scopes } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableUpdateClientAppRequest struct { diff --git a/model_update_environment_variable_request.go b/model_update_environment_variable_request.go index e71e042..b9bb324 100644 --- a/model_update_environment_variable_request.go +++ b/model_update_environment_variable_request.go @@ -1,19 +1,22 @@ /* OneLogin API -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) +OpenAPI Specification for OneLogin -API version: 3.0.0-alpha.1 +API version: 3.1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package openapi +package onelogin import ( "encoding/json" ) +// checks if the UpdateEnvironmentVariableRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateEnvironmentVariableRequest{} + // UpdateEnvironmentVariableRequest struct for UpdateEnvironmentVariableRequest type UpdateEnvironmentVariableRequest struct { // The secret value that will be encrypted at rest and injected in applicable hook functions at run time. @@ -63,13 +66,19 @@ func (o *UpdateEnvironmentVariableRequest) SetValue(v string) { } func (o UpdateEnvironmentVariableRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["value"] = o.Value + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err } return json.Marshal(toSerialize) } +func (o UpdateEnvironmentVariableRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["value"] = o.Value + return toSerialize, nil +} + type NullableUpdateEnvironmentVariableRequest struct { value *UpdateEnvironmentVariableRequest isSet bool diff --git a/model_update_password_insecure_request.go b/model_update_password_insecure_request.go new file mode 100644 index 0000000..f475caf --- /dev/null +++ b/model_update_password_insecure_request.go @@ -0,0 +1,187 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the UpdatePasswordInsecureRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdatePasswordInsecureRequest{} + +// UpdatePasswordInsecureRequest struct for UpdatePasswordInsecureRequest +type UpdatePasswordInsecureRequest struct { + // Set to the password value using cleartext. Hashes are never stored as cleartext. They are stored securely using cryptographic hash. OneLogin continuously upgrades the strength of the hash. Ensure that the value meets the password strength requirements set for the account. + Password string `json:"password"` + // Ensure that this value matches the password value exactly. + PasswordConfirmation string `json:"password_confirmation"` + // Will passwords validate against the User Policy. Defaults to false. + ValidatePolicy *bool `json:"validate_policy,omitempty"` +} + +// NewUpdatePasswordInsecureRequest instantiates a new UpdatePasswordInsecureRequest 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 NewUpdatePasswordInsecureRequest(password string, passwordConfirmation string) *UpdatePasswordInsecureRequest { + this := UpdatePasswordInsecureRequest{} + this.Password = password + this.PasswordConfirmation = passwordConfirmation + var validatePolicy bool = false + this.ValidatePolicy = &validatePolicy + return &this +} + +// NewUpdatePasswordInsecureRequestWithDefaults instantiates a new UpdatePasswordInsecureRequest 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 NewUpdatePasswordInsecureRequestWithDefaults() *UpdatePasswordInsecureRequest { + this := UpdatePasswordInsecureRequest{} + var validatePolicy bool = false + this.ValidatePolicy = &validatePolicy + return &this +} + +// GetPassword returns the Password field value +func (o *UpdatePasswordInsecureRequest) GetPassword() string { + if o == nil { + var ret string + return ret + } + + return o.Password +} + +// GetPasswordOk returns a tuple with the Password field value +// and a boolean to check if the value has been set. +func (o *UpdatePasswordInsecureRequest) GetPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Password, true +} + +// SetPassword sets field value +func (o *UpdatePasswordInsecureRequest) SetPassword(v string) { + o.Password = v +} + +// GetPasswordConfirmation returns the PasswordConfirmation field value +func (o *UpdatePasswordInsecureRequest) GetPasswordConfirmation() string { + if o == nil { + var ret string + return ret + } + + return o.PasswordConfirmation +} + +// GetPasswordConfirmationOk returns a tuple with the PasswordConfirmation field value +// and a boolean to check if the value has been set. +func (o *UpdatePasswordInsecureRequest) GetPasswordConfirmationOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.PasswordConfirmation, true +} + +// SetPasswordConfirmation sets field value +func (o *UpdatePasswordInsecureRequest) SetPasswordConfirmation(v string) { + o.PasswordConfirmation = v +} + +// GetValidatePolicy returns the ValidatePolicy field value if set, zero value otherwise. +func (o *UpdatePasswordInsecureRequest) GetValidatePolicy() bool { + if o == nil || isNil(o.ValidatePolicy) { + var ret bool + return ret + } + return *o.ValidatePolicy +} + +// GetValidatePolicyOk returns a tuple with the ValidatePolicy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdatePasswordInsecureRequest) GetValidatePolicyOk() (*bool, bool) { + if o == nil || isNil(o.ValidatePolicy) { + return nil, false + } + return o.ValidatePolicy, true +} + +// HasValidatePolicy returns a boolean if a field has been set. +func (o *UpdatePasswordInsecureRequest) HasValidatePolicy() bool { + if o != nil && !isNil(o.ValidatePolicy) { + return true + } + + return false +} + +// SetValidatePolicy gets a reference to the given bool and assigns it to the ValidatePolicy field. +func (o *UpdatePasswordInsecureRequest) SetValidatePolicy(v bool) { + o.ValidatePolicy = &v +} + +func (o UpdatePasswordInsecureRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdatePasswordInsecureRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["password"] = o.Password + toSerialize["password_confirmation"] = o.PasswordConfirmation + if !isNil(o.ValidatePolicy) { + toSerialize["validate_policy"] = o.ValidatePolicy + } + return toSerialize, nil +} + +type NullableUpdatePasswordInsecureRequest struct { + value *UpdatePasswordInsecureRequest + isSet bool +} + +func (v NullableUpdatePasswordInsecureRequest) Get() *UpdatePasswordInsecureRequest { + return v.value +} + +func (v *NullableUpdatePasswordInsecureRequest) Set(val *UpdatePasswordInsecureRequest) { + v.value = val + v.isSet = true +} + +func (v NullableUpdatePasswordInsecureRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdatePasswordInsecureRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdatePasswordInsecureRequest(val *UpdatePasswordInsecureRequest) *NullableUpdatePasswordInsecureRequest { + return &NullableUpdatePasswordInsecureRequest{value: val, isSet: true} +} + +func (v NullableUpdatePasswordInsecureRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdatePasswordInsecureRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_update_password_secure_request.go b/model_update_password_secure_request.go new file mode 100644 index 0000000..e78b8be --- /dev/null +++ b/model_update_password_secure_request.go @@ -0,0 +1,211 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the UpdatePasswordSecureRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdatePasswordSecureRequest{} + +// UpdatePasswordSecureRequest struct for UpdatePasswordSecureRequest +type UpdatePasswordSecureRequest struct { + // Set to the password value using a SHA-256-encoded value. If you are including your own password_salt value in your request, prepend the salt value to the cleartext password value before SHA-256-encoding it. For example, if your salt value is hello and your cleartext password value is password, the value you need to SHA-256-encode is hellopassword. The resulting encoded value would be b1c788abac15390de987ad17b65ac73c9b475d428a51f245c645a442fddd078b. Note that the alpha characters in this has must all be lower case. + Password string `json:"password"` + // This value must match the password value. + PasswordConfirmation string `json:"password_confirmation"` + // Set to salt+sha256. + PasswordAlgorithm string `json:"password_algorithm"` + // Optional. If your password hash has been salted then you can provide the salt used in this param. This assumes that the salt was prepended to the password before doing the SHA256 hash. The API supports a salt value that is up to 40 characters long. + PasswordSalt *string `json:"password_salt,omitempty"` +} + +// NewUpdatePasswordSecureRequest instantiates a new UpdatePasswordSecureRequest 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 NewUpdatePasswordSecureRequest(password string, passwordConfirmation string, passwordAlgorithm string) *UpdatePasswordSecureRequest { + this := UpdatePasswordSecureRequest{} + this.Password = password + this.PasswordConfirmation = passwordConfirmation + this.PasswordAlgorithm = passwordAlgorithm + return &this +} + +// NewUpdatePasswordSecureRequestWithDefaults instantiates a new UpdatePasswordSecureRequest 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 NewUpdatePasswordSecureRequestWithDefaults() *UpdatePasswordSecureRequest { + this := UpdatePasswordSecureRequest{} + return &this +} + +// GetPassword returns the Password field value +func (o *UpdatePasswordSecureRequest) GetPassword() string { + if o == nil { + var ret string + return ret + } + + return o.Password +} + +// GetPasswordOk returns a tuple with the Password field value +// and a boolean to check if the value has been set. +func (o *UpdatePasswordSecureRequest) GetPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Password, true +} + +// SetPassword sets field value +func (o *UpdatePasswordSecureRequest) SetPassword(v string) { + o.Password = v +} + +// GetPasswordConfirmation returns the PasswordConfirmation field value +func (o *UpdatePasswordSecureRequest) GetPasswordConfirmation() string { + if o == nil { + var ret string + return ret + } + + return o.PasswordConfirmation +} + +// GetPasswordConfirmationOk returns a tuple with the PasswordConfirmation field value +// and a boolean to check if the value has been set. +func (o *UpdatePasswordSecureRequest) GetPasswordConfirmationOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.PasswordConfirmation, true +} + +// SetPasswordConfirmation sets field value +func (o *UpdatePasswordSecureRequest) SetPasswordConfirmation(v string) { + o.PasswordConfirmation = v +} + +// GetPasswordAlgorithm returns the PasswordAlgorithm field value +func (o *UpdatePasswordSecureRequest) GetPasswordAlgorithm() string { + if o == nil { + var ret string + return ret + } + + return o.PasswordAlgorithm +} + +// GetPasswordAlgorithmOk returns a tuple with the PasswordAlgorithm field value +// and a boolean to check if the value has been set. +func (o *UpdatePasswordSecureRequest) GetPasswordAlgorithmOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.PasswordAlgorithm, true +} + +// SetPasswordAlgorithm sets field value +func (o *UpdatePasswordSecureRequest) SetPasswordAlgorithm(v string) { + o.PasswordAlgorithm = v +} + +// GetPasswordSalt returns the PasswordSalt field value if set, zero value otherwise. +func (o *UpdatePasswordSecureRequest) GetPasswordSalt() string { + if o == nil || isNil(o.PasswordSalt) { + var ret string + return ret + } + return *o.PasswordSalt +} + +// GetPasswordSaltOk returns a tuple with the PasswordSalt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdatePasswordSecureRequest) GetPasswordSaltOk() (*string, bool) { + if o == nil || isNil(o.PasswordSalt) { + return nil, false + } + return o.PasswordSalt, true +} + +// HasPasswordSalt returns a boolean if a field has been set. +func (o *UpdatePasswordSecureRequest) HasPasswordSalt() bool { + if o != nil && !isNil(o.PasswordSalt) { + return true + } + + return false +} + +// SetPasswordSalt gets a reference to the given string and assigns it to the PasswordSalt field. +func (o *UpdatePasswordSecureRequest) SetPasswordSalt(v string) { + o.PasswordSalt = &v +} + +func (o UpdatePasswordSecureRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdatePasswordSecureRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["password"] = o.Password + toSerialize["password_confirmation"] = o.PasswordConfirmation + toSerialize["password_algorithm"] = o.PasswordAlgorithm + if !isNil(o.PasswordSalt) { + toSerialize["password_salt"] = o.PasswordSalt + } + return toSerialize, nil +} + +type NullableUpdatePasswordSecureRequest struct { + value *UpdatePasswordSecureRequest + isSet bool +} + +func (v NullableUpdatePasswordSecureRequest) Get() *UpdatePasswordSecureRequest { + return v.value +} + +func (v *NullableUpdatePasswordSecureRequest) Set(val *UpdatePasswordSecureRequest) { + v.value = val + v.isSet = true +} + +func (v NullableUpdatePasswordSecureRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdatePasswordSecureRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdatePasswordSecureRequest(val *UpdatePasswordSecureRequest) *NullableUpdatePasswordSecureRequest { + return &NullableUpdatePasswordSecureRequest{value: val, isSet: true} +} + +func (v NullableUpdatePasswordSecureRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdatePasswordSecureRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_update_privilege_200_response.go b/model_update_privilege_200_response.go new file mode 100644 index 0000000..8e99f57 --- /dev/null +++ b/model_update_privilege_200_response.go @@ -0,0 +1,127 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the UpdatePrivilege200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdatePrivilege200Response{} + +// UpdatePrivilege200Response struct for UpdatePrivilege200Response +type UpdatePrivilege200Response struct { + // Privilege ID + Id *string `json:"id,omitempty"` +} + +// NewUpdatePrivilege200Response instantiates a new UpdatePrivilege200Response 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 NewUpdatePrivilege200Response() *UpdatePrivilege200Response { + this := UpdatePrivilege200Response{} + return &this +} + +// NewUpdatePrivilege200ResponseWithDefaults instantiates a new UpdatePrivilege200Response 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 NewUpdatePrivilege200ResponseWithDefaults() *UpdatePrivilege200Response { + this := UpdatePrivilege200Response{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *UpdatePrivilege200Response) GetId() string { + if o == nil || isNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdatePrivilege200Response) GetIdOk() (*string, bool) { + if o == nil || isNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *UpdatePrivilege200Response) HasId() bool { + if o != nil && !isNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *UpdatePrivilege200Response) SetId(v string) { + o.Id = &v +} + +func (o UpdatePrivilege200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdatePrivilege200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.Id) { + toSerialize["id"] = o.Id + } + return toSerialize, nil +} + +type NullableUpdatePrivilege200Response struct { + value *UpdatePrivilege200Response + isSet bool +} + +func (v NullableUpdatePrivilege200Response) Get() *UpdatePrivilege200Response { + return v.value +} + +func (v *NullableUpdatePrivilege200Response) Set(val *UpdatePrivilege200Response) { + v.value = val + v.isSet = true +} + +func (v NullableUpdatePrivilege200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdatePrivilege200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdatePrivilege200Response(val *UpdatePrivilege200Response) *NullableUpdatePrivilege200Response { + return &NullableUpdatePrivilege200Response{value: val, isSet: true} +} + +func (v NullableUpdatePrivilege200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdatePrivilege200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_update_risk_rule_request.go b/model_update_risk_rule_request.go new file mode 100644 index 0000000..0ff56f1 --- /dev/null +++ b/model_update_risk_rule_request.go @@ -0,0 +1,127 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the UpdateRiskRuleRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateRiskRuleRequest{} + +// UpdateRiskRuleRequest struct for UpdateRiskRuleRequest +type UpdateRiskRuleRequest struct { + // The ID of the Rule to Update + Id *string `json:"id,omitempty"` +} + +// NewUpdateRiskRuleRequest instantiates a new UpdateRiskRuleRequest 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 NewUpdateRiskRuleRequest() *UpdateRiskRuleRequest { + this := UpdateRiskRuleRequest{} + return &this +} + +// NewUpdateRiskRuleRequestWithDefaults instantiates a new UpdateRiskRuleRequest 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 NewUpdateRiskRuleRequestWithDefaults() *UpdateRiskRuleRequest { + this := UpdateRiskRuleRequest{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *UpdateRiskRuleRequest) GetId() string { + if o == nil || isNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateRiskRuleRequest) GetIdOk() (*string, bool) { + if o == nil || isNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *UpdateRiskRuleRequest) HasId() bool { + if o != nil && !isNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *UpdateRiskRuleRequest) SetId(v string) { + o.Id = &v +} + +func (o UpdateRiskRuleRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateRiskRuleRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.Id) { + toSerialize["id"] = o.Id + } + return toSerialize, nil +} + +type NullableUpdateRiskRuleRequest struct { + value *UpdateRiskRuleRequest + isSet bool +} + +func (v NullableUpdateRiskRuleRequest) Get() *UpdateRiskRuleRequest { + return v.value +} + +func (v *NullableUpdateRiskRuleRequest) Set(val *UpdateRiskRuleRequest) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateRiskRuleRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateRiskRuleRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateRiskRuleRequest(val *UpdateRiskRuleRequest) *NullableUpdateRiskRuleRequest { + return &NullableUpdateRiskRuleRequest{value: val, isSet: true} +} + +func (v NullableUpdateRiskRuleRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateRiskRuleRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_update_role_200_response.go b/model_update_role_200_response.go index 006f6bf..b9bfdba 100644 --- a/model_update_role_200_response.go +++ b/model_update_role_200_response.go @@ -1,19 +1,22 @@ /* OneLogin API -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) +OpenAPI Specification for OneLogin -API version: 3.0.0-alpha.1 +API version: 3.1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package openapi +package onelogin import ( "encoding/json" ) +// checks if the UpdateRole200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateRole200Response{} + // UpdateRole200Response struct for UpdateRole200Response type UpdateRole200Response struct { Id *int32 `json:"id,omitempty"` @@ -38,7 +41,7 @@ func NewUpdateRole200ResponseWithDefaults() *UpdateRole200Response { // GetId returns the Id field value if set, zero value otherwise. func (o *UpdateRole200Response) GetId() int32 { - if o == nil || o.Id == nil { + if o == nil || isNil(o.Id) { var ret int32 return ret } @@ -48,7 +51,7 @@ func (o *UpdateRole200Response) GetId() int32 { // GetIdOk returns a tuple with the Id field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *UpdateRole200Response) GetIdOk() (*int32, bool) { - if o == nil || o.Id == nil { + if o == nil || isNil(o.Id) { return nil, false } return o.Id, true @@ -56,7 +59,7 @@ func (o *UpdateRole200Response) GetIdOk() (*int32, bool) { // HasId returns a boolean if a field has been set. func (o *UpdateRole200Response) HasId() bool { - if o != nil && o.Id != nil { + if o != nil && !isNil(o.Id) { return true } @@ -69,11 +72,19 @@ func (o *UpdateRole200Response) SetId(v int32) { } func (o UpdateRole200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateRole200Response) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { + if !isNil(o.Id) { toSerialize["id"] = o.Id } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableUpdateRole200Response struct { diff --git a/model_user.go b/model_user.go index f0943b0..30703cc 100644 --- a/model_user.go +++ b/model_user.go @@ -1,19 +1,22 @@ /* OneLogin API -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) +OpenAPI Specification for OneLogin -API version: 3.0.0-alpha.1 +API version: 3.1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package openapi +package onelogin import ( "encoding/json" ) +// checks if the User type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &User{} + // User struct for User type User struct { Id *int32 `json:"id,omitempty"` @@ -50,7 +53,7 @@ type User struct { // The OneLogin User ID for the user's manager. ManagerUserId *string `json:"manager_user_id,omitempty"` // The user's Active Directory username. - SamaccountName *string `json:"samaccount_name,omitempty"` + Samaccountname *string `json:"samaccountname,omitempty"` // The user's directory membership. MemberOf *string `json:"member_of,omitempty"` // The principle name of the user. @@ -65,7 +68,6 @@ type User struct { UpdatedAt *string `json:"updated_at,omitempty"` PreferredLocaleCode *string `json:"preferred_locale_code,omitempty"` CreatedAt *string `json:"created_at,omitempty"` - CustomAttributes map[string]interface{} `json:"custom_attributes,omitempty"` InvalidLoginAttempts *int32 `json:"invalid_login_attempts,omitempty"` LockedUntil *string `json:"locked_until,omitempty"` PasswordChangedAt *string `json:"password_changed_at,omitempty"` @@ -98,7 +100,7 @@ func NewUserWithDefaults() *User { // GetId returns the Id field value if set, zero value otherwise. func (o *User) GetId() int32 { - if o == nil || o.Id == nil { + if o == nil || isNil(o.Id) { var ret int32 return ret } @@ -108,7 +110,7 @@ func (o *User) GetId() int32 { // GetIdOk returns a tuple with the Id field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *User) GetIdOk() (*int32, bool) { - if o == nil || o.Id == nil { + if o == nil || isNil(o.Id) { return nil, false } return o.Id, true @@ -116,7 +118,7 @@ func (o *User) GetIdOk() (*int32, bool) { // HasId returns a boolean if a field has been set. func (o *User) HasId() bool { - if o != nil && o.Id != nil { + if o != nil && !isNil(o.Id) { return true } @@ -130,7 +132,7 @@ func (o *User) SetId(v int32) { // GetUsername returns the Username field value if set, zero value otherwise. func (o *User) GetUsername() string { - if o == nil || o.Username == nil { + if o == nil || isNil(o.Username) { var ret string return ret } @@ -140,7 +142,7 @@ func (o *User) 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 *User) GetUsernameOk() (*string, bool) { - if o == nil || o.Username == nil { + if o == nil || isNil(o.Username) { return nil, false } return o.Username, true @@ -148,7 +150,7 @@ func (o *User) GetUsernameOk() (*string, bool) { // HasUsername returns a boolean if a field has been set. func (o *User) HasUsername() bool { - if o != nil && o.Username != nil { + if o != nil && !isNil(o.Username) { return true } @@ -162,7 +164,7 @@ func (o *User) SetUsername(v string) { // 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 } @@ -172,7 +174,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 @@ -180,7 +182,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 } @@ -194,7 +196,7 @@ func (o *User) SetEmail(v string) { // GetFirstname returns the Firstname field value if set, zero value otherwise. func (o *User) GetFirstname() string { - if o == nil || o.Firstname == nil { + if o == nil || isNil(o.Firstname) { var ret string return ret } @@ -204,7 +206,7 @@ func (o *User) GetFirstname() string { // GetFirstnameOk returns a tuple with the Firstname field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *User) GetFirstnameOk() (*string, bool) { - if o == nil || o.Firstname == nil { + if o == nil || isNil(o.Firstname) { return nil, false } return o.Firstname, true @@ -212,7 +214,7 @@ func (o *User) GetFirstnameOk() (*string, bool) { // HasFirstname returns a boolean if a field has been set. func (o *User) HasFirstname() bool { - if o != nil && o.Firstname != nil { + if o != nil && !isNil(o.Firstname) { return true } @@ -226,7 +228,7 @@ func (o *User) SetFirstname(v string) { // GetLastname returns the Lastname field value if set, zero value otherwise. func (o *User) GetLastname() string { - if o == nil || o.Lastname == nil { + if o == nil || isNil(o.Lastname) { var ret string return ret } @@ -236,7 +238,7 @@ func (o *User) GetLastname() string { // GetLastnameOk returns a tuple with the Lastname field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *User) GetLastnameOk() (*string, bool) { - if o == nil || o.Lastname == nil { + if o == nil || isNil(o.Lastname) { return nil, false } return o.Lastname, true @@ -244,7 +246,7 @@ func (o *User) GetLastnameOk() (*string, bool) { // HasLastname returns a boolean if a field has been set. func (o *User) HasLastname() bool { - if o != nil && o.Lastname != nil { + if o != nil && !isNil(o.Lastname) { return true } @@ -258,7 +260,7 @@ func (o *User) SetLastname(v string) { // GetTitle returns the Title field value if set, zero value otherwise. func (o *User) GetTitle() string { - if o == nil || o.Title == nil { + if o == nil || isNil(o.Title) { var ret string return ret } @@ -268,7 +270,7 @@ func (o *User) 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 *User) GetTitleOk() (*string, bool) { - if o == nil || o.Title == nil { + if o == nil || isNil(o.Title) { return nil, false } return o.Title, true @@ -276,7 +278,7 @@ func (o *User) GetTitleOk() (*string, bool) { // HasTitle returns a boolean if a field has been set. func (o *User) HasTitle() bool { - if o != nil && o.Title != nil { + if o != nil && !isNil(o.Title) { return true } @@ -290,7 +292,7 @@ func (o *User) SetTitle(v string) { // GetDepartment returns the Department field value if set, zero value otherwise. func (o *User) GetDepartment() string { - if o == nil || o.Department == nil { + if o == nil || isNil(o.Department) { var ret string return ret } @@ -300,7 +302,7 @@ func (o *User) GetDepartment() string { // GetDepartmentOk returns a tuple with the Department field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *User) GetDepartmentOk() (*string, bool) { - if o == nil || o.Department == nil { + if o == nil || isNil(o.Department) { return nil, false } return o.Department, true @@ -308,7 +310,7 @@ func (o *User) GetDepartmentOk() (*string, bool) { // HasDepartment returns a boolean if a field has been set. func (o *User) HasDepartment() bool { - if o != nil && o.Department != nil { + if o != nil && !isNil(o.Department) { return true } @@ -322,7 +324,7 @@ func (o *User) SetDepartment(v string) { // GetCompany returns the Company field value if set, zero value otherwise. func (o *User) GetCompany() string { - if o == nil || o.Company == nil { + if o == nil || isNil(o.Company) { var ret string return ret } @@ -332,7 +334,7 @@ func (o *User) GetCompany() string { // GetCompanyOk returns a tuple with the Company field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *User) GetCompanyOk() (*string, bool) { - if o == nil || o.Company == nil { + if o == nil || isNil(o.Company) { return nil, false } return o.Company, true @@ -340,7 +342,7 @@ func (o *User) GetCompanyOk() (*string, bool) { // HasCompany returns a boolean if a field has been set. func (o *User) HasCompany() bool { - if o != nil && o.Company != nil { + if o != nil && !isNil(o.Company) { return true } @@ -354,7 +356,7 @@ func (o *User) SetCompany(v string) { // GetComment returns the Comment field value if set, zero value otherwise. func (o *User) GetComment() string { - if o == nil || o.Comment == nil { + if o == nil || isNil(o.Comment) { var ret string return ret } @@ -364,7 +366,7 @@ func (o *User) GetComment() string { // GetCommentOk returns a tuple with the Comment field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *User) GetCommentOk() (*string, bool) { - if o == nil || o.Comment == nil { + if o == nil || isNil(o.Comment) { return nil, false } return o.Comment, true @@ -372,7 +374,7 @@ func (o *User) GetCommentOk() (*string, bool) { // HasComment returns a boolean if a field has been set. func (o *User) HasComment() bool { - if o != nil && o.Comment != nil { + if o != nil && !isNil(o.Comment) { return true } @@ -386,7 +388,7 @@ func (o *User) SetComment(v string) { // GetGroupId returns the GroupId field value if set, zero value otherwise. func (o *User) GetGroupId() int32 { - if o == nil || o.GroupId == nil { + if o == nil || isNil(o.GroupId) { var ret int32 return ret } @@ -396,7 +398,7 @@ func (o *User) GetGroupId() int32 { // GetGroupIdOk returns a tuple with the GroupId field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *User) GetGroupIdOk() (*int32, bool) { - if o == nil || o.GroupId == nil { + if o == nil || isNil(o.GroupId) { return nil, false } return o.GroupId, true @@ -404,7 +406,7 @@ func (o *User) GetGroupIdOk() (*int32, bool) { // HasGroupId returns a boolean if a field has been set. func (o *User) HasGroupId() bool { - if o != nil && o.GroupId != nil { + if o != nil && !isNil(o.GroupId) { return true } @@ -418,7 +420,7 @@ func (o *User) SetGroupId(v int32) { // GetRoleIds returns the RoleIds field value if set, zero value otherwise. func (o *User) GetRoleIds() []int32 { - if o == nil || o.RoleIds == nil { + if o == nil || isNil(o.RoleIds) { var ret []int32 return ret } @@ -428,7 +430,7 @@ func (o *User) GetRoleIds() []int32 { // GetRoleIdsOk returns a tuple with the RoleIds field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *User) GetRoleIdsOk() ([]int32, bool) { - if o == nil || o.RoleIds == nil { + if o == nil || isNil(o.RoleIds) { return nil, false } return o.RoleIds, true @@ -436,7 +438,7 @@ func (o *User) GetRoleIdsOk() ([]int32, bool) { // HasRoleIds returns a boolean if a field has been set. func (o *User) HasRoleIds() bool { - if o != nil && o.RoleIds != nil { + if o != nil && !isNil(o.RoleIds) { return true } @@ -450,7 +452,7 @@ func (o *User) SetRoleIds(v []int32) { // GetPhone returns the Phone field value if set, zero value otherwise. func (o *User) GetPhone() string { - if o == nil || o.Phone == nil { + if o == nil || isNil(o.Phone) { var ret string return ret } @@ -460,7 +462,7 @@ func (o *User) GetPhone() string { // GetPhoneOk returns a tuple with the Phone field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *User) GetPhoneOk() (*string, bool) { - if o == nil || o.Phone == nil { + if o == nil || isNil(o.Phone) { return nil, false } return o.Phone, true @@ -468,7 +470,7 @@ func (o *User) GetPhoneOk() (*string, bool) { // HasPhone returns a boolean if a field has been set. func (o *User) HasPhone() bool { - if o != nil && o.Phone != nil { + if o != nil && !isNil(o.Phone) { return true } @@ -482,7 +484,7 @@ func (o *User) SetPhone(v string) { // GetState returns the State field value if set, zero value otherwise. func (o *User) GetState() int32 { - if o == nil || o.State == nil { + if o == nil || isNil(o.State) { var ret int32 return ret } @@ -492,7 +494,7 @@ func (o *User) GetState() int32 { // GetStateOk returns a tuple with the State field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *User) GetStateOk() (*int32, bool) { - if o == nil || o.State == nil { + if o == nil || isNil(o.State) { return nil, false } return o.State, true @@ -500,7 +502,7 @@ func (o *User) GetStateOk() (*int32, bool) { // HasState returns a boolean if a field has been set. func (o *User) HasState() bool { - if o != nil && o.State != nil { + if o != nil && !isNil(o.State) { return true } @@ -514,7 +516,7 @@ func (o *User) SetState(v int32) { // GetStatus returns the Status field value if set, zero value otherwise. func (o *User) GetStatus() int32 { - if o == nil || o.Status == nil { + if o == nil || isNil(o.Status) { var ret int32 return ret } @@ -524,7 +526,7 @@ func (o *User) GetStatus() int32 { // GetStatusOk returns a tuple with the Status field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *User) GetStatusOk() (*int32, bool) { - if o == nil || o.Status == nil { + if o == nil || isNil(o.Status) { return nil, false } return o.Status, true @@ -532,7 +534,7 @@ func (o *User) GetStatusOk() (*int32, bool) { // HasStatus returns a boolean if a field has been set. func (o *User) HasStatus() bool { - if o != nil && o.Status != nil { + if o != nil && !isNil(o.Status) { return true } @@ -546,7 +548,7 @@ func (o *User) SetStatus(v int32) { // GetDirectoryId returns the DirectoryId field value if set, zero value otherwise. func (o *User) GetDirectoryId() int32 { - if o == nil || o.DirectoryId == nil { + if o == nil || isNil(o.DirectoryId) { var ret int32 return ret } @@ -556,7 +558,7 @@ func (o *User) GetDirectoryId() int32 { // GetDirectoryIdOk returns a tuple with the DirectoryId field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *User) GetDirectoryIdOk() (*int32, bool) { - if o == nil || o.DirectoryId == nil { + if o == nil || isNil(o.DirectoryId) { return nil, false } return o.DirectoryId, true @@ -564,7 +566,7 @@ func (o *User) GetDirectoryIdOk() (*int32, bool) { // HasDirectoryId returns a boolean if a field has been set. func (o *User) HasDirectoryId() bool { - if o != nil && o.DirectoryId != nil { + if o != nil && !isNil(o.DirectoryId) { return true } @@ -578,7 +580,7 @@ func (o *User) SetDirectoryId(v int32) { // GetTrustedIdpId returns the TrustedIdpId field value if set, zero value otherwise. func (o *User) GetTrustedIdpId() int32 { - if o == nil || o.TrustedIdpId == nil { + if o == nil || isNil(o.TrustedIdpId) { var ret int32 return ret } @@ -588,7 +590,7 @@ func (o *User) GetTrustedIdpId() int32 { // GetTrustedIdpIdOk returns a tuple with the TrustedIdpId field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *User) GetTrustedIdpIdOk() (*int32, bool) { - if o == nil || o.TrustedIdpId == nil { + if o == nil || isNil(o.TrustedIdpId) { return nil, false } return o.TrustedIdpId, true @@ -596,7 +598,7 @@ func (o *User) GetTrustedIdpIdOk() (*int32, bool) { // HasTrustedIdpId returns a boolean if a field has been set. func (o *User) HasTrustedIdpId() bool { - if o != nil && o.TrustedIdpId != nil { + if o != nil && !isNil(o.TrustedIdpId) { return true } @@ -610,7 +612,7 @@ func (o *User) SetTrustedIdpId(v int32) { // GetManagerAdId returns the ManagerAdId field value if set, zero value otherwise. func (o *User) GetManagerAdId() string { - if o == nil || o.ManagerAdId == nil { + if o == nil || isNil(o.ManagerAdId) { var ret string return ret } @@ -620,7 +622,7 @@ func (o *User) GetManagerAdId() string { // GetManagerAdIdOk returns a tuple with the ManagerAdId field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *User) GetManagerAdIdOk() (*string, bool) { - if o == nil || o.ManagerAdId == nil { + if o == nil || isNil(o.ManagerAdId) { return nil, false } return o.ManagerAdId, true @@ -628,7 +630,7 @@ func (o *User) GetManagerAdIdOk() (*string, bool) { // HasManagerAdId returns a boolean if a field has been set. func (o *User) HasManagerAdId() bool { - if o != nil && o.ManagerAdId != nil { + if o != nil && !isNil(o.ManagerAdId) { return true } @@ -642,7 +644,7 @@ func (o *User) SetManagerAdId(v string) { // GetManagerUserId returns the ManagerUserId field value if set, zero value otherwise. func (o *User) GetManagerUserId() string { - if o == nil || o.ManagerUserId == nil { + if o == nil || isNil(o.ManagerUserId) { var ret string return ret } @@ -652,7 +654,7 @@ func (o *User) GetManagerUserId() string { // GetManagerUserIdOk returns a tuple with the ManagerUserId field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *User) GetManagerUserIdOk() (*string, bool) { - if o == nil || o.ManagerUserId == nil { + if o == nil || isNil(o.ManagerUserId) { return nil, false } return o.ManagerUserId, true @@ -660,7 +662,7 @@ func (o *User) GetManagerUserIdOk() (*string, bool) { // HasManagerUserId returns a boolean if a field has been set. func (o *User) HasManagerUserId() bool { - if o != nil && o.ManagerUserId != nil { + if o != nil && !isNil(o.ManagerUserId) { return true } @@ -672,41 +674,41 @@ func (o *User) SetManagerUserId(v string) { o.ManagerUserId = &v } -// GetSamaccountName returns the SamaccountName field value if set, zero value otherwise. -func (o *User) GetSamaccountName() string { - if o == nil || o.SamaccountName == nil { +// GetSamaccountname returns the Samaccountname field value if set, zero value otherwise. +func (o *User) GetSamaccountname() string { + if o == nil || isNil(o.Samaccountname) { var ret string return ret } - return *o.SamaccountName + return *o.Samaccountname } -// GetSamaccountNameOk returns a tuple with the SamaccountName field value if set, nil otherwise +// GetSamaccountnameOk returns a tuple with the Samaccountname field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *User) GetSamaccountNameOk() (*string, bool) { - if o == nil || o.SamaccountName == nil { +func (o *User) GetSamaccountnameOk() (*string, bool) { + if o == nil || isNil(o.Samaccountname) { return nil, false } - return o.SamaccountName, true + return o.Samaccountname, true } -// HasSamaccountName returns a boolean if a field has been set. -func (o *User) HasSamaccountName() bool { - if o != nil && o.SamaccountName != nil { +// HasSamaccountname returns a boolean if a field has been set. +func (o *User) HasSamaccountname() bool { + if o != nil && !isNil(o.Samaccountname) { return true } return false } -// SetSamaccountName gets a reference to the given string and assigns it to the SamaccountName field. -func (o *User) SetSamaccountName(v string) { - o.SamaccountName = &v +// SetSamaccountname gets a reference to the given string and assigns it to the Samaccountname field. +func (o *User) SetSamaccountname(v string) { + o.Samaccountname = &v } // GetMemberOf returns the MemberOf field value if set, zero value otherwise. func (o *User) GetMemberOf() string { - if o == nil || o.MemberOf == nil { + if o == nil || isNil(o.MemberOf) { var ret string return ret } @@ -716,7 +718,7 @@ func (o *User) GetMemberOf() string { // GetMemberOfOk returns a tuple with the MemberOf field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *User) GetMemberOfOk() (*string, bool) { - if o == nil || o.MemberOf == nil { + if o == nil || isNil(o.MemberOf) { return nil, false } return o.MemberOf, true @@ -724,7 +726,7 @@ func (o *User) GetMemberOfOk() (*string, bool) { // HasMemberOf returns a boolean if a field has been set. func (o *User) HasMemberOf() bool { - if o != nil && o.MemberOf != nil { + if o != nil && !isNil(o.MemberOf) { return true } @@ -738,7 +740,7 @@ func (o *User) SetMemberOf(v string) { // GetUserprincipalname returns the Userprincipalname field value if set, zero value otherwise. func (o *User) GetUserprincipalname() string { - if o == nil || o.Userprincipalname == nil { + if o == nil || isNil(o.Userprincipalname) { var ret string return ret } @@ -748,7 +750,7 @@ func (o *User) GetUserprincipalname() string { // GetUserprincipalnameOk returns a tuple with the Userprincipalname field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *User) GetUserprincipalnameOk() (*string, bool) { - if o == nil || o.Userprincipalname == nil { + if o == nil || isNil(o.Userprincipalname) { return nil, false } return o.Userprincipalname, true @@ -756,7 +758,7 @@ func (o *User) GetUserprincipalnameOk() (*string, bool) { // HasUserprincipalname returns a boolean if a field has been set. func (o *User) HasUserprincipalname() bool { - if o != nil && o.Userprincipalname != nil { + if o != nil && !isNil(o.Userprincipalname) { return true } @@ -770,7 +772,7 @@ func (o *User) SetUserprincipalname(v string) { // GetDistinguishedName returns the DistinguishedName field value if set, zero value otherwise. func (o *User) GetDistinguishedName() string { - if o == nil || o.DistinguishedName == nil { + if o == nil || isNil(o.DistinguishedName) { var ret string return ret } @@ -780,7 +782,7 @@ func (o *User) GetDistinguishedName() string { // GetDistinguishedNameOk returns a tuple with the DistinguishedName field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *User) GetDistinguishedNameOk() (*string, bool) { - if o == nil || o.DistinguishedName == nil { + if o == nil || isNil(o.DistinguishedName) { return nil, false } return o.DistinguishedName, true @@ -788,7 +790,7 @@ func (o *User) GetDistinguishedNameOk() (*string, bool) { // HasDistinguishedName returns a boolean if a field has been set. func (o *User) HasDistinguishedName() bool { - if o != nil && o.DistinguishedName != nil { + if o != nil && !isNil(o.DistinguishedName) { return true } @@ -802,7 +804,7 @@ func (o *User) SetDistinguishedName(v string) { // GetExternalId returns the ExternalId field value if set, zero value otherwise. func (o *User) GetExternalId() string { - if o == nil || o.ExternalId == nil { + if o == nil || isNil(o.ExternalId) { var ret string return ret } @@ -812,7 +814,7 @@ func (o *User) GetExternalId() string { // GetExternalIdOk returns a tuple with the ExternalId field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *User) GetExternalIdOk() (*string, bool) { - if o == nil || o.ExternalId == nil { + if o == nil || isNil(o.ExternalId) { return nil, false } return o.ExternalId, true @@ -820,7 +822,7 @@ func (o *User) GetExternalIdOk() (*string, bool) { // HasExternalId returns a boolean if a field has been set. func (o *User) HasExternalId() bool { - if o != nil && o.ExternalId != nil { + if o != nil && !isNil(o.ExternalId) { return true } @@ -834,7 +836,7 @@ func (o *User) SetExternalId(v string) { // GetActivatedAt returns the ActivatedAt field value if set, zero value otherwise. func (o *User) GetActivatedAt() string { - if o == nil || o.ActivatedAt == nil { + if o == nil || isNil(o.ActivatedAt) { var ret string return ret } @@ -844,7 +846,7 @@ func (o *User) GetActivatedAt() string { // GetActivatedAtOk returns a tuple with the ActivatedAt field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *User) GetActivatedAtOk() (*string, bool) { - if o == nil || o.ActivatedAt == nil { + if o == nil || isNil(o.ActivatedAt) { return nil, false } return o.ActivatedAt, true @@ -852,7 +854,7 @@ func (o *User) GetActivatedAtOk() (*string, bool) { // HasActivatedAt returns a boolean if a field has been set. func (o *User) HasActivatedAt() bool { - if o != nil && o.ActivatedAt != nil { + if o != nil && !isNil(o.ActivatedAt) { return true } @@ -866,7 +868,7 @@ func (o *User) SetActivatedAt(v string) { // GetLastLogin returns the LastLogin field value if set, zero value otherwise. func (o *User) GetLastLogin() string { - if o == nil || o.LastLogin == nil { + if o == nil || isNil(o.LastLogin) { var ret string return ret } @@ -876,7 +878,7 @@ func (o *User) GetLastLogin() string { // GetLastLoginOk returns a tuple with the LastLogin field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *User) GetLastLoginOk() (*string, bool) { - if o == nil || o.LastLogin == nil { + if o == nil || isNil(o.LastLogin) { return nil, false } return o.LastLogin, true @@ -884,7 +886,7 @@ func (o *User) GetLastLoginOk() (*string, bool) { // HasLastLogin returns a boolean if a field has been set. func (o *User) HasLastLogin() bool { - if o != nil && o.LastLogin != nil { + if o != nil && !isNil(o.LastLogin) { return true } @@ -898,7 +900,7 @@ func (o *User) SetLastLogin(v string) { // GetInvitationSentAt returns the InvitationSentAt field value if set, zero value otherwise. func (o *User) GetInvitationSentAt() string { - if o == nil || o.InvitationSentAt == nil { + if o == nil || isNil(o.InvitationSentAt) { var ret string return ret } @@ -908,7 +910,7 @@ func (o *User) GetInvitationSentAt() string { // GetInvitationSentAtOk returns a tuple with the InvitationSentAt field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *User) GetInvitationSentAtOk() (*string, bool) { - if o == nil || o.InvitationSentAt == nil { + if o == nil || isNil(o.InvitationSentAt) { return nil, false } return o.InvitationSentAt, true @@ -916,7 +918,7 @@ func (o *User) GetInvitationSentAtOk() (*string, bool) { // HasInvitationSentAt returns a boolean if a field has been set. func (o *User) HasInvitationSentAt() bool { - if o != nil && o.InvitationSentAt != nil { + if o != nil && !isNil(o.InvitationSentAt) { return true } @@ -930,7 +932,7 @@ func (o *User) SetInvitationSentAt(v string) { // GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. func (o *User) GetUpdatedAt() string { - if o == nil || o.UpdatedAt == nil { + if o == nil || isNil(o.UpdatedAt) { var ret string return ret } @@ -940,7 +942,7 @@ func (o *User) GetUpdatedAt() string { // GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *User) GetUpdatedAtOk() (*string, bool) { - if o == nil || o.UpdatedAt == nil { + if o == nil || isNil(o.UpdatedAt) { return nil, false } return o.UpdatedAt, true @@ -948,7 +950,7 @@ func (o *User) GetUpdatedAtOk() (*string, bool) { // HasUpdatedAt returns a boolean if a field has been set. func (o *User) HasUpdatedAt() bool { - if o != nil && o.UpdatedAt != nil { + if o != nil && !isNil(o.UpdatedAt) { return true } @@ -962,7 +964,7 @@ func (o *User) SetUpdatedAt(v string) { // GetPreferredLocaleCode returns the PreferredLocaleCode field value if set, zero value otherwise. func (o *User) GetPreferredLocaleCode() string { - if o == nil || o.PreferredLocaleCode == nil { + if o == nil || isNil(o.PreferredLocaleCode) { var ret string return ret } @@ -972,7 +974,7 @@ func (o *User) GetPreferredLocaleCode() string { // GetPreferredLocaleCodeOk returns a tuple with the PreferredLocaleCode field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *User) GetPreferredLocaleCodeOk() (*string, bool) { - if o == nil || o.PreferredLocaleCode == nil { + if o == nil || isNil(o.PreferredLocaleCode) { return nil, false } return o.PreferredLocaleCode, true @@ -980,7 +982,7 @@ func (o *User) GetPreferredLocaleCodeOk() (*string, bool) { // HasPreferredLocaleCode returns a boolean if a field has been set. func (o *User) HasPreferredLocaleCode() bool { - if o != nil && o.PreferredLocaleCode != nil { + if o != nil && !isNil(o.PreferredLocaleCode) { return true } @@ -994,7 +996,7 @@ func (o *User) SetPreferredLocaleCode(v string) { // GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. func (o *User) GetCreatedAt() string { - if o == nil || o.CreatedAt == nil { + if o == nil || isNil(o.CreatedAt) { var ret string return ret } @@ -1004,7 +1006,7 @@ func (o *User) GetCreatedAt() string { // GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *User) GetCreatedAtOk() (*string, bool) { - if o == nil || o.CreatedAt == nil { + if o == nil || isNil(o.CreatedAt) { return nil, false } return o.CreatedAt, true @@ -1012,7 +1014,7 @@ func (o *User) GetCreatedAtOk() (*string, bool) { // HasCreatedAt returns a boolean if a field has been set. func (o *User) HasCreatedAt() bool { - if o != nil && o.CreatedAt != nil { + if o != nil && !isNil(o.CreatedAt) { return true } @@ -1024,41 +1026,9 @@ func (o *User) SetCreatedAt(v string) { o.CreatedAt = &v } -// GetCustomAttributes returns the CustomAttributes field value if set, zero value otherwise. -func (o *User) GetCustomAttributes() map[string]interface{} { - if o == nil || o.CustomAttributes == nil { - var ret map[string]interface{} - return ret - } - return o.CustomAttributes -} - -// GetCustomAttributesOk returns a tuple with the CustomAttributes field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *User) GetCustomAttributesOk() (map[string]interface{}, bool) { - if o == nil || o.CustomAttributes == nil { - return nil, false - } - return o.CustomAttributes, true -} - -// HasCustomAttributes returns a boolean if a field has been set. -func (o *User) HasCustomAttributes() bool { - if o != nil && o.CustomAttributes != nil { - return true - } - - return false -} - -// SetCustomAttributes gets a reference to the given map[string]interface{} and assigns it to the CustomAttributes field. -func (o *User) SetCustomAttributes(v map[string]interface{}) { - o.CustomAttributes = v -} - // GetInvalidLoginAttempts returns the InvalidLoginAttempts field value if set, zero value otherwise. func (o *User) GetInvalidLoginAttempts() int32 { - if o == nil || o.InvalidLoginAttempts == nil { + if o == nil || isNil(o.InvalidLoginAttempts) { var ret int32 return ret } @@ -1068,7 +1038,7 @@ func (o *User) GetInvalidLoginAttempts() int32 { // GetInvalidLoginAttemptsOk returns a tuple with the InvalidLoginAttempts field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *User) GetInvalidLoginAttemptsOk() (*int32, bool) { - if o == nil || o.InvalidLoginAttempts == nil { + if o == nil || isNil(o.InvalidLoginAttempts) { return nil, false } return o.InvalidLoginAttempts, true @@ -1076,7 +1046,7 @@ func (o *User) GetInvalidLoginAttemptsOk() (*int32, bool) { // HasInvalidLoginAttempts returns a boolean if a field has been set. func (o *User) HasInvalidLoginAttempts() bool { - if o != nil && o.InvalidLoginAttempts != nil { + if o != nil && !isNil(o.InvalidLoginAttempts) { return true } @@ -1090,7 +1060,7 @@ func (o *User) SetInvalidLoginAttempts(v int32) { // GetLockedUntil returns the LockedUntil field value if set, zero value otherwise. func (o *User) GetLockedUntil() string { - if o == nil || o.LockedUntil == nil { + if o == nil || isNil(o.LockedUntil) { var ret string return ret } @@ -1100,7 +1070,7 @@ func (o *User) GetLockedUntil() string { // GetLockedUntilOk returns a tuple with the LockedUntil field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *User) GetLockedUntilOk() (*string, bool) { - if o == nil || o.LockedUntil == nil { + if o == nil || isNil(o.LockedUntil) { return nil, false } return o.LockedUntil, true @@ -1108,7 +1078,7 @@ func (o *User) GetLockedUntilOk() (*string, bool) { // HasLockedUntil returns a boolean if a field has been set. func (o *User) HasLockedUntil() bool { - if o != nil && o.LockedUntil != nil { + if o != nil && !isNil(o.LockedUntil) { return true } @@ -1122,7 +1092,7 @@ func (o *User) SetLockedUntil(v string) { // GetPasswordChangedAt returns the PasswordChangedAt field value if set, zero value otherwise. func (o *User) GetPasswordChangedAt() string { - if o == nil || o.PasswordChangedAt == nil { + if o == nil || isNil(o.PasswordChangedAt) { var ret string return ret } @@ -1132,7 +1102,7 @@ func (o *User) GetPasswordChangedAt() string { // GetPasswordChangedAtOk returns a tuple with the PasswordChangedAt field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *User) GetPasswordChangedAtOk() (*string, bool) { - if o == nil || o.PasswordChangedAt == nil { + if o == nil || isNil(o.PasswordChangedAt) { return nil, false } return o.PasswordChangedAt, true @@ -1140,7 +1110,7 @@ func (o *User) GetPasswordChangedAtOk() (*string, bool) { // HasPasswordChangedAt returns a boolean if a field has been set. func (o *User) HasPasswordChangedAt() bool { - if o != nil && o.PasswordChangedAt != nil { + if o != nil && !isNil(o.PasswordChangedAt) { return true } @@ -1154,7 +1124,7 @@ func (o *User) SetPasswordChangedAt(v string) { // GetPassword returns the Password field value if set, zero value otherwise. func (o *User) GetPassword() string { - if o == nil || o.Password == nil { + if o == nil || isNil(o.Password) { var ret string return ret } @@ -1164,7 +1134,7 @@ func (o *User) 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 *User) GetPasswordOk() (*string, bool) { - if o == nil || o.Password == nil { + if o == nil || isNil(o.Password) { return nil, false } return o.Password, true @@ -1172,7 +1142,7 @@ func (o *User) GetPasswordOk() (*string, bool) { // HasPassword returns a boolean if a field has been set. func (o *User) HasPassword() bool { - if o != nil && o.Password != nil { + if o != nil && !isNil(o.Password) { return true } @@ -1186,7 +1156,7 @@ func (o *User) SetPassword(v string) { // GetPasswordConfirmation returns the PasswordConfirmation field value if set, zero value otherwise. func (o *User) GetPasswordConfirmation() string { - if o == nil || o.PasswordConfirmation == nil { + if o == nil || isNil(o.PasswordConfirmation) { var ret string return ret } @@ -1196,7 +1166,7 @@ func (o *User) GetPasswordConfirmation() string { // GetPasswordConfirmationOk returns a tuple with the PasswordConfirmation field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *User) GetPasswordConfirmationOk() (*string, bool) { - if o == nil || o.PasswordConfirmation == nil { + if o == nil || isNil(o.PasswordConfirmation) { return nil, false } return o.PasswordConfirmation, true @@ -1204,7 +1174,7 @@ func (o *User) GetPasswordConfirmationOk() (*string, bool) { // HasPasswordConfirmation returns a boolean if a field has been set. func (o *User) HasPasswordConfirmation() bool { - if o != nil && o.PasswordConfirmation != nil { + if o != nil && !isNil(o.PasswordConfirmation) { return true } @@ -1218,7 +1188,7 @@ func (o *User) SetPasswordConfirmation(v string) { // GetPasswordAlgorithm returns the PasswordAlgorithm field value if set, zero value otherwise. func (o *User) GetPasswordAlgorithm() string { - if o == nil || o.PasswordAlgorithm == nil { + if o == nil || isNil(o.PasswordAlgorithm) { var ret string return ret } @@ -1228,7 +1198,7 @@ func (o *User) GetPasswordAlgorithm() string { // GetPasswordAlgorithmOk returns a tuple with the PasswordAlgorithm field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *User) GetPasswordAlgorithmOk() (*string, bool) { - if o == nil || o.PasswordAlgorithm == nil { + if o == nil || isNil(o.PasswordAlgorithm) { return nil, false } return o.PasswordAlgorithm, true @@ -1236,7 +1206,7 @@ func (o *User) GetPasswordAlgorithmOk() (*string, bool) { // HasPasswordAlgorithm returns a boolean if a field has been set. func (o *User) HasPasswordAlgorithm() bool { - if o != nil && o.PasswordAlgorithm != nil { + if o != nil && !isNil(o.PasswordAlgorithm) { return true } @@ -1250,7 +1220,7 @@ func (o *User) SetPasswordAlgorithm(v string) { // GetSalt returns the Salt field value if set, zero value otherwise. func (o *User) GetSalt() string { - if o == nil || o.Salt == nil { + if o == nil || isNil(o.Salt) { var ret string return ret } @@ -1260,7 +1230,7 @@ func (o *User) GetSalt() string { // GetSaltOk returns a tuple with the Salt field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *User) GetSaltOk() (*string, bool) { - if o == nil || o.Salt == nil { + if o == nil || isNil(o.Salt) { return nil, false } return o.Salt, true @@ -1268,7 +1238,7 @@ func (o *User) GetSaltOk() (*string, bool) { // HasSalt returns a boolean if a field has been set. func (o *User) HasSalt() bool { - if o != nil && o.Salt != nil { + if o != nil && !isNil(o.Salt) { return true } @@ -1281,119 +1251,124 @@ func (o *User) SetSalt(v string) { } func (o User) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o User) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Id != nil { + if !isNil(o.Id) { toSerialize["id"] = o.Id } - if o.Username != nil { + if !isNil(o.Username) { toSerialize["username"] = o.Username } - if o.Email != nil { + if !isNil(o.Email) { toSerialize["email"] = o.Email } - if o.Firstname != nil { + if !isNil(o.Firstname) { toSerialize["firstname"] = o.Firstname } - if o.Lastname != nil { + if !isNil(o.Lastname) { toSerialize["lastname"] = o.Lastname } - if o.Title != nil { + if !isNil(o.Title) { toSerialize["title"] = o.Title } - if o.Department != nil { + if !isNil(o.Department) { toSerialize["department"] = o.Department } - if o.Company != nil { + if !isNil(o.Company) { toSerialize["company"] = o.Company } - if o.Comment != nil { + if !isNil(o.Comment) { toSerialize["comment"] = o.Comment } - if o.GroupId != nil { + if !isNil(o.GroupId) { toSerialize["group_id"] = o.GroupId } - if o.RoleIds != nil { + if !isNil(o.RoleIds) { toSerialize["role_ids"] = o.RoleIds } - if o.Phone != nil { + if !isNil(o.Phone) { toSerialize["phone"] = o.Phone } - if o.State != nil { + if !isNil(o.State) { toSerialize["state"] = o.State } - if o.Status != nil { + if !isNil(o.Status) { toSerialize["status"] = o.Status } - if o.DirectoryId != nil { + if !isNil(o.DirectoryId) { toSerialize["directory_id"] = o.DirectoryId } - if o.TrustedIdpId != nil { + if !isNil(o.TrustedIdpId) { toSerialize["trusted_idp_id"] = o.TrustedIdpId } - if o.ManagerAdId != nil { + if !isNil(o.ManagerAdId) { toSerialize["manager_ad_id"] = o.ManagerAdId } - if o.ManagerUserId != nil { + if !isNil(o.ManagerUserId) { toSerialize["manager_user_id"] = o.ManagerUserId } - if o.SamaccountName != nil { - toSerialize["samaccount_name"] = o.SamaccountName + if !isNil(o.Samaccountname) { + toSerialize["samaccountname"] = o.Samaccountname } - if o.MemberOf != nil { + if !isNil(o.MemberOf) { toSerialize["member_of"] = o.MemberOf } - if o.Userprincipalname != nil { + if !isNil(o.Userprincipalname) { toSerialize["userprincipalname"] = o.Userprincipalname } - if o.DistinguishedName != nil { + if !isNil(o.DistinguishedName) { toSerialize["distinguished_name"] = o.DistinguishedName } - if o.ExternalId != nil { + if !isNil(o.ExternalId) { toSerialize["external_id"] = o.ExternalId } - if o.ActivatedAt != nil { + if !isNil(o.ActivatedAt) { toSerialize["activated_at"] = o.ActivatedAt } - if o.LastLogin != nil { + if !isNil(o.LastLogin) { toSerialize["last_login"] = o.LastLogin } - if o.InvitationSentAt != nil { + if !isNil(o.InvitationSentAt) { toSerialize["invitation_sent_at"] = o.InvitationSentAt } - if o.UpdatedAt != nil { + if !isNil(o.UpdatedAt) { toSerialize["updated_at"] = o.UpdatedAt } - if o.PreferredLocaleCode != nil { + if !isNil(o.PreferredLocaleCode) { toSerialize["preferred_locale_code"] = o.PreferredLocaleCode } - if o.CreatedAt != nil { + if !isNil(o.CreatedAt) { toSerialize["created_at"] = o.CreatedAt } - if o.CustomAttributes != nil { - toSerialize["custom_attributes"] = o.CustomAttributes - } - if o.InvalidLoginAttempts != nil { + if !isNil(o.InvalidLoginAttempts) { toSerialize["invalid_login_attempts"] = o.InvalidLoginAttempts } - if o.LockedUntil != nil { + if !isNil(o.LockedUntil) { toSerialize["locked_until"] = o.LockedUntil } - if o.PasswordChangedAt != nil { + if !isNil(o.PasswordChangedAt) { toSerialize["password_changed_at"] = o.PasswordChangedAt } - if o.Password != nil { + if !isNil(o.Password) { toSerialize["password"] = o.Password } - if o.PasswordConfirmation != nil { + if !isNil(o.PasswordConfirmation) { toSerialize["password_confirmation"] = o.PasswordConfirmation } - if o.PasswordAlgorithm != nil { + if !isNil(o.PasswordAlgorithm) { toSerialize["password_algorithm"] = o.PasswordAlgorithm } - if o.Salt != nil { + if !isNil(o.Salt) { toSerialize["salt"] = o.Salt } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableUser struct { diff --git a/model_ver_factor_saml_200_response.go b/model_ver_factor_saml_200_response.go new file mode 100644 index 0000000..e79cbf2 --- /dev/null +++ b/model_ver_factor_saml_200_response.go @@ -0,0 +1,164 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the VerFactorSaml200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &VerFactorSaml200Response{} + +// VerFactorSaml200Response struct for VerFactorSaml200Response +type VerFactorSaml200Response struct { + // Provides the SAML assertion. + Data *string `json:"data,omitempty"` + // Plain text description describing the outcome of the response. + Message *string `json:"message,omitempty"` +} + +// NewVerFactorSaml200Response instantiates a new VerFactorSaml200Response 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 NewVerFactorSaml200Response() *VerFactorSaml200Response { + this := VerFactorSaml200Response{} + return &this +} + +// NewVerFactorSaml200ResponseWithDefaults instantiates a new VerFactorSaml200Response 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 NewVerFactorSaml200ResponseWithDefaults() *VerFactorSaml200Response { + this := VerFactorSaml200Response{} + return &this +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *VerFactorSaml200Response) GetData() string { + if o == nil || isNil(o.Data) { + var ret string + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VerFactorSaml200Response) GetDataOk() (*string, bool) { + if o == nil || isNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *VerFactorSaml200Response) HasData() bool { + if o != nil && !isNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given string and assigns it to the Data field. +func (o *VerFactorSaml200Response) SetData(v string) { + o.Data = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *VerFactorSaml200Response) GetMessage() string { + if o == nil || isNil(o.Message) { + var ret string + return ret + } + return *o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VerFactorSaml200Response) GetMessageOk() (*string, bool) { + if o == nil || isNil(o.Message) { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *VerFactorSaml200Response) HasMessage() bool { + if o != nil && !isNil(o.Message) { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *VerFactorSaml200Response) SetMessage(v string) { + o.Message = &v +} + +func (o VerFactorSaml200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o VerFactorSaml200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.Data) { + toSerialize["data"] = o.Data + } + if !isNil(o.Message) { + toSerialize["message"] = o.Message + } + return toSerialize, nil +} + +type NullableVerFactorSaml200Response struct { + value *VerFactorSaml200Response + isSet bool +} + +func (v NullableVerFactorSaml200Response) Get() *VerFactorSaml200Response { + return v.value +} + +func (v *NullableVerFactorSaml200Response) Set(val *VerFactorSaml200Response) { + v.value = val + v.isSet = true +} + +func (v NullableVerFactorSaml200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableVerFactorSaml200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableVerFactorSaml200Response(val *VerFactorSaml200Response) *NullableVerFactorSaml200Response { + return &NullableVerFactorSaml200Response{value: val, isSet: true} +} + +func (v NullableVerFactorSaml200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableVerFactorSaml200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_verb.go b/model_verb.go new file mode 100644 index 0000000..23e9376 --- /dev/null +++ b/model_verb.go @@ -0,0 +1,119 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" + "fmt" +) + +// Verb Verbs are used to distinguish between different types of events. Where possible use one of the following verbs to describe the event. Alternately you can create custom verbs to describe other types of actions within your application. +type Verb string + +// List of verb +const ( + LOG_IN Verb = "log-in" + LOG_OUT Verb = "log-out" + LOG_IN_DENIED Verb = "log-in-denied" + AUTHENTICATION_CHALLENGE Verb = "authentication-challenge" + AUTHENTICATION_CHALLENGE_PASS Verb = "authentication-challenge-pass" + AUTHENTICATION_CHALLENGE_FAIL Verb = "authentication-challenge-fail" +) + +// All allowed values of Verb enum +var AllowedVerbEnumValues = []Verb{ + "log-in", + "log-out", + "log-in-denied", + "authentication-challenge", + "authentication-challenge-pass", + "authentication-challenge-fail", +} + +func (v *Verb) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := Verb(value) + for _, existing := range AllowedVerbEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid Verb", value) +} + +// NewVerbFromValue returns a pointer to a valid Verb +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewVerbFromValue(v string) (*Verb, error) { + ev := Verb(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for Verb: valid values are %v", v, AllowedVerbEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v Verb) IsValid() bool { + for _, existing := range AllowedVerbEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to verb value +func (v Verb) Ptr() *Verb { + return &v +} + +type NullableVerb struct { + value *Verb + isSet bool +} + +func (v NullableVerb) Get() *Verb { + return v.value +} + +func (v *NullableVerb) Set(val *Verb) { + v.value = val + v.isSet = true +} + +func (v NullableVerb) IsSet() bool { + return v.isSet +} + +func (v *NullableVerb) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableVerb(val *Verb) *NullableVerb { + return &NullableVerb{value: val, isSet: true} +} + +func (v NullableVerb) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableVerb) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/model_verify_enrollment_request.go b/model_verify_enrollment_request.go deleted file mode 100644 index c14eafc..0000000 --- a/model_verify_enrollment_request.go +++ /dev/null @@ -1,115 +0,0 @@ -/* -OneLogin API - -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -API version: 3.0.0-alpha.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package openapi - -import ( - "encoding/json" -) - -// VerifyEnrollmentRequest struct for VerifyEnrollmentRequest -type VerifyEnrollmentRequest struct { - Otp *int32 `json:"otp,omitempty"` -} - -// NewVerifyEnrollmentRequest instantiates a new VerifyEnrollmentRequest 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 NewVerifyEnrollmentRequest() *VerifyEnrollmentRequest { - this := VerifyEnrollmentRequest{} - return &this -} - -// NewVerifyEnrollmentRequestWithDefaults instantiates a new VerifyEnrollmentRequest 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 NewVerifyEnrollmentRequestWithDefaults() *VerifyEnrollmentRequest { - this := VerifyEnrollmentRequest{} - return &this -} - -// GetOtp returns the Otp field value if set, zero value otherwise. -func (o *VerifyEnrollmentRequest) GetOtp() int32 { - if o == nil || o.Otp == nil { - var ret int32 - return ret - } - return *o.Otp -} - -// GetOtpOk returns a tuple with the Otp field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *VerifyEnrollmentRequest) GetOtpOk() (*int32, bool) { - if o == nil || o.Otp == nil { - return nil, false - } - return o.Otp, true -} - -// HasOtp returns a boolean if a field has been set. -func (o *VerifyEnrollmentRequest) HasOtp() bool { - if o != nil && o.Otp != nil { - return true - } - - return false -} - -// SetOtp gets a reference to the given int32 and assigns it to the Otp field. -func (o *VerifyEnrollmentRequest) SetOtp(v int32) { - o.Otp = &v -} - -func (o VerifyEnrollmentRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Otp != nil { - toSerialize["otp"] = o.Otp - } - return json.Marshal(toSerialize) -} - -type NullableVerifyEnrollmentRequest struct { - value *VerifyEnrollmentRequest - isSet bool -} - -func (v NullableVerifyEnrollmentRequest) Get() *VerifyEnrollmentRequest { - return v.value -} - -func (v *NullableVerifyEnrollmentRequest) Set(val *VerifyEnrollmentRequest) { - v.value = val - v.isSet = true -} - -func (v NullableVerifyEnrollmentRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableVerifyEnrollmentRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableVerifyEnrollmentRequest(val *VerifyEnrollmentRequest) *NullableVerifyEnrollmentRequest { - return &NullableVerifyEnrollmentRequest{value: val, isSet: true} -} - -func (v NullableVerifyEnrollmentRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableVerifyEnrollmentRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_verify_factor_request.go b/model_verify_factor_request.go deleted file mode 100644 index 25d9c58..0000000 --- a/model_verify_factor_request.go +++ /dev/null @@ -1,153 +0,0 @@ -/* -OneLogin API - -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -API version: 3.0.0-alpha.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package openapi - -import ( - "encoding/json" -) - -// VerifyFactorRequest struct for VerifyFactorRequest -type VerifyFactorRequest struct { - // OTP code provided by the device or SMS message sent to user. - Otp *string `json:"otp,omitempty"` - // ID of the specified device which has been registerd for the given user. - DeviceId *int32 `json:"device_id,omitempty"` -} - -// NewVerifyFactorRequest instantiates a new VerifyFactorRequest 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 NewVerifyFactorRequest() *VerifyFactorRequest { - this := VerifyFactorRequest{} - return &this -} - -// NewVerifyFactorRequestWithDefaults instantiates a new VerifyFactorRequest 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 NewVerifyFactorRequestWithDefaults() *VerifyFactorRequest { - this := VerifyFactorRequest{} - return &this -} - -// GetOtp returns the Otp field value if set, zero value otherwise. -func (o *VerifyFactorRequest) GetOtp() string { - if o == nil || o.Otp == nil { - var ret string - return ret - } - return *o.Otp -} - -// GetOtpOk returns a tuple with the Otp field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *VerifyFactorRequest) GetOtpOk() (*string, bool) { - if o == nil || o.Otp == nil { - return nil, false - } - return o.Otp, true -} - -// HasOtp returns a boolean if a field has been set. -func (o *VerifyFactorRequest) HasOtp() bool { - if o != nil && o.Otp != nil { - return true - } - - return false -} - -// SetOtp gets a reference to the given string and assigns it to the Otp field. -func (o *VerifyFactorRequest) SetOtp(v string) { - o.Otp = &v -} - -// GetDeviceId returns the DeviceId field value if set, zero value otherwise. -func (o *VerifyFactorRequest) GetDeviceId() int32 { - if o == nil || o.DeviceId == nil { - var ret int32 - return ret - } - return *o.DeviceId -} - -// GetDeviceIdOk returns a tuple with the DeviceId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *VerifyFactorRequest) GetDeviceIdOk() (*int32, bool) { - if o == nil || o.DeviceId == nil { - return nil, false - } - return o.DeviceId, true -} - -// HasDeviceId returns a boolean if a field has been set. -func (o *VerifyFactorRequest) HasDeviceId() bool { - if o != nil && o.DeviceId != nil { - return true - } - - return false -} - -// SetDeviceId gets a reference to the given int32 and assigns it to the DeviceId field. -func (o *VerifyFactorRequest) SetDeviceId(v int32) { - o.DeviceId = &v -} - -func (o VerifyFactorRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Otp != nil { - toSerialize["otp"] = o.Otp - } - if o.DeviceId != nil { - toSerialize["device_id"] = o.DeviceId - } - return json.Marshal(toSerialize) -} - -type NullableVerifyFactorRequest struct { - value *VerifyFactorRequest - isSet bool -} - -func (v NullableVerifyFactorRequest) Get() *VerifyFactorRequest { - return v.value -} - -func (v *NullableVerifyFactorRequest) Set(val *VerifyFactorRequest) { - v.value = val - v.isSet = true -} - -func (v NullableVerifyFactorRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableVerifyFactorRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableVerifyFactorRequest(val *VerifyFactorRequest) *NullableVerifyFactorRequest { - return &NullableVerifyFactorRequest{value: val, isSet: true} -} - -func (v NullableVerifyFactorRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableVerifyFactorRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_verify_factor_saml_200_response.go b/model_verify_factor_saml_200_response.go deleted file mode 100644 index d2b331d..0000000 --- a/model_verify_factor_saml_200_response.go +++ /dev/null @@ -1,153 +0,0 @@ -/* -OneLogin API - -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -API version: 3.0.0-alpha.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package openapi - -import ( - "encoding/json" -) - -// VerifyFactorSaml200Response struct for VerifyFactorSaml200Response -type VerifyFactorSaml200Response struct { - // Provides the SAML assertion. - Data *string `json:"data,omitempty"` - // Plain text description describing the outcome of the response. - Message *string `json:"message,omitempty"` -} - -// NewVerifyFactorSaml200Response instantiates a new VerifyFactorSaml200Response 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 NewVerifyFactorSaml200Response() *VerifyFactorSaml200Response { - this := VerifyFactorSaml200Response{} - return &this -} - -// NewVerifyFactorSaml200ResponseWithDefaults instantiates a new VerifyFactorSaml200Response 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 NewVerifyFactorSaml200ResponseWithDefaults() *VerifyFactorSaml200Response { - this := VerifyFactorSaml200Response{} - return &this -} - -// GetData returns the Data field value if set, zero value otherwise. -func (o *VerifyFactorSaml200Response) GetData() string { - if o == nil || o.Data == nil { - var ret string - return ret - } - return *o.Data -} - -// GetDataOk returns a tuple with the Data field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *VerifyFactorSaml200Response) GetDataOk() (*string, bool) { - if o == nil || o.Data == nil { - return nil, false - } - return o.Data, true -} - -// HasData returns a boolean if a field has been set. -func (o *VerifyFactorSaml200Response) HasData() bool { - if o != nil && o.Data != nil { - return true - } - - return false -} - -// SetData gets a reference to the given string and assigns it to the Data field. -func (o *VerifyFactorSaml200Response) SetData(v string) { - o.Data = &v -} - -// GetMessage returns the Message field value if set, zero value otherwise. -func (o *VerifyFactorSaml200Response) GetMessage() string { - if o == nil || o.Message == nil { - var ret string - return ret - } - return *o.Message -} - -// GetMessageOk returns a tuple with the Message field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *VerifyFactorSaml200Response) GetMessageOk() (*string, bool) { - if o == nil || o.Message == nil { - return nil, false - } - return o.Message, true -} - -// HasMessage returns a boolean if a field has been set. -func (o *VerifyFactorSaml200Response) HasMessage() bool { - if o != nil && o.Message != nil { - return true - } - - return false -} - -// SetMessage gets a reference to the given string and assigns it to the Message field. -func (o *VerifyFactorSaml200Response) SetMessage(v string) { - o.Message = &v -} - -func (o VerifyFactorSaml200Response) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Data != nil { - toSerialize["data"] = o.Data - } - if o.Message != nil { - toSerialize["message"] = o.Message - } - return json.Marshal(toSerialize) -} - -type NullableVerifyFactorSaml200Response struct { - value *VerifyFactorSaml200Response - isSet bool -} - -func (v NullableVerifyFactorSaml200Response) Get() *VerifyFactorSaml200Response { - return v.value -} - -func (v *NullableVerifyFactorSaml200Response) Set(val *VerifyFactorSaml200Response) { - v.value = val - v.isSet = true -} - -func (v NullableVerifyFactorSaml200Response) IsSet() bool { - return v.isSet -} - -func (v *NullableVerifyFactorSaml200Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableVerifyFactorSaml200Response(val *VerifyFactorSaml200Response) *NullableVerifyFactorSaml200Response { - return &NullableVerifyFactorSaml200Response{value: val, isSet: true} -} - -func (v NullableVerifyFactorSaml200Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableVerifyFactorSaml200Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_verify_factor_voice_200_response_inner.go b/model_verify_factor_voice_200_response_inner.go deleted file mode 100644 index f77bda6..0000000 --- a/model_verify_factor_voice_200_response_inner.go +++ /dev/null @@ -1,187 +0,0 @@ -/* -OneLogin API - -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -API version: 3.0.0-alpha.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package openapi - -import ( - "encoding/json" -) - -// VerifyFactorVoice200ResponseInner struct for VerifyFactorVoice200ResponseInner -type VerifyFactorVoice200ResponseInner struct { - Id *string `json:"id,omitempty"` - Status *string `json:"status,omitempty"` - DeviceId *string `json:"device_id,omitempty"` -} - -// NewVerifyFactorVoice200ResponseInner instantiates a new VerifyFactorVoice200ResponseInner 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 NewVerifyFactorVoice200ResponseInner() *VerifyFactorVoice200ResponseInner { - this := VerifyFactorVoice200ResponseInner{} - return &this -} - -// NewVerifyFactorVoice200ResponseInnerWithDefaults instantiates a new VerifyFactorVoice200ResponseInner 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 NewVerifyFactorVoice200ResponseInnerWithDefaults() *VerifyFactorVoice200ResponseInner { - this := VerifyFactorVoice200ResponseInner{} - return &this -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *VerifyFactorVoice200ResponseInner) GetId() string { - if o == nil || o.Id == nil { - var ret string - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *VerifyFactorVoice200ResponseInner) GetIdOk() (*string, bool) { - if o == nil || o.Id == nil { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *VerifyFactorVoice200ResponseInner) HasId() bool { - if o != nil && o.Id != nil { - return true - } - - return false -} - -// SetId gets a reference to the given string and assigns it to the Id field. -func (o *VerifyFactorVoice200ResponseInner) SetId(v string) { - o.Id = &v -} - -// GetStatus returns the Status field value if set, zero value otherwise. -func (o *VerifyFactorVoice200ResponseInner) GetStatus() string { - if o == nil || o.Status == nil { - var ret string - return ret - } - return *o.Status -} - -// GetStatusOk returns a tuple with the Status field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *VerifyFactorVoice200ResponseInner) GetStatusOk() (*string, bool) { - if o == nil || o.Status == nil { - return nil, false - } - return o.Status, true -} - -// HasStatus returns a boolean if a field has been set. -func (o *VerifyFactorVoice200ResponseInner) HasStatus() bool { - if o != nil && o.Status != nil { - return true - } - - return false -} - -// SetStatus gets a reference to the given string and assigns it to the Status field. -func (o *VerifyFactorVoice200ResponseInner) SetStatus(v string) { - o.Status = &v -} - -// GetDeviceId returns the DeviceId field value if set, zero value otherwise. -func (o *VerifyFactorVoice200ResponseInner) GetDeviceId() string { - if o == nil || o.DeviceId == nil { - var ret string - return ret - } - return *o.DeviceId -} - -// GetDeviceIdOk returns a tuple with the DeviceId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *VerifyFactorVoice200ResponseInner) GetDeviceIdOk() (*string, bool) { - if o == nil || o.DeviceId == nil { - return nil, false - } - return o.DeviceId, true -} - -// HasDeviceId returns a boolean if a field has been set. -func (o *VerifyFactorVoice200ResponseInner) HasDeviceId() bool { - if o != nil && o.DeviceId != nil { - return true - } - - return false -} - -// SetDeviceId gets a reference to the given string and assigns it to the DeviceId field. -func (o *VerifyFactorVoice200ResponseInner) SetDeviceId(v string) { - o.DeviceId = &v -} - -func (o VerifyFactorVoice200ResponseInner) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Status != nil { - toSerialize["status"] = o.Status - } - if o.DeviceId != nil { - toSerialize["device_id"] = o.DeviceId - } - return json.Marshal(toSerialize) -} - -type NullableVerifyFactorVoice200ResponseInner struct { - value *VerifyFactorVoice200ResponseInner - isSet bool -} - -func (v NullableVerifyFactorVoice200ResponseInner) Get() *VerifyFactorVoice200ResponseInner { - return v.value -} - -func (v *NullableVerifyFactorVoice200ResponseInner) Set(val *VerifyFactorVoice200ResponseInner) { - v.value = val - v.isSet = true -} - -func (v NullableVerifyFactorVoice200ResponseInner) IsSet() bool { - return v.isSet -} - -func (v *NullableVerifyFactorVoice200ResponseInner) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableVerifyFactorVoice200ResponseInner(val *VerifyFactorVoice200ResponseInner) *NullableVerifyFactorVoice200ResponseInner { - return &NullableVerifyFactorVoice200ResponseInner{value: val, isSet: true} -} - -func (v NullableVerifyFactorVoice200ResponseInner) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableVerifyFactorVoice200ResponseInner) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_verify_mfa_factor_request.go b/model_verify_mfa_factor_request.go new file mode 100644 index 0000000..fb19b2c --- /dev/null +++ b/model_verify_mfa_factor_request.go @@ -0,0 +1,164 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the VerifyMfaFactorRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &VerifyMfaFactorRequest{} + +// VerifyMfaFactorRequest struct for VerifyMfaFactorRequest +type VerifyMfaFactorRequest struct { + // The state_token is returned after a successful request to Enroll a Factor or Activate a Factor. The state_token MUST be provided if the needs_trigger attribute from the proceeding calls is set to true. Note that the state_token expires 120 seconds after creation. If the token is expired you will need to Activate the Factor again. + StateToken *string `json:"state_token,omitempty"` + // OTP code provided by the device or SMS message sent to user. When a device like OneLogin Protect that supports Push has been used you do not need to provide the otp_token and can keep polling this endpoint until the state_token expires. + OtpToken *string `json:"otp_token,omitempty"` +} + +// NewVerifyMfaFactorRequest instantiates a new VerifyMfaFactorRequest 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 NewVerifyMfaFactorRequest() *VerifyMfaFactorRequest { + this := VerifyMfaFactorRequest{} + return &this +} + +// NewVerifyMfaFactorRequestWithDefaults instantiates a new VerifyMfaFactorRequest 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 NewVerifyMfaFactorRequestWithDefaults() *VerifyMfaFactorRequest { + this := VerifyMfaFactorRequest{} + return &this +} + +// GetStateToken returns the StateToken field value if set, zero value otherwise. +func (o *VerifyMfaFactorRequest) GetStateToken() string { + if o == nil || isNil(o.StateToken) { + var ret string + return ret + } + return *o.StateToken +} + +// GetStateTokenOk returns a tuple with the StateToken field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VerifyMfaFactorRequest) GetStateTokenOk() (*string, bool) { + if o == nil || isNil(o.StateToken) { + return nil, false + } + return o.StateToken, true +} + +// HasStateToken returns a boolean if a field has been set. +func (o *VerifyMfaFactorRequest) HasStateToken() bool { + if o != nil && !isNil(o.StateToken) { + return true + } + + return false +} + +// SetStateToken gets a reference to the given string and assigns it to the StateToken field. +func (o *VerifyMfaFactorRequest) SetStateToken(v string) { + o.StateToken = &v +} + +// GetOtpToken returns the OtpToken field value if set, zero value otherwise. +func (o *VerifyMfaFactorRequest) GetOtpToken() string { + if o == nil || isNil(o.OtpToken) { + var ret string + return ret + } + return *o.OtpToken +} + +// GetOtpTokenOk returns a tuple with the OtpToken field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VerifyMfaFactorRequest) GetOtpTokenOk() (*string, bool) { + if o == nil || isNil(o.OtpToken) { + return nil, false + } + return o.OtpToken, true +} + +// HasOtpToken returns a boolean if a field has been set. +func (o *VerifyMfaFactorRequest) HasOtpToken() bool { + if o != nil && !isNil(o.OtpToken) { + return true + } + + return false +} + +// SetOtpToken gets a reference to the given string and assigns it to the OtpToken field. +func (o *VerifyMfaFactorRequest) SetOtpToken(v string) { + o.OtpToken = &v +} + +func (o VerifyMfaFactorRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o VerifyMfaFactorRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.StateToken) { + toSerialize["state_token"] = o.StateToken + } + if !isNil(o.OtpToken) { + toSerialize["otp_token"] = o.OtpToken + } + return toSerialize, nil +} + +type NullableVerifyMfaFactorRequest struct { + value *VerifyMfaFactorRequest + isSet bool +} + +func (v NullableVerifyMfaFactorRequest) Get() *VerifyMfaFactorRequest { + return v.value +} + +func (v *NullableVerifyMfaFactorRequest) Set(val *VerifyMfaFactorRequest) { + v.value = val + v.isSet = true +} + +func (v NullableVerifyMfaFactorRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableVerifyMfaFactorRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableVerifyMfaFactorRequest(val *VerifyMfaFactorRequest) *NullableVerifyMfaFactorRequest { + return &NullableVerifyMfaFactorRequest{value: val, isSet: true} +} + +func (v NullableVerifyMfaFactorRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableVerifyMfaFactorRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_verify_user_registration_200_response.go b/model_verify_user_registration_200_response.go new file mode 100644 index 0000000..3f00060 --- /dev/null +++ b/model_verify_user_registration_200_response.go @@ -0,0 +1,201 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the VerifyUserRegistration200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &VerifyUserRegistration200Response{} + +// VerifyUserRegistration200Response struct for VerifyUserRegistration200Response +type VerifyUserRegistration200Response struct { + // Registration identifier. + Id *string `json:"id,omitempty"` + // pending registration has not been completed successfully. accepted registration has successfully completed. + Status *string `json:"status,omitempty"` + // Device id to be used with Verify the Factor. + DeviceId *string `json:"device_id,omitempty"` +} + +// NewVerifyUserRegistration200Response instantiates a new VerifyUserRegistration200Response 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 NewVerifyUserRegistration200Response() *VerifyUserRegistration200Response { + this := VerifyUserRegistration200Response{} + return &this +} + +// NewVerifyUserRegistration200ResponseWithDefaults instantiates a new VerifyUserRegistration200Response 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 NewVerifyUserRegistration200ResponseWithDefaults() *VerifyUserRegistration200Response { + this := VerifyUserRegistration200Response{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *VerifyUserRegistration200Response) GetId() string { + if o == nil || isNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VerifyUserRegistration200Response) GetIdOk() (*string, bool) { + if o == nil || isNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *VerifyUserRegistration200Response) HasId() bool { + if o != nil && !isNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *VerifyUserRegistration200Response) SetId(v string) { + o.Id = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *VerifyUserRegistration200Response) GetStatus() string { + if o == nil || isNil(o.Status) { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VerifyUserRegistration200Response) GetStatusOk() (*string, bool) { + if o == nil || isNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *VerifyUserRegistration200Response) HasStatus() bool { + if o != nil && !isNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *VerifyUserRegistration200Response) SetStatus(v string) { + o.Status = &v +} + +// GetDeviceId returns the DeviceId field value if set, zero value otherwise. +func (o *VerifyUserRegistration200Response) GetDeviceId() string { + if o == nil || isNil(o.DeviceId) { + var ret string + return ret + } + return *o.DeviceId +} + +// GetDeviceIdOk returns a tuple with the DeviceId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VerifyUserRegistration200Response) GetDeviceIdOk() (*string, bool) { + if o == nil || isNil(o.DeviceId) { + return nil, false + } + return o.DeviceId, true +} + +// HasDeviceId returns a boolean if a field has been set. +func (o *VerifyUserRegistration200Response) HasDeviceId() bool { + if o != nil && !isNil(o.DeviceId) { + return true + } + + return false +} + +// SetDeviceId gets a reference to the given string and assigns it to the DeviceId field. +func (o *VerifyUserRegistration200Response) SetDeviceId(v string) { + o.DeviceId = &v +} + +func (o VerifyUserRegistration200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o VerifyUserRegistration200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.Id) { + toSerialize["id"] = o.Id + } + if !isNil(o.Status) { + toSerialize["status"] = o.Status + } + if !isNil(o.DeviceId) { + toSerialize["device_id"] = o.DeviceId + } + return toSerialize, nil +} + +type NullableVerifyUserRegistration200Response struct { + value *VerifyUserRegistration200Response + isSet bool +} + +func (v NullableVerifyUserRegistration200Response) Get() *VerifyUserRegistration200Response { + return v.value +} + +func (v *NullableVerifyUserRegistration200Response) Set(val *VerifyUserRegistration200Response) { + v.value = val + v.isSet = true +} + +func (v NullableVerifyUserRegistration200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableVerifyUserRegistration200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableVerifyUserRegistration200Response(val *VerifyUserRegistration200Response) *NullableVerifyUserRegistration200Response { + return &NullableVerifyUserRegistration200Response{value: val, isSet: true} +} + +func (v NullableVerifyUserRegistration200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableVerifyUserRegistration200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_verify_user_registration_request.go b/model_verify_user_registration_request.go new file mode 100644 index 0000000..8ff177e --- /dev/null +++ b/model_verify_user_registration_request.go @@ -0,0 +1,127 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the VerifyUserRegistrationRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &VerifyUserRegistrationRequest{} + +// VerifyUserRegistrationRequest struct for VerifyUserRegistrationRequest +type VerifyUserRegistrationRequest struct { + // One-Time-Password (OTP) that was sent to the user based on the chosen factor. OneLogin SMS and OneLogin Email support this OTP code. + Otp *int32 `json:"otp,omitempty"` +} + +// NewVerifyUserRegistrationRequest instantiates a new VerifyUserRegistrationRequest 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 NewVerifyUserRegistrationRequest() *VerifyUserRegistrationRequest { + this := VerifyUserRegistrationRequest{} + return &this +} + +// NewVerifyUserRegistrationRequestWithDefaults instantiates a new VerifyUserRegistrationRequest 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 NewVerifyUserRegistrationRequestWithDefaults() *VerifyUserRegistrationRequest { + this := VerifyUserRegistrationRequest{} + return &this +} + +// GetOtp returns the Otp field value if set, zero value otherwise. +func (o *VerifyUserRegistrationRequest) GetOtp() int32 { + if o == nil || isNil(o.Otp) { + var ret int32 + return ret + } + return *o.Otp +} + +// GetOtpOk returns a tuple with the Otp field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VerifyUserRegistrationRequest) GetOtpOk() (*int32, bool) { + if o == nil || isNil(o.Otp) { + return nil, false + } + return o.Otp, true +} + +// HasOtp returns a boolean if a field has been set. +func (o *VerifyUserRegistrationRequest) HasOtp() bool { + if o != nil && !isNil(o.Otp) { + return true + } + + return false +} + +// SetOtp gets a reference to the given int32 and assigns it to the Otp field. +func (o *VerifyUserRegistrationRequest) SetOtp(v int32) { + o.Otp = &v +} + +func (o VerifyUserRegistrationRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o VerifyUserRegistrationRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.Otp) { + toSerialize["otp"] = o.Otp + } + return toSerialize, nil +} + +type NullableVerifyUserRegistrationRequest struct { + value *VerifyUserRegistrationRequest + isSet bool +} + +func (v NullableVerifyUserRegistrationRequest) Get() *VerifyUserRegistrationRequest { + return v.value +} + +func (v *NullableVerifyUserRegistrationRequest) Set(val *VerifyUserRegistrationRequest) { + v.value = val + v.isSet = true +} + +func (v NullableVerifyUserRegistrationRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableVerifyUserRegistrationRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableVerifyUserRegistrationRequest(val *VerifyUserRegistrationRequest) *NullableVerifyUserRegistrationRequest { + return &NullableVerifyUserRegistrationRequest{value: val, isSet: true} +} + +func (v NullableVerifyUserRegistrationRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableVerifyUserRegistrationRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_verify_user_verification_request.go b/model_verify_user_verification_request.go new file mode 100644 index 0000000..9925287 --- /dev/null +++ b/model_verify_user_verification_request.go @@ -0,0 +1,164 @@ +/* +OneLogin API + +OpenAPI Specification for OneLogin + +API version: 3.1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package onelogin + +import ( + "encoding/json" +) + +// checks if the VerifyUserVerificationRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &VerifyUserVerificationRequest{} + +// VerifyUserVerificationRequest struct for VerifyUserVerificationRequest +type VerifyUserVerificationRequest struct { + // OTP code provided by the device or SMS message sent to user. + Otp *string `json:"otp,omitempty"` + // ID of the specified device which has been registerd for the given user. Available on Get Devices API call. + DeviceId *int32 `json:"device_id,omitempty"` +} + +// NewVerifyUserVerificationRequest instantiates a new VerifyUserVerificationRequest 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 NewVerifyUserVerificationRequest() *VerifyUserVerificationRequest { + this := VerifyUserVerificationRequest{} + return &this +} + +// NewVerifyUserVerificationRequestWithDefaults instantiates a new VerifyUserVerificationRequest 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 NewVerifyUserVerificationRequestWithDefaults() *VerifyUserVerificationRequest { + this := VerifyUserVerificationRequest{} + return &this +} + +// GetOtp returns the Otp field value if set, zero value otherwise. +func (o *VerifyUserVerificationRequest) GetOtp() string { + if o == nil || isNil(o.Otp) { + var ret string + return ret + } + return *o.Otp +} + +// GetOtpOk returns a tuple with the Otp field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VerifyUserVerificationRequest) GetOtpOk() (*string, bool) { + if o == nil || isNil(o.Otp) { + return nil, false + } + return o.Otp, true +} + +// HasOtp returns a boolean if a field has been set. +func (o *VerifyUserVerificationRequest) HasOtp() bool { + if o != nil && !isNil(o.Otp) { + return true + } + + return false +} + +// SetOtp gets a reference to the given string and assigns it to the Otp field. +func (o *VerifyUserVerificationRequest) SetOtp(v string) { + o.Otp = &v +} + +// GetDeviceId returns the DeviceId field value if set, zero value otherwise. +func (o *VerifyUserVerificationRequest) GetDeviceId() int32 { + if o == nil || isNil(o.DeviceId) { + var ret int32 + return ret + } + return *o.DeviceId +} + +// GetDeviceIdOk returns a tuple with the DeviceId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *VerifyUserVerificationRequest) GetDeviceIdOk() (*int32, bool) { + if o == nil || isNil(o.DeviceId) { + return nil, false + } + return o.DeviceId, true +} + +// HasDeviceId returns a boolean if a field has been set. +func (o *VerifyUserVerificationRequest) HasDeviceId() bool { + if o != nil && !isNil(o.DeviceId) { + return true + } + + return false +} + +// SetDeviceId gets a reference to the given int32 and assigns it to the DeviceId field. +func (o *VerifyUserVerificationRequest) SetDeviceId(v int32) { + o.DeviceId = &v +} + +func (o VerifyUserVerificationRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o VerifyUserVerificationRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !isNil(o.Otp) { + toSerialize["otp"] = o.Otp + } + if !isNil(o.DeviceId) { + toSerialize["device_id"] = o.DeviceId + } + return toSerialize, nil +} + +type NullableVerifyUserVerificationRequest struct { + value *VerifyUserVerificationRequest + isSet bool +} + +func (v NullableVerifyUserVerificationRequest) Get() *VerifyUserVerificationRequest { + return v.value +} + +func (v *NullableVerifyUserVerificationRequest) Set(val *VerifyUserVerificationRequest) { + v.value = val + v.isSet = true +} + +func (v NullableVerifyUserVerificationRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableVerifyUserVerificationRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableVerifyUserVerificationRequest(val *VerifyUserVerificationRequest) *NullableVerifyUserVerificationRequest { + return &NullableVerifyUserVerificationRequest{value: val, isSet: true} +} + +func (v NullableVerifyUserVerificationRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableVerifyUserVerificationRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/readme.md b/readme.md index 07b03e9..0221dab 100644 --- a/readme.md +++ b/readme.md @@ -1,13 +1,15 @@ -# Go API client for openapi +# Go API client for onelogin -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) +OpenAPI Specification for OneLogin ## Overview + This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. -- API version: 3.0.0-alpha.1 -- Package version: 1.0.0 +- API version: 3.1.1 +- Package version: 3.1.0 - Build package: org.openapitools.codegen.languages.GoClientCodegen +For more information, please visit [https://support.onelogin.com](https://support.onelogin.com) ## Installation @@ -22,7 +24,7 @@ go get golang.org/x/net/context Put the package under your project folder and add the following in import: ```golang -import openapi "github.com/onelogin/onelogin-go-sdk" +import onelogin "github.com/onelogin/onelogin-go-sdk" ``` To use a proxy, set the environment variable `HTTP_PROXY`: @@ -40,7 +42,7 @@ Default configuration comes with `Servers` field that contains server objects as For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`. ```golang -ctx := context.WithValue(context.Background(), openapi.ContextServerIndex, 1) +ctx := context.WithValue(context.Background(), onelogin.ContextServerIndex, 1) ``` ### Templated Server URL @@ -48,7 +50,7 @@ ctx := context.WithValue(context.Background(), openapi.ContextServerIndex, 1) Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`. ```golang -ctx := context.WithValue(context.Background(), openapi.ContextServerVariables, map[string]string{ +ctx := context.WithValue(context.Background(), onelogin.ContextServerVariables, map[string]string{ "basePath": "v2", }) ``` @@ -61,11 +63,11 @@ Each operation can use different server URL defined using `OperationServers` map An operation is uniquely identified by `"{classname}Service.{nickname}"` string. Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps. -``` -ctx := context.WithValue(context.Background(), openapi.ContextOperationServerIndices, map[string]int{ +```golang +ctx := context.WithValue(context.Background(), onelogin.ContextOperationServerIndices, map[string]int{ "{classname}Service.{nickname}": 2, }) -ctx = context.WithValue(context.Background(), openapi.ContextOperationServerVariables, map[string]map[string]string{ +ctx = context.WithValue(context.Background(), onelogin.ContextOperationServerVariables, map[string]map[string]string{ "{classname}Service.{nickname}": { "port": "8443", }, @@ -74,210 +76,385 @@ ctx = context.WithValue(context.Background(), openapi.ContextOperationServerVari ## Documentation for API Endpoints -All URIs are relative to *https://onelogininc.onelogin.com* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*DefaultApi* | [**ActivateFactor**](docs/DefaultApi.md#activatefactor) | **Post** /api/2/mfa/users/{user_id}/verifications | -*DefaultApi* | [**AddAccessTokenClaim**](docs/DefaultApi.md#addaccesstokenclaim) | **Post** /api/2/api_authorizations/{id}/claims | -*DefaultApi* | [**AddClientApp**](docs/DefaultApi.md#addclientapp) | **Post** /api/2/api_authorizations/{id}/clients | -*DefaultApi* | [**AddRoleAdmins**](docs/DefaultApi.md#addroleadmins) | **Post** /api/2/roles/{role_id}/admins | -*DefaultApi* | [**AddRoleUsers**](docs/DefaultApi.md#addroleusers) | **Post** /api/2/roles/{role_id}/users | -*DefaultApi* | [**AddScope**](docs/DefaultApi.md#addscope) | **Post** /api/2/api_authorizations/{id}/scopes | -*DefaultApi* | [**BulkMappingSort**](docs/DefaultApi.md#bulkmappingsort) | **Put** /api/2/apps/mappings/sort | -*DefaultApi* | [**BulkSort**](docs/DefaultApi.md#bulksort) | **Put** /api/2/apps/{app_id}/rules/sort | -*DefaultApi* | [**CreateApp**](docs/DefaultApi.md#createapp) | **Post** /api/2/apps | -*DefaultApi* | [**CreateAuthorizationServer**](docs/DefaultApi.md#createauthorizationserver) | **Post** /api/2/api_authorizations | -*DefaultApi* | [**CreateEnvironmentVariable**](docs/DefaultApi.md#createenvironmentvariable) | **Post** /api/2/hooks/envs | -*DefaultApi* | [**CreateHook**](docs/DefaultApi.md#createhook) | **Post** /api/2/hooks | -*DefaultApi* | [**CreateMapping**](docs/DefaultApi.md#createmapping) | **Post** /api/2/mappings | -*DefaultApi* | [**CreateRiskRule**](docs/DefaultApi.md#createriskrule) | **Post** /api/2/risk/rules | -*DefaultApi* | [**CreateRoles**](docs/DefaultApi.md#createroles) | **Post** /api/2/roles | -*DefaultApi* | [**CreateRule**](docs/DefaultApi.md#createrule) | **Post** /api/2/apps/{app_id}/rules | -*DefaultApi* | [**CreateUser**](docs/DefaultApi.md#createuser) | **Post** /api/2/users | -*DefaultApi* | [**DeleteAccessTokenClaim**](docs/DefaultApi.md#deleteaccesstokenclaim) | **Delete** /api/2/api_authorizations/{id}/claims/{claim_id} | -*DefaultApi* | [**DeleteApp**](docs/DefaultApi.md#deleteapp) | **Delete** /api/2/apps/{app_id} | -*DefaultApi* | [**DeleteAppParameter**](docs/DefaultApi.md#deleteappparameter) | **Delete** /api/2/apps/{app_id}/parameters/{parameter_id} | -*DefaultApi* | [**DeleteAuthorizationServer**](docs/DefaultApi.md#deleteauthorizationserver) | **Delete** /api/2/api_authorizations/{id} | -*DefaultApi* | [**DeleteEnvironmentVariable**](docs/DefaultApi.md#deleteenvironmentvariable) | **Delete** /api/2/hooks/envs/{envvar_id} | -*DefaultApi* | [**DeleteFactor**](docs/DefaultApi.md#deletefactor) | **Delete** /api/2/mfa/users/{user_id}/devices/{device_id} | -*DefaultApi* | [**DeleteHook**](docs/DefaultApi.md#deletehook) | **Delete** /api/2/hooks/{hook_id} | -*DefaultApi* | [**DeleteMapping**](docs/DefaultApi.md#deletemapping) | **Delete** /api/2/mappings/{mapping_id} | -*DefaultApi* | [**DeleteRiskRule**](docs/DefaultApi.md#deleteriskrule) | **Delete** /api/2/risk/rules/{risk_rule_id} | -*DefaultApi* | [**DeleteRole**](docs/DefaultApi.md#deleterole) | **Delete** /api/2/roles/{role_id} | -*DefaultApi* | [**DeleteRule**](docs/DefaultApi.md#deleterule) | **Delete** /api/2/apps/{app_id}/rules/{rule_id} | -*DefaultApi* | [**DeleteScope**](docs/DefaultApi.md#deletescope) | **Delete** /api/2/api_authorizations/{id}/scopes/{scope_id} | -*DefaultApi* | [**DeleteUser**](docs/DefaultApi.md#deleteuser) | **Delete** /api/2/users/{user_id} | -*DefaultApi* | [**DryRunMapping**](docs/DefaultApi.md#dryrunmapping) | **Post** /api/2/mappings/{mapping_id}/dryrun | -*DefaultApi* | [**EnrollFactor**](docs/DefaultApi.md#enrollfactor) | **Post** /api/2/mfa/users/{user_id}/registrations | -*DefaultApi* | [**GenerateMfaToken**](docs/DefaultApi.md#generatemfatoken) | **Post** /api/2/mfs/users/{user_id}/mfa_token | -*DefaultApi* | [**GenerateSamlAssertion**](docs/DefaultApi.md#generatesamlassertion) | **Post** /api/2/saml_assertion | -*DefaultApi* | [**GenerateToken**](docs/DefaultApi.md#generatetoken) | **Post** /auth/oauth2/v2/token | -*DefaultApi* | [**GetApp**](docs/DefaultApi.md#getapp) | **Get** /api/2/apps/{app_id} | -*DefaultApi* | [**GetAuthorizationServer**](docs/DefaultApi.md#getauthorizationserver) | **Get** /api/2/api_authorizations/{id} | -*DefaultApi* | [**GetAvailableFactors**](docs/DefaultApi.md#getavailablefactors) | **Get** /api/2/mfa/users/{user_id}/factors | -*DefaultApi* | [**GetClientApps**](docs/DefaultApi.md#getclientapps) | **Get** /api/2/api_authorizations/{id}/clients | -*DefaultApi* | [**GetEnrolledFactors**](docs/DefaultApi.md#getenrolledfactors) | **Get** /api/2/mfa/users/{user_id}/devices | -*DefaultApi* | [**GetEnvironmentVariable**](docs/DefaultApi.md#getenvironmentvariable) | **Get** /api/2/hooks/envs/{envvar_id} | -*DefaultApi* | [**GetHook**](docs/DefaultApi.md#gethook) | **Get** /api/2/hooks/{hook_id} | -*DefaultApi* | [**GetLogs**](docs/DefaultApi.md#getlogs) | **Get** /api/2/hooks/{hook_id}/logs | -*DefaultApi* | [**GetMapping**](docs/DefaultApi.md#getmapping) | **Get** /api/2/mappings/{mapping_id} | -*DefaultApi* | [**GetRateLimit**](docs/DefaultApi.md#getratelimit) | **Get** /auth/rate_limit | -*DefaultApi* | [**GetRiskRule**](docs/DefaultApi.md#getriskrule) | **Get** /api/2/risk/rules/{risk_rule_id} | -*DefaultApi* | [**GetRiskScore**](docs/DefaultApi.md#getriskscore) | **Post** /api/2/risk/verify | -*DefaultApi* | [**GetRole**](docs/DefaultApi.md#getrole) | **Get** /api/2/roles/{role_id} | -*DefaultApi* | [**GetRoleAdmins**](docs/DefaultApi.md#getroleadmins) | **Get** /api/2/roles/{role_id}/admins | -*DefaultApi* | [**GetRoleApps**](docs/DefaultApi.md#getroleapps) | **Get** /api/2/roles/{role_id}/apps | -*DefaultApi* | [**GetRoleUsers**](docs/DefaultApi.md#getroleusers) | **Get** /api/2/roles/{role_id}/users | -*DefaultApi* | [**GetRule**](docs/DefaultApi.md#getrule) | **Get** /api/2/apps/{app_id}/rules/{rule_id} | -*DefaultApi* | [**GetScoreInsights**](docs/DefaultApi.md#getscoreinsights) | **Get** /api/2/risk/scores | -*DefaultApi* | [**GetUser**](docs/DefaultApi.md#getuser) | **Get** /api/2/users/{user_id} | -*DefaultApi* | [**GetUserApps**](docs/DefaultApi.md#getuserapps) | **Get** /api/2/users/{user_id}/apps | -*DefaultApi* | [**ListAccessTokenClaims**](docs/DefaultApi.md#listaccesstokenclaims) | **Get** /api/2/api_authorizations/{id}/claims | -*DefaultApi* | [**ListActionValues**](docs/DefaultApi.md#listactionvalues) | **Get** /api/2/apps/{app_id}/rules/actions/{actuion_value}/values | -*DefaultApi* | [**ListActions**](docs/DefaultApi.md#listactions) | **Get** /api/2/apps/{app_id}/rules/actions | -*DefaultApi* | [**ListAppUsers**](docs/DefaultApi.md#listappusers) | **Get** /api/2/apps/{app_id}/users | -*DefaultApi* | [**ListApps**](docs/DefaultApi.md#listapps) | **Get** /api/2/apps | -*DefaultApi* | [**ListAuthorizationServers**](docs/DefaultApi.md#listauthorizationservers) | **Get** /api/2/api_authorizations | -*DefaultApi* | [**ListConditionOperators**](docs/DefaultApi.md#listconditionoperators) | **Get** /api/2/apps/{app_id}/rules/conditions/{condition_value}/operators | -*DefaultApi* | [**ListConditionValues**](docs/DefaultApi.md#listconditionvalues) | **Get** /api/2/apps/{app_id}/rules/conditions/{condition_value}/values | -*DefaultApi* | [**ListConditions**](docs/DefaultApi.md#listconditions) | **Get** /api/2/apps/{app_id}/rules/conditions | -*DefaultApi* | [**ListConnectors**](docs/DefaultApi.md#listconnectors) | **Get** /api/2/connectors | -*DefaultApi* | [**ListEnvironmentVariables**](docs/DefaultApi.md#listenvironmentvariables) | **Get** /api/2/hooks/envs | -*DefaultApi* | [**ListHooks**](docs/DefaultApi.md#listhooks) | **Get** /api/2/hooks | -*DefaultApi* | [**ListMappingActionValues**](docs/DefaultApi.md#listmappingactionvalues) | **Get** /api/2/apps/mappings/actions/{actuion_value}/values | -*DefaultApi* | [**ListMappingActions**](docs/DefaultApi.md#listmappingactions) | **Get** /api/2/apps/mappings/actions | -*DefaultApi* | [**ListMappingConditionOperators**](docs/DefaultApi.md#listmappingconditionoperators) | **Get** /api/2/apps/mappings/conditions/{condition_value}/operators | -*DefaultApi* | [**ListMappingConditionValues**](docs/DefaultApi.md#listmappingconditionvalues) | **Get** /api/2/apps/mappings/conditions/{condition_value}/values | -*DefaultApi* | [**ListMappingConditions**](docs/DefaultApi.md#listmappingconditions) | **Get** /api/2/apps/mappings/conditions | -*DefaultApi* | [**ListMappings**](docs/DefaultApi.md#listmappings) | **Get** /api/2/mappings | -*DefaultApi* | [**ListRiskRules**](docs/DefaultApi.md#listriskrules) | **Get** /api/2/risk/rules | -*DefaultApi* | [**ListRoles**](docs/DefaultApi.md#listroles) | **Get** /api/2/roles | -*DefaultApi* | [**ListRules**](docs/DefaultApi.md#listrules) | **Get** /api/2/apps/{app_id}/rules | -*DefaultApi* | [**ListScopes**](docs/DefaultApi.md#listscopes) | **Get** /api/2/api_authorizations/{id}/scopes | -*DefaultApi* | [**ListUsers**](docs/DefaultApi.md#listusers) | **Get** /api/2/users | -*DefaultApi* | [**RemoveClientApp**](docs/DefaultApi.md#removeclientapp) | **Delete** /api/2/api_authorizations/{id}/clients/{client_app_id} | -*DefaultApi* | [**RemoveRoleAdmins**](docs/DefaultApi.md#removeroleadmins) | **Delete** /api/2/roles/{role_id}/admins | -*DefaultApi* | [**RemoveRoleUsers**](docs/DefaultApi.md#removeroleusers) | **Delete** /api/2/roles/{role_id}/users | -*DefaultApi* | [**RevokeToken**](docs/DefaultApi.md#revoketoken) | **Post** /auth/oauth2/revoke | -*DefaultApi* | [**SetRoleApps**](docs/DefaultApi.md#setroleapps) | **Put** /api/2/roles/{role_id}/apps | -*DefaultApi* | [**TrackEvent**](docs/DefaultApi.md#trackevent) | **Post** /api/2/risk/events | -*DefaultApi* | [**UpdateAccessTokenClaim**](docs/DefaultApi.md#updateaccesstokenclaim) | **Put** /api/2/api_authorizations/{id}/claims/{claim_id} | -*DefaultApi* | [**UpdateApp**](docs/DefaultApi.md#updateapp) | **Put** /api/2/apps/{app_id} | -*DefaultApi* | [**UpdateAuthorizationServer**](docs/DefaultApi.md#updateauthorizationserver) | **Put** /api/2/api_authorizations/{id} | -*DefaultApi* | [**UpdateClientApp**](docs/DefaultApi.md#updateclientapp) | **Put** /api/2/api_authorizations/{id}/clients/{client_app_id} | -*DefaultApi* | [**UpdateEnvironmentVariable**](docs/DefaultApi.md#updateenvironmentvariable) | **Put** /api/2/hooks/envs/{envvar_id} | -*DefaultApi* | [**UpdateHook**](docs/DefaultApi.md#updatehook) | **Put** /api/2/hooks/{hook_id} | -*DefaultApi* | [**UpdateMapping**](docs/DefaultApi.md#updatemapping) | **Put** /api/2/mappings/{mapping_id} | -*DefaultApi* | [**UpdateRiskRule**](docs/DefaultApi.md#updateriskrule) | **Put** /api/2/risk/rules/{risk_rule_id} | -*DefaultApi* | [**UpdateRole**](docs/DefaultApi.md#updaterole) | **Put** /api/2/roles/{role_id} | -*DefaultApi* | [**UpdateRule**](docs/DefaultApi.md#updaterule) | **Put** /api/2/apps/{app_id}/rules/{rule_id} | -*DefaultApi* | [**UpdateScope**](docs/DefaultApi.md#updatescope) | **Put** /api/2/api_authorizations/{id}/scopes/{scope_id} | -*DefaultApi* | [**UpdateUser**](docs/DefaultApi.md#updateuser) | **Put** /api/2/users/{user_id} | -*DefaultApi* | [**VerifyEnrollment**](docs/DefaultApi.md#verifyenrollment) | **Put** /api/2/mfa/users/{user_id}/registrations/{registration_id} | -*DefaultApi* | [**VerifyEnrollmentVoiceProtect**](docs/DefaultApi.md#verifyenrollmentvoiceprotect) | **Get** /api/2/mfa/users/{user_id}/registrations/{registration_id} | -*DefaultApi* | [**VerifyFactor**](docs/DefaultApi.md#verifyfactor) | **Put** /api/2/mfa/users/{user_id}/verifications/{verification_id} | -*DefaultApi* | [**VerifyFactorSaml**](docs/DefaultApi.md#verifyfactorsaml) | **Post** /api/2/saml_assertion/verify_factor | -*DefaultApi* | [**VerifyFactorVoice**](docs/DefaultApi.md#verifyfactorvoice) | **Get** /api/2/mfa/users/{user_id}/verifications/{verification_id} | +All URIs are relative to *https://your-api-subdomain.onelogin.com* + +| Class | Method | HTTP request | Description | +| -------------------------------- | ---------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ | ------------------------------------------ | +| *APIAuthClaimsApi* | [**CreateAuthClaim**](docs/APIAuthClaimsApi.md#createauthclaim) | **Post** /api/2/api_authorizations/{api_auth_id}/claims | Create Api Auth Server Claim | +| *APIAuthClaimsApi* | [**DeleteAuthClaim**](docs/APIAuthClaimsApi.md#deleteauthclaim) | **Delete** /api/2/api_authorizations/{api_auth_id}/claims/{claim_id} | Delete Api Auth Server Claim | +| *APIAuthClaimsApi* | [**GetAuthclaims**](docs/APIAuthClaimsApi.md#getauthclaims) | **Get** /api/2/api_authorizations/{api_auth_id}/claims | Get Api Auth Server claims | +| *APIAuthClaimsApi* | [**UpdateClaim**](docs/APIAuthClaimsApi.md#updateclaim) | **Put** /api/2/api_authorizations/{api_auth_id}/claims/{claim_id} | Update Api Auth Server Claim | +| *APIAuthClientAppsApi* | [**AddClientApp**](docs/APIAuthClientAppsApi.md#addclientapp) | **Post** /api/2/api_authorizations/{api_auth_id}/clients | Add Client App | +| *APIAuthClientAppsApi* | [**DeleteClientApp**](docs/APIAuthClientAppsApi.md#deleteclientapp) | **Delete** /api/2/api_authorizations/{api_auth_id}/clients/{client_app_id} | Remove Client App | +| *APIAuthClientAppsApi* | [**ListClientApps**](docs/APIAuthClientAppsApi.md#listclientapps) | **Get** /api/2/api_authorizations/{api_auth_id}/clients | List Clients Apps | +| *APIAuthClientAppsApi* | [**UpdateClientApp**](docs/APIAuthClientAppsApi.md#updateclientapp) | **Put** /api/2/api_authorizations/{api_auth_id}/clients/{client_app_id} | Update Client App | +| *APIAuthScopesApi* | [**CreateScope**](docs/APIAuthScopesApi.md#createscope) | **Post** /api/2/api_authorizations/{api_auth_id}/scopes | Create Api Auth Server Scope | +| *APIAuthScopesApi* | [**DeleteScope**](docs/APIAuthScopesApi.md#deletescope) | **Delete** /api/2/api_authorizations/{api_auth_id}/scopes/{scope_id} | Delete Api Auth Server Scope | +| *APIAuthScopesApi* | [**GetScopes**](docs/APIAuthScopesApi.md#getscopes) | **Get** /api/2/api_authorizations/{api_auth_id}/scopes | Get Api Auth Server Scopes | +| *APIAuthScopesApi* | [**UpdateScope**](docs/APIAuthScopesApi.md#updatescope) | **Put** /api/2/api_authorizations/{api_auth_id}/scopes/{scope_id} | Update Api Auth Server Scope | +| *APIAuthorizationServerApi* | [**CreateAuthServer**](docs/APIAuthorizationServerApi.md#createauthserver) | **Post** /api/2/api_authorizations | Create Api Auth Server | +| *APIAuthorizationServerApi* | [**DeleteAuthServer**](docs/APIAuthorizationServerApi.md#deleteauthserver) | **Delete** /api/2/api_authorizations/{api_auth_id} | Delete Api Auth Server | +| *APIAuthorizationServerApi* | [**GetAuthServer**](docs/APIAuthorizationServerApi.md#getauthserver) | **Get** /api/2/api_authorizations/{api_auth_id} | Get Api Auth Server | +| *APIAuthorizationServerApi* | [**ListAuthServers**](docs/APIAuthorizationServerApi.md#listauthservers) | **Get** /api/2/api_authorizations | List Api Auth Servers | +| *APIAuthorizationServerApi* | [**UpdateAuthServer**](docs/APIAuthorizationServerApi.md#updateauthserver) | **Put** /api/2/api_authorizations/{api_auth_id} | Update Api Auth Server | +| *AppRulesApi* | [**CreateAppRule**](docs/AppRulesApi.md#createapprule) | **Post** /api/2/apps/{app_id}/rules | +| *AppRulesApi* | [**DeleteRule**](docs/AppRulesApi.md#deleterule) | **Delete** /api/2/apps/{app_id}/rules/{rule_id} | Delete Rule | +| *AppRulesApi* | [**GetAppRule**](docs/AppRulesApi.md#getapprule) | **Get** /api/2/apps/{app_id}/rules/{rule_id} | Get Rule | +| *AppRulesApi* | [**ListActionValies**](docs/AppRulesApi.md#listactionvalies) | **Get** /api/2/apps/{app_id}/rules/actions/{rule_action_value}/values | List Actions Values | +| *AppRulesApi* | [**ListActions**](docs/AppRulesApi.md#listactions) | **Get** /api/2/apps/{app_id}/rules/actions | List Actions | +| *AppRulesApi* | [**ListAppRules**](docs/AppRulesApi.md#listapprules) | **Get** /api/2/apps/{app_id}/rules | List Rules | +| *AppRulesApi* | [**ListConditionOperators**](docs/AppRulesApi.md#listconditionoperators) | **Get** /api/2/apps/{app_id}/rules/conditions/{rule_condition_value}/operators | List Conditions Operators | +| *AppRulesApi* | [**ListConditionValues**](docs/AppRulesApi.md#listconditionvalues) | **Get** /api/2/apps/{app_id}/rules/conditions/{rule_condition_value}/values | List Conditions Values | +| *AppRulesApi* | [**ListConditions**](docs/AppRulesApi.md#listconditions) | **Get** /api/2/apps/{app_id}/rules/conditions | List Conditions | +| *AppRulesApi* | [**SortAppRules**](docs/AppRulesApi.md#sortapprules) | **Put** /api/2/apps/{app_id}/rules/sort | Bulk Sort | +| *AppRulesApi* | [**UpdateAppRule**](docs/AppRulesApi.md#updateapprule) | **Put** /api/2/apps/{app_id}/rules/{rule_id} | Update Rule | +| *AppsApi* | [**CreateApp**](docs/AppsApi.md#createapp) | **Post** /api/2/apps | Create App | +| *AppsApi* | [**DeleteApp**](docs/AppsApi.md#deleteapp) | **Delete** /api/2/apps/{app_id} | Delete App | +| *AppsApi* | [**DeleteAppParameter**](docs/AppsApi.md#deleteappparameter) | **Delete** /api/2/apps/{app_id}/parameters/{parameter_id} | Delete Parameter from App | +| *AppsApi* | [**GetApp**](docs/AppsApi.md#getapp) | **Get** /api/2/apps/{app_id} | Get App | +| *AppsApi* | [**GetAppUsers**](docs/AppsApi.md#getappusers) | **Get** /api/2/apps/{app_id}/users | Get App Users | +| *AppsApi* | [**ListApps**](docs/AppsApi.md#listapps) | **Get** /api/2/apps | List Apps | +| *AppsApi* | [**ListConnectors**](docs/AppsApi.md#listconnectors) | **Get** /api/2/connectors | List Connectors | +| *AppsApi* | [**UpdateApp**](docs/AppsApi.md#updateapp) | **Put** /api/2/apps/{app_id} | Update App | +| *BrandingServiceApi* | [**CreateBrand**](docs/BrandingServiceApi.md#createbrand) | **Post** /api/2/branding/brands | Create Brand | +| *BrandingServiceApi* | [**DeleteBrand**](docs/BrandingServiceApi.md#deletebrand) | **Delete** /api/2/branding/brands/{brand_id} | Delete Brand | +| *BrandingServiceApi* | [**GetBrand**](docs/BrandingServiceApi.md#getbrand) | **Get** /api/2/branding/brands/{brand_id} | Get Brand | +| *BrandingServiceApi* | [**GetBrandApps**](docs/BrandingServiceApi.md#getbrandapps) | **Get** /api/2/branding/brands/{brand_id}/apps | Get Brand Apps | +| *BrandingServiceApi* | [**ListBrands**](docs/BrandingServiceApi.md#listbrands) | **Get** /api/2/branding/brands | List Account Brands | +| *BrandingServiceApi* | [**UpdateBrand**](docs/BrandingServiceApi.md#updatebrand) | **Put** /api/2/branding/brands/{brand_id} | Update Brand | +| *BrandingServiceSMTPApi* | [**DeleteEmailSettings**](docs/BrandingServiceSMTPApi.md#deleteemailsettings) | **Delete** /api/2/branding/email_settings | Delete Custom Email Settings | +| *BrandingServiceSMTPApi* | [**GetEmailSettings**](docs/BrandingServiceSMTPApi.md#getemailsettings) | **Get** /api/2/branding/email_settings | Get Email Settings | +| *BrandingServiceSMTPApi* | [**UpdateEmailSettings**](docs/BrandingServiceSMTPApi.md#updateemailsettings) | **Put** /api/2/branding/email_settings | Update Email Settings | +| *BrandingServiceTemplatesApi* | [**CreateMessageTemplate**](docs/BrandingServiceTemplatesApi.md#createmessagetemplate) | **Post** /api/2/branding/brands/{brand_id}/templates | Create Message Template | +| *BrandingServiceTemplatesApi* | [**DeleteMessageTemplate**](docs/BrandingServiceTemplatesApi.md#deletemessagetemplate) | **Delete** /api/2/branding/brands/{brand_id}/templates/{template_id} | Delete Message Template | +| *BrandingServiceTemplatesApi* | [**GetMasterByType**](docs/BrandingServiceTemplatesApi.md#getmasterbytype) | **Get** /api/2/branding/brands/master/templates/{template_type} | Get Master Template by Type | +| *BrandingServiceTemplatesApi* | [**GetMessageTemplateById**](docs/BrandingServiceTemplatesApi.md#getmessagetemplatebyid) | **Get** /api/2/branding/brands/{brand_id}/templates/{template_id} | Get Message Template | +| *BrandingServiceTemplatesApi* | [**GetTemplateByLocale**](docs/BrandingServiceTemplatesApi.md#gettemplatebylocale) | **Get** /api/2/branding/brands/{brand_id}/templates/{template_type}/{locale} | Get Template by Type & Locale | +| *BrandingServiceTemplatesApi* | [**ListMessageTemplates**](docs/BrandingServiceTemplatesApi.md#listmessagetemplates) | **Get** /api/2/branding/brands/{brand_id}/templates | List Message Templates | +| *BrandingServiceTemplatesApi* | [**UpdateMessageTemplateById**](docs/BrandingServiceTemplatesApi.md#updatemessagetemplatebyid) | **Put** /api/2/branding/brands/{brand_id}/templates/{template_id} | Update Message Template | +| *BrandingServiceTemplatesApi* | [**UpdateTemplateByLocale**](docs/BrandingServiceTemplatesApi.md#updatetemplatebylocale) | **Put** /api/2/branding/brands/{brand_id}/templates/{template_type}/{locale} | Update Template by Type & Locale | +| *EventsApi* | [**GetEventById**](docs/EventsApi.md#geteventbyid) | **Get** /api/1/events/{event_id} | Get Event by ID | +| *EventsApi* | [**GetEventTypes**](docs/EventsApi.md#geteventtypes) | **Get** /api/1/events/types | Get Event Types | +| *EventsApi* | [**GetEvents**](docs/EventsApi.md#getevents) | **Get** /api/1/events | Get Events | +| *GroupsApi* | [**GetGroupById**](docs/GroupsApi.md#getgroupbyid) | **Get** /api/1/groups/{group_id} | Get Group by ID | +| *GroupsApi* | [**GetGroups**](docs/GroupsApi.md#getgroups) | **Get** /api/1/groups | Get Groups | +| *InviteLinksApi* | [**GetInviteLink**](docs/InviteLinksApi.md#getinvitelink) | **Post** /api/1/invites/get_invite_link | Generate Invite Link | +| *InviteLinksApi* | [**SendInviteLink**](docs/InviteLinksApi.md#sendinvitelink) | **Post** /api/1/invites/send_invite_link | Send Invite Link | +| *MultiFactorAuthenticationApi* | [**CreateDeviceVerification**](docs/MultiFactorAuthenticationApi.md#createdeviceverification) | **Post** /api/2/mfa/users/{user_id}/verifications | Create Device Verification | +| *MultiFactorAuthenticationApi* | [**CreateFactorRegistration**](docs/MultiFactorAuthenticationApi.md#createfactorregistration) | **Post** /api/2/mfa/users/{user_id}/registrations | Create Factor Registration | +| *MultiFactorAuthenticationApi* | [**DeleteEnrolledFactor**](docs/MultiFactorAuthenticationApi.md#deleteenrolledfactor) | **Delete** /api/2/mfa/users/{user_id}/devices/{device_id} | Delete Enrolled Factor | +| *MultiFactorAuthenticationApi* | [**GenerateOTP**](docs/MultiFactorAuthenticationApi.md#generateotp) | **Post** /api/2/mfa/users/{user_id}/mfa_token | Generate MFA token | +| *MultiFactorAuthenticationApi* | [**GetAuthFactors**](docs/MultiFactorAuthenticationApi.md#getauthfactors) | **Get** /api/2/mfa/users/{user_id}/factors | Get User Factors | +| *MultiFactorAuthenticationApi* | [**GetAuthenticationDevices**](docs/MultiFactorAuthenticationApi.md#getauthenticationdevices) | **Get** /api/2/mfa/users/{user_id}/devices | Get User Devices | +| *MultiFactorAuthenticationApi* | [**GetUserRegistration**](docs/MultiFactorAuthenticationApi.md#getuserregistration) | **Get** /api/2/mfa/users/{user_id}/registrations/{registration_id} | Get User Registration | +| *MultiFactorAuthenticationApi* | [**GetUserVerification**](docs/MultiFactorAuthenticationApi.md#getuserverification) | **Get** /api/2/mfa/users/{user_id}/verifications/{verification_id} | Get User Verification | +| *MultiFactorAuthenticationApi* | [**VerifyUserRegistration**](docs/MultiFactorAuthenticationApi.md#verifyuserregistration) | **Put** /api/2/mfa/users/{user_id}/registrations/{registration_id} | Verify User Registration | +| *MultiFactorAuthenticationApi* | [**VerifyUserVerification**](docs/MultiFactorAuthenticationApi.md#verifyuserverification) | **Put** /api/2/mfa/users/{user_id}/verifications/{verification_id} | Verify User Verification | +| *MultiFactorAuthenticationV1Api* | [**ActivateMfaFactors**](docs/MultiFactorAuthenticationV1Api.md#activatemfafactors) | **Post** /api/1/users/{user_id}/otp_devices/{device_id}/trigger | Activate a Factor | +| *MultiFactorAuthenticationV1Api* | [**EnrollMfaFactor**](docs/MultiFactorAuthenticationV1Api.md#enrollmfafactor) | **Post** /api/1/users/{user_id}/otp_devices | Enroll a Factor | +| *MultiFactorAuthenticationV1Api* | [**GenerateMFAtoken**](docs/MultiFactorAuthenticationV1Api.md#generatemfatoken) | **Post** /api/1/users/{user_id}/mfa_token | Generate Temp MFA Token | +| *MultiFactorAuthenticationV1Api* | [**GetEnrolledFactors**](docs/MultiFactorAuthenticationV1Api.md#getenrolledfactors) | **Get** /api/1/users/{user_id}/otp_devices | Get Enrolled Factors | +| *MultiFactorAuthenticationV1Api* | [**GetMFAFactors**](docs/MultiFactorAuthenticationV1Api.md#getmfafactors) | **Get** /api/1/users/{user_id}/auth_factor | Get Available Factors | +| *MultiFactorAuthenticationV1Api* | [**RemoveMfaFactors**](docs/MultiFactorAuthenticationV1Api.md#removemfafactors) | **Delete** /api/1/users/{user_id}/otp_devices/{device_id} | Remove an Enrolled Factor | +| *MultiFactorAuthenticationV1Api* | [**VerifyMfaFactor**](docs/MultiFactorAuthenticationV1Api.md#verifymfafactor) | **Post** /api/1/users/{user_id}/otp_devices/{device_id}/verify | Verify a Factor | +| *OAuth2Api* | [**GenerateToken**](docs/OAuth2Api.md#generatetoken) | **Post** /auth/oauth2/v2/token | Generate Token | +| *OAuth2Api* | [**GetRateLimit**](docs/OAuth2Api.md#getratelimit) | **Get** /auth/rate_limit | Get Rate Limit | +| *OAuth2Api* | [**RevokeTokens**](docs/OAuth2Api.md#revoketokens) | **Post** /auth/oauth2/revoke | Revoke Tokens | +| *PrivilegesApi* | [**AddPrivilegeToRole**](docs/PrivilegesApi.md#addprivilegetorole) | **Post** /api/1/privileges/{privilege_id}/roles | Assign a Privilege to Roles | +| *PrivilegesApi* | [**AssignUsersToPrivilege**](docs/PrivilegesApi.md#assignuserstoprivilege) | **Post** /api/1/privileges/{privilege_id}/users | Assign Users to a Privilege | +| *PrivilegesApi* | [**CreatePrivilege**](docs/PrivilegesApi.md#createprivilege) | **Post** /api/1/privileges | Create a Privilege | +| *PrivilegesApi* | [**DeletePrivilege**](docs/PrivilegesApi.md#deleteprivilege) | **Delete** /api/1/privileges/{privilege_id} | Delete a Privilege | +| *PrivilegesApi* | [**DeleteRoleFromPrivilege**](docs/PrivilegesApi.md#deleterolefromprivilege) | **Delete** /api/1/privileges/{privilege_id}/roles/{role_id} | Remove a Privilege from a Role | +| *PrivilegesApi* | [**GetAssignedUser**](docs/PrivilegesApi.md#getassigneduser) | **Get** /api/1/privileges/{privilege_id}/users | Get Users assigned to a Privilege | +| *PrivilegesApi* | [**GetPrivilege**](docs/PrivilegesApi.md#getprivilege) | **Get** /api/1/privileges/{privilege_id} | Get a Privilege | +| *PrivilegesApi* | [**ListPrivelegeRoles**](docs/PrivilegesApi.md#listprivelegeroles) | **Get** /api/1/privileges/{privilege_id}/roles | Get Roles assigned to Privilege | +| *PrivilegesApi* | [**ListPriveleges**](docs/PrivilegesApi.md#listpriveleges) | **Get** /api/1/privileges | List Privileges | +| *PrivilegesApi* | [**RemoveUserFromPrivilege**](docs/PrivilegesApi.md#removeuserfromprivilege) | **Delete** /api/1/privileges/{privilege_id}/users/{user_id} | Remove a Privilege from Users | +| *PrivilegesApi* | [**UpdatePrivilege**](docs/PrivilegesApi.md#updateprivilege) | **Put** /api/1/privileges/{privilege_id} | Update a Privilege | +| *RolesApi* | [**AddRoleAdmins**](docs/RolesApi.md#addroleadmins) | **Post** /api/2/roles/{role_id}/admins | Add Role Admins | +| *RolesApi* | [**AddRoleUsers**](docs/RolesApi.md#addroleusers) | **Post** /api/2/roles/{role_id}/users | Add Role Users | +| *RolesApi* | [**CreateRole**](docs/RolesApi.md#createrole) | **Post** /api/2/roles | Create Role | +| *RolesApi* | [**DeleteRole**](docs/RolesApi.md#deleterole) | **Delete** /api/2/roles/{role_id} | Delete Role by ID | +| *RolesApi* | [**GetRole**](docs/RolesApi.md#getrole) | **Get** /api/2/roles/{role_id} | Get Role by ID | +| *RolesApi* | [**GetRoleAdmins**](docs/RolesApi.md#getroleadmins) | **Get** /api/2/roles/{role_id}/admins | Get Role Admins | +| *RolesApi* | [**GetRoleApps**](docs/RolesApi.md#getroleapps) | **Get** /api/2/roles/{role_id}/apps | Get all Apps assigned to Role | +| *RolesApi* | [**GetRoleById**](docs/RolesApi.md#getrolebyid) | **Get** /api/1/roles/{role_id} | Get Role by ID | +| *RolesApi* | [**GetRoleByName**](docs/RolesApi.md#getrolebyname) | **Get** /api/1/roles | Get Role by Name | +| *RolesApi* | [**GetRoleUsers**](docs/RolesApi.md#getroleusers) | **Get** /api/2/roles/{role_id}/users | Get Role Users | +| *RolesApi* | [**ListRoles**](docs/RolesApi.md#listroles) | **Get** /api/2/roles | List Roles | +| *RolesApi* | [**RemoveRoleAdmins**](docs/RolesApi.md#removeroleadmins) | **Delete** /api/2/roles/{role_id}/admins | Remove Role Admins | +| *RolesApi* | [**RemoveRoleUsers**](docs/RolesApi.md#removeroleusers) | **Delete** /api/2/roles/{role_id}/users | Remove Role Users | +| *RolesApi* | [**SetRoleApps**](docs/RolesApi.md#setroleapps) | **Put** /api/2/roles/{role_id}/apps | Set Role Apps | +| *RolesApi* | [**UpdateRole**](docs/RolesApi.md#updaterole) | **Put** /api/2/roles/{role_id} | Update Role | +| *SAMLAssertionsApi* | [**GenerateSamlAssert**](docs/SAMLAssertionsApi.md#generatesamlassert) | **Post** /api/1/saml_assertion | Generate SAML Assertion | +| *SAMLAssertionsApi* | [**GenerateSamlAssert2**](docs/SAMLAssertionsApi.md#generatesamlassert2) | **Post** /api/2/saml_assertion | Generate SAML Assertion | +| *SAMLAssertionsApi* | [**VerFactorSaml**](docs/SAMLAssertionsApi.md#verfactorsaml) | **Post** /api/1/saml_assertion/verify_factor | Verify Factor SAML | +| *SAMLAssertionsApi* | [**VerFactorSaml2**](docs/SAMLAssertionsApi.md#verfactorsaml2) | **Post** /api/2/saml_assertion/verify_factor | Verify Factor SAML | +| *SmartHooksApi* | [**CreateEnvironmentVariable**](docs/SmartHooksApi.md#createenvironmentvariable) | **Post** /api/2/hooks/envs | Create Environment Variable | +| *SmartHooksApi* | [**CreateHook**](docs/SmartHooksApi.md#createhook) | **Post** /api/2/hooks | Create Smart Hook | +| *SmartHooksApi* | [**DeleteEnvironmentVariable**](docs/SmartHooksApi.md#deleteenvironmentvariable) | **Delete** /api/2/hooks/envs/{envvar_id} | Delete Environment Variable | +| *SmartHooksApi* | [**DeleteHook**](docs/SmartHooksApi.md#deletehook) | **Delete** /api/2/hooks/{hook_id} | Delete Smart Hook by ID | +| *SmartHooksApi* | [**GetEnvironmentVariable**](docs/SmartHooksApi.md#getenvironmentvariable) | **Get** /api/2/hooks/envs/{envvar_id} | Get Environment Variable | +| *SmartHooksApi* | [**GetHook**](docs/SmartHooksApi.md#gethook) | **Get** /api/2/hooks/{hook_id} | Get Smart Hook by ID | +| *SmartHooksApi* | [**GetLogs**](docs/SmartHooksApi.md#getlogs) | **Get** /api/2/hooks/{hook_id}/logs | Get Smart Hook Logs | +| *SmartHooksApi* | [**ListEnvironmentVariables**](docs/SmartHooksApi.md#listenvironmentvariables) | **Get** /api/2/hooks/envs | List Environment Variables | +| *SmartHooksApi* | [**ListHooks**](docs/SmartHooksApi.md#listhooks) | **Get** /api/2/hooks | List all Smart Hooks | +| *SmartHooksApi* | [**UpdateEnvironmentVariable**](docs/SmartHooksApi.md#updateenvironmentvariable) | **Put** /api/2/hooks/envs/{envvar_id} | Update Environment Variable | +| *SmartHooksApi* | [**UpdateHook**](docs/SmartHooksApi.md#updatehook) | **Put** /api/2/hooks/{hook_id} | Update Smart Hook by ID | +| *UserMappingsApi* | [**CreateMapping**](docs/UserMappingsApi.md#createmapping) | **Post** /api/2/mappings | Create Mapping | +| *UserMappingsApi* | [**DeleteMapping**](docs/UserMappingsApi.md#deletemapping) | **Delete** /api/2/mappings/{mapping_id} | Delete Mapping | +| *UserMappingsApi* | [**GetMapping**](docs/UserMappingsApi.md#getmapping) | **Get** /api/2/mappings/{mapping_id} | Get Mapping | +| *UserMappingsApi* | [**ListMappingActionValues**](docs/UserMappingsApi.md#listmappingactionvalues) | **Get** /api/2/mappings/actions/{mapping_action_value}/values | List Actions Values | +| *UserMappingsApi* | [**ListMappingConditions**](docs/UserMappingsApi.md#listmappingconditions) | **Get** /api/2/mappings/conditions | List Conditions | +| *UserMappingsApi* | [**ListMappingConditionsOperators**](docs/UserMappingsApi.md#listmappingconditionsoperators) | **Get** /api/2/mappings/conditions/{mapping_condition_value}/operators | List Conditions Operators | +| *UserMappingsApi* | [**ListMappingContionValues**](docs/UserMappingsApi.md#listmappingcontionvalues) | **Get** /api/2/mappings/conditions/{mapping_condition_value}/values | List Conditions Values | +| *UserMappingsApi* | [**ListMappings**](docs/UserMappingsApi.md#listmappings) | **Get** /api/2/mappings | List Mappings | +| *UserMappingsApi* | [**ListMappingsActions**](docs/UserMappingsApi.md#listmappingsactions) | **Get** /api/2/mappings/actions | List Actions | +| *UserMappingsApi* | [**SortMappings**](docs/UserMappingsApi.md#sortmappings) | **Put** /api/2/mappings/sort | Bulk Sort | +| *UserMappingsApi* | [**UpdateMapping**](docs/UserMappingsApi.md#updatemapping) | **Put** /api/2/mappings/{mapping_id} | Update Mapping | +| *UsersV1Api* | [**AddRolesToUser**](docs/UsersV1Api.md#addrolestouser) | **Put** /api/1/users/{user_id}/add_roles | Add Roles for a User | +| *UsersV1Api* | [**CreateUser**](docs/UsersV1Api.md#createuser) | **Post** /api/1/users | Create a User | +| *UsersV1Api* | [**DeleteUser**](docs/UsersV1Api.md#deleteuser) | **Delete** /api/1/users/{user_id} | Delete a User | +| *UsersV1Api* | [**GetCustomAttributes**](docs/UsersV1Api.md#getcustomattributes) | **Get** /api/1/users/custom_attributes | Get Custom Attributes | +| *UsersV1Api* | [**GetUserApps**](docs/UsersV1Api.md#getuserapps) | **Get** /api/1/users/{user_id}/apps | Get Apps for a User | +| *UsersV1Api* | [**GetUserById**](docs/UsersV1Api.md#getuserbyid) | **Get** /api/1/users/{user_id} | Get User by ID | +| *UsersV1Api* | [**GetUserRoles**](docs/UsersV1Api.md#getuserroles) | **Get** /api/1/users/{user_id}/roles | Get Roles for a User | +| *UsersV1Api* | [**ListUsers**](docs/UsersV1Api.md#listusers) | **Get** /api/1/users | List Users | +| *UsersV1Api* | [**LockAccountUser**](docs/UsersV1Api.md#lockaccountuser) | **Put** /api/1/users/{user_id}/lock_user | Lock User Account | +| *UsersV1Api* | [**LogOutUser**](docs/UsersV1Api.md#logoutuser) | **Put** /api/1/users/{user_id}/logout | Log User Out | +| *UsersV1Api* | [**RemoveUserRole**](docs/UsersV1Api.md#removeuserrole) | **Put** /api/1/users/{user_id}/remove_roles | Remove Roles for a User | +| *UsersV1Api* | [**SetUserState**](docs/UsersV1Api.md#setuserstate) | **Put** /api/1/users/{user_id}/set_state | Set User State | +| *UsersV1Api* | [**UpdatePasswordInsecure**](docs/UsersV1Api.md#updatepasswordinsecure) | **Put** /api/1/users/set_password_clear_text/{user_id} | Set Password Using ID in Cleartext | +| *UsersV1Api* | [**UpdatePasswordSecure**](docs/UsersV1Api.md#updatepasswordsecure) | **Put** /api/1/users/set_password_using_salt/{user_id} | Set Password Using ID and SHA-256 and Salt | +| *UsersV1Api* | [**UpdateUser**](docs/UsersV1Api.md#updateuser) | **Put** /api/1/users/{user_id} | Update a User | +| *UsersV2Api* | [**CreateUser2**](docs/UsersV2Api.md#createuser2) | **Post** /api/2/users | Create User | +| *UsersV2Api* | [**DeleteUser2**](docs/UsersV2Api.md#deleteuser2) | **Delete** /api/2/users/{user_id} | Delete User | +| *UsersV2Api* | [**GetUser2**](docs/UsersV2Api.md#getuser2) | **Get** /api/2/users/{user_id} | Get User | +| *UsersV2Api* | [**GetUserApps2**](docs/UsersV2Api.md#getuserapps2) | **Get** /api/2/users/{user_id}/apps | Get User Apps | +| *UsersV2Api* | [**ListUsers2**](docs/UsersV2Api.md#listusers2) | **Get** /api/2/users | List Users | +| *UsersV2Api* | [**UpdateUser2**](docs/UsersV2Api.md#updateuser2) | **Put** /api/2/users/{user_id} | Update User | +| *VigilanceAIApi* | [**CreateRiskRule**](docs/VigilanceAIApi.md#createriskrule) | **Post** /api/2/risk/rules | Create Rule | +| *VigilanceAIApi* | [**DeleteRiskRule**](docs/VigilanceAIApi.md#deleteriskrule) | **Delete** /api/2/risk/rules/{rule_id} | Delete Rule | +| *VigilanceAIApi* | [**GetRiskRule**](docs/VigilanceAIApi.md#getriskrule) | **Get** /api/2/risk/rules/{rule_id} | get Risk Rule | +| *VigilanceAIApi* | [**GetRiskScore**](docs/VigilanceAIApi.md#getriskscore) | **Post** /api/2/risk/verify | Get a Risk Score | +| *VigilanceAIApi* | [**GetRiskScores**](docs/VigilanceAIApi.md#getriskscores) | **Get** /api/2/risk/scores | Get Score Summary | +| *VigilanceAIApi* | [**ListRiskRules**](docs/VigilanceAIApi.md#listriskrules) | **Get** /api/2/risk/rules | List Rules | +| *VigilanceAIApi* | [**TrackRiskEvent**](docs/VigilanceAIApi.md#trackriskevent) | **Post** /api/2/risk/events | Track an Event | +| *VigilanceAIApi* | [**UpdateRiskRule**](docs/VigilanceAIApi.md#updateriskrule) | **Put** /api/2/risk/rules/{rule_id} | Update Rule | ## Documentation For Models - - [Action](docs/Action.md) - - [ActivateFactorRequest](docs/ActivateFactorRequest.md) - - [AddAccessTokenClaimRequest](docs/AddAccessTokenClaimRequest.md) + - [ActionObj](docs/ActionObj.md) + - [ActivateMfaFactorsRequest](docs/ActivateMfaFactorsRequest.md) + - [AddClientApp201Response](docs/AddClientApp201Response.md) - [AddClientAppRequest](docs/AddClientAppRequest.md) - - [AddRoleUsers200ResponseInner](docs/AddRoleUsers200ResponseInner.md) - - [AddScopeRequest](docs/AddScopeRequest.md) + - [AddPrivilegeToRole201Response](docs/AddPrivilegeToRole201Response.md) + - [AddPrivilegeToRoleRequest](docs/AddPrivilegeToRoleRequest.md) + - [AddRolesToUserRequest](docs/AddRolesToUserRequest.md) + - [AltErr](docs/AltErr.md) + - [AppParameters](docs/AppParameters.md) + - [AppRule](docs/AppRule.md) + - [AssignUsersToPrivilegeRequest](docs/AssignUsersToPrivilegeRequest.md) + - [AuthClaim](docs/AuthClaim.md) + - [AuthId](docs/AuthId.md) - [AuthMethod](docs/AuthMethod.md) + - [AuthScope](docs/AuthScope.md) + - [AuthServer](docs/AuthServer.md) - [AuthServerConfiguration](docs/AuthServerConfiguration.md) - - [ClientApp](docs/ClientApp.md) + - [Brand](docs/Brand.md) + - [BrandApp](docs/BrandApp.md) + - [BrandBackground](docs/BrandBackground.md) + - [BrandBackgroundUrls](docs/BrandBackgroundUrls.md) + - [BrandLogo](docs/BrandLogo.md) + - [BrandLogoUrls](docs/BrandLogoUrls.md) + - [BrandReq](docs/BrandReq.md) + - [ClientAppFull](docs/ClientAppFull.md) + - [ClockCounter](docs/ClockCounter.md) - [Condition](docs/Condition.md) + - [ConfigurationOidc](docs/ConfigurationOidc.md) + - [ConfigurationSaml](docs/ConfigurationSaml.md) - [Connector](docs/Connector.md) - - [CreateAuthorizationServerRequest](docs/CreateAuthorizationServerRequest.md) - - [CreateEnvironmentVariableRequest](docs/CreateEnvironmentVariableRequest.md) - - [CreateRoles201ResponseInner](docs/CreateRoles201ResponseInner.md) + - [CreateApp200Response](docs/CreateApp200Response.md) + - [CreateAppRequest](docs/CreateAppRequest.md) + - [CreateDeviceVerification201Response](docs/CreateDeviceVerification201Response.md) + - [CreateDeviceVerificationRequest](docs/CreateDeviceVerificationRequest.md) + - [CreateFactorRegistration201Response](docs/CreateFactorRegistration201Response.md) + - [CreateFactorRegistrationRequest](docs/CreateFactorRegistrationRequest.md) + - [CreatePrivilege200Response](docs/CreatePrivilege200Response.md) + - [CreateRole201ResponseInner](docs/CreateRole201ResponseInner.md) - [Device](docs/Device.md) - - [EnrollFactorRequest](docs/EnrollFactorRequest.md) - - [Envvar](docs/Envvar.md) - - [ErrorStatus](docs/ErrorStatus.md) - - [ErrorStatusErrorsInner](docs/ErrorStatusErrorsInner.md) - - [FactorInner](docs/FactorInner.md) - - [FactorInnerFactorData](docs/FactorInnerFactorData.md) - - [GenerateMfaToken200Response](docs/GenerateMfaToken200Response.md) - - [GenerateMfaToken422Response](docs/GenerateMfaToken422Response.md) - - [GenerateMfaToken422ResponseDetails](docs/GenerateMfaToken422ResponseDetails.md) - - [GenerateMfaTokenRequest](docs/GenerateMfaTokenRequest.md) - - [GenerateSamlAssertionRequest](docs/GenerateSamlAssertionRequest.md) - - [GenerateToken200Response](docs/GenerateToken200Response.md) - - [GenerateToken400Response](docs/GenerateToken400Response.md) + - [EmailConfig](docs/EmailConfig.md) + - [EnforcementPoint](docs/EnforcementPoint.md) + - [EnforcementPointResourcesInner](docs/EnforcementPointResourcesInner.md) + - [EnrollMfaFactor200Response](docs/EnrollMfaFactor200Response.md) + - [Error](docs/Error.md) + - [Event](docs/Event.md) + - [GenerateMFAtoken200Response](docs/GenerateMFAtoken200Response.md) + - [GenerateMFAtokenRequest](docs/GenerateMFAtokenRequest.md) + - [GenerateOTP201Response](docs/GenerateOTP201Response.md) + - [GenerateOTPRequest](docs/GenerateOTPRequest.md) + - [GenerateSamlAssert200Response](docs/GenerateSamlAssert200Response.md) - [GenerateTokenRequest](docs/GenerateTokenRequest.md) - - [GetAuthorizationServer200Response](docs/GetAuthorizationServer200Response.md) - - [GetAvailableFactors200ResponseInner](docs/GetAvailableFactors200ResponseInner.md) - - [GetClientApps200ResponseInner](docs/GetClientApps200ResponseInner.md) - - [GetClientApps200ResponseInnerScopesInner](docs/GetClientApps200ResponseInnerScopesInner.md) + - [GenericApp](docs/GenericApp.md) + - [GenericAppProvisioning](docs/GenericAppProvisioning.md) + - [GetAssignedUser200Response](docs/GetAssignedUser200Response.md) + - [GetAuthFactors200Response](docs/GetAuthFactors200Response.md) + - [GetAuthenticationDevices200ResponseInner](docs/GetAuthenticationDevices200ResponseInner.md) + - [GetCustomAttributes200Response](docs/GetCustomAttributes200Response.md) + - [GetEmailSettings200Response](docs/GetEmailSettings200Response.md) + - [GetEmailSettings200ResponseOneOf](docs/GetEmailSettings200ResponseOneOf.md) + - [GetEnrolledFactors200Response](docs/GetEnrolledFactors200Response.md) + - [GetEnrolledFactors200ResponseData](docs/GetEnrolledFactors200ResponseData.md) + - [GetEnrolledFactors200ResponseDataOtpDevicesInner](docs/GetEnrolledFactors200ResponseDataOtpDevicesInner.md) + - [GetEventById200Response](docs/GetEventById200Response.md) + - [GetEventTypes200Response](docs/GetEventTypes200Response.md) + - [GetEventTypes200ResponseDataInner](docs/GetEventTypes200ResponseDataInner.md) + - [GetEvents200Response](docs/GetEvents200Response.md) + - [GetEvents200ResponsePagination](docs/GetEvents200ResponsePagination.md) + - [GetGroups200Response](docs/GetGroups200Response.md) + - [GetInviteLink200Response](docs/GetInviteLink200Response.md) + - [GetInviteLinkRequest](docs/GetInviteLinkRequest.md) + - [GetMFAFactors200Response](docs/GetMFAFactors200Response.md) + - [GetMFAFactors200ResponseData](docs/GetMFAFactors200ResponseData.md) + - [GetMFAFactors200ResponseDataAuthFactorsInner](docs/GetMFAFactors200ResponseDataAuthFactorsInner.md) - [GetRateLimit200Response](docs/GetRateLimit200Response.md) - - [GetRateLimit200ResponseData](docs/GetRateLimit200ResponseData.md) - [GetRiskScore200Response](docs/GetRiskScore200Response.md) - - [GetRiskScore400Response](docs/GetRiskScore400Response.md) - [GetRiskScoreRequest](docs/GetRiskScoreRequest.md) - - [GetScoreInsights200Response](docs/GetScoreInsights200Response.md) - - [GetScoreInsights200ResponseScores](docs/GetScoreInsights200ResponseScores.md) + - [GetRiskScores200Response](docs/GetRiskScores200Response.md) + - [GetRiskScores200ResponseScores](docs/GetRiskScores200ResponseScores.md) + - [GetRoleApps200ResponseInner](docs/GetRoleApps200ResponseInner.md) + - [GetRoleById200Response](docs/GetRoleById200Response.md) + - [GetRoleById200ResponseDataInner](docs/GetRoleById200ResponseDataInner.md) + - [GetRoleByName200Response](docs/GetRoleByName200Response.md) + - [GetRoleByName200ResponseDataInner](docs/GetRoleByName200ResponseDataInner.md) + - [GetRoleByName200ResponsePagination](docs/GetRoleByName200ResponsePagination.md) - [GetUserApps200ResponseInner](docs/GetUserApps200ResponseInner.md) + - [GetUserRoles200Response](docs/GetUserRoles200Response.md) + - [GetUserVerification200Response](docs/GetUserVerification200Response.md) + - [Group](docs/Group.md) - [Hook](docs/Hook.md) - - [HookConditionsInner](docs/HookConditionsInner.md) + - [HookEnvvar](docs/HookEnvvar.md) + - [HookLog](docs/HookLog.md) - [HookOptions](docs/HookOptions.md) - [HookStatus](docs/HookStatus.md) - - [Id](docs/Id.md) - - [ListAccessTokenClaims200ResponseInner](docs/ListAccessTokenClaims200ResponseInner.md) - - [ListActions200ResponseInner](docs/ListActions200ResponseInner.md) - - [ListAppUsers200ResponseInner](docs/ListAppUsers200ResponseInner.md) - - [ListAuthorizationServers200ResponseInner](docs/ListAuthorizationServers200ResponseInner.md) - - [ListAuthorizationServers200ResponseInnerConfiguration](docs/ListAuthorizationServers200ResponseInnerConfiguration.md) - - [ListConditionOperators200ResponseInner](docs/ListConditionOperators200ResponseInner.md) - - [ListConditionValues200ResponseInner](docs/ListConditionValues200ResponseInner.md) - [ListConditions200ResponseInner](docs/ListConditions200ResponseInner.md) - - [ListMappingConditionOperators200ResponseInner](docs/ListMappingConditionOperators200ResponseInner.md) - - [ListMappingConditions200ResponseInner](docs/ListMappingConditions200ResponseInner.md) - - [ListScopes200ResponseInner](docs/ListScopes200ResponseInner.md) - - [Log](docs/Log.md) + - [ListMappingActionValues200ResponseInner](docs/ListMappingActionValues200ResponseInner.md) + - [ListMappingConditions200Response](docs/ListMappingConditions200Response.md) + - [ListMappingConditionsOperators200ResponseInner](docs/ListMappingConditionsOperators200ResponseInner.md) + - [ListMappingContionValues200ResponseInner](docs/ListMappingContionValues200ResponseInner.md) + - [ListMappingsActions200ResponseInner](docs/ListMappingsActions200ResponseInner.md) + - [ListMessageTemplates200ResponseInner](docs/ListMessageTemplates200ResponseInner.md) + - [ListPrivelegeRoles200Response](docs/ListPrivelegeRoles200Response.md) + - [Locale](docs/Locale.md) + - [LockAccountUserRequest](docs/LockAccountUserRequest.md) - [Mapping](docs/Mapping.md) - - [Registration](docs/Registration.md) + - [MessageTemplate](docs/MessageTemplate.md) + - [MessageTemplateTemplate](docs/MessageTemplateTemplate.md) + - [MessageTemplateTemplateOneOf](docs/MessageTemplateTemplateOneOf.md) + - [MessageTemplateTemplateOneOf1](docs/MessageTemplateTemplateOneOf1.md) + - [OauthToken](docs/OauthToken.md) + - [OidcApp](docs/OidcApp.md) + - [OidcAppAllOf](docs/OidcAppAllOf.md) + - [OtpDevice](docs/OtpDevice.md) + - [Privilege](docs/Privilege.md) + - [PrivilegePrivilege](docs/PrivilegePrivilege.md) + - [PrivilegePrivilegeStatementInner](docs/PrivilegePrivilegeStatementInner.md) + - [RateLimit](docs/RateLimit.md) - [RemoveRoleUsersRequest](docs/RemoveRoleUsersRequest.md) - - [RevokeTokenRequest](docs/RevokeTokenRequest.md) + - [RemoveUserRoleRequest](docs/RemoveUserRoleRequest.md) + - [RemoveUserRoleRequestRoleIdArrayInner](docs/RemoveUserRoleRequestRoleIdArrayInner.md) + - [RequestBrand](docs/RequestBrand.md) + - [RevokeTokensRequest](docs/RevokeTokensRequest.md) - [RiskDevice](docs/RiskDevice.md) - [RiskRule](docs/RiskRule.md) - [RiskUser](docs/RiskUser.md) - [Role](docs/Role.md) - - [Rule](docs/Rule.md) - - [RuleId](docs/RuleId.md) - - [Schema](docs/Schema.md) - - [Schema1](docs/Schema1.md) - - [Schema1AddedBy](docs/Schema1AddedBy.md) - - [SchemaProvisioning](docs/SchemaProvisioning.md) + - [RuleAction](docs/RuleAction.md) + - [RuleCondition](docs/RuleCondition.md) + - [SamlApp](docs/SamlApp.md) + - [SamlAppAllOf](docs/SamlAppAllOf.md) + - [SamlAppAllOfParameters](docs/SamlAppAllOfParameters.md) + - [SamlAppAllOfParametersSamlUsername](docs/SamlAppAllOfParametersSamlUsername.md) + - [SamlAssert](docs/SamlAssert.md) + - [SamlFactor](docs/SamlFactor.md) + - [Scope](docs/Scope.md) + - [SendInviteLink200Response](docs/SendInviteLink200Response.md) + - [SendInviteLinkRequest](docs/SendInviteLinkRequest.md) - [Session](docs/Session.md) - - [SetRoleApps200ResponseInner](docs/SetRoleApps200ResponseInner.md) + - [SetUserStateRequest](docs/SetUserStateRequest.md) - [Source](docs/Source.md) - - [Status](docs/Status.md) - - [Status1](docs/Status1.md) - - [Status2](docs/Status2.md) - - [Status2Status](docs/Status2Status.md) - - [TrackEventRequest](docs/TrackEventRequest.md) - - [UpdateAuthorizationServer400Response](docs/UpdateAuthorizationServer400Response.md) + - [SsoOidc](docs/SsoOidc.md) + - [SsoSaml](docs/SsoSaml.md) + - [SsoSamlCertificate](docs/SsoSamlCertificate.md) + - [TokenClaim](docs/TokenClaim.md) + - [TrackRiskEventRequest](docs/TrackRiskEventRequest.md) - [UpdateClientAppRequest](docs/UpdateClientAppRequest.md) - [UpdateEnvironmentVariableRequest](docs/UpdateEnvironmentVariableRequest.md) + - [UpdatePasswordInsecureRequest](docs/UpdatePasswordInsecureRequest.md) + - [UpdatePasswordSecureRequest](docs/UpdatePasswordSecureRequest.md) + - [UpdatePrivilege200Response](docs/UpdatePrivilege200Response.md) + - [UpdateRiskRuleRequest](docs/UpdateRiskRuleRequest.md) - [UpdateRole200Response](docs/UpdateRole200Response.md) - [User](docs/User.md) - - [VerifyEnrollmentRequest](docs/VerifyEnrollmentRequest.md) - - [VerifyFactorRequest](docs/VerifyFactorRequest.md) - - [VerifyFactorSaml200Response](docs/VerifyFactorSaml200Response.md) - - [VerifyFactorSamlRequest](docs/VerifyFactorSamlRequest.md) - - [VerifyFactorVoice200ResponseInner](docs/VerifyFactorVoice200ResponseInner.md) + - [VerFactorSaml200Response](docs/VerFactorSaml200Response.md) + - [Verb](docs/Verb.md) + - [VerifyMfaFactorRequest](docs/VerifyMfaFactorRequest.md) + - [VerifyUserRegistration200Response](docs/VerifyUserRegistration200Response.md) + - [VerifyUserRegistrationRequest](docs/VerifyUserRegistrationRequest.md) + - [VerifyUserVerificationRequest](docs/VerifyUserVerificationRequest.md) ## Documentation For Authorization - Endpoints do not require authorization. + + +### OAuth2 + + +- **Type**: OAuth +- **Flow**: application +- **Authorization URL**: +- **Scopes**: + - **Authentication Only**: Gives the credential pair the ability to generate an access token that can perform POST calls only to authentication endpoints, providing least privileged access to authentication code. These endpoints include: - Verify Factor (SAML Assertion) - Generate SAML Assertion - Verify Factor (Login) - Create Session Login Token - Log User Out + - **Read Users**: Gives the credential pair the ability to generate an access token that can perform GET calls available for the User, Role, and Group API resources. + - **Manage users**: Gives the credential pair the ability to generate an access token that can perform GET, POST, PUT, and DELETE calls available for the User, Role, and Group API resources, with the exception of setting passwords and assigning and removing roles + - **Manage All**: Gives the credential pair the ability to generate an access token that can perform GET, POST, PUT, and DELETE calls for all available API resources, including the ability to set passwords and assign and remove roles. + - **Read All**: Gives the credential pair the ability to generate an access token that can perform GET calls available for all API resources. + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextAccessToken, "ACCESSTOKENSTRING") +r, err := client.Service.Operation(auth, args) +``` + +Or via OAuth2 module to automatically refresh tokens and perform user authentication. + +```golang +import "golang.org/x/oauth2" + +/* Perform OAuth2 round trip request and obtain a token */ + +tokenSource := oauth2cfg.TokenSource(createContext(httpClient), &token) +auth := context.WithValue(oauth2.NoContext, sw.ContextOAuth2, tokenSource) +r, err := client.Service.Operation(auth, args) +``` + + +### basicAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` ## Documentation for Utility Methods diff --git a/response.go b/response.go index fca0f5c..41383c6 100644 --- a/response.go +++ b/response.go @@ -1,14 +1,14 @@ /* OneLogin API -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) +OpenAPI Specification for OneLogin -API version: 3.0.0-alpha.1 +API version: 3.1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package openapi +package onelogin import ( "net/http" diff --git a/test/api_api_auth_claims_test.go b/test/api_api_auth_claims_test.go new file mode 100644 index 0000000..894dad8 --- /dev/null +++ b/test/api_api_auth_claims_test.go @@ -0,0 +1,83 @@ +/* +OneLogin API + +Testing APIAuthClaimsApiService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package onelogin + +import ( + "context" + "testing" + + openapiclient "github.com/onelogin/onelogin-go-sdk" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func Test_onelogin_APIAuthClaimsApiService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test APIAuthClaimsApiService CreateAuthClaim", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var apiAuthId string + + resp, httpRes, err := apiClient.APIAuthClaimsApi.CreateAuthClaim(context.Background(), apiAuthId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test APIAuthClaimsApiService DeleteAuthClaim", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var apiAuthId string + var claimId int32 + + httpRes, err := apiClient.APIAuthClaimsApi.DeleteAuthClaim(context.Background(), apiAuthId, claimId).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test APIAuthClaimsApiService GetAuthclaims", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var apiAuthId string + + resp, httpRes, err := apiClient.APIAuthClaimsApi.GetAuthclaims(context.Background(), apiAuthId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test APIAuthClaimsApiService UpdateClaim", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var apiAuthId string + var claimId int32 + + resp, httpRes, err := apiClient.APIAuthClaimsApi.UpdateClaim(context.Background(), apiAuthId, claimId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/test/api_api_auth_client_apps_test.go b/test/api_api_auth_client_apps_test.go new file mode 100644 index 0000000..45029a8 --- /dev/null +++ b/test/api_api_auth_client_apps_test.go @@ -0,0 +1,84 @@ +/* +OneLogin API + +Testing APIAuthClientAppsApiService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package onelogin + +import ( + "context" + "testing" + + openapiclient "github.com/onelogin/onelogin-go-sdk" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func Test_onelogin_APIAuthClientAppsApiService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test APIAuthClientAppsApiService AddClientApp", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var apiAuthId string + + resp, httpRes, err := apiClient.APIAuthClientAppsApi.AddClientApp(context.Background(), apiAuthId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test APIAuthClientAppsApiService DeleteClientApp", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var apiAuthId string + var clientAppId int32 + + resp, httpRes, err := apiClient.APIAuthClientAppsApi.DeleteClientApp(context.Background(), apiAuthId, clientAppId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test APIAuthClientAppsApiService ListClientApps", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var apiAuthId string + + resp, httpRes, err := apiClient.APIAuthClientAppsApi.ListClientApps(context.Background(), apiAuthId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test APIAuthClientAppsApiService UpdateClientApp", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var apiAuthId string + var clientAppId int32 + + resp, httpRes, err := apiClient.APIAuthClientAppsApi.UpdateClientApp(context.Background(), apiAuthId, clientAppId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/test/api_api_auth_scopes_test.go b/test/api_api_auth_scopes_test.go new file mode 100644 index 0000000..44c3bbe --- /dev/null +++ b/test/api_api_auth_scopes_test.go @@ -0,0 +1,83 @@ +/* +OneLogin API + +Testing APIAuthScopesApiService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package onelogin + +import ( + "context" + "testing" + + openapiclient "github.com/onelogin/onelogin-go-sdk" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func Test_onelogin_APIAuthScopesApiService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test APIAuthScopesApiService CreateScope", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var apiAuthId string + + resp, httpRes, err := apiClient.APIAuthScopesApi.CreateScope(context.Background(), apiAuthId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test APIAuthScopesApiService DeleteScope", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var apiAuthId string + var scopeId int32 + + httpRes, err := apiClient.APIAuthScopesApi.DeleteScope(context.Background(), apiAuthId, scopeId).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test APIAuthScopesApiService GetScopes", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var apiAuthId string + + resp, httpRes, err := apiClient.APIAuthScopesApi.GetScopes(context.Background(), apiAuthId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test APIAuthScopesApiService UpdateScope", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var apiAuthId string + var scopeId int32 + + resp, httpRes, err := apiClient.APIAuthScopesApi.UpdateScope(context.Background(), apiAuthId, scopeId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/test/api_api_authorization_server_test.go b/test/api_api_authorization_server_test.go new file mode 100644 index 0000000..d710b6b --- /dev/null +++ b/test/api_api_authorization_server_test.go @@ -0,0 +1,91 @@ +/* +OneLogin API + +Testing APIAuthorizationServerApiService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package onelogin + +import ( + "context" + "testing" + + openapiclient "github.com/onelogin/onelogin-go-sdk" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func Test_onelogin_APIAuthorizationServerApiService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test APIAuthorizationServerApiService CreateAuthServer", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.APIAuthorizationServerApi.CreateAuthServer(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test APIAuthorizationServerApiService DeleteAuthServer", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var apiAuthId string + + httpRes, err := apiClient.APIAuthorizationServerApi.DeleteAuthServer(context.Background(), apiAuthId).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test APIAuthorizationServerApiService GetAuthServer", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var apiAuthId string + + resp, httpRes, err := apiClient.APIAuthorizationServerApi.GetAuthServer(context.Background(), apiAuthId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test APIAuthorizationServerApiService ListAuthServers", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.APIAuthorizationServerApi.ListAuthServers(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test APIAuthorizationServerApiService UpdateAuthServer", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var apiAuthId string + + resp, httpRes, err := apiClient.APIAuthorizationServerApi.UpdateAuthServer(context.Background(), apiAuthId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/test/api_app_rules_test.go b/test/api_app_rules_test.go new file mode 100644 index 0000000..b9469db --- /dev/null +++ b/test/api_app_rules_test.go @@ -0,0 +1,185 @@ +/* +OneLogin API + +Testing AppRulesApiService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package onelogin + +import ( + "context" + "testing" + + openapiclient "github.com/onelogin/onelogin-go-sdk" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func Test_onelogin_AppRulesApiService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test AppRulesApiService CreateAppRule", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var appId int32 + + resp, httpRes, err := apiClient.AppRulesApi.CreateAppRule(context.Background(), appId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AppRulesApiService DeleteRule", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var appId int32 + var ruleId string + + httpRes, err := apiClient.AppRulesApi.DeleteRule(context.Background(), appId, ruleId).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AppRulesApiService GetAppRule", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var appId int32 + var ruleId string + + resp, httpRes, err := apiClient.AppRulesApi.GetAppRule(context.Background(), appId, ruleId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AppRulesApiService ListActionValies", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var appId int32 + var ruleActionValue string + + resp, httpRes, err := apiClient.AppRulesApi.ListActionValies(context.Background(), appId, ruleActionValue).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AppRulesApiService ListActions", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var appId int32 + + resp, httpRes, err := apiClient.AppRulesApi.ListActions(context.Background(), appId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AppRulesApiService ListAppRules", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var appId int32 + + resp, httpRes, err := apiClient.AppRulesApi.ListAppRules(context.Background(), appId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AppRulesApiService ListConditionOperators", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var appId int32 + var ruleConditionValue string + + resp, httpRes, err := apiClient.AppRulesApi.ListConditionOperators(context.Background(), appId, ruleConditionValue).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AppRulesApiService ListConditionValues", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var appId int32 + var ruleConditionValue string + + resp, httpRes, err := apiClient.AppRulesApi.ListConditionValues(context.Background(), appId, ruleConditionValue).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AppRulesApiService ListConditions", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var appId int32 + + resp, httpRes, err := apiClient.AppRulesApi.ListConditions(context.Background(), appId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AppRulesApiService SortAppRules", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var appId int32 + + resp, httpRes, err := apiClient.AppRulesApi.SortAppRules(context.Background(), appId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AppRulesApiService UpdateAppRule", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var appId int32 + var ruleId string + + resp, httpRes, err := apiClient.AppRulesApi.UpdateAppRule(context.Background(), appId, ruleId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/test/api_apps_test.go b/test/api_apps_test.go new file mode 100644 index 0000000..ec3c492 --- /dev/null +++ b/test/api_apps_test.go @@ -0,0 +1,131 @@ +/* +OneLogin API + +Testing AppsApiService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package onelogin + +import ( + "context" + "testing" + + openapiclient "github.com/onelogin/onelogin-go-sdk" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func Test_onelogin_AppsApiService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test AppsApiService CreateApp", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.AppsApi.CreateApp(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AppsApiService DeleteApp", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var appId int32 + + httpRes, err := apiClient.AppsApi.DeleteApp(context.Background(), appId).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AppsApiService DeleteAppParameter", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var appId int32 + var parameterId string + + httpRes, err := apiClient.AppsApi.DeleteAppParameter(context.Background(), appId, parameterId).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AppsApiService GetApp", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var appId int32 + + resp, httpRes, err := apiClient.AppsApi.GetApp(context.Background(), appId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AppsApiService GetAppUsers", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var appId int32 + + resp, httpRes, err := apiClient.AppsApi.GetAppUsers(context.Background(), appId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AppsApiService ListApps", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.AppsApi.ListApps(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AppsApiService ListConnectors", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.AppsApi.ListConnectors(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AppsApiService UpdateApp", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var appId int32 + + resp, httpRes, err := apiClient.AppsApi.UpdateApp(context.Background(), appId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/test/api_branding_service_smtp_test.go b/test/api_branding_service_smtp_test.go new file mode 100644 index 0000000..eb7eab7 --- /dev/null +++ b/test/api_branding_service_smtp_test.go @@ -0,0 +1,62 @@ +/* +OneLogin API + +Testing BrandingServiceSMTPApiService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package onelogin + +import ( + "context" + "testing" + + openapiclient "github.com/onelogin/onelogin-go-sdk" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func Test_onelogin_BrandingServiceSMTPApiService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test BrandingServiceSMTPApiService DeleteEmailSettings", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.BrandingServiceSMTPApi.DeleteEmailSettings(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test BrandingServiceSMTPApiService GetEmailSettings", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.BrandingServiceSMTPApi.GetEmailSettings(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test BrandingServiceSMTPApiService UpdateEmailSettings", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.BrandingServiceSMTPApi.UpdateEmailSettings(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/test/api_branding_service_templates_test.go b/test/api_branding_service_templates_test.go new file mode 100644 index 0000000..5bdcded --- /dev/null +++ b/test/api_branding_service_templates_test.go @@ -0,0 +1,144 @@ +/* +OneLogin API + +Testing BrandingServiceTemplatesApiService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package onelogin + +import ( + "context" + "testing" + + openapiclient "github.com/onelogin/onelogin-go-sdk" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func Test_onelogin_BrandingServiceTemplatesApiService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test BrandingServiceTemplatesApiService CreateMessageTemplate", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var brandId int32 + + resp, httpRes, err := apiClient.BrandingServiceTemplatesApi.CreateMessageTemplate(context.Background(), brandId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test BrandingServiceTemplatesApiService DeleteMessageTemplate", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var brandId int32 + var templateId int32 + + httpRes, err := apiClient.BrandingServiceTemplatesApi.DeleteMessageTemplate(context.Background(), brandId, templateId).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test BrandingServiceTemplatesApiService GetMasterByType", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var templateType string + + resp, httpRes, err := apiClient.BrandingServiceTemplatesApi.GetMasterByType(context.Background(), templateType).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test BrandingServiceTemplatesApiService GetMessageTemplateById", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var brandId int32 + var templateId int32 + + resp, httpRes, err := apiClient.BrandingServiceTemplatesApi.GetMessageTemplateById(context.Background(), brandId, templateId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test BrandingServiceTemplatesApiService GetTemplateByLocale", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var brandId int32 + var templateType string + var locale string + + resp, httpRes, err := apiClient.BrandingServiceTemplatesApi.GetTemplateByLocale(context.Background(), brandId, templateType, locale).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test BrandingServiceTemplatesApiService ListMessageTemplates", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var brandId int32 + + resp, httpRes, err := apiClient.BrandingServiceTemplatesApi.ListMessageTemplates(context.Background(), brandId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test BrandingServiceTemplatesApiService UpdateMessageTemplateById", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var brandId int32 + var templateId int32 + + resp, httpRes, err := apiClient.BrandingServiceTemplatesApi.UpdateMessageTemplateById(context.Background(), brandId, templateId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test BrandingServiceTemplatesApiService UpdateTemplateByLocale", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var brandId int32 + var templateType string + var locale string + + resp, httpRes, err := apiClient.BrandingServiceTemplatesApi.UpdateTemplateByLocale(context.Background(), brandId, templateType, locale).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/test/api_branding_service_test.go b/test/api_branding_service_test.go new file mode 100644 index 0000000..b0a6e10 --- /dev/null +++ b/test/api_branding_service_test.go @@ -0,0 +1,105 @@ +/* +OneLogin API + +Testing BrandingServiceApiService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package onelogin + +import ( + "context" + "testing" + + openapiclient "github.com/onelogin/onelogin-go-sdk" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func Test_onelogin_BrandingServiceApiService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test BrandingServiceApiService CreateBrand", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.BrandingServiceApi.CreateBrand(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test BrandingServiceApiService DeleteBrand", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var brandId int32 + + httpRes, err := apiClient.BrandingServiceApi.DeleteBrand(context.Background(), brandId).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test BrandingServiceApiService GetBrand", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var brandId int32 + + resp, httpRes, err := apiClient.BrandingServiceApi.GetBrand(context.Background(), brandId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test BrandingServiceApiService GetBrandApps", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var brandId int32 + + resp, httpRes, err := apiClient.BrandingServiceApi.GetBrandApps(context.Background(), brandId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test BrandingServiceApiService ListBrands", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.BrandingServiceApi.ListBrands(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test BrandingServiceApiService UpdateBrand", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var brandId int32 + + resp, httpRes, err := apiClient.BrandingServiceApi.UpdateBrand(context.Background(), brandId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/test/api_events_test.go b/test/api_events_test.go new file mode 100644 index 0000000..435845a --- /dev/null +++ b/test/api_events_test.go @@ -0,0 +1,64 @@ +/* +OneLogin API + +Testing EventsApiService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package onelogin + +import ( + "context" + "testing" + + openapiclient "github.com/onelogin/onelogin-go-sdk" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func Test_onelogin_EventsApiService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test EventsApiService GetEventById", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var eventId int32 + + resp, httpRes, err := apiClient.EventsApi.GetEventById(context.Background(), eventId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test EventsApiService GetEventTypes", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.EventsApi.GetEventTypes(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test EventsApiService GetEvents", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.EventsApi.GetEvents(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/test/api_groups_test.go b/test/api_groups_test.go new file mode 100644 index 0000000..353edcc --- /dev/null +++ b/test/api_groups_test.go @@ -0,0 +1,52 @@ +/* +OneLogin API + +Testing GroupsApiService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package onelogin + +import ( + "context" + "testing" + + openapiclient "github.com/onelogin/onelogin-go-sdk" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func Test_onelogin_GroupsApiService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test GroupsApiService GetGroupById", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var groupId string + + resp, httpRes, err := apiClient.GroupsApi.GetGroupById(context.Background(), groupId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test GroupsApiService GetGroups", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.GroupsApi.GetGroups(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/test/api_invite_links_test.go b/test/api_invite_links_test.go new file mode 100644 index 0000000..3db1719 --- /dev/null +++ b/test/api_invite_links_test.go @@ -0,0 +1,50 @@ +/* +OneLogin API + +Testing InviteLinksApiService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package onelogin + +import ( + "context" + "testing" + + openapiclient "github.com/onelogin/onelogin-go-sdk" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func Test_onelogin_InviteLinksApiService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test InviteLinksApiService GetInviteLink", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.InviteLinksApi.GetInviteLink(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test InviteLinksApiService SendInviteLink", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.InviteLinksApi.SendInviteLink(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/test/api_multi_factor_authentication_test.go b/test/api_multi_factor_authentication_test.go new file mode 100644 index 0000000..55c0bf8 --- /dev/null +++ b/test/api_multi_factor_authentication_test.go @@ -0,0 +1,170 @@ +/* +OneLogin API + +Testing MultiFactorAuthenticationApiService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package onelogin + +import ( + "context" + "testing" + + openapiclient "github.com/onelogin/onelogin-go-sdk" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func Test_onelogin_MultiFactorAuthenticationApiService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test MultiFactorAuthenticationApiService CreateDeviceVerification", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var userId int32 + + resp, httpRes, err := apiClient.MultiFactorAuthenticationApi.CreateDeviceVerification(context.Background(), userId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test MultiFactorAuthenticationApiService CreateFactorRegistration", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var userId int32 + + resp, httpRes, err := apiClient.MultiFactorAuthenticationApi.CreateFactorRegistration(context.Background(), userId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test MultiFactorAuthenticationApiService DeleteEnrolledFactor", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var userId int32 + var deviceId string + + httpRes, err := apiClient.MultiFactorAuthenticationApi.DeleteEnrolledFactor(context.Background(), userId, deviceId).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test MultiFactorAuthenticationApiService GenerateOTP", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var userId int32 + + resp, httpRes, err := apiClient.MultiFactorAuthenticationApi.GenerateOTP(context.Background(), userId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test MultiFactorAuthenticationApiService GetAuthFactors", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var userId int32 + + resp, httpRes, err := apiClient.MultiFactorAuthenticationApi.GetAuthFactors(context.Background(), userId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test MultiFactorAuthenticationApiService GetAuthenticationDevices", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var userId int32 + + resp, httpRes, err := apiClient.MultiFactorAuthenticationApi.GetAuthenticationDevices(context.Background(), userId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test MultiFactorAuthenticationApiService GetUserRegistration", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var userId int32 + var registrationId string + + resp, httpRes, err := apiClient.MultiFactorAuthenticationApi.GetUserRegistration(context.Background(), userId, registrationId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test MultiFactorAuthenticationApiService GetUserVerification", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var userId int32 + var verificationId string + + resp, httpRes, err := apiClient.MultiFactorAuthenticationApi.GetUserVerification(context.Background(), userId, verificationId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test MultiFactorAuthenticationApiService VerifyUserRegistration", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var userId int32 + var registrationId string + + resp, httpRes, err := apiClient.MultiFactorAuthenticationApi.VerifyUserRegistration(context.Background(), userId, registrationId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test MultiFactorAuthenticationApiService VerifyUserVerification", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var userId int32 + var verificationId string + + resp, httpRes, err := apiClient.MultiFactorAuthenticationApi.VerifyUserVerification(context.Background(), userId, verificationId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/test/api_multi_factor_authentication_v1_test.go b/test/api_multi_factor_authentication_v1_test.go new file mode 100644 index 0000000..7c38bd9 --- /dev/null +++ b/test/api_multi_factor_authentication_v1_test.go @@ -0,0 +1,126 @@ +/* +OneLogin API + +Testing MultiFactorAuthenticationV1ApiService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package onelogin + +import ( + "context" + "testing" + + openapiclient "github.com/onelogin/onelogin-go-sdk" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func Test_onelogin_MultiFactorAuthenticationV1ApiService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test MultiFactorAuthenticationV1ApiService ActivateMfaFactors", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var userId int32 + var deviceId string + + resp, httpRes, err := apiClient.MultiFactorAuthenticationV1Api.ActivateMfaFactors(context.Background(), userId, deviceId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test MultiFactorAuthenticationV1ApiService EnrollMfaFactor", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var userId int32 + + resp, httpRes, err := apiClient.MultiFactorAuthenticationV1Api.EnrollMfaFactor(context.Background(), userId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test MultiFactorAuthenticationV1ApiService GenerateMFAtoken", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var userId int32 + + resp, httpRes, err := apiClient.MultiFactorAuthenticationV1Api.GenerateMFAtoken(context.Background(), userId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test MultiFactorAuthenticationV1ApiService GetEnrolledFactors", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var userId int32 + + resp, httpRes, err := apiClient.MultiFactorAuthenticationV1Api.GetEnrolledFactors(context.Background(), userId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test MultiFactorAuthenticationV1ApiService GetMFAFactors", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var userId int32 + + resp, httpRes, err := apiClient.MultiFactorAuthenticationV1Api.GetMFAFactors(context.Background(), userId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test MultiFactorAuthenticationV1ApiService RemoveMfaFactors", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var userId int32 + var deviceId string + + httpRes, err := apiClient.MultiFactorAuthenticationV1Api.RemoveMfaFactors(context.Background(), userId, deviceId).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test MultiFactorAuthenticationV1ApiService VerifyMfaFactor", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var userId int32 + var deviceId string + + resp, httpRes, err := apiClient.MultiFactorAuthenticationV1Api.VerifyMfaFactor(context.Background(), userId, deviceId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/test/api_o_auth2_test.go b/test/api_o_auth2_test.go new file mode 100644 index 0000000..67b6392 --- /dev/null +++ b/test/api_o_auth2_test.go @@ -0,0 +1,62 @@ +/* +OneLogin API + +Testing OAuth2ApiService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package onelogin + +import ( + "context" + "testing" + + openapiclient "github.com/onelogin/onelogin-go-sdk" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func Test_onelogin_OAuth2ApiService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test OAuth2ApiService GenerateToken", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.OAuth2Api.GenerateToken(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OAuth2ApiService GetRateLimit", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.OAuth2Api.GetRateLimit(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OAuth2ApiService RevokeTokens", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.OAuth2Api.RevokeTokens(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/test/api_privileges_test.go b/test/api_privileges_test.go new file mode 100644 index 0000000..cd2bf8a --- /dev/null +++ b/test/api_privileges_test.go @@ -0,0 +1,175 @@ +/* +OneLogin API + +Testing PrivilegesApiService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package onelogin + +import ( + "context" + "testing" + + openapiclient "github.com/onelogin/onelogin-go-sdk" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func Test_onelogin_PrivilegesApiService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test PrivilegesApiService AddPrivilegeToRole", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var privilegeId string + + resp, httpRes, err := apiClient.PrivilegesApi.AddPrivilegeToRole(context.Background(), privilegeId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test PrivilegesApiService AssignUsersToPrivilege", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var privilegeId string + + resp, httpRes, err := apiClient.PrivilegesApi.AssignUsersToPrivilege(context.Background(), privilegeId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test PrivilegesApiService CreatePrivilege", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.PrivilegesApi.CreatePrivilege(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test PrivilegesApiService DeletePrivilege", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var privilegeId string + + httpRes, err := apiClient.PrivilegesApi.DeletePrivilege(context.Background(), privilegeId).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test PrivilegesApiService DeleteRoleFromPrivilege", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var privilegeId string + var roleId string + + httpRes, err := apiClient.PrivilegesApi.DeleteRoleFromPrivilege(context.Background(), privilegeId, roleId).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test PrivilegesApiService GetAssignedUser", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var privilegeId string + + resp, httpRes, err := apiClient.PrivilegesApi.GetAssignedUser(context.Background(), privilegeId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test PrivilegesApiService GetPrivilege", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var privilegeId string + + resp, httpRes, err := apiClient.PrivilegesApi.GetPrivilege(context.Background(), privilegeId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test PrivilegesApiService ListPrivelegeRoles", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var privilegeId string + + resp, httpRes, err := apiClient.PrivilegesApi.ListPrivelegeRoles(context.Background(), privilegeId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test PrivilegesApiService ListPriveleges", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.PrivilegesApi.ListPriveleges(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test PrivilegesApiService RemoveUserFromPrivilege", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var privilegeId string + var userId int32 + + httpRes, err := apiClient.PrivilegesApi.RemoveUserFromPrivilege(context.Background(), privilegeId, userId).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test PrivilegesApiService UpdatePrivilege", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var privilegeId string + + resp, httpRes, err := apiClient.PrivilegesApi.UpdatePrivilege(context.Background(), privilegeId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/test/api_roles_test.go b/test/api_roles_test.go new file mode 100644 index 0000000..7b3a454 --- /dev/null +++ b/test/api_roles_test.go @@ -0,0 +1,227 @@ +/* +OneLogin API + +Testing RolesApiService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package onelogin + +import ( + "context" + "testing" + + openapiclient "github.com/onelogin/onelogin-go-sdk" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func Test_onelogin_RolesApiService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test RolesApiService AddRoleAdmins", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var roleId string + + resp, httpRes, err := apiClient.RolesApi.AddRoleAdmins(context.Background(), roleId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test RolesApiService AddRoleUsers", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var roleId string + + resp, httpRes, err := apiClient.RolesApi.AddRoleUsers(context.Background(), roleId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test RolesApiService CreateRole", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.RolesApi.CreateRole(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test RolesApiService DeleteRole", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var roleId string + + httpRes, err := apiClient.RolesApi.DeleteRole(context.Background(), roleId).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test RolesApiService GetRole", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var roleId string + + resp, httpRes, err := apiClient.RolesApi.GetRole(context.Background(), roleId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test RolesApiService GetRoleAdmins", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var roleId string + + resp, httpRes, err := apiClient.RolesApi.GetRoleAdmins(context.Background(), roleId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test RolesApiService GetRoleApps", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var roleId string + + resp, httpRes, err := apiClient.RolesApi.GetRoleApps(context.Background(), roleId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test RolesApiService GetRoleById", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var roleId string + + resp, httpRes, err := apiClient.RolesApi.GetRoleById(context.Background(), roleId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test RolesApiService GetRoleByName", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.RolesApi.GetRoleByName(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test RolesApiService GetRoleUsers", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var roleId string + + resp, httpRes, err := apiClient.RolesApi.GetRoleUsers(context.Background(), roleId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test RolesApiService ListRoles", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.RolesApi.ListRoles(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test RolesApiService RemoveRoleAdmins", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var roleId string + + httpRes, err := apiClient.RolesApi.RemoveRoleAdmins(context.Background(), roleId).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test RolesApiService RemoveRoleUsers", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var roleId string + + httpRes, err := apiClient.RolesApi.RemoveRoleUsers(context.Background(), roleId).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test RolesApiService SetRoleApps", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var roleId string + + resp, httpRes, err := apiClient.RolesApi.SetRoleApps(context.Background(), roleId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test RolesApiService UpdateRole", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var roleId string + + resp, httpRes, err := apiClient.RolesApi.UpdateRole(context.Background(), roleId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/test/api_saml_assertions_test.go b/test/api_saml_assertions_test.go new file mode 100644 index 0000000..5aa6c59 --- /dev/null +++ b/test/api_saml_assertions_test.go @@ -0,0 +1,74 @@ +/* +OneLogin API + +Testing SAMLAssertionsApiService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package onelogin + +import ( + "context" + "testing" + + openapiclient "github.com/onelogin/onelogin-go-sdk" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func Test_onelogin_SAMLAssertionsApiService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test SAMLAssertionsApiService GenerateSamlAssert", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.SAMLAssertionsApi.GenerateSamlAssert(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test SAMLAssertionsApiService GenerateSamlAssert2", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.SAMLAssertionsApi.GenerateSamlAssert2(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test SAMLAssertionsApiService VerFactorSaml", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.SAMLAssertionsApi.VerFactorSaml(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test SAMLAssertionsApiService VerFactorSaml2", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.SAMLAssertionsApi.VerFactorSaml2(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/test/api_smart_hooks_test.go b/test/api_smart_hooks_test.go new file mode 100644 index 0000000..f8ea9c1 --- /dev/null +++ b/test/api_smart_hooks_test.go @@ -0,0 +1,170 @@ +/* +OneLogin API + +Testing SmartHooksApiService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package onelogin + +import ( + "context" + "testing" + + openapiclient "github.com/onelogin/onelogin-go-sdk" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func Test_onelogin_SmartHooksApiService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test SmartHooksApiService CreateEnvironmentVariable", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.SmartHooksApi.CreateEnvironmentVariable(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test SmartHooksApiService CreateHook", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.SmartHooksApi.CreateHook(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test SmartHooksApiService DeleteEnvironmentVariable", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var envvarId string + + httpRes, err := apiClient.SmartHooksApi.DeleteEnvironmentVariable(context.Background(), envvarId).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test SmartHooksApiService DeleteHook", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var hookId string + + httpRes, err := apiClient.SmartHooksApi.DeleteHook(context.Background(), hookId).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test SmartHooksApiService GetEnvironmentVariable", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var envvarId string + + resp, httpRes, err := apiClient.SmartHooksApi.GetEnvironmentVariable(context.Background(), envvarId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test SmartHooksApiService GetHook", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var hookId string + + resp, httpRes, err := apiClient.SmartHooksApi.GetHook(context.Background(), hookId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test SmartHooksApiService GetLogs", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var hookId string + + resp, httpRes, err := apiClient.SmartHooksApi.GetLogs(context.Background(), hookId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test SmartHooksApiService ListEnvironmentVariables", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.SmartHooksApi.ListEnvironmentVariables(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test SmartHooksApiService ListHooks", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.SmartHooksApi.ListHooks(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test SmartHooksApiService UpdateEnvironmentVariable", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var envvarId string + + resp, httpRes, err := apiClient.SmartHooksApi.UpdateEnvironmentVariable(context.Background(), envvarId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test SmartHooksApiService UpdateHook", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var hookId string + + resp, httpRes, err := apiClient.SmartHooksApi.UpdateHook(context.Background(), hookId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/test/api_user_mappings_test.go b/test/api_user_mappings_test.go new file mode 100644 index 0000000..638f896 --- /dev/null +++ b/test/api_user_mappings_test.go @@ -0,0 +1,169 @@ +/* +OneLogin API + +Testing UserMappingsApiService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package onelogin + +import ( + "context" + "testing" + + openapiclient "github.com/onelogin/onelogin-go-sdk" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func Test_onelogin_UserMappingsApiService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test UserMappingsApiService CreateMapping", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.UserMappingsApi.CreateMapping(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test UserMappingsApiService DeleteMapping", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var mappingId int32 + + httpRes, err := apiClient.UserMappingsApi.DeleteMapping(context.Background(), mappingId).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test UserMappingsApiService GetMapping", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var mappingId int32 + + resp, httpRes, err := apiClient.UserMappingsApi.GetMapping(context.Background(), mappingId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test UserMappingsApiService ListMappingActionValues", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var mappingActionValue string + + resp, httpRes, err := apiClient.UserMappingsApi.ListMappingActionValues(context.Background(), mappingActionValue).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test UserMappingsApiService ListMappingConditions", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.UserMappingsApi.ListMappingConditions(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test UserMappingsApiService ListMappingConditionsOperators", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var mappingConditionValue string + + resp, httpRes, err := apiClient.UserMappingsApi.ListMappingConditionsOperators(context.Background(), mappingConditionValue).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test UserMappingsApiService ListMappingContionValues", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var mappingConditionValue string + + resp, httpRes, err := apiClient.UserMappingsApi.ListMappingContionValues(context.Background(), mappingConditionValue).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test UserMappingsApiService ListMappings", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.UserMappingsApi.ListMappings(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test UserMappingsApiService ListMappingsActions", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.UserMappingsApi.ListMappingsActions(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test UserMappingsApiService SortMappings", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.UserMappingsApi.SortMappings(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test UserMappingsApiService UpdateMapping", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var mappingId int32 + + resp, httpRes, err := apiClient.UserMappingsApi.UpdateMapping(context.Background(), mappingId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/test/api_users_v1_test.go b/test/api_users_v1_test.go new file mode 100644 index 0000000..59b7dbc --- /dev/null +++ b/test/api_users_v1_test.go @@ -0,0 +1,229 @@ +/* +OneLogin API + +Testing UsersV1ApiService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package onelogin + +import ( + "context" + "testing" + + openapiclient "github.com/onelogin/onelogin-go-sdk" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func Test_onelogin_UsersV1ApiService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test UsersV1ApiService AddRolesToUser", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var userId int32 + + resp, httpRes, err := apiClient.UsersV1Api.AddRolesToUser(context.Background(), userId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test UsersV1ApiService CreateUser", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.UsersV1Api.CreateUser(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test UsersV1ApiService DeleteUser", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var userId int32 + + httpRes, err := apiClient.UsersV1Api.DeleteUser(context.Background(), userId).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test UsersV1ApiService GetCustomAttributes", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.UsersV1Api.GetCustomAttributes(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test UsersV1ApiService GetUserApps", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var userId int32 + + resp, httpRes, err := apiClient.UsersV1Api.GetUserApps(context.Background(), userId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test UsersV1ApiService GetUserById", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var userId int32 + + resp, httpRes, err := apiClient.UsersV1Api.GetUserById(context.Background(), userId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test UsersV1ApiService GetUserRoles", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var userId int32 + + resp, httpRes, err := apiClient.UsersV1Api.GetUserRoles(context.Background(), userId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test UsersV1ApiService ListUsers", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.UsersV1Api.ListUsers(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test UsersV1ApiService LockAccountUser", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var userId int32 + + resp, httpRes, err := apiClient.UsersV1Api.LockAccountUser(context.Background(), userId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test UsersV1ApiService LogOutUser", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var userId int32 + + resp, httpRes, err := apiClient.UsersV1Api.LogOutUser(context.Background(), userId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test UsersV1ApiService RemoveUserRole", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var userId int32 + + resp, httpRes, err := apiClient.UsersV1Api.RemoveUserRole(context.Background(), userId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test UsersV1ApiService SetUserState", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var userId int32 + + resp, httpRes, err := apiClient.UsersV1Api.SetUserState(context.Background(), userId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test UsersV1ApiService UpdatePasswordInsecure", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var userId int32 + + resp, httpRes, err := apiClient.UsersV1Api.UpdatePasswordInsecure(context.Background(), userId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test UsersV1ApiService UpdatePasswordSecure", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var userId int32 + + resp, httpRes, err := apiClient.UsersV1Api.UpdatePasswordSecure(context.Background(), userId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test UsersV1ApiService UpdateUser", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var userId int32 + + resp, httpRes, err := apiClient.UsersV1Api.UpdateUser(context.Background(), userId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/test/api_users_v2_test.go b/test/api_users_v2_test.go new file mode 100644 index 0000000..b5fb6aa --- /dev/null +++ b/test/api_users_v2_test.go @@ -0,0 +1,105 @@ +/* +OneLogin API + +Testing UsersV2ApiService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package onelogin + +import ( + "context" + "testing" + + openapiclient "github.com/onelogin/onelogin-go-sdk" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func Test_onelogin_UsersV2ApiService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test UsersV2ApiService CreateUser2", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.UsersV2Api.CreateUser2(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test UsersV2ApiService DeleteUser2", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var userId int32 + + httpRes, err := apiClient.UsersV2Api.DeleteUser2(context.Background(), userId).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test UsersV2ApiService GetUser2", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var userId int32 + + resp, httpRes, err := apiClient.UsersV2Api.GetUser2(context.Background(), userId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test UsersV2ApiService GetUserApps2", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var userId int32 + + resp, httpRes, err := apiClient.UsersV2Api.GetUserApps2(context.Background(), userId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test UsersV2ApiService ListUsers2", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.UsersV2Api.ListUsers2(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test UsersV2ApiService UpdateUser2", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var userId int32 + + resp, httpRes, err := apiClient.UsersV2Api.UpdateUser2(context.Background(), userId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/test/api_vigilance_ai_test.go b/test/api_vigilance_ai_test.go new file mode 100644 index 0000000..9bce86a --- /dev/null +++ b/test/api_vigilance_ai_test.go @@ -0,0 +1,126 @@ +/* +OneLogin API + +Testing VigilanceAIApiService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package onelogin + +import ( + "context" + "testing" + + openapiclient "github.com/onelogin/onelogin-go-sdk" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func Test_onelogin_VigilanceAIApiService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test VigilanceAIApiService CreateRiskRule", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.VigilanceAIApi.CreateRiskRule(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test VigilanceAIApiService DeleteRiskRule", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var ruleId string + + httpRes, err := apiClient.VigilanceAIApi.DeleteRiskRule(context.Background(), ruleId).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test VigilanceAIApiService GetRiskRule", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var ruleId string + + resp, httpRes, err := apiClient.VigilanceAIApi.GetRiskRule(context.Background(), ruleId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test VigilanceAIApiService GetRiskScore", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.VigilanceAIApi.GetRiskScore(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test VigilanceAIApiService GetRiskScores", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.VigilanceAIApi.GetRiskScores(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test VigilanceAIApiService ListRiskRules", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.VigilanceAIApi.ListRiskRules(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test VigilanceAIApiService TrackRiskEvent", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + httpRes, err := apiClient.VigilanceAIApi.TrackRiskEvent(context.Background()).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test VigilanceAIApiService UpdateRiskRule", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var ruleId string + + resp, httpRes, err := apiClient.VigilanceAIApi.UpdateRiskRule(context.Background(), ruleId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/utils.go b/utils.go index 4dea906..65e8a82 100644 --- a/utils.go +++ b/utils.go @@ -1,17 +1,18 @@ /* OneLogin API -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) +OpenAPI Specification for OneLogin -API version: 3.0.0-alpha.1 +API version: 3.1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. -package openapi +package onelogin import ( "encoding/json" + "reflect" "time" ) @@ -326,3 +327,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) +} From 9ae6eb62e0ae63c96f25af0d627f402ac01ee9d9 Mon Sep 17 00:00:00 2001 From: Joe Wolf Date: Mon, 20 Mar 2023 14:15:01 -0700 Subject: [PATCH 07/24] changelog --- test/CHANGELOG.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 test/CHANGELOG.md diff --git a/test/CHANGELOG.md b/test/CHANGELOG.md new file mode 100644 index 0000000..e69de29 From bcb54f9f37873731270d41b290a463301f9bae65 Mon Sep 17 00:00:00 2001 From: Joe Wolf Date: Mon, 20 Mar 2023 14:19:58 -0700 Subject: [PATCH 08/24] changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1 @@ + From 417b2ab0a309ef53f45d70dfe00d93bac56c2edb Mon Sep 17 00:00:00 2001 From: Joe Wolf Date: Mon, 20 Mar 2023 14:28:44 -0700 Subject: [PATCH 09/24] release changes --- .github/workflows/release.yml | 55 ++++++++++++++++++++++++++--------- 1 file changed, 41 insertions(+), 14 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 07a9137..f26585a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,24 +1,51 @@ +# This GitHub action can publish assets for release when a tag is created. +# Currently its setup to run on any tag that matches the pattern "v*" (ie. v0.1.0). +# +# This uses an action (hashicorp/ghaction-import-gpg) that assumes you set your +# private key in the `GPG_PRIVATE_KEY` secret and passphrase in the `PASSPHRASE` +# secret. If you would rather own your own GPG handling, please fork this action +# or use an alternative one for key handling. +# +# You will need to pass the `--batch` flag to `gpg` in your signing step +# in `goreleaser` to indicate this is being used in a non-interactive mode. +# +name: release on: push: tags: - - '*' -name: Release + - 'v*' +permissions: + contents: write jobs: goreleaser: runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Unshallow + - + name: Checkout + uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 + - + name: Unshallow run: git fetch --prune --unshallow - - name: Set up Go - uses: actions/setup-go@v2 + - + name: Set up Go + uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0 with: - go-version: 1.14 - - name: Release - uses: docker://antonyurchenko/git-release:latest + go-version-file: 'go.mod' + cache: true + - + name: Import GPG key + uses: crazy-max/ghaction-import-gpg@111c56156bcc6918c056dbef52164cfa583dc549 # v5.2.0 + id: import_gpg + with: + gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} + passphrase: ${{ secrets.PASSPHRASE }} + - + name: Run GoReleaser + uses: goreleaser/goreleaser-action@f82d6c1c344bcacabba2c841718984797f664a6b # v4.2.0 + with: + version: latest + args: release --rm-dist env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - DRAFT_RELEASE: "false" - PRE_RELEASE: "false" - ALLOW_EMPTY_CHANGELOG: "true" + GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }} + # GitHub sets this automatically + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From 3a09ecac390ae27df791e87dda84f4650cff919f Mon Sep 17 00:00:00 2001 From: Joe Wolf Date: Mon, 20 Mar 2023 14:34:11 -0700 Subject: [PATCH 10/24] revert --- .github/workflows/release.yml | 55 +++++++++-------------------------- 1 file changed, 14 insertions(+), 41 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f26585a..07a9137 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,51 +1,24 @@ -# This GitHub action can publish assets for release when a tag is created. -# Currently its setup to run on any tag that matches the pattern "v*" (ie. v0.1.0). -# -# This uses an action (hashicorp/ghaction-import-gpg) that assumes you set your -# private key in the `GPG_PRIVATE_KEY` secret and passphrase in the `PASSPHRASE` -# secret. If you would rather own your own GPG handling, please fork this action -# or use an alternative one for key handling. -# -# You will need to pass the `--batch` flag to `gpg` in your signing step -# in `goreleaser` to indicate this is being used in a non-interactive mode. -# -name: release on: push: tags: - - 'v*' -permissions: - contents: write + - '*' +name: Release jobs: goreleaser: runs-on: ubuntu-latest steps: - - - name: Checkout - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 - - - name: Unshallow + - name: Checkout + uses: actions/checkout@v2 + - name: Unshallow run: git fetch --prune --unshallow - - - name: Set up Go - uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0 + - name: Set up Go + uses: actions/setup-go@v2 with: - go-version-file: 'go.mod' - cache: true - - - name: Import GPG key - uses: crazy-max/ghaction-import-gpg@111c56156bcc6918c056dbef52164cfa583dc549 # v5.2.0 - id: import_gpg - with: - gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} - passphrase: ${{ secrets.PASSPHRASE }} - - - name: Run GoReleaser - uses: goreleaser/goreleaser-action@f82d6c1c344bcacabba2c841718984797f664a6b # v4.2.0 - with: - version: latest - args: release --rm-dist + go-version: 1.14 + - name: Release + uses: docker://antonyurchenko/git-release:latest env: - GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }} - # GitHub sets this automatically - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + DRAFT_RELEASE: "false" + PRE_RELEASE: "false" + ALLOW_EMPTY_CHANGELOG: "true" From e21e1cb94adb0b1da3e85ee4cab8b99f0330c4c6 Mon Sep 17 00:00:00 2001 From: Jmfwolf <77870544+Jmfwolf@users.noreply.github.com> Date: Wed, 21 Jun 2023 13:02:50 -0700 Subject: [PATCH 11/24] Major Overhaul: New Version of Go SDK - v0.4.0 (#67) * worked design * updated readme * convenience * Improved docs * improved model documentation * skeleton onelogin.go * some services implemented * fixed client requests * basic testing * validation is broken * added logging and request fixes * fixed const paths * updated docs, roles, users, apps, authservers * Updated readme * broken testing * services implemented missing mfa * service calls implemented * Updated Readme * added Makefile back * fixing tests * fixed readme link issue * fixed it right this time * add support for delete req body * working test package * Makefile runs unit tests * changed path name for secure * reorganized documentation * updated documents --------- Co-authored-by: Bryan Vestey --- .gitignore | 27 +- .openapi-generator-ignore | 23 - .openapi-generator/FILES | 397 - .openapi-generator/VERSION | 1 - .travis.yml | 8 - CHANGELOG.md | 1 - LICENSE | 22 + Makefile | 3 +- api/openapi.yaml | 15202 ---------------- api_api_auth_claims.go | 591 - api_api_auth_client_apps.go | 613 - api_api_auth_scopes.go | 580 - api_api_authorization_server.go | 666 - api_app_rules.go | 1409 -- api_apps.go | 1020 -- api_branding_service.go | 744 - api_branding_service_smtp.go | 369 - api_branding_service_templates.go | 1050 -- api_events.go | 478 - api_groups.go | 279 - api_invite_links.go | 279 - api_multi_factor_authentication.go | 1271 -- api_multi_factor_authentication_v1.go | 915 - api_o_auth2.go | 454 - api_privileges.go | 1376 -- api_roles.go | 2129 --- api_saml_assertions.go | 593 - api_smart_hooks.go | 1493 -- api_user_mappings.go | 1383 -- api_users_v1.go | 2392 --- api_users_v2.go | 1048 -- api_vigilance_ai.go | 988 - client.go | 738 - config.yml | 1 + configuration.go | 221 - docs/APIAuthClaimsApi.md | 308 - docs/APIAuthClientAppsApi.md | 310 - docs/APIAuthScopesApi.md | 308 - docs/APIAuthorizationServerApi.md | 358 - docs/ActionObj.md | 82 - docs/ActivateMfaFactorsRequest.md | 108 - docs/AddClientApp201Response.md | 82 - docs/AddClientAppRequest.md | 82 - docs/AddPrivilegeToRole201Response.md | 56 - docs/AddPrivilegeToRoleRequest.md | 56 - docs/AddRolesToUserRequest.md | 51 - docs/AltErr.md | 108 - docs/AppParameters.md | 134 - docs/AppRule.md | 212 - docs/AppRulesApi.md | 821 - docs/AppsApi.md | 562 - docs/AssignUsersToPrivilegeRequest.md | 56 - docs/AuthClaim.md | 103 - docs/AuthId.md | 56 - docs/AuthMethod.md | 27 - docs/AuthScope.md | 108 - docs/AuthServer.md | 119 - docs/AuthServerConfiguration.md | 124 - docs/Brand.md | 345 - docs/BrandApp.md | 219 - docs/BrandBackground.md | 114 - docs/BrandBackgroundUrls.md | 93 - docs/BrandLogo.md | 114 - docs/BrandLogoUrls.md | 93 - docs/BrandReq.md | 108 - docs/BrandingServiceApi.md | 421 - docs/BrandingServiceSMTPApi.md | 199 - docs/BrandingServiceTemplatesApi.md | 601 - docs/ClientAppFull.md | 134 - docs/ClockCounter.md | 82 - docs/Condition.md | 108 - docs/ConfigurationOidc.md | 156 - docs/ConfigurationSaml.md | 72 - docs/Connector.md | 160 - docs/CreateApp200Response.md | 489 - docs/CreateAppRequest.md | 489 - docs/CreateDeviceVerification201Response.md | 238 - docs/CreateDeviceVerificationRequest.md | 155 - docs/CreateFactorRegistration201Response.md | 186 - docs/CreateFactorRegistrationRequest.md | 176 - docs/CreatePrivilege200Response.md | 56 - docs/CreateRole201ResponseInner.md | 56 - docs/Design.md | 85 + docs/Device.md | 82 - docs/EmailConfig.md | 197 - docs/EnforcementPoint.md | 398 - docs/EnforcementPointResourcesInner.md | 170 - docs/EnrollMfaFactor200Response.md | 82 - docs/Error.md | 124 - docs/Event.md | 1200 -- docs/EventsApi.md | 229 - docs/GenerateMfaToken200Response.md | 108 - docs/GenerateMfaTokenRequest.md | 82 - docs/GenerateOTP201Response.md | 134 - docs/GenerateOTPRequest.md | 82 - docs/GenerateSamlAssert200Response.md | 82 - docs/GenerateTokenRequest.md | 51 - docs/GenericApp.md | 472 - docs/GenericAppProvisioning.md | 56 - docs/GetAssignedUser200Response.md | 226 - docs/GetAuthFactors200Response.md | 108 - ...etAuthenticationDevices200ResponseInner.md | 160 - docs/GetCustomAttributes200Response.md | 82 - docs/GetEmailSettings200Response.md | 223 - docs/GetEmailSettings200ResponseOneOf.md | 56 - docs/GetEnrolledFactors200Response.md | 82 - docs/GetEnrolledFactors200ResponseData.md | 56 - ...edFactors200ResponseDataOtpDevicesInner.md | 264 - docs/GetEventById200Response.md | 82 - docs/GetEventTypes200Response.md | 82 - docs/GetEventTypes200ResponseDataInner.md | 108 - docs/GetEvents200Response.md | 108 - docs/GetEvents200ResponsePagination.md | 134 - docs/GetGroups200Response.md | 82 - docs/GetInviteLink200Response.md | 82 - docs/GetInviteLinkRequest.md | 56 - docs/GetMFAFactors200Response.md | 82 - docs/GetMFAFactors200ResponseData.md | 56 - ...AFactors200ResponseDataAuthFactorsInner.md | 82 - docs/GetRateLimit200Response.md | 82 - docs/GetRiskScore200Response.md | 82 - docs/GetRiskScoreRequest.md | 197 - docs/GetRiskScores200Response.md | 82 - docs/GetRiskScores200ResponseScores.md | 160 - docs/GetRoleApps200ResponseInner.md | 108 - docs/GetRoleById200Response.md | 82 - docs/GetRoleById200ResponseDataInner.md | 82 - docs/GetRoleByName200Response.md | 108 - docs/GetRoleByName200ResponseDataInner.md | 82 - docs/GetRoleByName200ResponsePagination.md | 134 - docs/GetUserApps200ResponseInner.md | 238 - docs/GetUserRoles200Response.md | 82 - docs/GetUserVerification200Response.md | 108 - docs/Group.md | 108 - docs/GroupsApi.md | 141 - docs/Hook.md | 380 - docs/HookEnvvar.md | 150 - docs/HookLog.md | 134 - docs/HookOptions.md | 108 - docs/HookStatus.md | 82 - docs/InviteLinksApi.md | 142 - docs/ListConditions200ResponseInner.md | 82 - ...ListMappingActionValues200ResponseInner.md | 82 - docs/ListMappingConditions200Response.md | 82 - ...pingConditionsOperators200ResponseInner.md | 82 - ...istMappingContionValues200ResponseInner.md | 82 - docs/ListMappingsActions200ResponseInner.md | 82 - docs/ListMessageTemplates200ResponseInner.md | 108 - docs/ListPrivelegeRoles200Response.md | 226 - docs/Locale.md | 82 - docs/LockAccountUserRequest.md | 51 - docs/Mapping.md | 182 - docs/MessageTemplate.md | 223 - docs/MessageTemplateTemplate.md | 114 - docs/MessageTemplateTemplateOneOf.md | 93 - docs/MessageTemplateTemplateOneOf1.md | 51 - docs/MultiFactorAuthenticationApi.md | 751 - docs/MultiFactorAuthenticationV1Api.md | 520 - docs/OAuth2Api.md | 208 - docs/OauthToken.md | 186 - docs/OidcApp.md | 494 - docs/OidcAppAllOf.md | 77 - docs/OtpDevice.md | 119 - docs/Privilege.md | 124 - docs/PrivilegePrivilege.md | 82 - docs/PrivilegePrivilegeStatementInner.md | 93 - docs/PrivilegesApi.md | 782 - docs/RateLimit.md | 108 - docs/RemoveRoleUsersRequest.md | 56 - docs/RemoveUserRoleRequest.md | 51 - docs/RemoveUserRoleRequestRoleIdArrayInner.md | 56 - docs/RequestBrand.md | 415 - docs/RevokeTokensRequest.md | 51 - docs/RiskDevice.md | 56 - docs/RiskRule.md | 212 - docs/RiskUser.md | 103 - docs/Role.md | 155 - docs/RolesApi.md | 1107 -- docs/RuleAction.md | 82 - docs/RuleCondition.md | 82 - docs/SAMLAssertionsApi.md | 284 - docs/SamlApp.md | 489 - docs/SamlAppAllOf.md | 98 - docs/SamlAppAllOfParameters.md | 51 - docs/SamlAppAllOfParametersSamlUsername.md | 51 - docs/SamlAssert.md | 140 - docs/SamlFactor.md | 145 - docs/Scope.md | 108 - docs/SendInviteLink200Response.md | 56 - docs/SendInviteLinkRequest.md | 82 - docs/Session.md | 56 - docs/SetUserStateRequest.md | 51 - docs/SmartHooksApi.md | 791 - docs/Source.md | 82 - docs/SsoOidc.md | 56 - docs/SsoSaml.md | 160 - docs/SsoSamlCertificate.md | 108 - docs/TokenClaim.md | 264 - docs/TrackRiskEventRequest.md | 244 - docs/UpdateClientAppRequest.md | 56 - docs/UpdateEnvironmentVariableRequest.md | 51 - docs/UpdatePasswordInsecureRequest.md | 98 - docs/UpdatePasswordSecureRequest.md | 119 - docs/UpdatePrivilege200Response.md | 56 - docs/UpdateRiskRuleRequest.md | 56 - docs/UpdateRole200Response.md | 56 - docs/User.md | 966 - docs/UserMappingsApi.md | 771 - docs/UsersV1Api.md | 1116 -- docs/UsersV2Api.md | 472 - docs/VerFactorSaml200Response.md | 82 - docs/Verb.md | 21 - docs/VerifyMfaFactorRequest.md | 82 - docs/VerifyUserRegistration200Response.md | 108 - docs/VerifyUserRegistrationRequest.md | 56 - docs/VerifyUserVerificationRequest.md | 82 - docs/VigilanceAIApi.md | 548 - docs/api.md | 38 + docs/authentication.md | 54 + docs/error_handling.md | 33 + docs/index.md | 32 + docs/models.md | 128 + docs/usage_examples.md | 52 + git_push.sh | 57 - go.mod | 7 +- go.sum | 369 - internal/api/client.go | 180 + internal/authentication/authenticator.go | 152 + internal/error/api_error.go | 19 + internal/error/authentication_error.go | 19 + internal/error/request_error.go | 19 + internal/error/sdk_error.go | 17 + internal/error/serialization_error.go | 19 + internal/models/app.go | 139 + internal/models/app_rule.go | 49 + internal/models/auth_server.go | 90 + internal/models/group.go | 7 + internal/models/mfa.go | 37 + internal/models/privilege.go | 39 + internal/models/role.go | 25 + internal/models/smart_hook.go | 87 + internal/models/user.go | 118 + internal/models/user_mapping.go | 50 + internal/models/validation.go | 33 + internal/utilities/validPaths.go | 107 + internal/utilities/validators.go | 53 + internal/utilities/web.go | 118 + model_action_obj.go | 164 - model_activate_mfa_factors_request.go | 201 - model_add_client_app_201_response.go | 162 - model_add_client_app_request.go | 164 - model_add_privilege_to_role_201_response.go | 126 - model_add_privilege_to_role_request.go | 126 - model_add_roles_to_user_request.go | 118 - model_alt_err.go | 201 - model_app_parameters.go | 266 - model_app_rule.go | 348 - model_assign_users_to_privilege_request.go | 126 - model_auth_claim.go | 192 - model_auth_id.go | 127 - model_auth_method.go | 125 - model_auth_scope.go | 199 - model_auth_server.go | 208 - model_auth_server_configuration.go | 220 - model_brand.go | 509 - model_brand_app.go | 333 - model_brand_background.go | 198 - model_brand_background_urls.go | 171 - model_brand_logo.go | 198 - model_brand_logo_urls.go | 171 - model_brand_req.go | 201 - model_client_app_full.go | 237 - model_clock_counter.go | 162 - model_condition.go | 201 - model_configuration_oidc.go | 258 - model_configuration_saml.go | 146 - model_connector.go | 274 - model_create_app_200_response.go | 178 - model_create_app_request.go | 178 - ...create_device_verification_201_response.go | 386 - model_create_device_verification_request.go | 266 - ...create_factor_registration_201_response.go | 312 - model_create_factor_registration_request.go | 294 - model_create_privilege_200_response.go | 127 - model_create_role_201_response_inner.go | 126 - model_device.go | 164 - model_email_config.go | 330 - model_enforcement_point.go | 597 - model_enforcement_point_resources_inner.go | 281 - model_enroll_mfa_factor_200_response.go | 162 - model_error.go | 216 - model_event.go | 1738 -- model_generate_mf_atoken_200_response.go | 201 - model_generate_mf_atoken_request.go | 168 - model_generate_otp_201_response.go | 242 - model_generate_otp_request.go | 168 - model_generate_saml_assert_200_response.go | 162 - model_generate_token_request.go | 120 - model_generic_app.go | 754 - model_generic_app_provisioning.go | 126 - model_get_assigned_user_200_response.go | 346 - model_get_auth_factors_200_response.go | 201 - ...thentication_devices_200_response_inner.go | 279 - model_get_custom_attributes_200_response.go | 163 - model_get_email_settings_200_response.go | 148 - ..._get_email_settings_200_response_one_of.go | 126 - model_get_enrolled_factors_200_response.go | 162 - ..._get_enrolled_factors_200_response_data.go | 126 - ...ors_200_response_data_otp_devices_inner.go | 423 - model_get_event_by_id_200_response.go | 162 - model_get_event_types_200_response.go | 162 - ...get_event_types_200_response_data_inner.go | 198 - model_get_events_200_response.go | 198 - model_get_events_200_response_pagination.go | 234 - model_get_groups_200_response.go | 162 - model_get_invite_link_200_response.go | 163 - model_get_invite_link_request.go | 127 - model_get_mfa_factors_200_response.go | 162 - model_get_mfa_factors_200_response_data.go | 126 - ...rs_200_response_data_auth_factors_inner.go | 164 - model_get_rate_limit_200_response.go | 162 - model_get_risk_score_200_response.go | 164 - model_get_risk_score_request.go | 318 - model_get_risk_scores_200_response.go | 162 - model_get_risk_scores_200_response_scores.go | 270 - model_get_role_apps_200_response_inner.go | 201 - model_get_role_by_id_200_response.go | 162 - ..._get_role_by_id_200_response_data_inner.go | 164 - model_get_role_by_name_200_response.go | 198 - ...et_role_by_name_200_response_data_inner.go | 164 - ...et_role_by_name_200_response_pagination.go | 234 - model_get_user_apps_200_response_inner.go | 385 - model_get_user_roles_200_response.go | 163 - model_get_user_verification_200_response.go | 201 - model_group.go | 201 - model_hook.go | 578 - model_hook_envvar.go | 255 - model_hook_log.go | 234 - model_hook_options.go | 198 - model_hook_status.go | 164 - model_list_conditions_200_response_inner.go | 164 - ...apping_action_values_200_response_inner.go | 164 - model_list_mapping_conditions_200_response.go | 164 - ...conditions_operators_200_response_inner.go | 164 - ...pping_contion_values_200_response_inner.go | 164 - ...ist_mappings_actions_200_response_inner.go | 164 - ...st_message_templates_200_response_inner.go | 201 - model_list_privelege_roles_200_response.go | 346 - model_locale.go | 164 - model_lock_account_user_request.go | 118 - model_mapping.go | 294 - model_message_template.go | 345 - model_message_template_template.go | 148 - model_message_template_template_one_of.go | 174 - model_message_template_template_one_of_1.go | 118 - model_oauth_token.go | 312 - model_oidc_app.go | 731 - model_oidc_app_all_of.go | 153 - model_otp_device.go | 211 - model_privilege.go | 216 - model_privilege_privilege.go | 162 - model_privilege_privilege_statement_inner.go | 174 - model_rate_limit.go | 201 - model_remove_role_users_request.go | 126 - model_remove_user_role_request.go | 117 - ...e_user_role_request_role_id_array_inner.go | 126 - model_request_brand.go | 640 - model_revoke_tokens_request.go | 118 - model_risk_device.go | 127 - model_risk_rule.go | 346 - model_risk_user.go | 196 - model_role.go | 264 - model_rule_action.go | 164 - model_rule_condition.go | 164 - model_saml_app.go | 722 - model_saml_app_all_of.go | 180 - model_saml_app_all_of_parameters.go | 117 - ...aml_app_all_of_parameters_saml_username.go | 117 - model_saml_assert.go | 239 - model_saml_factor.go | 248 - model_scope.go | 201 - model_send_invite_link_200_response.go | 126 - model_send_invite_link_request.go | 164 - model_session.go | 127 - model_set_user_state_request.go | 118 - model_source.go | 164 - model_sso_oidc.go | 127 - model_sso_saml.go | 270 - model_sso_saml_certificate.go | 201 - model_token_claim.go | 423 - model_track_risk_event_request.go | 383 - model_update_client_app_request.go | 127 - model_update_environment_variable_request.go | 118 - model_update_password_insecure_request.go | 187 - model_update_password_secure_request.go | 211 - model_update_privilege_200_response.go | 127 - model_update_risk_rule_request.go | 127 - model_update_role_200_response.go | 126 - model_user.go | 1410 -- model_ver_factor_saml_200_response.go | 164 - model_verb.go | 119 - model_verify_mfa_factor_request.go | 164 - ...l_verify_user_registration_200_response.go | 201 - model_verify_user_registration_request.go | 127 - model_verify_user_verification_request.go | 164 - pkg/onelogin/api_authorizations.go | 219 + pkg/onelogin/apps.go | 151 + pkg/onelogin/groups.go | 28 + pkg/onelogin/mfas.go | 101 + pkg/onelogin/onelogin.go | 57 + pkg/onelogin/privileges.go | 142 + pkg/onelogin/roles.go | 168 + pkg/onelogin/saml.go | 34 + pkg/onelogin/smart_hooks.go | 150 + pkg/onelogin/user_mappings.go | 155 + pkg/onelogin/users.go | 225 + readme.md | 541 +- response.go | 47 - test/CHANGELOG.md | 0 test/api_api_auth_claims_test.go | 83 - test/api_api_auth_client_apps_test.go | 84 - test/api_api_auth_scopes_test.go | 83 - test/api_api_authorization_server_test.go | 91 - test/api_app_rules_test.go | 185 - test/api_apps_test.go | 131 - test/api_branding_service_smtp_test.go | 62 - test/api_branding_service_templates_test.go | 144 - test/api_branding_service_test.go | 105 - test/api_events_test.go | 64 - test/api_groups_test.go | 52 - test/api_invite_links_test.go | 50 - test/api_multi_factor_authentication_test.go | 170 - ...api_multi_factor_authentication_v1_test.go | 126 - test/api_o_auth2_test.go | 62 - test/api_privileges_test.go | 175 - test/api_roles_test.go | 227 - test/api_saml_assertions_test.go | 74 - test/api_smart_hooks_test.go | 170 - test/api_user_mappings_test.go | 169 - test/api_users_v1_test.go | 229 - test/api_users_v2_test.go | 105 - test/api_vigilance_ai_test.go | 126 - tests/api_test.go | 144 + tests/error_handling_test.go | 86 + utils.go | 347 - 445 files changed, 3577 insertions(+), 112789 deletions(-) delete mode 100644 .openapi-generator-ignore delete mode 100644 .openapi-generator/FILES delete mode 100644 .openapi-generator/VERSION delete mode 100644 .travis.yml delete mode 100644 CHANGELOG.md create mode 100644 LICENSE delete mode 100644 api/openapi.yaml delete mode 100644 api_api_auth_claims.go delete mode 100644 api_api_auth_client_apps.go delete mode 100644 api_api_auth_scopes.go delete mode 100644 api_api_authorization_server.go delete mode 100644 api_app_rules.go delete mode 100644 api_apps.go delete mode 100644 api_branding_service.go delete mode 100644 api_branding_service_smtp.go delete mode 100644 api_branding_service_templates.go delete mode 100644 api_events.go delete mode 100644 api_groups.go delete mode 100644 api_invite_links.go delete mode 100644 api_multi_factor_authentication.go delete mode 100644 api_multi_factor_authentication_v1.go delete mode 100644 api_o_auth2.go delete mode 100644 api_privileges.go delete mode 100644 api_roles.go delete mode 100644 api_saml_assertions.go delete mode 100644 api_smart_hooks.go delete mode 100644 api_user_mappings.go delete mode 100644 api_users_v1.go delete mode 100644 api_users_v2.go delete mode 100644 api_vigilance_ai.go delete mode 100644 client.go create mode 100644 config.yml delete mode 100644 configuration.go delete mode 100644 docs/APIAuthClaimsApi.md delete mode 100644 docs/APIAuthClientAppsApi.md delete mode 100644 docs/APIAuthScopesApi.md delete mode 100644 docs/APIAuthorizationServerApi.md delete mode 100644 docs/ActionObj.md delete mode 100644 docs/ActivateMfaFactorsRequest.md delete mode 100644 docs/AddClientApp201Response.md delete mode 100644 docs/AddClientAppRequest.md delete mode 100644 docs/AddPrivilegeToRole201Response.md delete mode 100644 docs/AddPrivilegeToRoleRequest.md delete mode 100644 docs/AddRolesToUserRequest.md delete mode 100644 docs/AltErr.md delete mode 100644 docs/AppParameters.md delete mode 100644 docs/AppRule.md delete mode 100644 docs/AppRulesApi.md delete mode 100644 docs/AppsApi.md delete mode 100644 docs/AssignUsersToPrivilegeRequest.md delete mode 100644 docs/AuthClaim.md delete mode 100644 docs/AuthId.md delete mode 100644 docs/AuthMethod.md delete mode 100644 docs/AuthScope.md delete mode 100644 docs/AuthServer.md delete mode 100644 docs/AuthServerConfiguration.md delete mode 100644 docs/Brand.md delete mode 100644 docs/BrandApp.md delete mode 100644 docs/BrandBackground.md delete mode 100644 docs/BrandBackgroundUrls.md delete mode 100644 docs/BrandLogo.md delete mode 100644 docs/BrandLogoUrls.md delete mode 100644 docs/BrandReq.md delete mode 100644 docs/BrandingServiceApi.md delete mode 100644 docs/BrandingServiceSMTPApi.md delete mode 100644 docs/BrandingServiceTemplatesApi.md delete mode 100644 docs/ClientAppFull.md delete mode 100644 docs/ClockCounter.md delete mode 100644 docs/Condition.md delete mode 100644 docs/ConfigurationOidc.md delete mode 100644 docs/ConfigurationSaml.md delete mode 100644 docs/Connector.md delete mode 100644 docs/CreateApp200Response.md delete mode 100644 docs/CreateAppRequest.md delete mode 100644 docs/CreateDeviceVerification201Response.md delete mode 100644 docs/CreateDeviceVerificationRequest.md delete mode 100644 docs/CreateFactorRegistration201Response.md delete mode 100644 docs/CreateFactorRegistrationRequest.md delete mode 100644 docs/CreatePrivilege200Response.md delete mode 100644 docs/CreateRole201ResponseInner.md create mode 100644 docs/Design.md delete mode 100644 docs/Device.md delete mode 100644 docs/EmailConfig.md delete mode 100644 docs/EnforcementPoint.md delete mode 100644 docs/EnforcementPointResourcesInner.md delete mode 100644 docs/EnrollMfaFactor200Response.md delete mode 100644 docs/Error.md delete mode 100644 docs/Event.md delete mode 100644 docs/EventsApi.md delete mode 100644 docs/GenerateMfaToken200Response.md delete mode 100644 docs/GenerateMfaTokenRequest.md delete mode 100644 docs/GenerateOTP201Response.md delete mode 100644 docs/GenerateOTPRequest.md delete mode 100644 docs/GenerateSamlAssert200Response.md delete mode 100644 docs/GenerateTokenRequest.md delete mode 100644 docs/GenericApp.md delete mode 100644 docs/GenericAppProvisioning.md delete mode 100644 docs/GetAssignedUser200Response.md delete mode 100644 docs/GetAuthFactors200Response.md delete mode 100644 docs/GetAuthenticationDevices200ResponseInner.md delete mode 100644 docs/GetCustomAttributes200Response.md delete mode 100644 docs/GetEmailSettings200Response.md delete mode 100644 docs/GetEmailSettings200ResponseOneOf.md delete mode 100644 docs/GetEnrolledFactors200Response.md delete mode 100644 docs/GetEnrolledFactors200ResponseData.md delete mode 100644 docs/GetEnrolledFactors200ResponseDataOtpDevicesInner.md delete mode 100644 docs/GetEventById200Response.md delete mode 100644 docs/GetEventTypes200Response.md delete mode 100644 docs/GetEventTypes200ResponseDataInner.md delete mode 100644 docs/GetEvents200Response.md delete mode 100644 docs/GetEvents200ResponsePagination.md delete mode 100644 docs/GetGroups200Response.md delete mode 100644 docs/GetInviteLink200Response.md delete mode 100644 docs/GetInviteLinkRequest.md delete mode 100644 docs/GetMFAFactors200Response.md delete mode 100644 docs/GetMFAFactors200ResponseData.md delete mode 100644 docs/GetMFAFactors200ResponseDataAuthFactorsInner.md delete mode 100644 docs/GetRateLimit200Response.md delete mode 100644 docs/GetRiskScore200Response.md delete mode 100644 docs/GetRiskScoreRequest.md delete mode 100644 docs/GetRiskScores200Response.md delete mode 100644 docs/GetRiskScores200ResponseScores.md delete mode 100644 docs/GetRoleApps200ResponseInner.md delete mode 100644 docs/GetRoleById200Response.md delete mode 100644 docs/GetRoleById200ResponseDataInner.md delete mode 100644 docs/GetRoleByName200Response.md delete mode 100644 docs/GetRoleByName200ResponseDataInner.md delete mode 100644 docs/GetRoleByName200ResponsePagination.md delete mode 100644 docs/GetUserApps200ResponseInner.md delete mode 100644 docs/GetUserRoles200Response.md delete mode 100644 docs/GetUserVerification200Response.md delete mode 100644 docs/Group.md delete mode 100644 docs/GroupsApi.md delete mode 100644 docs/Hook.md delete mode 100644 docs/HookEnvvar.md delete mode 100644 docs/HookLog.md delete mode 100644 docs/HookOptions.md delete mode 100644 docs/HookStatus.md delete mode 100644 docs/InviteLinksApi.md delete mode 100644 docs/ListConditions200ResponseInner.md delete mode 100644 docs/ListMappingActionValues200ResponseInner.md delete mode 100644 docs/ListMappingConditions200Response.md delete mode 100644 docs/ListMappingConditionsOperators200ResponseInner.md delete mode 100644 docs/ListMappingContionValues200ResponseInner.md delete mode 100644 docs/ListMappingsActions200ResponseInner.md delete mode 100644 docs/ListMessageTemplates200ResponseInner.md delete mode 100644 docs/ListPrivelegeRoles200Response.md delete mode 100644 docs/Locale.md delete mode 100644 docs/LockAccountUserRequest.md delete mode 100644 docs/Mapping.md delete mode 100644 docs/MessageTemplate.md delete mode 100644 docs/MessageTemplateTemplate.md delete mode 100644 docs/MessageTemplateTemplateOneOf.md delete mode 100644 docs/MessageTemplateTemplateOneOf1.md delete mode 100644 docs/MultiFactorAuthenticationApi.md delete mode 100644 docs/MultiFactorAuthenticationV1Api.md delete mode 100644 docs/OAuth2Api.md delete mode 100644 docs/OauthToken.md delete mode 100644 docs/OidcApp.md delete mode 100644 docs/OidcAppAllOf.md delete mode 100644 docs/OtpDevice.md delete mode 100644 docs/Privilege.md delete mode 100644 docs/PrivilegePrivilege.md delete mode 100644 docs/PrivilegePrivilegeStatementInner.md delete mode 100644 docs/PrivilegesApi.md delete mode 100644 docs/RateLimit.md delete mode 100644 docs/RemoveRoleUsersRequest.md delete mode 100644 docs/RemoveUserRoleRequest.md delete mode 100644 docs/RemoveUserRoleRequestRoleIdArrayInner.md delete mode 100644 docs/RequestBrand.md delete mode 100644 docs/RevokeTokensRequest.md delete mode 100644 docs/RiskDevice.md delete mode 100644 docs/RiskRule.md delete mode 100644 docs/RiskUser.md delete mode 100644 docs/Role.md delete mode 100644 docs/RolesApi.md delete mode 100644 docs/RuleAction.md delete mode 100644 docs/RuleCondition.md delete mode 100644 docs/SAMLAssertionsApi.md delete mode 100644 docs/SamlApp.md delete mode 100644 docs/SamlAppAllOf.md delete mode 100644 docs/SamlAppAllOfParameters.md delete mode 100644 docs/SamlAppAllOfParametersSamlUsername.md delete mode 100644 docs/SamlAssert.md delete mode 100644 docs/SamlFactor.md delete mode 100644 docs/Scope.md delete mode 100644 docs/SendInviteLink200Response.md delete mode 100644 docs/SendInviteLinkRequest.md delete mode 100644 docs/Session.md delete mode 100644 docs/SetUserStateRequest.md delete mode 100644 docs/SmartHooksApi.md delete mode 100644 docs/Source.md delete mode 100644 docs/SsoOidc.md delete mode 100644 docs/SsoSaml.md delete mode 100644 docs/SsoSamlCertificate.md delete mode 100644 docs/TokenClaim.md delete mode 100644 docs/TrackRiskEventRequest.md delete mode 100644 docs/UpdateClientAppRequest.md delete mode 100644 docs/UpdateEnvironmentVariableRequest.md delete mode 100644 docs/UpdatePasswordInsecureRequest.md delete mode 100644 docs/UpdatePasswordSecureRequest.md delete mode 100644 docs/UpdatePrivilege200Response.md delete mode 100644 docs/UpdateRiskRuleRequest.md delete mode 100644 docs/UpdateRole200Response.md delete mode 100644 docs/User.md delete mode 100644 docs/UserMappingsApi.md delete mode 100644 docs/UsersV1Api.md delete mode 100644 docs/UsersV2Api.md delete mode 100644 docs/VerFactorSaml200Response.md delete mode 100644 docs/Verb.md delete mode 100644 docs/VerifyMfaFactorRequest.md delete mode 100644 docs/VerifyUserRegistration200Response.md delete mode 100644 docs/VerifyUserRegistrationRequest.md delete mode 100644 docs/VerifyUserVerificationRequest.md delete mode 100644 docs/VigilanceAIApi.md create mode 100644 docs/api.md create mode 100644 docs/authentication.md create mode 100644 docs/error_handling.md create mode 100644 docs/index.md create mode 100644 docs/models.md create mode 100644 docs/usage_examples.md delete mode 100644 git_push.sh create mode 100644 internal/api/client.go create mode 100644 internal/authentication/authenticator.go create mode 100644 internal/error/api_error.go create mode 100644 internal/error/authentication_error.go create mode 100644 internal/error/request_error.go create mode 100644 internal/error/sdk_error.go create mode 100644 internal/error/serialization_error.go create mode 100644 internal/models/app.go create mode 100644 internal/models/app_rule.go create mode 100644 internal/models/auth_server.go create mode 100644 internal/models/group.go create mode 100644 internal/models/mfa.go create mode 100644 internal/models/privilege.go create mode 100644 internal/models/role.go create mode 100644 internal/models/smart_hook.go create mode 100644 internal/models/user.go create mode 100644 internal/models/user_mapping.go create mode 100644 internal/models/validation.go create mode 100644 internal/utilities/validPaths.go create mode 100644 internal/utilities/validators.go create mode 100644 internal/utilities/web.go delete mode 100644 model_action_obj.go delete mode 100644 model_activate_mfa_factors_request.go delete mode 100644 model_add_client_app_201_response.go delete mode 100644 model_add_client_app_request.go delete mode 100644 model_add_privilege_to_role_201_response.go delete mode 100644 model_add_privilege_to_role_request.go delete mode 100644 model_add_roles_to_user_request.go delete mode 100644 model_alt_err.go delete mode 100644 model_app_parameters.go delete mode 100644 model_app_rule.go delete mode 100644 model_assign_users_to_privilege_request.go delete mode 100644 model_auth_claim.go delete mode 100644 model_auth_id.go delete mode 100644 model_auth_method.go delete mode 100644 model_auth_scope.go delete mode 100644 model_auth_server.go delete mode 100644 model_auth_server_configuration.go delete mode 100644 model_brand.go delete mode 100644 model_brand_app.go delete mode 100644 model_brand_background.go delete mode 100644 model_brand_background_urls.go delete mode 100644 model_brand_logo.go delete mode 100644 model_brand_logo_urls.go delete mode 100644 model_brand_req.go delete mode 100644 model_client_app_full.go delete mode 100644 model_clock_counter.go delete mode 100644 model_condition.go delete mode 100644 model_configuration_oidc.go delete mode 100644 model_configuration_saml.go delete mode 100644 model_connector.go delete mode 100644 model_create_app_200_response.go delete mode 100644 model_create_app_request.go delete mode 100644 model_create_device_verification_201_response.go delete mode 100644 model_create_device_verification_request.go delete mode 100644 model_create_factor_registration_201_response.go delete mode 100644 model_create_factor_registration_request.go delete mode 100644 model_create_privilege_200_response.go delete mode 100644 model_create_role_201_response_inner.go delete mode 100644 model_device.go delete mode 100644 model_email_config.go delete mode 100644 model_enforcement_point.go delete mode 100644 model_enforcement_point_resources_inner.go delete mode 100644 model_enroll_mfa_factor_200_response.go delete mode 100644 model_error.go delete mode 100644 model_event.go delete mode 100644 model_generate_mf_atoken_200_response.go delete mode 100644 model_generate_mf_atoken_request.go delete mode 100644 model_generate_otp_201_response.go delete mode 100644 model_generate_otp_request.go delete mode 100644 model_generate_saml_assert_200_response.go delete mode 100644 model_generate_token_request.go delete mode 100644 model_generic_app.go delete mode 100644 model_generic_app_provisioning.go delete mode 100644 model_get_assigned_user_200_response.go delete mode 100644 model_get_auth_factors_200_response.go delete mode 100644 model_get_authentication_devices_200_response_inner.go delete mode 100644 model_get_custom_attributes_200_response.go delete mode 100644 model_get_email_settings_200_response.go delete mode 100644 model_get_email_settings_200_response_one_of.go delete mode 100644 model_get_enrolled_factors_200_response.go delete mode 100644 model_get_enrolled_factors_200_response_data.go delete mode 100644 model_get_enrolled_factors_200_response_data_otp_devices_inner.go delete mode 100644 model_get_event_by_id_200_response.go delete mode 100644 model_get_event_types_200_response.go delete mode 100644 model_get_event_types_200_response_data_inner.go delete mode 100644 model_get_events_200_response.go delete mode 100644 model_get_events_200_response_pagination.go delete mode 100644 model_get_groups_200_response.go delete mode 100644 model_get_invite_link_200_response.go delete mode 100644 model_get_invite_link_request.go delete mode 100644 model_get_mfa_factors_200_response.go delete mode 100644 model_get_mfa_factors_200_response_data.go delete mode 100644 model_get_mfa_factors_200_response_data_auth_factors_inner.go delete mode 100644 model_get_rate_limit_200_response.go delete mode 100644 model_get_risk_score_200_response.go delete mode 100644 model_get_risk_score_request.go delete mode 100644 model_get_risk_scores_200_response.go delete mode 100644 model_get_risk_scores_200_response_scores.go delete mode 100644 model_get_role_apps_200_response_inner.go delete mode 100644 model_get_role_by_id_200_response.go delete mode 100644 model_get_role_by_id_200_response_data_inner.go delete mode 100644 model_get_role_by_name_200_response.go delete mode 100644 model_get_role_by_name_200_response_data_inner.go delete mode 100644 model_get_role_by_name_200_response_pagination.go delete mode 100644 model_get_user_apps_200_response_inner.go delete mode 100644 model_get_user_roles_200_response.go delete mode 100644 model_get_user_verification_200_response.go delete mode 100644 model_group.go delete mode 100644 model_hook.go delete mode 100644 model_hook_envvar.go delete mode 100644 model_hook_log.go delete mode 100644 model_hook_options.go delete mode 100644 model_hook_status.go delete mode 100644 model_list_conditions_200_response_inner.go delete mode 100644 model_list_mapping_action_values_200_response_inner.go delete mode 100644 model_list_mapping_conditions_200_response.go delete mode 100644 model_list_mapping_conditions_operators_200_response_inner.go delete mode 100644 model_list_mapping_contion_values_200_response_inner.go delete mode 100644 model_list_mappings_actions_200_response_inner.go delete mode 100644 model_list_message_templates_200_response_inner.go delete mode 100644 model_list_privelege_roles_200_response.go delete mode 100644 model_locale.go delete mode 100644 model_lock_account_user_request.go delete mode 100644 model_mapping.go delete mode 100644 model_message_template.go delete mode 100644 model_message_template_template.go delete mode 100644 model_message_template_template_one_of.go delete mode 100644 model_message_template_template_one_of_1.go delete mode 100644 model_oauth_token.go delete mode 100644 model_oidc_app.go delete mode 100644 model_oidc_app_all_of.go delete mode 100644 model_otp_device.go delete mode 100644 model_privilege.go delete mode 100644 model_privilege_privilege.go delete mode 100644 model_privilege_privilege_statement_inner.go delete mode 100644 model_rate_limit.go delete mode 100644 model_remove_role_users_request.go delete mode 100644 model_remove_user_role_request.go delete mode 100644 model_remove_user_role_request_role_id_array_inner.go delete mode 100644 model_request_brand.go delete mode 100644 model_revoke_tokens_request.go delete mode 100644 model_risk_device.go delete mode 100644 model_risk_rule.go delete mode 100644 model_risk_user.go delete mode 100644 model_role.go delete mode 100644 model_rule_action.go delete mode 100644 model_rule_condition.go delete mode 100644 model_saml_app.go delete mode 100644 model_saml_app_all_of.go delete mode 100644 model_saml_app_all_of_parameters.go delete mode 100644 model_saml_app_all_of_parameters_saml_username.go delete mode 100644 model_saml_assert.go delete mode 100644 model_saml_factor.go delete mode 100644 model_scope.go delete mode 100644 model_send_invite_link_200_response.go delete mode 100644 model_send_invite_link_request.go delete mode 100644 model_session.go delete mode 100644 model_set_user_state_request.go delete mode 100644 model_source.go delete mode 100644 model_sso_oidc.go delete mode 100644 model_sso_saml.go delete mode 100644 model_sso_saml_certificate.go delete mode 100644 model_token_claim.go delete mode 100644 model_track_risk_event_request.go delete mode 100644 model_update_client_app_request.go delete mode 100644 model_update_environment_variable_request.go delete mode 100644 model_update_password_insecure_request.go delete mode 100644 model_update_password_secure_request.go delete mode 100644 model_update_privilege_200_response.go delete mode 100644 model_update_risk_rule_request.go delete mode 100644 model_update_role_200_response.go delete mode 100644 model_user.go delete mode 100644 model_ver_factor_saml_200_response.go delete mode 100644 model_verb.go delete mode 100644 model_verify_mfa_factor_request.go delete mode 100644 model_verify_user_registration_200_response.go delete mode 100644 model_verify_user_registration_request.go delete mode 100644 model_verify_user_verification_request.go create mode 100644 pkg/onelogin/api_authorizations.go create mode 100644 pkg/onelogin/apps.go create mode 100644 pkg/onelogin/groups.go create mode 100644 pkg/onelogin/mfas.go create mode 100644 pkg/onelogin/onelogin.go create mode 100644 pkg/onelogin/privileges.go create mode 100644 pkg/onelogin/roles.go create mode 100644 pkg/onelogin/saml.go create mode 100644 pkg/onelogin/smart_hooks.go create mode 100644 pkg/onelogin/user_mappings.go create mode 100644 pkg/onelogin/users.go delete mode 100644 response.go delete mode 100644 test/CHANGELOG.md delete mode 100644 test/api_api_auth_claims_test.go delete mode 100644 test/api_api_auth_client_apps_test.go delete mode 100644 test/api_api_auth_scopes_test.go delete mode 100644 test/api_api_authorization_server_test.go delete mode 100644 test/api_app_rules_test.go delete mode 100644 test/api_apps_test.go delete mode 100644 test/api_branding_service_smtp_test.go delete mode 100644 test/api_branding_service_templates_test.go delete mode 100644 test/api_branding_service_test.go delete mode 100644 test/api_events_test.go delete mode 100644 test/api_groups_test.go delete mode 100644 test/api_invite_links_test.go delete mode 100644 test/api_multi_factor_authentication_test.go delete mode 100644 test/api_multi_factor_authentication_v1_test.go delete mode 100644 test/api_o_auth2_test.go delete mode 100644 test/api_privileges_test.go delete mode 100644 test/api_roles_test.go delete mode 100644 test/api_saml_assertions_test.go delete mode 100644 test/api_smart_hooks_test.go delete mode 100644 test/api_user_mappings_test.go delete mode 100644 test/api_users_v1_test.go delete mode 100644 test/api_users_v2_test.go delete mode 100644 test/api_vigilance_ai_test.go create mode 100644 tests/api_test.go create mode 100644 tests/error_handling_test.go delete mode 100644 utils.go diff --git a/.gitignore b/.gitignore index daf913b..2c4ed74 100644 --- a/.gitignore +++ b/.gitignore @@ -1,24 +1,3 @@ -# Compiled Object files, Static and Dynamic libs (Shared Objects) -*.o -*.a -*.so - -# Folders -_obj -_test - -# Architecture specific extensions/prefixes -*.[568vq] -[568vq].out - -*.cgo1.go -*.cgo2.c -_cgo_defun.c -_cgo_gotypes.go -_cgo_export.* - -_testmain.go - -*.exe -*.test -*.prof +./vendor +coverage.out +bin diff --git a/.openapi-generator-ignore b/.openapi-generator-ignore deleted file mode 100644 index 7484ee5..0000000 --- a/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES deleted file mode 100644 index b17eab5..0000000 --- a/.openapi-generator/FILES +++ /dev/null @@ -1,397 +0,0 @@ -.gitignore -.openapi-generator-ignore -.travis.yml -README.md -api/openapi.yaml -api_api_auth_claims.go -api_api_auth_client_apps.go -api_api_auth_scopes.go -api_api_authorization_server.go -api_app_rules.go -api_apps.go -api_branding_service.go -api_branding_service_smtp.go -api_branding_service_templates.go -api_events.go -api_groups.go -api_invite_links.go -api_multi_factor_authentication.go -api_multi_factor_authentication_v1.go -api_o_auth2.go -api_privileges.go -api_roles.go -api_saml_assertions.go -api_smart_hooks.go -api_user_mappings.go -api_users_v1.go -api_users_v2.go -api_vigilance_ai.go -client.go -configuration.go -docs/APIAuthClaimsApi.md -docs/APIAuthClientAppsApi.md -docs/APIAuthScopesApi.md -docs/APIAuthorizationServerApi.md -docs/ActionObj.md -docs/ActivateMfaFactorsRequest.md -docs/AddClientApp201Response.md -docs/AddClientAppRequest.md -docs/AddPrivilegeToRole201Response.md -docs/AddPrivilegeToRoleRequest.md -docs/AddRolesToUserRequest.md -docs/AltErr.md -docs/AppParameters.md -docs/AppRule.md -docs/AppRulesApi.md -docs/AppsApi.md -docs/AssignUsersToPrivilegeRequest.md -docs/AuthClaim.md -docs/AuthId.md -docs/AuthMethod.md -docs/AuthScope.md -docs/AuthServer.md -docs/AuthServerConfiguration.md -docs/Brand.md -docs/BrandApp.md -docs/BrandBackground.md -docs/BrandBackgroundUrls.md -docs/BrandLogo.md -docs/BrandLogoUrls.md -docs/BrandReq.md -docs/BrandingServiceApi.md -docs/BrandingServiceSMTPApi.md -docs/BrandingServiceTemplatesApi.md -docs/ClientAppFull.md -docs/ClockCounter.md -docs/Condition.md -docs/ConfigurationOidc.md -docs/ConfigurationSaml.md -docs/Connector.md -docs/CreateApp200Response.md -docs/CreateAppRequest.md -docs/CreateDeviceVerification201Response.md -docs/CreateDeviceVerificationRequest.md -docs/CreateFactorRegistration201Response.md -docs/CreateFactorRegistrationRequest.md -docs/CreatePrivilege200Response.md -docs/CreateRole201ResponseInner.md -docs/Device.md -docs/EmailConfig.md -docs/EnforcementPoint.md -docs/EnforcementPointResourcesInner.md -docs/EnrollMfaFactor200Response.md -docs/Error.md -docs/Event.md -docs/EventsApi.md -docs/GenerateMFAtoken200Response.md -docs/GenerateMFAtokenRequest.md -docs/GenerateOTP201Response.md -docs/GenerateOTPRequest.md -docs/GenerateSamlAssert200Response.md -docs/GenerateTokenRequest.md -docs/GenericApp.md -docs/GenericAppProvisioning.md -docs/GetAssignedUser200Response.md -docs/GetAuthFactors200Response.md -docs/GetAuthenticationDevices200ResponseInner.md -docs/GetCustomAttributes200Response.md -docs/GetEmailSettings200Response.md -docs/GetEmailSettings200ResponseOneOf.md -docs/GetEnrolledFactors200Response.md -docs/GetEnrolledFactors200ResponseData.md -docs/GetEnrolledFactors200ResponseDataOtpDevicesInner.md -docs/GetEventById200Response.md -docs/GetEventTypes200Response.md -docs/GetEventTypes200ResponseDataInner.md -docs/GetEvents200Response.md -docs/GetEvents200ResponsePagination.md -docs/GetGroups200Response.md -docs/GetInviteLink200Response.md -docs/GetInviteLinkRequest.md -docs/GetMFAFactors200Response.md -docs/GetMFAFactors200ResponseData.md -docs/GetMFAFactors200ResponseDataAuthFactorsInner.md -docs/GetRateLimit200Response.md -docs/GetRiskScore200Response.md -docs/GetRiskScoreRequest.md -docs/GetRiskScores200Response.md -docs/GetRiskScores200ResponseScores.md -docs/GetRoleApps200ResponseInner.md -docs/GetRoleById200Response.md -docs/GetRoleById200ResponseDataInner.md -docs/GetRoleByName200Response.md -docs/GetRoleByName200ResponseDataInner.md -docs/GetRoleByName200ResponsePagination.md -docs/GetUserApps200ResponseInner.md -docs/GetUserRoles200Response.md -docs/GetUserVerification200Response.md -docs/Group.md -docs/GroupsApi.md -docs/Hook.md -docs/HookEnvvar.md -docs/HookLog.md -docs/HookOptions.md -docs/HookStatus.md -docs/InviteLinksApi.md -docs/ListConditions200ResponseInner.md -docs/ListMappingActionValues200ResponseInner.md -docs/ListMappingConditions200Response.md -docs/ListMappingConditionsOperators200ResponseInner.md -docs/ListMappingContionValues200ResponseInner.md -docs/ListMappingsActions200ResponseInner.md -docs/ListMessageTemplates200ResponseInner.md -docs/ListPrivelegeRoles200Response.md -docs/Locale.md -docs/LockAccountUserRequest.md -docs/Mapping.md -docs/MessageTemplate.md -docs/MessageTemplateTemplate.md -docs/MessageTemplateTemplateOneOf.md -docs/MessageTemplateTemplateOneOf1.md -docs/MultiFactorAuthenticationApi.md -docs/MultiFactorAuthenticationV1Api.md -docs/OAuth2Api.md -docs/OauthToken.md -docs/OidcApp.md -docs/OidcAppAllOf.md -docs/OtpDevice.md -docs/Privilege.md -docs/PrivilegePrivilege.md -docs/PrivilegePrivilegeStatementInner.md -docs/PrivilegesApi.md -docs/RateLimit.md -docs/RemoveRoleUsersRequest.md -docs/RemoveUserRoleRequest.md -docs/RemoveUserRoleRequestRoleIdArrayInner.md -docs/RequestBrand.md -docs/RevokeTokensRequest.md -docs/RiskDevice.md -docs/RiskRule.md -docs/RiskUser.md -docs/Role.md -docs/RolesApi.md -docs/RuleAction.md -docs/RuleCondition.md -docs/SAMLAssertionsApi.md -docs/SamlApp.md -docs/SamlAppAllOf.md -docs/SamlAppAllOfParameters.md -docs/SamlAppAllOfParametersSamlUsername.md -docs/SamlAssert.md -docs/SamlFactor.md -docs/Scope.md -docs/SendInviteLink200Response.md -docs/SendInviteLinkRequest.md -docs/Session.md -docs/SetUserStateRequest.md -docs/SmartHooksApi.md -docs/Source.md -docs/SsoOidc.md -docs/SsoSaml.md -docs/SsoSamlCertificate.md -docs/TokenClaim.md -docs/TrackRiskEventRequest.md -docs/UpdateClientAppRequest.md -docs/UpdateEnvironmentVariableRequest.md -docs/UpdatePasswordInsecureRequest.md -docs/UpdatePasswordSecureRequest.md -docs/UpdatePrivilege200Response.md -docs/UpdateRiskRuleRequest.md -docs/UpdateRole200Response.md -docs/User.md -docs/UserMappingsApi.md -docs/UsersV1Api.md -docs/UsersV2Api.md -docs/VerFactorSaml200Response.md -docs/Verb.md -docs/VerifyMfaFactorRequest.md -docs/VerifyUserRegistration200Response.md -docs/VerifyUserRegistrationRequest.md -docs/VerifyUserVerificationRequest.md -docs/VigilanceAIApi.md -git_push.sh -go.mod -go.sum -model_action_obj.go -model_activate_mfa_factors_request.go -model_add_client_app_201_response.go -model_add_client_app_request.go -model_add_privilege_to_role_201_response.go -model_add_privilege_to_role_request.go -model_add_roles_to_user_request.go -model_alt_err.go -model_app_parameters.go -model_app_rule.go -model_assign_users_to_privilege_request.go -model_auth_claim.go -model_auth_id.go -model_auth_method.go -model_auth_scope.go -model_auth_server.go -model_auth_server_configuration.go -model_brand.go -model_brand_app.go -model_brand_background.go -model_brand_background_urls.go -model_brand_logo.go -model_brand_logo_urls.go -model_brand_req.go -model_client_app_full.go -model_clock_counter.go -model_condition.go -model_configuration_oidc.go -model_configuration_saml.go -model_connector.go -model_create_app_200_response.go -model_create_app_request.go -model_create_device_verification_201_response.go -model_create_device_verification_request.go -model_create_factor_registration_201_response.go -model_create_factor_registration_request.go -model_create_privilege_200_response.go -model_create_role_201_response_inner.go -model_device.go -model_email_config.go -model_enforcement_point.go -model_enforcement_point_resources_inner.go -model_enroll_mfa_factor_200_response.go -model_error.go -model_event.go -model_generate_mf_atoken_200_response.go -model_generate_mf_atoken_request.go -model_generate_otp_201_response.go -model_generate_otp_request.go -model_generate_saml_assert_200_response.go -model_generate_token_request.go -model_generic_app.go -model_generic_app_provisioning.go -model_get_assigned_user_200_response.go -model_get_auth_factors_200_response.go -model_get_authentication_devices_200_response_inner.go -model_get_custom_attributes_200_response.go -model_get_email_settings_200_response.go -model_get_email_settings_200_response_one_of.go -model_get_enrolled_factors_200_response.go -model_get_enrolled_factors_200_response_data.go -model_get_enrolled_factors_200_response_data_otp_devices_inner.go -model_get_event_by_id_200_response.go -model_get_event_types_200_response.go -model_get_event_types_200_response_data_inner.go -model_get_events_200_response.go -model_get_events_200_response_pagination.go -model_get_groups_200_response.go -model_get_invite_link_200_response.go -model_get_invite_link_request.go -model_get_mfa_factors_200_response.go -model_get_mfa_factors_200_response_data.go -model_get_mfa_factors_200_response_data_auth_factors_inner.go -model_get_rate_limit_200_response.go -model_get_risk_score_200_response.go -model_get_risk_score_request.go -model_get_risk_scores_200_response.go -model_get_risk_scores_200_response_scores.go -model_get_role_apps_200_response_inner.go -model_get_role_by_id_200_response.go -model_get_role_by_id_200_response_data_inner.go -model_get_role_by_name_200_response.go -model_get_role_by_name_200_response_data_inner.go -model_get_role_by_name_200_response_pagination.go -model_get_user_apps_200_response_inner.go -model_get_user_roles_200_response.go -model_get_user_verification_200_response.go -model_group.go -model_hook.go -model_hook_envvar.go -model_hook_log.go -model_hook_options.go -model_hook_status.go -model_list_conditions_200_response_inner.go -model_list_mapping_action_values_200_response_inner.go -model_list_mapping_conditions_200_response.go -model_list_mapping_conditions_operators_200_response_inner.go -model_list_mapping_contion_values_200_response_inner.go -model_list_mappings_actions_200_response_inner.go -model_list_message_templates_200_response_inner.go -model_list_privelege_roles_200_response.go -model_locale.go -model_lock_account_user_request.go -model_mapping.go -model_message_template.go -model_message_template_template.go -model_message_template_template_one_of.go -model_message_template_template_one_of_1.go -model_oauth_token.go -model_oidc_app.go -model_oidc_app_all_of.go -model_otp_device.go -model_privilege.go -model_privilege_privilege.go -model_privilege_privilege_statement_inner.go -model_rate_limit.go -model_remove_role_users_request.go -model_remove_user_role_request.go -model_remove_user_role_request_role_id_array_inner.go -model_request_brand.go -model_revoke_tokens_request.go -model_risk_device.go -model_risk_rule.go -model_risk_user.go -model_role.go -model_rule_action.go -model_rule_condition.go -model_saml_app.go -model_saml_app_all_of.go -model_saml_app_all_of_parameters.go -model_saml_app_all_of_parameters_saml_username.go -model_saml_assert.go -model_saml_factor.go -model_scope.go -model_send_invite_link_200_response.go -model_send_invite_link_request.go -model_session.go -model_set_user_state_request.go -model_source.go -model_sso_oidc.go -model_sso_saml.go -model_sso_saml_certificate.go -model_token_claim.go -model_track_risk_event_request.go -model_update_client_app_request.go -model_update_environment_variable_request.go -model_update_password_insecure_request.go -model_update_password_secure_request.go -model_update_privilege_200_response.go -model_update_risk_rule_request.go -model_update_role_200_response.go -model_user.go -model_ver_factor_saml_200_response.go -model_verb.go -model_verify_mfa_factor_request.go -model_verify_user_registration_200_response.go -model_verify_user_registration_request.go -model_verify_user_verification_request.go -response.go -test/api_api_auth_claims_test.go -test/api_api_auth_client_apps_test.go -test/api_api_auth_scopes_test.go -test/api_api_authorization_server_test.go -test/api_app_rules_test.go -test/api_apps_test.go -test/api_branding_service_smtp_test.go -test/api_branding_service_templates_test.go -test/api_branding_service_test.go -test/api_events_test.go -test/api_groups_test.go -test/api_invite_links_test.go -test/api_multi_factor_authentication_test.go -test/api_multi_factor_authentication_v1_test.go -test/api_o_auth2_test.go -test/api_privileges_test.go -test/api_roles_test.go -test/api_saml_assertions_test.go -test/api_smart_hooks_test.go -test/api_user_mappings_test.go -test/api_users_v1_test.go -test/api_users_v2_test.go -test/api_vigilance_ai_test.go -utils.go diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION deleted file mode 100644 index e7e42a4..0000000 --- a/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.3.0 \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index f5cb2ce..0000000 --- a/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: go - -install: - - go get -d -v . - -script: - - go build -v ./ - diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 8b13789..0000000 --- a/CHANGELOG.md +++ /dev/null @@ -1 +0,0 @@ - diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..389489f --- /dev/null +++ b/LICENSE @@ -0,0 +1,22 @@ +Copyright (c) 2010-2021 OneLogin, Inc. + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/Makefile b/Makefile index e89c913..49b0319 100644 --- a/Makefile +++ b/Makefile @@ -5,8 +5,7 @@ build: go build './...' test: - go install github.com/jpoles1/gopherbadger@v2.4.0 - gopherbadger -md="readme.md" -png=false + go test -v ./tests/... secure: # or install it into ./bin/ diff --git a/api/openapi.yaml b/api/openapi.yaml deleted file mode 100644 index f16692b..0000000 --- a/api/openapi.yaml +++ /dev/null @@ -1,15202 +0,0 @@ -openapi: 3.0.3 -info: - contact: - name: OneLogin - url: https://support.onelogin.com - description: OpenAPI Specification for OneLogin - title: OneLogin API - version: 3.1.1 -servers: -- url: https://your-api-subdomain.onelogin.com -tags: -- description: OAuth2 - name: OAuth2 -- description: Collection of APIs that allow you to configure OneLogin as an Authorization - server - name: API Authorization Server -- description: Access and Authorization Scopes - name: "API Auth: Scopes" -- description: Regarding Token Claims - name: "API Auth: Claims" -- name: "API Auth: Client Apps" -- description: App Management Endpoint - name: Apps -- description: Application Rule policy creation and enforcement - name: App Rules -- description: General Branding Service Endpoints - name: Branding Service -- description: Branding Service Endpoints for custom templates - name: "Branding Service: Templates" -- description: Branding Service Endpoints for SMTP - name: "Branding Service: SMTP" -- description: "Event Types, IDs, tracking, tracing, and more" - name: Events -- description: Group Management Endpoint - name: Groups -- description: Invite Via Email Link - name: Invite Links -- description: "Multi Factor Authentication (MFA), One Time Passcodes (OTP)" - name: Multi Factor Authentication -- description: "Deprecated Multi Factor Authentication (MFA), One Time Passcodes (OTP)" - name: Multi Factor Authentication V1 -- description: Privilege Management Endpoint - name: Privileges -- description: Role Management Endpoint - name: Roles -- description: Dealing with SAML Authentication protocol - name: SAML Assertions -- description: User Management Endpoint Version 1 - name: Users V1 -- description: User Management Endpoint Version 2 - name: Users V2 -- description: User Mappings Management Endpoint - name: User Mappings -- description: Risk service Endpoint - name: Vigilance AI -- description: Smart Hook extensions - name: Smart Hooks -paths: - /auth/oauth2/v2/token: - post: - description: Generate Token - operationId: generateToken - parameters: - - example: application/json - explode: false - in: header - name: Content-Type - required: false - schema: - default: application/json - type: string - style: simple - requestBody: - content: - application/json: - example: - grant_type: client_credentials - schema: - $ref: '#/components/schemas/generateToken_request' - description: Request Body to Generate OAuth Token - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/oauth_token' - description: Successful Response - "400": - content: - application/json: - example: - error: true - code: 400 - type: bad request - message: Request Failure - schema: - $ref: '#/components/schemas/Error' - description: Bad Request - "401": - content: - application/json: - example: - error: true - code: 401 - type: Unauthorized - message: Unauthorized Error - schema: - $ref: '#/components/schemas/Error' - description: Unauthorized - "404": - content: - application/json: - example: - error: true - code: 404 - type: Not Found - message: No Route Exists - schema: - $ref: '#/components/schemas/Error' - description: Not Found - security: - - basicAuth: [] - summary: Generate Token - tags: - - OAuth2 - /auth/oauth2/revoke: - post: - description: Revoke Tokens - operationId: revokeTokens - parameters: - - example: application/json - explode: false - in: header - name: Content-Type - required: false - schema: - default: application/json - type: string - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/revokeTokens_request' - responses: - "200": - content: - application/json: - example: - error: false - code: 200 - type: success - message: sucess - schema: - $ref: '#/components/schemas/Error' - description: Successful response - "400": - content: - application/json: - example: - error: true - code: 400 - type: bad request - message: Request Failure - schema: - $ref: '#/components/schemas/Error' - description: Bad Request - "401": - content: - application/json: - example: - error: true - code: 401 - type: Unauthorized - message: Unauthorized Error - schema: - $ref: '#/components/schemas/Error' - description: Unauthorized - "404": - content: - application/json: - example: - error: true - code: 404 - type: Not Found - message: No Route Exists - schema: - $ref: '#/components/schemas/Error' - description: Not Found - security: - - basicAuth: [] - summary: Revoke Tokens - tags: - - OAuth2 - /auth/rate_limit: - get: - description: Get Rate Limit - operationId: getRateLimit - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/getRateLimit_200_response' - description: Successful response - "400": - content: - application/json: - example: - error: true - code: 400 - type: bad request - message: Request Failure - schema: - $ref: '#/components/schemas/Error' - description: Bad Request - "401": - content: - application/json: - example: - error: true - code: 401 - type: Unauthorized - message: Unauthorized Error - schema: - $ref: '#/components/schemas/Error' - description: Unauthorized - "404": - content: - application/json: - example: - error: true - code: 404 - type: Not Found - message: No Route Exists - schema: - $ref: '#/components/schemas/Error' - description: Not Found - security: - - OAuth2: - - Read Users - - Manage users - - Manage All - - Read All - summary: Get Rate Limit - tags: - - OAuth2 - /api/2/api_authorizations: - get: - description: List Authorization Servers - operationId: listAuthServers - responses: - "200": - content: - application/json: - schema: - items: - $ref: '#/components/schemas/auth_server' - type: array - description: Successful response - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - security: - - OAuth2: - - Manage All - summary: List Api Auth Servers - tags: - - API Authorization Server - post: - description: Create Auth Server - operationId: createAuthServer - parameters: - - example: application/json - explode: false - in: header - name: Content-Type - required: false - schema: - default: application/json - type: string - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/auth_server' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/auth_server' - description: Successful response - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - "422": - content: - application/json: - example: - statusCode: 422 - name: UnprocessableEntityError - message: invalid value in \"auth_method\" - schema: - $ref: '#/components/schemas/altErr' - description: Unprocessable Entity - security: - - OAuth2: - - Manage All - summary: Create Api Auth Server - tags: - - API Authorization Server - /api/2/api_authorizations/{api_auth_id}: - delete: - description: Delete Authentication Server - operationId: deleteAuthServer - parameters: - - example: application/json - explode: false - in: header - name: Content-Type - required: false - schema: - default: application/json - type: string - style: simple - - explode: false - in: path - name: api_auth_id - required: true - schema: - type: string - style: simple - responses: - "204": - description: Success. The auth server is deleted. No content is returned. - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - "404": - content: - application/json: - example: - statusCode: 404 - name: NotFoundError - message: The resource can't be found or the server has not found anything - matching the Request-URI - schema: - $ref: '#/components/schemas/altErr' - description: Not Found - security: - - OAuth2: - - Manage All - - Read All - summary: Delete Api Auth Server - tags: - - API Authorization Server - get: - description: Get Authorization Server - operationId: getAuthServer - parameters: - - example: application/json - explode: false - in: header - name: Content-Type - required: false - schema: - default: application/json - type: string - style: simple - - explode: false - in: path - name: api_auth_id - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/auth_server' - description: Successful response - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - security: - - OAuth2: - - Manage All - summary: Get Api Auth Server - tags: - - API Authorization Server - put: - description: Update Authorization Server - operationId: updateAuthServer - parameters: - - example: application/json - explode: false - in: header - name: Content-Type - required: false - schema: - default: application/json - type: string - style: simple - - explode: false - in: path - name: api_auth_id - required: true - schema: - type: string - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/auth_server' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/auth_server' - description: Successful response - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - "404": - content: - application/json: - example: - statusCode: 404 - name: NotFoundError - message: The resource can't be found or the server has not found anything - matching the Request-URI - schema: - $ref: '#/components/schemas/altErr' - description: Not Found - "422": - content: - application/json: - example: - statusCode: 422 - name: UnprocessableEntityError - message: invalid value in \"auth_method\" - schema: - $ref: '#/components/schemas/altErr' - description: Unprocessable Entity - security: - - OAuth2: - - Manage All - summary: Update Api Auth Server - tags: - - API Authorization Server - /api/2/api_authorizations/{api_auth_id}/scopes: - get: - description: List Authorization Scopes - operationId: getScopes - parameters: - - example: application/json - explode: false - in: header - name: Content-Type - required: false - schema: - default: application/json - type: string - style: simple - - explode: false - in: path - name: api_auth_id - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - schema: - items: - $ref: '#/components/schemas/auth_scope' - type: array - description: Successful response - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - security: - - OAuth2: - - Manage All - summary: Get Api Auth Server Scopes - tags: - - "API Auth: Scopes" - post: - description: Create API Auth Server Scope - operationId: createScope - parameters: - - example: application/json - explode: false - in: header - name: Content-Type - required: false - schema: - default: application/json - type: string - style: simple - - explode: false - in: path - name: api_auth_id - required: true - schema: - type: string - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/auth_scope' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/auth_scope' - description: Successful response - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - "404": - content: - application/json: - example: - statusCode: 404 - name: NotFoundError - message: The resource can't be found or the server has not found anything - matching the Request-URI - schema: - $ref: '#/components/schemas/altErr' - description: Not Found - "422": - content: - application/json: - example: - statusCode: 422 - name: UnprocessableEntityError - message: invalid value in \"auth_method\" - schema: - $ref: '#/components/schemas/altErr' - description: Unprocessable Entity - security: - - OAuth2: - - Manage All - summary: Create Api Auth Server Scope - tags: - - "API Auth: Scopes" - /api/2/api_authorizations/{api_auth_id}/scopes/{scope_id}: - delete: - description: Delete Scope - operationId: deleteScope - parameters: - - example: application/json - explode: false - in: header - name: Content-Type - required: false - schema: - default: application/json - type: string - style: simple - - explode: false - in: path - name: api_auth_id - required: true - schema: - type: string - style: simple - - explode: false - in: path - name: scope_id - required: true - schema: - type: integer - style: simple - responses: - "204": - description: Success. The scope is deleted. No content is returned. - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - "404": - content: - application/json: - example: - statusCode: 404 - name: NotFoundError - message: The resource can't be found or the server has not found anything - matching the Request-URI - schema: - $ref: '#/components/schemas/altErr' - description: Not Found - security: - - OAuth2: - - Manage All - summary: Delete Api Auth Server Scope - tags: - - "API Auth: Scopes" - put: - description: Update Scope - operationId: updateScope - parameters: - - example: application/json - explode: false - in: header - name: Content-Type - required: false - schema: - default: application/json - type: string - style: simple - - explode: false - in: path - name: api_auth_id - required: true - schema: - type: string - style: simple - - explode: false - in: path - name: scope_id - required: true - schema: - type: integer - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/auth_scope' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/auth_id' - description: Successful response - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - "404": - content: - application/json: - example: - statusCode: 404 - name: NotFoundError - message: The resource can't be found or the server has not found anything - matching the Request-URI - schema: - $ref: '#/components/schemas/altErr' - description: Not Found - "422": - content: - application/json: - example: - statusCode: 422 - name: UnprocessableEntityError - message: invalid value in \"auth_method\" - schema: - $ref: '#/components/schemas/altErr' - description: Unprocessable Entity - security: - - OAuth2: - - Manage All - summary: Update Api Auth Server Scope - tags: - - "API Auth: Scopes" - /api/2/api_authorizations/{api_auth_id}/claims: - get: - description: Get Authorization claims - operationId: getAuthclaims - parameters: - - example: application/json - explode: false - in: header - name: Content-Type - required: false - schema: - default: application/json - type: string - style: simple - - explode: false - in: path - name: api_auth_id - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - schema: - items: - $ref: '#/components/schemas/token_claim' - type: array - description: Successful response - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - "404": - content: - application/json: - example: - statusCode: 404 - name: NotFoundError - message: The resource can't be found or the server has not found anything - matching the Request-URI - schema: - $ref: '#/components/schemas/altErr' - description: Not Found - security: - - OAuth2: - - Manage All - summary: Get Api Auth Server claims - tags: - - "API Auth: Claims" - post: - description: Create Authorization Claim - operationId: createAuthClaim - parameters: - - example: application/json - explode: false - in: header - name: Content-Type - required: false - schema: - default: application/json - type: string - style: simple - - explode: false - in: path - name: api_auth_id - required: true - schema: - type: string - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/auth_claim' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/id' - description: Successful response - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - "404": - content: - application/json: - example: - statusCode: 404 - name: NotFoundError - message: The resource can't be found or the server has not found anything - matching the Request-URI - schema: - $ref: '#/components/schemas/altErr' - description: Not Found - "422": - content: - application/json: - example: - statusCode: 422 - name: UnprocessableEntityError - message: invalid value in \"auth_method\" - schema: - $ref: '#/components/schemas/altErr' - description: Unprocessable Entity - security: - - OAuth2: - - Manage All - summary: Create Api Auth Server Claim - tags: - - "API Auth: Claims" - /api/2/api_authorizations/{api_auth_id}/claims/{claim_id}: - delete: - description: Delete Authorization Claim - operationId: deleteAuthClaim - parameters: - - example: application/json - explode: false - in: header - name: Content-Type - required: false - schema: - default: application/json - type: string - style: simple - - explode: false - in: path - name: api_auth_id - required: true - schema: - type: string - style: simple - - explode: false - in: path - name: claim_id - required: true - schema: - type: integer - style: simple - responses: - "204": - description: Success. The claim is deleted. No content is returned. - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - "404": - content: - application/json: - example: - statusCode: 404 - name: NotFoundError - message: The resource can't be found or the server has not found anything - matching the Request-URI - schema: - $ref: '#/components/schemas/altErr' - description: Not Found - security: - - OAuth2: - - Manage All - summary: Delete Api Auth Server Claim - tags: - - "API Auth: Claims" - put: - description: Update Authorization Server Claim - operationId: updateClaim - parameters: - - example: application/json - explode: false - in: header - name: Content-Type - required: false - schema: - default: application/json - type: string - style: simple - - explode: false - in: path - name: api_auth_id - required: true - schema: - type: string - style: simple - - explode: false - in: path - name: claim_id - required: true - schema: - type: integer - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/auth_claim' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/auth_id' - description: Successful response - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - "404": - content: - application/json: - example: - statusCode: 404 - name: NotFoundError - message: The resource can't be found or the server has not found anything - matching the Request-URI - schema: - $ref: '#/components/schemas/altErr' - description: Not Found - "422": - content: - application/json: - example: - statusCode: 422 - name: UnprocessableEntityError - message: invalid value in \"auth_method\" - schema: - $ref: '#/components/schemas/altErr' - description: Unprocessable Entity - security: - - OAuth2: - - Manage All - summary: Update Api Auth Server Claim - tags: - - "API Auth: Claims" - /api/2/api_authorizations/{api_auth_id}/clients: - get: - description: List Client Apps - operationId: listClientApps - parameters: - - example: application/json - explode: false - in: header - name: Content-Type - required: false - schema: - default: application/json - type: string - style: simple - - explode: false - in: path - name: api_auth_id - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/client_app_full' - description: Successful response - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - "404": - content: - application/json: - example: - statusCode: 404 - name: NotFoundError - message: The resource can't be found or the server has not found anything - matching the Request-URI - schema: - $ref: '#/components/schemas/altErr' - description: Not Found - security: - - OAuth2: - - Manage All - summary: List Clients Apps - tags: - - "API Auth: Client Apps" - post: - description: Add Client App - operationId: addClientApp - parameters: - - example: application/json - explode: false - in: header - name: Content-Type - required: false - schema: - default: application/json - type: string - style: simple - - explode: false - in: path - name: api_auth_id - required: true - schema: - type: string - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/addClientApp_request' - responses: - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/addClientApp_201_response' - description: Created - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - "404": - content: - application/json: - example: - statusCode: 404 - name: NotFoundError - message: The resource can't be found or the server has not found anything - matching the Request-URI - schema: - $ref: '#/components/schemas/altErr' - description: Not Found - "422": - content: - application/json: - example: - statusCode: 422 - name: UnprocessableEntityError - message: invalid value in \"auth_method\" - schema: - $ref: '#/components/schemas/altErr' - description: Unprocessable Entity - security: - - OAuth2: - - Manage All - summary: Add Client App - tags: - - "API Auth: Client Apps" - /api/2/api_authorizations/{api_auth_id}/clients/{client_app_id}: - delete: - description: Delete Client App - operationId: deleteClientApp - parameters: - - example: application/json - explode: false - in: header - name: Content-Type - required: false - schema: - default: application/json - type: string - style: simple - - explode: false - in: path - name: api_auth_id - required: true - schema: - type: string - style: simple - - explode: false - in: path - name: client_app_id - required: true - schema: - type: integer - style: simple - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/addClientApp_201_response' - description: Successful response - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - "404": - content: - application/json: - example: - statusCode: 404 - name: NotFoundError - message: The resource can't be found or the server has not found anything - matching the Request-URI - schema: - $ref: '#/components/schemas/altErr' - description: Not Found - "422": - content: - application/json: - example: - statusCode: 422 - name: UnprocessableEntityError - message: invalid value in \"auth_method\" - schema: - $ref: '#/components/schemas/altErr' - description: Unprocessable Entity - security: - - OAuth2: - - Manage All - summary: Remove Client App - tags: - - "API Auth: Client Apps" - put: - description: Update Client App - operationId: updateClientApp - parameters: - - example: application/json - explode: false - in: header - name: Content-Type - required: false - schema: - default: application/json - type: string - style: simple - - explode: false - in: path - name: api_auth_id - required: true - schema: - type: string - style: simple - - explode: false - in: path - name: client_app_id - required: true - schema: - type: integer - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/updateClientApp_request' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/addClientApp_201_response' - description: Successful Response - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - "404": - content: - application/json: - example: - statusCode: 404 - name: NotFoundError - message: The resource can't be found or the server has not found anything - matching the Request-URI - schema: - $ref: '#/components/schemas/altErr' - description: Not Found - "422": - content: - application/json: - example: - statusCode: 422 - name: UnprocessableEntityError - message: invalid value in \"auth_method\" - schema: - $ref: '#/components/schemas/altErr' - description: Unprocessable Entity - security: - - OAuth2: - - Manage All - summary: Update Client App - tags: - - "API Auth: Client Apps" - /api/1/events: - get: - description: Get Events - operationId: getEvents - parameters: - - explode: true - in: query - name: event_type_id - required: false - schema: - items: - type: integer - type: array - style: form - - explode: true - in: query - name: client_id - required: false - schema: - type: integer - style: form - - explode: true - in: query - name: directory_id - required: false - schema: - type: integer - style: form - - explode: true - in: query - name: id - required: false - schema: - $ref: '#/components/schemas/id' - style: form - - explode: true - in: query - name: created_at - required: false - schema: - type: string - style: form - - explode: true - in: query - name: resolution - required: false - schema: - type: string - style: form - - explode: true - in: query - name: since - required: false - schema: - type: string - style: form - - explode: true - in: query - name: until - required: false - schema: - type: string - style: form - - description: Set to the id of the user that you want to return. - explode: true - in: query - name: user_id - required: false - schema: - $ref: '#/components/schemas/id' - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/getEvents_200_response' - description: OK - "400": - content: - application/json: - example: - error: true - code: 400 - type: bad request - message: Request Failure - schema: - $ref: '#/components/schemas/Error' - description: Bad Request - "401": - content: - application/json: - example: - error: true - code: 401 - type: Unauthorized - message: Unauthorized Error - schema: - $ref: '#/components/schemas/Error' - description: Unauthorized - security: - - OAuth2: - - Read Users - - Manage users - - Manage All - - Read All - summary: Get Events - tags: - - Events - /api/1/events/{event_id}: - get: - description: Get Event By ID - operationId: getEventById - parameters: - - explode: false - in: path - name: event_id - required: true - schema: - type: integer - style: simple - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/getEventById_200_response' - description: Successful response - "400": - content: - application/json: - example: - error: true - code: 400 - type: bad request - message: Request Failure - schema: - $ref: '#/components/schemas/Error' - description: Bad Request - "401": - content: - application/json: - example: - error: true - code: 401 - type: Unauthorized - message: Unauthorized Error - schema: - $ref: '#/components/schemas/Error' - description: Unauthorized - "404": - content: - application/json: - example: - error: true - code: 404 - type: Not Found - message: No Route Exists - schema: - $ref: '#/components/schemas/Error' - description: Not Found - security: - - OAuth2: - - Read Users - - Manage users - - Manage All - - Read All - summary: Get Event by ID - tags: - - Events - /api/1/events/types: - get: - description: Get Event types - operationId: getEventTypes - parameters: - - example: application/json - explode: false - in: header - name: Content-Type - required: false - schema: - default: application/json - type: string - style: simple - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/getEventTypes_200_response' - description: Successful response - summary: Get Event Types - tags: - - Events - /api/1/groups: - get: - description: Get Groups - operationId: getGroups - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/getGroups_200_response' - description: Successful response - "400": - content: - application/json: - example: - error: true - code: 400 - type: bad request - message: Request Failure - schema: - $ref: '#/components/schemas/Error' - description: Bad Request - "401": - content: - application/json: - example: - error: true - code: 401 - type: Unauthorized - message: Unauthorized Error - schema: - $ref: '#/components/schemas/Error' - description: Unauthorized - security: - - OAuth2: - - Manage users - - Manage All - - Read All - - Read Users - summary: Get Groups - tags: - - Groups - /api/1/groups/{group_id}: - get: - description: Get Group By ID - operationId: getGroupById - parameters: - - explode: false - in: path - name: group_id - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/getGroups_200_response' - description: Successful response - "400": - content: - application/json: - example: - error: true - code: 400 - type: bad request - message: Request Failure - schema: - $ref: '#/components/schemas/Error' - description: Bad Request - "401": - content: - application/json: - example: - error: true - code: 401 - type: Unauthorized - message: Unauthorized Error - schema: - $ref: '#/components/schemas/Error' - description: Unauthorized - "404": - content: - application/json: - example: - error: true - code: 404 - type: Not Found - message: No Route Exists - schema: - $ref: '#/components/schemas/Error' - description: Not Found - security: - - OAuth2: - - Read Users - - Manage users - - Manage All - - Read All - summary: Get Group by ID - tags: - - Groups - /api/1/invites/get_invite_link: - post: - description: Generate Invite Link - operationId: getInviteLink - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/getInviteLink_request' - responses: - "200": - content: - application/json: - example: - status: - type: success - message: success - code: 200 - error: false - data: - - http://app.onelogin.com/password/reset?token=1111111cf892e56957e35c9c12f128483031dd11 - schema: - $ref: '#/components/schemas/getInviteLink_200_response' - description: Successful response - "400": - content: - application/json: - example: - error: true - code: 400 - type: bad request - message: Request Failure - schema: - $ref: '#/components/schemas/Error' - description: Bad Request - "401": - content: - application/json: - example: - error: true - code: 401 - type: Unauthorized - message: Unauthorized Error - schema: - $ref: '#/components/schemas/Error' - description: Unauthorized - security: - - OAuth2: - - Manage All - summary: Generate Invite Link - tags: - - Invite Links - /api/1/invites/send_invite_link: - post: - description: Send Invite Link - operationId: sendInviteLink - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/sendInviteLink_request' - responses: - "200": - content: - application/json: - example: - status: - type: success - message: Email sent successfully to jennifer.hasenfus@mail.com - code: 200 - error: false - schema: - $ref: '#/components/schemas/sendInviteLink_200_response' - description: Successful response - "400": - content: - application/json: - example: - error: true - code: 400 - type: bad request - message: Request Failure - schema: - $ref: '#/components/schemas/Error' - description: Bad Request - "401": - content: - application/json: - example: - error: true - code: 401 - type: Unauthorized - message: Unauthorized Error - schema: - $ref: '#/components/schemas/Error' - description: Unauthorized - security: - - OAuth2: - - Manage All - summary: Send Invite Link - tags: - - Invite Links - /api/1/users: - get: - description: List Users - operationId: listUsers - parameters: - - description: How many items to return at one time (max 100) - explode: true - in: query - name: limit - required: false - schema: - format: int32 - type: integer - style: form - - description: The page number of results to return. - explode: true - in: query - name: page - required: false - schema: - type: integer - style: form - - description: Set to the value extracted from Before-Cursor or After-Cursor - headers to return the previous or next page. - explode: true - in: query - name: cursor - required: false - schema: - type: string - style: form - - description: An ISO8601 timestamp value that returns all users created after - a given date & time. - explode: true - in: query - name: created_since - required: false - schema: - type: string - style: form - - description: An ISO8601 timestamp value that returns all users created before - a given date & time. - explode: true - in: query - name: created_until - required: false - schema: - type: string - style: form - - description: An ISO8601 timestamp value that returns all users updated after - a given date & time. - explode: true - in: query - name: updated_since - required: false - schema: - type: string - style: form - - description: An ISO8601 timestamp value that returns all users updated before - a given date & time. - explode: true - in: query - name: updated_until - required: false - schema: - type: string - style: form - - description: An ISO8601 timestamp value that returns all users that logged - in after a given date & time. - explode: true - in: query - name: last_login_since - required: false - schema: - type: string - style: form - - description: An ISO8601 timestamp value that returns all users that logged - in before a given date & time. - explode: true - in: query - name: last_login_until - required: false - schema: - type: string - style: form - - description: The first name of the user - explode: true - in: query - name: firstname - required: false - schema: - type: string - style: form - - description: The last name of the user - explode: true - in: query - name: lastname - required: false - schema: - type: string - style: form - - description: The email address of the user - explode: true - in: query - name: email - required: false - schema: - type: string - style: form - - description: The username for the user - explode: true - in: query - name: username - required: false - schema: - type: string - style: form - - description: The AD login name for the user - explode: true - in: query - name: samaccountname - required: false - schema: - type: string - style: form - - explode: true - in: query - name: directory_id - required: false - schema: - type: integer - style: form - - description: An external identifier that has been set on the user - explode: true - in: query - name: external_id - required: false - schema: - type: string - style: form - - description: A comma separated list of OneLogin User IDs - explode: true - in: query - name: user_ids - required: false - schema: - type: string - style: form - - description: The short name of a custom attribute. Note that the attribute - name is prefixed with custom_attributes. - explode: true - in: query - name: "custom_attributes.{attribute_name}" - required: false - schema: - type: string - style: form - - description: Optional. Comma delimited list of fields to return. - explode: true - in: query - name: fields - required: false - schema: - enum: - - apps - - users - - admins - type: string - style: form - responses: - "200": - content: - application/json: - schema: - items: - $ref: '#/components/schemas/user' - type: array - description: OK - headers: - Current-Page: - $ref: '#/components/headers/Current-Page' - Page-Items: - $ref: '#/components/headers/Page-Items' - Total-Count: - $ref: '#/components/headers/Total-Count' - Total-Pages: - $ref: '#/components/headers/Total-Pages' - Link: - $ref: '#/components/headers/Link' - Before-Cursor: - $ref: '#/components/headers/Before-Cursor' - After-Cursor: - $ref: '#/components/headers/After-Cursor' - "400": - content: - application/json: - example: - error: true - code: 400 - type: bad request - message: Request Failure - schema: - $ref: '#/components/schemas/Error' - description: Bad Request - "401": - content: - application/json: - example: - error: true - code: 401 - type: Unauthorized - message: Unauthorized Error - schema: - $ref: '#/components/schemas/Error' - description: Unauthorized - "422": - content: - application/json: - example: - error: true - code: 422 - type: UnprocessableEntityError - message: "Validation failed: Value has already been taken" - schema: - $ref: '#/components/schemas/Error' - description: Unprocessable - security: - - OAuth2: - - Manage users - - Manage All - - Read All - - Read Users - summary: List Users - tags: - - Users V1 - post: - description: Create a User - operationId: createUser - parameters: - - description: Controls how mappings will be applied to the user on creation. - Defaults to async. - explode: true - in: query - name: mappings - required: false - schema: - enum: - - async - - sync - - disabled - type: string - style: form - - description: Will passwords validate against the User Policy? Defaults to - true. - explode: true - in: query - name: validate_policy - required: false - schema: - type: boolean - style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/user' - responses: - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/user' - description: The full user resource is returned - "400": - content: - application/json: - example: - error: true - code: 400 - type: bad request - message: Request Failure - schema: - $ref: '#/components/schemas/Error' - description: Bad Request - "401": - content: - application/json: - example: - error: true - code: 401 - type: Unauthorized - message: Unauthorized Error - schema: - $ref: '#/components/schemas/Error' - description: Unauthorized - "422": - content: - application/json: - example: - error: true - code: 422 - type: UnprocessableEntityError - message: "Validation failed: Value has already been taken" - schema: - $ref: '#/components/schemas/Error' - description: Unprocessable - security: - - OAuth2: - - Manage users - - Manage All - summary: Create a User - tags: - - Users V1 - /api/1/users/{user_id}: - delete: - description: Delete A User - operationId: deleteUser - parameters: - - description: Set to the id of the user that you want to return. - explode: false - in: path - name: user_id - required: true - schema: - $ref: '#/components/schemas/id' - style: simple - responses: - "204": - description: "On success, no content is returned in the response body." - "401": - content: - application/json: - example: - error: true - code: 401 - type: Unauthorized - message: Unauthorized Error - schema: - $ref: '#/components/schemas/Error' - description: Unauthorized - "404": - content: - application/json: - example: - error: true - code: 404 - type: Not Found - message: No Route Exists - schema: - $ref: '#/components/schemas/Error' - description: Not Found - security: - - OAuth2: - - Manage users - - Manage All - summary: Delete a User - tags: - - Users V1 - get: - description: Get User By ID - operationId: getUserById - parameters: - - description: Set to the id of the user that you want to return. - explode: false - in: path - name: user_id - required: true - schema: - $ref: '#/components/schemas/id' - style: simple - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/user' - description: OK - "400": - content: - application/json: - example: - error: true - code: 400 - type: bad request - message: Request Failure - schema: - $ref: '#/components/schemas/Error' - description: Bad Request - "404": - content: - application/json: - example: - error: true - code: 404 - type: Not Found - message: No Route Exists - schema: - $ref: '#/components/schemas/Error' - description: Not Found - security: - - OAuth2: - - Manage users - - Manage All - - Read All - - Read Users - summary: Get User by ID - tags: - - Users V1 - put: - description: Update a User - operationId: updateUser - parameters: - - description: Set to the id of the user that you want to return. - explode: false - in: path - name: user_id - required: true - schema: - $ref: '#/components/schemas/id' - style: simple - - description: Controls how mappings will be applied to the user on creation. - Defaults to async. - explode: true - in: query - name: mappings - required: false - schema: - enum: - - async - - sync - - disabled - type: string - style: form - - description: Will passwords validate against the User Policy? Defaults to - true. - explode: true - in: query - name: validate_policy - required: false - schema: - type: boolean - style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/user' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/user' - description: The full user resource is returned - "400": - content: - application/json: - example: - error: true - code: 400 - type: bad request - message: Request Failure - schema: - $ref: '#/components/schemas/Error' - description: Bad Request - "401": - content: - application/json: - example: - error: true - code: 401 - type: Unauthorized - message: Unauthorized Error - schema: - $ref: '#/components/schemas/Error' - description: Unauthorized - "404": - content: - application/json: - example: - error: true - code: 404 - type: Not Found - message: No Route Exists - schema: - $ref: '#/components/schemas/Error' - description: Not Found - "422": - content: - application/json: - example: - error: true - code: 422 - type: UnprocessableEntityError - message: "Validation failed: Value has already been taken" - schema: - $ref: '#/components/schemas/Error' - description: Unprocessable - security: - - OAuth2: - - Manage users - - Manage All - summary: Update a User - tags: - - Users V1 - /api/1/users/{user_id}/apps: - get: - description: Get Apps for User - operationId: getUserApps - parameters: - - description: Set to the id of the user that you want to return. - explode: false - in: path - name: user_id - required: true - schema: - $ref: '#/components/schemas/id' - style: simple - - description: Defaults to `false`. When `true` will show all apps that are - assigned to a user regardless of their portal visibility setting. - explode: true - in: query - name: ignore_visibility - required: false - schema: - default: false - type: boolean - style: form - responses: - "200": - content: - application/json: - schema: - items: - $ref: '#/components/schemas/getUserApps_200_response_inner' - type: array - description: OK - "401": - content: - application/json: - example: - error: true - code: 401 - type: Unauthorized - message: Unauthorized Error - schema: - $ref: '#/components/schemas/Error' - description: Unauthorized - "404": - content: - application/json: - example: - error: true - code: 404 - type: Not Found - message: No Route Exists - schema: - $ref: '#/components/schemas/Error' - description: Not Found - security: - - OAuth2: - - Manage users - - Manage All - - Read All - - Read Users - summary: Get Apps for a User - tags: - - Users V1 - /api/1/users/{user_id}/roles: - get: - description: Get User Roles - operationId: getUserRoles - parameters: - - description: Set to the id of the user that you want to return. - explode: false - in: path - name: user_id - required: true - schema: - $ref: '#/components/schemas/id' - style: simple - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/getUserRoles_200_response' - description: Successful response - "400": - content: - application/json: - example: - error: true - code: 400 - type: bad request - message: Request Failure - schema: - $ref: '#/components/schemas/Error' - description: Bad Request - "401": - content: - application/json: - example: - error: true - code: 401 - type: Unauthorized - message: Unauthorized Error - schema: - $ref: '#/components/schemas/Error' - description: Unauthorized - "403": - content: - application/json: - example: - error: true - code: 403 - type: ForbiddenError - message: not allowed - schema: - $ref: '#/components/schemas/Error' - description: Forbidden - "404": - content: - application/json: - example: - error: true - code: 404 - type: Not Found - message: No Route Exists - schema: - $ref: '#/components/schemas/Error' - description: Not Found - security: - - OAuth2: - - Manage All - - Read All - summary: Get Roles for a User - tags: - - Users V1 - /api/1/users/set_password_clear_text/{user_id}: - put: - description: Update User password using their ID. This is done in cleartext - and is insecure. - operationId: updatePasswordInsecure - parameters: - - description: Set to the id of the user that you want to return. - explode: false - in: path - name: user_id - required: true - schema: - $ref: '#/components/schemas/id' - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/updatePasswordInsecure_request' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Successful response - "400": - content: - application/json: - example: - error: true - code: 400 - type: bad request - message: Request Failure - schema: - $ref: '#/components/schemas/Error' - description: Bad Request - "401": - content: - application/json: - example: - error: true - code: 401 - type: Unauthorized - message: Unauthorized Error - schema: - $ref: '#/components/schemas/Error' - description: Unauthorized - "403": - content: - application/json: - example: - error: true - code: 403 - type: ForbiddenError - message: not allowed - schema: - $ref: '#/components/schemas/Error' - description: Forbidden - "404": - content: - application/json: - example: - error: true - code: 404 - type: Not Found - message: No Route Exists - schema: - $ref: '#/components/schemas/Error' - description: Not Found - security: - - OAuth2: - - Manage All - summary: Set Password Using ID in Cleartext - tags: - - Users V1 - /api/1/users/set_password_using_salt/{user_id}: - put: - description: Update User Password Using ID and SHA-256 with salt. - operationId: updatePasswordSecure - parameters: - - description: Set to the id of the user that you want to return. - explode: false - in: path - name: user_id - required: true - schema: - $ref: '#/components/schemas/id' - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/updatePasswordSecure_request' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Successful response - "400": - content: - application/json: - example: - error: true - code: 400 - type: bad request - message: Request Failure - schema: - $ref: '#/components/schemas/Error' - description: Bad Request - "401": - content: - application/json: - example: - error: true - code: 401 - type: Unauthorized - message: Unauthorized Error - schema: - $ref: '#/components/schemas/Error' - description: Unauthorized - "403": - content: - application/json: - example: - error: true - code: 403 - type: ForbiddenError - message: not allowed - schema: - $ref: '#/components/schemas/Error' - description: Forbidden - "404": - content: - application/json: - example: - error: true - code: 404 - type: Not Found - message: No Route Exists - schema: - $ref: '#/components/schemas/Error' - description: Not Found - security: - - OAuth2: - - Manage All - summary: Set Password Using ID and SHA-256 and Salt - tags: - - Users V1 - /api/1/users/custom_attributes: - get: - description: Get Custom Attributes - operationId: getCustomAttributes - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/getCustomAttributes_200_response' - description: Successful response - "400": - content: - application/json: - example: - error: true - code: 400 - type: bad request - message: Request Failure - schema: - $ref: '#/components/schemas/Error' - description: Bad Request - "401": - content: - application/json: - example: - error: true - code: 401 - type: Unauthorized - message: Unauthorized Error - schema: - $ref: '#/components/schemas/Error' - description: Unauthorized - security: - - OAuth2: - - Manage users - - Manage All - - Read All - - Read Users - summary: Get Custom Attributes - tags: - - Users V1 - /api/1/users/{user_id}/auth_factor: - get: - description: Get MFA Factors - operationId: getMFAFactors - parameters: - - description: Set to the id of the user that you want to return. - explode: false - in: path - name: user_id - required: true - schema: - $ref: '#/components/schemas/id' - style: simple - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/getMFAFactors_200_response' - description: Successful response - "400": - content: - application/json: - example: - error: true - code: 400 - type: bad request - message: Request Failure - schema: - $ref: '#/components/schemas/Error' - description: Bad Request - "401": - content: - application/json: - example: - error: true - code: 401 - type: Unauthorized - message: Unauthorized Error - schema: - $ref: '#/components/schemas/Error' - description: Unauthorized - "404": - content: - application/json: - example: - error: true - code: 404 - type: Not Found - message: No Route Exists - schema: - $ref: '#/components/schemas/Error' - description: Not Found - security: - - OAuth2: - - Manage users - - Manage All - - Read All - - Read Users - summary: Get Available Factors - tags: - - Multi Factor Authentication V1 - /api/1/users/{user_id}/logout: - put: - description: Log Out User - operationId: logOutUser - parameters: - - description: Set to the id of the user that you want to return. - explode: false - in: path - name: user_id - required: true - schema: - $ref: '#/components/schemas/id' - style: simple - requestBody: - content: - application/json: - schema: - type: object - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Successful response - "400": - content: - application/json: - example: - error: true - code: 400 - type: bad request - message: Request Failure - schema: - $ref: '#/components/schemas/Error' - description: Bad Request - "401": - content: - application/json: - example: - error: true - code: 401 - type: Unauthorized - message: Unauthorized Error - schema: - $ref: '#/components/schemas/Error' - description: Unauthorized - "403": - content: - application/json: - example: - error: true - code: 403 - type: ForbiddenError - message: not allowed - schema: - $ref: '#/components/schemas/Error' - description: Forbidden - "404": - content: - application/json: - example: - error: true - code: 404 - type: Not Found - message: No Route Exists - schema: - $ref: '#/components/schemas/Error' - description: Not Found - security: - - OAuth2: - - Manage users - - Manage All - - Authentication Only - summary: Log User Out - tags: - - Users V1 - /api/1/users/{user_id}/lock_user: - put: - description: Lock User Account - operationId: lockAccountUser - parameters: - - description: Set to the id of the user that you want to return. - explode: false - in: path - name: user_id - required: true - schema: - $ref: '#/components/schemas/id' - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/lockAccountUser_request' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Successful response - "400": - content: - application/json: - example: - error: true - code: 400 - type: bad request - message: Request Failure - schema: - $ref: '#/components/schemas/Error' - description: Bad Request - "401": - content: - application/json: - example: - error: true - code: 401 - type: Unauthorized - message: Unauthorized Error - schema: - $ref: '#/components/schemas/Error' - description: Unauthorized - "403": - content: - application/json: - example: - error: true - code: 403 - type: ForbiddenError - message: not allowed - schema: - $ref: '#/components/schemas/Error' - description: Forbidden - "404": - content: - application/json: - example: - error: true - code: 404 - type: Not Found - message: No Route Exists - schema: - $ref: '#/components/schemas/Error' - description: Not Found - security: - - OAuth2: - - Manage All - summary: Lock User Account - tags: - - Users V1 - /api/1/users/{user_id}/otp_devices: - get: - description: Get Enrolled Factors - operationId: getEnrolledFactors - parameters: - - description: Set to the id of the user that you want to return. - explode: false - in: path - name: user_id - required: true - schema: - $ref: '#/components/schemas/id' - style: simple - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/getEnrolledFactors_200_response' - description: Successful response - "400": - content: - application/json: - example: - error: true - code: 400 - type: bad request - message: Request Failure - schema: - $ref: '#/components/schemas/Error' - description: Bad Request - "401": - content: - application/json: - example: - error: true - code: 401 - type: Unauthorized - message: Unauthorized Error - schema: - $ref: '#/components/schemas/Error' - description: Unauthorized - security: - - OAuth2: - - Manage users - - Manage All - - Read All - - Read Users - summary: Get Enrolled Factors - tags: - - Multi Factor Authentication V1 - post: - description: ' Enroll an Authentication Factor' - operationId: enrollMfaFactor - parameters: - - description: Set to the id of the user that you want to return. - explode: false - in: path - name: user_id - required: true - schema: - $ref: '#/components/schemas/id' - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/otp_device' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/enrollMfaFactor_200_response' - description: Successful response - "400": - content: - application/json: - example: - error: true - code: 400 - type: bad request - message: Request Failure - schema: - $ref: '#/components/schemas/Error' - description: Bad Request - "401": - content: - application/json: - example: - error: true - code: 401 - type: Unauthorized - message: Unauthorized Error - schema: - $ref: '#/components/schemas/Error' - description: Unauthorized - security: - - OAuth2: - - Manage users - - Manage All - summary: Enroll a Factor - tags: - - Multi Factor Authentication V1 - /api/1/users/{user_id}/mfa_token: - post: - description: Generate MFA Token - operationId: generateMFAtoken - parameters: - - description: Set to the id of the user that you want to return. - explode: false - in: path - name: user_id - required: true - schema: - $ref: '#/components/schemas/id' - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/generateMFAtoken_request' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/generateMFAtoken_200_response' - description: Successful response - security: - - OAuth2: - - Manage users - - Manage All - summary: Generate Temp MFA Token - tags: - - Multi Factor Authentication V1 - /api/1/users/{user_id}/add_roles: - put: - description: Add Roles for a User - operationId: addRolesToUser - parameters: - - description: Set to the id of the user that you want to return. - explode: false - in: path - name: user_id - required: true - schema: - $ref: '#/components/schemas/id' - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/addRolesToUser_request' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Successful response - "400": - content: - application/json: - example: - error: true - code: 400 - type: bad request - message: Request Failure - schema: - $ref: '#/components/schemas/Error' - description: Bad Request - "401": - content: - application/json: - example: - error: true - code: 401 - type: Unauthorized - message: Unauthorized Error - schema: - $ref: '#/components/schemas/Error' - description: Unauthorized - "403": - content: - application/json: - example: - error: true - code: 403 - type: ForbiddenError - message: not allowed - schema: - $ref: '#/components/schemas/Error' - description: Forbidden - "404": - content: - application/json: - example: - error: true - code: 404 - type: Not Found - message: No Route Exists - schema: - $ref: '#/components/schemas/Error' - description: Not Found - security: - - OAuth2: - - Manage users - summary: Add Roles for a User - tags: - - Users V1 - /api/1/users/{user_id}/set_state: - put: - description: Set User State - operationId: setUserState - parameters: - - description: Set to the id of the user that you want to return. - explode: false - in: path - name: user_id - required: true - schema: - $ref: '#/components/schemas/id' - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/setUserState_request' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Successful response - "400": - content: - application/json: - example: - error: true - code: 400 - type: bad request - message: Request Failure - schema: - $ref: '#/components/schemas/Error' - description: Bad Request - "401": - content: - application/json: - example: - error: true - code: 401 - type: Unauthorized - message: Unauthorized Error - schema: - $ref: '#/components/schemas/Error' - description: Unauthorized - "403": - content: - application/json: - example: - error: true - code: 403 - type: ForbiddenError - message: not allowed - schema: - $ref: '#/components/schemas/Error' - description: Forbidden - "404": - content: - application/json: - example: - error: true - code: 404 - type: Not Found - message: No Route Exists - schema: - $ref: '#/components/schemas/Error' - description: Not Found - security: - - OAuth2: - - Manage All - summary: Set User State - tags: - - Users V1 - /api/1/users/{user_id}/remove_roles: - put: - description: Remove Roles for a User - operationId: removeUserRole - parameters: - - description: Set to the id of the user that you want to return. - explode: false - in: path - name: user_id - required: true - schema: - $ref: '#/components/schemas/id' - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/removeUserRole_request' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Successful response - "400": - content: - application/json: - example: - error: true - code: 400 - type: bad request - message: Request Failure - schema: - $ref: '#/components/schemas/Error' - description: Bad Request - "401": - content: - application/json: - example: - error: true - code: 401 - type: Unauthorized - message: Unauthorized Error - schema: - $ref: '#/components/schemas/Error' - description: Unauthorized - "403": - content: - application/json: - example: - error: true - code: 403 - type: ForbiddenError - message: not allowed - schema: - $ref: '#/components/schemas/Error' - description: Forbidden - "404": - content: - application/json: - example: - error: true - code: 404 - type: Not Found - message: No Route Exists - schema: - $ref: '#/components/schemas/Error' - description: Not Found - security: - - OAuth2: - - Manage All - summary: Remove Roles for a User - tags: - - Users V1 - /api/1/users/{user_id}/otp_devices/{device_id}: - delete: - description: Remove an enrolled MFA device for a user - operationId: removeMfaFactors - parameters: - - description: Set to the id of the user that you want to return. - explode: false - in: path - name: user_id - required: true - schema: - $ref: '#/components/schemas/id' - style: simple - - explode: false - in: path - name: device_id - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: {} - description: Successful response - "400": - content: - application/json: - example: - error: true - code: 400 - type: bad request - message: Request Failure - schema: - $ref: '#/components/schemas/Error' - description: Bad Request - "401": - content: - application/json: - example: - error: true - code: 401 - type: Unauthorized - message: Unauthorized Error - schema: - $ref: '#/components/schemas/Error' - description: Unauthorized - security: - - OAuth2: - - Manage users - - Manage All - summary: Remove an Enrolled Factor - tags: - - Multi Factor Authentication V1 - /api/1/users/{user_id}/otp_devices/{device_id}/verify: - post: - description: Verify a Factor - operationId: verifyMfaFactor - parameters: - - description: Set to the id of the user that you want to return. - explode: false - in: path - name: user_id - required: true - schema: - $ref: '#/components/schemas/id' - style: simple - - explode: false - in: path - name: device_id - required: true - schema: - type: string - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/verifyMfaFactor_request' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Successful response - "400": - content: - application/json: - example: - error: true - code: 400 - type: bad request - message: Request Failure - schema: - $ref: '#/components/schemas/Error' - description: Bad Request - "401": - content: - application/json: - example: - error: true - code: 401 - type: Unauthorized - message: Unauthorized Error - schema: - $ref: '#/components/schemas/Error' - description: Unauthorized - security: - - OAuth2: - - Manage users - - Manage All - summary: Verify a Factor - tags: - - Multi Factor Authentication V1 - /api/1/users/{user_id}/otp_devices/{device_id}/trigger: - post: - description: Activate a Factor - operationId: activateMfaFactors - parameters: - - description: Set to the id of the user that you want to return. - explode: false - in: path - name: user_id - required: true - schema: - $ref: '#/components/schemas/id' - style: simple - - explode: false - in: path - name: device_id - required: true - schema: - type: string - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/activateMfaFactors_request' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/getEnrolledFactors_200_response' - description: Successful response - "400": - content: - application/json: - example: - error: true - code: 400 - type: bad request - message: Request Failure - schema: - $ref: '#/components/schemas/Error' - description: Bad Request - "401": - content: - application/json: - example: - error: true - code: 401 - type: Unauthorized - message: Unauthorized Error - schema: - $ref: '#/components/schemas/Error' - description: Unauthorized - security: - - OAuth2: - - Manage users - - Manage All - summary: Activate a Factor - tags: - - Multi Factor Authentication V1 - /api/1/privileges: - get: - description: List Privileges - operationId: listPriveleges - responses: - "200": - content: - application/json: - schema: - items: - $ref: '#/components/schemas/privilege' - type: array - description: Successful response - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - security: - - OAuth2: - - Manage All - summary: List Privileges - tags: - - Privileges - post: - description: Create privilege - operationId: createPrivilege - requestBody: - content: - application/json: - example: - name: User Helpdesk - description: Can administer helpdesk users - privilege: - Version: 2018-05-18 - Statement: - - Effect: Allow - Action: - - Users:List - - Users:Get - - Users:Unlock - - Users:ResetPassword - - Users:GenerateTempMfaToken - Scope: - - '*' - schema: - $ref: '#/components/schemas/privilege' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/createPrivilege_200_response' - description: Successful response - "400": - content: - application/json: - example: - statusCode: 400 - name: BadRequestError - message: "The request could not be understood by the server due to\ - \ malformed syntax: Statement required Action array" - schema: - $ref: '#/components/schemas/altErr' - description: Bad Request - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - security: - - OAuth2: - - Manage All - summary: Create a Privilege - tags: - - Privileges - /api/1/privileges/{privilege_id}: - delete: - description: Delete - operationId: deletePrivilege - parameters: - - explode: false - in: path - name: privilege_id - required: true - schema: - type: string - style: simple - responses: - "204": - description: No Content - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - "404": - content: - application/json: - example: - statusCode: 404 - name: NotFoundError - message: The resource can't be found or the server has not found anything - matching the Request-URI - schema: - $ref: '#/components/schemas/altErr' - description: Not Found - security: - - OAuth2: - - Manage All - summary: Delete a Privilege - tags: - - Privileges - get: - description: Get a Privilige - operationId: getPrivilege - parameters: - - explode: false - in: path - name: privilege_id - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/privilege' - description: Successful response - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - "404": - content: - application/json: - example: - statusCode: 404 - name: NotFoundError - message: The resource can't be found or the server has not found anything - matching the Request-URI - schema: - $ref: '#/components/schemas/altErr' - description: Not Found - security: - - OAuth2: - - Manage All - summary: Get a Privilege - tags: - - Privileges - put: - description: Update privilege - operationId: updatePrivilege - parameters: - - explode: false - in: path - name: privilege_id - required: true - schema: - type: string - style: simple - requestBody: - content: - application/json: - example: - name: User Administrator - description: Can administer users - privilege: - Version: 2018-05-18 - Statement: - - Effect: Allow - Action: - - Users:List - - Users:Get - - Users:Unlock - - Users:ResetPassword - - Users:GenerateTempMfaToken - Scope: - - '*' - schema: - $ref: '#/components/schemas/privilege' - responses: - "200": - content: - application/json: - example: - id: 5e43a548-e9c6-47be-9341-92160902f7a6 - schema: - $ref: '#/components/schemas/updatePrivilege_200_response' - description: Successful response - "400": - content: - application/json: - example: - statusCode: 400 - name: BadRequestError - message: "The request could not be understood by the server due to\ - \ malformed syntax: Statement required Action array" - schema: - $ref: '#/components/schemas/altErr' - description: Bad Request - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - security: - - OAuth2: - - Manage All - summary: Update a Privilege - tags: - - Privileges - /api/1/privileges/{privilege_id}/roles: - get: - description: List roles for privilege - operationId: listPrivelegeRoles - parameters: - - explode: false - in: path - name: privilege_id - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/listPrivelegeRoles_200_response' - description: Successful response - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - "404": - content: - application/json: - example: - statusCode: 404 - name: NotFoundError - message: The resource can't be found or the server has not found anything - matching the Request-URI - schema: - $ref: '#/components/schemas/altErr' - description: Not Found - security: - - OAuth2: - - Manage All - summary: Get Roles assigned to Privilege - tags: - - Privileges - post: - description: 'Add roles to privilege ' - operationId: addPrivilegeToRole - parameters: - - explode: false - in: path - name: privilege_id - required: true - schema: - type: string - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/addPrivilegeToRole_request' - responses: - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/addPrivilegeToRole_201_response' - description: Created - "400": - content: - application/json: - example: - statusCode: 400 - name: BadRequestError - message: "The request could not be understood by the server due to\ - \ malformed syntax: Statement required Action array" - schema: - $ref: '#/components/schemas/altErr' - description: Bad Request - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - security: - - OAuth2: - - Manage All - summary: Assign a Privilege to Roles - tags: - - Privileges - /api/1/privileges/{privilege_id}/roles/{role_id}: - delete: - description: Add roles to privilege - operationId: deleteRoleFromPrivilege - parameters: - - explode: false - in: path - name: privilege_id - required: true - schema: - type: string - style: simple - - description: Set to the id of the role you want to return. - explode: false - in: path - name: role_id - required: true - schema: - type: string - style: simple - responses: - "204": - description: No Content - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - "404": - content: - application/json: - example: - statusCode: 404 - name: NotFoundError - message: The resource can't be found or the server has not found anything - matching the Request-URI - schema: - $ref: '#/components/schemas/altErr' - description: Not Found - security: - - OAuth2: - - Manage All - summary: Remove a Privilege from a Role - tags: - - Privileges - /api/1/privileges/{privilege_id}/users: - get: - description: Get Assigned Users - operationId: getAssignedUser - parameters: - - explode: false - in: path - name: privilege_id - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/getAssignedUser_200_response' - description: Successful response - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - "404": - content: - application/json: - example: - statusCode: 404 - name: NotFoundError - message: The resource can't be found or the server has not found anything - matching the Request-URI - schema: - $ref: '#/components/schemas/altErr' - description: Not Found - security: - - OAuth2: - - Manage All - summary: Get Users assigned to a Privilege - tags: - - Privileges - post: - description: Assign Users to Privilege - operationId: assignUsersToPrivilege - parameters: - - explode: false - in: path - name: privilege_id - required: true - schema: - type: string - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/assignUsersToPrivilege_request' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/addPrivilegeToRole_201_response' - description: Successful response - "400": - content: - application/json: - example: - statusCode: 400 - name: BadRequestError - message: "The request could not be understood by the server due to\ - \ malformed syntax: Statement required Action array" - schema: - $ref: '#/components/schemas/altErr' - description: Bad Request - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - security: - - OAuth2: - - Manage All - summary: Assign Users to a Privilege - tags: - - Privileges - /api/1/privileges/{privilege_id}/users/{user_id}: - delete: - description: Remove a Privilege from Users - operationId: removeUserFromPrivilege - parameters: - - explode: false - in: path - name: privilege_id - required: true - schema: - type: string - style: simple - - description: Set to the id of the user that you want to return. - explode: false - in: path - name: user_id - required: true - schema: - $ref: '#/components/schemas/id' - style: simple - responses: - "204": - description: No Content - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - "404": - content: - application/json: - example: - statusCode: 404 - name: NotFoundError - message: The resource can't be found or the server has not found anything - matching the Request-URI - schema: - $ref: '#/components/schemas/altErr' - description: Not Found - security: - - OAuth2: - - Manage All - summary: Remove a Privilege from Users - tags: - - Privileges - /api/1/roles: - get: - description: Get Role by Name - operationId: getRoleByName - parameters: - - explode: true - in: query - name: name - required: false - schema: - type: string - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/getRoleByName_200_response' - description: Successful response - "400": - content: - application/json: - example: - error: true - code: 400 - type: bad request - message: Request Failure - schema: - $ref: '#/components/schemas/Error' - description: Bad Request - "401": - content: - application/json: - example: - error: true - code: 401 - type: Unauthorized - message: Unauthorized Error - schema: - $ref: '#/components/schemas/Error' - description: Unauthorized - security: - - OAuth2: - - Manage users - - Manage All - - Read All - - Read Users - summary: Get Role by Name - tags: - - Roles - /api/1/roles/{role_id}: - get: - description: Get Role By ID - operationId: getRoleById - parameters: - - description: Set to the id of the role you want to return. - explode: false - in: path - name: role_id - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/getRoleById_200_response' - description: Successful response - "400": - content: - application/json: - example: - error: true - code: 400 - type: bad request - message: Request Failure - schema: - $ref: '#/components/schemas/Error' - description: Bad Request - "401": - content: - application/json: - example: - error: true - code: 401 - type: Unauthorized - message: Unauthorized Error - schema: - $ref: '#/components/schemas/Error' - description: Unauthorized - "403": - content: - application/json: - example: - error: true - code: 403 - type: ForbiddenError - message: not allowed - schema: - $ref: '#/components/schemas/Error' - description: Forbidden - "404": - content: - application/json: - example: - error: true - code: 404 - type: Not Found - message: No Route Exists - schema: - $ref: '#/components/schemas/Error' - description: Not Found - security: - - OAuth2: - - Manage users - - Manage All - - Read All - - Read Users - summary: Get Role by ID - tags: - - Roles - /api/1/saml_assertion: - post: - description: Generate SAML Assertion - operationId: generateSamlAssert - parameters: - - example: application/json - explode: false - in: header - name: Content-Type - required: false - schema: - default: application/json - type: string - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/saml_assert' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/generateSamlAssert_200_response' - description: Successful response - "400": - content: - application/json: - example: - error: true - code: 400 - type: bad request - message: Request Failure - schema: - $ref: '#/components/schemas/Error' - description: Bad Request - "401": - content: - application/json: - example: - error: true - code: 401 - type: Unauthorized - message: Unauthorized Error - schema: - $ref: '#/components/schemas/Error' - description: Unauthorized - security: - - OAuth2: - - Authentication Only - - Manage users - - Manage All - summary: Generate SAML Assertion - tags: - - SAML Assertions - /api/1/saml_assertion/verify_factor: - post: - description: "Verify Factor: SAML" - operationId: verFactorSaml - parameters: - - example: application/json - explode: false - in: header - name: Content-Type - required: false - schema: - default: application/json - type: string - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/saml_factor' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/verFactorSaml_200_response' - description: Successful response - "400": - content: - application/json: - example: - error: true - code: 400 - type: bad request - message: Request Failure - schema: - $ref: '#/components/schemas/Error' - description: Bad Request - "401": - content: - application/json: - example: - error: true - code: 401 - type: Unauthorized - message: Unauthorized Error - schema: - $ref: '#/components/schemas/Error' - description: Unauthorized - "404": - content: - application/json: - example: - error: true - code: 404 - type: Not Found - message: No Route Exists - schema: - $ref: '#/components/schemas/Error' - description: Not Found - security: - - OAuth2: - - Authentication Only - - Manage users - - Manage All - summary: Verify Factor SAML - tags: - - SAML Assertions - /api/2/saml_assertion: - post: - description: Generate SAML Assertion - operationId: generateSamlAssert2 - parameters: - - example: application/json - explode: false - in: header - name: Content-Type - required: false - schema: - default: application/json - type: string - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/saml_assert' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/generateSamlAssert_200_response' - description: Successful response - "400": - content: - application/json: - example: - error: true - code: 400 - type: bad request - message: Request Failure - schema: - $ref: '#/components/schemas/Error' - description: Bad Request - "401": - content: - application/json: - example: - error: true - code: 401 - type: Unauthorized - message: Unauthorized Error - schema: - $ref: '#/components/schemas/Error' - description: Unauthorized - security: - - OAuth2: - - Authentication Only - - Manage users - - Manage All - summary: Generate SAML Assertion - tags: - - SAML Assertions - /api/2/saml_assertion/verify_factor: - post: - description: "Verify Factor: SAML" - operationId: verFactorSaml2 - parameters: - - example: application/json - explode: false - in: header - name: Content-Type - required: false - schema: - default: application/json - type: string - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/saml_factor' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/verFactorSaml_200_response' - description: Successful response - "400": - content: - application/json: - example: - error: true - code: 400 - type: bad request - message: Request Failure - schema: - $ref: '#/components/schemas/Error' - description: Bad Request - "401": - content: - application/json: - example: - error: true - code: 401 - type: Unauthorized - message: Unauthorized Error - schema: - $ref: '#/components/schemas/Error' - description: Unauthorized - "404": - content: - application/json: - example: - error: true - code: 404 - type: Not Found - message: No Route Exists - schema: - $ref: '#/components/schemas/Error' - description: Not Found - security: - - OAuth2: - - Authentication Only - - Manage users - - Manage All - summary: Verify Factor SAML - tags: - - SAML Assertions - /api/2/mappings: - get: - description: List Mappings - operationId: listMappings - parameters: - - description: Defaults to true. When set to `false` will return all disabled - mappings. - explode: true - in: query - name: enabled - required: false - schema: - default: true - type: boolean - style: form - - description: |- - Filters Rules based on their Conditions. Values formatted as :, where name is the Condition to look for, and value is the value to find. Multiple filters can be declared by using a comma delimited list. Wildcards are supported in both the name and value fields. - For example: - Single filter. has_condition=has_role:123456 - Multiple filters. has_condition=has_role:123456,status:1 - Wildcard for conditions. has_condition=*:123456 - Wildcard for condition values. has_condition=has_role:* - example: has_condition=has_role:123456 - explode: true - in: query - name: has_condition - required: false - schema: - type: string - style: form - - description: |- - Filters Rules based on their Conditions. Values formatted as :, where name is the Condition to look for, and value is the value to find. Multiple filters can be declared by using a comma delimited list. Wildcards are supported in both the name and value fields. - For example: - Single filter. has_condition=has_role:123456 - Multiple filters. has_condition=has_role:123456,status:1 - Wildcard for conditions. has_condition=*:123456 - Wildcard for condition values. has_condition=has_role:* - explode: true - in: query - name: has_condition_type - required: false - schema: - enum: - - builtin - - custom - - none - type: string - style: form - - description: |- - Filters Rules based on their Actions. Values formatted as :, where name is the Action to look for, and value is the value to find. Multiple filters can be declared by using a comma delimited list. Wildcards are supported in both the name and value fields. - For example: - Single filter. has_action=set_licenses:123456 - Multiple filters. has_action=set_groups:123456,set_usertype:* - Wildcard for actions. has_action=*:123456 - Wildcard for action values. has_action=set_userprincipalname:* - example: "has_action=set_groups:123456,set_usertype:*" - explode: true - in: query - name: has_action - required: false - schema: - type: string - style: form - - description: |- - Filters Rules based on their action types. - Allowed values are: - builtin - actions that involve standard attributes custom - actions that involve custom attributes none - no actions are defined For example: - Find Rules with no actions has_action_type=none - explode: true - in: query - name: has_action_type - required: false - schema: - enum: - - builtin - - custom - - none - type: string - style: form - responses: - "200": - content: - application/json: - schema: - items: - $ref: '#/components/schemas/mapping' - type: array - description: Successful response - "401": - content: - application/json: - example: - error: true - code: 401 - type: Unauthorized - message: Unauthorized Error - schema: - $ref: '#/components/schemas/Error' - description: Unauthorized - security: - - OAuth2: - - Manage All - summary: List Mappings - tags: - - User Mappings - post: - description: Create Mapping - operationId: createMapping - parameters: - - example: application/json - explode: false - in: header - name: Content-Type - required: false - schema: - default: application/json - type: string - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/mapping' - responses: - "201": - content: - application/json: - schema: - items: - $ref: '#/components/schemas/mapping' - type: array - description: Successful response - "401": - content: - application/json: - example: - error: true - code: 401 - type: Unauthorized - message: Unauthorized Error - schema: - $ref: '#/components/schemas/Error' - description: Unauthorized - "422": - content: - application/json: - example: - error: true - code: 422 - type: UnprocessableEntityError - message: "Validation failed: Value has already been taken" - schema: - $ref: '#/components/schemas/Error' - description: Unprocessable - security: - - OAuth2: - - Manage All - summary: Create Mapping - tags: - - User Mappings - /api/2/mappings/{mapping_id}: - delete: - description: Delete Mapping - operationId: deleteMapping - parameters: - - description: The id of the user mapping to locate. - explode: false - in: path - name: mapping_id - required: true - schema: - type: integer - style: simple - responses: - "204": - description: No Content - "401": - content: - application/json: - example: - error: true - code: 401 - type: Unauthorized - message: Unauthorized Error - schema: - $ref: '#/components/schemas/Error' - description: Unauthorized - "404": - content: - application/json: - example: - error: true - code: 404 - type: Not Found - message: No Route Exists - schema: - $ref: '#/components/schemas/Error' - description: Not Found - security: - - OAuth2: - - Manage All - summary: Delete Mapping - tags: - - User Mappings - get: - description: Get Mapping - operationId: getMapping - parameters: - - description: The id of the user mapping to locate. - explode: false - in: path - name: mapping_id - required: true - schema: - type: integer - style: simple - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/mapping' - description: Successful response - "401": - content: - application/json: - example: - error: true - code: 401 - type: Unauthorized - message: Unauthorized Error - schema: - $ref: '#/components/schemas/Error' - description: Unauthorized - "404": - content: - application/json: - example: - error: true - code: 404 - type: Not Found - message: No Route Exists - schema: - $ref: '#/components/schemas/Error' - description: Not Found - security: - - OAuth2: - - Manage All - summary: Get Mapping - tags: - - User Mappings - put: - description: Update Mapping - operationId: updateMapping - parameters: - - example: application/json - explode: false - in: header - name: Content-Type - required: false - schema: - default: application/json - type: string - style: simple - - description: The id of the user mapping to locate. - explode: false - in: path - name: mapping_id - required: true - schema: - type: integer - style: simple - requestBody: - content: - application/json: - schema: - example: - $ref: '#/components/schemas/mapping' - type: object - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/id' - description: Successful response - "401": - content: - application/json: - example: - error: true - code: 401 - type: Unauthorized - message: Unauthorized Error - schema: - $ref: '#/components/schemas/Error' - description: Unauthorized - "422": - content: - application/json: - example: - error: true - code: 422 - type: UnprocessableEntityError - message: "Validation failed: Value has already been taken" - schema: - $ref: '#/components/schemas/Error' - description: Unprocessable - security: - - OAuth2: - - Manage All - summary: Update Mapping - tags: - - User Mappings - /api/2/mappings/conditions: - get: - description: List Mappings' Conditions - operationId: listMappingConditions - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/listMappingConditions_200_response' - description: Successful response - "401": - content: - application/json: - example: - error: true - code: 401 - type: Unauthorized - message: Unauthorized Error - schema: - $ref: '#/components/schemas/Error' - description: Unauthorized - security: - - OAuth2: - - Manage All - summary: List Conditions - tags: - - User Mappings - /api/2/mappings/conditions/{mapping_condition_value}/operators: - get: - description: List Mappings' Conditions' Operators - operationId: listMappingConditionsOperators - parameters: - - explode: false - in: path - name: mapping_condition_value - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - schema: - items: - $ref: '#/components/schemas/listMappingConditionsOperators_200_response_inner' - type: array - description: Successful response - "401": - content: - application/json: - example: - error: true - code: 401 - type: Unauthorized - message: Unauthorized Error - schema: - $ref: '#/components/schemas/Error' - description: Unauthorized - security: - - OAuth2: - - Manage All - summary: List Conditions Operators - tags: - - User Mappings - /api/2/mappings/conditions/{mapping_condition_value}/values: - get: - description: List Mappings' Conditions' Values - operationId: listMappingContionValues - parameters: - - explode: false - in: path - name: mapping_condition_value - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - schema: - items: - $ref: '#/components/schemas/listMappingContionValues_200_response_inner' - type: array - description: Successful response - "401": - content: - application/json: - example: - error: true - code: 401 - type: Unauthorized - message: Unauthorized Error - schema: - $ref: '#/components/schemas/Error' - description: Unauthorized - security: - - OAuth2: - - Manage All - summary: List Conditions Values - tags: - - User Mappings - /api/2/mappings/actions: - get: - description: List Mappings' Actions - operationId: listMappingsActions - responses: - "200": - content: - application/json: - schema: - items: - $ref: '#/components/schemas/listMappingsActions_200_response_inner' - type: array - description: Successful response - "401": - content: - application/json: - example: - error: true - code: 401 - type: Unauthorized - message: Unauthorized Error - schema: - $ref: '#/components/schemas/Error' - description: Unauthorized - security: - - OAuth2: - - Manage All - summary: List Actions - tags: - - User Mappings - /api/2/mappings/actions/{mapping_action_value}/values: - get: - description: List Mappings' Actions' Values - operationId: listMappingActionValues - parameters: - - explode: false - in: path - name: mapping_action_value - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - schema: - items: - $ref: '#/components/schemas/listMappingActionValues_200_response_inner' - type: array - description: Successful response - "401": - content: - application/json: - example: - error: true - code: 401 - type: Unauthorized - message: Unauthorized Error - schema: - $ref: '#/components/schemas/Error' - description: Unauthorized - security: - - OAuth2: - - Manage All - summary: List Actions Values - tags: - - User Mappings - /api/2/mappings/sort: - put: - description: Bulk Sort Mappings - operationId: sortMappings - requestBody: - content: - application/json: - schema: - example: - - 196671 - - 196670 - - 196672 - - 196676 - - 197758 - items: - type: integer - type: array - responses: - "200": - content: - application/json: - example: - - 197758 - - 196670 - - 196671 - - 196672 - - 196676 - schema: - items: - type: integer - type: array - description: Successful response - "401": - content: - application/json: - example: - error: true - code: 401 - type: Unauthorized - message: Unauthorized Error - schema: - $ref: '#/components/schemas/Error' - description: Unauthorized - "422": - content: - application/json: - example: - error: true - code: 422 - type: UnprocessableEntityError - message: "Validation failed: Value has already been taken" - schema: - $ref: '#/components/schemas/Error' - description: Unprocessable - security: - - OAuth2: - - Manage All - summary: Bulk Sort - tags: - - User Mappings - /api/2/apps: - get: - description: List Apps - operationId: listApps - responses: - "200": - content: - application/json: - schema: - items: - $ref: '#/components/schemas/generic-app' - type: array - description: Successful response - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - "422": - content: - application/json: - example: - statusCode: 422 - name: UnprocessableEntityError - message: invalid value in \"auth_method\" - schema: - $ref: '#/components/schemas/altErr' - description: Unprocessable Entity - security: - - OAuth2: - - Manage All - - Read All - summary: List Apps - tags: - - Apps - post: - description: Create App - operationId: createApp - parameters: - - example: application/json - explode: false - in: header - name: Content-Type - required: false - schema: - default: application/json - type: string - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/createApp_request' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/createApp_200_response' - description: Successful response - "401": - content: - application/json: - example: - error: true - code: 401 - type: Unauthorized - message: Unauthorized Error - schema: - $ref: '#/components/schemas/Error' - description: Unauthorized - "422": - content: - application/json: - example: - error: true - code: 422 - type: UnprocessableEntityError - message: "Validation failed: Value has already been taken" - schema: - $ref: '#/components/schemas/Error' - description: Unprocessable - security: - - OAuth2: - - Manage All - summary: Create App - tags: - - Apps - /api/2/apps/{app_id}: - delete: - description: Delete App - operationId: deleteApp - parameters: - - explode: false - in: path - name: app_id - required: true - schema: - type: integer - style: simple - responses: - "204": - description: No Content - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - "404": - content: - application/json: - example: - statusCode: 404 - name: NotFoundError - message: The resource can't be found or the server has not found anything - matching the Request-URI - schema: - $ref: '#/components/schemas/altErr' - description: Not Found - security: - - OAuth2: - - Manage All - - Read All - summary: Delete App - tags: - - Apps - get: - description: Get App - operationId: getApp - parameters: - - explode: false - in: path - name: app_id - required: true - schema: - type: integer - style: simple - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/generic-app' - description: Successful response - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - "404": - content: - application/json: - example: - statusCode: 404 - name: NotFoundError - message: The resource can't be found or the server has not found anything - matching the Request-URI - schema: - $ref: '#/components/schemas/altErr' - description: Not Found - security: - - OAuth2: - - Manage All - - Read All - summary: Get App - tags: - - Apps - put: - description: Update App - operationId: updateApp - parameters: - - explode: false - in: path - name: app_id - required: true - schema: - type: integer - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/generic-app' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/generic-app' - description: Successful response - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - "404": - content: - application/json: - example: - statusCode: 404 - name: NotFoundError - message: The resource can't be found or the server has not found anything - matching the Request-URI - schema: - $ref: '#/components/schemas/altErr' - description: Not Found - security: - - OAuth2: - - Manage All - summary: Update App - tags: - - Apps - /api/2/apps/{app_id}/parameters/{parameter_id}: - delete: - description: Delete Parameter from App - operationId: deleteAppParameter - parameters: - - explode: false - in: path - name: app_id - required: true - schema: - type: integer - style: simple - - explode: false - in: path - name: parameter_id - required: true - schema: - type: string - style: simple - responses: - "204": - description: No Content - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - "403": - content: - application/json: - example: - statusCode: 403 - name: ForbiddenError - message: Not allowed to destroy specified resource - schema: - $ref: '#/components/schemas/altErr' - description: Forbidden - "404": - content: - application/json: - example: - statusCode: 404 - name: NotFoundError - message: The resource can't be found or the server has not found anything - matching the Request-URI - schema: - $ref: '#/components/schemas/altErr' - description: Not Found - security: - - OAuth2: - - Manage All - - Read All - summary: Delete Parameter from App - tags: - - Apps - /api/2/apps/{app_id}/users: - get: - description: Get App Users - operationId: getAppUsers - parameters: - - explode: false - in: path - name: app_id - required: true - schema: - type: integer - style: simple - responses: - "200": - content: - application/json: - schema: - items: - $ref: '#/components/schemas/user' - type: array - description: Successful response - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - security: - - OAuth2: - - Manage All - - Read All - summary: Get App Users - tags: - - Apps - /api/2/apps/{app_id}/rules: - get: - description: List App Rules - operationId: listAppRules - parameters: - - explode: false - in: path - name: app_id - required: true - schema: - type: integer - style: simple - - description: |- - Filters Rules based on their Conditions. Values formatted as :, where name is the Condition to look for, and value is the value to find. Multiple filters can be declared by using a comma delimited list. Wildcards are supported in both the name and value fields. - For example: - Single filter. has_condition=has_role:123456 - Multiple filters. has_condition=has_role:123456,status:1 - Wildcard for conditions. has_condition=*:123456 - Wildcard for condition values. has_condition=has_role:* - example: has_condition=has_role:123456 - explode: true - in: query - name: has_condition - required: false - schema: - type: string - style: form - - description: |- - Filters Rules based on their Conditions. Values formatted as :, where name is the Condition to look for, and value is the value to find. Multiple filters can be declared by using a comma delimited list. Wildcards are supported in both the name and value fields. - For example: - Single filter. has_condition=has_role:123456 - Multiple filters. has_condition=has_role:123456,status:1 - Wildcard for conditions. has_condition=*:123456 - Wildcard for condition values. has_condition=has_role:* - explode: true - in: query - name: has_condition_type - required: false - schema: - enum: - - builtin - - custom - - none - type: string - style: form - - description: |- - Filters Rules based on their Actions. Values formatted as :, where name is the Action to look for, and value is the value to find. Multiple filters can be declared by using a comma delimited list. Wildcards are supported in both the name and value fields. - For example: - Single filter. has_action=set_licenses:123456 - Multiple filters. has_action=set_groups:123456,set_usertype:* - Wildcard for actions. has_action=*:123456 - Wildcard for action values. has_action=set_userprincipalname:* - example: "has_action=set_groups:123456,set_usertype:*" - explode: true - in: query - name: has_action - required: false - schema: - type: string - style: form - - description: |- - Filters Rules based on their action types. - Allowed values are: - builtin - actions that involve standard attributes custom - actions that involve custom attributes none - no actions are defined For example: - Find Rules with no actions has_action_type=none - explode: true - in: query - name: has_action_type - required: false - schema: - enum: - - builtin - - custom - - none - type: string - style: form - - description: Defaults to true. When set to `false` will return all disabled - mappings. - explode: true - in: query - name: enabled - required: false - schema: - default: true - type: boolean - style: form - responses: - "200": - content: - application/json: - schema: - items: - $ref: '#/components/schemas/app_rule' - type: array - description: Successful response - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - security: - - OAuth2: - - Manage All - summary: List Rules - tags: - - App Rules - post: - description: Create App Rule - operationId: createAppRule - parameters: - - explode: false - in: path - name: app_id - required: true - schema: - type: integer - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/app_rule' - responses: - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/app_rule' - description: CREATED - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - "422": - content: - application/json: - example: - statusCode: 422 - name: UnprocessableEntityError - message: invalid value in \"auth_method\" - schema: - $ref: '#/components/schemas/altErr' - description: Unprocessable Entity - security: - - OAuth2: - - Manage All - tags: - - App Rules - /api/2/apps/{app_id}/rules/{rule_id}: - delete: - description: Delete App Rule - operationId: deleteRule - parameters: - - explode: false - in: path - name: app_id - required: true - schema: - type: integer - style: simple - - explode: false - in: path - name: rule_id - required: true - schema: - type: string - style: simple - responses: - "204": - description: Success. The rule is deleted. No content is returned. - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - "404": - content: - application/json: - example: - statusCode: 404 - name: NotFoundError - message: The resource can't be found or the server has not found anything - matching the Request-URI - schema: - $ref: '#/components/schemas/altErr' - description: Not Found - security: - - OAuth2: - - Manage All - summary: Delete Rule - tags: - - App Rules - get: - description: Get App Rule - operationId: getAppRule - parameters: - - explode: false - in: path - name: app_id - required: true - schema: - type: integer - style: simple - - explode: false - in: path - name: rule_id - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/app_rule' - description: Successful response - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - "404": - content: - application/json: - example: - statusCode: 404 - name: NotFoundError - message: The resource can't be found or the server has not found anything - matching the Request-URI - schema: - $ref: '#/components/schemas/altErr' - description: Not Found - security: - - OAuth2: - - Manage All - summary: Get Rule - tags: - - App Rules - put: - description: Update App Rule. - operationId: updateAppRule - parameters: - - explode: false - in: path - name: app_id - required: true - schema: - type: integer - style: simple - - explode: false - in: path - name: rule_id - required: true - schema: - type: string - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/app_rule' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/app_rule' - description: Successful response - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - "422": - content: - application/json: - example: - statusCode: 422 - name: UnprocessableEntityError - message: invalid value in \"auth_method\" - schema: - $ref: '#/components/schemas/altErr' - description: Unprocessable Entity - security: - - OAuth2: - - Manage All - summary: Update Rule - tags: - - App Rules - /api/2/apps/{app_id}/rules/conditions: - get: - description: List App Conditions - operationId: listConditions - parameters: - - explode: false - in: path - name: app_id - required: true - schema: - type: integer - style: simple - responses: - "200": - content: - application/json: - schema: - items: - $ref: '#/components/schemas/listConditions_200_response_inner' - type: array - description: Successful response - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - security: - - OAuth2: - - Manage All - summary: List Conditions - tags: - - App Rules - /api/2/apps/{app_id}/rules/conditions/{rule_condition_value}/operators: - get: - description: List Condition Operators - operationId: listConditionOperators - parameters: - - explode: false - in: path - name: app_id - required: true - schema: - type: integer - style: simple - - explode: false - in: path - name: rule_condition_value - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - schema: - items: - $ref: '#/components/schemas/rule_condition' - type: array - description: Successful response - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - security: - - OAuth2: - - Manage All - summary: List Conditions Operators - tags: - - App Rules - /api/2/apps/{app_id}/rules/conditions/{rule_condition_value}/values: - get: - description: List Condition Values - operationId: listConditionValues - parameters: - - explode: false - in: path - name: app_id - required: true - schema: - type: integer - style: simple - - explode: false - in: path - name: rule_condition_value - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/rule_condition' - description: Successful response - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - security: - - OAuth2: - - Manage All - summary: List Conditions Values - tags: - - App Rules - /api/2/apps/{app_id}/rules/actions: - get: - description: List Actions - operationId: listActions - parameters: - - explode: false - in: path - name: app_id - required: true - schema: - type: integer - style: simple - responses: - "200": - content: - application/json: - schema: - items: - $ref: '#/components/schemas/rule_action' - type: array - description: Successful response - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - security: - - OAuth2: - - Manage All - summary: List Actions - tags: - - App Rules - /api/2/apps/{app_id}/rules/actions/{rule_action_value}/values: - get: - description: Sort App rules - operationId: listActionValies - parameters: - - explode: false - in: path - name: app_id - required: true - schema: - type: integer - style: simple - - explode: false - in: path - name: rule_action_value - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - schema: - items: - $ref: '#/components/schemas/rule_action' - type: array - description: Successful response - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - security: - - OAuth2: - - Manage All - summary: List Actions Values - tags: - - App Rules - /api/2/apps/{app_id}/rules/sort: - put: - description: Sort App rules - operationId: sortAppRules - parameters: - - explode: false - in: path - name: app_id - required: true - schema: - type: integer - style: simple - requestBody: - content: - application/json: - schema: - example: - - 196671 - - 196670 - - 196672 - - 196676 - - 197758 - items: - type: integer - type: array - responses: - "200": - content: - application/json: - schema: - example: - - 196671 - - 196670 - - 196672 - - 196676 - - 197758 - items: - type: integer - type: array - description: Successful response - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - "422": - content: - application/json: - example: - statusCode: 422 - name: UnprocessableEntityError - message: invalid value in \"auth_method\" - schema: - $ref: '#/components/schemas/altErr' - description: Unprocessable Entity - security: - - OAuth2: - - Manage All - summary: Bulk Sort - tags: - - App Rules - /api/2/connectors: - get: - description: List Connectors - operationId: listConnectors - parameters: - - explode: true - in: query - name: name - required: false - schema: - type: string - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/connector' - description: Successful response - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - "422": - content: - application/json: - example: - statusCode: 422 - name: UnprocessableEntityError - message: invalid value in \"auth_method\" - schema: - $ref: '#/components/schemas/altErr' - description: Unprocessable Entity - security: - - OAuth2: - - Manage All - summary: List Connectors - tags: - - Apps - /api/2/risk/rules: - get: - description: List Vigilance AI (Risk Service) Rules - operationId: listRiskRules - responses: - "200": - content: - application/json: - schema: - items: - $ref: '#/components/schemas/risk_rule' - type: array - description: OK - "401": - content: - application/json: - example: - error: true - code: 401 - type: Unauthorized - message: Unauthorized Error - schema: - $ref: '#/components/schemas/Error' - description: Unauthorized - security: - - OAuth2: - - Manage All - - Read All - summary: List Rules - tags: - - Vigilance AI - post: - description: Create Vigilance AI (Risk Service) Rule - operationId: createRiskRule - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/risk_rule' - responses: - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/risk_rule' - description: CREATED - "400": - content: - application/json: - example: - error: true - code: 400 - type: bad request - message: Request Failure - schema: - $ref: '#/components/schemas/Error' - description: Bad Request - "401": - content: - application/json: - example: - error: true - code: 401 - type: Unauthorized - message: Unauthorized Error - schema: - $ref: '#/components/schemas/Error' - description: Unauthorized - security: - - OAuth2: - - Manage All - summary: Create Rule - tags: - - Vigilance AI - /api/2/risk/rules/{rule_id}: - delete: - description: Delete Vigilance AI (Risk Service) - operationId: deleteRiskRule - parameters: - - explode: false - in: path - name: rule_id - required: true - schema: - type: string - style: simple - responses: - "204": - description: Successful response - "401": - content: - application/json: - example: - error: true - code: 401 - type: Unauthorized - message: Unauthorized Error - schema: - $ref: '#/components/schemas/Error' - description: Unauthorized - security: - - OAuth2: - - Manage All - - Read All - summary: Delete Rule - tags: - - Vigilance AI - get: - description: Use this API to return a single rule that has been created in the - Risk Sevice. - operationId: getRiskRule - parameters: - - explode: false - in: path - name: rule_id - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/risk_rule' - description: Successful Response - "401": - content: - application/json: - example: - error: true - code: 401 - type: Unauthorized - message: Unauthorized Error - schema: - $ref: '#/components/schemas/Error' - description: Unauthorized - security: - - OAuth2: - - Manage All - - Read All - summary: get Risk Rule - tags: - - Vigilance AI - put: - description: Update Vigilance AI (Risk Service) Rule - operationId: updateRiskRule - parameters: - - explode: false - in: path - name: rule_id - required: true - schema: - type: string - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/updateRiskRule_request' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/risk_rule' - description: Successful Response - "400": - content: - application/json: - example: - error: true - code: 400 - type: bad request - message: Request Failure - schema: - $ref: '#/components/schemas/Error' - description: Bad Request - "401": - content: - application/json: - example: - error: true - code: 401 - type: Unauthorized - message: Unauthorized Error - schema: - $ref: '#/components/schemas/Error' - description: Unauthorized - security: - - OAuth2: - - Manage All - - Read All - summary: Update Rule - tags: - - Vigilance AI - /api/2/risk/events: - post: - description: Track Vigilance AI (Risk Service) Event - operationId: trackRiskEvent - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/trackRiskEvent_request' - required: true - responses: - "200": - description: No content is returned. This API is fire and forget. - "400": - content: - application/json: - example: - error: true - code: 400 - type: bad request - message: Request Failure - schema: - $ref: '#/components/schemas/Error' - description: Bad Request - "401": - content: - application/json: - example: - error: true - code: 401 - type: Unauthorized - message: Unauthorized Error - schema: - $ref: '#/components/schemas/Error' - description: Unauthorized - security: - - OAuth2: - - Authentication Only - - Read Users - - Manage users - - Manage All - - Read All - summary: Track an Event - tags: - - Vigilance AI - /api/2/risk/scores: - get: - description: Get Vigilance AI (Risk Service) Score Summary - operationId: getRiskScores - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/getRiskScores_200_response' - description: OK - "401": - content: - application/json: - example: - error: true - code: 401 - type: Unauthorized - message: Unauthorized Error - schema: - $ref: '#/components/schemas/Error' - description: Unauthorized - security: - - OAuth2: - - Manage All - - Read All - summary: Get Score Summary - tags: - - Vigilance AI - /api/2/risk/verify: - post: - description: Get Vigilance AI (Risk Service) Score - operationId: getRiskScore - parameters: - - description: Optional ISO8601 formatted date string. Defaults to current date. - Maximum date is 90 days ago. - explode: true - in: query - name: before - required: false - schema: - type: string - style: form - - description: Optional ISO8601 formatted date string. Defaults to 30 days ago. - Maximum date is 90 days ago. - explode: true - in: query - name: after - required: false - schema: - type: string - style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/getRiskScore_request' - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/getRiskScore_200_response' - description: Successful response - "400": - content: - application/json: - example: - error: true - code: 400 - type: bad request - message: Request Failure - schema: - $ref: '#/components/schemas/Error' - description: Bad Request - "401": - content: - application/json: - example: - error: true - code: 401 - type: Unauthorized - message: Unauthorized Error - schema: - $ref: '#/components/schemas/Error' - description: Unauthorized - security: - - OAuth2: - - Authentication Only - - Read Users - - Manage users - - Manage All - - Read All - summary: Get a Risk Score - tags: - - Vigilance AI - /api/2/mfa/users/{user_id}/registrations/{registration_id}: - get: - description: Get registration state by id - operationId: getUserRegistration - parameters: - - description: Set to the id of the user that you want to return. - explode: false - in: path - name: user_id - required: true - schema: - $ref: '#/components/schemas/id' - style: simple - - description: The id of a registration - example: - explode: false - in: path - name: registration_id - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - example: - id: ca332b26-0d83-444f-956b-0dbf004a3f03 - status: pending - schema: - type: object - description: OK - headers: - Accept-Language: - explode: false - schema: - example: "en-US,en;q=1" - type: string - style: simple - Cache-Control: - explode: false - schema: - example: "no-cache, must-revalidate, no-store" - type: string - style: simple - Content-Length: - explode: false - schema: - example: 64 - type: integer - style: simple - Content-Type: - explode: false - schema: - example: application/json - type: string - style: simple - X-Content-Type-Options: - explode: false - schema: - example: nosniff - type: string - style: simple - X-Request-Id: - explode: false - schema: - example: 5F188C46-49E1609A-D47B-0A0B033A-01BB-11459E-43E7 - type: string - style: simple - Date: - explode: false - schema: - example: "Wed, 22 Jul 2020 18:58:14 GMT" - type: string - style: simple - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - security: - - OAuth2: - - Manage All - summary: Get User Registration - tags: - - Multi Factor Authentication - put: - description: Submit an otp for verification. - operationId: verifyUserRegistration - parameters: - - example: application/json - explode: false - in: header - name: Content-Type - required: false - schema: - default: application/json - type: string - style: simple - - description: Set to the id of the user that you want to return. - explode: false - in: path - name: user_id - required: true - schema: - $ref: '#/components/schemas/id' - style: simple - - description: The id of a registration - example: - explode: false - in: path - name: registration_id - required: true - schema: - type: string - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/verifyUserRegistration_request' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/verifyUserRegistration_200_response' - description: OK - headers: - Accept-Language: - explode: false - schema: - example: "en-US,en;q=1" - type: string - style: simple - Cache-Control: - explode: false - schema: - example: "no-cache, must-revalidate, no-store" - type: string - style: simple - Content-Length: - explode: false - schema: - example: 87 - type: integer - style: simple - Content-Type: - explode: false - schema: - example: application/json - type: string - style: simple - X-Content-Type-Options: - explode: false - schema: - example: nosniff - type: string - style: simple - X-Request-Id: - explode: false - schema: - example: 5F188CDE-49E1609A-D480-0A0B0591-01BB-3589-0813 - type: string - style: simple - Date: - explode: false - schema: - example: "Wed, 22 Jul 2020 19:00:47 GMT" - type: string - style: simple - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - security: - - OAuth2: - - Manage All - summary: Verify User Registration - tags: - - Multi Factor Authentication - /api/2/mfa/users/{user_id}/registrations: - post: - description: Create a new registration process - operationId: createFactorRegistration - parameters: - - example: application/json - explode: false - in: header - name: Content-Type - required: false - schema: - default: application/json - type: string - style: simple - - description: Set to the id of the user that you want to return. - explode: false - in: path - name: user_id - required: true - schema: - $ref: '#/components/schemas/id' - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/createFactorRegistration_request' - responses: - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/createFactorRegistration_201_response' - description: Created - headers: - Accept-Language: - explode: false - schema: - example: "en-US,en;q=1" - type: string - style: simple - Cache-Control: - explode: false - schema: - example: "no-cache, must-revalidate, no-store" - type: string - style: simple - Content-Length: - explode: false - schema: - example: 186 - type: integer - style: simple - Content-Type: - explode: false - schema: - example: application/json - type: string - style: simple - X-Content-Type-Options: - explode: false - schema: - example: nosniff - type: string - style: simple - X-Request-Id: - explode: false - schema: - example: 5F188C90-49E1609A-D47D-0A0B03ED-01BB-2869-1581 - type: string - style: simple - Date: - explode: false - schema: - example: "Wed, 22 Jul 2020 18:59:30 GMT" - type: string - style: simple - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - security: - - OAuth2: - - Manage All - summary: Create Factor Registration - tags: - - Multi Factor Authentication - /api/2/mfa/users/{user_id}/devices: - get: - description: Get a user authentication devices - operationId: getAuthenticationDevices - parameters: - - description: Set to the id of the user that you want to return. - explode: false - in: path - name: user_id - required: true - schema: - $ref: '#/components/schemas/id' - style: simple - responses: - "200": - content: - application/json: - schema: - items: - $ref: '#/components/schemas/getAuthenticationDevices_200_response_inner' - type: array - description: OK - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - security: - - OAuth2: - - Manage All - summary: Get User Devices - tags: - - Multi Factor Authentication - /api/2/mfa/users/{user_id}/devices/{device_id}: - delete: - description: Delete a user\'s authentication device - operationId: deleteEnrolledFactor - parameters: - - description: Set to the id of the user that you want to return. - explode: false - in: path - name: user_id - required: true - schema: - $ref: '#/components/schemas/id' - style: simple - - explode: false - in: path - name: device_id - required: true - schema: - type: string - style: simple - responses: - "204": - description: No Content - security: - - OAuth2: - - Manage All - summary: Delete Enrolled Factor - tags: - - Multi Factor Authentication - /api/2/mfa/users/{user_id}/verifications/{verification_id}: - get: - description: Get verification state by id - operationId: getUserVerification - parameters: - - description: Set to the id of the user that you want to return. - explode: false - in: path - name: user_id - required: true - schema: - $ref: '#/components/schemas/id' - style: simple - - description: The verification_id is returned on activation of the factor or - you can get the device_id using the Activate Factor API call. - example: - explode: false - in: path - name: verification_id - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/getUserVerification_200_response' - description: OK - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - "404": - content: - application/json: - example: - statusCode: 404 - name: NotFoundError - message: The resource can't be found or the server has not found anything - matching the Request-URI - schema: - $ref: '#/components/schemas/altErr' - description: Not Found - security: - - OAuth2: - - Manage All - summary: Get User Verification - tags: - - Multi Factor Authentication - put: - description: Submit an otp for verification. - operationId: verifyUserVerification - parameters: - - example: application/json - explode: false - in: header - name: Content-Type - required: false - schema: - default: application/json - type: string - style: simple - - description: Set to the id of the user that you want to return. - explode: false - in: path - name: user_id - required: true - schema: - $ref: '#/components/schemas/id' - style: simple - - description: The verification_id is returned on activation of the factor or - you can get the device_id using the Activate Factor API call. - example: - explode: false - in: path - name: verification_id - required: true - schema: - type: string - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/verifyUserVerification_request' - responses: - "200": - content: - application/json: - example: - type: success - code: 200 - message: success - error: false - schema: - $ref: '#/components/schemas/Error' - description: OK - headers: - Content-Type: - explode: false - schema: - example: application/json - type: string - style: simple - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - "403": - content: - application/json: - example: - statusCode: 403 - name: ForbiddenError - message: Not allowed to destroy specified resource - schema: - $ref: '#/components/schemas/altErr' - description: Forbidden - security: - - OAuth2: - - Manage All - summary: Verify User Verification - tags: - - Multi Factor Authentication - /api/2/mfa/users/{user_id}/verifications: - post: - description: Create a new verification process - operationId: createDeviceVerification - parameters: - - example: application/json - explode: false - in: header - name: Content-Type - required: false - schema: - default: application/json - type: string - style: simple - - description: Set to the id of the user that you want to return. - explode: false - in: path - name: user_id - required: true - schema: - $ref: '#/components/schemas/id' - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/createDeviceVerification_request' - responses: - "201": - content: - application/json: - example: - id: 5a0ba80a-39a1-4627-9a8b-1273278b34ee - status: pending - user_id: 2323 - device_id: 489339 - factor_data: - verification_token: - totp_url: - schema: - $ref: '#/components/schemas/createDeviceVerification_201_response' - description: Created - headers: - Content-Type: - explode: false - schema: - example: application/json - type: string - style: simple - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - security: - - OAuth2: - - Manage All - summary: Create Device Verification - tags: - - Multi Factor Authentication - /api/2/mfa/users/{user_id}/factors: - get: - description: Get a user\'s available authentication factors - operationId: getAuthFactors - parameters: - - description: Set to the id of the user that you want to return. - explode: false - in: path - name: user_id - required: true - schema: - $ref: '#/components/schemas/id' - style: simple - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/getAuthFactors_200_response' - description: OK - headers: - Content-Type: - explode: false - schema: - example: application/json - type: string - style: simple - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - security: - - OAuth2: - - Manage All - summary: Get User Factors - tags: - - Multi Factor Authentication - /api/2/mfa/users/{user_id}/mfa_token: - post: - description: Create new MFA token on the user's account - operationId: generateOTP - parameters: - - example: application/json - explode: false - in: header - name: Content-Type - required: false - schema: - default: application/json - type: string - style: simple - - description: Set to the id of the user that you want to return. - explode: false - in: path - name: user_id - required: true - schema: - $ref: '#/components/schemas/id' - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/generateOTP_request' - responses: - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/generateOTP_201_response' - description: Created - headers: - Content-Type: - explode: false - schema: - example: application/json - type: string - style: simple - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - "422": - content: - application/json: - example: - statusCode: 422 - name: UnprocessableEntityError - message: invalid value in \"auth_method\" - schema: - $ref: '#/components/schemas/altErr' - description: Unprocessable Entity - security: - - OAuth2: - - Manage All - summary: Generate MFA token - tags: - - Multi Factor Authentication - /api/2/roles: - get: - description: List Roles - operationId: listRoles - parameters: - - description: How many items to return at one time (max 100) - explode: true - in: query - name: limit - required: false - schema: - format: int32 - type: integer - style: form - - description: The page number of results to return. - explode: true - in: query - name: page - required: false - schema: - type: integer - style: form - - description: Set to the value extracted from Before-Cursor or After-Cursor - headers to return the previous or next page. - explode: true - in: query - name: cursor - required: false - schema: - type: string - style: form - - description: Optional. Filters by role name. - explode: true - in: query - name: role_name - required: false - schema: - type: string - style: form - - explode: true - in: query - name: app_id - required: true - schema: - type: integer - style: form - - description: Optional. Returns roles that contain this app name. - explode: true - in: query - name: app_name - required: false - schema: - type: string - style: form - - description: Optional. Comma delimited list of fields to return. - explode: true - in: query - name: fields - required: false - schema: - enum: - - apps - - users - - admins - type: string - style: form - responses: - "200": - content: - application/json: - schema: - items: - $ref: '#/components/schemas/role' - type: array - description: OK - headers: - Current-Page: - $ref: '#/components/headers/Current-Page' - Page-Items: - $ref: '#/components/headers/Page-Items' - Total-Count: - $ref: '#/components/headers/Total-Count' - Total-Pages: - $ref: '#/components/headers/Total-Pages' - Link: - $ref: '#/components/headers/Link' - Before-Cursor: - $ref: '#/components/headers/Before-Cursor' - After-Cursor: - $ref: '#/components/headers/After-Cursor' - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - security: - - OAuth2: - - Manage All - - Read All - - Read Users - summary: List Roles - tags: - - Roles - post: - description: Create Role - operationId: createRole - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/role' - responses: - "201": - content: - application/json: - schema: - items: - $ref: '#/components/schemas/createRole_201_response_inner' - type: array - description: CREATED - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - security: - - OAuth2: - - Manage All - summary: Create Role - tags: - - Roles - /api/2/roles/{role_id}: - delete: - description: Delete Role - operationId: deleteRole - parameters: - - description: Set to the id of the role you want to return. - explode: false - in: path - name: role_id - required: true - schema: - type: string - style: simple - responses: - "204": - description: NO CONTENT - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - "403": - content: - application/json: - example: - statusCode: 403 - name: ForbiddenError - message: Not allowed to destroy specified resource - schema: - $ref: '#/components/schemas/altErr' - description: Forbidden - "404": - content: - application/json: - example: - statusCode: 404 - name: NotFoundError - message: The resource can't be found or the server has not found anything - matching the Request-URI - schema: - $ref: '#/components/schemas/altErr' - description: Not Found - security: - - OAuth2: - - Manage All - summary: Delete Role by ID - tags: - - Roles - get: - description: Get Role - operationId: getRole - parameters: - - description: Set to the id of the role you want to return. - explode: false - in: path - name: role_id - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/role' - description: OK - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - "404": - content: - application/json: - example: - statusCode: 404 - name: NotFoundError - message: The resource can't be found or the server has not found anything - matching the Request-URI - schema: - $ref: '#/components/schemas/altErr' - description: Not Found - security: - - OAuth2: - - Manage All - - Read All - - Read Users - summary: Get Role by ID - tags: - - Roles - put: - description: Update Role - operationId: updateRole - parameters: - - description: Set to the id of the role you want to return. - explode: false - in: path - name: role_id - required: true - schema: - type: string - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/role' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/updateRole_200_response' - description: OK - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - "422": - content: - application/json: - example: - statusCode: 422 - name: UnprocessableEntityError - message: invalid value in \"auth_method\" - schema: - $ref: '#/components/schemas/altErr' - description: Unprocessable Entity - security: - - OAuth2: - - Manage All - summary: Update Role - tags: - - Roles - /api/2/roles/{role_id}/apps: - get: - description: Get Role Apps - operationId: getRoleApps - parameters: - - description: Set to the id of the role you want to return. - explode: false - in: path - name: role_id - required: true - schema: - type: string - style: simple - - description: How many items to return at one time (max 100) - explode: true - in: query - name: limit - required: false - schema: - format: int32 - type: integer - style: form - - description: The page number of results to return. - explode: true - in: query - name: page - required: false - schema: - type: integer - style: form - - description: Set to the value extracted from Before-Cursor or After-Cursor - headers to return the previous or next page. - explode: true - in: query - name: cursor - required: false - schema: - type: string - style: form - - description: Optional. Defaults to true. Returns all apps not yet assigned - to the role. - explode: true - in: query - name: assigned - required: false - schema: - type: boolean - style: form - responses: - "200": - content: - applcation/json: - schema: - items: - $ref: '#/components/schemas/getRoleApps_200_response_inner' - type: array - description: OK - headers: - Current-Page: - $ref: '#/components/headers/Current-Page' - Page-Items: - $ref: '#/components/headers/Page-Items' - Total-Count: - $ref: '#/components/headers/Total-Count' - Total-Pages: - $ref: '#/components/headers/Total-Pages' - Link: - $ref: '#/components/headers/Link' - Before-Cursor: - $ref: '#/components/headers/Before-Cursor' - After-Cursor: - $ref: '#/components/headers/After-Cursor' - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - "404": - content: - application/json: - example: - statusCode: 404 - name: NotFoundError - message: The resource can't be found or the server has not found anything - matching the Request-URI - schema: - $ref: '#/components/schemas/altErr' - description: Not Found - security: - - OAuth2: - - Manage All - - Read All - - Read Users - summary: Get all Apps assigned to Role - tags: - - Roles - put: - description: Set Role Apps - operationId: setRoleApps - parameters: - - description: Set to the id of the role you want to return. - explode: false - in: path - name: role_id - required: true - schema: - type: string - style: simple - requestBody: - content: - application/json: - schema: - description: The complete list of app_id values to assign to the role. - Don't submit a partial list of app IDs. - items: - $ref: '#/components/schemas/id' - type: array - required: true - responses: - "200": - content: - application/json: - schema: - items: - $ref: '#/components/schemas/createRole_201_response_inner' - type: array - description: The response returns an array of app IDs sent in the request. - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - "404": - content: - application/json: - example: - statusCode: 404 - name: NotFoundError - message: The resource can't be found or the server has not found anything - matching the Request-URI - schema: - $ref: '#/components/schemas/altErr' - description: Not Found - security: - - OAuth2: - - Manage All - summary: Set Role Apps - tags: - - Roles - /api/2/roles/{role_id}/users: - delete: - description: Remove Role Users - operationId: removeRoleUsers - parameters: - - description: Set to the id of the role you want to return. - explode: false - in: path - name: role_id - required: true - schema: - type: string - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/removeRoleUsers_request' - required: true - responses: - "204": - description: NO CONTENT - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - "404": - content: - application/json: - example: - statusCode: 404 - name: NotFoundError - message: The resource can't be found or the server has not found anything - matching the Request-URI - schema: - $ref: '#/components/schemas/altErr' - description: Not Found - security: - - OAuth2: - - Manage All - summary: Remove Role Users - tags: - - Roles - get: - description: Get Role Users - operationId: getRoleUsers - parameters: - - description: Set to the id of the role you want to return. - explode: false - in: path - name: role_id - required: true - schema: - type: string - style: simple - - description: How many items to return at one time (max 100) - explode: true - in: query - name: limit - required: false - schema: - format: int32 - type: integer - style: form - - description: The page number of results to return. - explode: true - in: query - name: page - required: false - schema: - type: integer - style: form - - description: Set to the value extracted from Before-Cursor or After-Cursor - headers to return the previous or next page. - explode: true - in: query - name: cursor - required: false - schema: - type: string - style: form - - description: "Allows you to filter on first name, last name, username, and\ - \ email address." - explode: true - in: query - name: name - required: false - schema: - type: string - style: form - - description: Optional. Defaults to false. Include users that aren’t assigned - to the role. - explode: true - in: query - name: include_unassigned - required: false - schema: - type: boolean - style: form - responses: - "200": - content: - applcation/json: - schema: - example: - - id: 345 - name: Joe User - username: joe.user@example.com - added_by: - id: 678 - name: Susan Boss - added_at: 2019-12-27T00:00:00Z - assigned: true - items: - $ref: '#/components/schemas/user' - type: array - description: OK - headers: - Current-Page: - $ref: '#/components/headers/Current-Page' - Page-Items: - $ref: '#/components/headers/Page-Items' - Total-Count: - $ref: '#/components/headers/Total-Count' - Total-Pages: - $ref: '#/components/headers/Total-Pages' - Link: - $ref: '#/components/headers/Link' - Before-Cursor: - $ref: '#/components/headers/Before-Cursor' - After-Cursor: - $ref: '#/components/headers/After-Cursor' - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - "404": - content: - application/json: - example: - statusCode: 404 - name: NotFoundError - message: The resource can't be found or the server has not found anything - matching the Request-URI - schema: - $ref: '#/components/schemas/altErr' - description: Not Found - security: - - OAuth2: - - Manage All - summary: Get Role Users - tags: - - Roles - post: - description: Add Role Users - operationId: addRoleUsers - parameters: - - description: Set to the id of the role you want to return. - explode: false - in: path - name: role_id - required: true - schema: - type: string - style: simple - requestBody: - content: - application/json: - schema: - description: "Set user_id values in array," - items: - $ref: '#/components/schemas/id' - type: array - required: true - responses: - "200": - content: - application/json: - schema: - items: - $ref: '#/components/schemas/createRole_201_response_inner' - type: array - description: OK - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - "422": - content: - application/json: - example: - statusCode: 422 - name: UnprocessableEntityError - message: invalid value in \"auth_method\" - schema: - $ref: '#/components/schemas/altErr' - description: Unprocessable Entity - security: - - OAuth2: - - Manage All - summary: Add Role Users - tags: - - Roles - /api/2/roles/{role_id}/admins: - delete: - description: Remove Role Admins - operationId: removeRoleAdmins - parameters: - - description: Set to the id of the role you want to return. - explode: false - in: path - name: role_id - required: true - schema: - type: string - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/removeRoleUsers_request' - required: true - responses: - "204": - description: NO CONTENT - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - "404": - content: - application/json: - example: - statusCode: 404 - name: NotFoundError - message: The resource can't be found or the server has not found anything - matching the Request-URI - schema: - $ref: '#/components/schemas/altErr' - description: Not Found - security: - - OAuth2: - - Manage All - summary: Remove Role Admins - tags: - - Roles - get: - description: Get Role Admins - operationId: getRoleAdmins - parameters: - - description: Set to the id of the role you want to return. - explode: false - in: path - name: role_id - required: true - schema: - type: string - style: simple - - description: How many items to return at one time (max 100) - explode: true - in: query - name: limit - required: false - schema: - format: int32 - type: integer - style: form - - description: The page number of results to return. - explode: true - in: query - name: page - required: false - schema: - type: integer - style: form - - description: Set to the value extracted from Before-Cursor or After-Cursor - headers to return the previous or next page. - explode: true - in: query - name: cursor - required: false - schema: - type: string - style: form - - description: "Allows you to filter on first name, last name, username, and\ - \ email address." - explode: true - in: query - name: name - required: false - schema: - type: string - style: form - - description: Optional. Defaults to false. Include users that aren’t assigned - to the role. - explode: true - in: query - name: include_unassigned - required: false - schema: - type: boolean - style: form - responses: - "200": - content: - applcation/json: - schema: - items: - $ref: '#/components/schemas/user' - type: array - description: OK - headers: - Current-Page: - $ref: '#/components/headers/Current-Page' - Page-Items: - $ref: '#/components/headers/Page-Items' - Total-Count: - $ref: '#/components/headers/Total-Count' - Total-Pages: - $ref: '#/components/headers/Total-Pages' - Link: - $ref: '#/components/headers/Link' - Before-Cursor: - $ref: '#/components/headers/Before-Cursor' - After-Cursor: - $ref: '#/components/headers/After-Cursor' - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - "404": - content: - application/json: - example: - statusCode: 404 - name: NotFoundError - message: The resource can't be found or the server has not found anything - matching the Request-URI - schema: - $ref: '#/components/schemas/altErr' - description: Not Found - security: - - OAuth2: - - Manage All - - Read All - - Read Users - summary: Get Role Admins - tags: - - Roles - post: - description: Add Role Admins - operationId: addRoleAdmins - parameters: - - description: Set to the id of the role you want to return. - explode: false - in: path - name: role_id - required: true - schema: - type: string - style: simple - requestBody: - content: - application/json: - schema: - description: "Set user_id values in array," - items: - $ref: '#/components/schemas/id' - type: array - required: true - responses: - "200": - content: - application/json: - schema: - items: - $ref: '#/components/schemas/createRole_201_response_inner' - type: array - description: OK - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - security: - - OAuth2: - - Manage All - summary: Add Role Admins - tags: - - Roles - /api/2/hooks: - get: - description: List Smart Hooks - operationId: listHooks - parameters: - - description: How many items to return at one time (max 100) - explode: true - in: query - name: limit - required: false - schema: - format: int32 - type: integer - style: form - - description: The page number of results to return. - explode: true - in: query - name: page - required: false - schema: - type: integer - style: form - - description: Set to the value extracted from Before-Cursor or After-Cursor - headers to return the previous or next page. - explode: true - in: query - name: cursor - required: false - schema: - type: string - style: form - responses: - "200": - content: - application/json: - schema: - items: - $ref: '#/components/schemas/hook' - type: array - description: OK - headers: - Current-Page: - $ref: '#/components/headers/Current-Page' - Page-Items: - $ref: '#/components/headers/Page-Items' - Total-Count: - $ref: '#/components/headers/Total-Count' - Total-Pages: - $ref: '#/components/headers/Total-Pages' - Link: - $ref: '#/components/headers/Link' - Before-Cursor: - $ref: '#/components/headers/Before-Cursor' - After-Cursor: - $ref: '#/components/headers/After-Cursor' - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - security: - - OAuth2: - - Manage All - summary: List all Smart Hooks - tags: - - Smart Hooks - post: - description: Create Smart Hook - operationId: createHook - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/hook' - required: true - responses: - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/hook' - description: CREATED - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - "409": - content: - application/json: - example: - statusCode: 409 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Conflict - "422": - content: - application/json: - example: - name: UnprocessableEntityError - message: instance additionalProperty \"name\" exists in instance when - not allowed - schema: - $ref: '#/components/schemas/hook_status' - description: You function is not base64 encoded. - security: - - OAuth2: - - Manage All - summary: Create Smart Hook - tags: - - Smart Hooks - /api/2/hooks/{hook_id}: - delete: - description: Delete Smart Hook - operationId: deleteHook - parameters: - - description: Set to the id of the Hook that you want to return. - explode: false - in: path - name: hook_id - required: true - schema: - description: The Hook unique ID in OneLogin. - type: string - style: simple - responses: - "202": - description: Success. The hook function has been queued for deletion. This - typically happens within seconds of making the request. - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - "404": - content: - application/json: - example: - statusCode: 404 - name: NotFoundError - message: The resource can't be found or the server has not found anything - matching the Request-URI - schema: - $ref: '#/components/schemas/altErr' - description: Not Found - security: - - OAuth2: - - Manage All - - Read All - summary: Delete Smart Hook by ID - tags: - - Smart Hooks - get: - description: Get Smart Hook - operationId: getHook - parameters: - - description: Set to the id of the Hook that you want to return. - explode: false - in: path - name: hook_id - required: true - schema: - description: The Hook unique ID in OneLogin. - type: string - style: simple - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/hook' - description: OK - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - "404": - content: - application/json: - example: - statusCode: 404 - name: NotFoundError - message: The resource can't be found or the server has not found anything - matching the Request-URI - schema: - $ref: '#/components/schemas/altErr' - description: Not Found - security: - - OAuth2: - - Manage All - summary: Get Smart Hook by ID - tags: - - Smart Hooks - put: - description: Update Smart Hook - operationId: updateHook - parameters: - - description: Set to the id of the Hook that you want to return. - explode: false - in: path - name: hook_id - required: true - schema: - description: The Hook unique ID in OneLogin. - type: string - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/hook' - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/hook' - description: OK - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - "422": - content: - application/json: - example: - name: UnprocessableEntityError - message: instance additionalProperty \"name\" exists in instance when - not allowed - schema: - $ref: '#/components/schemas/hook_status' - description: You function is not base64 encoded. - security: - - OAuth2: - - Manage All - summary: Update Smart Hook by ID - tags: - - Smart Hooks - /api/2/hooks/{hook_id}/logs: - get: - description: Get Smart Hook Logs - operationId: getLogs - parameters: - - description: Set to the id of the Hook that you want to return. - explode: false - in: path - name: hook_id - required: true - schema: - description: The Hook unique ID in OneLogin. - type: string - style: simple - - description: How many items to return at one time (max 100) - explode: true - in: query - name: limit - required: false - schema: - format: int32 - type: integer - style: form - - description: The page number of results to return. - explode: true - in: query - name: page - required: false - schema: - type: integer - style: form - - description: Set to the value extracted from Before-Cursor or After-Cursor - headers to return the previous or next page. - explode: true - in: query - name: cursor - required: false - schema: - type: string - style: form - - description: Returns logs that contain this request_id. - explode: true - in: query - name: request_id - required: false - schema: - type: string - style: form - - description: Returns logs that contain this correlation_id. - explode: true - in: query - name: correlation_id - required: false - schema: - type: string - style: form - responses: - "200": - content: - application/json: - schema: - items: - $ref: '#/components/schemas/hook_log' - type: array - description: OK - headers: - Current-Page: - $ref: '#/components/headers/Current-Page' - Page-Items: - $ref: '#/components/headers/Page-Items' - Total-Count: - $ref: '#/components/headers/Total-Count' - Total-Pages: - $ref: '#/components/headers/Total-Pages' - Link: - $ref: '#/components/headers/Link' - Before-Cursor: - $ref: '#/components/headers/Before-Cursor' - After-Cursor: - $ref: '#/components/headers/After-Cursor' - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - "404": - content: - application/json: - example: - statusCode: 404 - name: NotFoundError - message: The resource can't be found or the server has not found anything - matching the Request-URI - schema: - $ref: '#/components/schemas/altErr' - description: Not Found - security: - - OAuth2: - - Manage All - summary: Get Smart Hook Logs - tags: - - Smart Hooks - /api/2/hooks/envs: - get: - description: List Environment Variables - operationId: listEnvironmentVariables - parameters: - - description: How many items to return at one time (max 100) - explode: true - in: query - name: limit - required: false - schema: - format: int32 - type: integer - style: form - - description: The page number of results to return. - explode: true - in: query - name: page - required: false - schema: - type: integer - style: form - - description: Set to the value extracted from Before-Cursor or After-Cursor - headers to return the previous or next page. - explode: true - in: query - name: cursor - required: false - schema: - type: string - style: form - responses: - "200": - content: - application/json: - schema: - items: - $ref: '#/components/schemas/hook_envvar' - type: array - description: OK - headers: - Current-Page: - $ref: '#/components/headers/Current-Page' - Page-Items: - $ref: '#/components/headers/Page-Items' - Total-Count: - $ref: '#/components/headers/Total-Count' - Total-Pages: - $ref: '#/components/headers/Total-Pages' - Link: - $ref: '#/components/headers/Link' - Before-Cursor: - $ref: '#/components/headers/Before-Cursor' - After-Cursor: - $ref: '#/components/headers/After-Cursor' - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - security: - - OAuth2: - - Manage All - summary: List Environment Variables - tags: - - Smart Hooks - post: - description: Create Environment Variable - operationId: createEnvironmentVariable - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/hook_envvar' - required: true - responses: - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/hook_envvar' - description: CREATED - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - "422": - content: - application/json: - example: - statusCode: 422 - name: UnprocessableEntityError - message: invalid value in \"auth_method\" - schema: - $ref: '#/components/schemas/altErr' - description: Unprocessable Entity - security: - - OAuth2: - - Manage All - summary: Create Environment Variable - tags: - - Smart Hooks - /api/2/hooks/envs/{envvar_id}: - delete: - description: Delete Environment Variable - operationId: deleteEnvironmentVariable - parameters: - - description: Set to the id of the Hook Environment Variable that you want - to fetch. - explode: false - in: path - name: envvar_id - required: true - schema: - type: string - style: simple - responses: - "204": - description: Success. The environment variable has been deleted. No content - is returned. - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - "404": - content: - application/json: - example: - statusCode: 404 - name: NotFoundError - message: The resource can't be found or the server has not found anything - matching the Request-URI - schema: - $ref: '#/components/schemas/altErr' - description: Not Found - security: - - OAuth2: - - Manage All - - Read All - summary: Delete Environment Variable - tags: - - Smart Hooks - get: - description: Get Environment Variable - operationId: getEnvironmentVariable - parameters: - - description: Set to the id of the Hook Environment Variable that you want - to fetch. - explode: false - in: path - name: envvar_id - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/hook_envvar' - description: OK - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - security: - - OAuth2: - - Manage All - summary: Get Environment Variable - tags: - - Smart Hooks - put: - description: Update Environment Variable - operationId: updateEnvironmentVariable - parameters: - - description: Set to the id of the Hook Environment Variable that you want - to fetch. - explode: false - in: path - name: envvar_id - required: true - schema: - type: string - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/updateEnvironmentVariable_request' - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/hook_envvar' - description: OK - "400": - content: - application/json: - example: - statusCode: 400 - name: BadRequestError - message: "The request could not be understood by the server due to\ - \ malformed syntax: Statement required Action array" - schema: - $ref: '#/components/schemas/altErr' - description: Bad Request - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - "422": - content: - application/json: - schema: - $ref: '#/components/schemas/hook_status' - description: Unprocessable Entity - security: - - OAuth2: - - Manage All - summary: Update Environment Variable - tags: - - Smart Hooks - /api/2/users: - get: - description: Get a list of users - operationId: listUsers2 - parameters: - - description: How many items to return at one time (max 100) - explode: true - in: query - name: limit - required: false - schema: - format: int32 - type: integer - style: form - - description: The page number of results to return. - explode: true - in: query - name: page - required: false - schema: - type: integer - style: form - - description: Set to the value extracted from Before-Cursor or After-Cursor - headers to return the previous or next page. - explode: true - in: query - name: cursor - required: false - schema: - type: string - style: form - - description: An ISO8601 timestamp value that returns all users created after - a given date & time. - explode: true - in: query - name: created_since - required: false - schema: - type: string - style: form - - description: An ISO8601 timestamp value that returns all users created before - a given date & time. - explode: true - in: query - name: created_until - required: false - schema: - type: string - style: form - - description: An ISO8601 timestamp value that returns all users updated after - a given date & time. - explode: true - in: query - name: updated_since - required: false - schema: - type: string - style: form - - description: An ISO8601 timestamp value that returns all users updated before - a given date & time. - explode: true - in: query - name: updated_until - required: false - schema: - type: string - style: form - - description: An ISO8601 timestamp value that returns all users that logged - in after a given date & time. - explode: true - in: query - name: last_login_since - required: false - schema: - type: string - style: form - - description: An ISO8601 timestamp value that returns all users that logged - in before a given date & time. - explode: true - in: query - name: last_login_until - required: false - schema: - type: string - style: form - - description: The first name of the user - explode: true - in: query - name: firstname - required: false - schema: - type: string - style: form - - description: The last name of the user - explode: true - in: query - name: lastname - required: false - schema: - type: string - style: form - - description: The email address of the user - explode: true - in: query - name: email - required: false - schema: - type: string - style: form - - description: The username for the user - explode: true - in: query - name: username - required: false - schema: - type: string - style: form - - description: The AD login name for the user - explode: true - in: query - name: samaccountname - required: false - schema: - type: string - style: form - - explode: true - in: query - name: directory_id - required: false - schema: - type: integer - style: form - - description: An external identifier that has been set on the user - explode: true - in: query - name: external_id - required: false - schema: - type: string - style: form - - description: A comma separated list of OneLogin User IDs - explode: true - in: query - name: user_ids - required: false - schema: - type: string - style: form - - description: The short name of a custom attribute. Note that the attribute - name is prefixed with custom_attributes. - explode: true - in: query - name: "custom_attributes.{attribute_name}" - required: false - schema: - type: string - style: form - - description: Optional. Comma delimited list of fields to return. - explode: true - in: query - name: fields - required: false - schema: - enum: - - apps - - users - - admins - type: string - style: form - responses: - "200": - content: - application/json: - schema: - items: - $ref: '#/components/schemas/user' - type: array - description: OK - "400": - content: - application/json: - example: - error: true - code: 400 - type: bad request - message: Request Failure - schema: - $ref: '#/components/schemas/Error' - description: Bad Request - "401": - content: - application/json: - example: - error: true - code: 401 - type: Unauthorized - message: Unauthorized Error - schema: - $ref: '#/components/schemas/Error' - description: Unauthorized - "422": - content: - application/json: - example: - error: true - code: 422 - type: UnprocessableEntityError - message: "Validation failed: Value has already been taken" - schema: - $ref: '#/components/schemas/Error' - description: Unprocessable - security: - - OAuth2: - - Manage users - - Manage All - - Read All - - Read Users - summary: List Users - tags: - - Users V2 - post: - description: Create User - operationId: createUser2 - parameters: - - description: Controls how mappings will be applied to the user on creation. - Defaults to async. - explode: true - in: query - name: mappings - required: false - schema: - enum: - - async - - sync - - disabled - type: string - style: form - - description: Will passwords validate against the User Policy? Defaults to - true. - explode: true - in: query - name: validate_policy - required: false - schema: - type: boolean - style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/user' - responses: - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/user' - description: The full user resource is returned - "400": - content: - application/json: - example: - error: true - code: 400 - type: bad request - message: Request Failure - schema: - $ref: '#/components/schemas/Error' - description: Bad Request - "401": - content: - application/json: - example: - error: true - code: 401 - type: Unauthorized - message: Unauthorized Error - schema: - $ref: '#/components/schemas/Error' - description: Unauthorized - "422": - content: - application/json: - example: - error: true - code: 422 - type: UnprocessableEntityError - message: "Validation failed: Value has already been taken" - schema: - $ref: '#/components/schemas/Error' - description: Unprocessable - summary: Create User - tags: - - Users V2 - /api/2/users/{user_id}: - delete: - description: Delete User - operationId: deleteUser2 - parameters: - - description: Set to the id of the user that you want to return. - explode: false - in: path - name: user_id - required: true - schema: - $ref: '#/components/schemas/id' - style: simple - responses: - "204": - description: "On success, no content is returned in the response body." - "401": - content: - application/json: - example: - error: true - code: 401 - type: Unauthorized - message: Unauthorized Error - schema: - $ref: '#/components/schemas/Error' - description: Unauthorized - "404": - content: - application/json: - example: - error: true - code: 404 - type: Not Found - message: No Route Exists - schema: - $ref: '#/components/schemas/Error' - description: Not Found - security: - - OAuth2: - - Manage users - - Manage All - summary: Delete User - tags: - - Users V2 - get: - description: Get User - operationId: getUser2 - parameters: - - description: Set to the id of the user that you want to return. - explode: false - in: path - name: user_id - required: true - schema: - $ref: '#/components/schemas/id' - style: simple - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/user' - description: OK - "400": - content: - application/json: - example: - error: true - code: 400 - type: bad request - message: Request Failure - schema: - $ref: '#/components/schemas/Error' - description: Bad Request - "404": - content: - application/json: - example: - error: true - code: 404 - type: Not Found - message: No Route Exists - schema: - $ref: '#/components/schemas/Error' - description: Not Found - security: - - OAuth2: - - Manage users - - Manage All - - Read All - - Read Users - summary: Get User - tags: - - Users V2 - put: - description: Update User - operationId: updateUser2 - parameters: - - description: Set to the id of the user that you want to return. - explode: false - in: path - name: user_id - required: true - schema: - $ref: '#/components/schemas/id' - style: simple - - description: Controls how mappings will be applied to the user on creation. - Defaults to async. - explode: true - in: query - name: mappings - required: false - schema: - enum: - - async - - sync - - disabled - type: string - style: form - - description: Will passwords validate against the User Policy? Defaults to - true. - explode: true - in: query - name: validate_policy - required: false - schema: - type: boolean - style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/user' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/user' - description: The full user resource is returned - "400": - content: - application/json: - example: - error: true - code: 400 - type: bad request - message: Request Failure - schema: - $ref: '#/components/schemas/Error' - description: Bad Request - "401": - content: - application/json: - example: - error: true - code: 401 - type: Unauthorized - message: Unauthorized Error - schema: - $ref: '#/components/schemas/Error' - description: Unauthorized - "404": - content: - application/json: - example: - error: true - code: 404 - type: Not Found - message: No Route Exists - schema: - $ref: '#/components/schemas/Error' - description: Not Found - "422": - content: - application/json: - example: - error: true - code: 422 - type: UnprocessableEntityError - message: "Validation failed: Value has already been taken" - schema: - $ref: '#/components/schemas/Error' - description: Unprocessable - summary: Update User - tags: - - Users V2 - /api/2/users/{user_id}/apps: - get: - description: Get User Apps - operationId: getUserApps2 - parameters: - - description: Set to the id of the user that you want to return. - explode: false - in: path - name: user_id - required: true - schema: - $ref: '#/components/schemas/id' - style: simple - - description: Defaults to `false`. When `true` will show all apps that are - assigned to a user regardless of their portal visibility setting. - explode: true - in: query - name: ignore_visibility - required: false - schema: - default: false - type: boolean - style: form - responses: - "200": - content: - application/json: - schema: - items: - $ref: '#/components/schemas/getUserApps_200_response_inner' - type: array - description: OK - "401": - content: - application/json: - example: - error: true - code: 401 - type: Unauthorized - message: Unauthorized Error - schema: - $ref: '#/components/schemas/Error' - description: Unauthorized - "404": - content: - application/json: - example: - error: true - code: 404 - type: Not Found - message: No Route Exists - schema: - $ref: '#/components/schemas/Error' - description: Not Found - security: - - OAuth2: - - Manage users - - Manage All - - Read All - - Read Users - summary: Get User Apps - tags: - - Users V2 - /api/2/branding/brands: - get: - description: List Account Brands - operationId: listBrands - responses: - "200": - content: - application/json: - schema: - items: - $ref: '#/components/schemas/brand_req' - type: array - description: Successful response - security: - - OAuth2: - - Manage All - summary: List Account Brands - tags: - - Branding Service - post: - description: Create a new Account Brand - operationId: createBrand - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/brand' - responses: - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/brand' - description: Created - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - "422": - content: - application/json: - example: - statusCode: 422 - name: UnprocessableEntityError - message: invalid value in \"auth_method\" - schema: - $ref: '#/components/schemas/altErr' - description: Unprocessable Entity - security: - - OAuth2: - - Manage All - summary: Create Brand - tags: - - Branding Service - /api/2/branding/brands/{brand_id}: - delete: - description: Delete Brand - operationId: deleteBrand - parameters: - - description: Unique identifier for the branding object. - explode: false - in: path - name: brand_id - required: true - schema: - example: 9 - type: integer - style: simple - responses: - "204": - description: No Content - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - "404": - content: - application/json: - example: - statusCode: 404 - name: NotFoundError - message: The resource can't be found or the server has not found anything - matching the Request-URI - schema: - $ref: '#/components/schemas/altErr' - description: Not Found - security: - - OAuth2: - - Manage All - summary: Delete Brand - tags: - - Branding Service - get: - description: Retrieve a single brand via ID - operationId: getBrand - parameters: - - description: Unique identifier for the branding object. - explode: false - in: path - name: brand_id - required: true - schema: - example: 9 - type: integer - style: simple - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/brand' - description: Successful response - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - "404": - content: - application/json: - example: - statusCode: 404 - name: NotFoundError - message: The resource can't be found or the server has not found anything - matching the Request-URI - schema: - $ref: '#/components/schemas/altErr' - description: Not Found - security: - - OAuth2: - - Manage All - summary: Get Brand - tags: - - Branding Service - put: - description: Update Account Brand - operationId: updateBrand - parameters: - - description: Unique identifier for the branding object. - explode: false - in: path - name: brand_id - required: true - schema: - example: 9 - type: integer - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/request_brand' - responses: - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/brand' - description: Created - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - "422": - content: - application/json: - example: - statusCode: 422 - name: UnprocessableEntityError - message: invalid value in \"auth_method\" - schema: - $ref: '#/components/schemas/altErr' - description: Unprocessable Entity - security: - - OAuth2: - - Manage All - summary: Update Brand - tags: - - Branding Service - /api/2/branding/brands/{brand_id}/templates: - get: - description: List Message Templates - operationId: listMessageTemplates - parameters: - - description: Unique identifier for the branding object. - explode: false - in: path - name: brand_id - required: true - schema: - example: 9 - type: integer - style: simple - - description: "The 2 character language locale for the template. e.g. en =\ - \ English, es = Spanish" - explode: true - in: query - name: locale - required: false - schema: - example: en - pattern: "^[a-z]{2}$" - type: string - style: form - responses: - "200": - content: - application/json: - schema: - items: - $ref: '#/components/schemas/listMessageTemplates_200_response_inner' - type: array - description: Successful response - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - "422": - content: - application/json: - example: - statusCode: 422 - name: UnprocessableEntityError - message: invalid value in \"auth_method\" - schema: - $ref: '#/components/schemas/altErr' - description: Unprocessable Entity - security: - - OAuth2: - - Manage All - summary: List Message Templates - tags: - - "Branding Service: Templates" - post: - description: Create Message Template - operationId: createMessageTemplate - parameters: - - description: Unique identifier for the branding object. - explode: false - in: path - name: brand_id - required: true - schema: - example: 9 - type: integer - style: simple - - description: "The 2 character language locale for the template. e.g. en =\ - \ English, es = Spanish" - explode: true - in: query - name: locale - required: false - schema: - example: en - pattern: "^[a-z]{2}$" - type: string - style: form - requestBody: - content: - application/json: - example: - type: email_forgot_password - locale: es - template: - subject: Password Reset - html: "

Please update your password by\ - \ clicking this link

" - plain: "Please update your password by visiting this url: {{url}}" - schema: - $ref: '#/components/schemas/message_template' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/message_template' - description: Successful response - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - "422": - content: - application/json: - example: - statusCode: 422 - name: UnprocessableEntityError - message: invalid value in \"auth_method\" - schema: - $ref: '#/components/schemas/altErr' - description: Unprocessable Entity - security: - - OAuth2: - - Manage All - summary: Create Message Template - tags: - - "Branding Service: Templates" - /api/2/branding/brands/{brand_id}/templates/{template_id}: - delete: - description: Delete Message Template - operationId: deleteMessageTemplate - parameters: - - description: Unique identifier for the branding object. - explode: false - in: path - name: brand_id - required: true - schema: - example: 9 - type: integer - style: simple - - description: Unique identifier for the template to return. - explode: false - in: path - name: template_id - required: true - schema: - example: 25 - type: integer - style: simple - responses: - "204": - description: No Content - "404": - content: - application/json: - example: - statusCode: 404 - name: NotFoundError - message: The resource can't be found or the server has not found anything - matching the Request-URI - schema: - $ref: '#/components/schemas/altErr' - description: Not Found - security: - - OAuth2: - - Manage All - summary: Delete Message Template - tags: - - "Branding Service: Templates" - get: - description: Get Message Template by ID - operationId: getMessageTemplateById - parameters: - - description: Unique identifier for the branding object. - explode: false - in: path - name: brand_id - required: true - schema: - example: 9 - type: integer - style: simple - - description: Unique identifier for the template to return. - explode: false - in: path - name: template_id - required: true - schema: - example: 25 - type: integer - style: simple - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/message_template' - description: Successful response - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - "404": - content: - application/json: - example: - statusCode: 404 - name: NotFoundError - message: The resource can't be found or the server has not found anything - matching the Request-URI - schema: - $ref: '#/components/schemas/altErr' - description: Not Found - security: - - OAuth2: - - Manage All - summary: Get Message Template - tags: - - "Branding Service: Templates" - put: - description: Update Message Template by ID - operationId: updateMessageTemplateById - parameters: - - description: Unique identifier for the branding object. - explode: false - in: path - name: brand_id - required: true - schema: - example: 9 - type: integer - style: simple - - description: Unique identifier for the template to return. - explode: false - in: path - name: template_id - required: true - schema: - example: 25 - type: integer - style: simple - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/message_template' - description: Successful response - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - "422": - content: - application/json: - example: - statusCode: 422 - name: UnprocessableEntityError - message: invalid value in \"auth_method\" - schema: - $ref: '#/components/schemas/altErr' - description: Unprocessable Entity - security: - - OAuth2: - - Manage All - summary: Update Message Template - tags: - - "Branding Service: Templates" - /api/2/branding/brands/{brand_id}/apps: - get: - description: Get Apps Associated with Account Brand - operationId: getBrandApps - parameters: - - description: Unique identifier for the branding object. - explode: false - in: path - name: brand_id - required: true - schema: - example: 9 - type: integer - style: simple - responses: - "200": - content: - application/json: - schema: - items: - $ref: '#/components/schemas/brand_app' - type: array - description: Successful response - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - "404": - content: - application/json: - example: - statusCode: 404 - name: NotFoundError - message: The resource can't be found or the server has not found anything - matching the Request-URI - schema: - $ref: '#/components/schemas/altErr' - description: Not Found - security: - - OAuth2: - - Manage All - summary: Get Brand Apps - tags: - - Branding Service - /api/2/branding/email_settings: - delete: - description: Reset Email Setting config - operationId: deleteEmailSettings - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/altErr' - description: Successful response - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - security: - - OAuth2: - - Manage All - summary: Delete Custom Email Settings - tags: - - "Branding Service: SMTP" - get: - description: Get Email Settings Config - operationId: getEmailSettings - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/getEmailSettings_200_response' - description: Successful response - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - security: - - OAuth2: - - Manage All - - Read All - summary: Get Email Settings - tags: - - "Branding Service: SMTP" - put: - description: Update Email Settings Config - operationId: updateEmailSettings - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/email_config' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/altErr' - description: Successful response - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - "422": - content: - application/json: - example: - statusCode: 422 - name: UnprocessableEntityError - message: invalid value in \"auth_method\" - schema: - $ref: '#/components/schemas/altErr' - description: Unprocessable Entity - security: - - OAuth2: - - Manage All - summary: Update Email Settings - tags: - - "Branding Service: SMTP" - /api/2/branding/brands/{brand_id}/templates/{template_type}/{locale}: - get: - description: Get Template by Type and Locale - operationId: getTemplateByLocale - parameters: - - description: Unique identifier for the branding object. - explode: false - in: path - name: brand_id - required: true - schema: - example: 9 - type: integer - style: simple - - description: The message template type to return. - explode: false - in: path - name: template_type - required: true - schema: - example: email_template - type: string - style: simple - - description: "The 2 character language locale for the template. e.g. en =\ - \ English, es = Spanish" - explode: false - in: path - name: locale - required: true - schema: - example: en - pattern: "^[a-z]{2}$" - type: string - style: simple - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/message_template' - description: Successful response - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - "404": - content: - application/json: - example: - statusCode: 404 - name: NotFoundError - message: The resource can't be found or the server has not found anything - matching the Request-URI - schema: - $ref: '#/components/schemas/altErr' - description: Not Found - security: - - OAuth2: - - Manage All - summary: Get Template by Type & Locale - tags: - - "Branding Service: Templates" - put: - description: Update Template by Type and Locale - operationId: updateTemplateByLocale - parameters: - - description: Unique identifier for the branding object. - explode: false - in: path - name: brand_id - required: true - schema: - example: 9 - type: integer - style: simple - - description: The message template type to return. - explode: false - in: path - name: template_type - required: true - schema: - example: email_template - type: string - style: simple - - description: "The 2 character language locale for the template. e.g. en =\ - \ English, es = Spanish" - explode: false - in: path - name: locale - required: true - schema: - example: en - pattern: "^[a-z]{2}$" - type: string - style: simple - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/message_template' - description: Successful response - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - "404": - content: - application/json: - example: - statusCode: 404 - name: NotFoundError - message: The resource can't be found or the server has not found anything - matching the Request-URI - schema: - $ref: '#/components/schemas/altErr' - description: Not Found - security: - - OAuth2: - - Manage All - summary: Update Template by Type & Locale - tags: - - "Branding Service: Templates" - /api/2/branding/brands/master/templates/{template_type}: - get: - description: Get Master Template by Type - operationId: getMasterByType - parameters: - - description: The message template type to return. - explode: false - in: path - name: template_type - required: true - schema: - example: email_template - type: string - style: simple - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/message_template' - description: Successful response - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - "404": - content: - application/json: - example: - statusCode: 404 - name: NotFoundError - message: The resource can't be found or the server has not found anything - matching the Request-URI - schema: - $ref: '#/components/schemas/altErr' - description: Not Found - security: - - OAuth2: - - Manage All - summary: Get Master Template by Type - tags: - - "Branding Service: Templates" -components: - headers: - Current-Page: - description: The index number of the current page being returned. - explode: false - schema: - type: integer - style: simple - Page-Items: - description: The number of items returned in the response. - explode: false - schema: - type: integer - style: simple - Total-Count: - description: The total number of items across all pages. - explode: false - schema: - type: integer - style: simple - Total-Pages: - description: The total number of pages to return all results. - explode: false - schema: - type: integer - style: simple - Link: - description: "A set of urls which contains premade links for first, next" - explode: false - schema: - items: - type: string - type: array - style: simple - Before-Cursor: - description: A string that can be used to request the page of results that preceed - the current page using the same set of search filters and pagination options. - explode: false - schema: - type: string - style: simple - After-Cursor: - description: A string that can be used to request the page of results that follows - the current page using the same set of search filters and pagination options. - explode: false - schema: - type: string - style: simple - parameters: - api_auth_id: - explode: false - in: path - name: api_auth_id - required: true - schema: - type: string - style: simple - app_id: - explode: false - in: path - name: app_id - required: true - schema: - type: integer - style: simple - auth_method: - explode: true - in: query - name: auth_method - required: false - schema: - $ref: '#/components/schemas/auth_method' - style: form - claim_id: - explode: false - in: path - name: claim_id - required: true - schema: - type: integer - style: simple - client_app_id: - explode: false - in: path - name: client_app_id - required: true - schema: - type: integer - style: simple - client_id: - explode: true - in: query - name: client_id - required: false - schema: - type: integer - style: form - connector_id: - description: Returns all apps based off a specific connector. See List Connectors - for a complete list of Connector IDs. - explode: true - in: query - name: connector_id - required: false - schema: - type: integer - style: form - content-type: - example: application/json - explode: false - in: header - name: Content-Type - required: false - schema: - default: application/json - type: string - style: simple - created_at: - explode: true - in: query - name: created_at - required: false - schema: - type: string - style: form - cursor: - description: Set to the value extracted from Before-Cursor or After-Cursor headers - to return the previous or next page. - explode: true - in: query - name: cursor - required: false - schema: - type: string - style: form - device_id: - explode: false - in: path - name: device_id - required: true - schema: - type: string - style: simple - directory_id: - explode: true - in: query - name: directory_id - required: false - schema: - type: integer - style: form - event_id: - explode: false - in: path - name: event_id - required: true - schema: - type: integer - style: simple - event_type_id: - explode: true - in: query - name: event_type_id - required: false - schema: - items: - type: integer - type: array - style: form - group_id: - explode: false - in: path - name: group_id - required: true - schema: - type: string - style: simple - has_condition: - description: |- - Filters Rules based on their Conditions. Values formatted as :, where name is the Condition to look for, and value is the value to find. Multiple filters can be declared by using a comma delimited list. Wildcards are supported in both the name and value fields. - For example: - Single filter. has_condition=has_role:123456 - Multiple filters. has_condition=has_role:123456,status:1 - Wildcard for conditions. has_condition=*:123456 - Wildcard for condition values. has_condition=has_role:* - example: has_condition=has_role:123456 - explode: true - in: query - name: has_condition - required: false - schema: - type: string - style: form - kid: - example: ZoKMCcDDtLHKYPyZnXSDKTMmknGltey7M09CQy3RCIE - explode: false - in: path - name: kid - required: true - schema: - description: The unique identifier for the key to fetch. You can get a list - of keys and kids values via the List Signing Keys endpoint. - type: string - style: simple - limit: - description: How many items to return at one time (max 100) - explode: true - in: query - name: limit - required: false - schema: - format: int32 - type: integer - style: form - mapping_action_value: - explode: false - in: path - name: mapping_action_value - required: true - schema: - type: string - style: simple - mapping_condition_value: - explode: false - in: path - name: mapping_condition_value - required: true - schema: - type: string - style: simple - mapping_id: - description: The id of the user mapping to locate. - explode: false - in: path - name: mapping_id - required: true - schema: - type: integer - style: simple - name: - explode: true - in: query - name: name - required: false - schema: - type: string - style: form - page: - description: The page number of results to return. - explode: true - in: query - name: page - required: false - schema: - type: integer - style: form - parameter_id: - explode: false - in: path - name: parameter_id - required: true - schema: - type: string - style: simple - privilege_id: - explode: false - in: path - name: privilege_id - required: true - schema: - type: string - style: simple - redirect_uri: - example: https://app.example.com/auth - explode: true - in: query - name: redirect_uri - required: false - schema: - description: The redirect uri that is registered with OneLogin for this OpenId - Connect app. - type: string - style: form - resolution: - explode: true - in: query - name: resolution - required: false - schema: - type: string - style: form - role_id: - description: Set to the id of the role you want to return. - explode: false - in: path - name: role_id - required: true - schema: - type: string - style: simple - rule_action_value: - explode: false - in: path - name: rule_action_value - required: true - schema: - type: string - style: simple - rule_condition_value: - explode: false - in: path - name: rule_condition_value - required: true - schema: - type: string - style: simple - rule_id: - explode: false - in: path - name: rule_id - required: true - schema: - type: string - style: simple - scope_id: - explode: false - in: path - name: scope_id - required: true - schema: - type: integer - style: simple - since: - explode: true - in: query - name: since - required: false - schema: - type: string - style: form - until: - explode: true - in: query - name: until - required: false - schema: - type: string - style: form - user_id: - description: Set to the id of the user that you want to return. - explode: false - in: path - name: user_id - required: true - schema: - $ref: '#/components/schemas/id' - style: simple - has_condition_type: - description: |- - Filters Rules based on their Conditions. Values formatted as :, where name is the Condition to look for, and value is the value to find. Multiple filters can be declared by using a comma delimited list. Wildcards are supported in both the name and value fields. - For example: - Single filter. has_condition=has_role:123456 - Multiple filters. has_condition=has_role:123456,status:1 - Wildcard for conditions. has_condition=*:123456 - Wildcard for condition values. has_condition=has_role:* - explode: true - in: query - name: has_condition_type - required: false - schema: - enum: - - builtin - - custom - - none - type: string - style: form - has_action: - description: |- - Filters Rules based on their Actions. Values formatted as :, where name is the Action to look for, and value is the value to find. Multiple filters can be declared by using a comma delimited list. Wildcards are supported in both the name and value fields. - For example: - Single filter. has_action=set_licenses:123456 - Multiple filters. has_action=set_groups:123456,set_usertype:* - Wildcard for actions. has_action=*:123456 - Wildcard for action values. has_action=set_userprincipalname:* - example: "has_action=set_groups:123456,set_usertype:*" - explode: true - in: query - name: has_action - required: false - schema: - type: string - style: form - has_action_type: - description: |- - Filters Rules based on their action types. - Allowed values are: - builtin - actions that involve standard attributes custom - actions that involve custom attributes none - no actions are defined For example: - Find Rules with no actions has_action_type=none - explode: true - in: query - name: has_action_type - required: false - schema: - enum: - - builtin - - custom - - none - type: string - style: form - enabled: - description: Defaults to true. When set to `false` will return all disabled - mappings. - explode: true - in: query - name: enabled - required: false - schema: - default: true - type: boolean - style: form - registration_id: - description: The id of a registration - example: - explode: false - in: path - name: registration_id - required: true - schema: - type: string - style: simple - verification_id: - description: The verification_id is returned on activation of the factor or - you can get the device_id using the Activate Factor API call. - example: - explode: false - in: path - name: verification_id - required: true - schema: - type: string - style: simple - brand_id: - description: Unique identifier for the branding object. - explode: false - in: path - name: brand_id - required: true - schema: - example: 9 - type: integer - style: simple - template_id: - description: Unique identifier for the template to return. - explode: false - in: path - name: template_id - required: true - schema: - example: 25 - type: integer - style: simple - template_type: - description: The message template type to return. - explode: false - in: path - name: template_type - required: true - schema: - example: email_template - type: string - style: simple - locale: - description: "The 2 character language locale for the template. e.g. en = English,\ - \ es = Spanish" - explode: false - in: path - name: locale - required: true - schema: - example: en - pattern: "^[a-z]{2}$" - type: string - style: simple - mappings: - description: Controls how mappings will be applied to the user on creation. - Defaults to async. - explode: true - in: query - name: mappings - required: false - schema: - enum: - - async - - sync - - disabled - type: string - style: form - validate_policy: - description: Will passwords validate against the User Policy? Defaults to true. - explode: true - in: query - name: validate_policy - required: false - schema: - type: boolean - style: form - ignore_visibility: - description: Defaults to `false`. When `true` will show all apps that are assigned - to a user regardless of their portal visibility setting. - explode: true - in: query - name: ignore_visibility - required: false - schema: - default: false - type: boolean - style: form - created_since: - description: An ISO8601 timestamp value that returns all users created after - a given date & time. - explode: true - in: query - name: created_since - required: false - schema: - type: string - style: form - created_until: - description: An ISO8601 timestamp value that returns all users created before - a given date & time. - explode: true - in: query - name: created_until - required: false - schema: - type: string - style: form - updated_since: - description: An ISO8601 timestamp value that returns all users updated after - a given date & time. - explode: true - in: query - name: updated_since - required: false - schema: - type: string - style: form - updated_until: - description: An ISO8601 timestamp value that returns all users updated before - a given date & time. - explode: true - in: query - name: updated_until - required: false - schema: - type: string - style: form - last_login_since: - description: An ISO8601 timestamp value that returns all users that logged in - after a given date & time. - explode: true - in: query - name: last_login_since - required: false - schema: - type: string - style: form - last_login_until: - description: An ISO8601 timestamp value that returns all users that logged in - before a given date & time. - explode: true - in: query - name: last_login_until - required: false - schema: - type: string - style: form - firstname: - description: The first name of the user - explode: true - in: query - name: firstname - required: false - schema: - type: string - style: form - lastname: - description: The last name of the user - explode: true - in: query - name: lastname - required: false - schema: - type: string - style: form - email: - description: The email address of the user - explode: true - in: query - name: email - required: false - schema: - type: string - style: form - username: - description: The username for the user - explode: true - in: query - name: username - required: false - schema: - type: string - style: form - samaccountname: - description: The AD login name for the user - explode: true - in: query - name: samaccountname - required: false - schema: - type: string - style: form - external_id: - description: An external identifier that has been set on the user - explode: true - in: query - name: external_id - required: false - schema: - type: string - style: form - user_ids: - description: A comma separated list of OneLogin User IDs - explode: true - in: query - name: user_ids - required: false - schema: - type: string - style: form - custom_attributes: - description: The short name of a custom attribute. Note that the attribute name - is prefixed with custom_attributes. - explode: true - in: query - name: "custom_attributes.{attribute_name}" - required: false - schema: - type: string - style: form - fields: - description: Optional. Comma delimited list of fields to return. - explode: true - in: query - name: fields - required: false - schema: - enum: - - apps - - users - - admins - type: string - style: form - user_id_query: - description: Set to the id of the user that you want to return. - explode: true - in: query - name: user_id - required: false - schema: - $ref: '#/components/schemas/id' - style: form - id_query: - explode: true - in: query - name: id - required: false - schema: - $ref: '#/components/schemas/id' - style: form - locale_query: - description: "The 2 character language locale for the template. e.g. en = English,\ - \ es = Spanish" - explode: true - in: query - name: locale - required: false - schema: - example: en - pattern: "^[a-z]{2}$" - type: string - style: form - app_name: - description: Optional. Returns roles that contain this app name. - explode: true - in: query - name: app_name - required: false - schema: - type: string - style: form - role_name: - description: Optional. Filters by role name. - explode: true - in: query - name: role_name - required: false - schema: - type: string - style: form - assigned: - description: Optional. Defaults to true. Returns all apps not yet assigned to - the role. - explode: true - in: query - name: assigned - required: false - schema: - type: boolean - style: form - include_unassigned: - description: Optional. Defaults to false. Include users that aren’t assigned - to the role. - explode: true - in: query - name: include_unassigned - required: false - schema: - type: boolean - style: form - user_name: - description: "Allows you to filter on first name, last name, username, and email\ - \ address." - explode: true - in: query - name: name - required: false - schema: - type: string - style: form - app_id_query: - explode: true - in: query - name: app_id - required: true - schema: - type: integer - style: form - after: - description: Optional ISO8601 formatted date string. Defaults to 30 days ago. - Maximum date is 90 days ago. - explode: true - in: query - name: after - required: false - schema: - type: string - style: form - before: - description: Optional ISO8601 formatted date string. Defaults to current date. - Maximum date is 90 days ago. - explode: true - in: query - name: before - required: false - schema: - type: string - style: form - hook_id_path: - description: Set to the id of the Hook that you want to return. - explode: false - in: path - name: hook_id - required: true - schema: - description: The Hook unique ID in OneLogin. - type: string - style: simple - envvar_id_path: - description: Set to the id of the Hook Environment Variable that you want to - fetch. - explode: false - in: path - name: envvar_id - required: true - schema: - type: string - style: simple - request_id_query: - description: Returns logs that contain this request_id. - explode: true - in: query - name: request_id - required: false - schema: - type: string - style: form - correlation_id_query: - description: Returns logs that contain this correlation_id. - explode: true - in: query - name: correlation_id - required: false - schema: - type: string - style: form - responses: - "400": - content: - application/json: - example: - statusCode: 400 - name: BadRequestError - message: "The request could not be understood by the server due to malformed\ - \ syntax: Statement required Action array" - schema: - $ref: '#/components/schemas/altErr' - description: Bad Request - "401": - content: - application/json: - example: - statusCode: 401 - name: UnauthorizedError - message: This request requires Authentication - schema: - $ref: '#/components/schemas/altErr' - description: Unauthorized - "403": - content: - application/json: - example: - statusCode: 403 - name: ForbiddenError - message: Not allowed to destroy specified resource - schema: - $ref: '#/components/schemas/altErr' - description: Forbidden - "404": - content: - application/json: - example: - statusCode: 404 - name: NotFoundError - message: The resource can't be found or the server has not found anything - matching the Request-URI - schema: - $ref: '#/components/schemas/altErr' - description: Not Found - "422": - content: - application/json: - example: - statusCode: 422 - name: UnprocessableEntityError - message: invalid value in \"auth_method\" - schema: - $ref: '#/components/schemas/altErr' - description: Unprocessable Entity - BadRequest: - content: - application/json: - example: - error: true - code: 400 - type: bad request - message: Request Failure - schema: - $ref: '#/components/schemas/Error' - description: Bad Request - Forbidden: - content: - application/json: - example: - error: true - code: 403 - type: ForbiddenError - message: not allowed - schema: - $ref: '#/components/schemas/Error' - description: Forbidden - NotFound: - content: - application/json: - example: - error: true - code: 404 - type: Not Found - message: No Route Exists - schema: - $ref: '#/components/schemas/Error' - description: Not Found - Unauthorized: - content: - application/json: - example: - error: true - code: 401 - type: Unauthorized - message: Unauthorized Error - schema: - $ref: '#/components/schemas/Error' - description: Unauthorized - Unprocessable: - content: - application/json: - example: - error: true - code: 422 - type: UnprocessableEntityError - message: "Validation failed: Value has already been taken" - schema: - $ref: '#/components/schemas/Error' - description: Unprocessable - schemas: - Error: - example: - code: 200 - error: false - type: Success - message: Success - properties: - error: - example: false - type: boolean - code: - example: 200 - type: integer - type: - example: Success - type: string - message: - example: Success - type: string - required: - - code - - message - type: object - action_obj: - example: - action: action - value: - - "2" - - "2" - properties: - action: - description: The action to apply - type: string - value: - description: Only applicable to provisioned and set_* actions. Items in - the array will be a plain text string or valid value for the selected - action. - items: - example: "2" - type: string - type: array - type: object - altErr: - example: - name: Success - message: Settings Updated - statusCode: 200 - properties: - statusCode: - description: HTTP error code https://developer.mozilla.org/en-US/docs/Web/HTTP/Status - example: 200 - type: integer - name: - description: Error Code Name - example: Success - type: string - message: - description: Description of Error - example: Settings Updated - type: string - type: object - app_parameters: - additionalProperties: true - description: |- - The parameters section contains parameterized attributes that have defined at the connector level as well as custom attributes that have been defined specifically for this app. Regardless of how they are defined, all parameters have the following attributes. - Each parameter is an object with the key for the object being set as the parameters short name. - example: - include_in_saml_assertion: true - user_attribute_macros: user_attribute_macros - user_attribute_mappings: user_attribute_mappings - label: label - properties: - user_attribute_mappings: - description: A user attribute to map values from For custom attributes prefix - the name of the attribute with `custom_attribute_`. e.g. To get the value - for custom attribute `employee_id` use `custom_attribute_employee_id`. - type: string - user_attribute_macros: - description: When `user_attribute_mappings` is set to `_macro_` this macro - will be used to assign the parameter value. - type: string - label: - description: The can only be set when creating a new parameter. It can not - be updated. - type: string - include_in_saml_assertion: - description: "When true, this parameter will be included in a SAML assertion\ - \ payload." - example: true - type: boolean - type: object - auth_claim: - properties: - name: - description: The attribute name for the claim when its returned in an Access - Token - example: email_address - type: string - user_attribute_mappings: - description: A user attribute to map values from For custom attributes prefix - the name of the attribute with `custom_attribute_`. e.g. To get the value - for custom attribute `employee_id` use `custom_attribute_employee_id`. - example: email - type: string - user_attribute_macros: - description: When `user_attribute_mappings` is set to `_macro_` this macro - will be used to assign the parameter value. - type: string - required: - - name - type: object - auth_id: - example: - id: 323005 - properties: - id: - description: Unique ID for the Scope - example: 323005 - type: integer - type: object - auth_method: - description: |- - An ID indicating the type of app: - - 0: Password - - 1: OpenId - - 2: SAML - - 3: API - - 4: Google - - 6: Forms Based App - - 7: WSFED - - 8: OpenId Connect - enum: - - 0 - - 1 - - 2 - - 3 - - 4 - - 5 - - 6 - - 7 - - 8 - example: 8 - type: integer - auth_scope: - example: - description: A custom scope - id: 323005 - value: custom:scope - properties: - id: - description: Unique ID for the Scope - example: 323005 - readOnly: true - type: integer - value: - description: A value representing the api scope that with be authorized - example: custom:scope - type: string - description: - description: A description of what access the scope enables - example: A custom scope - type: string - type: object - auth_server: - description: base resource for configuring api authorization in OneLogin - example: - configuration: - access_token_expiration_minutes: 20 - resource_identifier: https://example.com/contacts - audiences: - - audiences - - audiences - refresh_token_expiration_minutes: 30 - name: Contacts API - description: API manages contacts - id: 1022697 - properties: - id: - description: Auth server unique ID in Onelogin - example: 1022697 - readOnly: true - type: integer - name: - description: Name of the API. - example: Contacts API - type: string - description: - description: Description of what the API does. - example: API manages contacts - type: string - configuration: - $ref: '#/components/schemas/auth_server_configuration' - required: - - configuration - - description - - name - type: object - auth_server_configuration: - description: Authorization server configuration - example: - access_token_expiration_minutes: 20 - resource_identifier: https://example.com/contacts - audiences: - - audiences - - audiences - refresh_token_expiration_minutes: 30 - properties: - audiences: - description: List of API endpoints that will be returned in Access Tokens. - items: - type: string - type: array - refresh_token_expiration_minutes: - description: The number of minutes until refresh token expires. There is - no maximum expiry limit. - example: 30 - type: integer - resource_identifier: - description: Unique identifier for the API that the Authorization Server - will issue Access Tokens for. - example: https://example.com/contacts - type: string - access_token_expiration_minutes: - description: The number of minutes until access token expires. There is - no maximum expiry limit. - example: 20 - type: integer - required: - - audiences - - resource_identifier - type: object - brand: - example: - id: 9 - enabled: true - custom_support_enabled: false - custom_color: '#1298b4' - custom_accent_color: '#b60012' - custom_masking_color: '#beefed' - custom_masking_opacity: 40 - mfa_enrollment_message: You must register with the OneLogin Protect app in - order to login - enable_custom_label_for_login_screen: true - custom_label_text_for_login_screen: ACME Username or Email - login_instruction: "To login, enter your ACME Username or Email. Reach out\ - \ to help.desk@acme.org if you have trouble logging in." - login_instruction_title: ACME Login Instructions - hide_onelogin_footer: false - background: - urls: - original: https://cdn.onelogin.com/images/account_branding/account_background/original/9ada91a5d34b497f6f0b93934165f0c713ed3c2d.?1599165114 - login: https://cdn.onelogin.com/images/account_branding/account_background/login/a2011597bad264455796281b94471284c6919857.jpg?1599165114 - branding: https://cdn.onelogin.com/images/account_branding/account_background/branding/8547d161732776facb3d9127146c06a09aa63362.jpg?1599165114 - file_size: 30338 - updated_at: 2020-09-03T20:31:54.146Z - content_type: image/jpeg - logo: - urls: - original: https://cdn.onelogin.com/images/account_branding/account_logo/original/25506f4f5b795b39f8ab6ea8a6c85f78094941bf.?1599165114 - login: https://cdn.onelogin.com/images/account_branding/account_logo/login/103d08ec5efb4ab204421f3dd15eddc973c8d0c5.png?1599165114 - navigation: https://cdn.onelogin.com/images/account_branding/account_logo/navigation/08fef613402a898832d215a3359b56e6d69ac232.png?1599165114 - file_size: 4408 - updated_at: 2020-09-03T20:31:54.373Z - content_type: image/png - properties: - id: - type: integer - enabled: - default: false - description: Indicates if the brand is enabled or not - example: true - type: boolean - custom_support_enabled: - description: "Indicates if the custom support is enabled. If enabled, the\ - \ login page includes the ability to submit a support request." - example: false - type: boolean - custom_color: - description: Primary brand color - example: '#1298b4' - type: string - custom_accent_color: - description: Secondary brand color - example: '#b60012' - type: string - custom_masking_color: - description: Color for the masking layer above the background image of the - branded login screen. - example: '#beefed' - type: string - custom_masking_opacity: - description: Opacity for the custom_masking_color. - example: 40 - type: integer - mfa_enrollment_message: - description: Text that replaces the default text displayed on the initial - screen of the MFA Registration. - example: You must register with the OneLogin Protect app in order to login - type: string - enable_custom_label_for_login_screen: - description: Indicates if the custom Username/Email field label is enabled - or not - example: true - type: boolean - custom_label_text_for_login_screen: - description: Custom label for the Username/Email field on the login screen. - See example here. - example: ACME Username or Email - type: string - login_instruction: - description: "Text for the login instruction screen, styled in Markdown." - example: "To login, enter your ACME Username or Email. Reach out to help.desk@acme.org\ - \ if you have trouble logging in." - type: string - login_instruction_title: - description: Link text to show login instruction screen. - example: ACME Login Instructions - type: string - hide_onelogin_footer: - description: Indicates if the OneLogin footer will appear at the bottom - of the login page. - example: true - type: boolean - background: - $ref: '#/components/schemas/brand_background' - logo: - $ref: '#/components/schemas/brand_logo' - required: - - background - - custom_accent_color - - custom_color - - custom_label_text_for_login_screen - - custom_masking_color - - custom_masking_opacity - - custom_support_enabled - - enable_custom_label_for_login_screen - - enabled - - hide_onelogin_footer - - id - - login_instruction - - login_instruction_title - - logo - - mfa_enrollment_message - type: object - brand_app: - example: - auth_method: 2 - visible: true - updated_at: 2020-09-11T19:35:08.288Z - name: Mom Corp - connector_id: 3001 - description: Mom’s Friendly Robot Company - created_at: 2020-09-08T22:24:19.551Z - id: 1455 - auth_method_description: SAML2.0 - properties: - id: - example: 1455 - type: integer - updated_at: - example: 2020-09-11T19:35:08.288Z - type: string - name: - example: Mom Corp - type: string - connector_id: - example: 3001 - type: integer - auth_method_description: - example: SAML2.0 - type: string - description: - example: Mom’s Friendly Robot Company - type: string - auth_method: - example: 2 - type: integer - created_at: - example: 2020-09-08T22:24:19.551Z - type: string - visible: - example: true - type: boolean - required: - - auth_method - - auth_method_description - - connector_id - - created_at - - description - - id - - name - - updated_at - - visible - type: object - brand_req: - example: - name: ACME - id: 912 - enabled: true - properties: - id: - description: Brand’s unique ID in OneLogin. - example: 912 - type: integer - enabled: - description: Indicates if the brand is enabled or not. - example: true - type: boolean - name: - description: Brand name for humans. This isn’t related to subdomains. - example: ACME - type: string - type: object - client_app_full: - example: - name: An oidc app - scopes: - - description: Read some contacts - id: 25 - value: read:contacts - - description: Read some contacts - id: 25 - value: read:contacts - api_auth_id: 1033034 - app_id: 1026152 - properties: - scopes: - description: List of All Scopes assigned to a client app - items: - $ref: '#/components/schemas/scope' - type: array - app_id: - description: Unique Client App ID - example: 1026152 - type: integer - name: - description: Name of client app - example: An oidc app - type: string - api_auth_id: - example: 1033034 - type: integer - type: object - clock_counter: - description: "unit: - 0 = Seconds - 1 = Minutes - 2 = Hours value: - When Unit\ - \ = 0 or 1 value must be 0-60 - When Unit = 2 value must be 0-24" - example: - value: 30 - unit: 1 - properties: - value: - type: integer - unit: - type: integer - type: object - condition: - description: Conditions in which mappings are applied - example: - source: last_login - value: "90" - operator: '>' - properties: - source: - description: source field to check. - example: last_login - type: string - operator: - description: A valid operator for the selected condition source - example: '>' - type: string - value: - description: A plain text string or valid value for the selected condition - source - example: "90" - type: string - type: object - configuration_oidc: - properties: - login_url: - description: The OpenId Connect Client Id. Note that client_secret is only - returned after Creating an App. - type: string - redirect_uri: - description: Comma or newline separated list of valid redirect uris for - the OpenId Connect Authorization Code flow. - example: https://localhost:3000/callback - type: string - access_token_expiration_minutes: - description: Number of minutes the refresh token will be valid for. - example: 1 - type: integer - refresh_token_expiration_minutes: - description: Number of minutes the refresh token will be valid for. - example: 1 - type: integer - token_endpoint_auth_method: - description: "- 0: Basic - 1: POST - 2: None / PKCE" - enum: - - 0 - - 1 - - 2 - type: integer - oidc_application_type: - description: "- 0 : Web - 1 : Native / Mobile" - enum: - - 0 - - 1 - example: 0 - type: integer - required: - - access_token_expiration_minutes - - login_url - - oidc_application_type - - redirect_uri - - refresh_token_expiration_minutes - - token_endpoint_auth_method - type: object - configuration_saml: - properties: - signature_algorithm: - description: |- - One of the following: - - SHA-1 - - SHA-256 - - SHA-348 - - SHA-512 - example: SHA-512 - type: string - certificate_id: - description: When creating apps the default certificate will be used unless - the `certificate_id` attribute is applied in the `configuration` object. - example: 123456 - type: integer - required: - - certificate_id - - signature_algorithm - type: object - connector: - example: - icon_url: https://cdn-shadow.onlgn.net/images/icons/square/amazonwebservices3multirole/old_original.png?1421095823 - allows_new_parameters: true - auth_method: 8 - name: Amazon Web Services Multi-Role - id: 1061937 - properties: - id: - description: Connectors unique ID in OneLogin. - example: 1061937 - type: integer - name: - description: Name of Connector - example: Amazon Web Services Multi-Role - type: string - icon_url: - description: A link to the icon's url. - example: https://cdn-shadow.onlgn.net/images/icons/square/amazonwebservices3multirole/old_original.png?1421095823 - type: string - auth_method: - $ref: '#/components/schemas/auth_method' - allows_new_parameters: - description: Indicates if apps created using this connector will be allowed - to create custom parameters. - type: boolean - type: object - device: - properties: - device_id: - description: an ID for the device type that must be submitted with the Verify - Factor API call. - example: 654984 - type: integer - device_type: - description: "Lists an available MFA device type, such as OneLogin OTP SMS\ - \ or Google Authenticator." - example: Google Authenticator - type: string - type: object - devices: - example: - - device_id: 51684 - device_type: Google Authenticator - items: - $ref: '#/components/schemas/device' - type: array - email_config: - properties: - address: - description: Email Settings server address - example: smtp.sendgrid.net - type: string - use_tls: - default: true - description: Use TLS - example: true - type: boolean - from: - description: The From email address in the message. - example: email@example.com - type: string - domain: - description: Domain of the From address. - example: example.com - type: string - user_name: - description: The user name of the account to authenticate with the Email - Settings server. - example: user-name - type: string - password: - description: The password of the account to authenticate with the Email - Settings server. - example: password - format: password - type: string - port: - default: 25 - description: Defaults to 25. - example: 587 - type: integer - required: - - address - - domain - - from - type: object - enforcement_point: - description: For apps that connect to a OneLogin Access Enforcement Point the - following enforcement_point object will be included with the app payload. - example: - context_root: / - resources: - - resource_id: 809 - conditions: "" - is_path_regex: false - permissions: allow - require_auth: false - path: / - landing_page: "" - require_sitewide_authentication: false - token: b491c647f5e0cff854ad606722ac98342b4b0882 - target: "" - vhost: "" - permissions: allow - session_expiry_fixed: - value: 30 - unit: 1 - case_sensitive: false - use_target_host_header: false - conditions: "" - session_expiry_inactivity: - value: 30 - unit: 1 - properties: - require_sitewide_authentication: - description: Require user authentication to access any resource protected - by this enforcement point. - example: false - type: boolean - conditions: - description: "If access is conditional, the conditions that must evaluate\ - \ to true to allow access to a resource. For example, to require the user\ - \ must be authenticated and have either the role Admin or User" - example: "" - type: string - session_expiry_fixed: - $ref: '#/components/schemas/clock_counter' - session_expiry_inactivity: - $ref: '#/components/schemas/clock_counter' - permissions: - description: "Specify to always `allow`, `deny` access to resources, of\ - \ if access is `conditional`." - enum: - - allow - - deny - - conditional - example: allow - type: string - token: - description: Can only be set on create. Access Gateway Token. - example: b491c647f5e0cff854ad606722ac98342b4b0882 - readOnly: true - type: string - target: - description: "A fully-qualified URL to the internal application including\ - \ scheme, authority and path. The target host authority must be an IP\ - \ address, not a hostname." - example: "" - nullable: true - type: string - resources: - description: Array of resource objects - example: - - resource_id: 809 - conditions: "" - is_path_regex: false - permissions: allow - require_auth: false - path: / - items: - $ref: '#/components/schemas/enforcement_point_resources_inner' - type: array - context_root: - description: "The root path to the application, often the name of the application.\ - \ Can be any name, path or just a slash (“/”). The context root uniquely\ - \ identifies the application within the enforcement point." - example: / - type: string - use_target_host_header: - description: Use the target host header as opposed to the original gateway - or upstream host header. - example: false - type: boolean - vhost: - description: A comma-delimited list of one or more virtual hosts that map - to applications assigned to the enforcement point. A VHOST may be a host - name or an IP address. VHOST distinguish between applications that are - at the same context root. - example: "" - nullable: true - type: string - landing_page: - description: "The location within the context root to which the browser\ - \ will be redirected for IdP-initiated single sign-on. For example, the\ - \ landing page might be an index page in the context root such as index.html\ - \ or default.aspx. The landing page cannot begin with a slash and must\ - \ use valid URL characters." - example: "" - nullable: true - type: string - case_sensitive: - description: "The URL path evaluation is case insensitive by default. Resources\ - \ hosted on web servers such as Apache, NGINX and Java EE are case sensitive\ - \ paths. Web servers such as Microsoft IIS are not case-sensitive." - example: false - type: boolean - type: object - event: - example: - privilege_id: 6 - risk_reasons: risk_reasons - notes: notes - assumed_by_superadmin_or_reseller: 5 - policy_id: 1 - service_directory_id: 9 - directory_sync_run_id: 9 - user_name: user_name - risk_cookie_id: risk_cookie_id - created_at: created_at - solved: true - client_id: client_id - event_type_id: 3 - otp_device_id: 1 - actor_user_id: 6 - certificate_id: 7 - resource_type_id: 1 - actor_user_name: actor_user_name - param: param - role_id: 5 - error_description: error_description - user_field_id: 6 - id: 4 - ipaddr: ipaddr - app_id: 5 - assuming_acting_user_id: 2 - proxy_ip: proxy_ip - risk_score: 4 - otp_device_name: otp_device_name - policy_name: policy_name - object_id: 1 - adc_id: 1 - app-name: app-name - role_name: role_name - custom_message: custom_message - policy_type: policy_type - account_id: 0 - group-name: group-name - group_id: 2 - user_id: 8 - resolved_at: resolved_at - mapping_id: 7 - radius_config_id: 7 - trusted_idp_id: 9 - actor_system: actor_system - properties: - account_id: - description: Account that triggered the event. - type: integer - actor_system: - description: Acting system that triggered the event when the actor is not - a user. - type: string - actor_user_id: - description: ID of the user whose action triggered the event. - type: integer - actor_user_name: - description: First and last name of the user whose action triggered the - event. - type: string - adc_id: - type: integer - app-name: - description: "Name of the app involved in the event, if applicable." - type: string - app_id: - description: "ID of the app involved in the event, if applicable." - type: integer - assumed_by_superadmin_or_reseller: - type: integer - assuming_acting_user_id: - description: "ID of the user who assumed the role of the acting user to\ - \ trigger the event, if applicable." - type: integer - certificate_id: - type: integer - client_id: - description: Client ID used to generate the access token that made the API - call that generated the event. - type: string - created_at: - description: ISO8601 Time and date at which the event was created. This - value is autogenerated by OneLogin. - type: string - custom_message: - description: More details about the event. - type: string - directory_sync_run_id: - description: Directory sync run ID. - type: integer - error_description: - description: "Provisioning error details, if applicable." - type: string - event_type_id: - description: Type of event triggered. - enum: - - 1 - - 2 - - 3 - - 4 - - 5 - - 6 - - 7 - - 8 - - 9 - - 10 - - 11 - - 12 - - 13 - - 14 - - 15 - - 16 - - 17 - - 18 - - 19 - - 20 - - 21 - - 22 - - 23 - - 24 - - 25 - - 26 - - 27 - - 28 - - 29 - - 30 - - 31 - - 32 - - 33 - - 34 - - 35 - - 36 - - 37 - - 38 - - 39 - - 40 - - 41 - - 42 - - 43 - - 44 - - 45 - - 46 - - 47 - - 48 - - 49 - - 50 - - 51 - - 52 - - 53 - - 54 - - 55 - - 56 - - 57 - - 58 - - 59 - - 60 - - 61 - - 62 - - 63 - - 64 - - 65 - - 66 - - 67 - - 68 - - 69 - - 70 - - 71 - - 72 - - 73 - - 74 - - 75 - - 76 - - 77 - - 78 - - 79 - - 80 - - 81 - - 82 - - 83 - - 84 - - 85 - - 86 - - 87 - - 88 - - 89 - - 90 - - 91 - - 92 - - 95 - - 96 - - 100 - - 101 - - 102 - - 103 - - 104 - - 105 - - 106 - - 110 - - 111 - - 112 - - 113 - - 114 - - 115 - - 116 - - 117 - - 118 - - 119 - - 120 - - 121 - - 122 - - 123 - - 124 - - 125 - - 126 - - 127 - - 128 - - 129 - - 130 - - 131 - - 132 - - 133 - - 134 - - 135 - - 136 - - 137 - - 138 - - 139 - - 140 - - 141 - - 145 - - 146 - - 147 - - 148 - - 149 - - 150 - - 151 - - 152 - - 153 - - 154 - - 155 - - 156 - - 157 - - 158 - - 159 - - 160 - - 161 - - 162 - - 163 - - 164 - - 165 - - 166 - - 167 - - 168 - - 169 - - 170 - - 171 - - 172 - - 173 - - 174 - - 175 - - 176 - - 177 - - 178 - - 179 - - 180 - - 181 - - 182 - - 183 - - 184 - - 185 - - 186 - - 187 - - 188 - - 189 - - 190 - - 191 - - 192 - - 193 - - 194 - - 195 - - 196 - - 197 - - 198 - - 199 - - 200 - - 201 - - 202 - - 203 - - 204 - - 205 - - 206 - - 207 - - 208 - - 209 - - 210 - - 211 - - 212 - - 213 - - 214 - - 215 - - 216 - - 217 - - 218 - - 219 - - 220 - - 221 - - 222 - - 223 - - 224 - - 225 - - 226 - - 227 - - 228 - - 229 - - 230 - - 231 - - 232 - - 233 - - 234 - - 235 - - 236 - - 237 - - 238 - - 239 - - 240 - - 241 - - 242 - - 243 - - 244 - - 245 - - 246 - - 247 - - 248 - - 249 - - 250 - - 251 - - 252 - - 253 - - 254 - - 255 - - 291 - - 300 - - 301 - - 303 - - 304 - - 305 - - 306 - - 307 - - 330 - - 331 - - 332 - - 333 - - 334 - - 400 - - 401 - - 402 - - 410 - - 411 - - 412 - - 501 - - 502 - - 503 - - 510 - - 511 - - 512 - - 513 - - 514 - - 515 - - 516 - - 517 - - 518 - - 519 - - 520 - - 521 - - 522 - - 523 - - 524 - - 525 - - 526 - - 527 - - 528 - - 529 - - 530 - - 531 - - 532 - - 533 - - 534 - - 535 - - 536 - - 537 - - 538 - - 539 - - 540 - - 541 - - 542 - - 545 - - 546 - - 550 - - 551 - - 552 - - 553 - - 554 - - 555 - - 600 - - 601 - - 602 - - 700 - - 701 - - 702 - - 703 - - 704 - - 705 - - 706 - - 800 - - 801 - - 802 - - 803 - - 804 - - 805 - - 900 - - 901 - - 902 - - 903 - - 904 - - 905 - - 906 - - 907 - - 911 - - 912 - - 931 - - 932 - - 950 - - 1001 - - 1002 - - 1010 - - 1100 - - 1101 - - 1200 - - 1201 - - 1244 - - 1245 - - 1300 - - 1301 - - 1302 - - 1303 - - 1304 - - 1305 - - 1400 - - 1401 - - 1402 - - 1403 - - 1404 - - 1405 - - 1406 - - 1407 - - 1408 - - 1409 - - 1410 - - 1411 - - 1412 - - 1413 - - 1414 - - 1415 - - 1416 - - 1417 - - 1418 - - 1419 - - 1420 - - 1421 - - 1422 - - 1423 - - 1424 - - 1500 - - 1501 - - 1502 - - 1503 - - 1504 - - 1505 - - 1506 - - 1507 - - 1508 - - 1509 - - 1510 - - 1511 - - 1512 - - 1513 - - 1514 - - 1600 - - 1601 - - 1602 - - 1603 - - 1604 - - 1605 - - 1606 - - 1607 - - 1608 - - 1609 - - 1700 - - 1701 - - 1702 - - 1801 - - 1802 - - 1900 - - 1901 - - 1902 - - 1903 - - 1904 - - 1905 - - 2000 - - 2001 - - 2002 - - 2003 - - 2004 - - 2005 - - 2006 - - 2007 - - 2008 - - 2009 - - 2010 - - 2011 - - 2012 - - 2013 - - 2014 - - 2015 - - 2016 - - 2017 - - 2018 - - 2100 - - 2101 - - 2102 - - 2103 - - 2104 - - 2105 - - 2106 - - 2107 - - 2108 - - 2109 - - 2110 - - 2111 - - 2112 - - 2113 - - 2114 - - 2201 - - 2202 - - 2203 - - 2204 - - 3000 - - 3001 - - 3002 - - 3003 - - 3004 - - 3005 - - 3006 - - 3007 - - 3008 - - 3009 - - 3010 - - 3011 - - 3012 - - 3013 - - 3014 - - 3015 - - 3016 - - 3017 - - 3018 - - 3019 - - 3020 - - 3021 - - 3022 - - 3023 - - 3024 - - 3025 - - 3026 - - 3027 - - 3028 - - 9000 - - 9001 - - 9002 - - 9003 - - 9004 - - 9005 - - 9006 - - 9007 - - 9008 - - 9009 - - 9010 - - 9011 - - 9012 - - 9013 - - 9014 - - 9015 - - 9016 - - 9017 - - 9018 - - 9019 - - 9020 - - 9021 - - 9022 - - 9023 - - 9024 - - 9025 - - 9026 - - 9027 - - 9028 - - 9029 - - 9030 - - 9031 - - 9032 - - 9033 - - 9034 - - 9035 - - 9036 - - 9037 - - 9038 - - 9039 - - 9040 - - 9041 - - 9042 - - 9043 - - 9044 - - 9045 - - 9046 - - 9047 - - 9048 - - 9049 - - 9050 - - 9051 - - 9052 - - 9053 - - 9054 - - 9055 - - 9056 - - 9057 - - 9058 - - 9059 - type: integer - group-name: - description: Name of a group involved in the event. - type: string - group_id: - description: ID of a group involved in the event. - type: integer - id: - description: Event's unique ID in OneLogin. Autogenerated by OneLogin. - type: integer - ipaddr: - description: IP address of the machine used to trigger the event. - type: string - mapping_id: - type: integer - notes: - description: More details about the event. - type: string - object_id: - type: integer - otp_device_id: - description: ID of a device involved in the event. - type: integer - otp_device_name: - description: Name of a device involved in the event. - type: string - param: - type: string - policy_id: - description: ID of the policy involved in the event. - type: integer - policy_name: - description: Name of the policy involved in the event. - type: string - policy_type: - type: string - privilege_id: - type: integer - proxy_ip: - type: string - radius_config_id: - type: integer - resolved_at: - type: string - resource_type_id: - description: "ID of the resource (user, role, group, and so forth) associated\ - \ with the event." - type: integer - risk_cookie_id: - description: Identifier for risk cookie - type: string - risk_reasons: - type: string - risk_score: - type: integer - role_id: - description: ID of a role involved in the event. - type: integer - role_name: - description: Name of a role involved in the event. - type: string - service_directory_id: - type: integer - solved: - type: boolean - trusted_idp_id: - type: integer - user_field_id: - type: integer - user_id: - description: ID of the user that was acted upon to trigger the event. - type: integer - user_name: - description: Name of the user that was acted upon to trigger the event. - type: string - type: object - fp: - description: Set to the value of the __tdli_fp cookie. - type: string - generic-app: - additionalProperties: true - example: - icon_url: /images/missing_connector_icon/square/old_original.png - visible: true - notes: This app is in beta. - policy_id: 0 - allow_assumed_signin: false - description: description - created_at: 2018-04-12T21:50:42Z - role_ids: - - 192513 - auth_method: 8 - tab_id: 196885 - enforcement_point: - context_root: / - resources: - - resource_id: 809 - conditions: "" - is_path_regex: false - permissions: allow - require_auth: false - path: / - landing_page: "" - require_sitewide_authentication: false - token: b491c647f5e0cff854ad606722ac98342b4b0882 - target: "" - vhost: "" - permissions: allow - session_expiry_fixed: - value: 30 - unit: 1 - case_sensitive: false - use_target_host_header: false - conditions: "" - session_expiry_inactivity: - value: 30 - unit: 1 - updated_at: 2019-05-16T19:20:34Z - name: A Sample App - connector_id: 108419 - provisioning: - enabled: true - id: 775664 - parameters: - include_in_saml_assertion: true - user_attribute_macros: user_attribute_macros - user_attribute_mappings: user_attribute_mappings - label: label - properties: - id: - description: Apps unique ID in OneLogin. - example: 775664 - readOnly: true - type: integer - name: - description: The name of the app. - example: A Sample App - type: string - visible: - description: Indicates if the app is visible in the OneLogin portal. - example: true - type: boolean - description: - description: Freeform description of the app. - type: string - notes: - description: Freeform notes about the app. - example: This app is in beta. - type: string - icon_url: - description: A link to the apps icon url - example: /images/missing_connector_icon/square/old_original.png - type: string - auth_method: - $ref: '#/components/schemas/auth_method' - policy_id: - description: The security policy assigned to the app. - type: integer - allow_assumed_signin: - description: Indicates whether or not administrators can access the app - as a user that they have assumed control over. - example: false - type: boolean - tab_id: - description: ID of the OneLogin portal tab that the app is assigned to. - example: 196885 - type: integer - connector_id: - description: ID of the connector to base the app from. - example: 108419 - type: integer - created_at: - description: the date the app was created - example: 2018-04-12T21:50:42Z - type: string - updated_at: - description: the date the app was last updated - example: 2019-05-16T19:20:34Z - type: string - role_ids: - description: List of Role IDs that are assigned to the app. On App Create - or Update the entire array is replaced with the values provided. - example: - - 192513 - items: - description: Role ID - type: integer - type: array - provisioning: - $ref: '#/components/schemas/generic_app_provisioning' - parameters: - $ref: '#/components/schemas/app_parameters' - enforcement_point: - $ref: '#/components/schemas/enforcement_point' - type: object - group: - example: - reference: "null" - name: group.security.policy.default - id: 425741 - properties: - id: - description: Group's unique Onelogin ID - example: 425741 - type: integer - name: - description: Group name - example: group.security.policy.default - type: string - reference: - description: Deprecated. Will always show the attribute nil="true". - example: "null" - type: string - type: object - id: - type: integer - ip: - description: The IP address of the User's request. - type: string - locale: - properties: - language: - description: locale string - format: "^[a-z]{2,4}(-[A-Z][a-z]{3})?(-([A-Z]{2}|[0-9]{3}))?$" - type: string - is_default: - description: indicator if language is default - type: boolean - type: object - mapping: - example: - name: name - match: all - id: 0 - position: 6 - conditions: - - source: last_login - value: "90" - operator: '>' - - source: last_login - value: "90" - operator: '>' - actions: - - action: action - value: - - "2" - - "2" - - action: action - value: - - "2" - - "2" - enabled: true - properties: - id: - type: integer - name: - description: The name of the mapping. - type: string - enabled: - description: Indicates if the mapping is enabled or not. - type: boolean - match: - description: Indicates how conditions should be matched. - enum: - - all - - any - type: string - position: - description: Indicates the order of the mapping. When `null` this will default - to last position. - type: integer - conditions: - description: An array of conditions that the user must meet in order for - the mapping to be applied. - items: - $ref: '#/components/schemas/condition' - type: array - actions: - description: An array of actions that will be applied to the users that - are matched by the conditions. - items: - $ref: '#/components/schemas/action_obj' - type: array - required: - - actions - - conditions - - enabled - - match - - name - - position - type: object - message_template: - example: - template: null - account_id: 118462 - updated_at: 2021-11-24T21:25:29.480Z - id: 544880 - type: email_forgot_password - locale: en - template_class: email_template - brand_id: 5 - properties: - id: - example: 544880 - readOnly: true - type: integer - account_id: - example: 118462 - readOnly: true - type: integer - type: - description: "Template type that describes the source (sms, voice, email)\ - \ and purpose (registration, invite, etc)" - enum: - - email_forgot_password - - email_code_registration - - email_code_login_verification - - email_code_app_verification - - email_code_pw_reset_verification - - email_magiclink_registration - - email_magiclink_login_verification - - email_magiclink_app_verification - - email_magiclink_pw_reset_verification - - sms_registration - - sms_login_verification - - sms_app_verification - - sms_pw_reset_verification - type: string - locale: - description: "The 2 character language locale for the template. e.g. en\ - \ = English, es = Spanish" - example: en - pattern: "^[a-z]{2}$" - type: string - template: - $ref: '#/components/schemas/message_template_template' - template_class: - example: email_template - readOnly: true - type: string - updated_at: - description: Last time template was updated - example: 2021-11-24T21:25:29.480Z - readOnly: true - type: string - brand_id: - description: brand id number - example: 5 - readOnly: true - type: integer - required: - - locale - - template - - type - type: object - oauth_token: - example: - access_token: xx508xx63817x752xx74004x30705xx92x58349x5x78f5xx34xxxxx51 - refresh_token: deprecated - account_id: 555555 - created_at: 2015-11-11T03:36:18.714Z - token_type: bearer - expires_in: 36000 - properties: - access_token: - description: Provides the requested access token. You can use this token - to call our resource APIs. - example: xx508xx63817x752xx74004x30705xx92x58349x5x78f5xx34xxxxx51 - type: string - created_at: - description: Time at which the access token was generated. - example: 2015-11-11T03:36:18.714Z - type: string - expires_in: - description: |- - Indicates that the generated access token expires in 36,000 seconds, 600 minutes, or 10 hours. - An expired access token cannot be used to make resource API calls, but it can still be used along with its associated refresh token to call the Refresh Tokens v2 API. - example: 36000 - type: integer - refresh_token: - description: deprecated No longer in use - example: deprecated - type: string - token_type: - description: Indicates that the generated access token is a bearer token. - example: bearer - type: string - account_id: - description: Account ID associated with the API credentials used to generate - the token. - example: 555555 - type: integer - type: object - oidc_app: - allOf: - - $ref: '#/components/schemas/generic-app' - - $ref: '#/components/schemas/oidc_app_allOf' - privilege: - example: - name: User Administrator - description: Can administer users - id: 2c963197-bee2-4607-abc0-4786f1bfa55a - privilege: - Version: 2018-05-18 - Statement: - - Action: - - Users:Delete - - Users:ResetPassword - - Users:Unlock - - Users:Get - Scope: - - '*' - - '*' - Effect: Allow - - Action: - - Users:Delete - - Users:ResetPassword - - Users:Unlock - - Users:Get - Scope: - - '*' - - '*' - Effect: Allow - properties: - id: - example: 2c963197-bee2-4607-abc0-4786f1bfa55a - type: string - name: - example: User Administrator - type: string - description: - example: Can administer users - type: string - privilege: - $ref: '#/components/schemas/privilege_privilege' - required: - - name - - privilege - type: object - rate_limit: - example: - X-RateLimit-Remaining: 4988 - X-RateLimit-Reset: 832 - X-RateLimit-Limit: 5000 - properties: - X-RateLimit-Limit: - description: Rate Limit Limit - example: 5000 - type: integer - X-RateLimit-Remaining: - description: Rate Limit Remaining - example: 4988 - type: integer - X-RateLimit-Reset: - description: Rate Limit Reset - example: 832 - type: integer - type: object - request_brand: - properties: - enabled: - default: false - description: Indicates if the brand is enabled or not - example: true - type: boolean - name: - description: Brand’s name for humans. This isn’t related to subdomains. - example: Acme Branding - type: string - custom_support_enabled: - description: "Indicates if the custom support is enabled. If enabled, the\ - \ login page includes the ability to submit a support request." - example: false - type: boolean - custom_color: - description: Primary brand color - example: '#1298b4' - type: string - custom_accent_color: - description: Secondary brand color - example: '#b60012' - type: string - custom_masking_color: - description: Color for the masking layer above the background image of the - branded login screen. - example: '#beefed' - type: string - custom_masking_opacity: - description: Opacity for the custom_masking_color. - example: 40 - type: integer - enable_custom_label_for_login_screen: - description: Indicates if the custom Username/Email field label is enabled - or not - example: true - type: boolean - custom_label_text_for_login_screen: - description: Custom label for the Username/Email field on the login screen. - See example here. - example: ACME Username or Email - type: string - login_instruction_title: - description: Link text to show login instruction screen. - example: ACME Login Instructions - type: string - login_instruction: - description: "Text for the login instruction screen, styled in Markdown." - example: "To login, enter your ACME Username or Email. Reach out to help.desk@acme.org\ - \ if you have trouble logging in." - type: string - hide_onelogin_footer: - description: Indicates if the OneLogin footer will appear at the bottom - of the login page. - example: true - type: boolean - mfa_enrollment_message: - description: Text that replaces the default text displayed on the initial - screen of the MFA Registration. - example: You must register with the OneLogin Protect app in order to login - type: string - background: - description: "Base64 encoded image data (JPG/PNG, <5MB)" - example: /9j/4AAQSkZJRgAB...J3a+IvMu7D8T/9k= - type: string - logo: - description: "Base64 encoded image data (PNG, <1MB)" - example: iVBORw0KGgoAAAAN...AABJRU5ErkJggg== - type: string - required: - - name - type: object - risk_device: - description: Information about the device being used. - properties: - id: - description: This device's unique identifier - type: string - type: object - risk_rule: - example: - name: name - description: description - id: id - filters: - - filters - - filters - source: - name: name - id: id - type: blacklist - target: location.ip - properties: - id: - type: string - name: - description: The name of this rule - type: string - description: - type: string - type: - description: The type parameter specifies the type of rule that will be - created. - enum: - - blacklist - - whitelist - type: string - target: - description: The target parameter that will be used when evaluating the - rule against an incoming event. - enum: - - location.ip - - location.address.country_iso_code - type: string - filters: - description: A list of IP addresses or country codes or names to evaluate - against each event. - items: - type: string - type: array - source: - $ref: '#/components/schemas/source' - type: object - risk_user: - description: An Object containing User details. - properties: - id: - description: A unique identifier for the user. - type: string - name: - description: A name for the user. - type: string - authenticated: - default: false - description: Indicates if the metadata supplied in this event should be - considered as trusted for the user. - type: boolean - required: - - id - type: object - role: - example: - name: name - id: 0 - users: - - 6 - - 6 - admins: - - 1 - - 1 - apps: - - 234 - - 567 - - 777 - properties: - id: - description: Role ID - readOnly: true - type: integer - name: - description: The name of the role. - type: string - apps: - description: A list of app IDs that will be assigned to the role. - example: - - 234 - - 567 - - 777 - items: - $ref: '#/components/schemas/id' - type: array - users: - description: A list of user IDs to assign to the role. - items: - type: integer - type: array - admins: - description: A list of user IDs to assign as role administrators. - items: - type: integer - type: array - required: - - name - type: object - app_rule: - example: - name: My first app rule - match: all - id: 196670 - position: 1 - conditions: - - source: last_login - value: "90" - operator: '>' - - source: last_login - value: "90" - operator: '>' - actions: - - action: action - value: - - "2" - - "2" - - action: action - value: - - "2" - - "2" - enabled: true - properties: - id: - description: App Rule ID - example: 196670 - type: integer - name: - description: Rule Name - example: My first app rule - type: string - match: - description: Indicates how conditions should be matched. - enum: - - all - - any - type: string - enabled: - description: Indicates if the rule is enabled or not. - type: boolean - position: - description: Indicates the order of the rule. When `null` this will default - to last position. - example: 1 - type: integer - conditions: - description: An array of conditions that the user must meet in order for - the rule to be applied. - items: - $ref: '#/components/schemas/condition' - type: array - actions: - items: - $ref: '#/components/schemas/action_obj' - type: array - type: object - saml_app: - allOf: - - $ref: '#/components/schemas/generic-app' - - $ref: '#/components/schemas/saml_app_allOf' - saml_assert: - example: - username_or_email: hazel.zhang@onelogin.com - password: P@ssw0rd - app_id: "16819324" - subdomain: exampleOrganization - ip_address: 174.66.77.24 - properties: - username_or_email: - description: Set this to the username or email of the OneLogin user accessing - the app for which you want to generate a SAML token. - type: string - password: - description: Password of the OneLogin user accessing the app for which you - want to generate a SAML token. - type: string - app_id: - description: App ID of the app for which you want to generate a SAML token. - This is the app ID in OneLogin. - type: string - subdomain: - description: Set to the subdomain of the OneLogin user accessing the app - for which you want to generate a SAML token. - type: string - ip_address: - description: "If you are using this API in a scenario in which MFA is required\ - \ and you’ll need to be able to honor IP address whitelisting defined\ - \ in MFA policies, provide this parameter and set its value to the whitelisted\ - \ IP address that needs to be bypassed." - type: string - required: - - app_id - - password - - subdomain - - username_or_email - type: object - saml_factor: - properties: - app_id: - description: App ID of the app for which you want to generate a SAML token. - This is the app ID in OneLogin. - example: "1657651" - type: string - device_id: - description: Provide the MFA device_id you are submitting for verification. - The device_id is supplied by the Generate SAML Assertion API. - example: "1657651" - type: string - state_token: - description: Provide the state_token associated with the MFA device_id you - are submitting for verification. The state_token is supplied by the Generate - SAML Assertion API. - example: 11x0x1x16x1x3259xxxx0x59xx6xxxx670x61x45xxxxx - type: string - otp_token: - description: "Provide the OTP value for the MFA factor you are submitting\ - \ for verification. For some MFA factors; such as OneLogin OTP SMS, which\ - \ requires the user to request an OTP; the otp_token value is not required,\ - \ and if not included, returns a 200 OK - Pending result. You’ll make\ - \ a subsequent Verify Factor API call to provide the otp_token value once\ - \ it has been provided to the user." - example: "999999" - type: string - do_not_notify: - description: "When verifying MFA via Protect Push, set this to true to stop\ - \ additional push notifications being sent to the OneLogin Protect device." - example: false - type: boolean - required: - - app_id - - device_id - - state_token - type: object - scope: - example: - description: Read some contacts - id: 25 - value: read:contacts - properties: - id: - description: Unique Scope ID value - example: 25 - type: integer - value: - description: Scope Value - example: read:contacts - type: string - description: - description: Description of the scope - example: Read some contacts - type: string - type: object - session: - description: "A dictionary of extra information that provides useful context\ - \ about the session, for example the session ID, or some cookie information." - properties: - id: - description: "If you use a database to track sessions, you can send us the\ - \ session ID." - type: string - type: object - source: - description: "Used for targeting custom rules based on a group of people, customers,\ - \ accounts, or even a single user." - example: - name: name - id: id - properties: - id: - description: A unique id that represents the source of the event. - type: string - name: - description: The name of the source - type: string - type: object - token_claim: - example: - default_values: default_values - provisioned_entitlements: true - attribute_transformations: attribute_transformations - values: [] - user_attribute_macros: user_attribute_macros - skip_if_blank: true - id: 320780 - label: email_address - user_attribute_mappings: email - properties: - id: - description: The unique ID of the claim. - example: 320780 - type: integer - label: - description: The UI label for the claims. - example: email_address - type: string - user_attribute_mappings: - description: A user attribute to map values from. - example: email - type: string - user_attribute_macros: - description: When `user_attribute_mappings` is set to `_macro_` this macro - will be used to assign the claims value. - type: string - attribute_transformations: - description: The type of transformation to perform on multi valued attributes. - type: string - skip_if_blank: - description: not used - type: boolean - values: - description: Relates to Rules/Entitlements. Not supported yet. - example: [] - items: - type: string - type: array - default_values: - description: Relates to Rules/Entitlements. Not supported yet. - type: string - provisioned_entitlements: - description: Relates to Rules/Entitlements. Not supported yet. - type: boolean - type: object - user: - example: - firstname: firstname - password_confirmation: password_confirmation - created_at: created_at - external_id: external_id - locked_until: locked_until - title: title - invitation_sent_at: invitation_sent_at - role_ids: - - 1 - - 1 - password: password - updated_at: updated_at - password_algorithm: password_algorithm - company: company - id: 0 - state: 5 - directory_id: 2 - department: department - member_of: member_of - email: email - manager_ad_id: manager_ad_id - password_changed_at: password_changed_at - salt: salt - last_login: last_login - invalid_login_attempts: 9 - preferred_locale_code: preferred_locale_code - manager_user_id: manager_user_id - lastname: lastname - samaccountname: samaccountname - activated_at: activated_at - userprincipalname: userprincipalname - group_id: 6 - phone: phone - distinguished_name: distinguished_name - trusted_idp_id: 7 - comment: comment - username: username - status: 5 - properties: - id: - type: integer - username: - description: A username for the user. - type: string - email: - description: A valid email for the user. - type: string - firstname: - description: The user's first name. - type: string - lastname: - description: The user's last name. - type: string - title: - description: The user's job title. - type: string - department: - description: The user's department. - type: string - company: - description: The user's company. - type: string - comment: - description: Free text related to the user. - type: string - group_id: - description: The ID of the Group in OneLogin that the user is assigned to. - type: integer - role_ids: - description: A list of OneLogin Role IDs of the user - items: - type: integer - minLength: 1 - type: array - phone: - description: The E.164 format phone number for a user. - type: string - state: - enum: - - 0 - - 1 - - 2 - - 3 - type: integer - status: - enum: - - 0 - - 1 - - 2 - - 3 - - 4 - - 5 - - 7 - - 8 - type: integer - directory_id: - description: The ID of the OneLogin Directory of the user. - type: integer - trusted_idp_id: - description: The ID of the OneLogin Trusted IDP of the user. - type: integer - manager_ad_id: - description: The ID of the user's manager in Active Directory. - type: string - manager_user_id: - description: The OneLogin User ID for the user's manager. - type: string - samaccountname: - description: The user's Active Directory username. - type: string - member_of: - description: The user's directory membership. - type: string - userprincipalname: - description: The principle name of the user. - type: string - distinguished_name: - description: The distinguished name of the user. - type: string - external_id: - description: The ID of the user in an external directory. - type: string - activated_at: - type: string - last_login: - type: string - invitation_sent_at: - type: string - updated_at: - type: string - preferred_locale_code: - type: string - created_at: - type: string - invalid_login_attempts: - type: integer - locked_until: - type: string - password_changed_at: - type: string - password: - description: The password to set for a user. - type: string - password_confirmation: - description: Required if the password is being set. - type: string - password_algorithm: - description: Use this when importing a password that's already hashed. Prepend - the salt value to the cleartext password value before SHA-256-encoding - it - type: string - salt: - description: The salt value used with the password_algorithm. - type: string - type: object - user_agent: - description: The user agent of the User's request. - type: string - verb: - description: Verbs are used to distinguish between different types of events. - Where possible use one of the following verbs to describe the event. Alternately - you can create custom verbs to describe other types of actions within your - application. - enum: - - log-in - - log-out - - log-in-denied - - authentication-challenge - - authentication-challenge-pass - - authentication-challenge-fail - type: string - sso_oidc: - properties: - client_id: - description: "OIDC: The OpenId Connect Client Id. Note that client_secret\ - \ is only returned after Creating an App" - example: 78d1d040-20c9-0136-5146-067351775fae92920 - type: string - type: object - sso_saml: - properties: - metadata_url: - example: https://app.onelogin.com/saml/metadata/5772393d-2ad3-47d6-a64f-2339b1028291 - type: string - acs_url: - example: https://sharkbytes.onelogin.com/trust/saml2/http-post/sso/928532 - type: string - sls_url: - example: https://sharkbytes.onelogin.com/trust/saml2/http-redirect/slo/928532 - type: string - issuer: - example: https://app.onelogin.com/saml/metadata/5772393d-2ad3-47d6-a64f-2339b1028291 - type: string - certificate: - $ref: '#/components/schemas/sso_saml_certificate' - type: object - rule_condition: - example: - name: Administrators - value: "272445" - properties: - name: - description: Name of the operator - example: Administrators - type: string - value: - description: The condition operator value to use when creating or updating - rules. - example: "272445" - type: string - type: object - rule_action: - example: - name: Set Role - value: add_role - properties: - name: - description: Name of the Action - example: Set Role - type: string - value: - description: The unique identifier of the action. This should be used when - defining actions for a User Mapping. - example: add_role - type: string - type: object - otp_device: - properties: - factor_id: - description: The identifier of the factor to enroll the user with. - example: 16282 - readOnly: true - type: integer - display_name: - description: A name for the users device - example: Rich's Phone - type: string - number: - description: The phone number of the user in E.164 format. - example: +1xxxxxxxxxx - type: string - verified: - description: "Defaults to false. Some factors like SMS or Voice require\ - \ that a user recieve a token and then that token is supplied to the Verify\ - \ endpoint before the device is considered active.\nYou can set verfied\ - \ to `true` which indicates the the users phone number is pre verified\ - \ and the device can be immediately activated. " - type: boolean - required: - - display_name - - factor_id - - number - type: object - hook_envvar: - example: - updated_at: updated_at - name: name - created_at: created_at - id: id - value: value - properties: - id: - description: A unique identifier for the Hook Environment Variable - readOnly: true - type: string - name: - description: The name of the environment variable. - type: string - created_at: - description: The ISO8601 formatted date that the environment variable was - created. - type: string - updated_at: - description: The ISO8601 formatted date that the environment variable was - last updated. - type: string - value: - description: The secret value that will be encrypted at rest and injected - in applicable hook functions at run time. - type: string - writeOnly: true - required: - - name - - value - type: object - hook_log: - example: - correlation_id: correlation_id - created_at: created_at - request_id: request_id - events: - - events - - events - properties: - request_id: - type: string - correlation_id: - type: string - created_at: - type: string - events: - items: - type: string - type: array - type: object - hook_status: - properties: - name: - description: responses status nam - example: success - type: string - message: - description: your operation was successful - type: string - type: object - hook: - example: - runtime: runtime - created_at: created_at - type: type - packages: - key: packages - timeout: 0 - env_vars: - - env_vars - - env_vars - retries: 2 - updated_at: updated_at - context_version: context_version - function: function - options: - risk_enabled: true - mfa_device_info_enabled: true - location_enabled: true - disabled: true - id: id - conditions: - - source: last_login - value: "90" - operator: '>' - - source: last_login - value: "90" - operator: '>' - status: ready - properties: - id: - description: The Hook unique ID in OneLogin. - type: string - type: - description: A string describing the type of hook. e.g. `pre-authentication` - type: string - disabled: - default: true - description: Boolean to enable or disable the hook. Disabled hooks will - not run. - type: boolean - timeout: - default: 1 - description: The number of seconds to allow the hook function to run before - before timing out. Maximum timeout varies based on the type of hook. - type: integer - env_vars: - description: Environment Variable objects that will be available via process.env.ENV_VAR_NAME - in the hook code. - items: - type: string - type: array - runtime: - description: The Smart Hooks supported Node.js version to execute this hook - with. - type: string - retries: - default: 0 - description: Number of retries if execution fails. - maximum: 4 - type: integer - packages: - additionalProperties: - type: string - description: An object containing NPM packages that are bundled with the - hook function. - type: object - function: - description: A base64 encoded string containing the javascript function - code. - type: string - context_version: - description: The semantic version of the content that will be injected into - this hook. - type: string - status: - description: String describing the state of the hook function. When a hook - is ready and disabled is false it will be executed. - enum: - - ready - - create-queued - - create-running - - create-failed - - update-queued - - update-running - - update-failed - type: string - options: - $ref: '#/components/schemas/hook_options' - conditions: - description: An array of objects that let you limit the execution of a hook - to users in specific roles. - items: - $ref: '#/components/schemas/condition' - type: array - created_at: - description: ISO8601 format date that they hook function was created. - type: string - updated_at: - description: ISO8601 format date that they hook function was last updated. - type: string - required: - - disabled - - env_vars - - function - - packages - - retries - - runtime - - timeout - - type - type: object - generateToken_request: - properties: - grant_type: - default: client_credentials - description: Set to client_credentials. - type: string - required: - - grant_type - type: object - revokeTokens_request: - properties: - access_token: - description: |- - Set to the access token you want to revoke. - This access token must have been generated using the client_id and client_secret provided in the Authorization header. - example: xx508xx63817x752xx74004x30705xx92x58349x5x78f5xx34x8x614xxxx1451 - type: string - required: - - access_token - type: object - getRateLimit_200_response: - example: - data: - X-RateLimit-Remaining: 4988 - X-RateLimit-Reset: 832 - X-RateLimit-Limit: 5000 - status: - code: 200 - error: false - type: Success - message: Success - properties: - status: - $ref: '#/components/schemas/Error' - data: - $ref: '#/components/schemas/rate_limit' - type: object - addClientApp_request: - properties: - app_id: - description: The ID of the OpenId Connect app to allow access through. - example: 1026152 - type: integer - scopes: - description: An array of Scope IDs that represent scopes the app can request - example: - - 31 - - 24 - items: - type: integer - type: array - type: object - addClientApp_201_response: - example: - api_auth_id: 1022697 - app_id: 909021 - properties: - app_id: - example: 909021 - type: integer - api_auth_id: - example: 1022697 - type: integer - type: object - updateClientApp_request: - properties: - scopes: - description: An array of Scope IDs the scopes the app can request - example: - - 123 - - 456 - items: - type: integer - type: array - type: object - getEvents_200_response_pagination: - example: - after_cursor: xWNjb3VudF9pZDo6OjUzNDEzLS0jI2lkOjo6OTA0MjU3NTQ2 - previous_link: "null" - before_cursor: "null" - next_link: https://your-api-subdomain.onelogin.com/api/1/events?after_cursor=xWNjb3VudF9pZDo6OjUzNDEzLS0jI2lkOjo6OTA0MjU3NTQ2 - properties: - before_cursor: - example: "null" - type: string - after_cursor: - example: xWNjb3VudF9pZDo6OjUzNDEzLS0jI2lkOjo6OTA0MjU3NTQ2 - type: string - previous_link: - example: "null" - type: string - next_link: - example: https://your-api-subdomain.onelogin.com/api/1/events?after_cursor=xWNjb3VudF9pZDo6OjUzNDEzLS0jI2lkOjo6OTA0MjU3NTQ2 - type: string - type: object - getEvents_200_response: - example: - pagination: - after_cursor: xWNjb3VudF9pZDo6OjUzNDEzLS0jI2lkOjo6OTA0MjU3NTQ2 - previous_link: "null" - before_cursor: "null" - next_link: https://your-api-subdomain.onelogin.com/api/1/events?after_cursor=xWNjb3VudF9pZDo6OjUzNDEzLS0jI2lkOjo6OTA0MjU3NTQ2 - data: - - privilege_id: 6 - risk_reasons: risk_reasons - notes: notes - assumed_by_superadmin_or_reseller: 5 - policy_id: 1 - service_directory_id: 9 - directory_sync_run_id: 9 - user_name: user_name - risk_cookie_id: risk_cookie_id - created_at: created_at - solved: true - client_id: client_id - event_type_id: 3 - otp_device_id: 1 - actor_user_id: 6 - certificate_id: 7 - resource_type_id: 1 - actor_user_name: actor_user_name - param: param - role_id: 5 - error_description: error_description - user_field_id: 6 - id: 4 - ipaddr: ipaddr - app_id: 5 - assuming_acting_user_id: 2 - proxy_ip: proxy_ip - risk_score: 4 - otp_device_name: otp_device_name - policy_name: policy_name - object_id: 1 - adc_id: 1 - app-name: app-name - role_name: role_name - custom_message: custom_message - policy_type: policy_type - account_id: 0 - group-name: group-name - group_id: 2 - user_id: 8 - resolved_at: resolved_at - mapping_id: 7 - radius_config_id: 7 - trusted_idp_id: 9 - actor_system: actor_system - - privilege_id: 6 - risk_reasons: risk_reasons - notes: notes - assumed_by_superadmin_or_reseller: 5 - policy_id: 1 - service_directory_id: 9 - directory_sync_run_id: 9 - user_name: user_name - risk_cookie_id: risk_cookie_id - created_at: created_at - solved: true - client_id: client_id - event_type_id: 3 - otp_device_id: 1 - actor_user_id: 6 - certificate_id: 7 - resource_type_id: 1 - actor_user_name: actor_user_name - param: param - role_id: 5 - error_description: error_description - user_field_id: 6 - id: 4 - ipaddr: ipaddr - app_id: 5 - assuming_acting_user_id: 2 - proxy_ip: proxy_ip - risk_score: 4 - otp_device_name: otp_device_name - policy_name: policy_name - object_id: 1 - adc_id: 1 - app-name: app-name - role_name: role_name - custom_message: custom_message - policy_type: policy_type - account_id: 0 - group-name: group-name - group_id: 2 - user_id: 8 - resolved_at: resolved_at - mapping_id: 7 - radius_config_id: 7 - trusted_idp_id: 9 - actor_system: actor_system - status: - code: 200 - error: false - type: Success - message: Success - properties: - status: - $ref: '#/components/schemas/Error' - pagination: - $ref: '#/components/schemas/getEvents_200_response_pagination' - data: - items: - $ref: '#/components/schemas/event' - type: array - type: object - getEventById_200_response: - example: - data: - privilege_id: 6 - risk_reasons: risk_reasons - notes: notes - assumed_by_superadmin_or_reseller: 5 - policy_id: 1 - service_directory_id: 9 - directory_sync_run_id: 9 - user_name: user_name - risk_cookie_id: risk_cookie_id - created_at: created_at - solved: true - client_id: client_id - event_type_id: 3 - otp_device_id: 1 - actor_user_id: 6 - certificate_id: 7 - resource_type_id: 1 - actor_user_name: actor_user_name - param: param - role_id: 5 - error_description: error_description - user_field_id: 6 - id: 4 - ipaddr: ipaddr - app_id: 5 - assuming_acting_user_id: 2 - proxy_ip: proxy_ip - risk_score: 4 - otp_device_name: otp_device_name - policy_name: policy_name - object_id: 1 - adc_id: 1 - app-name: app-name - role_name: role_name - custom_message: custom_message - policy_type: policy_type - account_id: 0 - group-name: group-name - group_id: 2 - user_id: 8 - resolved_at: resolved_at - mapping_id: 7 - radius_config_id: 7 - trusted_idp_id: 9 - actor_system: actor_system - status: - code: 200 - error: false - type: Success - message: Success - properties: - status: - $ref: '#/components/schemas/Error' - data: - $ref: '#/components/schemas/event' - type: object - getEventTypes_200_response_data_inner: - example: - name: APP_REMOVED_FROM_ROLE - description: App %app% removed from role %role% - id: 2 - properties: - name: - example: APP_REMOVED_FROM_ROLE - type: string - description: - example: App %app% removed from role %role% - type: string - id: - example: 2 - type: integer - type: object - getEventTypes_200_response: - example: - data: - - name: APP_REMOVED_FROM_ROLE - description: App %app% removed from role %role% - id: 2 - - name: APP_REMOVED_FROM_ROLE - description: App %app% removed from role %role% - id: 2 - status: - code: 200 - error: false - type: Success - message: Success - properties: - status: - $ref: '#/components/schemas/Error' - data: - items: - $ref: '#/components/schemas/getEventTypes_200_response_data_inner' - type: array - type: object - getGroups_200_response: - example: - data: - - reference: "null" - name: group.security.policy.default - id: 425741 - - reference: "null" - name: group.security.policy.default - id: 425741 - status: - code: 200 - error: false - type: Success - message: Success - properties: - status: - $ref: '#/components/schemas/Error' - data: - items: - $ref: '#/components/schemas/group' - type: array - type: object - getInviteLink_request: - properties: - email: - description: Set to the user email address to generate an invite link. The - value is case sensitive. - example: jennifer.hasenfus@mycompany.com - type: string - type: object - getInviteLink_200_response: - example: - data: - - data - - data - status: - code: 200 - error: false - type: Success - message: Success - properties: - status: - $ref: '#/components/schemas/Error' - data: - description: Provides reset password link - items: - type: string - type: array - type: object - sendInviteLink_request: - properties: - email: - description: Set to the user email address to generate an invite link. The - value is case sensitive. - example: jennifer.hasenfus@mycompany.com - type: string - personal_email: - description: "To send an invite email to a different address than the one\ - \ provided in email, provide it here. The invite link is sent to this\ - \ address instead." - example: jennifer.hasenfus@mail.com - type: string - type: object - sendInviteLink_200_response: - example: - status: - code: 200 - error: false - type: Success - message: Success - properties: - status: - $ref: '#/components/schemas/Error' - type: object - getUserApps_200_response_inner: - example: - icon_url: icon_url - provisioning_enabled: true - login_id: 6 - provisioning_state: unknown - extension: true - name: name - provisioning_status: enabling - id: 0 - properties: - id: - description: The App ID - type: integer - icon_url: - description: A url for the icon that represents the app in the OneLogin - portal - type: string - extension: - description: Boolean that indicates if the OneLogin browser extension is - required to launch this app. - type: boolean - login_id: - description: Unqiue identifier for this user and app combination. - type: integer - name: - description: The name of the app. - type: string - provisioning_status: - enum: - - enabling - - disabling - - enabling_pending_approval - - disabling_pendding_approval - - enabled - - disabled - - disabling_failed - - enabling_failed - type: string - provisioning_state: - description: If provisioning is enabled this indicates the state of provisioning - for the given user. - enum: - - unknown - - provisioning - - modifying - - deleting - - provisioning_pending_approval - - deleting_pending_approval - - modifying_pending_approval - - linking - - provisioned - - deleted - - modifying_failed - - provisioning_failed - - deleting_failed - - linking_failed - - disabled - - nonexistent - - modifying_pending_approval_then_disabled - type: string - provisioning_enabled: - description: Indicates if provisioning is enabled for this app. - type: boolean - type: object - getUserRoles_200_response: - example: - data: - - 0 - - 0 - status: - code: 200 - error: false - type: Success - message: Success - properties: - status: - $ref: '#/components/schemas/Error' - data: - description: List of Role IDs that are assigned to the User - items: - type: integer - type: array - type: object - updatePasswordInsecure_request: - properties: - password: - description: |- - Set to the password value using cleartext. - Hashes are never stored as cleartext. They are stored securely using cryptographic hash. OneLogin continuously upgrades the strength of the hash. Ensure that the value meets the password strength requirements set for the account. - example: - type: string - password_confirmation: - description: Ensure that this value matches the password value exactly. - example: - type: string - validate_policy: - default: false - description: Will passwords validate against the User Policy. Defaults to - false. - example: false - type: boolean - required: - - password - - password_confirmation - type: object - updatePasswordSecure_request: - properties: - password: - description: |- - Set to the password value using a SHA-256-encoded value. If you are including your own password_salt value in your request, prepend the salt value to the cleartext password value before SHA-256-encoding it. - For example, if your salt value is hello and your cleartext password value is password, the value you need to SHA-256-encode is hellopassword. The resulting encoded value would be b1c788abac15390de987ad17b65ac73c9b475d428a51f245c645a442fddd078b. - Note that the alpha characters in this has must all be lower case. - example: xxxxx637aead4030a653f29dae62f1542d67484342c00627a65066e05c5f0 - type: string - password_confirmation: - description: This value must match the password value. - example: xxxxx637aead4030a653f29dae62f1542d67484342c00627a65066e05c5f0 - type: string - password_algorithm: - description: Set to salt+sha256. - example: salt+sha256 - type: string - password_salt: - description: |- - Optional. If your password hash has been salted then you can provide the salt used in this param. - This assumes that the salt was prepended to the password before doing the SHA256 hash. - The API supports a salt value that is up to 40 characters long. - example: 11xxxx1 - type: string - required: - - password - - password_algorithm - - password_confirmation - type: object - getCustomAttributes_200_response: - example: - data: - - - alias - - branch - status: - code: 200 - error: false - type: Success - message: Success - properties: - status: - $ref: '#/components/schemas/Error' - data: - description: |- - Provides a list of custom attribute fields (also known as custom user fields) that are available for your account. - The values returned correspond to the values you provided in the Shortname field when you defined the custom user field. - For details about defining custom user fields, see Custom User Fields. - example: - - - alias - - branch - items: - items: - type: string - type: array - type: array - type: object - getMFAFactors_200_response_data_auth_factors_inner: - example: - name: Onelogin SMS - factor_id: 16282 - properties: - name: - description: "Official authentication factor name, as it appears to administrators\ - \ in OneLogin." - example: Onelogin SMS - type: string - factor_id: - description: Identifier for the factor which will be used for user enrollment - example: 16282 - type: integer - getMFAFactors_200_response_data: - example: - auth_factors: - - name: Onelogin SMS - factor_id: 16282 - - name: Onelogin SMS - factor_id: 16282 - properties: - auth_factors: - items: - $ref: '#/components/schemas/getMFAFactors_200_response_data_auth_factors_inner' - type: array - type: object - getMFAFactors_200_response: - example: - data: - auth_factors: - - name: Onelogin SMS - factor_id: 16282 - - name: Onelogin SMS - factor_id: 16282 - status: - code: 200 - error: false - type: Success - message: Success - properties: - status: - $ref: '#/components/schemas/Error' - data: - $ref: '#/components/schemas/getMFAFactors_200_response_data' - type: object - lockAccountUser_request: - properties: - locked_until: - description: |- - Set to the number of minutes for which you want to lock the user account. - Set to 0 if you want to lock the user account based on the Lock effective period set in the policy assigned to the user. - If no policy is assigned to the user, setting this value to 0 will lock the user’s account until you unlock it - Note that this value can not be less time that the Lock Effective Period specified on a user policy. - example: 15 - type: integer - required: - - locked_until - type: object - getEnrolledFactors_200_response_data_otp_devices_inner: - example: - type_display_name: Onelogin SMS - default: false - needs_trigger: true - active: true - state_token: f2402de2b446abd86ea5aa1f79b3fa72b4befacd - phone_number: +1xxxxxxxxxx - auth_factor_name: Onelogin SMS - id: 525509 - user_display_name: Rich's Phone - properties: - active: - description: True = enabled (used successfully for authentication at least - once). False = pending (registered but never used). - example: true - type: boolean - default: - description: True = is user’s default MFA device for OneLogin. - example: false - type: boolean - state_token: - description: A short lived token that is required to Verify the Factor. - This token expires in 120 seconds. - example: f2402de2b446abd86ea5aa1f79b3fa72b4befacd - type: string - auth_factor_name: - description: "\"Official\" authentication factor name, as it appears to\ - \ administrators in OneLogin." - example: Onelogin SMS - type: string - phone_number: - description: "For OTP codes sent via SMS, the phone number receiving the\ - \ SMS message." - example: +1xxxxxxxxxx - type: string - type_display_name: - description: "Authentication factor display name as it appears to users\ - \ upon initial registration, as defined by admins at Settings > Authentication\ - \ Factors." - example: Onelogin SMS - type: string - needs_trigger: - description: |- - true: You MUST Activate this Factor to trigger an SMS or Push notification before Verifying the OTP code. false: No Activation required. You can Verify the OTP immediately. - MFA factors that provide both push notifications (user accepts notification) and pull code submission (user initiates code submission from device or enters it manually) should appear twice; once with needs_trigger: true and once with needs_trigger: false. - example: true - type: boolean - user_display_name: - description: Authentication factor display name assigned by users when they - enroll the device. - example: Rich's Phone - type: string - id: - description: MFA device identifier. - example: 525509 - type: integer - getEnrolledFactors_200_response_data: - example: - otp_devices: - - type_display_name: Onelogin SMS - default: false - needs_trigger: true - active: true - state_token: f2402de2b446abd86ea5aa1f79b3fa72b4befacd - phone_number: +1xxxxxxxxxx - auth_factor_name: Onelogin SMS - id: 525509 - user_display_name: Rich's Phone - - type_display_name: Onelogin SMS - default: false - needs_trigger: true - active: true - state_token: f2402de2b446abd86ea5aa1f79b3fa72b4befacd - phone_number: +1xxxxxxxxxx - auth_factor_name: Onelogin SMS - id: 525509 - user_display_name: Rich's Phone - properties: - otp_devices: - items: - $ref: '#/components/schemas/getEnrolledFactors_200_response_data_otp_devices_inner' - type: array - type: object - getEnrolledFactors_200_response: - example: - data: - otp_devices: - - type_display_name: Onelogin SMS - default: false - needs_trigger: true - active: true - state_token: f2402de2b446abd86ea5aa1f79b3fa72b4befacd - phone_number: +1xxxxxxxxxx - auth_factor_name: Onelogin SMS - id: 525509 - user_display_name: Rich's Phone - - type_display_name: Onelogin SMS - default: false - needs_trigger: true - active: true - state_token: f2402de2b446abd86ea5aa1f79b3fa72b4befacd - phone_number: +1xxxxxxxxxx - auth_factor_name: Onelogin SMS - id: 525509 - user_display_name: Rich's Phone - status: - code: 200 - error: false - type: Success - message: Success - properties: - status: - $ref: '#/components/schemas/Error' - data: - $ref: '#/components/schemas/getEnrolledFactors_200_response_data' - type: object - enrollMfaFactor_200_response: - example: - data: - - type_display_name: Onelogin SMS - default: false - needs_trigger: true - active: true - state_token: f2402de2b446abd86ea5aa1f79b3fa72b4befacd - phone_number: +1xxxxxxxxxx - auth_factor_name: Onelogin SMS - id: 525509 - user_display_name: Rich's Phone - - type_display_name: Onelogin SMS - default: false - needs_trigger: true - active: true - state_token: f2402de2b446abd86ea5aa1f79b3fa72b4befacd - phone_number: +1xxxxxxxxxx - auth_factor_name: Onelogin SMS - id: 525509 - user_display_name: Rich's Phone - status: - code: 200 - error: false - type: Success - message: Success - properties: - status: - $ref: '#/components/schemas/Error' - data: - items: - $ref: '#/components/schemas/getEnrolledFactors_200_response_data_otp_devices_inner' - type: array - type: object - generateMFAtoken_request: - properties: - expires_in: - description: |- - Set the duration of the token in seconds. - Token expiration defaults to 259200 seconds = 72 hours. 72 hours is the max value. - example: 300 - type: integer - reusable: - default: false - description: |- - Defines if the token is reusable multiple times within the expiry window. - Value defaults to false. If set to true, token can be used multiple times, until it expires. - example: false - type: boolean - type: object - generateMFAtoken_200_response: - example: - expires_at: 2019-01-16T22:16:38.000Z - mfa_token: "55647655" - resuable: true - properties: - mfa_token: - description: Token can function as a temporary MFA token. It can be used - to authenticate for any app when valid. - example: "55647655" - type: string - resuable: - description: "true indcates the token can be used multiple times, until\ - \ it expires. false indicates the token is invalid after a single use\ - \ or once it expires. Defaults to false." - example: true - type: boolean - expires_at: - description: Defines the expiration time and date for the token. Format - is UTC time. - example: 2019-01-16T22:16:38.000Z - type: string - type: object - addRolesToUser_request: - properties: - role_id_array: - description: Set to an array of one or more role IDs. The IDs must be positive - integers. - items: - type: integer - type: array - required: - - role_id_array - type: object - setUserState_request: - properties: - state: - description: |- - Set to the state value. Valid values include: - - 0 : Unapproved - - 1 : Approved - - 2 : Rejected - - 3 : Unlicensed - enum: - - 0 - - 1 - - 2 - - 3 - example: 1 - type: integer - required: - - state - type: object - removeUserRole_request_role_id_array_inner: - properties: - role_id: - type: integer - removeUserRole_request: - properties: - role_id_array: - items: - $ref: '#/components/schemas/removeUserRole_request_role_id_array_inner' - type: array - required: - - role_id_array - type: object - verifyMfaFactor_request: - properties: - state_token: - description: |- - The state_token is returned after a successful request to Enroll a Factor or Activate a Factor. The state_token MUST be provided if the needs_trigger attribute from the proceeding calls is set to true. - Note that the state_token expires 120 seconds after creation. If the token is expired you will need to Activate the Factor again. - example: 98e008497066bc2763c52342996e06358aab2e32 - type: string - otp_token: - description: |- - OTP code provided by the device or SMS message sent to user. - When a device like OneLogin Protect that supports Push has been used you do not need to provide the otp_token and can keep polling this endpoint until the state_token expires. - example: B41832 - type: string - type: object - activateMfaFactors_request: - properties: - state_token_expires_in: - description: |- - Optional. Sets the window of time in seconds that the factor must be verified within. - Defaults to 120 seconds (2 minutes). Max 900 seconds (15 minutes). - example: 300 - type: integer - numeric_sms_otp: - description: |- - Optional. Defaults to false. Only applies to SMS factor. - When set to `true` a 6 digit numeric code will be sent to the user instead of the standard code which is alphanumeric. - example: true - type: boolean - sms_message: - description: |- - Optional. Only applies to SMS factor. - A message template that will be sent via SMS. Max length of the message after template items are inserted is 160 characters. - The following template variables can be included in the message. - - {{otp_code}} - The security code. - {{expiration}} - The number of minutes until the one time code expires. - example: "This is a security code from ABC Co {{otp_code}}. It expires in\ - \ {{expiration}} minutes." - type: string - type: object - createPrivilege_200_response: - example: - id: 5e43a548-e9c6-47be-9341-92160902f7a6 - properties: - id: - description: Privilege Id - example: 5e43a548-e9c6-47be-9341-92160902f7a6 - type: string - type: object - updatePrivilege_200_response: - example: - id: id - properties: - id: - description: Privilege ID - type: string - type: object - listPrivelegeRoles_200_response: - example: - total: 0 - previousLink: previousLink - beforeCursor: 1 - roles: - - 6 - - 6 - afterCursor: 5 - nextLink: nextLink - properties: - total: - type: integer - roles: - items: - type: integer - type: array - beforeCursor: - nullable: true - type: integer - previousLink: - nullable: true - type: string - afterCursor: - nullable: true - type: integer - nextLink: - nullable: true - type: string - type: object - addPrivilegeToRole_request: - example: - roles: - - 123 - - 456 - - 789 - properties: - roles: - items: - type: integer - type: array - type: object - addPrivilegeToRole_201_response: - example: - success: true - properties: - success: - example: true - type: boolean - type: object - getAssignedUser_200_response: - example: - total: 0 - previousLink: previousLink - beforeCursor: 1 - afterCursor: 5 - users: - - 6 - - 6 - nextLink: nextLink - properties: - total: - type: integer - users: - items: - type: integer - type: array - beforeCursor: - nullable: true - type: integer - previousLink: - nullable: true - type: string - afterCursor: - nullable: true - type: integer - nextLink: - nullable: true - type: string - type: object - assignUsersToPrivilege_request: - properties: - users: - items: - type: integer - type: array - type: object - getRoleByName_200_response_pagination: - example: - after_cursor: xWNjb3VudF9pZDo6OjUzNDEzLS0jI2lkOjo6OTA0MjU3NTQ2 - previous_link: '""' - before_cursor: '""' - next_link: https://your-api-subdomain.onelogin.com/api/1/events?after_cursor=xWNjb3VudF9pZDo6OjUzNDEzLS0jI2lkOjo6OTA0MjU3NTQ2 - properties: - after_cursor: - example: xWNjb3VudF9pZDo6OjUzNDEzLS0jI2lkOjo6OTA0MjU3NTQ2 - type: string - before_cursor: - example: '""' - type: string - next_link: - example: https://your-api-subdomain.onelogin.com/api/1/events?after_cursor=xWNjb3VudF9pZDo6OjUzNDEzLS0jI2lkOjo6OTA0MjU3NTQ2 - type: string - previous_link: - example: '""' - type: string - type: object - getRoleByName_200_response_data_inner: - properties: - id: - description: Role ID - type: integer - name: - description: Role Name - type: string - type: object - getRoleByName_200_response: - example: - pagination: - after_cursor: xWNjb3VudF9pZDo6OjUzNDEzLS0jI2lkOjo6OTA0MjU3NTQ2 - previous_link: '""' - before_cursor: '""' - next_link: https://your-api-subdomain.onelogin.com/api/1/events?after_cursor=xWNjb3VudF9pZDo6OjUzNDEzLS0jI2lkOjo6OTA0MjU3NTQ2 - data: - - id: 1111 - name: C-Executive - - id: 1112 - name: Contractor - - id: 1113 - name: Default - - id: 1114 - name: Employee - status: - code: 200 - error: false - type: Success - message: Success - properties: - status: - $ref: '#/components/schemas/Error' - pagination: - $ref: '#/components/schemas/getRoleByName_200_response_pagination' - data: - example: - - id: 1111 - name: C-Executive - - id: 1112 - name: Contractor - - id: 1113 - name: Default - - id: 1114 - name: Employee - items: - $ref: '#/components/schemas/getRoleByName_200_response_data_inner' - type: array - type: object - getRoleById_200_response_data_inner: - example: - name: Employee - id: 123456 - properties: - id: - description: role's unique ID in Onelogin - example: 123456 - type: integer - name: - description: Role name - example: Employee - type: string - type: object - getRoleById_200_response: - example: - data: - - name: Employee - id: 123456 - - name: Employee - id: 123456 - status: - code: 200 - error: false - type: Success - message: Success - properties: - status: - $ref: '#/components/schemas/Error' - data: - items: - $ref: '#/components/schemas/getRoleById_200_response_data_inner' - type: array - type: object - generateSamlAssert_200_response: - example: - data: - - "{}" - - "{}" - status: - code: 200 - error: false - type: Success - message: Success - properties: - status: - $ref: '#/components/schemas/Error' - data: - items: - type: object - type: array - type: object - verFactorSaml_200_response: - example: - data: PHNhbWxwOlJlc3BvbnNlIHhtbG5zOnNhbWw9InVybjpvYXNpczpuYW1lczp0YzpTQU1MOjIuMDphc3NlcnRpb24iIHhtbG5zOnNhbWxwPSJ1cm46b2FzaXM6bmFtZXM6dGM6U0FNTDoyLjA6cHJvdG9jb2wiIElEPSJSZjE5Y2EyMTI0ZGMxNzJmNzhmMjI3OTk3YzMwOTBkODVkNzFjYWMzOCIgVmVyc2lvbj0iMi4wIiBJc3N1ZUluc3RhbnQ9IjIwMjAtM - message: SMS token sent to your mobile device. Authentication pending - properties: - data: - description: Provides the SAML assertion. - example: PHNhbWxwOlJlc3BvbnNlIHhtbG5zOnNhbWw9InVybjpvYXNpczpuYW1lczp0YzpTQU1MOjIuMDphc3NlcnRpb24iIHhtbG5zOnNhbWxwPSJ1cm46b2FzaXM6bmFtZXM6dGM6U0FNTDoyLjA6cHJvdG9jb2wiIElEPSJSZjE5Y2EyMTI0ZGMxNzJmNzhmMjI3OTk3YzMwOTBkODVkNzFjYWMzOCIgVmVyc2lvbj0iMi4wIiBJc3N1ZUluc3RhbnQ9IjIwMjAtM - type: string - message: - description: Plain text description describing the outcome of the response. - example: SMS token sent to your mobile device. Authentication pending - type: string - type: object - listMappingConditions_200_response: - example: - name: MemberOf - value: member_of - properties: - name: - description: Name of Condition - example: MemberOf - type: string - value: - description: The unique identifier of the condition. This should be used - when defining conditions for a User Mapping - example: member_of - type: string - type: object - listMappingConditionsOperators_200_response_inner: - example: - name: equals - value: = - properties: - name: - description: Name or description of operator - example: equals - type: string - value: - description: The condition operator value to use when creating or updating - User Mappings. - example: = - type: string - listMappingContionValues_200_response_inner: - example: - name: default - value: 199848 - properties: - name: - description: Name or description of operator - example: default - type: string - value: - description: The condition operator value to use when creating or updating - User Mappings. - example: 199848 - type: integer - listMappingsActions_200_response_inner: - example: - name: set Role - value: add_role - properties: - name: - description: Name of the action - example: set Role - type: string - value: - description: The unique identifier of the action. This should be used when - defining actions for a User Mapping. - example: add_role - type: string - listMappingActionValues_200_response_inner: - example: - name: default - value: 199848 - properties: - name: - description: Name or description of operator - example: default - type: string - value: - description: The action operator value to use when creating or updating - User Mappings. - example: 199848 - type: integer - createApp_request: - oneOf: - - $ref: '#/components/schemas/oidc_app' - - $ref: '#/components/schemas/saml_app' - - $ref: '#/components/schemas/generic-app' - createApp_200_response: - discriminator: - mapping: - "0": '#/components/schemas/generic-app' - "1": '#/components/schemas/generic-app' - "2": '#/components/schemas/saml_app' - "3": '#/components/schemas/generic-app' - "4": '#/components/schemas/generic-app' - "5": '#/components/schemas/generic-app' - "6": '#/components/schemas/generic-app' - "7": '#/components/schemas/generic-app' - "8": '#/components/schemas/oidc_app' - propertyName: auth_method - oneOf: - - $ref: '#/components/schemas/oidc_app' - - $ref: '#/components/schemas/saml_app' - - $ref: '#/components/schemas/generic-app' - listConditions_200_response_inner: - example: - name: MemberOf - value: member_of - properties: - name: - description: Name of the rule condition - example: MemberOf - type: string - value: - description: The unique identifier of the condition. This should be used - when defining conditions for a rule. - example: member_of - type: string - type: object - updateRiskRule_request: - properties: - id: - description: The ID of the Rule to Update - type: string - type: object - trackRiskEvent_request: - properties: - verb: - description: Verbs are used to distinguish between different types of events. - type: string - ip: - description: The IP address of the User's request. - type: string - user_agent: - description: The user agent of the User's request. - type: string - user: - $ref: '#/components/schemas/risk_user' - source: - $ref: '#/components/schemas/source' - session: - $ref: '#/components/schemas/session' - device: - $ref: '#/components/schemas/risk_device' - fp: - description: Set to the value of the __tdli_fp cookie. - type: string - published: - description: Date and time of the event in IS08601 format. Useful for preloading - old events. Defaults to date time this API request is received. - type: string - required: - - ip - - user - - user_agent - - verb - type: object - getRiskScores_200_response_scores: - example: - minimal: 0 - high: 5 - low: 6 - very_high: 5 - medium: 1 - properties: - minimal: - type: integer - low: - type: integer - medium: - type: integer - high: - type: integer - very_high: - type: integer - type: object - getRiskScores_200_response: - example: - total: 2 - scores: - minimal: 0 - high: 5 - low: 6 - very_high: 5 - medium: 1 - properties: - scores: - $ref: '#/components/schemas/getRiskScores_200_response_scores' - total: - type: integer - type: object - getRiskScore_request: - properties: - ip: - description: The IP address of the User's request. - type: string - user_agent: - description: The user agent of the User's request. - type: string - user: - $ref: '#/components/schemas/risk_user' - source: - $ref: '#/components/schemas/source' - session: - $ref: '#/components/schemas/session' - device: - $ref: '#/components/schemas/risk_device' - fp: - description: Set to the value of the __tdli_fp cookie. - type: string - required: - - ip - - user - - user_agent - type: object - getRiskScore_200_response: - example: - score: 8.008281904610115 - triggers: - - triggers - - triggers - properties: - score: - description: A risk score 0 is low risk and 100 is the highest risk level - possible. - maximum: 100 - minimum: 0 - type: number - triggers: - description: Triggers are indicators of some of the key items that influenced - the risk score. - items: - type: string - type: array - type: object - verifyUserRegistration_request: - example: - otp: 58959 - properties: - otp: - description: One-Time-Password (OTP) that was sent to the user based on - the chosen factor. OneLogin SMS and OneLogin Email support this OTP code. - type: integer - type: object - verifyUserRegistration_200_response: - example: - device_id: "3926157" - id: 44aa6883-5048-4cd5-8cb2-64d47784230c - status: accepted - properties: - id: - description: Registration identifier. - example: 44aa6883-5048-4cd5-8cb2-64d47784230c - type: string - status: - description: pending registration has not been completed successfully. accepted - registration has successfully completed. - example: accepted - type: string - device_id: - description: Device id to be used with Verify the Factor. - example: "3926157" - type: string - type: object - createFactorRegistration_request: - properties: - factor_id: - description: The identifier of the factor to enroll the user with. See Get - Available Factors for a list of possible id values. - example: 58959 - type: integer - display_name: - description: A name for the users device - example: OneLogin SMS - type: string - expires_in: - description: "Defaults to 120. Valid values are: 120-900 seconds." - type: string - verified: - description: |- - Defaults to false. The following factors support verified = true as part of the initial registration request: OneLogin SMS, OneLogin Voice, OneLogin Email. When using verified = true it is critical that the supported factors have pre-verified values, most likely imported from an existing directory or by the users themselvdes. - Factors such as Authenticator and OneLogin Protect do not support verification = true as the user interaction is required to verify the factor. - type: boolean - redirect_to: - description: Only applies to Email MagicLink factor. Redirects MagicLink - success page to specified URL after 2 seconds. Email must already be configured - by the user. - type: string - custom_message: - description: |- - Only applies to SMS factor. - A message template that will be sent via SMS. Max length of the message after template items are inserted is 160 characters including the OTP code. SMS must already be configured by the user. - The following template variables can be included in the message. - {{otp_code}} - The security code. - {{otp_expiry}} - The number of minutes until the one time code expires. - type: string - required: - - display_name - - factor_id - type: object - createFactorRegistration_201_response: - example: - type_display_name: OneLogin Voice - device_id: "3920373" - user_id: 5a0ba80a-39a1-4627-9a8b-1273278b34ee - auth_factor_name: OneLogin Voice - id: 5a0ba80a-39a1-4627-9a8b-1273278b34ee - user_display_name: OneLogin Voice - properties: - device_id: - description: MFA device identifier. - example: "3920373" - type: string - user_display_name: - description: Authentication factor display name assigned by users when they - register the device. - example: OneLogin Voice - type: string - type_display_name: - description: "Authentication factor display name as it appears to users\ - \ upon initial registration, as defined by admins at Settings > Authentication\ - \ Factors." - example: OneLogin Voice - type: string - auth_factor_name: - description: "Authentication factor name, as it appears to administrators\ - \ in OneLogin." - example: OneLogin Voice - type: string - id: - description: Verification identifier used in subsequent verification step. - example: 5a0ba80a-39a1-4627-9a8b-1273278b34ee - type: string - user_id: - description: User identifier - example: 5a0ba80a-39a1-4627-9a8b-1273278b34ee - type: string - type: object - getAuthenticationDevices_200_response_inner: - example: - type_display_name: OneLogin Voice - default: false - device_id: "3920373" - auth_factor_name: OneLogin Voice - user_display_name: OneLogin Voice - properties: - device_id: - description: MFA device identifier. - example: "3920373" - type: string - user_display_name: - description: Authentication factor display name assigned by users when they - register the device. - example: OneLogin Voice - type: string - type_display_name: - description: "Authentication factor display name as it appears to users\ - \ upon initial registration, as defined by admins at Settings > Authentication\ - \ Factors." - example: OneLogin Voice - type: string - auth_factor_name: - description: "Authentication factor name, as it appears to administrators\ - \ in OneLogin." - example: OneLogin Voice - type: string - default: - default: false - description: true = is user’s default MFA device for OneLogin. - type: boolean - type: object - getUserVerification_200_response: - example: - device_id: "331991" - id: 5a0ba80a-39a1-4627-9a8b-1273278b34ee - status: pending - properties: - id: - description: registration identifier - example: 5a0ba80a-39a1-4627-9a8b-1273278b34ee - type: string - status: - description: "pending = has not been completed. accepted registration has\ - \ successfully completed, rejected user has denied the MFA attempt or\ - \ incorrectly provided the OneLogin Voice OTP code." - example: pending - type: string - device_id: - description: Device Id to be used with verify factor - example: "331991" - type: string - type: object - verifyUserVerification_request: - properties: - otp: - description: OTP code provided by the device or SMS message sent to user. - example: "123456" - type: string - device_id: - description: ID of the specified device which has been registerd for the - given user. Available on Get Devices API call. - example: 98765 - type: integer - type: object - createDeviceVerification_request: - properties: - device_id: - description: Specifies the factor to be verified. - example: 58959 - type: integer - display_name: - description: A name for the users device - example: OneLogin SMS - type: string - expires_in: - description: "Defaults to 120. Valid values are: 120-900 seconds." - type: string - redirect_to: - description: Only applies to Email MagicLink factor. Redirects MagicLink - success page to specified URL after 2 seconds. Email must already be configured - by the user. - type: string - custom_message: - description: |- - Only applies to SMS factor. - A message template that will be sent via SMS. Max length of the message after template items are inserted is 160 characters including the OTP code. SMS must already be configured by the user. - The following template variables can be included in the message. - {{otp_code}} - The security code. - {{otp_expiry}} - The number of minutes until the one time code expires. - type: string - required: - - device_id - type: object - createDeviceVerification_201_response: - example: - type_display_name: OneLogin Voice - expires_at: 2020-07-11T22:24:50Z - device_id: 58959 - id: 44aa6883-5048-4cd5-8cb2-64d47784230c - auth_factor_name: OneLogin Voice - display_name: OneLogin SMS - user_display_name: OneLogin Voice - redirect_to: redirect_to - properties: - device_id: - description: Specifies the factor to be verified. - example: 58959 - type: integer - display_name: - description: A name for the users device - example: OneLogin SMS - type: string - expires_at: - description: A short lived token that is required to Verify the Factor. - This token expires based on the expires_in parameter passed in. - example: 2020-07-11T22:24:50Z - type: string - redirect_to: - description: Only applies to Email MagicLink factor. Redirects MagicLink - success page to specified URL after 2 seconds. Email must already be configured - by the user. - type: string - user_display_name: - description: Authentication factor display name assigned by users when they - register the device. - example: OneLogin Voice - type: string - id: - description: Registration identifier. - example: 44aa6883-5048-4cd5-8cb2-64d47784230c - type: string - type_display_name: - description: "Authentication factor display name as it appears to users\ - \ upon initial registration, as defined by admins at Settings > Authentication\ - \ Factors." - example: OneLogin Voice - type: string - auth_factor_name: - description: "Authentication factor name, as it appears to administrators\ - \ in OneLogin." - example: OneLogin Voice - type: string - type: object - getAuthFactors_200_response: - example: - name: Onelogin Protect - factor_id: 598524 - auth_factor_name: Onelogin - properties: - factor_id: - description: Identifier for the factor which will be used for user enrollment - example: 598524 - type: integer - name: - description: "Authentication factor name, as it appears to administrators\ - \ in OneLogin." - example: Onelogin Protect - type: string - auth_factor_name: - description: Internal use only - example: Onelogin - type: string - type: object - generateOTP_request: - properties: - expires_in: - description: Set the duration of the token in seconds. Token expiration - defaults to 259200 seconds = 72 hours. 72 hours is the max value. - example: 300 - type: integer - reusable: - default: false - description: "Defines if the token is reusable multiple times within the\ - \ expiry window. Value defaults to false. If set to true, token can be\ - \ used multiple times, until it expires." - type: boolean - type: object - generateOTP_201_response: - example: - expires_at: 2020-06-26T21:52:56Z - device_id: user_temp_otp_36216766 - mfa_token: UIOWE787979 - reusable: false - properties: - mfa_token: - description: Token can function as a temporary MFA token. It can be used - to authenticate for any app when valid. - example: UIOWE787979 - type: string - reusable: - default: false - description: "true indcates the token can be used multiple times, until\ - \ it expires. false indicates the token is invalid after a single use\ - \ or once it expires. Defaults to false." - type: boolean - expires_at: - description: Defines the expiration time and date for the token. Format - is UTC time. - example: 2020-06-26T21:52:56Z - type: string - device_id: - description: A unique identifier for the temp otp device that has been created - for this token. - example: user_temp_otp_36216766 - type: string - type: object - createRole_201_response_inner: - example: - id: 0 - properties: - id: - type: integer - type: object - updateRole_200_response: - example: - id: 0 - properties: - id: - type: integer - type: object - getRoleApps_200_response_inner: - example: - id: 345 - name: Dropbox - icon_url: https://testurl.com - properties: - id: - description: app id - type: integer - name: - description: app name - type: string - icon_url: - description: url of Icon - format: url - type: string - type: object - removeRoleUsers_request: - properties: - user_id: - items: - $ref: '#/components/schemas/id' - type: array - type: object - updateEnvironmentVariable_request: - properties: - value: - description: The secret value that will be encrypted at rest and injected - in applicable hook functions at run time. - type: string - required: - - value - type: object - listMessageTemplates_200_response_inner: - example: - name: ACME - id: 912 - enabled: true - properties: - id: - description: template ID - example: 912 - type: integer - enabled: - description: indicator if template is enabled - example: true - type: boolean - name: - description: name of message template - example: ACME - type: string - type: object - getEmailSettings_200_response_oneOf: - properties: - mode: - example: onelogin_email - type: string - type: object - getEmailSettings_200_response: - oneOf: - - $ref: '#/components/schemas/getEmailSettings_200_response_oneOf' - - $ref: '#/components/schemas/email_config' - brand_background_urls: - properties: - original: - type: string - login: - type: string - branding: - type: string - required: - - branding - - login - - original - type: object - brand_background: - properties: - urls: - $ref: '#/components/schemas/brand_background_urls' - file_size: - type: integer - updated_at: - type: string - content_type: - type: string - required: - - content_type - - file_size - - updated_at - - urls - type: object - brand_logo_urls: - properties: - original: - type: string - login: - type: string - navigation: - type: string - required: - - login - - navigation - - original - type: object - brand_logo: - properties: - urls: - $ref: '#/components/schemas/brand_logo_urls' - file_size: - type: integer - updated_at: - type: string - content_type: - type: string - required: - - content_type - - file_size - - updated_at - - urls - type: object - enforcement_point_resources_inner: - properties: - path: - example: / - type: string - is_path_regex: - nullable: true - type: boolean - require_auth: - example: false - type: boolean - permission: - enum: - - allow - - deny - - conditions - type: string - conditions: - description: required if permission == "conditions" - type: string - type: object - generic_app_provisioning: - description: Indicates if provisioning is enabled for this app. - example: - enabled: true - properties: - enabled: - example: true - type: boolean - type: object - message_template_template_oneOf: - properties: - subject: - description: Custom Email Subject - example: Email MFA App Verification Code - type: string - html: - description: The HTML body of the Custom Email - example: "

Here is the code: {{otp_code}}

" - type: string - plain: - description: The Plain text body of the email - example: "Here is the code: {{otp_code}}" - type: string - required: - - html - - plain - - subject - type: object - message_template_template_oneOf_1: - properties: - message: - description: The body of the SMS message. Max length 160 characters. - example: "Here is the code: {{otp_code}}" - maxLength: 160 - type: string - required: - - message - type: object - message_template_template: - oneOf: - - $ref: '#/components/schemas/message_template_template_oneOf' - - $ref: '#/components/schemas/message_template_template_oneOf_1' - oidc_app_allOf: - example: "{\"id\":928549,\"name\":\"Sample OpenId Connect App\",\"visible\"\ - :true,\"description\":\"\",\"notes\":null,\"icon_url\":\"/images/missing_connector_icon/square/old_original.png\"\ - ,\"auth_method\":8,\"policy_id\":165278,\"provisioning\":{\"enabled\":false},\"\ - allow_assumed_signin\":false,\"tab_id\":null,\"connector_id\":108419,\"sso\"\ - :{\"client_secret\":\"3acdcdba4e57bbb4f0454a8729fbc4ec5c4ac327c8e1d6d60c305cc9ea5dbcd3\"\ - ,\"client_id\":\"b5dee2e0-5cbf-0137-6e19-12c80e5197ec92920\"},\"configuration\"\ - :{\"redirect_uri\":\"http://example.com/callback\",\"refresh_token_expiration_minutes\"\ - :60,\"login_url\":\"http://example.com/login\",\"oidc_encryption_key\":\"\"\ - ,\"oidc_application_type\":0,\"token_endpoint_auth_method\":0,\"access_token_expiration_minutes\"\ - :5},\"created_at\":\"2019-05-19T23:56:57Z\",\"updated_at\":\"2019-05-19T23:56:57Z\"\ - ,\"parameters\":{\"groups\":{\"values\":null,\"user_attribute_mappings\":null,\"\ - provisioned_entitlements\":false,\"skip_if_blank\":false,\"id\":237825,\"\ - default_values\":null,\"attributes_transformations\":null,\"label\":\"Groups\"\ - ,\"user_attribute_macros\":null,\"include_in_saml_assertion\":true}}}" - properties: - configuration: - $ref: '#/components/schemas/configuration_oidc' - sso: - $ref: '#/components/schemas/sso_oidc' - required: - - configuration - - connector_id - - description - - name - - policy_id - - visible - type: object - privilege_privilege_Statement_inner: - example: - Action: - - Users:Delete - - Users:ResetPassword - - Users:Unlock - - Users:Get - Scope: - - '*' - - '*' - Effect: Allow - properties: - Effect: - description: "Set to “Allow.” By default, all actions are denied, this Statement\ - \ allows the listed actions to be executed." - example: Allow - type: string - Action: - description: |- - An array of strings that represent actions within OneLogin. Actions are prefixed with the class of object they are related to and followed by a specific action for the given class. - e.g. users:List, where the class is users and the specific action is List. Don’t mix classes within an Action array. To create a privilege that includes multiple different classes, create multiple statements. A wildcard * that includes all actions is supported. Use wildcards to create a Super User privilege. - example: - - Users:Delete - - Users:ResetPassword - - Users:Unlock - - Users:Get - items: - enum: - - Apps:Create - - Apps:Delete - - Apps:List - - Apps:Get - - Apps:Update - - Apps:ManageConnectors - - Apps:ManageRoles - - Apps:ManageTabs - - Apps:ManageUsers - - Apps:ReapplyMappings - - Users:Create - - Users:Delete - - Users:List - - Users:Get - - Users:Update - - Users:AssumeUser - - Users:ManageApps - - Users:Unlock - - Users:GenerateTempMfaToken - - Users:ResetPassword - - Users:ReapplyMappings - - Users:ManageLicense - - Users:Invite - - Users:ManageRoles - - Roles:Create - - Roles:Get - - Roles:List - - Roles:Update - - Roles:Delete - - Roles:ManageUsers - - Roles:ManageApps - - Reports:Create - - Reports:Get - - Reports:List - - Reports:Update - - Reports:Delete - - Reports:Clone - - Events:Get - - Events:List - - Groups:Create - - Groups:Get - - Groups:List - - Groups:Update - - Groups:Delete - - Policies:Create - - Policies:Get - - Policies:List - - Policies:Update - - Policies:Delete - - Policies:SetDefault - type: string - type: array - Scope: - description: |- - Target the privileged action against specific resources with the scope. - The scope pattern is the class of object used by the Action, followed by an ID that represents a resource in OneLogin. - e.g. apps/1234, where apps is the class and 1234 is the ID of an app. - The wildcard * is supported and indicates that all resources of the class type declared, in the Action, are in scope. - The Action and Scope classes must match. However, there is an exception, a scope of roles/{role_id} can be combined with Actions on the user or app class. The exception allows you to target groups of users or apps with specific actions. - items: - example: '*' - type: string - type: array - required: - - Action - - Effect - - Scope - type: object - privilege_privilege: - example: - Version: 2018-05-18 - Statement: - - Action: - - Users:Delete - - Users:ResetPassword - - Users:Unlock - - Users:Get - Scope: - - '*' - - '*' - Effect: Allow - - Action: - - Users:Delete - - Users:ResetPassword - - Users:Unlock - - Users:Get - Scope: - - '*' - - '*' - Effect: Allow - properties: - Version: - example: 2018-05-18 - type: string - Statement: - items: - $ref: '#/components/schemas/privilege_privilege_Statement_inner' - type: array - type: object - saml_app_allOf_parameters_saml_username: - properties: - user_attribute_mappings: - type: string - required: - - user_attribute_mappings - type: object - example: null - saml_app_allOf_parameters: - properties: - saml_username: - $ref: '#/components/schemas/saml_app_allOf_parameters_saml_username' - required: - - saml_username - type: object - example: null - saml_app_allOf: - properties: - configuration: - $ref: '#/components/schemas/configuration_saml' - sso: - $ref: '#/components/schemas/sso_saml' - parameters: - $ref: '#/components/schemas/saml_app_allOf_parameters' - required: - - configuration - - connector_id - - description - - name - - parameters - - policy_id - - visible - type: object - example: null - sso_saml_certificate: - description: The Certificate used for signing - properties: - id: - description: SAML Certificate ID - example: 170216 - type: integer - name: - description: SAML Certificate Name - example: My Companies SAML Certificate - type: string - value: - description: SAML Certificate Value - example: c6d814d032f000d9c03bc79727265 - type: string - type: object - hook_options: - description: A set of attributes allow control over the information that is - included in the hook context. - example: - risk_enabled: true - mfa_device_info_enabled: true - location_enabled: true - properties: - risk_enabled: - type: boolean - location_enabled: - type: boolean - mfa_device_info_enabled: - type: boolean - type: object - securitySchemes: - OAuth2: - description: "This API uses OAuth2 with the Client Credential grant flow. [More\ - \ info](https://developers.onelogin.com/api-docs/2/getting-started/working-with-api-credentials)" - flows: - clientCredentials: - scopes: - Authentication Only: |- - Gives the credential pair the ability to generate an access token that can perform POST calls only to authentication endpoints, providing least privileged access to authentication code. These endpoints include: - - Verify Factor (SAML Assertion) - - Generate SAML Assertion - - Verify Factor (Login) - - Create Session Login Token - - Log User Out - Read Users: "Gives the credential pair the ability to generate an access\ - \ token that can perform GET calls available for the User, Role, and\ - \ Group API resources." - Manage users: "Gives the credential pair the ability to generate an access\ - \ token that can perform GET, POST, PUT, and DELETE calls available\ - \ for the User, Role, and Group API resources, with the exception of\ - \ setting passwords and assigning and removing roles" - Manage All: "Gives the credential pair the ability to generate an access\ - \ token that can perform GET, POST, PUT, and DELETE calls for all available\ - \ API resources, including the ability to set passwords and assign and\ - \ remove roles." - Read All: Gives the credential pair the ability to generate an access - token that can perform GET calls available for all API resources. - tokenUrl: https://your-api-subdomain.onelogin.com/auth/oauth2/v2/token - type: oauth2 - basicAuth: - scheme: basic - type: http diff --git a/api_api_auth_claims.go b/api_api_auth_claims.go deleted file mode 100644 index 93632ab..0000000 --- a/api_api_auth_claims.go +++ /dev/null @@ -1,591 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "bytes" - "context" - "io/ioutil" - "net/http" - "net/url" - "strings" -) - - -// APIAuthClaimsApiService APIAuthClaimsApi service -type APIAuthClaimsApiService service - -type ApiCreateAuthClaimRequest struct { - ctx context.Context - ApiService *APIAuthClaimsApiService - apiAuthId string - contentType *string - authClaim *AuthClaim -} - -func (r ApiCreateAuthClaimRequest) ContentType(contentType string) ApiCreateAuthClaimRequest { - r.contentType = &contentType - return r -} - -func (r ApiCreateAuthClaimRequest) AuthClaim(authClaim AuthClaim) ApiCreateAuthClaimRequest { - r.authClaim = &authClaim - return r -} - -func (r ApiCreateAuthClaimRequest) Execute() (int32, *http.Response, error) { - return r.ApiService.CreateAuthClaimExecute(r) -} - -/* -CreateAuthClaim Create Api Auth Server Claim - -Create Authorization Claim - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param apiAuthId - @return ApiCreateAuthClaimRequest -*/ -func (a *APIAuthClaimsApiService) CreateAuthClaim(ctx context.Context, apiAuthId string) ApiCreateAuthClaimRequest { - return ApiCreateAuthClaimRequest{ - ApiService: a, - ctx: ctx, - apiAuthId: apiAuthId, - } -} - -// Execute executes the request -// @return int32 -func (a *APIAuthClaimsApiService) CreateAuthClaimExecute(r ApiCreateAuthClaimRequest) (int32, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue int32 - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "APIAuthClaimsApiService.CreateAuthClaim") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/api_authorizations/{api_auth_id}/claims" - localVarPath = strings.Replace(localVarPath, "{"+"api_auth_id"+"}", url.PathEscape(parameterValueToString(r.apiAuthId, "apiAuthId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.contentType != nil { - parameterAddToQuery(localVarQueryParams, "Content-Type", r.contentType, "") - } - // body params - localVarPostBody = r.authClaim - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiDeleteAuthClaimRequest struct { - ctx context.Context - ApiService *APIAuthClaimsApiService - apiAuthId string - claimId int32 - contentType *string -} - -func (r ApiDeleteAuthClaimRequest) ContentType(contentType string) ApiDeleteAuthClaimRequest { - r.contentType = &contentType - return r -} - -func (r ApiDeleteAuthClaimRequest) Execute() (*http.Response, error) { - return r.ApiService.DeleteAuthClaimExecute(r) -} - -/* -DeleteAuthClaim Delete Api Auth Server Claim - -Delete Authorization Claim - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param apiAuthId - @param claimId - @return ApiDeleteAuthClaimRequest -*/ -func (a *APIAuthClaimsApiService) DeleteAuthClaim(ctx context.Context, apiAuthId string, claimId int32) ApiDeleteAuthClaimRequest { - return ApiDeleteAuthClaimRequest{ - ApiService: a, - ctx: ctx, - apiAuthId: apiAuthId, - claimId: claimId, - } -} - -// Execute executes the request -func (a *APIAuthClaimsApiService) DeleteAuthClaimExecute(r ApiDeleteAuthClaimRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "APIAuthClaimsApiService.DeleteAuthClaim") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/api_authorizations/{api_auth_id}/claims/{claim_id}" - localVarPath = strings.Replace(localVarPath, "{"+"api_auth_id"+"}", url.PathEscape(parameterValueToString(r.apiAuthId, "apiAuthId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"claim_id"+"}", url.PathEscape(parameterValueToString(r.claimId, "claimId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.contentType != nil { - parameterAddToQuery(localVarQueryParams, "Content-Type", r.contentType, "") - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiGetAuthclaimsRequest struct { - ctx context.Context - ApiService *APIAuthClaimsApiService - apiAuthId string - contentType *string -} - -func (r ApiGetAuthclaimsRequest) ContentType(contentType string) ApiGetAuthclaimsRequest { - r.contentType = &contentType - return r -} - -func (r ApiGetAuthclaimsRequest) Execute() ([]TokenClaim, *http.Response, error) { - return r.ApiService.GetAuthclaimsExecute(r) -} - -/* -GetAuthclaims Get Api Auth Server claims - -Get Authorization claims - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param apiAuthId - @return ApiGetAuthclaimsRequest -*/ -func (a *APIAuthClaimsApiService) GetAuthclaims(ctx context.Context, apiAuthId string) ApiGetAuthclaimsRequest { - return ApiGetAuthclaimsRequest{ - ApiService: a, - ctx: ctx, - apiAuthId: apiAuthId, - } -} - -// Execute executes the request -// @return []TokenClaim -func (a *APIAuthClaimsApiService) GetAuthclaimsExecute(r ApiGetAuthclaimsRequest) ([]TokenClaim, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []TokenClaim - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "APIAuthClaimsApiService.GetAuthclaims") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/api_authorizations/{api_auth_id}/claims" - localVarPath = strings.Replace(localVarPath, "{"+"api_auth_id"+"}", url.PathEscape(parameterValueToString(r.apiAuthId, "apiAuthId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.contentType != nil { - parameterAddToQuery(localVarQueryParams, "Content-Type", r.contentType, "") - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiUpdateClaimRequest struct { - ctx context.Context - ApiService *APIAuthClaimsApiService - apiAuthId string - claimId int32 - contentType *string - authClaim *AuthClaim -} - -func (r ApiUpdateClaimRequest) ContentType(contentType string) ApiUpdateClaimRequest { - r.contentType = &contentType - return r -} - -func (r ApiUpdateClaimRequest) AuthClaim(authClaim AuthClaim) ApiUpdateClaimRequest { - r.authClaim = &authClaim - return r -} - -func (r ApiUpdateClaimRequest) Execute() (*AuthId, *http.Response, error) { - return r.ApiService.UpdateClaimExecute(r) -} - -/* -UpdateClaim Update Api Auth Server Claim - -Update Authorization Server Claim - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param apiAuthId - @param claimId - @return ApiUpdateClaimRequest -*/ -func (a *APIAuthClaimsApiService) UpdateClaim(ctx context.Context, apiAuthId string, claimId int32) ApiUpdateClaimRequest { - return ApiUpdateClaimRequest{ - ApiService: a, - ctx: ctx, - apiAuthId: apiAuthId, - claimId: claimId, - } -} - -// Execute executes the request -// @return AuthId -func (a *APIAuthClaimsApiService) UpdateClaimExecute(r ApiUpdateClaimRequest) (*AuthId, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *AuthId - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "APIAuthClaimsApiService.UpdateClaim") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/api_authorizations/{api_auth_id}/claims/{claim_id}" - localVarPath = strings.Replace(localVarPath, "{"+"api_auth_id"+"}", url.PathEscape(parameterValueToString(r.apiAuthId, "apiAuthId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"claim_id"+"}", url.PathEscape(parameterValueToString(r.claimId, "claimId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.contentType != nil { - parameterAddToQuery(localVarQueryParams, "Content-Type", r.contentType, "") - } - // body params - localVarPostBody = r.authClaim - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} diff --git a/api_api_auth_client_apps.go b/api_api_auth_client_apps.go deleted file mode 100644 index e07d90f..0000000 --- a/api_api_auth_client_apps.go +++ /dev/null @@ -1,613 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "bytes" - "context" - "io/ioutil" - "net/http" - "net/url" - "strings" -) - - -// APIAuthClientAppsApiService APIAuthClientAppsApi service -type APIAuthClientAppsApiService service - -type ApiAddClientAppRequest struct { - ctx context.Context - ApiService *APIAuthClientAppsApiService - apiAuthId string - contentType *string - addClientAppRequest *AddClientAppRequest -} - -func (r ApiAddClientAppRequest) ContentType(contentType string) ApiAddClientAppRequest { - r.contentType = &contentType - return r -} - -func (r ApiAddClientAppRequest) AddClientAppRequest(addClientAppRequest AddClientAppRequest) ApiAddClientAppRequest { - r.addClientAppRequest = &addClientAppRequest - return r -} - -func (r ApiAddClientAppRequest) Execute() (*AddClientApp201Response, *http.Response, error) { - return r.ApiService.AddClientAppExecute(r) -} - -/* -AddClientApp Add Client App - -Add Client App - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param apiAuthId - @return ApiAddClientAppRequest -*/ -func (a *APIAuthClientAppsApiService) AddClientApp(ctx context.Context, apiAuthId string) ApiAddClientAppRequest { - return ApiAddClientAppRequest{ - ApiService: a, - ctx: ctx, - apiAuthId: apiAuthId, - } -} - -// Execute executes the request -// @return AddClientApp201Response -func (a *APIAuthClientAppsApiService) AddClientAppExecute(r ApiAddClientAppRequest) (*AddClientApp201Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *AddClientApp201Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "APIAuthClientAppsApiService.AddClientApp") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/api_authorizations/{api_auth_id}/clients" - localVarPath = strings.Replace(localVarPath, "{"+"api_auth_id"+"}", url.PathEscape(parameterValueToString(r.apiAuthId, "apiAuthId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.contentType != nil { - parameterAddToQuery(localVarQueryParams, "Content-Type", r.contentType, "") - } - // body params - localVarPostBody = r.addClientAppRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiDeleteClientAppRequest struct { - ctx context.Context - ApiService *APIAuthClientAppsApiService - apiAuthId string - clientAppId int32 - contentType *string -} - -func (r ApiDeleteClientAppRequest) ContentType(contentType string) ApiDeleteClientAppRequest { - r.contentType = &contentType - return r -} - -func (r ApiDeleteClientAppRequest) Execute() (*AddClientApp201Response, *http.Response, error) { - return r.ApiService.DeleteClientAppExecute(r) -} - -/* -DeleteClientApp Remove Client App - -Delete Client App - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param apiAuthId - @param clientAppId - @return ApiDeleteClientAppRequest -*/ -func (a *APIAuthClientAppsApiService) DeleteClientApp(ctx context.Context, apiAuthId string, clientAppId int32) ApiDeleteClientAppRequest { - return ApiDeleteClientAppRequest{ - ApiService: a, - ctx: ctx, - apiAuthId: apiAuthId, - clientAppId: clientAppId, - } -} - -// Execute executes the request -// @return AddClientApp201Response -func (a *APIAuthClientAppsApiService) DeleteClientAppExecute(r ApiDeleteClientAppRequest) (*AddClientApp201Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *AddClientApp201Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "APIAuthClientAppsApiService.DeleteClientApp") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/api_authorizations/{api_auth_id}/clients/{client_app_id}" - localVarPath = strings.Replace(localVarPath, "{"+"api_auth_id"+"}", url.PathEscape(parameterValueToString(r.apiAuthId, "apiAuthId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"client_app_id"+"}", url.PathEscape(parameterValueToString(r.clientAppId, "clientAppId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.contentType != nil { - parameterAddToQuery(localVarQueryParams, "Content-Type", r.contentType, "") - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiListClientAppsRequest struct { - ctx context.Context - ApiService *APIAuthClientAppsApiService - apiAuthId string - contentType *string -} - -func (r ApiListClientAppsRequest) ContentType(contentType string) ApiListClientAppsRequest { - r.contentType = &contentType - return r -} - -func (r ApiListClientAppsRequest) Execute() (*ClientAppFull, *http.Response, error) { - return r.ApiService.ListClientAppsExecute(r) -} - -/* -ListClientApps List Clients Apps - -List Client Apps - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param apiAuthId - @return ApiListClientAppsRequest -*/ -func (a *APIAuthClientAppsApiService) ListClientApps(ctx context.Context, apiAuthId string) ApiListClientAppsRequest { - return ApiListClientAppsRequest{ - ApiService: a, - ctx: ctx, - apiAuthId: apiAuthId, - } -} - -// Execute executes the request -// @return ClientAppFull -func (a *APIAuthClientAppsApiService) ListClientAppsExecute(r ApiListClientAppsRequest) (*ClientAppFull, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ClientAppFull - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "APIAuthClientAppsApiService.ListClientApps") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/api_authorizations/{api_auth_id}/clients" - localVarPath = strings.Replace(localVarPath, "{"+"api_auth_id"+"}", url.PathEscape(parameterValueToString(r.apiAuthId, "apiAuthId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.contentType != nil { - parameterAddToQuery(localVarQueryParams, "Content-Type", r.contentType, "") - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiUpdateClientAppRequest struct { - ctx context.Context - ApiService *APIAuthClientAppsApiService - apiAuthId string - clientAppId int32 - contentType *string - updateClientAppRequest *UpdateClientAppRequest -} - -func (r ApiUpdateClientAppRequest) ContentType(contentType string) ApiUpdateClientAppRequest { - r.contentType = &contentType - return r -} - -func (r ApiUpdateClientAppRequest) UpdateClientAppRequest(updateClientAppRequest UpdateClientAppRequest) ApiUpdateClientAppRequest { - r.updateClientAppRequest = &updateClientAppRequest - return r -} - -func (r ApiUpdateClientAppRequest) Execute() (*AddClientApp201Response, *http.Response, error) { - return r.ApiService.UpdateClientAppExecute(r) -} - -/* -UpdateClientApp Update Client App - -Update Client App - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param apiAuthId - @param clientAppId - @return ApiUpdateClientAppRequest -*/ -func (a *APIAuthClientAppsApiService) UpdateClientApp(ctx context.Context, apiAuthId string, clientAppId int32) ApiUpdateClientAppRequest { - return ApiUpdateClientAppRequest{ - ApiService: a, - ctx: ctx, - apiAuthId: apiAuthId, - clientAppId: clientAppId, - } -} - -// Execute executes the request -// @return AddClientApp201Response -func (a *APIAuthClientAppsApiService) UpdateClientAppExecute(r ApiUpdateClientAppRequest) (*AddClientApp201Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *AddClientApp201Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "APIAuthClientAppsApiService.UpdateClientApp") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/api_authorizations/{api_auth_id}/clients/{client_app_id}" - localVarPath = strings.Replace(localVarPath, "{"+"api_auth_id"+"}", url.PathEscape(parameterValueToString(r.apiAuthId, "apiAuthId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"client_app_id"+"}", url.PathEscape(parameterValueToString(r.clientAppId, "clientAppId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.contentType != nil { - parameterAddToQuery(localVarQueryParams, "Content-Type", r.contentType, "") - } - // body params - localVarPostBody = r.updateClientAppRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} diff --git a/api_api_auth_scopes.go b/api_api_auth_scopes.go deleted file mode 100644 index 820a131..0000000 --- a/api_api_auth_scopes.go +++ /dev/null @@ -1,580 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "bytes" - "context" - "io/ioutil" - "net/http" - "net/url" - "strings" -) - - -// APIAuthScopesApiService APIAuthScopesApi service -type APIAuthScopesApiService service - -type ApiCreateScopeRequest struct { - ctx context.Context - ApiService *APIAuthScopesApiService - apiAuthId string - contentType *string - authScope *AuthScope -} - -func (r ApiCreateScopeRequest) ContentType(contentType string) ApiCreateScopeRequest { - r.contentType = &contentType - return r -} - -func (r ApiCreateScopeRequest) AuthScope(authScope AuthScope) ApiCreateScopeRequest { - r.authScope = &authScope - return r -} - -func (r ApiCreateScopeRequest) Execute() (*AuthScope, *http.Response, error) { - return r.ApiService.CreateScopeExecute(r) -} - -/* -CreateScope Create Api Auth Server Scope - -Create API Auth Server Scope - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param apiAuthId - @return ApiCreateScopeRequest -*/ -func (a *APIAuthScopesApiService) CreateScope(ctx context.Context, apiAuthId string) ApiCreateScopeRequest { - return ApiCreateScopeRequest{ - ApiService: a, - ctx: ctx, - apiAuthId: apiAuthId, - } -} - -// Execute executes the request -// @return AuthScope -func (a *APIAuthScopesApiService) CreateScopeExecute(r ApiCreateScopeRequest) (*AuthScope, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *AuthScope - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "APIAuthScopesApiService.CreateScope") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/api_authorizations/{api_auth_id}/scopes" - localVarPath = strings.Replace(localVarPath, "{"+"api_auth_id"+"}", url.PathEscape(parameterValueToString(r.apiAuthId, "apiAuthId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.contentType != nil { - parameterAddToQuery(localVarQueryParams, "Content-Type", r.contentType, "") - } - // body params - localVarPostBody = r.authScope - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiDeleteScopeRequest struct { - ctx context.Context - ApiService *APIAuthScopesApiService - apiAuthId string - scopeId int32 - contentType *string -} - -func (r ApiDeleteScopeRequest) ContentType(contentType string) ApiDeleteScopeRequest { - r.contentType = &contentType - return r -} - -func (r ApiDeleteScopeRequest) Execute() (*http.Response, error) { - return r.ApiService.DeleteScopeExecute(r) -} - -/* -DeleteScope Delete Api Auth Server Scope - -Delete Scope - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param apiAuthId - @param scopeId - @return ApiDeleteScopeRequest -*/ -func (a *APIAuthScopesApiService) DeleteScope(ctx context.Context, apiAuthId string, scopeId int32) ApiDeleteScopeRequest { - return ApiDeleteScopeRequest{ - ApiService: a, - ctx: ctx, - apiAuthId: apiAuthId, - scopeId: scopeId, - } -} - -// Execute executes the request -func (a *APIAuthScopesApiService) DeleteScopeExecute(r ApiDeleteScopeRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "APIAuthScopesApiService.DeleteScope") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/api_authorizations/{api_auth_id}/scopes/{scope_id}" - localVarPath = strings.Replace(localVarPath, "{"+"api_auth_id"+"}", url.PathEscape(parameterValueToString(r.apiAuthId, "apiAuthId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"scope_id"+"}", url.PathEscape(parameterValueToString(r.scopeId, "scopeId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.contentType != nil { - parameterAddToQuery(localVarQueryParams, "Content-Type", r.contentType, "") - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiGetScopesRequest struct { - ctx context.Context - ApiService *APIAuthScopesApiService - apiAuthId string - contentType *string -} - -func (r ApiGetScopesRequest) ContentType(contentType string) ApiGetScopesRequest { - r.contentType = &contentType - return r -} - -func (r ApiGetScopesRequest) Execute() ([]AuthScope, *http.Response, error) { - return r.ApiService.GetScopesExecute(r) -} - -/* -GetScopes Get Api Auth Server Scopes - -List Authorization Scopes - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param apiAuthId - @return ApiGetScopesRequest -*/ -func (a *APIAuthScopesApiService) GetScopes(ctx context.Context, apiAuthId string) ApiGetScopesRequest { - return ApiGetScopesRequest{ - ApiService: a, - ctx: ctx, - apiAuthId: apiAuthId, - } -} - -// Execute executes the request -// @return []AuthScope -func (a *APIAuthScopesApiService) GetScopesExecute(r ApiGetScopesRequest) ([]AuthScope, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []AuthScope - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "APIAuthScopesApiService.GetScopes") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/api_authorizations/{api_auth_id}/scopes" - localVarPath = strings.Replace(localVarPath, "{"+"api_auth_id"+"}", url.PathEscape(parameterValueToString(r.apiAuthId, "apiAuthId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.contentType != nil { - parameterAddToQuery(localVarQueryParams, "Content-Type", r.contentType, "") - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiUpdateScopeRequest struct { - ctx context.Context - ApiService *APIAuthScopesApiService - apiAuthId string - scopeId int32 - contentType *string - authScope *AuthScope -} - -func (r ApiUpdateScopeRequest) ContentType(contentType string) ApiUpdateScopeRequest { - r.contentType = &contentType - return r -} - -func (r ApiUpdateScopeRequest) AuthScope(authScope AuthScope) ApiUpdateScopeRequest { - r.authScope = &authScope - return r -} - -func (r ApiUpdateScopeRequest) Execute() (*AuthId, *http.Response, error) { - return r.ApiService.UpdateScopeExecute(r) -} - -/* -UpdateScope Update Api Auth Server Scope - -Update Scope - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param apiAuthId - @param scopeId - @return ApiUpdateScopeRequest -*/ -func (a *APIAuthScopesApiService) UpdateScope(ctx context.Context, apiAuthId string, scopeId int32) ApiUpdateScopeRequest { - return ApiUpdateScopeRequest{ - ApiService: a, - ctx: ctx, - apiAuthId: apiAuthId, - scopeId: scopeId, - } -} - -// Execute executes the request -// @return AuthId -func (a *APIAuthScopesApiService) UpdateScopeExecute(r ApiUpdateScopeRequest) (*AuthId, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *AuthId - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "APIAuthScopesApiService.UpdateScope") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/api_authorizations/{api_auth_id}/scopes/{scope_id}" - localVarPath = strings.Replace(localVarPath, "{"+"api_auth_id"+"}", url.PathEscape(parameterValueToString(r.apiAuthId, "apiAuthId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"scope_id"+"}", url.PathEscape(parameterValueToString(r.scopeId, "scopeId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.contentType != nil { - parameterAddToQuery(localVarQueryParams, "Content-Type", r.contentType, "") - } - // body params - localVarPostBody = r.authScope - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} diff --git a/api_api_authorization_server.go b/api_api_authorization_server.go deleted file mode 100644 index 81aeda6..0000000 --- a/api_api_authorization_server.go +++ /dev/null @@ -1,666 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "bytes" - "context" - "io/ioutil" - "net/http" - "net/url" - "strings" -) - - -// APIAuthorizationServerApiService APIAuthorizationServerApi service -type APIAuthorizationServerApiService service - -type ApiCreateAuthServerRequest struct { - ctx context.Context - ApiService *APIAuthorizationServerApiService - contentType *string - authServer *AuthServer -} - -func (r ApiCreateAuthServerRequest) ContentType(contentType string) ApiCreateAuthServerRequest { - r.contentType = &contentType - return r -} - -func (r ApiCreateAuthServerRequest) AuthServer(authServer AuthServer) ApiCreateAuthServerRequest { - r.authServer = &authServer - return r -} - -func (r ApiCreateAuthServerRequest) Execute() (*AuthServer, *http.Response, error) { - return r.ApiService.CreateAuthServerExecute(r) -} - -/* -CreateAuthServer Create Api Auth Server - -Create Auth Server - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiCreateAuthServerRequest -*/ -func (a *APIAuthorizationServerApiService) CreateAuthServer(ctx context.Context) ApiCreateAuthServerRequest { - return ApiCreateAuthServerRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return AuthServer -func (a *APIAuthorizationServerApiService) CreateAuthServerExecute(r ApiCreateAuthServerRequest) (*AuthServer, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *AuthServer - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "APIAuthorizationServerApiService.CreateAuthServer") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/api_authorizations" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.contentType != nil { - parameterAddToQuery(localVarQueryParams, "Content-Type", r.contentType, "") - } - // body params - localVarPostBody = r.authServer - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiDeleteAuthServerRequest struct { - ctx context.Context - ApiService *APIAuthorizationServerApiService - apiAuthId string - contentType *string -} - -func (r ApiDeleteAuthServerRequest) ContentType(contentType string) ApiDeleteAuthServerRequest { - r.contentType = &contentType - return r -} - -func (r ApiDeleteAuthServerRequest) Execute() (*http.Response, error) { - return r.ApiService.DeleteAuthServerExecute(r) -} - -/* -DeleteAuthServer Delete Api Auth Server - -Delete Authentication Server - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param apiAuthId - @return ApiDeleteAuthServerRequest -*/ -func (a *APIAuthorizationServerApiService) DeleteAuthServer(ctx context.Context, apiAuthId string) ApiDeleteAuthServerRequest { - return ApiDeleteAuthServerRequest{ - ApiService: a, - ctx: ctx, - apiAuthId: apiAuthId, - } -} - -// Execute executes the request -func (a *APIAuthorizationServerApiService) DeleteAuthServerExecute(r ApiDeleteAuthServerRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "APIAuthorizationServerApiService.DeleteAuthServer") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/api_authorizations/{api_auth_id}" - localVarPath = strings.Replace(localVarPath, "{"+"api_auth_id"+"}", url.PathEscape(parameterValueToString(r.apiAuthId, "apiAuthId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.contentType != nil { - parameterAddToQuery(localVarQueryParams, "Content-Type", r.contentType, "") - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiGetAuthServerRequest struct { - ctx context.Context - ApiService *APIAuthorizationServerApiService - apiAuthId string - contentType *string -} - -func (r ApiGetAuthServerRequest) ContentType(contentType string) ApiGetAuthServerRequest { - r.contentType = &contentType - return r -} - -func (r ApiGetAuthServerRequest) Execute() (*AuthServer, *http.Response, error) { - return r.ApiService.GetAuthServerExecute(r) -} - -/* -GetAuthServer Get Api Auth Server - -Get Authorization Server - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param apiAuthId - @return ApiGetAuthServerRequest -*/ -func (a *APIAuthorizationServerApiService) GetAuthServer(ctx context.Context, apiAuthId string) ApiGetAuthServerRequest { - return ApiGetAuthServerRequest{ - ApiService: a, - ctx: ctx, - apiAuthId: apiAuthId, - } -} - -// Execute executes the request -// @return AuthServer -func (a *APIAuthorizationServerApiService) GetAuthServerExecute(r ApiGetAuthServerRequest) (*AuthServer, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *AuthServer - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "APIAuthorizationServerApiService.GetAuthServer") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/api_authorizations/{api_auth_id}" - localVarPath = strings.Replace(localVarPath, "{"+"api_auth_id"+"}", url.PathEscape(parameterValueToString(r.apiAuthId, "apiAuthId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.contentType != nil { - parameterAddToQuery(localVarQueryParams, "Content-Type", r.contentType, "") - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiListAuthServersRequest struct { - ctx context.Context - ApiService *APIAuthorizationServerApiService -} - -func (r ApiListAuthServersRequest) Execute() ([]AuthServer, *http.Response, error) { - return r.ApiService.ListAuthServersExecute(r) -} - -/* -ListAuthServers List Api Auth Servers - -List Authorization Servers - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiListAuthServersRequest -*/ -func (a *APIAuthorizationServerApiService) ListAuthServers(ctx context.Context) ApiListAuthServersRequest { - return ApiListAuthServersRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return []AuthServer -func (a *APIAuthorizationServerApiService) ListAuthServersExecute(r ApiListAuthServersRequest) ([]AuthServer, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []AuthServer - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "APIAuthorizationServerApiService.ListAuthServers") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/api_authorizations" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiUpdateAuthServerRequest struct { - ctx context.Context - ApiService *APIAuthorizationServerApiService - apiAuthId string - contentType *string - authServer *AuthServer -} - -func (r ApiUpdateAuthServerRequest) ContentType(contentType string) ApiUpdateAuthServerRequest { - r.contentType = &contentType - return r -} - -func (r ApiUpdateAuthServerRequest) AuthServer(authServer AuthServer) ApiUpdateAuthServerRequest { - r.authServer = &authServer - return r -} - -func (r ApiUpdateAuthServerRequest) Execute() (*AuthServer, *http.Response, error) { - return r.ApiService.UpdateAuthServerExecute(r) -} - -/* -UpdateAuthServer Update Api Auth Server - -Update Authorization Server - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param apiAuthId - @return ApiUpdateAuthServerRequest -*/ -func (a *APIAuthorizationServerApiService) UpdateAuthServer(ctx context.Context, apiAuthId string) ApiUpdateAuthServerRequest { - return ApiUpdateAuthServerRequest{ - ApiService: a, - ctx: ctx, - apiAuthId: apiAuthId, - } -} - -// Execute executes the request -// @return AuthServer -func (a *APIAuthorizationServerApiService) UpdateAuthServerExecute(r ApiUpdateAuthServerRequest) (*AuthServer, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *AuthServer - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "APIAuthorizationServerApiService.UpdateAuthServer") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/api_authorizations/{api_auth_id}" - localVarPath = strings.Replace(localVarPath, "{"+"api_auth_id"+"}", url.PathEscape(parameterValueToString(r.apiAuthId, "apiAuthId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.contentType != nil { - parameterAddToQuery(localVarQueryParams, "Content-Type", r.contentType, "") - } - // body params - localVarPostBody = r.authServer - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} diff --git a/api_app_rules.go b/api_app_rules.go deleted file mode 100644 index 8b68199..0000000 --- a/api_app_rules.go +++ /dev/null @@ -1,1409 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "bytes" - "context" - "io/ioutil" - "net/http" - "net/url" - "strings" -) - - -// AppRulesApiService AppRulesApi service -type AppRulesApiService service - -type ApiCreateAppRuleRequest struct { - ctx context.Context - ApiService *AppRulesApiService - appId int32 - appRule *AppRule -} - -func (r ApiCreateAppRuleRequest) AppRule(appRule AppRule) ApiCreateAppRuleRequest { - r.appRule = &appRule - return r -} - -func (r ApiCreateAppRuleRequest) Execute() (*AppRule, *http.Response, error) { - return r.ApiService.CreateAppRuleExecute(r) -} - -/* -CreateAppRule Method for CreateAppRule - -Create App Rule - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param appId - @return ApiCreateAppRuleRequest -*/ -func (a *AppRulesApiService) CreateAppRule(ctx context.Context, appId int32) ApiCreateAppRuleRequest { - return ApiCreateAppRuleRequest{ - ApiService: a, - ctx: ctx, - appId: appId, - } -} - -// Execute executes the request -// @return AppRule -func (a *AppRulesApiService) CreateAppRuleExecute(r ApiCreateAppRuleRequest) (*AppRule, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *AppRule - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AppRulesApiService.CreateAppRule") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/apps/{app_id}/rules" - localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterValueToString(r.appId, "appId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.appRule - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiDeleteRuleRequest struct { - ctx context.Context - ApiService *AppRulesApiService - appId int32 - ruleId string -} - -func (r ApiDeleteRuleRequest) Execute() (*http.Response, error) { - return r.ApiService.DeleteRuleExecute(r) -} - -/* -DeleteRule Delete Rule - -Delete App Rule - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param appId - @param ruleId - @return ApiDeleteRuleRequest -*/ -func (a *AppRulesApiService) DeleteRule(ctx context.Context, appId int32, ruleId string) ApiDeleteRuleRequest { - return ApiDeleteRuleRequest{ - ApiService: a, - ctx: ctx, - appId: appId, - ruleId: ruleId, - } -} - -// Execute executes the request -func (a *AppRulesApiService) DeleteRuleExecute(r ApiDeleteRuleRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AppRulesApiService.DeleteRule") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/apps/{app_id}/rules/{rule_id}" - localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterValueToString(r.appId, "appId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"rule_id"+"}", url.PathEscape(parameterValueToString(r.ruleId, "ruleId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiGetAppRuleRequest struct { - ctx context.Context - ApiService *AppRulesApiService - appId int32 - ruleId string -} - -func (r ApiGetAppRuleRequest) Execute() (*AppRule, *http.Response, error) { - return r.ApiService.GetAppRuleExecute(r) -} - -/* -GetAppRule Get Rule - -Get App Rule - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param appId - @param ruleId - @return ApiGetAppRuleRequest -*/ -func (a *AppRulesApiService) GetAppRule(ctx context.Context, appId int32, ruleId string) ApiGetAppRuleRequest { - return ApiGetAppRuleRequest{ - ApiService: a, - ctx: ctx, - appId: appId, - ruleId: ruleId, - } -} - -// Execute executes the request -// @return AppRule -func (a *AppRulesApiService) GetAppRuleExecute(r ApiGetAppRuleRequest) (*AppRule, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *AppRule - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AppRulesApiService.GetAppRule") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/apps/{app_id}/rules/{rule_id}" - localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterValueToString(r.appId, "appId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"rule_id"+"}", url.PathEscape(parameterValueToString(r.ruleId, "ruleId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiListActionValiesRequest struct { - ctx context.Context - ApiService *AppRulesApiService - appId int32 - ruleActionValue string -} - -func (r ApiListActionValiesRequest) Execute() ([]RuleAction, *http.Response, error) { - return r.ApiService.ListActionValiesExecute(r) -} - -/* -ListActionValies List Actions Values - -Sort App rules - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param appId - @param ruleActionValue - @return ApiListActionValiesRequest -*/ -func (a *AppRulesApiService) ListActionValies(ctx context.Context, appId int32, ruleActionValue string) ApiListActionValiesRequest { - return ApiListActionValiesRequest{ - ApiService: a, - ctx: ctx, - appId: appId, - ruleActionValue: ruleActionValue, - } -} - -// Execute executes the request -// @return []RuleAction -func (a *AppRulesApiService) ListActionValiesExecute(r ApiListActionValiesRequest) ([]RuleAction, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []RuleAction - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AppRulesApiService.ListActionValies") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/apps/{app_id}/rules/actions/{rule_action_value}/values" - localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterValueToString(r.appId, "appId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"rule_action_value"+"}", url.PathEscape(parameterValueToString(r.ruleActionValue, "ruleActionValue")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiListActionsRequest struct { - ctx context.Context - ApiService *AppRulesApiService - appId int32 -} - -func (r ApiListActionsRequest) Execute() ([]RuleAction, *http.Response, error) { - return r.ApiService.ListActionsExecute(r) -} - -/* -ListActions List Actions - -List Actions - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param appId - @return ApiListActionsRequest -*/ -func (a *AppRulesApiService) ListActions(ctx context.Context, appId int32) ApiListActionsRequest { - return ApiListActionsRequest{ - ApiService: a, - ctx: ctx, - appId: appId, - } -} - -// Execute executes the request -// @return []RuleAction -func (a *AppRulesApiService) ListActionsExecute(r ApiListActionsRequest) ([]RuleAction, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []RuleAction - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AppRulesApiService.ListActions") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/apps/{app_id}/rules/actions" - localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterValueToString(r.appId, "appId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiListAppRulesRequest struct { - ctx context.Context - ApiService *AppRulesApiService - appId int32 - hasCondition *string - hasConditionType *string - hasAction *string - hasActionType *string - enabled *bool -} - -// Filters Rules based on their Conditions. Values formatted as :, where name is the Condition to look for, and value is the value to find. Multiple filters can be declared by using a comma delimited list. Wildcards are supported in both the name and value fields. For example: Single filter. has_condition=has_role:123456 Multiple filters. has_condition=has_role:123456,status:1 Wildcard for conditions. has_condition=*:123456 Wildcard for condition values. has_condition=has_role:* -func (r ApiListAppRulesRequest) HasCondition(hasCondition string) ApiListAppRulesRequest { - r.hasCondition = &hasCondition - return r -} - -// Filters Rules based on their Conditions. Values formatted as :, where name is the Condition to look for, and value is the value to find. Multiple filters can be declared by using a comma delimited list. Wildcards are supported in both the name and value fields. For example: Single filter. has_condition=has_role:123456 Multiple filters. has_condition=has_role:123456,status:1 Wildcard for conditions. has_condition=*:123456 Wildcard for condition values. has_condition=has_role:* -func (r ApiListAppRulesRequest) HasConditionType(hasConditionType string) ApiListAppRulesRequest { - r.hasConditionType = &hasConditionType - return r -} - -// Filters Rules based on their Actions. Values formatted as :, where name is the Action to look for, and value is the value to find. Multiple filters can be declared by using a comma delimited list. Wildcards are supported in both the name and value fields. For example: Single filter. has_action=set_licenses:123456 Multiple filters. has_action=set_groups:123456,set_usertype:* Wildcard for actions. has_action=*:123456 Wildcard for action values. has_action=set_userprincipalname:* -func (r ApiListAppRulesRequest) HasAction(hasAction string) ApiListAppRulesRequest { - r.hasAction = &hasAction - return r -} - -// Filters Rules based on their action types. Allowed values are: builtin - actions that involve standard attributes custom - actions that involve custom attributes none - no actions are defined For example: Find Rules with no actions has_action_type=none -func (r ApiListAppRulesRequest) HasActionType(hasActionType string) ApiListAppRulesRequest { - r.hasActionType = &hasActionType - return r -} - -// Defaults to true. When set to `false` will return all disabled mappings. -func (r ApiListAppRulesRequest) Enabled(enabled bool) ApiListAppRulesRequest { - r.enabled = &enabled - return r -} - -func (r ApiListAppRulesRequest) Execute() ([]AppRule, *http.Response, error) { - return r.ApiService.ListAppRulesExecute(r) -} - -/* -ListAppRules List Rules - -List App Rules - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param appId - @return ApiListAppRulesRequest -*/ -func (a *AppRulesApiService) ListAppRules(ctx context.Context, appId int32) ApiListAppRulesRequest { - return ApiListAppRulesRequest{ - ApiService: a, - ctx: ctx, - appId: appId, - } -} - -// Execute executes the request -// @return []AppRule -func (a *AppRulesApiService) ListAppRulesExecute(r ApiListAppRulesRequest) ([]AppRule, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []AppRule - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AppRulesApiService.ListAppRules") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/apps/{app_id}/rules" - localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterValueToString(r.appId, "appId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - if r.hasCondition != nil { - parameterAddToQuery(localVarQueryParams, "has_condition", r.hasCondition, "") - } - if r.hasConditionType != nil { - parameterAddToQuery(localVarQueryParams, "has_condition_type", r.hasConditionType, "") - } - if r.hasAction != nil { - parameterAddToQuery(localVarQueryParams, "has_action", r.hasAction, "") - } - if r.hasActionType != nil { - parameterAddToQuery(localVarQueryParams, "has_action_type", r.hasActionType, "") - } - if r.enabled != nil { - parameterAddToQuery(localVarQueryParams, "enabled", r.enabled, "") - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiListConditionOperatorsRequest struct { - ctx context.Context - ApiService *AppRulesApiService - appId int32 - ruleConditionValue string -} - -func (r ApiListConditionOperatorsRequest) Execute() ([]RuleCondition, *http.Response, error) { - return r.ApiService.ListConditionOperatorsExecute(r) -} - -/* -ListConditionOperators List Conditions Operators - -List Condition Operators - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param appId - @param ruleConditionValue - @return ApiListConditionOperatorsRequest -*/ -func (a *AppRulesApiService) ListConditionOperators(ctx context.Context, appId int32, ruleConditionValue string) ApiListConditionOperatorsRequest { - return ApiListConditionOperatorsRequest{ - ApiService: a, - ctx: ctx, - appId: appId, - ruleConditionValue: ruleConditionValue, - } -} - -// Execute executes the request -// @return []RuleCondition -func (a *AppRulesApiService) ListConditionOperatorsExecute(r ApiListConditionOperatorsRequest) ([]RuleCondition, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []RuleCondition - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AppRulesApiService.ListConditionOperators") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/apps/{app_id}/rules/conditions/{rule_condition_value}/operators" - localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterValueToString(r.appId, "appId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"rule_condition_value"+"}", url.PathEscape(parameterValueToString(r.ruleConditionValue, "ruleConditionValue")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiListConditionValuesRequest struct { - ctx context.Context - ApiService *AppRulesApiService - appId int32 - ruleConditionValue string -} - -func (r ApiListConditionValuesRequest) Execute() (*RuleCondition, *http.Response, error) { - return r.ApiService.ListConditionValuesExecute(r) -} - -/* -ListConditionValues List Conditions Values - -List Condition Values - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param appId - @param ruleConditionValue - @return ApiListConditionValuesRequest -*/ -func (a *AppRulesApiService) ListConditionValues(ctx context.Context, appId int32, ruleConditionValue string) ApiListConditionValuesRequest { - return ApiListConditionValuesRequest{ - ApiService: a, - ctx: ctx, - appId: appId, - ruleConditionValue: ruleConditionValue, - } -} - -// Execute executes the request -// @return RuleCondition -func (a *AppRulesApiService) ListConditionValuesExecute(r ApiListConditionValuesRequest) (*RuleCondition, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *RuleCondition - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AppRulesApiService.ListConditionValues") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/apps/{app_id}/rules/conditions/{rule_condition_value}/values" - localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterValueToString(r.appId, "appId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"rule_condition_value"+"}", url.PathEscape(parameterValueToString(r.ruleConditionValue, "ruleConditionValue")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiListConditionsRequest struct { - ctx context.Context - ApiService *AppRulesApiService - appId int32 -} - -func (r ApiListConditionsRequest) Execute() ([]ListConditions200ResponseInner, *http.Response, error) { - return r.ApiService.ListConditionsExecute(r) -} - -/* -ListConditions List Conditions - -List App Conditions - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param appId - @return ApiListConditionsRequest -*/ -func (a *AppRulesApiService) ListConditions(ctx context.Context, appId int32) ApiListConditionsRequest { - return ApiListConditionsRequest{ - ApiService: a, - ctx: ctx, - appId: appId, - } -} - -// Execute executes the request -// @return []ListConditions200ResponseInner -func (a *AppRulesApiService) ListConditionsExecute(r ApiListConditionsRequest) ([]ListConditions200ResponseInner, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []ListConditions200ResponseInner - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AppRulesApiService.ListConditions") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/apps/{app_id}/rules/conditions" - localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterValueToString(r.appId, "appId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiSortAppRulesRequest struct { - ctx context.Context - ApiService *AppRulesApiService - appId int32 - requestBody *[]int32 -} - -func (r ApiSortAppRulesRequest) RequestBody(requestBody []int32) ApiSortAppRulesRequest { - r.requestBody = &requestBody - return r -} - -func (r ApiSortAppRulesRequest) Execute() ([]int32, *http.Response, error) { - return r.ApiService.SortAppRulesExecute(r) -} - -/* -SortAppRules Bulk Sort - -Sort App rules - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param appId - @return ApiSortAppRulesRequest -*/ -func (a *AppRulesApiService) SortAppRules(ctx context.Context, appId int32) ApiSortAppRulesRequest { - return ApiSortAppRulesRequest{ - ApiService: a, - ctx: ctx, - appId: appId, - } -} - -// Execute executes the request -// @return []int32 -func (a *AppRulesApiService) SortAppRulesExecute(r ApiSortAppRulesRequest) ([]int32, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []int32 - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AppRulesApiService.SortAppRules") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/apps/{app_id}/rules/sort" - localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterValueToString(r.appId, "appId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.requestBody - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiUpdateAppRuleRequest struct { - ctx context.Context - ApiService *AppRulesApiService - appId int32 - ruleId string - appRule *AppRule -} - -func (r ApiUpdateAppRuleRequest) AppRule(appRule AppRule) ApiUpdateAppRuleRequest { - r.appRule = &appRule - return r -} - -func (r ApiUpdateAppRuleRequest) Execute() (*AppRule, *http.Response, error) { - return r.ApiService.UpdateAppRuleExecute(r) -} - -/* -UpdateAppRule Update Rule - -Update App Rule. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param appId - @param ruleId - @return ApiUpdateAppRuleRequest -*/ -func (a *AppRulesApiService) UpdateAppRule(ctx context.Context, appId int32, ruleId string) ApiUpdateAppRuleRequest { - return ApiUpdateAppRuleRequest{ - ApiService: a, - ctx: ctx, - appId: appId, - ruleId: ruleId, - } -} - -// Execute executes the request -// @return AppRule -func (a *AppRulesApiService) UpdateAppRuleExecute(r ApiUpdateAppRuleRequest) (*AppRule, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *AppRule - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AppRulesApiService.UpdateAppRule") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/apps/{app_id}/rules/{rule_id}" - localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterValueToString(r.appId, "appId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"rule_id"+"}", url.PathEscape(parameterValueToString(r.ruleId, "ruleId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.appRule - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} diff --git a/api_apps.go b/api_apps.go deleted file mode 100644 index b36ca37..0000000 --- a/api_apps.go +++ /dev/null @@ -1,1020 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "bytes" - "context" - "io/ioutil" - "net/http" - "net/url" - "strings" -) - - -// AppsApiService AppsApi service -type AppsApiService service - -type ApiCreateAppRequest struct { - ctx context.Context - ApiService *AppsApiService - contentType *string - createAppRequest *CreateAppRequest -} - -func (r ApiCreateAppRequest) ContentType(contentType string) ApiCreateAppRequest { - r.contentType = &contentType - return r -} - -func (r ApiCreateAppRequest) CreateAppRequest(createAppRequest CreateAppRequest) ApiCreateAppRequest { - r.createAppRequest = &createAppRequest - return r -} - -func (r ApiCreateAppRequest) Execute() (*CreateApp200Response, *http.Response, error) { - return r.ApiService.CreateAppExecute(r) -} - -/* -CreateApp Create App - -Create App - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiCreateAppRequest -*/ -func (a *AppsApiService) CreateApp(ctx context.Context) ApiCreateAppRequest { - return ApiCreateAppRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return CreateApp200Response -func (a *AppsApiService) CreateAppExecute(r ApiCreateAppRequest) (*CreateApp200Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *CreateApp200Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AppsApiService.CreateApp") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/apps" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.contentType != nil { - parameterAddToQuery(localVarQueryParams, "Content-Type", r.contentType, "") - } - // body params - localVarPostBody = r.createAppRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiDeleteAppRequest struct { - ctx context.Context - ApiService *AppsApiService - appId int32 -} - -func (r ApiDeleteAppRequest) Execute() (*http.Response, error) { - return r.ApiService.DeleteAppExecute(r) -} - -/* -DeleteApp Delete App - -Delete App - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param appId - @return ApiDeleteAppRequest -*/ -func (a *AppsApiService) DeleteApp(ctx context.Context, appId int32) ApiDeleteAppRequest { - return ApiDeleteAppRequest{ - ApiService: a, - ctx: ctx, - appId: appId, - } -} - -// Execute executes the request -func (a *AppsApiService) DeleteAppExecute(r ApiDeleteAppRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AppsApiService.DeleteApp") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/apps/{app_id}" - localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterValueToString(r.appId, "appId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiDeleteAppParameterRequest struct { - ctx context.Context - ApiService *AppsApiService - appId int32 - parameterId string -} - -func (r ApiDeleteAppParameterRequest) Execute() (*http.Response, error) { - return r.ApiService.DeleteAppParameterExecute(r) -} - -/* -DeleteAppParameter Delete Parameter from App - -Delete Parameter from App - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param appId - @param parameterId - @return ApiDeleteAppParameterRequest -*/ -func (a *AppsApiService) DeleteAppParameter(ctx context.Context, appId int32, parameterId string) ApiDeleteAppParameterRequest { - return ApiDeleteAppParameterRequest{ - ApiService: a, - ctx: ctx, - appId: appId, - parameterId: parameterId, - } -} - -// Execute executes the request -func (a *AppsApiService) DeleteAppParameterExecute(r ApiDeleteAppParameterRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AppsApiService.DeleteAppParameter") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/apps/{app_id}/parameters/{parameter_id}" - localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterValueToString(r.appId, "appId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"parameter_id"+"}", url.PathEscape(parameterValueToString(r.parameterId, "parameterId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiGetAppRequest struct { - ctx context.Context - ApiService *AppsApiService - appId int32 -} - -func (r ApiGetAppRequest) Execute() (*GenericApp, *http.Response, error) { - return r.ApiService.GetAppExecute(r) -} - -/* -GetApp Get App - -Get App - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param appId - @return ApiGetAppRequest -*/ -func (a *AppsApiService) GetApp(ctx context.Context, appId int32) ApiGetAppRequest { - return ApiGetAppRequest{ - ApiService: a, - ctx: ctx, - appId: appId, - } -} - -// Execute executes the request -// @return GenericApp -func (a *AppsApiService) GetAppExecute(r ApiGetAppRequest) (*GenericApp, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GenericApp - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AppsApiService.GetApp") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/apps/{app_id}" - localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterValueToString(r.appId, "appId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetAppUsersRequest struct { - ctx context.Context - ApiService *AppsApiService - appId int32 -} - -func (r ApiGetAppUsersRequest) Execute() ([]User, *http.Response, error) { - return r.ApiService.GetAppUsersExecute(r) -} - -/* -GetAppUsers Get App Users - -Get App Users - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param appId - @return ApiGetAppUsersRequest -*/ -func (a *AppsApiService) GetAppUsers(ctx context.Context, appId int32) ApiGetAppUsersRequest { - return ApiGetAppUsersRequest{ - ApiService: a, - ctx: ctx, - appId: appId, - } -} - -// Execute executes the request -// @return []User -func (a *AppsApiService) GetAppUsersExecute(r ApiGetAppUsersRequest) ([]User, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []User - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AppsApiService.GetAppUsers") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/apps/{app_id}/users" - localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterValueToString(r.appId, "appId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiListAppsRequest struct { - ctx context.Context - ApiService *AppsApiService -} - -func (r ApiListAppsRequest) Execute() ([]GenericApp, *http.Response, error) { - return r.ApiService.ListAppsExecute(r) -} - -/* -ListApps List Apps - -List Apps - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiListAppsRequest -*/ -func (a *AppsApiService) ListApps(ctx context.Context) ApiListAppsRequest { - return ApiListAppsRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return []GenericApp -func (a *AppsApiService) ListAppsExecute(r ApiListAppsRequest) ([]GenericApp, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []GenericApp - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AppsApiService.ListApps") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/apps" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiListConnectorsRequest struct { - ctx context.Context - ApiService *AppsApiService - name *string -} - -func (r ApiListConnectorsRequest) Name(name string) ApiListConnectorsRequest { - r.name = &name - return r -} - -func (r ApiListConnectorsRequest) Execute() (*Connector, *http.Response, error) { - return r.ApiService.ListConnectorsExecute(r) -} - -/* -ListConnectors List Connectors - -List Connectors - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiListConnectorsRequest -*/ -func (a *AppsApiService) ListConnectors(ctx context.Context) ApiListConnectorsRequest { - return ApiListConnectorsRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return Connector -func (a *AppsApiService) ListConnectorsExecute(r ApiListConnectorsRequest) (*Connector, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Connector - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AppsApiService.ListConnectors") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/connectors" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - if r.name != nil { - parameterAddToQuery(localVarQueryParams, "name", r.name, "") - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiUpdateAppRequest struct { - ctx context.Context - ApiService *AppsApiService - appId int32 - requestBody *map[string]interface{} -} - -func (r ApiUpdateAppRequest) RequestBody(requestBody map[string]interface{}) ApiUpdateAppRequest { - r.requestBody = &requestBody - return r -} - -func (r ApiUpdateAppRequest) Execute() (*GenericApp, *http.Response, error) { - return r.ApiService.UpdateAppExecute(r) -} - -/* -UpdateApp Update App - -Update App - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param appId - @return ApiUpdateAppRequest -*/ -func (a *AppsApiService) UpdateApp(ctx context.Context, appId int32) ApiUpdateAppRequest { - return ApiUpdateAppRequest{ - ApiService: a, - ctx: ctx, - appId: appId, - } -} - -// Execute executes the request -// @return GenericApp -func (a *AppsApiService) UpdateAppExecute(r ApiUpdateAppRequest) (*GenericApp, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GenericApp - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AppsApiService.UpdateApp") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/apps/{app_id}" - localVarPath = strings.Replace(localVarPath, "{"+"app_id"+"}", url.PathEscape(parameterValueToString(r.appId, "appId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.requestBody - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} diff --git a/api_branding_service.go b/api_branding_service.go deleted file mode 100644 index 04d45c4..0000000 --- a/api_branding_service.go +++ /dev/null @@ -1,744 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "bytes" - "context" - "io/ioutil" - "net/http" - "net/url" - "strings" -) - - -// BrandingServiceApiService BrandingServiceApi service -type BrandingServiceApiService service - -type ApiCreateBrandRequest struct { - ctx context.Context - ApiService *BrandingServiceApiService - brand *Brand -} - -func (r ApiCreateBrandRequest) Brand(brand Brand) ApiCreateBrandRequest { - r.brand = &brand - return r -} - -func (r ApiCreateBrandRequest) Execute() (*Brand, *http.Response, error) { - return r.ApiService.CreateBrandExecute(r) -} - -/* -CreateBrand Create Brand - -Create a new Account Brand - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiCreateBrandRequest -*/ -func (a *BrandingServiceApiService) CreateBrand(ctx context.Context) ApiCreateBrandRequest { - return ApiCreateBrandRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return Brand -func (a *BrandingServiceApiService) CreateBrandExecute(r ApiCreateBrandRequest) (*Brand, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Brand - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BrandingServiceApiService.CreateBrand") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/branding/brands" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.brand - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiDeleteBrandRequest struct { - ctx context.Context - ApiService *BrandingServiceApiService - brandId int32 -} - -func (r ApiDeleteBrandRequest) Execute() (*http.Response, error) { - return r.ApiService.DeleteBrandExecute(r) -} - -/* -DeleteBrand Delete Brand - -Delete Brand - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param brandId Unique identifier for the branding object. - @return ApiDeleteBrandRequest -*/ -func (a *BrandingServiceApiService) DeleteBrand(ctx context.Context, brandId int32) ApiDeleteBrandRequest { - return ApiDeleteBrandRequest{ - ApiService: a, - ctx: ctx, - brandId: brandId, - } -} - -// Execute executes the request -func (a *BrandingServiceApiService) DeleteBrandExecute(r ApiDeleteBrandRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BrandingServiceApiService.DeleteBrand") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/branding/brands/{brand_id}" - localVarPath = strings.Replace(localVarPath, "{"+"brand_id"+"}", url.PathEscape(parameterValueToString(r.brandId, "brandId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiGetBrandRequest struct { - ctx context.Context - ApiService *BrandingServiceApiService - brandId int32 -} - -func (r ApiGetBrandRequest) Execute() (*Brand, *http.Response, error) { - return r.ApiService.GetBrandExecute(r) -} - -/* -GetBrand Get Brand - -Retrieve a single brand via ID - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param brandId Unique identifier for the branding object. - @return ApiGetBrandRequest -*/ -func (a *BrandingServiceApiService) GetBrand(ctx context.Context, brandId int32) ApiGetBrandRequest { - return ApiGetBrandRequest{ - ApiService: a, - ctx: ctx, - brandId: brandId, - } -} - -// Execute executes the request -// @return Brand -func (a *BrandingServiceApiService) GetBrandExecute(r ApiGetBrandRequest) (*Brand, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Brand - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BrandingServiceApiService.GetBrand") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/branding/brands/{brand_id}" - localVarPath = strings.Replace(localVarPath, "{"+"brand_id"+"}", url.PathEscape(parameterValueToString(r.brandId, "brandId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetBrandAppsRequest struct { - ctx context.Context - ApiService *BrandingServiceApiService - brandId int32 -} - -func (r ApiGetBrandAppsRequest) Execute() ([]BrandApp, *http.Response, error) { - return r.ApiService.GetBrandAppsExecute(r) -} - -/* -GetBrandApps Get Brand Apps - -Get Apps Associated with Account Brand - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param brandId Unique identifier for the branding object. - @return ApiGetBrandAppsRequest -*/ -func (a *BrandingServiceApiService) GetBrandApps(ctx context.Context, brandId int32) ApiGetBrandAppsRequest { - return ApiGetBrandAppsRequest{ - ApiService: a, - ctx: ctx, - brandId: brandId, - } -} - -// Execute executes the request -// @return []BrandApp -func (a *BrandingServiceApiService) GetBrandAppsExecute(r ApiGetBrandAppsRequest) ([]BrandApp, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []BrandApp - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BrandingServiceApiService.GetBrandApps") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/branding/brands/{brand_id}/apps" - localVarPath = strings.Replace(localVarPath, "{"+"brand_id"+"}", url.PathEscape(parameterValueToString(r.brandId, "brandId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiListBrandsRequest struct { - ctx context.Context - ApiService *BrandingServiceApiService -} - -func (r ApiListBrandsRequest) Execute() ([]BrandReq, *http.Response, error) { - return r.ApiService.ListBrandsExecute(r) -} - -/* -ListBrands List Account Brands - -List Account Brands - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiListBrandsRequest -*/ -func (a *BrandingServiceApiService) ListBrands(ctx context.Context) ApiListBrandsRequest { - return ApiListBrandsRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return []BrandReq -func (a *BrandingServiceApiService) ListBrandsExecute(r ApiListBrandsRequest) ([]BrandReq, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []BrandReq - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BrandingServiceApiService.ListBrands") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/branding/brands" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiUpdateBrandRequest struct { - ctx context.Context - ApiService *BrandingServiceApiService - brandId int32 - requestBrand *RequestBrand -} - -func (r ApiUpdateBrandRequest) RequestBrand(requestBrand RequestBrand) ApiUpdateBrandRequest { - r.requestBrand = &requestBrand - return r -} - -func (r ApiUpdateBrandRequest) Execute() (*Brand, *http.Response, error) { - return r.ApiService.UpdateBrandExecute(r) -} - -/* -UpdateBrand Update Brand - -Update Account Brand - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param brandId Unique identifier for the branding object. - @return ApiUpdateBrandRequest -*/ -func (a *BrandingServiceApiService) UpdateBrand(ctx context.Context, brandId int32) ApiUpdateBrandRequest { - return ApiUpdateBrandRequest{ - ApiService: a, - ctx: ctx, - brandId: brandId, - } -} - -// Execute executes the request -// @return Brand -func (a *BrandingServiceApiService) UpdateBrandExecute(r ApiUpdateBrandRequest) (*Brand, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Brand - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BrandingServiceApiService.UpdateBrand") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/branding/brands/{brand_id}" - localVarPath = strings.Replace(localVarPath, "{"+"brand_id"+"}", url.PathEscape(parameterValueToString(r.brandId, "brandId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.requestBrand - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} diff --git a/api_branding_service_smtp.go b/api_branding_service_smtp.go deleted file mode 100644 index 4879d0b..0000000 --- a/api_branding_service_smtp.go +++ /dev/null @@ -1,369 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "bytes" - "context" - "io/ioutil" - "net/http" - "net/url" -) - - -// BrandingServiceSMTPApiService BrandingServiceSMTPApi service -type BrandingServiceSMTPApiService service - -type ApiDeleteEmailSettingsRequest struct { - ctx context.Context - ApiService *BrandingServiceSMTPApiService -} - -func (r ApiDeleteEmailSettingsRequest) Execute() (*AltErr, *http.Response, error) { - return r.ApiService.DeleteEmailSettingsExecute(r) -} - -/* -DeleteEmailSettings Delete Custom Email Settings - -Reset Email Setting config - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiDeleteEmailSettingsRequest -*/ -func (a *BrandingServiceSMTPApiService) DeleteEmailSettings(ctx context.Context) ApiDeleteEmailSettingsRequest { - return ApiDeleteEmailSettingsRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return AltErr -func (a *BrandingServiceSMTPApiService) DeleteEmailSettingsExecute(r ApiDeleteEmailSettingsRequest) (*AltErr, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *AltErr - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BrandingServiceSMTPApiService.DeleteEmailSettings") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/branding/email_settings" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetEmailSettingsRequest struct { - ctx context.Context - ApiService *BrandingServiceSMTPApiService -} - -func (r ApiGetEmailSettingsRequest) Execute() (*GetEmailSettings200Response, *http.Response, error) { - return r.ApiService.GetEmailSettingsExecute(r) -} - -/* -GetEmailSettings Get Email Settings - -Get Email Settings Config - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetEmailSettingsRequest -*/ -func (a *BrandingServiceSMTPApiService) GetEmailSettings(ctx context.Context) ApiGetEmailSettingsRequest { - return ApiGetEmailSettingsRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return GetEmailSettings200Response -func (a *BrandingServiceSMTPApiService) GetEmailSettingsExecute(r ApiGetEmailSettingsRequest) (*GetEmailSettings200Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetEmailSettings200Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BrandingServiceSMTPApiService.GetEmailSettings") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/branding/email_settings" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiUpdateEmailSettingsRequest struct { - ctx context.Context - ApiService *BrandingServiceSMTPApiService - emailConfig *EmailConfig -} - -func (r ApiUpdateEmailSettingsRequest) EmailConfig(emailConfig EmailConfig) ApiUpdateEmailSettingsRequest { - r.emailConfig = &emailConfig - return r -} - -func (r ApiUpdateEmailSettingsRequest) Execute() (*AltErr, *http.Response, error) { - return r.ApiService.UpdateEmailSettingsExecute(r) -} - -/* -UpdateEmailSettings Update Email Settings - -Update Email Settings Config - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiUpdateEmailSettingsRequest -*/ -func (a *BrandingServiceSMTPApiService) UpdateEmailSettings(ctx context.Context) ApiUpdateEmailSettingsRequest { - return ApiUpdateEmailSettingsRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return AltErr -func (a *BrandingServiceSMTPApiService) UpdateEmailSettingsExecute(r ApiUpdateEmailSettingsRequest) (*AltErr, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *AltErr - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BrandingServiceSMTPApiService.UpdateEmailSettings") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/branding/email_settings" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.emailConfig - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} diff --git a/api_branding_service_templates.go b/api_branding_service_templates.go deleted file mode 100644 index 2dec71a..0000000 --- a/api_branding_service_templates.go +++ /dev/null @@ -1,1050 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "bytes" - "context" - "io/ioutil" - "net/http" - "net/url" - "strings" -) - - -// BrandingServiceTemplatesApiService BrandingServiceTemplatesApi service -type BrandingServiceTemplatesApiService service - -type ApiCreateMessageTemplateRequest struct { - ctx context.Context - ApiService *BrandingServiceTemplatesApiService - brandId int32 - locale *string - messageTemplate *MessageTemplate -} - -// The 2 character language locale for the template. e.g. en = English, es = Spanish -func (r ApiCreateMessageTemplateRequest) Locale(locale string) ApiCreateMessageTemplateRequest { - r.locale = &locale - return r -} - -func (r ApiCreateMessageTemplateRequest) MessageTemplate(messageTemplate MessageTemplate) ApiCreateMessageTemplateRequest { - r.messageTemplate = &messageTemplate - return r -} - -func (r ApiCreateMessageTemplateRequest) Execute() (*MessageTemplate, *http.Response, error) { - return r.ApiService.CreateMessageTemplateExecute(r) -} - -/* -CreateMessageTemplate Create Message Template - -Create Message Template - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param brandId Unique identifier for the branding object. - @return ApiCreateMessageTemplateRequest -*/ -func (a *BrandingServiceTemplatesApiService) CreateMessageTemplate(ctx context.Context, brandId int32) ApiCreateMessageTemplateRequest { - return ApiCreateMessageTemplateRequest{ - ApiService: a, - ctx: ctx, - brandId: brandId, - } -} - -// Execute executes the request -// @return MessageTemplate -func (a *BrandingServiceTemplatesApiService) CreateMessageTemplateExecute(r ApiCreateMessageTemplateRequest) (*MessageTemplate, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *MessageTemplate - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BrandingServiceTemplatesApiService.CreateMessageTemplate") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/branding/brands/{brand_id}/templates" - localVarPath = strings.Replace(localVarPath, "{"+"brand_id"+"}", url.PathEscape(parameterValueToString(r.brandId, "brandId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - if r.locale != nil { - parameterAddToQuery(localVarQueryParams, "locale", r.locale, "") - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.messageTemplate - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiDeleteMessageTemplateRequest struct { - ctx context.Context - ApiService *BrandingServiceTemplatesApiService - brandId int32 - templateId int32 -} - -func (r ApiDeleteMessageTemplateRequest) Execute() (*http.Response, error) { - return r.ApiService.DeleteMessageTemplateExecute(r) -} - -/* -DeleteMessageTemplate Delete Message Template - -Delete Message Template - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param brandId Unique identifier for the branding object. - @param templateId Unique identifier for the template to return. - @return ApiDeleteMessageTemplateRequest -*/ -func (a *BrandingServiceTemplatesApiService) DeleteMessageTemplate(ctx context.Context, brandId int32, templateId int32) ApiDeleteMessageTemplateRequest { - return ApiDeleteMessageTemplateRequest{ - ApiService: a, - ctx: ctx, - brandId: brandId, - templateId: templateId, - } -} - -// Execute executes the request -func (a *BrandingServiceTemplatesApiService) DeleteMessageTemplateExecute(r ApiDeleteMessageTemplateRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BrandingServiceTemplatesApiService.DeleteMessageTemplate") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/branding/brands/{brand_id}/templates/{template_id}" - localVarPath = strings.Replace(localVarPath, "{"+"brand_id"+"}", url.PathEscape(parameterValueToString(r.brandId, "brandId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"template_id"+"}", url.PathEscape(parameterValueToString(r.templateId, "templateId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 404 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiGetMasterByTypeRequest struct { - ctx context.Context - ApiService *BrandingServiceTemplatesApiService - templateType string -} - -func (r ApiGetMasterByTypeRequest) Execute() (*MessageTemplate, *http.Response, error) { - return r.ApiService.GetMasterByTypeExecute(r) -} - -/* -GetMasterByType Get Master Template by Type - -Get Master Template by Type - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param templateType The message template type to return. - @return ApiGetMasterByTypeRequest -*/ -func (a *BrandingServiceTemplatesApiService) GetMasterByType(ctx context.Context, templateType string) ApiGetMasterByTypeRequest { - return ApiGetMasterByTypeRequest{ - ApiService: a, - ctx: ctx, - templateType: templateType, - } -} - -// Execute executes the request -// @return MessageTemplate -func (a *BrandingServiceTemplatesApiService) GetMasterByTypeExecute(r ApiGetMasterByTypeRequest) (*MessageTemplate, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *MessageTemplate - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BrandingServiceTemplatesApiService.GetMasterByType") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/branding/brands/master/templates/{template_type}" - localVarPath = strings.Replace(localVarPath, "{"+"template_type"+"}", url.PathEscape(parameterValueToString(r.templateType, "templateType")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetMessageTemplateByIdRequest struct { - ctx context.Context - ApiService *BrandingServiceTemplatesApiService - brandId int32 - templateId int32 -} - -func (r ApiGetMessageTemplateByIdRequest) Execute() (*MessageTemplate, *http.Response, error) { - return r.ApiService.GetMessageTemplateByIdExecute(r) -} - -/* -GetMessageTemplateById Get Message Template - -Get Message Template by ID - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param brandId Unique identifier for the branding object. - @param templateId Unique identifier for the template to return. - @return ApiGetMessageTemplateByIdRequest -*/ -func (a *BrandingServiceTemplatesApiService) GetMessageTemplateById(ctx context.Context, brandId int32, templateId int32) ApiGetMessageTemplateByIdRequest { - return ApiGetMessageTemplateByIdRequest{ - ApiService: a, - ctx: ctx, - brandId: brandId, - templateId: templateId, - } -} - -// Execute executes the request -// @return MessageTemplate -func (a *BrandingServiceTemplatesApiService) GetMessageTemplateByIdExecute(r ApiGetMessageTemplateByIdRequest) (*MessageTemplate, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *MessageTemplate - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BrandingServiceTemplatesApiService.GetMessageTemplateById") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/branding/brands/{brand_id}/templates/{template_id}" - localVarPath = strings.Replace(localVarPath, "{"+"brand_id"+"}", url.PathEscape(parameterValueToString(r.brandId, "brandId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"template_id"+"}", url.PathEscape(parameterValueToString(r.templateId, "templateId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetTemplateByLocaleRequest struct { - ctx context.Context - ApiService *BrandingServiceTemplatesApiService - brandId int32 - templateType string - locale string -} - -func (r ApiGetTemplateByLocaleRequest) Execute() (*MessageTemplate, *http.Response, error) { - return r.ApiService.GetTemplateByLocaleExecute(r) -} - -/* -GetTemplateByLocale Get Template by Type & Locale - -Get Template by Type and Locale - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param brandId Unique identifier for the branding object. - @param templateType The message template type to return. - @param locale The 2 character language locale for the template. e.g. en = English, es = Spanish - @return ApiGetTemplateByLocaleRequest -*/ -func (a *BrandingServiceTemplatesApiService) GetTemplateByLocale(ctx context.Context, brandId int32, templateType string, locale string) ApiGetTemplateByLocaleRequest { - return ApiGetTemplateByLocaleRequest{ - ApiService: a, - ctx: ctx, - brandId: brandId, - templateType: templateType, - locale: locale, - } -} - -// Execute executes the request -// @return MessageTemplate -func (a *BrandingServiceTemplatesApiService) GetTemplateByLocaleExecute(r ApiGetTemplateByLocaleRequest) (*MessageTemplate, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *MessageTemplate - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BrandingServiceTemplatesApiService.GetTemplateByLocale") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/branding/brands/{brand_id}/templates/{template_type}/{locale}" - localVarPath = strings.Replace(localVarPath, "{"+"brand_id"+"}", url.PathEscape(parameterValueToString(r.brandId, "brandId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"template_type"+"}", url.PathEscape(parameterValueToString(r.templateType, "templateType")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"locale"+"}", url.PathEscape(parameterValueToString(r.locale, "locale")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiListMessageTemplatesRequest struct { - ctx context.Context - ApiService *BrandingServiceTemplatesApiService - brandId int32 - locale *string -} - -// The 2 character language locale for the template. e.g. en = English, es = Spanish -func (r ApiListMessageTemplatesRequest) Locale(locale string) ApiListMessageTemplatesRequest { - r.locale = &locale - return r -} - -func (r ApiListMessageTemplatesRequest) Execute() ([]ListMessageTemplates200ResponseInner, *http.Response, error) { - return r.ApiService.ListMessageTemplatesExecute(r) -} - -/* -ListMessageTemplates List Message Templates - -List Message Templates - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param brandId Unique identifier for the branding object. - @return ApiListMessageTemplatesRequest -*/ -func (a *BrandingServiceTemplatesApiService) ListMessageTemplates(ctx context.Context, brandId int32) ApiListMessageTemplatesRequest { - return ApiListMessageTemplatesRequest{ - ApiService: a, - ctx: ctx, - brandId: brandId, - } -} - -// Execute executes the request -// @return []ListMessageTemplates200ResponseInner -func (a *BrandingServiceTemplatesApiService) ListMessageTemplatesExecute(r ApiListMessageTemplatesRequest) ([]ListMessageTemplates200ResponseInner, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []ListMessageTemplates200ResponseInner - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BrandingServiceTemplatesApiService.ListMessageTemplates") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/branding/brands/{brand_id}/templates" - localVarPath = strings.Replace(localVarPath, "{"+"brand_id"+"}", url.PathEscape(parameterValueToString(r.brandId, "brandId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - if r.locale != nil { - parameterAddToQuery(localVarQueryParams, "locale", r.locale, "") - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiUpdateMessageTemplateByIdRequest struct { - ctx context.Context - ApiService *BrandingServiceTemplatesApiService - brandId int32 - templateId int32 -} - -func (r ApiUpdateMessageTemplateByIdRequest) Execute() (*MessageTemplate, *http.Response, error) { - return r.ApiService.UpdateMessageTemplateByIdExecute(r) -} - -/* -UpdateMessageTemplateById Update Message Template - -Update Message Template by ID - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param brandId Unique identifier for the branding object. - @param templateId Unique identifier for the template to return. - @return ApiUpdateMessageTemplateByIdRequest -*/ -func (a *BrandingServiceTemplatesApiService) UpdateMessageTemplateById(ctx context.Context, brandId int32, templateId int32) ApiUpdateMessageTemplateByIdRequest { - return ApiUpdateMessageTemplateByIdRequest{ - ApiService: a, - ctx: ctx, - brandId: brandId, - templateId: templateId, - } -} - -// Execute executes the request -// @return MessageTemplate -func (a *BrandingServiceTemplatesApiService) UpdateMessageTemplateByIdExecute(r ApiUpdateMessageTemplateByIdRequest) (*MessageTemplate, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *MessageTemplate - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BrandingServiceTemplatesApiService.UpdateMessageTemplateById") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/branding/brands/{brand_id}/templates/{template_id}" - localVarPath = strings.Replace(localVarPath, "{"+"brand_id"+"}", url.PathEscape(parameterValueToString(r.brandId, "brandId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"template_id"+"}", url.PathEscape(parameterValueToString(r.templateId, "templateId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiUpdateTemplateByLocaleRequest struct { - ctx context.Context - ApiService *BrandingServiceTemplatesApiService - brandId int32 - templateType string - locale string -} - -func (r ApiUpdateTemplateByLocaleRequest) Execute() (*MessageTemplate, *http.Response, error) { - return r.ApiService.UpdateTemplateByLocaleExecute(r) -} - -/* -UpdateTemplateByLocale Update Template by Type & Locale - -Update Template by Type and Locale - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param brandId Unique identifier for the branding object. - @param templateType The message template type to return. - @param locale The 2 character language locale for the template. e.g. en = English, es = Spanish - @return ApiUpdateTemplateByLocaleRequest -*/ -func (a *BrandingServiceTemplatesApiService) UpdateTemplateByLocale(ctx context.Context, brandId int32, templateType string, locale string) ApiUpdateTemplateByLocaleRequest { - return ApiUpdateTemplateByLocaleRequest{ - ApiService: a, - ctx: ctx, - brandId: brandId, - templateType: templateType, - locale: locale, - } -} - -// Execute executes the request -// @return MessageTemplate -func (a *BrandingServiceTemplatesApiService) UpdateTemplateByLocaleExecute(r ApiUpdateTemplateByLocaleRequest) (*MessageTemplate, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *MessageTemplate - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BrandingServiceTemplatesApiService.UpdateTemplateByLocale") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/branding/brands/{brand_id}/templates/{template_type}/{locale}" - localVarPath = strings.Replace(localVarPath, "{"+"brand_id"+"}", url.PathEscape(parameterValueToString(r.brandId, "brandId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"template_type"+"}", url.PathEscape(parameterValueToString(r.templateType, "templateType")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"locale"+"}", url.PathEscape(parameterValueToString(r.locale, "locale")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} diff --git a/api_events.go b/api_events.go deleted file mode 100644 index fdeba40..0000000 --- a/api_events.go +++ /dev/null @@ -1,478 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "bytes" - "context" - "io/ioutil" - "net/http" - "net/url" - "strings" - "reflect" -) - - -// EventsApiService EventsApi service -type EventsApiService service - -type ApiGetEventByIdRequest struct { - ctx context.Context - ApiService *EventsApiService - eventId int32 -} - -func (r ApiGetEventByIdRequest) Execute() (*GetEventById200Response, *http.Response, error) { - return r.ApiService.GetEventByIdExecute(r) -} - -/* -GetEventById Get Event by ID - -Get Event By ID - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param eventId - @return ApiGetEventByIdRequest -*/ -func (a *EventsApiService) GetEventById(ctx context.Context, eventId int32) ApiGetEventByIdRequest { - return ApiGetEventByIdRequest{ - ApiService: a, - ctx: ctx, - eventId: eventId, - } -} - -// Execute executes the request -// @return GetEventById200Response -func (a *EventsApiService) GetEventByIdExecute(r ApiGetEventByIdRequest) (*GetEventById200Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetEventById200Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EventsApiService.GetEventById") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/1/events/{event_id}" - localVarPath = strings.Replace(localVarPath, "{"+"event_id"+"}", url.PathEscape(parameterValueToString(r.eventId, "eventId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetEventTypesRequest struct { - ctx context.Context - ApiService *EventsApiService - contentType *string -} - -func (r ApiGetEventTypesRequest) ContentType(contentType string) ApiGetEventTypesRequest { - r.contentType = &contentType - return r -} - -func (r ApiGetEventTypesRequest) Execute() (*GetEventTypes200Response, *http.Response, error) { - return r.ApiService.GetEventTypesExecute(r) -} - -/* -GetEventTypes Get Event Types - -Get Event types - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetEventTypesRequest -*/ -func (a *EventsApiService) GetEventTypes(ctx context.Context) ApiGetEventTypesRequest { - return ApiGetEventTypesRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return GetEventTypes200Response -func (a *EventsApiService) GetEventTypesExecute(r ApiGetEventTypesRequest) (*GetEventTypes200Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetEventTypes200Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EventsApiService.GetEventTypes") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/1/events/types" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.contentType != nil { - parameterAddToQuery(localVarQueryParams, "Content-Type", r.contentType, "") - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetEventsRequest struct { - ctx context.Context - ApiService *EventsApiService - eventTypeId *[]int32 - clientId *int32 - directoryId *int32 - id *int32 - createdAt *string - resolution *string - since *string - until *string - userId *int32 -} - -func (r ApiGetEventsRequest) EventTypeId(eventTypeId []int32) ApiGetEventsRequest { - r.eventTypeId = &eventTypeId - return r -} - -func (r ApiGetEventsRequest) ClientId(clientId int32) ApiGetEventsRequest { - r.clientId = &clientId - return r -} - -func (r ApiGetEventsRequest) DirectoryId(directoryId int32) ApiGetEventsRequest { - r.directoryId = &directoryId - return r -} - -func (r ApiGetEventsRequest) Id(id int32) ApiGetEventsRequest { - r.id = &id - return r -} - -func (r ApiGetEventsRequest) CreatedAt(createdAt string) ApiGetEventsRequest { - r.createdAt = &createdAt - return r -} - -func (r ApiGetEventsRequest) Resolution(resolution string) ApiGetEventsRequest { - r.resolution = &resolution - return r -} - -func (r ApiGetEventsRequest) Since(since string) ApiGetEventsRequest { - r.since = &since - return r -} - -func (r ApiGetEventsRequest) Until(until string) ApiGetEventsRequest { - r.until = &until - return r -} - -// Set to the id of the user that you want to return. -func (r ApiGetEventsRequest) UserId(userId int32) ApiGetEventsRequest { - r.userId = &userId - return r -} - -func (r ApiGetEventsRequest) Execute() (*GetEvents200Response, *http.Response, error) { - return r.ApiService.GetEventsExecute(r) -} - -/* -GetEvents Get Events - -Get Events - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetEventsRequest -*/ -func (a *EventsApiService) GetEvents(ctx context.Context) ApiGetEventsRequest { - return ApiGetEventsRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return GetEvents200Response -func (a *EventsApiService) GetEventsExecute(r ApiGetEventsRequest) (*GetEvents200Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetEvents200Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EventsApiService.GetEvents") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/1/events" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - if r.eventTypeId != nil { - t := *r.eventTypeId - if reflect.TypeOf(t).Kind() == reflect.Slice { - s := reflect.ValueOf(t) - for i := 0; i < s.Len(); i++ { - parameterAddToQuery(localVarQueryParams, "event_type_id", s.Index(i), "multi") - } - } else { - parameterAddToQuery(localVarQueryParams, "event_type_id", t, "multi") - } - } - if r.clientId != nil { - parameterAddToQuery(localVarQueryParams, "client_id", r.clientId, "") - } - if r.directoryId != nil { - parameterAddToQuery(localVarQueryParams, "directory_id", r.directoryId, "") - } - if r.id != nil { - parameterAddToQuery(localVarQueryParams, "id", r.id, "") - } - if r.createdAt != nil { - parameterAddToQuery(localVarQueryParams, "created_at", r.createdAt, "") - } - if r.resolution != nil { - parameterAddToQuery(localVarQueryParams, "resolution", r.resolution, "") - } - if r.since != nil { - parameterAddToQuery(localVarQueryParams, "since", r.since, "") - } - if r.until != nil { - parameterAddToQuery(localVarQueryParams, "until", r.until, "") - } - if r.userId != nil { - parameterAddToQuery(localVarQueryParams, "user_id", r.userId, "") - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} diff --git a/api_groups.go b/api_groups.go deleted file mode 100644 index fe93300..0000000 --- a/api_groups.go +++ /dev/null @@ -1,279 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "bytes" - "context" - "io/ioutil" - "net/http" - "net/url" - "strings" -) - - -// GroupsApiService GroupsApi service -type GroupsApiService service - -type ApiGetGroupByIdRequest struct { - ctx context.Context - ApiService *GroupsApiService - groupId string -} - -func (r ApiGetGroupByIdRequest) Execute() (*GetGroups200Response, *http.Response, error) { - return r.ApiService.GetGroupByIdExecute(r) -} - -/* -GetGroupById Get Group by ID - -Get Group By ID - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param groupId - @return ApiGetGroupByIdRequest -*/ -func (a *GroupsApiService) GetGroupById(ctx context.Context, groupId string) ApiGetGroupByIdRequest { - return ApiGetGroupByIdRequest{ - ApiService: a, - ctx: ctx, - groupId: groupId, - } -} - -// Execute executes the request -// @return GetGroups200Response -func (a *GroupsApiService) GetGroupByIdExecute(r ApiGetGroupByIdRequest) (*GetGroups200Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetGroups200Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GroupsApiService.GetGroupById") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/1/groups/{group_id}" - localVarPath = strings.Replace(localVarPath, "{"+"group_id"+"}", url.PathEscape(parameterValueToString(r.groupId, "groupId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetGroupsRequest struct { - ctx context.Context - ApiService *GroupsApiService -} - -func (r ApiGetGroupsRequest) Execute() (*GetGroups200Response, *http.Response, error) { - return r.ApiService.GetGroupsExecute(r) -} - -/* -GetGroups Get Groups - -Get Groups - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetGroupsRequest -*/ -func (a *GroupsApiService) GetGroups(ctx context.Context) ApiGetGroupsRequest { - return ApiGetGroupsRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return GetGroups200Response -func (a *GroupsApiService) GetGroupsExecute(r ApiGetGroupsRequest) (*GetGroups200Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetGroups200Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GroupsApiService.GetGroups") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/1/groups" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} diff --git a/api_invite_links.go b/api_invite_links.go deleted file mode 100644 index e8fd7ef..0000000 --- a/api_invite_links.go +++ /dev/null @@ -1,279 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "bytes" - "context" - "io/ioutil" - "net/http" - "net/url" -) - - -// InviteLinksApiService InviteLinksApi service -type InviteLinksApiService service - -type ApiGetInviteLinkRequest struct { - ctx context.Context - ApiService *InviteLinksApiService - getInviteLinkRequest *GetInviteLinkRequest -} - -func (r ApiGetInviteLinkRequest) GetInviteLinkRequest(getInviteLinkRequest GetInviteLinkRequest) ApiGetInviteLinkRequest { - r.getInviteLinkRequest = &getInviteLinkRequest - return r -} - -func (r ApiGetInviteLinkRequest) Execute() (*GetInviteLink200Response, *http.Response, error) { - return r.ApiService.GetInviteLinkExecute(r) -} - -/* -GetInviteLink Generate Invite Link - -Generate Invite Link - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetInviteLinkRequest -*/ -func (a *InviteLinksApiService) GetInviteLink(ctx context.Context) ApiGetInviteLinkRequest { - return ApiGetInviteLinkRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return GetInviteLink200Response -func (a *InviteLinksApiService) GetInviteLinkExecute(r ApiGetInviteLinkRequest) (*GetInviteLink200Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetInviteLink200Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "InviteLinksApiService.GetInviteLink") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/1/invites/get_invite_link" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.getInviteLinkRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiSendInviteLinkRequest struct { - ctx context.Context - ApiService *InviteLinksApiService - sendInviteLinkRequest *SendInviteLinkRequest -} - -func (r ApiSendInviteLinkRequest) SendInviteLinkRequest(sendInviteLinkRequest SendInviteLinkRequest) ApiSendInviteLinkRequest { - r.sendInviteLinkRequest = &sendInviteLinkRequest - return r -} - -func (r ApiSendInviteLinkRequest) Execute() (*SendInviteLink200Response, *http.Response, error) { - return r.ApiService.SendInviteLinkExecute(r) -} - -/* -SendInviteLink Send Invite Link - -Send Invite Link - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiSendInviteLinkRequest -*/ -func (a *InviteLinksApiService) SendInviteLink(ctx context.Context) ApiSendInviteLinkRequest { - return ApiSendInviteLinkRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return SendInviteLink200Response -func (a *InviteLinksApiService) SendInviteLinkExecute(r ApiSendInviteLinkRequest) (*SendInviteLink200Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *SendInviteLink200Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "InviteLinksApiService.SendInviteLink") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/1/invites/send_invite_link" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.sendInviteLinkRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} diff --git a/api_multi_factor_authentication.go b/api_multi_factor_authentication.go deleted file mode 100644 index ee176d6..0000000 --- a/api_multi_factor_authentication.go +++ /dev/null @@ -1,1271 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "bytes" - "context" - "io/ioutil" - "net/http" - "net/url" - "strings" -) - - -// MultiFactorAuthenticationApiService MultiFactorAuthenticationApi service -type MultiFactorAuthenticationApiService service - -type ApiCreateDeviceVerificationRequest struct { - ctx context.Context - ApiService *MultiFactorAuthenticationApiService - userId int32 - contentType *string - createDeviceVerificationRequest *CreateDeviceVerificationRequest -} - -func (r ApiCreateDeviceVerificationRequest) ContentType(contentType string) ApiCreateDeviceVerificationRequest { - r.contentType = &contentType - return r -} - -func (r ApiCreateDeviceVerificationRequest) CreateDeviceVerificationRequest(createDeviceVerificationRequest CreateDeviceVerificationRequest) ApiCreateDeviceVerificationRequest { - r.createDeviceVerificationRequest = &createDeviceVerificationRequest - return r -} - -func (r ApiCreateDeviceVerificationRequest) Execute() (*CreateDeviceVerification201Response, *http.Response, error) { - return r.ApiService.CreateDeviceVerificationExecute(r) -} - -/* -CreateDeviceVerification Create Device Verification - -Create a new verification process - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param userId Set to the id of the user that you want to return. - @return ApiCreateDeviceVerificationRequest -*/ -func (a *MultiFactorAuthenticationApiService) CreateDeviceVerification(ctx context.Context, userId int32) ApiCreateDeviceVerificationRequest { - return ApiCreateDeviceVerificationRequest{ - ApiService: a, - ctx: ctx, - userId: userId, - } -} - -// Execute executes the request -// @return CreateDeviceVerification201Response -func (a *MultiFactorAuthenticationApiService) CreateDeviceVerificationExecute(r ApiCreateDeviceVerificationRequest) (*CreateDeviceVerification201Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *CreateDeviceVerification201Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MultiFactorAuthenticationApiService.CreateDeviceVerification") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/mfa/users/{user_id}/verifications" - localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.contentType != nil { - parameterAddToQuery(localVarQueryParams, "Content-Type", r.contentType, "") - } - // body params - localVarPostBody = r.createDeviceVerificationRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiCreateFactorRegistrationRequest struct { - ctx context.Context - ApiService *MultiFactorAuthenticationApiService - userId int32 - contentType *string - createFactorRegistrationRequest *CreateFactorRegistrationRequest -} - -func (r ApiCreateFactorRegistrationRequest) ContentType(contentType string) ApiCreateFactorRegistrationRequest { - r.contentType = &contentType - return r -} - -func (r ApiCreateFactorRegistrationRequest) CreateFactorRegistrationRequest(createFactorRegistrationRequest CreateFactorRegistrationRequest) ApiCreateFactorRegistrationRequest { - r.createFactorRegistrationRequest = &createFactorRegistrationRequest - return r -} - -func (r ApiCreateFactorRegistrationRequest) Execute() (*CreateFactorRegistration201Response, *http.Response, error) { - return r.ApiService.CreateFactorRegistrationExecute(r) -} - -/* -CreateFactorRegistration Create Factor Registration - -Create a new registration process - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param userId Set to the id of the user that you want to return. - @return ApiCreateFactorRegistrationRequest -*/ -func (a *MultiFactorAuthenticationApiService) CreateFactorRegistration(ctx context.Context, userId int32) ApiCreateFactorRegistrationRequest { - return ApiCreateFactorRegistrationRequest{ - ApiService: a, - ctx: ctx, - userId: userId, - } -} - -// Execute executes the request -// @return CreateFactorRegistration201Response -func (a *MultiFactorAuthenticationApiService) CreateFactorRegistrationExecute(r ApiCreateFactorRegistrationRequest) (*CreateFactorRegistration201Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *CreateFactorRegistration201Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MultiFactorAuthenticationApiService.CreateFactorRegistration") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/mfa/users/{user_id}/registrations" - localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.contentType != nil { - parameterAddToQuery(localVarQueryParams, "Content-Type", r.contentType, "") - } - // body params - localVarPostBody = r.createFactorRegistrationRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiDeleteEnrolledFactorRequest struct { - ctx context.Context - ApiService *MultiFactorAuthenticationApiService - userId int32 - deviceId string -} - -func (r ApiDeleteEnrolledFactorRequest) Execute() (*http.Response, error) { - return r.ApiService.DeleteEnrolledFactorExecute(r) -} - -/* -DeleteEnrolledFactor Delete Enrolled Factor - -Delete a user\'s authentication device - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param userId Set to the id of the user that you want to return. - @param deviceId - @return ApiDeleteEnrolledFactorRequest -*/ -func (a *MultiFactorAuthenticationApiService) DeleteEnrolledFactor(ctx context.Context, userId int32, deviceId string) ApiDeleteEnrolledFactorRequest { - return ApiDeleteEnrolledFactorRequest{ - ApiService: a, - ctx: ctx, - userId: userId, - deviceId: deviceId, - } -} - -// Execute executes the request -func (a *MultiFactorAuthenticationApiService) DeleteEnrolledFactorExecute(r ApiDeleteEnrolledFactorRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MultiFactorAuthenticationApiService.DeleteEnrolledFactor") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/mfa/users/{user_id}/devices/{device_id}" - localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"device_id"+"}", url.PathEscape(parameterValueToString(r.deviceId, "deviceId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiGenerateOTPRequest struct { - ctx context.Context - ApiService *MultiFactorAuthenticationApiService - userId int32 - contentType *string - generateOTPRequest *GenerateOTPRequest -} - -func (r ApiGenerateOTPRequest) ContentType(contentType string) ApiGenerateOTPRequest { - r.contentType = &contentType - return r -} - -func (r ApiGenerateOTPRequest) GenerateOTPRequest(generateOTPRequest GenerateOTPRequest) ApiGenerateOTPRequest { - r.generateOTPRequest = &generateOTPRequest - return r -} - -func (r ApiGenerateOTPRequest) Execute() (*GenerateOTP201Response, *http.Response, error) { - return r.ApiService.GenerateOTPExecute(r) -} - -/* -GenerateOTP Generate MFA token - -Create new MFA token on the user's account - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param userId Set to the id of the user that you want to return. - @return ApiGenerateOTPRequest -*/ -func (a *MultiFactorAuthenticationApiService) GenerateOTP(ctx context.Context, userId int32) ApiGenerateOTPRequest { - return ApiGenerateOTPRequest{ - ApiService: a, - ctx: ctx, - userId: userId, - } -} - -// Execute executes the request -// @return GenerateOTP201Response -func (a *MultiFactorAuthenticationApiService) GenerateOTPExecute(r ApiGenerateOTPRequest) (*GenerateOTP201Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GenerateOTP201Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MultiFactorAuthenticationApiService.GenerateOTP") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/mfa/users/{user_id}/mfa_token" - localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.contentType != nil { - parameterAddToQuery(localVarQueryParams, "Content-Type", r.contentType, "") - } - // body params - localVarPostBody = r.generateOTPRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetAuthFactorsRequest struct { - ctx context.Context - ApiService *MultiFactorAuthenticationApiService - userId int32 -} - -func (r ApiGetAuthFactorsRequest) Execute() (*GetAuthFactors200Response, *http.Response, error) { - return r.ApiService.GetAuthFactorsExecute(r) -} - -/* -GetAuthFactors Get User Factors - -Get a user\'s available authentication factors - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param userId Set to the id of the user that you want to return. - @return ApiGetAuthFactorsRequest -*/ -func (a *MultiFactorAuthenticationApiService) GetAuthFactors(ctx context.Context, userId int32) ApiGetAuthFactorsRequest { - return ApiGetAuthFactorsRequest{ - ApiService: a, - ctx: ctx, - userId: userId, - } -} - -// Execute executes the request -// @return GetAuthFactors200Response -func (a *MultiFactorAuthenticationApiService) GetAuthFactorsExecute(r ApiGetAuthFactorsRequest) (*GetAuthFactors200Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetAuthFactors200Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MultiFactorAuthenticationApiService.GetAuthFactors") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/mfa/users/{user_id}/factors" - localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetAuthenticationDevicesRequest struct { - ctx context.Context - ApiService *MultiFactorAuthenticationApiService - userId int32 -} - -func (r ApiGetAuthenticationDevicesRequest) Execute() ([]GetAuthenticationDevices200ResponseInner, *http.Response, error) { - return r.ApiService.GetAuthenticationDevicesExecute(r) -} - -/* -GetAuthenticationDevices Get User Devices - -Get a user authentication devices - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param userId Set to the id of the user that you want to return. - @return ApiGetAuthenticationDevicesRequest -*/ -func (a *MultiFactorAuthenticationApiService) GetAuthenticationDevices(ctx context.Context, userId int32) ApiGetAuthenticationDevicesRequest { - return ApiGetAuthenticationDevicesRequest{ - ApiService: a, - ctx: ctx, - userId: userId, - } -} - -// Execute executes the request -// @return []GetAuthenticationDevices200ResponseInner -func (a *MultiFactorAuthenticationApiService) GetAuthenticationDevicesExecute(r ApiGetAuthenticationDevicesRequest) ([]GetAuthenticationDevices200ResponseInner, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []GetAuthenticationDevices200ResponseInner - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MultiFactorAuthenticationApiService.GetAuthenticationDevices") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/mfa/users/{user_id}/devices" - localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetUserRegistrationRequest struct { - ctx context.Context - ApiService *MultiFactorAuthenticationApiService - userId int32 - registrationId string -} - -func (r ApiGetUserRegistrationRequest) Execute() (map[string]interface{}, *http.Response, error) { - return r.ApiService.GetUserRegistrationExecute(r) -} - -/* -GetUserRegistration Get User Registration - -Get registration state by id - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param userId Set to the id of the user that you want to return. - @param registrationId The id of a registration - @return ApiGetUserRegistrationRequest -*/ -func (a *MultiFactorAuthenticationApiService) GetUserRegistration(ctx context.Context, userId int32, registrationId string) ApiGetUserRegistrationRequest { - return ApiGetUserRegistrationRequest{ - ApiService: a, - ctx: ctx, - userId: userId, - registrationId: registrationId, - } -} - -// Execute executes the request -// @return map[string]interface{} -func (a *MultiFactorAuthenticationApiService) GetUserRegistrationExecute(r ApiGetUserRegistrationRequest) (map[string]interface{}, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue map[string]interface{} - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MultiFactorAuthenticationApiService.GetUserRegistration") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/mfa/users/{user_id}/registrations/{registration_id}" - localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"registration_id"+"}", url.PathEscape(parameterValueToString(r.registrationId, "registrationId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetUserVerificationRequest struct { - ctx context.Context - ApiService *MultiFactorAuthenticationApiService - userId int32 - verificationId string -} - -func (r ApiGetUserVerificationRequest) Execute() (*GetUserVerification200Response, *http.Response, error) { - return r.ApiService.GetUserVerificationExecute(r) -} - -/* -GetUserVerification Get User Verification - -Get verification state by id - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param userId Set to the id of the user that you want to return. - @param verificationId The verification_id is returned on activation of the factor or you can get the device_id using the Activate Factor API call. - @return ApiGetUserVerificationRequest -*/ -func (a *MultiFactorAuthenticationApiService) GetUserVerification(ctx context.Context, userId int32, verificationId string) ApiGetUserVerificationRequest { - return ApiGetUserVerificationRequest{ - ApiService: a, - ctx: ctx, - userId: userId, - verificationId: verificationId, - } -} - -// Execute executes the request -// @return GetUserVerification200Response -func (a *MultiFactorAuthenticationApiService) GetUserVerificationExecute(r ApiGetUserVerificationRequest) (*GetUserVerification200Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetUserVerification200Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MultiFactorAuthenticationApiService.GetUserVerification") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/mfa/users/{user_id}/verifications/{verification_id}" - localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"verification_id"+"}", url.PathEscape(parameterValueToString(r.verificationId, "verificationId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiVerifyUserRegistrationRequest struct { - ctx context.Context - ApiService *MultiFactorAuthenticationApiService - userId int32 - registrationId string - contentType *string - verifyUserRegistrationRequest *VerifyUserRegistrationRequest -} - -func (r ApiVerifyUserRegistrationRequest) ContentType(contentType string) ApiVerifyUserRegistrationRequest { - r.contentType = &contentType - return r -} - -func (r ApiVerifyUserRegistrationRequest) VerifyUserRegistrationRequest(verifyUserRegistrationRequest VerifyUserRegistrationRequest) ApiVerifyUserRegistrationRequest { - r.verifyUserRegistrationRequest = &verifyUserRegistrationRequest - return r -} - -func (r ApiVerifyUserRegistrationRequest) Execute() (*VerifyUserRegistration200Response, *http.Response, error) { - return r.ApiService.VerifyUserRegistrationExecute(r) -} - -/* -VerifyUserRegistration Verify User Registration - -Submit an otp for verification. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param userId Set to the id of the user that you want to return. - @param registrationId The id of a registration - @return ApiVerifyUserRegistrationRequest -*/ -func (a *MultiFactorAuthenticationApiService) VerifyUserRegistration(ctx context.Context, userId int32, registrationId string) ApiVerifyUserRegistrationRequest { - return ApiVerifyUserRegistrationRequest{ - ApiService: a, - ctx: ctx, - userId: userId, - registrationId: registrationId, - } -} - -// Execute executes the request -// @return VerifyUserRegistration200Response -func (a *MultiFactorAuthenticationApiService) VerifyUserRegistrationExecute(r ApiVerifyUserRegistrationRequest) (*VerifyUserRegistration200Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *VerifyUserRegistration200Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MultiFactorAuthenticationApiService.VerifyUserRegistration") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/mfa/users/{user_id}/registrations/{registration_id}" - localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"registration_id"+"}", url.PathEscape(parameterValueToString(r.registrationId, "registrationId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.contentType != nil { - parameterAddToQuery(localVarQueryParams, "Content-Type", r.contentType, "") - } - // body params - localVarPostBody = r.verifyUserRegistrationRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiVerifyUserVerificationRequest struct { - ctx context.Context - ApiService *MultiFactorAuthenticationApiService - userId int32 - verificationId string - contentType *string - verifyUserVerificationRequest *VerifyUserVerificationRequest -} - -func (r ApiVerifyUserVerificationRequest) ContentType(contentType string) ApiVerifyUserVerificationRequest { - r.contentType = &contentType - return r -} - -func (r ApiVerifyUserVerificationRequest) VerifyUserVerificationRequest(verifyUserVerificationRequest VerifyUserVerificationRequest) ApiVerifyUserVerificationRequest { - r.verifyUserVerificationRequest = &verifyUserVerificationRequest - return r -} - -func (r ApiVerifyUserVerificationRequest) Execute() (*Error, *http.Response, error) { - return r.ApiService.VerifyUserVerificationExecute(r) -} - -/* -VerifyUserVerification Verify User Verification - -Submit an otp for verification. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param userId Set to the id of the user that you want to return. - @param verificationId The verification_id is returned on activation of the factor or you can get the device_id using the Activate Factor API call. - @return ApiVerifyUserVerificationRequest -*/ -func (a *MultiFactorAuthenticationApiService) VerifyUserVerification(ctx context.Context, userId int32, verificationId string) ApiVerifyUserVerificationRequest { - return ApiVerifyUserVerificationRequest{ - ApiService: a, - ctx: ctx, - userId: userId, - verificationId: verificationId, - } -} - -// Execute executes the request -// @return Error -func (a *MultiFactorAuthenticationApiService) VerifyUserVerificationExecute(r ApiVerifyUserVerificationRequest) (*Error, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Error - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MultiFactorAuthenticationApiService.VerifyUserVerification") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/mfa/users/{user_id}/verifications/{verification_id}" - localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"verification_id"+"}", url.PathEscape(parameterValueToString(r.verificationId, "verificationId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.contentType != nil { - parameterAddToQuery(localVarQueryParams, "Content-Type", r.contentType, "") - } - // body params - localVarPostBody = r.verifyUserVerificationRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} diff --git a/api_multi_factor_authentication_v1.go b/api_multi_factor_authentication_v1.go deleted file mode 100644 index d123f35..0000000 --- a/api_multi_factor_authentication_v1.go +++ /dev/null @@ -1,915 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "bytes" - "context" - "io/ioutil" - "net/http" - "net/url" - "strings" -) - - -// MultiFactorAuthenticationV1ApiService MultiFactorAuthenticationV1Api service -type MultiFactorAuthenticationV1ApiService service - -type ApiActivateMfaFactorsRequest struct { - ctx context.Context - ApiService *MultiFactorAuthenticationV1ApiService - userId int32 - deviceId string - activateMfaFactorsRequest *ActivateMfaFactorsRequest -} - -func (r ApiActivateMfaFactorsRequest) ActivateMfaFactorsRequest(activateMfaFactorsRequest ActivateMfaFactorsRequest) ApiActivateMfaFactorsRequest { - r.activateMfaFactorsRequest = &activateMfaFactorsRequest - return r -} - -func (r ApiActivateMfaFactorsRequest) Execute() (*GetEnrolledFactors200Response, *http.Response, error) { - return r.ApiService.ActivateMfaFactorsExecute(r) -} - -/* -ActivateMfaFactors Activate a Factor - -Activate a Factor - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param userId Set to the id of the user that you want to return. - @param deviceId - @return ApiActivateMfaFactorsRequest -*/ -func (a *MultiFactorAuthenticationV1ApiService) ActivateMfaFactors(ctx context.Context, userId int32, deviceId string) ApiActivateMfaFactorsRequest { - return ApiActivateMfaFactorsRequest{ - ApiService: a, - ctx: ctx, - userId: userId, - deviceId: deviceId, - } -} - -// Execute executes the request -// @return GetEnrolledFactors200Response -func (a *MultiFactorAuthenticationV1ApiService) ActivateMfaFactorsExecute(r ApiActivateMfaFactorsRequest) (*GetEnrolledFactors200Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetEnrolledFactors200Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MultiFactorAuthenticationV1ApiService.ActivateMfaFactors") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/1/users/{user_id}/otp_devices/{device_id}/trigger" - localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"device_id"+"}", url.PathEscape(parameterValueToString(r.deviceId, "deviceId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.activateMfaFactorsRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiEnrollMfaFactorRequest struct { - ctx context.Context - ApiService *MultiFactorAuthenticationV1ApiService - userId int32 - otpDevice *OtpDevice -} - -func (r ApiEnrollMfaFactorRequest) OtpDevice(otpDevice OtpDevice) ApiEnrollMfaFactorRequest { - r.otpDevice = &otpDevice - return r -} - -func (r ApiEnrollMfaFactorRequest) Execute() (*EnrollMfaFactor200Response, *http.Response, error) { - return r.ApiService.EnrollMfaFactorExecute(r) -} - -/* -EnrollMfaFactor Enroll a Factor - - Enroll an Authentication Factor - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param userId Set to the id of the user that you want to return. - @return ApiEnrollMfaFactorRequest -*/ -func (a *MultiFactorAuthenticationV1ApiService) EnrollMfaFactor(ctx context.Context, userId int32) ApiEnrollMfaFactorRequest { - return ApiEnrollMfaFactorRequest{ - ApiService: a, - ctx: ctx, - userId: userId, - } -} - -// Execute executes the request -// @return EnrollMfaFactor200Response -func (a *MultiFactorAuthenticationV1ApiService) EnrollMfaFactorExecute(r ApiEnrollMfaFactorRequest) (*EnrollMfaFactor200Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *EnrollMfaFactor200Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MultiFactorAuthenticationV1ApiService.EnrollMfaFactor") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/1/users/{user_id}/otp_devices" - localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.otpDevice - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGenerateMFAtokenRequest struct { - ctx context.Context - ApiService *MultiFactorAuthenticationV1ApiService - userId int32 - generateMFAtokenRequest *GenerateMFAtokenRequest -} - -func (r ApiGenerateMFAtokenRequest) GenerateMFAtokenRequest(generateMFAtokenRequest GenerateMFAtokenRequest) ApiGenerateMFAtokenRequest { - r.generateMFAtokenRequest = &generateMFAtokenRequest - return r -} - -func (r ApiGenerateMFAtokenRequest) Execute() (*GenerateMFAtoken200Response, *http.Response, error) { - return r.ApiService.GenerateMFAtokenExecute(r) -} - -/* -GenerateMFAtoken Generate Temp MFA Token - -Generate MFA Token - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param userId Set to the id of the user that you want to return. - @return ApiGenerateMFAtokenRequest -*/ -func (a *MultiFactorAuthenticationV1ApiService) GenerateMFAtoken(ctx context.Context, userId int32) ApiGenerateMFAtokenRequest { - return ApiGenerateMFAtokenRequest{ - ApiService: a, - ctx: ctx, - userId: userId, - } -} - -// Execute executes the request -// @return GenerateMFAtoken200Response -func (a *MultiFactorAuthenticationV1ApiService) GenerateMFAtokenExecute(r ApiGenerateMFAtokenRequest) (*GenerateMFAtoken200Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GenerateMFAtoken200Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MultiFactorAuthenticationV1ApiService.GenerateMFAtoken") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/1/users/{user_id}/mfa_token" - localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.generateMFAtokenRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetEnrolledFactorsRequest struct { - ctx context.Context - ApiService *MultiFactorAuthenticationV1ApiService - userId int32 -} - -func (r ApiGetEnrolledFactorsRequest) Execute() (*GetEnrolledFactors200Response, *http.Response, error) { - return r.ApiService.GetEnrolledFactorsExecute(r) -} - -/* -GetEnrolledFactors Get Enrolled Factors - -Get Enrolled Factors - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param userId Set to the id of the user that you want to return. - @return ApiGetEnrolledFactorsRequest -*/ -func (a *MultiFactorAuthenticationV1ApiService) GetEnrolledFactors(ctx context.Context, userId int32) ApiGetEnrolledFactorsRequest { - return ApiGetEnrolledFactorsRequest{ - ApiService: a, - ctx: ctx, - userId: userId, - } -} - -// Execute executes the request -// @return GetEnrolledFactors200Response -func (a *MultiFactorAuthenticationV1ApiService) GetEnrolledFactorsExecute(r ApiGetEnrolledFactorsRequest) (*GetEnrolledFactors200Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetEnrolledFactors200Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MultiFactorAuthenticationV1ApiService.GetEnrolledFactors") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/1/users/{user_id}/otp_devices" - localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetMFAFactorsRequest struct { - ctx context.Context - ApiService *MultiFactorAuthenticationV1ApiService - userId int32 -} - -func (r ApiGetMFAFactorsRequest) Execute() (*GetMFAFactors200Response, *http.Response, error) { - return r.ApiService.GetMFAFactorsExecute(r) -} - -/* -GetMFAFactors Get Available Factors - -Get MFA Factors - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param userId Set to the id of the user that you want to return. - @return ApiGetMFAFactorsRequest -*/ -func (a *MultiFactorAuthenticationV1ApiService) GetMFAFactors(ctx context.Context, userId int32) ApiGetMFAFactorsRequest { - return ApiGetMFAFactorsRequest{ - ApiService: a, - ctx: ctx, - userId: userId, - } -} - -// Execute executes the request -// @return GetMFAFactors200Response -func (a *MultiFactorAuthenticationV1ApiService) GetMFAFactorsExecute(r ApiGetMFAFactorsRequest) (*GetMFAFactors200Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetMFAFactors200Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MultiFactorAuthenticationV1ApiService.GetMFAFactors") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/1/users/{user_id}/auth_factor" - localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiRemoveMfaFactorsRequest struct { - ctx context.Context - ApiService *MultiFactorAuthenticationV1ApiService - userId int32 - deviceId string -} - -func (r ApiRemoveMfaFactorsRequest) Execute() (*http.Response, error) { - return r.ApiService.RemoveMfaFactorsExecute(r) -} - -/* -RemoveMfaFactors Remove an Enrolled Factor - -Remove an enrolled MFA device for a user - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param userId Set to the id of the user that you want to return. - @param deviceId - @return ApiRemoveMfaFactorsRequest -*/ -func (a *MultiFactorAuthenticationV1ApiService) RemoveMfaFactors(ctx context.Context, userId int32, deviceId string) ApiRemoveMfaFactorsRequest { - return ApiRemoveMfaFactorsRequest{ - ApiService: a, - ctx: ctx, - userId: userId, - deviceId: deviceId, - } -} - -// Execute executes the request -func (a *MultiFactorAuthenticationV1ApiService) RemoveMfaFactorsExecute(r ApiRemoveMfaFactorsRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MultiFactorAuthenticationV1ApiService.RemoveMfaFactors") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/1/users/{user_id}/otp_devices/{device_id}" - localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"device_id"+"}", url.PathEscape(parameterValueToString(r.deviceId, "deviceId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiVerifyMfaFactorRequest struct { - ctx context.Context - ApiService *MultiFactorAuthenticationV1ApiService - userId int32 - deviceId string - verifyMfaFactorRequest *VerifyMfaFactorRequest -} - -func (r ApiVerifyMfaFactorRequest) VerifyMfaFactorRequest(verifyMfaFactorRequest VerifyMfaFactorRequest) ApiVerifyMfaFactorRequest { - r.verifyMfaFactorRequest = &verifyMfaFactorRequest - return r -} - -func (r ApiVerifyMfaFactorRequest) Execute() (*Error, *http.Response, error) { - return r.ApiService.VerifyMfaFactorExecute(r) -} - -/* -VerifyMfaFactor Verify a Factor - -Verify a Factor - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param userId Set to the id of the user that you want to return. - @param deviceId - @return ApiVerifyMfaFactorRequest -*/ -func (a *MultiFactorAuthenticationV1ApiService) VerifyMfaFactor(ctx context.Context, userId int32, deviceId string) ApiVerifyMfaFactorRequest { - return ApiVerifyMfaFactorRequest{ - ApiService: a, - ctx: ctx, - userId: userId, - deviceId: deviceId, - } -} - -// Execute executes the request -// @return Error -func (a *MultiFactorAuthenticationV1ApiService) VerifyMfaFactorExecute(r ApiVerifyMfaFactorRequest) (*Error, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Error - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MultiFactorAuthenticationV1ApiService.VerifyMfaFactor") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/1/users/{user_id}/otp_devices/{device_id}/verify" - localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"device_id"+"}", url.PathEscape(parameterValueToString(r.deviceId, "deviceId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.verifyMfaFactorRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} diff --git a/api_o_auth2.go b/api_o_auth2.go deleted file mode 100644 index eee3a68..0000000 --- a/api_o_auth2.go +++ /dev/null @@ -1,454 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "bytes" - "context" - "io/ioutil" - "net/http" - "net/url" -) - - -// OAuth2ApiService OAuth2Api service -type OAuth2ApiService service - -type ApiGenerateTokenRequest struct { - ctx context.Context - ApiService *OAuth2ApiService - generateTokenRequest *GenerateTokenRequest - contentType *string -} - -// Request Body to Generate OAuth Token -func (r ApiGenerateTokenRequest) GenerateTokenRequest(generateTokenRequest GenerateTokenRequest) ApiGenerateTokenRequest { - r.generateTokenRequest = &generateTokenRequest - return r -} - -func (r ApiGenerateTokenRequest) ContentType(contentType string) ApiGenerateTokenRequest { - r.contentType = &contentType - return r -} - -func (r ApiGenerateTokenRequest) Execute() (*OauthToken, *http.Response, error) { - return r.ApiService.GenerateTokenExecute(r) -} - -/* -GenerateToken Generate Token - -Generate Token - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGenerateTokenRequest -*/ -func (a *OAuth2ApiService) GenerateToken(ctx context.Context) ApiGenerateTokenRequest { - return ApiGenerateTokenRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return OauthToken -func (a *OAuth2ApiService) GenerateTokenExecute(r ApiGenerateTokenRequest) (*OauthToken, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *OauthToken - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OAuth2ApiService.GenerateToken") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/auth/oauth2/v2/token" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.generateTokenRequest == nil { - return localVarReturnValue, nil, reportError("generateTokenRequest is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.contentType != nil { - parameterAddToQuery(localVarQueryParams, "Content-Type", r.contentType, "") - } - // body params - localVarPostBody = r.generateTokenRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetRateLimitRequest struct { - ctx context.Context - ApiService *OAuth2ApiService -} - -func (r ApiGetRateLimitRequest) Execute() (*GetRateLimit200Response, *http.Response, error) { - return r.ApiService.GetRateLimitExecute(r) -} - -/* -GetRateLimit Get Rate Limit - -Get Rate Limit - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetRateLimitRequest -*/ -func (a *OAuth2ApiService) GetRateLimit(ctx context.Context) ApiGetRateLimitRequest { - return ApiGetRateLimitRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return GetRateLimit200Response -func (a *OAuth2ApiService) GetRateLimitExecute(r ApiGetRateLimitRequest) (*GetRateLimit200Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetRateLimit200Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OAuth2ApiService.GetRateLimit") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/auth/rate_limit" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiRevokeTokensRequest struct { - ctx context.Context - ApiService *OAuth2ApiService - contentType *string - revokeTokensRequest *RevokeTokensRequest -} - -func (r ApiRevokeTokensRequest) ContentType(contentType string) ApiRevokeTokensRequest { - r.contentType = &contentType - return r -} - -func (r ApiRevokeTokensRequest) RevokeTokensRequest(revokeTokensRequest RevokeTokensRequest) ApiRevokeTokensRequest { - r.revokeTokensRequest = &revokeTokensRequest - return r -} - -func (r ApiRevokeTokensRequest) Execute() (*Error, *http.Response, error) { - return r.ApiService.RevokeTokensExecute(r) -} - -/* -RevokeTokens Revoke Tokens - -Revoke Tokens - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiRevokeTokensRequest -*/ -func (a *OAuth2ApiService) RevokeTokens(ctx context.Context) ApiRevokeTokensRequest { - return ApiRevokeTokensRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return Error -func (a *OAuth2ApiService) RevokeTokensExecute(r ApiRevokeTokensRequest) (*Error, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Error - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OAuth2ApiService.RevokeTokens") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/auth/oauth2/revoke" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.contentType != nil { - parameterAddToQuery(localVarQueryParams, "Content-Type", r.contentType, "") - } - // body params - localVarPostBody = r.revokeTokensRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} diff --git a/api_privileges.go b/api_privileges.go deleted file mode 100644 index 6dcf7f7..0000000 --- a/api_privileges.go +++ /dev/null @@ -1,1376 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "bytes" - "context" - "io/ioutil" - "net/http" - "net/url" - "strings" -) - - -// PrivilegesApiService PrivilegesApi service -type PrivilegesApiService service - -type ApiAddPrivilegeToRoleRequest struct { - ctx context.Context - ApiService *PrivilegesApiService - privilegeId string - addPrivilegeToRoleRequest *AddPrivilegeToRoleRequest -} - -func (r ApiAddPrivilegeToRoleRequest) AddPrivilegeToRoleRequest(addPrivilegeToRoleRequest AddPrivilegeToRoleRequest) ApiAddPrivilegeToRoleRequest { - r.addPrivilegeToRoleRequest = &addPrivilegeToRoleRequest - return r -} - -func (r ApiAddPrivilegeToRoleRequest) Execute() (*AddPrivilegeToRole201Response, *http.Response, error) { - return r.ApiService.AddPrivilegeToRoleExecute(r) -} - -/* -AddPrivilegeToRole Assign a Privilege to Roles - -Add roles to privilege - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param privilegeId - @return ApiAddPrivilegeToRoleRequest -*/ -func (a *PrivilegesApiService) AddPrivilegeToRole(ctx context.Context, privilegeId string) ApiAddPrivilegeToRoleRequest { - return ApiAddPrivilegeToRoleRequest{ - ApiService: a, - ctx: ctx, - privilegeId: privilegeId, - } -} - -// Execute executes the request -// @return AddPrivilegeToRole201Response -func (a *PrivilegesApiService) AddPrivilegeToRoleExecute(r ApiAddPrivilegeToRoleRequest) (*AddPrivilegeToRole201Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *AddPrivilegeToRole201Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PrivilegesApiService.AddPrivilegeToRole") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/1/privileges/{privilege_id}/roles" - localVarPath = strings.Replace(localVarPath, "{"+"privilege_id"+"}", url.PathEscape(parameterValueToString(r.privilegeId, "privilegeId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.addPrivilegeToRoleRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiAssignUsersToPrivilegeRequest struct { - ctx context.Context - ApiService *PrivilegesApiService - privilegeId string - assignUsersToPrivilegeRequest *AssignUsersToPrivilegeRequest -} - -func (r ApiAssignUsersToPrivilegeRequest) AssignUsersToPrivilegeRequest(assignUsersToPrivilegeRequest AssignUsersToPrivilegeRequest) ApiAssignUsersToPrivilegeRequest { - r.assignUsersToPrivilegeRequest = &assignUsersToPrivilegeRequest - return r -} - -func (r ApiAssignUsersToPrivilegeRequest) Execute() (*AddPrivilegeToRole201Response, *http.Response, error) { - return r.ApiService.AssignUsersToPrivilegeExecute(r) -} - -/* -AssignUsersToPrivilege Assign Users to a Privilege - -Assign Users to Privilege - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param privilegeId - @return ApiAssignUsersToPrivilegeRequest -*/ -func (a *PrivilegesApiService) AssignUsersToPrivilege(ctx context.Context, privilegeId string) ApiAssignUsersToPrivilegeRequest { - return ApiAssignUsersToPrivilegeRequest{ - ApiService: a, - ctx: ctx, - privilegeId: privilegeId, - } -} - -// Execute executes the request -// @return AddPrivilegeToRole201Response -func (a *PrivilegesApiService) AssignUsersToPrivilegeExecute(r ApiAssignUsersToPrivilegeRequest) (*AddPrivilegeToRole201Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *AddPrivilegeToRole201Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PrivilegesApiService.AssignUsersToPrivilege") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/1/privileges/{privilege_id}/users" - localVarPath = strings.Replace(localVarPath, "{"+"privilege_id"+"}", url.PathEscape(parameterValueToString(r.privilegeId, "privilegeId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.assignUsersToPrivilegeRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiCreatePrivilegeRequest struct { - ctx context.Context - ApiService *PrivilegesApiService - privilege *Privilege -} - -func (r ApiCreatePrivilegeRequest) Privilege(privilege Privilege) ApiCreatePrivilegeRequest { - r.privilege = &privilege - return r -} - -func (r ApiCreatePrivilegeRequest) Execute() (*CreatePrivilege200Response, *http.Response, error) { - return r.ApiService.CreatePrivilegeExecute(r) -} - -/* -CreatePrivilege Create a Privilege - -Create privilege - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiCreatePrivilegeRequest -*/ -func (a *PrivilegesApiService) CreatePrivilege(ctx context.Context) ApiCreatePrivilegeRequest { - return ApiCreatePrivilegeRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return CreatePrivilege200Response -func (a *PrivilegesApiService) CreatePrivilegeExecute(r ApiCreatePrivilegeRequest) (*CreatePrivilege200Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *CreatePrivilege200Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PrivilegesApiService.CreatePrivilege") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/1/privileges" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.privilege - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiDeletePrivilegeRequest struct { - ctx context.Context - ApiService *PrivilegesApiService - privilegeId string -} - -func (r ApiDeletePrivilegeRequest) Execute() (*http.Response, error) { - return r.ApiService.DeletePrivilegeExecute(r) -} - -/* -DeletePrivilege Delete a Privilege - -Delete - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param privilegeId - @return ApiDeletePrivilegeRequest -*/ -func (a *PrivilegesApiService) DeletePrivilege(ctx context.Context, privilegeId string) ApiDeletePrivilegeRequest { - return ApiDeletePrivilegeRequest{ - ApiService: a, - ctx: ctx, - privilegeId: privilegeId, - } -} - -// Execute executes the request -func (a *PrivilegesApiService) DeletePrivilegeExecute(r ApiDeletePrivilegeRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PrivilegesApiService.DeletePrivilege") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/1/privileges/{privilege_id}" - localVarPath = strings.Replace(localVarPath, "{"+"privilege_id"+"}", url.PathEscape(parameterValueToString(r.privilegeId, "privilegeId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiDeleteRoleFromPrivilegeRequest struct { - ctx context.Context - ApiService *PrivilegesApiService - privilegeId string - roleId string -} - -func (r ApiDeleteRoleFromPrivilegeRequest) Execute() (*http.Response, error) { - return r.ApiService.DeleteRoleFromPrivilegeExecute(r) -} - -/* -DeleteRoleFromPrivilege Remove a Privilege from a Role - -Add roles to privilege - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param privilegeId - @param roleId Set to the id of the role you want to return. - @return ApiDeleteRoleFromPrivilegeRequest -*/ -func (a *PrivilegesApiService) DeleteRoleFromPrivilege(ctx context.Context, privilegeId string, roleId string) ApiDeleteRoleFromPrivilegeRequest { - return ApiDeleteRoleFromPrivilegeRequest{ - ApiService: a, - ctx: ctx, - privilegeId: privilegeId, - roleId: roleId, - } -} - -// Execute executes the request -func (a *PrivilegesApiService) DeleteRoleFromPrivilegeExecute(r ApiDeleteRoleFromPrivilegeRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PrivilegesApiService.DeleteRoleFromPrivilege") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/1/privileges/{privilege_id}/roles/{role_id}" - localVarPath = strings.Replace(localVarPath, "{"+"privilege_id"+"}", url.PathEscape(parameterValueToString(r.privilegeId, "privilegeId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"role_id"+"}", url.PathEscape(parameterValueToString(r.roleId, "roleId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiGetAssignedUserRequest struct { - ctx context.Context - ApiService *PrivilegesApiService - privilegeId string -} - -func (r ApiGetAssignedUserRequest) Execute() (*GetAssignedUser200Response, *http.Response, error) { - return r.ApiService.GetAssignedUserExecute(r) -} - -/* -GetAssignedUser Get Users assigned to a Privilege - -Get Assigned Users - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param privilegeId - @return ApiGetAssignedUserRequest -*/ -func (a *PrivilegesApiService) GetAssignedUser(ctx context.Context, privilegeId string) ApiGetAssignedUserRequest { - return ApiGetAssignedUserRequest{ - ApiService: a, - ctx: ctx, - privilegeId: privilegeId, - } -} - -// Execute executes the request -// @return GetAssignedUser200Response -func (a *PrivilegesApiService) GetAssignedUserExecute(r ApiGetAssignedUserRequest) (*GetAssignedUser200Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetAssignedUser200Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PrivilegesApiService.GetAssignedUser") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/1/privileges/{privilege_id}/users" - localVarPath = strings.Replace(localVarPath, "{"+"privilege_id"+"}", url.PathEscape(parameterValueToString(r.privilegeId, "privilegeId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetPrivilegeRequest struct { - ctx context.Context - ApiService *PrivilegesApiService - privilegeId string -} - -func (r ApiGetPrivilegeRequest) Execute() (*Privilege, *http.Response, error) { - return r.ApiService.GetPrivilegeExecute(r) -} - -/* -GetPrivilege Get a Privilege - -Get a Privilige - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param privilegeId - @return ApiGetPrivilegeRequest -*/ -func (a *PrivilegesApiService) GetPrivilege(ctx context.Context, privilegeId string) ApiGetPrivilegeRequest { - return ApiGetPrivilegeRequest{ - ApiService: a, - ctx: ctx, - privilegeId: privilegeId, - } -} - -// Execute executes the request -// @return Privilege -func (a *PrivilegesApiService) GetPrivilegeExecute(r ApiGetPrivilegeRequest) (*Privilege, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Privilege - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PrivilegesApiService.GetPrivilege") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/1/privileges/{privilege_id}" - localVarPath = strings.Replace(localVarPath, "{"+"privilege_id"+"}", url.PathEscape(parameterValueToString(r.privilegeId, "privilegeId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiListPrivelegeRolesRequest struct { - ctx context.Context - ApiService *PrivilegesApiService - privilegeId string -} - -func (r ApiListPrivelegeRolesRequest) Execute() (*ListPrivelegeRoles200Response, *http.Response, error) { - return r.ApiService.ListPrivelegeRolesExecute(r) -} - -/* -ListPrivelegeRoles Get Roles assigned to Privilege - -List roles for privilege - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param privilegeId - @return ApiListPrivelegeRolesRequest -*/ -func (a *PrivilegesApiService) ListPrivelegeRoles(ctx context.Context, privilegeId string) ApiListPrivelegeRolesRequest { - return ApiListPrivelegeRolesRequest{ - ApiService: a, - ctx: ctx, - privilegeId: privilegeId, - } -} - -// Execute executes the request -// @return ListPrivelegeRoles200Response -func (a *PrivilegesApiService) ListPrivelegeRolesExecute(r ApiListPrivelegeRolesRequest) (*ListPrivelegeRoles200Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ListPrivelegeRoles200Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PrivilegesApiService.ListPrivelegeRoles") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/1/privileges/{privilege_id}/roles" - localVarPath = strings.Replace(localVarPath, "{"+"privilege_id"+"}", url.PathEscape(parameterValueToString(r.privilegeId, "privilegeId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiListPrivelegesRequest struct { - ctx context.Context - ApiService *PrivilegesApiService -} - -func (r ApiListPrivelegesRequest) Execute() ([]Privilege, *http.Response, error) { - return r.ApiService.ListPrivelegesExecute(r) -} - -/* -ListPriveleges List Privileges - -List Privileges - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiListPrivelegesRequest -*/ -func (a *PrivilegesApiService) ListPriveleges(ctx context.Context) ApiListPrivelegesRequest { - return ApiListPrivelegesRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return []Privilege -func (a *PrivilegesApiService) ListPrivelegesExecute(r ApiListPrivelegesRequest) ([]Privilege, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []Privilege - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PrivilegesApiService.ListPriveleges") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/1/privileges" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiRemoveUserFromPrivilegeRequest struct { - ctx context.Context - ApiService *PrivilegesApiService - privilegeId string - userId int32 -} - -func (r ApiRemoveUserFromPrivilegeRequest) Execute() (*http.Response, error) { - return r.ApiService.RemoveUserFromPrivilegeExecute(r) -} - -/* -RemoveUserFromPrivilege Remove a Privilege from Users - -Remove a Privilege from Users - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param privilegeId - @param userId Set to the id of the user that you want to return. - @return ApiRemoveUserFromPrivilegeRequest -*/ -func (a *PrivilegesApiService) RemoveUserFromPrivilege(ctx context.Context, privilegeId string, userId int32) ApiRemoveUserFromPrivilegeRequest { - return ApiRemoveUserFromPrivilegeRequest{ - ApiService: a, - ctx: ctx, - privilegeId: privilegeId, - userId: userId, - } -} - -// Execute executes the request -func (a *PrivilegesApiService) RemoveUserFromPrivilegeExecute(r ApiRemoveUserFromPrivilegeRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PrivilegesApiService.RemoveUserFromPrivilege") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/1/privileges/{privilege_id}/users/{user_id}" - localVarPath = strings.Replace(localVarPath, "{"+"privilege_id"+"}", url.PathEscape(parameterValueToString(r.privilegeId, "privilegeId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiUpdatePrivilegeRequest struct { - ctx context.Context - ApiService *PrivilegesApiService - privilegeId string - privilege *Privilege -} - -func (r ApiUpdatePrivilegeRequest) Privilege(privilege Privilege) ApiUpdatePrivilegeRequest { - r.privilege = &privilege - return r -} - -func (r ApiUpdatePrivilegeRequest) Execute() (*UpdatePrivilege200Response, *http.Response, error) { - return r.ApiService.UpdatePrivilegeExecute(r) -} - -/* -UpdatePrivilege Update a Privilege - -Update privilege - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param privilegeId - @return ApiUpdatePrivilegeRequest -*/ -func (a *PrivilegesApiService) UpdatePrivilege(ctx context.Context, privilegeId string) ApiUpdatePrivilegeRequest { - return ApiUpdatePrivilegeRequest{ - ApiService: a, - ctx: ctx, - privilegeId: privilegeId, - } -} - -// Execute executes the request -// @return UpdatePrivilege200Response -func (a *PrivilegesApiService) UpdatePrivilegeExecute(r ApiUpdatePrivilegeRequest) (*UpdatePrivilege200Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *UpdatePrivilege200Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PrivilegesApiService.UpdatePrivilege") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/1/privileges/{privilege_id}" - localVarPath = strings.Replace(localVarPath, "{"+"privilege_id"+"}", url.PathEscape(parameterValueToString(r.privilegeId, "privilegeId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.privilege - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} diff --git a/api_roles.go b/api_roles.go deleted file mode 100644 index 46b6331..0000000 --- a/api_roles.go +++ /dev/null @@ -1,2129 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "bytes" - "context" - "io/ioutil" - "net/http" - "net/url" - "strings" -) - - -// RolesApiService RolesApi service -type RolesApiService service - -type ApiAddRoleAdminsRequest struct { - ctx context.Context - ApiService *RolesApiService - roleId string - requestBody *[]int32 -} - -func (r ApiAddRoleAdminsRequest) RequestBody(requestBody []int32) ApiAddRoleAdminsRequest { - r.requestBody = &requestBody - return r -} - -func (r ApiAddRoleAdminsRequest) Execute() ([]CreateRole201ResponseInner, *http.Response, error) { - return r.ApiService.AddRoleAdminsExecute(r) -} - -/* -AddRoleAdmins Add Role Admins - -Add Role Admins - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param roleId Set to the id of the role you want to return. - @return ApiAddRoleAdminsRequest -*/ -func (a *RolesApiService) AddRoleAdmins(ctx context.Context, roleId string) ApiAddRoleAdminsRequest { - return ApiAddRoleAdminsRequest{ - ApiService: a, - ctx: ctx, - roleId: roleId, - } -} - -// Execute executes the request -// @return []CreateRole201ResponseInner -func (a *RolesApiService) AddRoleAdminsExecute(r ApiAddRoleAdminsRequest) ([]CreateRole201ResponseInner, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []CreateRole201ResponseInner - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RolesApiService.AddRoleAdmins") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/roles/{role_id}/admins" - localVarPath = strings.Replace(localVarPath, "{"+"role_id"+"}", url.PathEscape(parameterValueToString(r.roleId, "roleId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.requestBody == nil { - return localVarReturnValue, nil, reportError("requestBody is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.requestBody - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiAddRoleUsersRequest struct { - ctx context.Context - ApiService *RolesApiService - roleId string - requestBody *[]int32 -} - -func (r ApiAddRoleUsersRequest) RequestBody(requestBody []int32) ApiAddRoleUsersRequest { - r.requestBody = &requestBody - return r -} - -func (r ApiAddRoleUsersRequest) Execute() ([]CreateRole201ResponseInner, *http.Response, error) { - return r.ApiService.AddRoleUsersExecute(r) -} - -/* -AddRoleUsers Add Role Users - -Add Role Users - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param roleId Set to the id of the role you want to return. - @return ApiAddRoleUsersRequest -*/ -func (a *RolesApiService) AddRoleUsers(ctx context.Context, roleId string) ApiAddRoleUsersRequest { - return ApiAddRoleUsersRequest{ - ApiService: a, - ctx: ctx, - roleId: roleId, - } -} - -// Execute executes the request -// @return []CreateRole201ResponseInner -func (a *RolesApiService) AddRoleUsersExecute(r ApiAddRoleUsersRequest) ([]CreateRole201ResponseInner, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []CreateRole201ResponseInner - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RolesApiService.AddRoleUsers") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/roles/{role_id}/users" - localVarPath = strings.Replace(localVarPath, "{"+"role_id"+"}", url.PathEscape(parameterValueToString(r.roleId, "roleId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.requestBody == nil { - return localVarReturnValue, nil, reportError("requestBody is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.requestBody - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiCreateRoleRequest struct { - ctx context.Context - ApiService *RolesApiService - role *Role -} - -func (r ApiCreateRoleRequest) Role(role Role) ApiCreateRoleRequest { - r.role = &role - return r -} - -func (r ApiCreateRoleRequest) Execute() ([]CreateRole201ResponseInner, *http.Response, error) { - return r.ApiService.CreateRoleExecute(r) -} - -/* -CreateRole Create Role - -Create Role - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiCreateRoleRequest -*/ -func (a *RolesApiService) CreateRole(ctx context.Context) ApiCreateRoleRequest { - return ApiCreateRoleRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return []CreateRole201ResponseInner -func (a *RolesApiService) CreateRoleExecute(r ApiCreateRoleRequest) ([]CreateRole201ResponseInner, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []CreateRole201ResponseInner - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RolesApiService.CreateRole") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/roles" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.role - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiDeleteRoleRequest struct { - ctx context.Context - ApiService *RolesApiService - roleId string -} - -func (r ApiDeleteRoleRequest) Execute() (*http.Response, error) { - return r.ApiService.DeleteRoleExecute(r) -} - -/* -DeleteRole Delete Role by ID - -Delete Role - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param roleId Set to the id of the role you want to return. - @return ApiDeleteRoleRequest -*/ -func (a *RolesApiService) DeleteRole(ctx context.Context, roleId string) ApiDeleteRoleRequest { - return ApiDeleteRoleRequest{ - ApiService: a, - ctx: ctx, - roleId: roleId, - } -} - -// Execute executes the request -func (a *RolesApiService) DeleteRoleExecute(r ApiDeleteRoleRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RolesApiService.DeleteRole") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/roles/{role_id}" - localVarPath = strings.Replace(localVarPath, "{"+"role_id"+"}", url.PathEscape(parameterValueToString(r.roleId, "roleId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiGetRoleRequest struct { - ctx context.Context - ApiService *RolesApiService - roleId string -} - -func (r ApiGetRoleRequest) Execute() (*Role, *http.Response, error) { - return r.ApiService.GetRoleExecute(r) -} - -/* -GetRole Get Role by ID - -Get Role - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param roleId Set to the id of the role you want to return. - @return ApiGetRoleRequest -*/ -func (a *RolesApiService) GetRole(ctx context.Context, roleId string) ApiGetRoleRequest { - return ApiGetRoleRequest{ - ApiService: a, - ctx: ctx, - roleId: roleId, - } -} - -// Execute executes the request -// @return Role -func (a *RolesApiService) GetRoleExecute(r ApiGetRoleRequest) (*Role, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Role - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RolesApiService.GetRole") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/roles/{role_id}" - localVarPath = strings.Replace(localVarPath, "{"+"role_id"+"}", url.PathEscape(parameterValueToString(r.roleId, "roleId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetRoleAdminsRequest struct { - ctx context.Context - ApiService *RolesApiService - roleId string - limit *int32 - page *int32 - cursor *string - name *string - includeUnassigned *bool -} - -// How many items to return at one time (max 100) -func (r ApiGetRoleAdminsRequest) Limit(limit int32) ApiGetRoleAdminsRequest { - r.limit = &limit - return r -} - -// The page number of results to return. -func (r ApiGetRoleAdminsRequest) Page(page int32) ApiGetRoleAdminsRequest { - r.page = &page - return r -} - -// Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. -func (r ApiGetRoleAdminsRequest) Cursor(cursor string) ApiGetRoleAdminsRequest { - r.cursor = &cursor - return r -} - -// Allows you to filter on first name, last name, username, and email address. -func (r ApiGetRoleAdminsRequest) Name(name string) ApiGetRoleAdminsRequest { - r.name = &name - return r -} - -// Optional. Defaults to false. Include users that aren’t assigned to the role. -func (r ApiGetRoleAdminsRequest) IncludeUnassigned(includeUnassigned bool) ApiGetRoleAdminsRequest { - r.includeUnassigned = &includeUnassigned - return r -} - -func (r ApiGetRoleAdminsRequest) Execute() ([]User, *http.Response, error) { - return r.ApiService.GetRoleAdminsExecute(r) -} - -/* -GetRoleAdmins Get Role Admins - -Get Role Admins - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param roleId Set to the id of the role you want to return. - @return ApiGetRoleAdminsRequest -*/ -func (a *RolesApiService) GetRoleAdmins(ctx context.Context, roleId string) ApiGetRoleAdminsRequest { - return ApiGetRoleAdminsRequest{ - ApiService: a, - ctx: ctx, - roleId: roleId, - } -} - -// Execute executes the request -// @return []User -func (a *RolesApiService) GetRoleAdminsExecute(r ApiGetRoleAdminsRequest) ([]User, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []User - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RolesApiService.GetRoleAdmins") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/roles/{role_id}/admins" - localVarPath = strings.Replace(localVarPath, "{"+"role_id"+"}", url.PathEscape(parameterValueToString(r.roleId, "roleId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - if r.limit != nil { - parameterAddToQuery(localVarQueryParams, "limit", r.limit, "") - } - if r.page != nil { - parameterAddToQuery(localVarQueryParams, "page", r.page, "") - } - if r.cursor != nil { - parameterAddToQuery(localVarQueryParams, "cursor", r.cursor, "") - } - if r.name != nil { - parameterAddToQuery(localVarQueryParams, "name", r.name, "") - } - if r.includeUnassigned != nil { - parameterAddToQuery(localVarQueryParams, "include_unassigned", r.includeUnassigned, "") - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"applcation/json", "application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetRoleAppsRequest struct { - ctx context.Context - ApiService *RolesApiService - roleId string - limit *int32 - page *int32 - cursor *string - assigned *bool -} - -// How many items to return at one time (max 100) -func (r ApiGetRoleAppsRequest) Limit(limit int32) ApiGetRoleAppsRequest { - r.limit = &limit - return r -} - -// The page number of results to return. -func (r ApiGetRoleAppsRequest) Page(page int32) ApiGetRoleAppsRequest { - r.page = &page - return r -} - -// Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. -func (r ApiGetRoleAppsRequest) Cursor(cursor string) ApiGetRoleAppsRequest { - r.cursor = &cursor - return r -} - -// Optional. Defaults to true. Returns all apps not yet assigned to the role. -func (r ApiGetRoleAppsRequest) Assigned(assigned bool) ApiGetRoleAppsRequest { - r.assigned = &assigned - return r -} - -func (r ApiGetRoleAppsRequest) Execute() ([]GetRoleApps200ResponseInner, *http.Response, error) { - return r.ApiService.GetRoleAppsExecute(r) -} - -/* -GetRoleApps Get all Apps assigned to Role - -Get Role Apps - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param roleId Set to the id of the role you want to return. - @return ApiGetRoleAppsRequest -*/ -func (a *RolesApiService) GetRoleApps(ctx context.Context, roleId string) ApiGetRoleAppsRequest { - return ApiGetRoleAppsRequest{ - ApiService: a, - ctx: ctx, - roleId: roleId, - } -} - -// Execute executes the request -// @return []GetRoleApps200ResponseInner -func (a *RolesApiService) GetRoleAppsExecute(r ApiGetRoleAppsRequest) ([]GetRoleApps200ResponseInner, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []GetRoleApps200ResponseInner - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RolesApiService.GetRoleApps") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/roles/{role_id}/apps" - localVarPath = strings.Replace(localVarPath, "{"+"role_id"+"}", url.PathEscape(parameterValueToString(r.roleId, "roleId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - if r.limit != nil { - parameterAddToQuery(localVarQueryParams, "limit", r.limit, "") - } - if r.page != nil { - parameterAddToQuery(localVarQueryParams, "page", r.page, "") - } - if r.cursor != nil { - parameterAddToQuery(localVarQueryParams, "cursor", r.cursor, "") - } - if r.assigned != nil { - parameterAddToQuery(localVarQueryParams, "assigned", r.assigned, "") - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"applcation/json", "application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetRoleByIdRequest struct { - ctx context.Context - ApiService *RolesApiService - roleId string -} - -func (r ApiGetRoleByIdRequest) Execute() (*GetRoleById200Response, *http.Response, error) { - return r.ApiService.GetRoleByIdExecute(r) -} - -/* -GetRoleById Get Role by ID - -Get Role By ID - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param roleId Set to the id of the role you want to return. - @return ApiGetRoleByIdRequest -*/ -func (a *RolesApiService) GetRoleById(ctx context.Context, roleId string) ApiGetRoleByIdRequest { - return ApiGetRoleByIdRequest{ - ApiService: a, - ctx: ctx, - roleId: roleId, - } -} - -// Execute executes the request -// @return GetRoleById200Response -func (a *RolesApiService) GetRoleByIdExecute(r ApiGetRoleByIdRequest) (*GetRoleById200Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetRoleById200Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RolesApiService.GetRoleById") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/1/roles/{role_id}" - localVarPath = strings.Replace(localVarPath, "{"+"role_id"+"}", url.PathEscape(parameterValueToString(r.roleId, "roleId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetRoleByNameRequest struct { - ctx context.Context - ApiService *RolesApiService - name *string -} - -func (r ApiGetRoleByNameRequest) Name(name string) ApiGetRoleByNameRequest { - r.name = &name - return r -} - -func (r ApiGetRoleByNameRequest) Execute() (*GetRoleByName200Response, *http.Response, error) { - return r.ApiService.GetRoleByNameExecute(r) -} - -/* -GetRoleByName Get Role by Name - -Get Role by Name - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetRoleByNameRequest -*/ -func (a *RolesApiService) GetRoleByName(ctx context.Context) ApiGetRoleByNameRequest { - return ApiGetRoleByNameRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return GetRoleByName200Response -func (a *RolesApiService) GetRoleByNameExecute(r ApiGetRoleByNameRequest) (*GetRoleByName200Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetRoleByName200Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RolesApiService.GetRoleByName") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/1/roles" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - if r.name != nil { - parameterAddToQuery(localVarQueryParams, "name", r.name, "") - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetRoleUsersRequest struct { - ctx context.Context - ApiService *RolesApiService - roleId string - limit *int32 - page *int32 - cursor *string - name *string - includeUnassigned *bool -} - -// How many items to return at one time (max 100) -func (r ApiGetRoleUsersRequest) Limit(limit int32) ApiGetRoleUsersRequest { - r.limit = &limit - return r -} - -// The page number of results to return. -func (r ApiGetRoleUsersRequest) Page(page int32) ApiGetRoleUsersRequest { - r.page = &page - return r -} - -// Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. -func (r ApiGetRoleUsersRequest) Cursor(cursor string) ApiGetRoleUsersRequest { - r.cursor = &cursor - return r -} - -// Allows you to filter on first name, last name, username, and email address. -func (r ApiGetRoleUsersRequest) Name(name string) ApiGetRoleUsersRequest { - r.name = &name - return r -} - -// Optional. Defaults to false. Include users that aren’t assigned to the role. -func (r ApiGetRoleUsersRequest) IncludeUnassigned(includeUnassigned bool) ApiGetRoleUsersRequest { - r.includeUnassigned = &includeUnassigned - return r -} - -func (r ApiGetRoleUsersRequest) Execute() ([]User, *http.Response, error) { - return r.ApiService.GetRoleUsersExecute(r) -} - -/* -GetRoleUsers Get Role Users - -Get Role Users - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param roleId Set to the id of the role you want to return. - @return ApiGetRoleUsersRequest -*/ -func (a *RolesApiService) GetRoleUsers(ctx context.Context, roleId string) ApiGetRoleUsersRequest { - return ApiGetRoleUsersRequest{ - ApiService: a, - ctx: ctx, - roleId: roleId, - } -} - -// Execute executes the request -// @return []User -func (a *RolesApiService) GetRoleUsersExecute(r ApiGetRoleUsersRequest) ([]User, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []User - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RolesApiService.GetRoleUsers") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/roles/{role_id}/users" - localVarPath = strings.Replace(localVarPath, "{"+"role_id"+"}", url.PathEscape(parameterValueToString(r.roleId, "roleId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - if r.limit != nil { - parameterAddToQuery(localVarQueryParams, "limit", r.limit, "") - } - if r.page != nil { - parameterAddToQuery(localVarQueryParams, "page", r.page, "") - } - if r.cursor != nil { - parameterAddToQuery(localVarQueryParams, "cursor", r.cursor, "") - } - if r.name != nil { - parameterAddToQuery(localVarQueryParams, "name", r.name, "") - } - if r.includeUnassigned != nil { - parameterAddToQuery(localVarQueryParams, "include_unassigned", r.includeUnassigned, "") - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"applcation/json", "application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiListRolesRequest struct { - ctx context.Context - ApiService *RolesApiService - appId *int32 - limit *int32 - page *int32 - cursor *string - roleName *string - appName *string - fields *string -} - -func (r ApiListRolesRequest) AppId(appId int32) ApiListRolesRequest { - r.appId = &appId - return r -} - -// How many items to return at one time (max 100) -func (r ApiListRolesRequest) Limit(limit int32) ApiListRolesRequest { - r.limit = &limit - return r -} - -// The page number of results to return. -func (r ApiListRolesRequest) Page(page int32) ApiListRolesRequest { - r.page = &page - return r -} - -// Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. -func (r ApiListRolesRequest) Cursor(cursor string) ApiListRolesRequest { - r.cursor = &cursor - return r -} - -// Optional. Filters by role name. -func (r ApiListRolesRequest) RoleName(roleName string) ApiListRolesRequest { - r.roleName = &roleName - return r -} - -// Optional. Returns roles that contain this app name. -func (r ApiListRolesRequest) AppName(appName string) ApiListRolesRequest { - r.appName = &appName - return r -} - -// Optional. Comma delimited list of fields to return. -func (r ApiListRolesRequest) Fields(fields string) ApiListRolesRequest { - r.fields = &fields - return r -} - -func (r ApiListRolesRequest) Execute() ([]Role, *http.Response, error) { - return r.ApiService.ListRolesExecute(r) -} - -/* -ListRoles List Roles - -List Roles - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiListRolesRequest -*/ -func (a *RolesApiService) ListRoles(ctx context.Context) ApiListRolesRequest { - return ApiListRolesRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return []Role -func (a *RolesApiService) ListRolesExecute(r ApiListRolesRequest) ([]Role, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []Role - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RolesApiService.ListRoles") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/roles" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.appId == nil { - return localVarReturnValue, nil, reportError("appId is required and must be specified") - } - - if r.limit != nil { - parameterAddToQuery(localVarQueryParams, "limit", r.limit, "") - } - if r.page != nil { - parameterAddToQuery(localVarQueryParams, "page", r.page, "") - } - if r.cursor != nil { - parameterAddToQuery(localVarQueryParams, "cursor", r.cursor, "") - } - if r.roleName != nil { - parameterAddToQuery(localVarQueryParams, "role_name", r.roleName, "") - } - parameterAddToQuery(localVarQueryParams, "app_id", r.appId, "") - if r.appName != nil { - parameterAddToQuery(localVarQueryParams, "app_name", r.appName, "") - } - if r.fields != nil { - parameterAddToQuery(localVarQueryParams, "fields", r.fields, "") - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiRemoveRoleAdminsRequest struct { - ctx context.Context - ApiService *RolesApiService - roleId string - removeRoleUsersRequest *RemoveRoleUsersRequest -} - -func (r ApiRemoveRoleAdminsRequest) RemoveRoleUsersRequest(removeRoleUsersRequest RemoveRoleUsersRequest) ApiRemoveRoleAdminsRequest { - r.removeRoleUsersRequest = &removeRoleUsersRequest - return r -} - -func (r ApiRemoveRoleAdminsRequest) Execute() (*http.Response, error) { - return r.ApiService.RemoveRoleAdminsExecute(r) -} - -/* -RemoveRoleAdmins Remove Role Admins - -Remove Role Admins - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param roleId Set to the id of the role you want to return. - @return ApiRemoveRoleAdminsRequest -*/ -func (a *RolesApiService) RemoveRoleAdmins(ctx context.Context, roleId string) ApiRemoveRoleAdminsRequest { - return ApiRemoveRoleAdminsRequest{ - ApiService: a, - ctx: ctx, - roleId: roleId, - } -} - -// Execute executes the request -func (a *RolesApiService) RemoveRoleAdminsExecute(r ApiRemoveRoleAdminsRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RolesApiService.RemoveRoleAdmins") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/roles/{role_id}/admins" - localVarPath = strings.Replace(localVarPath, "{"+"role_id"+"}", url.PathEscape(parameterValueToString(r.roleId, "roleId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.removeRoleUsersRequest == nil { - return nil, reportError("removeRoleUsersRequest is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.removeRoleUsersRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiRemoveRoleUsersRequest struct { - ctx context.Context - ApiService *RolesApiService - roleId string - removeRoleUsersRequest *RemoveRoleUsersRequest -} - -func (r ApiRemoveRoleUsersRequest) RemoveRoleUsersRequest(removeRoleUsersRequest RemoveRoleUsersRequest) ApiRemoveRoleUsersRequest { - r.removeRoleUsersRequest = &removeRoleUsersRequest - return r -} - -func (r ApiRemoveRoleUsersRequest) Execute() (*http.Response, error) { - return r.ApiService.RemoveRoleUsersExecute(r) -} - -/* -RemoveRoleUsers Remove Role Users - -Remove Role Users - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param roleId Set to the id of the role you want to return. - @return ApiRemoveRoleUsersRequest -*/ -func (a *RolesApiService) RemoveRoleUsers(ctx context.Context, roleId string) ApiRemoveRoleUsersRequest { - return ApiRemoveRoleUsersRequest{ - ApiService: a, - ctx: ctx, - roleId: roleId, - } -} - -// Execute executes the request -func (a *RolesApiService) RemoveRoleUsersExecute(r ApiRemoveRoleUsersRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RolesApiService.RemoveRoleUsers") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/roles/{role_id}/users" - localVarPath = strings.Replace(localVarPath, "{"+"role_id"+"}", url.PathEscape(parameterValueToString(r.roleId, "roleId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.removeRoleUsersRequest == nil { - return nil, reportError("removeRoleUsersRequest is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.removeRoleUsersRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiSetRoleAppsRequest struct { - ctx context.Context - ApiService *RolesApiService - roleId string - requestBody *[]int32 -} - -func (r ApiSetRoleAppsRequest) RequestBody(requestBody []int32) ApiSetRoleAppsRequest { - r.requestBody = &requestBody - return r -} - -func (r ApiSetRoleAppsRequest) Execute() ([]CreateRole201ResponseInner, *http.Response, error) { - return r.ApiService.SetRoleAppsExecute(r) -} - -/* -SetRoleApps Set Role Apps - -Set Role Apps - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param roleId Set to the id of the role you want to return. - @return ApiSetRoleAppsRequest -*/ -func (a *RolesApiService) SetRoleApps(ctx context.Context, roleId string) ApiSetRoleAppsRequest { - return ApiSetRoleAppsRequest{ - ApiService: a, - ctx: ctx, - roleId: roleId, - } -} - -// Execute executes the request -// @return []CreateRole201ResponseInner -func (a *RolesApiService) SetRoleAppsExecute(r ApiSetRoleAppsRequest) ([]CreateRole201ResponseInner, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []CreateRole201ResponseInner - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RolesApiService.SetRoleApps") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/roles/{role_id}/apps" - localVarPath = strings.Replace(localVarPath, "{"+"role_id"+"}", url.PathEscape(parameterValueToString(r.roleId, "roleId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.requestBody == nil { - return localVarReturnValue, nil, reportError("requestBody is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.requestBody - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiUpdateRoleRequest struct { - ctx context.Context - ApiService *RolesApiService - roleId string - role *Role -} - -func (r ApiUpdateRoleRequest) Role(role Role) ApiUpdateRoleRequest { - r.role = &role - return r -} - -func (r ApiUpdateRoleRequest) Execute() (*UpdateRole200Response, *http.Response, error) { - return r.ApiService.UpdateRoleExecute(r) -} - -/* -UpdateRole Update Role - -Update Role - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param roleId Set to the id of the role you want to return. - @return ApiUpdateRoleRequest -*/ -func (a *RolesApiService) UpdateRole(ctx context.Context, roleId string) ApiUpdateRoleRequest { - return ApiUpdateRoleRequest{ - ApiService: a, - ctx: ctx, - roleId: roleId, - } -} - -// Execute executes the request -// @return UpdateRole200Response -func (a *RolesApiService) UpdateRoleExecute(r ApiUpdateRoleRequest) (*UpdateRole200Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *UpdateRole200Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RolesApiService.UpdateRole") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/roles/{role_id}" - localVarPath = strings.Replace(localVarPath, "{"+"role_id"+"}", url.PathEscape(parameterValueToString(r.roleId, "roleId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.role - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} diff --git a/api_saml_assertions.go b/api_saml_assertions.go deleted file mode 100644 index fed2a89..0000000 --- a/api_saml_assertions.go +++ /dev/null @@ -1,593 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "bytes" - "context" - "io/ioutil" - "net/http" - "net/url" -) - - -// SAMLAssertionsApiService SAMLAssertionsApi service -type SAMLAssertionsApiService service - -type ApiGenerateSamlAssertRequest struct { - ctx context.Context - ApiService *SAMLAssertionsApiService - contentType *string - samlAssert *SamlAssert -} - -func (r ApiGenerateSamlAssertRequest) ContentType(contentType string) ApiGenerateSamlAssertRequest { - r.contentType = &contentType - return r -} - -func (r ApiGenerateSamlAssertRequest) SamlAssert(samlAssert SamlAssert) ApiGenerateSamlAssertRequest { - r.samlAssert = &samlAssert - return r -} - -func (r ApiGenerateSamlAssertRequest) Execute() (*GenerateSamlAssert200Response, *http.Response, error) { - return r.ApiService.GenerateSamlAssertExecute(r) -} - -/* -GenerateSamlAssert Generate SAML Assertion - -Generate SAML Assertion - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGenerateSamlAssertRequest -*/ -func (a *SAMLAssertionsApiService) GenerateSamlAssert(ctx context.Context) ApiGenerateSamlAssertRequest { - return ApiGenerateSamlAssertRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return GenerateSamlAssert200Response -func (a *SAMLAssertionsApiService) GenerateSamlAssertExecute(r ApiGenerateSamlAssertRequest) (*GenerateSamlAssert200Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GenerateSamlAssert200Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SAMLAssertionsApiService.GenerateSamlAssert") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/1/saml_assertion" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.contentType != nil { - parameterAddToQuery(localVarQueryParams, "Content-Type", r.contentType, "") - } - // body params - localVarPostBody = r.samlAssert - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGenerateSamlAssert2Request struct { - ctx context.Context - ApiService *SAMLAssertionsApiService - contentType *string - samlAssert *SamlAssert -} - -func (r ApiGenerateSamlAssert2Request) ContentType(contentType string) ApiGenerateSamlAssert2Request { - r.contentType = &contentType - return r -} - -func (r ApiGenerateSamlAssert2Request) SamlAssert(samlAssert SamlAssert) ApiGenerateSamlAssert2Request { - r.samlAssert = &samlAssert - return r -} - -func (r ApiGenerateSamlAssert2Request) Execute() (*GenerateSamlAssert200Response, *http.Response, error) { - return r.ApiService.GenerateSamlAssert2Execute(r) -} - -/* -GenerateSamlAssert2 Generate SAML Assertion - -Generate SAML Assertion - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGenerateSamlAssert2Request -*/ -func (a *SAMLAssertionsApiService) GenerateSamlAssert2(ctx context.Context) ApiGenerateSamlAssert2Request { - return ApiGenerateSamlAssert2Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return GenerateSamlAssert200Response -func (a *SAMLAssertionsApiService) GenerateSamlAssert2Execute(r ApiGenerateSamlAssert2Request) (*GenerateSamlAssert200Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GenerateSamlAssert200Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SAMLAssertionsApiService.GenerateSamlAssert2") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/saml_assertion" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.contentType != nil { - parameterAddToQuery(localVarQueryParams, "Content-Type", r.contentType, "") - } - // body params - localVarPostBody = r.samlAssert - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiVerFactorSamlRequest struct { - ctx context.Context - ApiService *SAMLAssertionsApiService - contentType *string - samlFactor *SamlFactor -} - -func (r ApiVerFactorSamlRequest) ContentType(contentType string) ApiVerFactorSamlRequest { - r.contentType = &contentType - return r -} - -func (r ApiVerFactorSamlRequest) SamlFactor(samlFactor SamlFactor) ApiVerFactorSamlRequest { - r.samlFactor = &samlFactor - return r -} - -func (r ApiVerFactorSamlRequest) Execute() (*VerFactorSaml200Response, *http.Response, error) { - return r.ApiService.VerFactorSamlExecute(r) -} - -/* -VerFactorSaml Verify Factor SAML - -Verify Factor: SAML - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiVerFactorSamlRequest -*/ -func (a *SAMLAssertionsApiService) VerFactorSaml(ctx context.Context) ApiVerFactorSamlRequest { - return ApiVerFactorSamlRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return VerFactorSaml200Response -func (a *SAMLAssertionsApiService) VerFactorSamlExecute(r ApiVerFactorSamlRequest) (*VerFactorSaml200Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *VerFactorSaml200Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SAMLAssertionsApiService.VerFactorSaml") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/1/saml_assertion/verify_factor" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.contentType != nil { - parameterAddToQuery(localVarQueryParams, "Content-Type", r.contentType, "") - } - // body params - localVarPostBody = r.samlFactor - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiVerFactorSaml2Request struct { - ctx context.Context - ApiService *SAMLAssertionsApiService - contentType *string - samlFactor *SamlFactor -} - -func (r ApiVerFactorSaml2Request) ContentType(contentType string) ApiVerFactorSaml2Request { - r.contentType = &contentType - return r -} - -func (r ApiVerFactorSaml2Request) SamlFactor(samlFactor SamlFactor) ApiVerFactorSaml2Request { - r.samlFactor = &samlFactor - return r -} - -func (r ApiVerFactorSaml2Request) Execute() (*VerFactorSaml200Response, *http.Response, error) { - return r.ApiService.VerFactorSaml2Execute(r) -} - -/* -VerFactorSaml2 Verify Factor SAML - -Verify Factor: SAML - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiVerFactorSaml2Request -*/ -func (a *SAMLAssertionsApiService) VerFactorSaml2(ctx context.Context) ApiVerFactorSaml2Request { - return ApiVerFactorSaml2Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return VerFactorSaml200Response -func (a *SAMLAssertionsApiService) VerFactorSaml2Execute(r ApiVerFactorSaml2Request) (*VerFactorSaml200Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *VerFactorSaml200Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SAMLAssertionsApiService.VerFactorSaml2") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/saml_assertion/verify_factor" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.contentType != nil { - parameterAddToQuery(localVarQueryParams, "Content-Type", r.contentType, "") - } - // body params - localVarPostBody = r.samlFactor - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} diff --git a/api_smart_hooks.go b/api_smart_hooks.go deleted file mode 100644 index 6facf62..0000000 --- a/api_smart_hooks.go +++ /dev/null @@ -1,1493 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "bytes" - "context" - "io/ioutil" - "net/http" - "net/url" - "strings" -) - - -// SmartHooksApiService SmartHooksApi service -type SmartHooksApiService service - -type ApiCreateEnvironmentVariableRequest struct { - ctx context.Context - ApiService *SmartHooksApiService - hookEnvvar *HookEnvvar -} - -func (r ApiCreateEnvironmentVariableRequest) HookEnvvar(hookEnvvar HookEnvvar) ApiCreateEnvironmentVariableRequest { - r.hookEnvvar = &hookEnvvar - return r -} - -func (r ApiCreateEnvironmentVariableRequest) Execute() (*HookEnvvar, *http.Response, error) { - return r.ApiService.CreateEnvironmentVariableExecute(r) -} - -/* -CreateEnvironmentVariable Create Environment Variable - -Create Environment Variable - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiCreateEnvironmentVariableRequest -*/ -func (a *SmartHooksApiService) CreateEnvironmentVariable(ctx context.Context) ApiCreateEnvironmentVariableRequest { - return ApiCreateEnvironmentVariableRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return HookEnvvar -func (a *SmartHooksApiService) CreateEnvironmentVariableExecute(r ApiCreateEnvironmentVariableRequest) (*HookEnvvar, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *HookEnvvar - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SmartHooksApiService.CreateEnvironmentVariable") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/hooks/envs" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.hookEnvvar == nil { - return localVarReturnValue, nil, reportError("hookEnvvar is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.hookEnvvar - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiCreateHookRequest struct { - ctx context.Context - ApiService *SmartHooksApiService - hook *Hook -} - -func (r ApiCreateHookRequest) Hook(hook Hook) ApiCreateHookRequest { - r.hook = &hook - return r -} - -func (r ApiCreateHookRequest) Execute() (*Hook, *http.Response, error) { - return r.ApiService.CreateHookExecute(r) -} - -/* -CreateHook Create Smart Hook - -Create Smart Hook - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiCreateHookRequest -*/ -func (a *SmartHooksApiService) CreateHook(ctx context.Context) ApiCreateHookRequest { - return ApiCreateHookRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return Hook -func (a *SmartHooksApiService) CreateHookExecute(r ApiCreateHookRequest) (*Hook, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Hook - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SmartHooksApiService.CreateHook") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/hooks" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.hook == nil { - return localVarReturnValue, nil, reportError("hook is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.hook - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 409 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v HookStatus - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiDeleteEnvironmentVariableRequest struct { - ctx context.Context - ApiService *SmartHooksApiService - envvarId string -} - -func (r ApiDeleteEnvironmentVariableRequest) Execute() (*http.Response, error) { - return r.ApiService.DeleteEnvironmentVariableExecute(r) -} - -/* -DeleteEnvironmentVariable Delete Environment Variable - -Delete Environment Variable - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param envvarId Set to the id of the Hook Environment Variable that you want to fetch. - @return ApiDeleteEnvironmentVariableRequest -*/ -func (a *SmartHooksApiService) DeleteEnvironmentVariable(ctx context.Context, envvarId string) ApiDeleteEnvironmentVariableRequest { - return ApiDeleteEnvironmentVariableRequest{ - ApiService: a, - ctx: ctx, - envvarId: envvarId, - } -} - -// Execute executes the request -func (a *SmartHooksApiService) DeleteEnvironmentVariableExecute(r ApiDeleteEnvironmentVariableRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SmartHooksApiService.DeleteEnvironmentVariable") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/hooks/envs/{envvar_id}" - localVarPath = strings.Replace(localVarPath, "{"+"envvar_id"+"}", url.PathEscape(parameterValueToString(r.envvarId, "envvarId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiDeleteHookRequest struct { - ctx context.Context - ApiService *SmartHooksApiService - hookId string -} - -func (r ApiDeleteHookRequest) Execute() (*http.Response, error) { - return r.ApiService.DeleteHookExecute(r) -} - -/* -DeleteHook Delete Smart Hook by ID - -Delete Smart Hook - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param hookId Set to the id of the Hook that you want to return. - @return ApiDeleteHookRequest -*/ -func (a *SmartHooksApiService) DeleteHook(ctx context.Context, hookId string) ApiDeleteHookRequest { - return ApiDeleteHookRequest{ - ApiService: a, - ctx: ctx, - hookId: hookId, - } -} - -// Execute executes the request -func (a *SmartHooksApiService) DeleteHookExecute(r ApiDeleteHookRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SmartHooksApiService.DeleteHook") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/hooks/{hook_id}" - localVarPath = strings.Replace(localVarPath, "{"+"hook_id"+"}", url.PathEscape(parameterValueToString(r.hookId, "hookId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiGetEnvironmentVariableRequest struct { - ctx context.Context - ApiService *SmartHooksApiService - envvarId string -} - -func (r ApiGetEnvironmentVariableRequest) Execute() (*HookEnvvar, *http.Response, error) { - return r.ApiService.GetEnvironmentVariableExecute(r) -} - -/* -GetEnvironmentVariable Get Environment Variable - -Get Environment Variable - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param envvarId Set to the id of the Hook Environment Variable that you want to fetch. - @return ApiGetEnvironmentVariableRequest -*/ -func (a *SmartHooksApiService) GetEnvironmentVariable(ctx context.Context, envvarId string) ApiGetEnvironmentVariableRequest { - return ApiGetEnvironmentVariableRequest{ - ApiService: a, - ctx: ctx, - envvarId: envvarId, - } -} - -// Execute executes the request -// @return HookEnvvar -func (a *SmartHooksApiService) GetEnvironmentVariableExecute(r ApiGetEnvironmentVariableRequest) (*HookEnvvar, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *HookEnvvar - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SmartHooksApiService.GetEnvironmentVariable") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/hooks/envs/{envvar_id}" - localVarPath = strings.Replace(localVarPath, "{"+"envvar_id"+"}", url.PathEscape(parameterValueToString(r.envvarId, "envvarId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetHookRequest struct { - ctx context.Context - ApiService *SmartHooksApiService - hookId string -} - -func (r ApiGetHookRequest) Execute() (*Hook, *http.Response, error) { - return r.ApiService.GetHookExecute(r) -} - -/* -GetHook Get Smart Hook by ID - -Get Smart Hook - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param hookId Set to the id of the Hook that you want to return. - @return ApiGetHookRequest -*/ -func (a *SmartHooksApiService) GetHook(ctx context.Context, hookId string) ApiGetHookRequest { - return ApiGetHookRequest{ - ApiService: a, - ctx: ctx, - hookId: hookId, - } -} - -// Execute executes the request -// @return Hook -func (a *SmartHooksApiService) GetHookExecute(r ApiGetHookRequest) (*Hook, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Hook - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SmartHooksApiService.GetHook") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/hooks/{hook_id}" - localVarPath = strings.Replace(localVarPath, "{"+"hook_id"+"}", url.PathEscape(parameterValueToString(r.hookId, "hookId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetLogsRequest struct { - ctx context.Context - ApiService *SmartHooksApiService - hookId string - limit *int32 - page *int32 - cursor *string - requestId *string - correlationId *string -} - -// How many items to return at one time (max 100) -func (r ApiGetLogsRequest) Limit(limit int32) ApiGetLogsRequest { - r.limit = &limit - return r -} - -// The page number of results to return. -func (r ApiGetLogsRequest) Page(page int32) ApiGetLogsRequest { - r.page = &page - return r -} - -// Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. -func (r ApiGetLogsRequest) Cursor(cursor string) ApiGetLogsRequest { - r.cursor = &cursor - return r -} - -// Returns logs that contain this request_id. -func (r ApiGetLogsRequest) RequestId(requestId string) ApiGetLogsRequest { - r.requestId = &requestId - return r -} - -// Returns logs that contain this correlation_id. -func (r ApiGetLogsRequest) CorrelationId(correlationId string) ApiGetLogsRequest { - r.correlationId = &correlationId - return r -} - -func (r ApiGetLogsRequest) Execute() ([]HookLog, *http.Response, error) { - return r.ApiService.GetLogsExecute(r) -} - -/* -GetLogs Get Smart Hook Logs - -Get Smart Hook Logs - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param hookId Set to the id of the Hook that you want to return. - @return ApiGetLogsRequest -*/ -func (a *SmartHooksApiService) GetLogs(ctx context.Context, hookId string) ApiGetLogsRequest { - return ApiGetLogsRequest{ - ApiService: a, - ctx: ctx, - hookId: hookId, - } -} - -// Execute executes the request -// @return []HookLog -func (a *SmartHooksApiService) GetLogsExecute(r ApiGetLogsRequest) ([]HookLog, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []HookLog - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SmartHooksApiService.GetLogs") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/hooks/{hook_id}/logs" - localVarPath = strings.Replace(localVarPath, "{"+"hook_id"+"}", url.PathEscape(parameterValueToString(r.hookId, "hookId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - if r.limit != nil { - parameterAddToQuery(localVarQueryParams, "limit", r.limit, "") - } - if r.page != nil { - parameterAddToQuery(localVarQueryParams, "page", r.page, "") - } - if r.cursor != nil { - parameterAddToQuery(localVarQueryParams, "cursor", r.cursor, "") - } - if r.requestId != nil { - parameterAddToQuery(localVarQueryParams, "request_id", r.requestId, "") - } - if r.correlationId != nil { - parameterAddToQuery(localVarQueryParams, "correlation_id", r.correlationId, "") - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiListEnvironmentVariablesRequest struct { - ctx context.Context - ApiService *SmartHooksApiService - limit *int32 - page *int32 - cursor *string -} - -// How many items to return at one time (max 100) -func (r ApiListEnvironmentVariablesRequest) Limit(limit int32) ApiListEnvironmentVariablesRequest { - r.limit = &limit - return r -} - -// The page number of results to return. -func (r ApiListEnvironmentVariablesRequest) Page(page int32) ApiListEnvironmentVariablesRequest { - r.page = &page - return r -} - -// Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. -func (r ApiListEnvironmentVariablesRequest) Cursor(cursor string) ApiListEnvironmentVariablesRequest { - r.cursor = &cursor - return r -} - -func (r ApiListEnvironmentVariablesRequest) Execute() ([]HookEnvvar, *http.Response, error) { - return r.ApiService.ListEnvironmentVariablesExecute(r) -} - -/* -ListEnvironmentVariables List Environment Variables - -List Environment Variables - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiListEnvironmentVariablesRequest -*/ -func (a *SmartHooksApiService) ListEnvironmentVariables(ctx context.Context) ApiListEnvironmentVariablesRequest { - return ApiListEnvironmentVariablesRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return []HookEnvvar -func (a *SmartHooksApiService) ListEnvironmentVariablesExecute(r ApiListEnvironmentVariablesRequest) ([]HookEnvvar, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []HookEnvvar - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SmartHooksApiService.ListEnvironmentVariables") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/hooks/envs" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - if r.limit != nil { - parameterAddToQuery(localVarQueryParams, "limit", r.limit, "") - } - if r.page != nil { - parameterAddToQuery(localVarQueryParams, "page", r.page, "") - } - if r.cursor != nil { - parameterAddToQuery(localVarQueryParams, "cursor", r.cursor, "") - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiListHooksRequest struct { - ctx context.Context - ApiService *SmartHooksApiService - limit *int32 - page *int32 - cursor *string -} - -// How many items to return at one time (max 100) -func (r ApiListHooksRequest) Limit(limit int32) ApiListHooksRequest { - r.limit = &limit - return r -} - -// The page number of results to return. -func (r ApiListHooksRequest) Page(page int32) ApiListHooksRequest { - r.page = &page - return r -} - -// Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. -func (r ApiListHooksRequest) Cursor(cursor string) ApiListHooksRequest { - r.cursor = &cursor - return r -} - -func (r ApiListHooksRequest) Execute() ([]Hook, *http.Response, error) { - return r.ApiService.ListHooksExecute(r) -} - -/* -ListHooks List all Smart Hooks - -List Smart Hooks - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiListHooksRequest -*/ -func (a *SmartHooksApiService) ListHooks(ctx context.Context) ApiListHooksRequest { - return ApiListHooksRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return []Hook -func (a *SmartHooksApiService) ListHooksExecute(r ApiListHooksRequest) ([]Hook, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []Hook - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SmartHooksApiService.ListHooks") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/hooks" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - if r.limit != nil { - parameterAddToQuery(localVarQueryParams, "limit", r.limit, "") - } - if r.page != nil { - parameterAddToQuery(localVarQueryParams, "page", r.page, "") - } - if r.cursor != nil { - parameterAddToQuery(localVarQueryParams, "cursor", r.cursor, "") - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiUpdateEnvironmentVariableRequest struct { - ctx context.Context - ApiService *SmartHooksApiService - envvarId string - updateEnvironmentVariableRequest *UpdateEnvironmentVariableRequest -} - -func (r ApiUpdateEnvironmentVariableRequest) UpdateEnvironmentVariableRequest(updateEnvironmentVariableRequest UpdateEnvironmentVariableRequest) ApiUpdateEnvironmentVariableRequest { - r.updateEnvironmentVariableRequest = &updateEnvironmentVariableRequest - return r -} - -func (r ApiUpdateEnvironmentVariableRequest) Execute() (*HookEnvvar, *http.Response, error) { - return r.ApiService.UpdateEnvironmentVariableExecute(r) -} - -/* -UpdateEnvironmentVariable Update Environment Variable - -Update Environment Variable - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param envvarId Set to the id of the Hook Environment Variable that you want to fetch. - @return ApiUpdateEnvironmentVariableRequest -*/ -func (a *SmartHooksApiService) UpdateEnvironmentVariable(ctx context.Context, envvarId string) ApiUpdateEnvironmentVariableRequest { - return ApiUpdateEnvironmentVariableRequest{ - ApiService: a, - ctx: ctx, - envvarId: envvarId, - } -} - -// Execute executes the request -// @return HookEnvvar -func (a *SmartHooksApiService) UpdateEnvironmentVariableExecute(r ApiUpdateEnvironmentVariableRequest) (*HookEnvvar, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *HookEnvvar - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SmartHooksApiService.UpdateEnvironmentVariable") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/hooks/envs/{envvar_id}" - localVarPath = strings.Replace(localVarPath, "{"+"envvar_id"+"}", url.PathEscape(parameterValueToString(r.envvarId, "envvarId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.updateEnvironmentVariableRequest == nil { - return localVarReturnValue, nil, reportError("updateEnvironmentVariableRequest is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.updateEnvironmentVariableRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v HookStatus - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiUpdateHookRequest struct { - ctx context.Context - ApiService *SmartHooksApiService - hookId string - hook *Hook -} - -func (r ApiUpdateHookRequest) Hook(hook Hook) ApiUpdateHookRequest { - r.hook = &hook - return r -} - -func (r ApiUpdateHookRequest) Execute() (*Hook, *http.Response, error) { - return r.ApiService.UpdateHookExecute(r) -} - -/* -UpdateHook Update Smart Hook by ID - -Update Smart Hook - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param hookId Set to the id of the Hook that you want to return. - @return ApiUpdateHookRequest -*/ -func (a *SmartHooksApiService) UpdateHook(ctx context.Context, hookId string) ApiUpdateHookRequest { - return ApiUpdateHookRequest{ - ApiService: a, - ctx: ctx, - hookId: hookId, - } -} - -// Execute executes the request -// @return Hook -func (a *SmartHooksApiService) UpdateHookExecute(r ApiUpdateHookRequest) (*Hook, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Hook - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SmartHooksApiService.UpdateHook") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/hooks/{hook_id}" - localVarPath = strings.Replace(localVarPath, "{"+"hook_id"+"}", url.PathEscape(parameterValueToString(r.hookId, "hookId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.hook == nil { - return localVarReturnValue, nil, reportError("hook is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.hook - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v AltErr - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v HookStatus - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} diff --git a/api_user_mappings.go b/api_user_mappings.go deleted file mode 100644 index 4966a27..0000000 --- a/api_user_mappings.go +++ /dev/null @@ -1,1383 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "bytes" - "context" - "io/ioutil" - "net/http" - "net/url" - "strings" -) - - -// UserMappingsApiService UserMappingsApi service -type UserMappingsApiService service - -type ApiCreateMappingRequest struct { - ctx context.Context - ApiService *UserMappingsApiService - contentType *string - mapping *Mapping -} - -func (r ApiCreateMappingRequest) ContentType(contentType string) ApiCreateMappingRequest { - r.contentType = &contentType - return r -} - -func (r ApiCreateMappingRequest) Mapping(mapping Mapping) ApiCreateMappingRequest { - r.mapping = &mapping - return r -} - -func (r ApiCreateMappingRequest) Execute() ([]Mapping, *http.Response, error) { - return r.ApiService.CreateMappingExecute(r) -} - -/* -CreateMapping Create Mapping - -Create Mapping - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiCreateMappingRequest -*/ -func (a *UserMappingsApiService) CreateMapping(ctx context.Context) ApiCreateMappingRequest { - return ApiCreateMappingRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return []Mapping -func (a *UserMappingsApiService) CreateMappingExecute(r ApiCreateMappingRequest) ([]Mapping, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []Mapping - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserMappingsApiService.CreateMapping") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/mappings" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.contentType != nil { - parameterAddToQuery(localVarQueryParams, "Content-Type", r.contentType, "") - } - // body params - localVarPostBody = r.mapping - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiDeleteMappingRequest struct { - ctx context.Context - ApiService *UserMappingsApiService - mappingId int32 -} - -func (r ApiDeleteMappingRequest) Execute() (*http.Response, error) { - return r.ApiService.DeleteMappingExecute(r) -} - -/* -DeleteMapping Delete Mapping - -Delete Mapping - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param mappingId The id of the user mapping to locate. - @return ApiDeleteMappingRequest -*/ -func (a *UserMappingsApiService) DeleteMapping(ctx context.Context, mappingId int32) ApiDeleteMappingRequest { - return ApiDeleteMappingRequest{ - ApiService: a, - ctx: ctx, - mappingId: mappingId, - } -} - -// Execute executes the request -func (a *UserMappingsApiService) DeleteMappingExecute(r ApiDeleteMappingRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserMappingsApiService.DeleteMapping") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/mappings/{mapping_id}" - localVarPath = strings.Replace(localVarPath, "{"+"mapping_id"+"}", url.PathEscape(parameterValueToString(r.mappingId, "mappingId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiGetMappingRequest struct { - ctx context.Context - ApiService *UserMappingsApiService - mappingId int32 -} - -func (r ApiGetMappingRequest) Execute() (*Mapping, *http.Response, error) { - return r.ApiService.GetMappingExecute(r) -} - -/* -GetMapping Get Mapping - -Get Mapping - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param mappingId The id of the user mapping to locate. - @return ApiGetMappingRequest -*/ -func (a *UserMappingsApiService) GetMapping(ctx context.Context, mappingId int32) ApiGetMappingRequest { - return ApiGetMappingRequest{ - ApiService: a, - ctx: ctx, - mappingId: mappingId, - } -} - -// Execute executes the request -// @return Mapping -func (a *UserMappingsApiService) GetMappingExecute(r ApiGetMappingRequest) (*Mapping, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Mapping - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserMappingsApiService.GetMapping") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/mappings/{mapping_id}" - localVarPath = strings.Replace(localVarPath, "{"+"mapping_id"+"}", url.PathEscape(parameterValueToString(r.mappingId, "mappingId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiListMappingActionValuesRequest struct { - ctx context.Context - ApiService *UserMappingsApiService - mappingActionValue string -} - -func (r ApiListMappingActionValuesRequest) Execute() ([]ListMappingActionValues200ResponseInner, *http.Response, error) { - return r.ApiService.ListMappingActionValuesExecute(r) -} - -/* -ListMappingActionValues List Actions Values - -List Mappings' Actions' Values - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param mappingActionValue - @return ApiListMappingActionValuesRequest -*/ -func (a *UserMappingsApiService) ListMappingActionValues(ctx context.Context, mappingActionValue string) ApiListMappingActionValuesRequest { - return ApiListMappingActionValuesRequest{ - ApiService: a, - ctx: ctx, - mappingActionValue: mappingActionValue, - } -} - -// Execute executes the request -// @return []ListMappingActionValues200ResponseInner -func (a *UserMappingsApiService) ListMappingActionValuesExecute(r ApiListMappingActionValuesRequest) ([]ListMappingActionValues200ResponseInner, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []ListMappingActionValues200ResponseInner - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserMappingsApiService.ListMappingActionValues") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/mappings/actions/{mapping_action_value}/values" - localVarPath = strings.Replace(localVarPath, "{"+"mapping_action_value"+"}", url.PathEscape(parameterValueToString(r.mappingActionValue, "mappingActionValue")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiListMappingConditionsRequest struct { - ctx context.Context - ApiService *UserMappingsApiService -} - -func (r ApiListMappingConditionsRequest) Execute() (*ListMappingConditions200Response, *http.Response, error) { - return r.ApiService.ListMappingConditionsExecute(r) -} - -/* -ListMappingConditions List Conditions - -List Mappings' Conditions - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiListMappingConditionsRequest -*/ -func (a *UserMappingsApiService) ListMappingConditions(ctx context.Context) ApiListMappingConditionsRequest { - return ApiListMappingConditionsRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return ListMappingConditions200Response -func (a *UserMappingsApiService) ListMappingConditionsExecute(r ApiListMappingConditionsRequest) (*ListMappingConditions200Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ListMappingConditions200Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserMappingsApiService.ListMappingConditions") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/mappings/conditions" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiListMappingConditionsOperatorsRequest struct { - ctx context.Context - ApiService *UserMappingsApiService - mappingConditionValue string -} - -func (r ApiListMappingConditionsOperatorsRequest) Execute() ([]ListMappingConditionsOperators200ResponseInner, *http.Response, error) { - return r.ApiService.ListMappingConditionsOperatorsExecute(r) -} - -/* -ListMappingConditionsOperators List Conditions Operators - -List Mappings' Conditions' Operators - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param mappingConditionValue - @return ApiListMappingConditionsOperatorsRequest -*/ -func (a *UserMappingsApiService) ListMappingConditionsOperators(ctx context.Context, mappingConditionValue string) ApiListMappingConditionsOperatorsRequest { - return ApiListMappingConditionsOperatorsRequest{ - ApiService: a, - ctx: ctx, - mappingConditionValue: mappingConditionValue, - } -} - -// Execute executes the request -// @return []ListMappingConditionsOperators200ResponseInner -func (a *UserMappingsApiService) ListMappingConditionsOperatorsExecute(r ApiListMappingConditionsOperatorsRequest) ([]ListMappingConditionsOperators200ResponseInner, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []ListMappingConditionsOperators200ResponseInner - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserMappingsApiService.ListMappingConditionsOperators") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/mappings/conditions/{mapping_condition_value}/operators" - localVarPath = strings.Replace(localVarPath, "{"+"mapping_condition_value"+"}", url.PathEscape(parameterValueToString(r.mappingConditionValue, "mappingConditionValue")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiListMappingContionValuesRequest struct { - ctx context.Context - ApiService *UserMappingsApiService - mappingConditionValue string -} - -func (r ApiListMappingContionValuesRequest) Execute() ([]ListMappingContionValues200ResponseInner, *http.Response, error) { - return r.ApiService.ListMappingContionValuesExecute(r) -} - -/* -ListMappingContionValues List Conditions Values - -List Mappings' Conditions' Values - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param mappingConditionValue - @return ApiListMappingContionValuesRequest -*/ -func (a *UserMappingsApiService) ListMappingContionValues(ctx context.Context, mappingConditionValue string) ApiListMappingContionValuesRequest { - return ApiListMappingContionValuesRequest{ - ApiService: a, - ctx: ctx, - mappingConditionValue: mappingConditionValue, - } -} - -// Execute executes the request -// @return []ListMappingContionValues200ResponseInner -func (a *UserMappingsApiService) ListMappingContionValuesExecute(r ApiListMappingContionValuesRequest) ([]ListMappingContionValues200ResponseInner, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []ListMappingContionValues200ResponseInner - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserMappingsApiService.ListMappingContionValues") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/mappings/conditions/{mapping_condition_value}/values" - localVarPath = strings.Replace(localVarPath, "{"+"mapping_condition_value"+"}", url.PathEscape(parameterValueToString(r.mappingConditionValue, "mappingConditionValue")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiListMappingsRequest struct { - ctx context.Context - ApiService *UserMappingsApiService - enabled *bool - hasCondition *string - hasConditionType *string - hasAction *string - hasActionType *string -} - -// Defaults to true. When set to `false` will return all disabled mappings. -func (r ApiListMappingsRequest) Enabled(enabled bool) ApiListMappingsRequest { - r.enabled = &enabled - return r -} - -// Filters Rules based on their Conditions. Values formatted as :, where name is the Condition to look for, and value is the value to find. Multiple filters can be declared by using a comma delimited list. Wildcards are supported in both the name and value fields. For example: Single filter. has_condition=has_role:123456 Multiple filters. has_condition=has_role:123456,status:1 Wildcard for conditions. has_condition=*:123456 Wildcard for condition values. has_condition=has_role:* -func (r ApiListMappingsRequest) HasCondition(hasCondition string) ApiListMappingsRequest { - r.hasCondition = &hasCondition - return r -} - -// Filters Rules based on their Conditions. Values formatted as :, where name is the Condition to look for, and value is the value to find. Multiple filters can be declared by using a comma delimited list. Wildcards are supported in both the name and value fields. For example: Single filter. has_condition=has_role:123456 Multiple filters. has_condition=has_role:123456,status:1 Wildcard for conditions. has_condition=*:123456 Wildcard for condition values. has_condition=has_role:* -func (r ApiListMappingsRequest) HasConditionType(hasConditionType string) ApiListMappingsRequest { - r.hasConditionType = &hasConditionType - return r -} - -// Filters Rules based on their Actions. Values formatted as :, where name is the Action to look for, and value is the value to find. Multiple filters can be declared by using a comma delimited list. Wildcards are supported in both the name and value fields. For example: Single filter. has_action=set_licenses:123456 Multiple filters. has_action=set_groups:123456,set_usertype:* Wildcard for actions. has_action=*:123456 Wildcard for action values. has_action=set_userprincipalname:* -func (r ApiListMappingsRequest) HasAction(hasAction string) ApiListMappingsRequest { - r.hasAction = &hasAction - return r -} - -// Filters Rules based on their action types. Allowed values are: builtin - actions that involve standard attributes custom - actions that involve custom attributes none - no actions are defined For example: Find Rules with no actions has_action_type=none -func (r ApiListMappingsRequest) HasActionType(hasActionType string) ApiListMappingsRequest { - r.hasActionType = &hasActionType - return r -} - -func (r ApiListMappingsRequest) Execute() ([]Mapping, *http.Response, error) { - return r.ApiService.ListMappingsExecute(r) -} - -/* -ListMappings List Mappings - -List Mappings - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiListMappingsRequest -*/ -func (a *UserMappingsApiService) ListMappings(ctx context.Context) ApiListMappingsRequest { - return ApiListMappingsRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return []Mapping -func (a *UserMappingsApiService) ListMappingsExecute(r ApiListMappingsRequest) ([]Mapping, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []Mapping - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserMappingsApiService.ListMappings") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/mappings" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - if r.enabled != nil { - parameterAddToQuery(localVarQueryParams, "enabled", r.enabled, "") - } - if r.hasCondition != nil { - parameterAddToQuery(localVarQueryParams, "has_condition", r.hasCondition, "") - } - if r.hasConditionType != nil { - parameterAddToQuery(localVarQueryParams, "has_condition_type", r.hasConditionType, "") - } - if r.hasAction != nil { - parameterAddToQuery(localVarQueryParams, "has_action", r.hasAction, "") - } - if r.hasActionType != nil { - parameterAddToQuery(localVarQueryParams, "has_action_type", r.hasActionType, "") - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiListMappingsActionsRequest struct { - ctx context.Context - ApiService *UserMappingsApiService -} - -func (r ApiListMappingsActionsRequest) Execute() ([]ListMappingsActions200ResponseInner, *http.Response, error) { - return r.ApiService.ListMappingsActionsExecute(r) -} - -/* -ListMappingsActions List Actions - -List Mappings' Actions - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiListMappingsActionsRequest -*/ -func (a *UserMappingsApiService) ListMappingsActions(ctx context.Context) ApiListMappingsActionsRequest { - return ApiListMappingsActionsRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return []ListMappingsActions200ResponseInner -func (a *UserMappingsApiService) ListMappingsActionsExecute(r ApiListMappingsActionsRequest) ([]ListMappingsActions200ResponseInner, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []ListMappingsActions200ResponseInner - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserMappingsApiService.ListMappingsActions") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/mappings/actions" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiSortMappingsRequest struct { - ctx context.Context - ApiService *UserMappingsApiService - requestBody *[]int32 -} - -func (r ApiSortMappingsRequest) RequestBody(requestBody []int32) ApiSortMappingsRequest { - r.requestBody = &requestBody - return r -} - -func (r ApiSortMappingsRequest) Execute() ([]int32, *http.Response, error) { - return r.ApiService.SortMappingsExecute(r) -} - -/* -SortMappings Bulk Sort - -Bulk Sort Mappings - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiSortMappingsRequest -*/ -func (a *UserMappingsApiService) SortMappings(ctx context.Context) ApiSortMappingsRequest { - return ApiSortMappingsRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return []int32 -func (a *UserMappingsApiService) SortMappingsExecute(r ApiSortMappingsRequest) ([]int32, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []int32 - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserMappingsApiService.SortMappings") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/mappings/sort" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.requestBody - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiUpdateMappingRequest struct { - ctx context.Context - ApiService *UserMappingsApiService - mappingId int32 - contentType *string - body *map[string]interface{} -} - -func (r ApiUpdateMappingRequest) ContentType(contentType string) ApiUpdateMappingRequest { - r.contentType = &contentType - return r -} - -func (r ApiUpdateMappingRequest) Body(body map[string]interface{}) ApiUpdateMappingRequest { - r.body = &body - return r -} - -func (r ApiUpdateMappingRequest) Execute() (int32, *http.Response, error) { - return r.ApiService.UpdateMappingExecute(r) -} - -/* -UpdateMapping Update Mapping - -Update Mapping - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param mappingId The id of the user mapping to locate. - @return ApiUpdateMappingRequest -*/ -func (a *UserMappingsApiService) UpdateMapping(ctx context.Context, mappingId int32) ApiUpdateMappingRequest { - return ApiUpdateMappingRequest{ - ApiService: a, - ctx: ctx, - mappingId: mappingId, - } -} - -// Execute executes the request -// @return int32 -func (a *UserMappingsApiService) UpdateMappingExecute(r ApiUpdateMappingRequest) (int32, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue int32 - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserMappingsApiService.UpdateMapping") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/mappings/{mapping_id}" - localVarPath = strings.Replace(localVarPath, "{"+"mapping_id"+"}", url.PathEscape(parameterValueToString(r.mappingId, "mappingId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.contentType != nil { - parameterAddToQuery(localVarQueryParams, "Content-Type", r.contentType, "") - } - // body params - localVarPostBody = r.body - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} diff --git a/api_users_v1.go b/api_users_v1.go deleted file mode 100644 index 4113341..0000000 --- a/api_users_v1.go +++ /dev/null @@ -1,2392 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "bytes" - "context" - "io/ioutil" - "net/http" - "net/url" - "strings" -) - - -// UsersV1ApiService UsersV1Api service -type UsersV1ApiService service - -type ApiAddRolesToUserRequest struct { - ctx context.Context - ApiService *UsersV1ApiService - userId int32 - addRolesToUserRequest *AddRolesToUserRequest -} - -func (r ApiAddRolesToUserRequest) AddRolesToUserRequest(addRolesToUserRequest AddRolesToUserRequest) ApiAddRolesToUserRequest { - r.addRolesToUserRequest = &addRolesToUserRequest - return r -} - -func (r ApiAddRolesToUserRequest) Execute() (*Error, *http.Response, error) { - return r.ApiService.AddRolesToUserExecute(r) -} - -/* -AddRolesToUser Add Roles for a User - -Add Roles for a User - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param userId Set to the id of the user that you want to return. - @return ApiAddRolesToUserRequest -*/ -func (a *UsersV1ApiService) AddRolesToUser(ctx context.Context, userId int32) ApiAddRolesToUserRequest { - return ApiAddRolesToUserRequest{ - ApiService: a, - ctx: ctx, - userId: userId, - } -} - -// Execute executes the request -// @return Error -func (a *UsersV1ApiService) AddRolesToUserExecute(r ApiAddRolesToUserRequest) (*Error, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Error - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsersV1ApiService.AddRolesToUser") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/1/users/{user_id}/add_roles" - localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.addRolesToUserRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiCreateUserRequest struct { - ctx context.Context - ApiService *UsersV1ApiService - mappings *string - validatePolicy *bool - user *User -} - -// Controls how mappings will be applied to the user on creation. Defaults to async. -func (r ApiCreateUserRequest) Mappings(mappings string) ApiCreateUserRequest { - r.mappings = &mappings - return r -} - -// Will passwords validate against the User Policy? Defaults to true. -func (r ApiCreateUserRequest) ValidatePolicy(validatePolicy bool) ApiCreateUserRequest { - r.validatePolicy = &validatePolicy - return r -} - -func (r ApiCreateUserRequest) User(user User) ApiCreateUserRequest { - r.user = &user - return r -} - -func (r ApiCreateUserRequest) Execute() (*User, *http.Response, error) { - return r.ApiService.CreateUserExecute(r) -} - -/* -CreateUser Create a User - -Create a User - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiCreateUserRequest -*/ -func (a *UsersV1ApiService) CreateUser(ctx context.Context) ApiCreateUserRequest { - return ApiCreateUserRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return User -func (a *UsersV1ApiService) CreateUserExecute(r ApiCreateUserRequest) (*User, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *User - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsersV1ApiService.CreateUser") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/1/users" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - if r.mappings != nil { - parameterAddToQuery(localVarQueryParams, "mappings", r.mappings, "") - } - if r.validatePolicy != nil { - parameterAddToQuery(localVarQueryParams, "validate_policy", r.validatePolicy, "") - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.user - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiDeleteUserRequest struct { - ctx context.Context - ApiService *UsersV1ApiService - userId int32 -} - -func (r ApiDeleteUserRequest) Execute() (*http.Response, error) { - return r.ApiService.DeleteUserExecute(r) -} - -/* -DeleteUser Delete a User - -Delete A User - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param userId Set to the id of the user that you want to return. - @return ApiDeleteUserRequest -*/ -func (a *UsersV1ApiService) DeleteUser(ctx context.Context, userId int32) ApiDeleteUserRequest { - return ApiDeleteUserRequest{ - ApiService: a, - ctx: ctx, - userId: userId, - } -} - -// Execute executes the request -func (a *UsersV1ApiService) DeleteUserExecute(r ApiDeleteUserRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsersV1ApiService.DeleteUser") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/1/users/{user_id}" - localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiGetCustomAttributesRequest struct { - ctx context.Context - ApiService *UsersV1ApiService -} - -func (r ApiGetCustomAttributesRequest) Execute() (*GetCustomAttributes200Response, *http.Response, error) { - return r.ApiService.GetCustomAttributesExecute(r) -} - -/* -GetCustomAttributes Get Custom Attributes - -Get Custom Attributes - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetCustomAttributesRequest -*/ -func (a *UsersV1ApiService) GetCustomAttributes(ctx context.Context) ApiGetCustomAttributesRequest { - return ApiGetCustomAttributesRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return GetCustomAttributes200Response -func (a *UsersV1ApiService) GetCustomAttributesExecute(r ApiGetCustomAttributesRequest) (*GetCustomAttributes200Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetCustomAttributes200Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsersV1ApiService.GetCustomAttributes") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/1/users/custom_attributes" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetUserAppsRequest struct { - ctx context.Context - ApiService *UsersV1ApiService - userId int32 - ignoreVisibility *bool -} - -// Defaults to `false`. When `true` will show all apps that are assigned to a user regardless of their portal visibility setting. -func (r ApiGetUserAppsRequest) IgnoreVisibility(ignoreVisibility bool) ApiGetUserAppsRequest { - r.ignoreVisibility = &ignoreVisibility - return r -} - -func (r ApiGetUserAppsRequest) Execute() ([]GetUserApps200ResponseInner, *http.Response, error) { - return r.ApiService.GetUserAppsExecute(r) -} - -/* -GetUserApps Get Apps for a User - -Get Apps for User - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param userId Set to the id of the user that you want to return. - @return ApiGetUserAppsRequest -*/ -func (a *UsersV1ApiService) GetUserApps(ctx context.Context, userId int32) ApiGetUserAppsRequest { - return ApiGetUserAppsRequest{ - ApiService: a, - ctx: ctx, - userId: userId, - } -} - -// Execute executes the request -// @return []GetUserApps200ResponseInner -func (a *UsersV1ApiService) GetUserAppsExecute(r ApiGetUserAppsRequest) ([]GetUserApps200ResponseInner, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []GetUserApps200ResponseInner - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsersV1ApiService.GetUserApps") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/1/users/{user_id}/apps" - localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - if r.ignoreVisibility != nil { - parameterAddToQuery(localVarQueryParams, "ignore_visibility", r.ignoreVisibility, "") - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetUserByIdRequest struct { - ctx context.Context - ApiService *UsersV1ApiService - userId int32 -} - -func (r ApiGetUserByIdRequest) Execute() (*User, *http.Response, error) { - return r.ApiService.GetUserByIdExecute(r) -} - -/* -GetUserById Get User by ID - -Get User By ID - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param userId Set to the id of the user that you want to return. - @return ApiGetUserByIdRequest -*/ -func (a *UsersV1ApiService) GetUserById(ctx context.Context, userId int32) ApiGetUserByIdRequest { - return ApiGetUserByIdRequest{ - ApiService: a, - ctx: ctx, - userId: userId, - } -} - -// Execute executes the request -// @return User -func (a *UsersV1ApiService) GetUserByIdExecute(r ApiGetUserByIdRequest) (*User, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *User - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsersV1ApiService.GetUserById") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/1/users/{user_id}" - localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetUserRolesRequest struct { - ctx context.Context - ApiService *UsersV1ApiService - userId int32 -} - -func (r ApiGetUserRolesRequest) Execute() (*GetUserRoles200Response, *http.Response, error) { - return r.ApiService.GetUserRolesExecute(r) -} - -/* -GetUserRoles Get Roles for a User - -Get User Roles - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param userId Set to the id of the user that you want to return. - @return ApiGetUserRolesRequest -*/ -func (a *UsersV1ApiService) GetUserRoles(ctx context.Context, userId int32) ApiGetUserRolesRequest { - return ApiGetUserRolesRequest{ - ApiService: a, - ctx: ctx, - userId: userId, - } -} - -// Execute executes the request -// @return GetUserRoles200Response -func (a *UsersV1ApiService) GetUserRolesExecute(r ApiGetUserRolesRequest) (*GetUserRoles200Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetUserRoles200Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsersV1ApiService.GetUserRoles") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/1/users/{user_id}/roles" - localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiListUsersRequest struct { - ctx context.Context - ApiService *UsersV1ApiService - limit *int32 - page *int32 - cursor *string - createdSince *string - createdUntil *string - updatedSince *string - updatedUntil *string - lastLoginSince *string - lastLoginUntil *string - firstname *string - lastname *string - email *string - username *string - samaccountname *string - directoryId *int32 - externalId *string - userIds *string - customAttributesAttributeName *string - fields *string -} - -// How many items to return at one time (max 100) -func (r ApiListUsersRequest) Limit(limit int32) ApiListUsersRequest { - r.limit = &limit - return r -} - -// The page number of results to return. -func (r ApiListUsersRequest) Page(page int32) ApiListUsersRequest { - r.page = &page - return r -} - -// Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. -func (r ApiListUsersRequest) Cursor(cursor string) ApiListUsersRequest { - r.cursor = &cursor - return r -} - -// An ISO8601 timestamp value that returns all users created after a given date & time. -func (r ApiListUsersRequest) CreatedSince(createdSince string) ApiListUsersRequest { - r.createdSince = &createdSince - return r -} - -// An ISO8601 timestamp value that returns all users created before a given date & time. -func (r ApiListUsersRequest) CreatedUntil(createdUntil string) ApiListUsersRequest { - r.createdUntil = &createdUntil - return r -} - -// An ISO8601 timestamp value that returns all users updated after a given date & time. -func (r ApiListUsersRequest) UpdatedSince(updatedSince string) ApiListUsersRequest { - r.updatedSince = &updatedSince - return r -} - -// An ISO8601 timestamp value that returns all users updated before a given date & time. -func (r ApiListUsersRequest) UpdatedUntil(updatedUntil string) ApiListUsersRequest { - r.updatedUntil = &updatedUntil - return r -} - -// An ISO8601 timestamp value that returns all users that logged in after a given date & time. -func (r ApiListUsersRequest) LastLoginSince(lastLoginSince string) ApiListUsersRequest { - r.lastLoginSince = &lastLoginSince - return r -} - -// An ISO8601 timestamp value that returns all users that logged in before a given date & time. -func (r ApiListUsersRequest) LastLoginUntil(lastLoginUntil string) ApiListUsersRequest { - r.lastLoginUntil = &lastLoginUntil - return r -} - -// The first name of the user -func (r ApiListUsersRequest) Firstname(firstname string) ApiListUsersRequest { - r.firstname = &firstname - return r -} - -// The last name of the user -func (r ApiListUsersRequest) Lastname(lastname string) ApiListUsersRequest { - r.lastname = &lastname - return r -} - -// The email address of the user -func (r ApiListUsersRequest) Email(email string) ApiListUsersRequest { - r.email = &email - return r -} - -// The username for the user -func (r ApiListUsersRequest) Username(username string) ApiListUsersRequest { - r.username = &username - return r -} - -// The AD login name for the user -func (r ApiListUsersRequest) Samaccountname(samaccountname string) ApiListUsersRequest { - r.samaccountname = &samaccountname - return r -} - -func (r ApiListUsersRequest) DirectoryId(directoryId int32) ApiListUsersRequest { - r.directoryId = &directoryId - return r -} - -// An external identifier that has been set on the user -func (r ApiListUsersRequest) ExternalId(externalId string) ApiListUsersRequest { - r.externalId = &externalId - return r -} - -// A comma separated list of OneLogin User IDs -func (r ApiListUsersRequest) UserIds(userIds string) ApiListUsersRequest { - r.userIds = &userIds - return r -} - -// The short name of a custom attribute. Note that the attribute name is prefixed with custom_attributes. -func (r ApiListUsersRequest) CustomAttributesAttributeName(customAttributesAttributeName string) ApiListUsersRequest { - r.customAttributesAttributeName = &customAttributesAttributeName - return r -} - -// Optional. Comma delimited list of fields to return. -func (r ApiListUsersRequest) Fields(fields string) ApiListUsersRequest { - r.fields = &fields - return r -} - -func (r ApiListUsersRequest) Execute() ([]User, *http.Response, error) { - return r.ApiService.ListUsersExecute(r) -} - -/* -ListUsers List Users - -List Users - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiListUsersRequest -*/ -func (a *UsersV1ApiService) ListUsers(ctx context.Context) ApiListUsersRequest { - return ApiListUsersRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return []User -func (a *UsersV1ApiService) ListUsersExecute(r ApiListUsersRequest) ([]User, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []User - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsersV1ApiService.ListUsers") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/1/users" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - if r.limit != nil { - parameterAddToQuery(localVarQueryParams, "limit", r.limit, "") - } - if r.page != nil { - parameterAddToQuery(localVarQueryParams, "page", r.page, "") - } - if r.cursor != nil { - parameterAddToQuery(localVarQueryParams, "cursor", r.cursor, "") - } - if r.createdSince != nil { - parameterAddToQuery(localVarQueryParams, "created_since", r.createdSince, "") - } - if r.createdUntil != nil { - parameterAddToQuery(localVarQueryParams, "created_until", r.createdUntil, "") - } - if r.updatedSince != nil { - parameterAddToQuery(localVarQueryParams, "updated_since", r.updatedSince, "") - } - if r.updatedUntil != nil { - parameterAddToQuery(localVarQueryParams, "updated_until", r.updatedUntil, "") - } - if r.lastLoginSince != nil { - parameterAddToQuery(localVarQueryParams, "last_login_since", r.lastLoginSince, "") - } - if r.lastLoginUntil != nil { - parameterAddToQuery(localVarQueryParams, "last_login_until", r.lastLoginUntil, "") - } - if r.firstname != nil { - parameterAddToQuery(localVarQueryParams, "firstname", r.firstname, "") - } - if r.lastname != nil { - parameterAddToQuery(localVarQueryParams, "lastname", r.lastname, "") - } - if r.email != nil { - parameterAddToQuery(localVarQueryParams, "email", r.email, "") - } - if r.username != nil { - parameterAddToQuery(localVarQueryParams, "username", r.username, "") - } - if r.samaccountname != nil { - parameterAddToQuery(localVarQueryParams, "samaccountname", r.samaccountname, "") - } - if r.directoryId != nil { - parameterAddToQuery(localVarQueryParams, "directory_id", r.directoryId, "") - } - if r.externalId != nil { - parameterAddToQuery(localVarQueryParams, "external_id", r.externalId, "") - } - if r.userIds != nil { - parameterAddToQuery(localVarQueryParams, "user_ids", r.userIds, "") - } - if r.customAttributesAttributeName != nil { - parameterAddToQuery(localVarQueryParams, "custom_attributes.{attribute_name}", r.customAttributesAttributeName, "") - } - if r.fields != nil { - parameterAddToQuery(localVarQueryParams, "fields", r.fields, "") - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiLockAccountUserRequest struct { - ctx context.Context - ApiService *UsersV1ApiService - userId int32 - lockAccountUserRequest *LockAccountUserRequest -} - -func (r ApiLockAccountUserRequest) LockAccountUserRequest(lockAccountUserRequest LockAccountUserRequest) ApiLockAccountUserRequest { - r.lockAccountUserRequest = &lockAccountUserRequest - return r -} - -func (r ApiLockAccountUserRequest) Execute() (*Error, *http.Response, error) { - return r.ApiService.LockAccountUserExecute(r) -} - -/* -LockAccountUser Lock User Account - -Lock User Account - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param userId Set to the id of the user that you want to return. - @return ApiLockAccountUserRequest -*/ -func (a *UsersV1ApiService) LockAccountUser(ctx context.Context, userId int32) ApiLockAccountUserRequest { - return ApiLockAccountUserRequest{ - ApiService: a, - ctx: ctx, - userId: userId, - } -} - -// Execute executes the request -// @return Error -func (a *UsersV1ApiService) LockAccountUserExecute(r ApiLockAccountUserRequest) (*Error, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Error - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsersV1ApiService.LockAccountUser") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/1/users/{user_id}/lock_user" - localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.lockAccountUserRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiLogOutUserRequest struct { - ctx context.Context - ApiService *UsersV1ApiService - userId int32 - body *map[string]interface{} -} - -func (r ApiLogOutUserRequest) Body(body map[string]interface{}) ApiLogOutUserRequest { - r.body = &body - return r -} - -func (r ApiLogOutUserRequest) Execute() (*Error, *http.Response, error) { - return r.ApiService.LogOutUserExecute(r) -} - -/* -LogOutUser Log User Out - -Log Out User - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param userId Set to the id of the user that you want to return. - @return ApiLogOutUserRequest -*/ -func (a *UsersV1ApiService) LogOutUser(ctx context.Context, userId int32) ApiLogOutUserRequest { - return ApiLogOutUserRequest{ - ApiService: a, - ctx: ctx, - userId: userId, - } -} - -// Execute executes the request -// @return Error -func (a *UsersV1ApiService) LogOutUserExecute(r ApiLogOutUserRequest) (*Error, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Error - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsersV1ApiService.LogOutUser") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/1/users/{user_id}/logout" - localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.body - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiRemoveUserRoleRequest struct { - ctx context.Context - ApiService *UsersV1ApiService - userId int32 - removeUserRoleRequest *RemoveUserRoleRequest -} - -func (r ApiRemoveUserRoleRequest) RemoveUserRoleRequest(removeUserRoleRequest RemoveUserRoleRequest) ApiRemoveUserRoleRequest { - r.removeUserRoleRequest = &removeUserRoleRequest - return r -} - -func (r ApiRemoveUserRoleRequest) Execute() (*Error, *http.Response, error) { - return r.ApiService.RemoveUserRoleExecute(r) -} - -/* -RemoveUserRole Remove Roles for a User - -Remove Roles for a User - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param userId Set to the id of the user that you want to return. - @return ApiRemoveUserRoleRequest -*/ -func (a *UsersV1ApiService) RemoveUserRole(ctx context.Context, userId int32) ApiRemoveUserRoleRequest { - return ApiRemoveUserRoleRequest{ - ApiService: a, - ctx: ctx, - userId: userId, - } -} - -// Execute executes the request -// @return Error -func (a *UsersV1ApiService) RemoveUserRoleExecute(r ApiRemoveUserRoleRequest) (*Error, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Error - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsersV1ApiService.RemoveUserRole") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/1/users/{user_id}/remove_roles" - localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.removeUserRoleRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiSetUserStateRequest struct { - ctx context.Context - ApiService *UsersV1ApiService - userId int32 - setUserStateRequest *SetUserStateRequest -} - -func (r ApiSetUserStateRequest) SetUserStateRequest(setUserStateRequest SetUserStateRequest) ApiSetUserStateRequest { - r.setUserStateRequest = &setUserStateRequest - return r -} - -func (r ApiSetUserStateRequest) Execute() (*Error, *http.Response, error) { - return r.ApiService.SetUserStateExecute(r) -} - -/* -SetUserState Set User State - -Set User State - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param userId Set to the id of the user that you want to return. - @return ApiSetUserStateRequest -*/ -func (a *UsersV1ApiService) SetUserState(ctx context.Context, userId int32) ApiSetUserStateRequest { - return ApiSetUserStateRequest{ - ApiService: a, - ctx: ctx, - userId: userId, - } -} - -// Execute executes the request -// @return Error -func (a *UsersV1ApiService) SetUserStateExecute(r ApiSetUserStateRequest) (*Error, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Error - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsersV1ApiService.SetUserState") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/1/users/{user_id}/set_state" - localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.setUserStateRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiUpdatePasswordInsecureRequest struct { - ctx context.Context - ApiService *UsersV1ApiService - userId int32 - updatePasswordInsecureRequest *UpdatePasswordInsecureRequest -} - -func (r ApiUpdatePasswordInsecureRequest) UpdatePasswordInsecureRequest(updatePasswordInsecureRequest UpdatePasswordInsecureRequest) ApiUpdatePasswordInsecureRequest { - r.updatePasswordInsecureRequest = &updatePasswordInsecureRequest - return r -} - -func (r ApiUpdatePasswordInsecureRequest) Execute() (*Error, *http.Response, error) { - return r.ApiService.UpdatePasswordInsecureExecute(r) -} - -/* -UpdatePasswordInsecure Set Password Using ID in Cleartext - -Update User password using their ID. This is done in cleartext and is insecure. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param userId Set to the id of the user that you want to return. - @return ApiUpdatePasswordInsecureRequest -*/ -func (a *UsersV1ApiService) UpdatePasswordInsecure(ctx context.Context, userId int32) ApiUpdatePasswordInsecureRequest { - return ApiUpdatePasswordInsecureRequest{ - ApiService: a, - ctx: ctx, - userId: userId, - } -} - -// Execute executes the request -// @return Error -func (a *UsersV1ApiService) UpdatePasswordInsecureExecute(r ApiUpdatePasswordInsecureRequest) (*Error, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Error - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsersV1ApiService.UpdatePasswordInsecure") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/1/users/set_password_clear_text/{user_id}" - localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.updatePasswordInsecureRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiUpdatePasswordSecureRequest struct { - ctx context.Context - ApiService *UsersV1ApiService - userId int32 - updatePasswordSecureRequest *UpdatePasswordSecureRequest -} - -func (r ApiUpdatePasswordSecureRequest) UpdatePasswordSecureRequest(updatePasswordSecureRequest UpdatePasswordSecureRequest) ApiUpdatePasswordSecureRequest { - r.updatePasswordSecureRequest = &updatePasswordSecureRequest - return r -} - -func (r ApiUpdatePasswordSecureRequest) Execute() (*Error, *http.Response, error) { - return r.ApiService.UpdatePasswordSecureExecute(r) -} - -/* -UpdatePasswordSecure Set Password Using ID and SHA-256 and Salt - -Update User Password Using ID and SHA-256 with salt. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param userId Set to the id of the user that you want to return. - @return ApiUpdatePasswordSecureRequest -*/ -func (a *UsersV1ApiService) UpdatePasswordSecure(ctx context.Context, userId int32) ApiUpdatePasswordSecureRequest { - return ApiUpdatePasswordSecureRequest{ - ApiService: a, - ctx: ctx, - userId: userId, - } -} - -// Execute executes the request -// @return Error -func (a *UsersV1ApiService) UpdatePasswordSecureExecute(r ApiUpdatePasswordSecureRequest) (*Error, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Error - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsersV1ApiService.UpdatePasswordSecure") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/1/users/set_password_using_salt/{user_id}" - localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.updatePasswordSecureRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiUpdateUserRequest struct { - ctx context.Context - ApiService *UsersV1ApiService - userId int32 - mappings *string - validatePolicy *bool - user *User -} - -// Controls how mappings will be applied to the user on creation. Defaults to async. -func (r ApiUpdateUserRequest) Mappings(mappings string) ApiUpdateUserRequest { - r.mappings = &mappings - return r -} - -// Will passwords validate against the User Policy? Defaults to true. -func (r ApiUpdateUserRequest) ValidatePolicy(validatePolicy bool) ApiUpdateUserRequest { - r.validatePolicy = &validatePolicy - return r -} - -func (r ApiUpdateUserRequest) User(user User) ApiUpdateUserRequest { - r.user = &user - return r -} - -func (r ApiUpdateUserRequest) Execute() (*User, *http.Response, error) { - return r.ApiService.UpdateUserExecute(r) -} - -/* -UpdateUser Update a User - -Update a User - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param userId Set to the id of the user that you want to return. - @return ApiUpdateUserRequest -*/ -func (a *UsersV1ApiService) UpdateUser(ctx context.Context, userId int32) ApiUpdateUserRequest { - return ApiUpdateUserRequest{ - ApiService: a, - ctx: ctx, - userId: userId, - } -} - -// Execute executes the request -// @return User -func (a *UsersV1ApiService) UpdateUserExecute(r ApiUpdateUserRequest) (*User, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *User - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsersV1ApiService.UpdateUser") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/1/users/{user_id}" - localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - if r.mappings != nil { - parameterAddToQuery(localVarQueryParams, "mappings", r.mappings, "") - } - if r.validatePolicy != nil { - parameterAddToQuery(localVarQueryParams, "validate_policy", r.validatePolicy, "") - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.user - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} diff --git a/api_users_v2.go b/api_users_v2.go deleted file mode 100644 index 155b701..0000000 --- a/api_users_v2.go +++ /dev/null @@ -1,1048 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "bytes" - "context" - "io/ioutil" - "net/http" - "net/url" - "strings" -) - - -// UsersV2ApiService UsersV2Api service -type UsersV2ApiService service - -type ApiCreateUser2Request struct { - ctx context.Context - ApiService *UsersV2ApiService - mappings *string - validatePolicy *bool - user *User -} - -// Controls how mappings will be applied to the user on creation. Defaults to async. -func (r ApiCreateUser2Request) Mappings(mappings string) ApiCreateUser2Request { - r.mappings = &mappings - return r -} - -// Will passwords validate against the User Policy? Defaults to true. -func (r ApiCreateUser2Request) ValidatePolicy(validatePolicy bool) ApiCreateUser2Request { - r.validatePolicy = &validatePolicy - return r -} - -func (r ApiCreateUser2Request) User(user User) ApiCreateUser2Request { - r.user = &user - return r -} - -func (r ApiCreateUser2Request) Execute() (*User, *http.Response, error) { - return r.ApiService.CreateUser2Execute(r) -} - -/* -CreateUser2 Create User - -Create User - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiCreateUser2Request -*/ -func (a *UsersV2ApiService) CreateUser2(ctx context.Context) ApiCreateUser2Request { - return ApiCreateUser2Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return User -func (a *UsersV2ApiService) CreateUser2Execute(r ApiCreateUser2Request) (*User, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *User - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsersV2ApiService.CreateUser2") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/users" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - if r.mappings != nil { - parameterAddToQuery(localVarQueryParams, "mappings", r.mappings, "") - } - if r.validatePolicy != nil { - parameterAddToQuery(localVarQueryParams, "validate_policy", r.validatePolicy, "") - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.user - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiDeleteUser2Request struct { - ctx context.Context - ApiService *UsersV2ApiService - userId int32 -} - -func (r ApiDeleteUser2Request) Execute() (*http.Response, error) { - return r.ApiService.DeleteUser2Execute(r) -} - -/* -DeleteUser2 Delete User - -Delete User - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param userId Set to the id of the user that you want to return. - @return ApiDeleteUser2Request -*/ -func (a *UsersV2ApiService) DeleteUser2(ctx context.Context, userId int32) ApiDeleteUser2Request { - return ApiDeleteUser2Request{ - ApiService: a, - ctx: ctx, - userId: userId, - } -} - -// Execute executes the request -func (a *UsersV2ApiService) DeleteUser2Execute(r ApiDeleteUser2Request) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsersV2ApiService.DeleteUser2") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/users/{user_id}" - localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiGetUser2Request struct { - ctx context.Context - ApiService *UsersV2ApiService - userId int32 -} - -func (r ApiGetUser2Request) Execute() (*User, *http.Response, error) { - return r.ApiService.GetUser2Execute(r) -} - -/* -GetUser2 Get User - -Get User - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param userId Set to the id of the user that you want to return. - @return ApiGetUser2Request -*/ -func (a *UsersV2ApiService) GetUser2(ctx context.Context, userId int32) ApiGetUser2Request { - return ApiGetUser2Request{ - ApiService: a, - ctx: ctx, - userId: userId, - } -} - -// Execute executes the request -// @return User -func (a *UsersV2ApiService) GetUser2Execute(r ApiGetUser2Request) (*User, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *User - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsersV2ApiService.GetUser2") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/users/{user_id}" - localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetUserApps2Request struct { - ctx context.Context - ApiService *UsersV2ApiService - userId int32 - ignoreVisibility *bool -} - -// Defaults to `false`. When `true` will show all apps that are assigned to a user regardless of their portal visibility setting. -func (r ApiGetUserApps2Request) IgnoreVisibility(ignoreVisibility bool) ApiGetUserApps2Request { - r.ignoreVisibility = &ignoreVisibility - return r -} - -func (r ApiGetUserApps2Request) Execute() ([]GetUserApps200ResponseInner, *http.Response, error) { - return r.ApiService.GetUserApps2Execute(r) -} - -/* -GetUserApps2 Get User Apps - -Get User Apps - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param userId Set to the id of the user that you want to return. - @return ApiGetUserApps2Request -*/ -func (a *UsersV2ApiService) GetUserApps2(ctx context.Context, userId int32) ApiGetUserApps2Request { - return ApiGetUserApps2Request{ - ApiService: a, - ctx: ctx, - userId: userId, - } -} - -// Execute executes the request -// @return []GetUserApps200ResponseInner -func (a *UsersV2ApiService) GetUserApps2Execute(r ApiGetUserApps2Request) ([]GetUserApps200ResponseInner, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []GetUserApps200ResponseInner - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsersV2ApiService.GetUserApps2") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/users/{user_id}/apps" - localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - if r.ignoreVisibility != nil { - parameterAddToQuery(localVarQueryParams, "ignore_visibility", r.ignoreVisibility, "") - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiListUsers2Request struct { - ctx context.Context - ApiService *UsersV2ApiService - limit *int32 - page *int32 - cursor *string - createdSince *string - createdUntil *string - updatedSince *string - updatedUntil *string - lastLoginSince *string - lastLoginUntil *string - firstname *string - lastname *string - email *string - username *string - samaccountname *string - directoryId *int32 - externalId *string - userIds *string - customAttributesAttributeName *string - fields *string -} - -// How many items to return at one time (max 100) -func (r ApiListUsers2Request) Limit(limit int32) ApiListUsers2Request { - r.limit = &limit - return r -} - -// The page number of results to return. -func (r ApiListUsers2Request) Page(page int32) ApiListUsers2Request { - r.page = &page - return r -} - -// Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. -func (r ApiListUsers2Request) Cursor(cursor string) ApiListUsers2Request { - r.cursor = &cursor - return r -} - -// An ISO8601 timestamp value that returns all users created after a given date & time. -func (r ApiListUsers2Request) CreatedSince(createdSince string) ApiListUsers2Request { - r.createdSince = &createdSince - return r -} - -// An ISO8601 timestamp value that returns all users created before a given date & time. -func (r ApiListUsers2Request) CreatedUntil(createdUntil string) ApiListUsers2Request { - r.createdUntil = &createdUntil - return r -} - -// An ISO8601 timestamp value that returns all users updated after a given date & time. -func (r ApiListUsers2Request) UpdatedSince(updatedSince string) ApiListUsers2Request { - r.updatedSince = &updatedSince - return r -} - -// An ISO8601 timestamp value that returns all users updated before a given date & time. -func (r ApiListUsers2Request) UpdatedUntil(updatedUntil string) ApiListUsers2Request { - r.updatedUntil = &updatedUntil - return r -} - -// An ISO8601 timestamp value that returns all users that logged in after a given date & time. -func (r ApiListUsers2Request) LastLoginSince(lastLoginSince string) ApiListUsers2Request { - r.lastLoginSince = &lastLoginSince - return r -} - -// An ISO8601 timestamp value that returns all users that logged in before a given date & time. -func (r ApiListUsers2Request) LastLoginUntil(lastLoginUntil string) ApiListUsers2Request { - r.lastLoginUntil = &lastLoginUntil - return r -} - -// The first name of the user -func (r ApiListUsers2Request) Firstname(firstname string) ApiListUsers2Request { - r.firstname = &firstname - return r -} - -// The last name of the user -func (r ApiListUsers2Request) Lastname(lastname string) ApiListUsers2Request { - r.lastname = &lastname - return r -} - -// The email address of the user -func (r ApiListUsers2Request) Email(email string) ApiListUsers2Request { - r.email = &email - return r -} - -// The username for the user -func (r ApiListUsers2Request) Username(username string) ApiListUsers2Request { - r.username = &username - return r -} - -// The AD login name for the user -func (r ApiListUsers2Request) Samaccountname(samaccountname string) ApiListUsers2Request { - r.samaccountname = &samaccountname - return r -} - -func (r ApiListUsers2Request) DirectoryId(directoryId int32) ApiListUsers2Request { - r.directoryId = &directoryId - return r -} - -// An external identifier that has been set on the user -func (r ApiListUsers2Request) ExternalId(externalId string) ApiListUsers2Request { - r.externalId = &externalId - return r -} - -// A comma separated list of OneLogin User IDs -func (r ApiListUsers2Request) UserIds(userIds string) ApiListUsers2Request { - r.userIds = &userIds - return r -} - -// The short name of a custom attribute. Note that the attribute name is prefixed with custom_attributes. -func (r ApiListUsers2Request) CustomAttributesAttributeName(customAttributesAttributeName string) ApiListUsers2Request { - r.customAttributesAttributeName = &customAttributesAttributeName - return r -} - -// Optional. Comma delimited list of fields to return. -func (r ApiListUsers2Request) Fields(fields string) ApiListUsers2Request { - r.fields = &fields - return r -} - -func (r ApiListUsers2Request) Execute() ([]User, *http.Response, error) { - return r.ApiService.ListUsers2Execute(r) -} - -/* -ListUsers2 List Users - -Get a list of users - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiListUsers2Request -*/ -func (a *UsersV2ApiService) ListUsers2(ctx context.Context) ApiListUsers2Request { - return ApiListUsers2Request{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return []User -func (a *UsersV2ApiService) ListUsers2Execute(r ApiListUsers2Request) ([]User, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []User - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsersV2ApiService.ListUsers2") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/users" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - if r.limit != nil { - parameterAddToQuery(localVarQueryParams, "limit", r.limit, "") - } - if r.page != nil { - parameterAddToQuery(localVarQueryParams, "page", r.page, "") - } - if r.cursor != nil { - parameterAddToQuery(localVarQueryParams, "cursor", r.cursor, "") - } - if r.createdSince != nil { - parameterAddToQuery(localVarQueryParams, "created_since", r.createdSince, "") - } - if r.createdUntil != nil { - parameterAddToQuery(localVarQueryParams, "created_until", r.createdUntil, "") - } - if r.updatedSince != nil { - parameterAddToQuery(localVarQueryParams, "updated_since", r.updatedSince, "") - } - if r.updatedUntil != nil { - parameterAddToQuery(localVarQueryParams, "updated_until", r.updatedUntil, "") - } - if r.lastLoginSince != nil { - parameterAddToQuery(localVarQueryParams, "last_login_since", r.lastLoginSince, "") - } - if r.lastLoginUntil != nil { - parameterAddToQuery(localVarQueryParams, "last_login_until", r.lastLoginUntil, "") - } - if r.firstname != nil { - parameterAddToQuery(localVarQueryParams, "firstname", r.firstname, "") - } - if r.lastname != nil { - parameterAddToQuery(localVarQueryParams, "lastname", r.lastname, "") - } - if r.email != nil { - parameterAddToQuery(localVarQueryParams, "email", r.email, "") - } - if r.username != nil { - parameterAddToQuery(localVarQueryParams, "username", r.username, "") - } - if r.samaccountname != nil { - parameterAddToQuery(localVarQueryParams, "samaccountname", r.samaccountname, "") - } - if r.directoryId != nil { - parameterAddToQuery(localVarQueryParams, "directory_id", r.directoryId, "") - } - if r.externalId != nil { - parameterAddToQuery(localVarQueryParams, "external_id", r.externalId, "") - } - if r.userIds != nil { - parameterAddToQuery(localVarQueryParams, "user_ids", r.userIds, "") - } - if r.customAttributesAttributeName != nil { - parameterAddToQuery(localVarQueryParams, "custom_attributes.{attribute_name}", r.customAttributesAttributeName, "") - } - if r.fields != nil { - parameterAddToQuery(localVarQueryParams, "fields", r.fields, "") - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiUpdateUser2Request struct { - ctx context.Context - ApiService *UsersV2ApiService - userId int32 - mappings *string - validatePolicy *bool - user *User -} - -// Controls how mappings will be applied to the user on creation. Defaults to async. -func (r ApiUpdateUser2Request) Mappings(mappings string) ApiUpdateUser2Request { - r.mappings = &mappings - return r -} - -// Will passwords validate against the User Policy? Defaults to true. -func (r ApiUpdateUser2Request) ValidatePolicy(validatePolicy bool) ApiUpdateUser2Request { - r.validatePolicy = &validatePolicy - return r -} - -func (r ApiUpdateUser2Request) User(user User) ApiUpdateUser2Request { - r.user = &user - return r -} - -func (r ApiUpdateUser2Request) Execute() (*User, *http.Response, error) { - return r.ApiService.UpdateUser2Execute(r) -} - -/* -UpdateUser2 Update User - -Update User - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param userId Set to the id of the user that you want to return. - @return ApiUpdateUser2Request -*/ -func (a *UsersV2ApiService) UpdateUser2(ctx context.Context, userId int32) ApiUpdateUser2Request { - return ApiUpdateUser2Request{ - ApiService: a, - ctx: ctx, - userId: userId, - } -} - -// Execute executes the request -// @return User -func (a *UsersV2ApiService) UpdateUser2Execute(r ApiUpdateUser2Request) (*User, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *User - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsersV2ApiService.UpdateUser2") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/users/{user_id}" - localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - if r.mappings != nil { - parameterAddToQuery(localVarQueryParams, "mappings", r.mappings, "") - } - if r.validatePolicy != nil { - parameterAddToQuery(localVarQueryParams, "validate_policy", r.validatePolicy, "") - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.user - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} diff --git a/api_vigilance_ai.go b/api_vigilance_ai.go deleted file mode 100644 index 1a87ba6..0000000 --- a/api_vigilance_ai.go +++ /dev/null @@ -1,988 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "bytes" - "context" - "io/ioutil" - "net/http" - "net/url" - "strings" -) - - -// VigilanceAIApiService VigilanceAIApi service -type VigilanceAIApiService service - -type ApiCreateRiskRuleRequest struct { - ctx context.Context - ApiService *VigilanceAIApiService - riskRule *RiskRule -} - -func (r ApiCreateRiskRuleRequest) RiskRule(riskRule RiskRule) ApiCreateRiskRuleRequest { - r.riskRule = &riskRule - return r -} - -func (r ApiCreateRiskRuleRequest) Execute() (*RiskRule, *http.Response, error) { - return r.ApiService.CreateRiskRuleExecute(r) -} - -/* -CreateRiskRule Create Rule - -Create Vigilance AI (Risk Service) Rule - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiCreateRiskRuleRequest -*/ -func (a *VigilanceAIApiService) CreateRiskRule(ctx context.Context) ApiCreateRiskRuleRequest { - return ApiCreateRiskRuleRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return RiskRule -func (a *VigilanceAIApiService) CreateRiskRuleExecute(r ApiCreateRiskRuleRequest) (*RiskRule, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *RiskRule - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "VigilanceAIApiService.CreateRiskRule") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/risk/rules" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.riskRule - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiDeleteRiskRuleRequest struct { - ctx context.Context - ApiService *VigilanceAIApiService - ruleId string -} - -func (r ApiDeleteRiskRuleRequest) Execute() (*http.Response, error) { - return r.ApiService.DeleteRiskRuleExecute(r) -} - -/* -DeleteRiskRule Delete Rule - -Delete Vigilance AI (Risk Service) - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param ruleId - @return ApiDeleteRiskRuleRequest -*/ -func (a *VigilanceAIApiService) DeleteRiskRule(ctx context.Context, ruleId string) ApiDeleteRiskRuleRequest { - return ApiDeleteRiskRuleRequest{ - ApiService: a, - ctx: ctx, - ruleId: ruleId, - } -} - -// Execute executes the request -func (a *VigilanceAIApiService) DeleteRiskRuleExecute(r ApiDeleteRiskRuleRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "VigilanceAIApiService.DeleteRiskRule") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/risk/rules/{rule_id}" - localVarPath = strings.Replace(localVarPath, "{"+"rule_id"+"}", url.PathEscape(parameterValueToString(r.ruleId, "ruleId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiGetRiskRuleRequest struct { - ctx context.Context - ApiService *VigilanceAIApiService - ruleId string -} - -func (r ApiGetRiskRuleRequest) Execute() (*RiskRule, *http.Response, error) { - return r.ApiService.GetRiskRuleExecute(r) -} - -/* -GetRiskRule get Risk Rule - -Use this API to return a single rule that has been created in the Risk Sevice. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param ruleId - @return ApiGetRiskRuleRequest -*/ -func (a *VigilanceAIApiService) GetRiskRule(ctx context.Context, ruleId string) ApiGetRiskRuleRequest { - return ApiGetRiskRuleRequest{ - ApiService: a, - ctx: ctx, - ruleId: ruleId, - } -} - -// Execute executes the request -// @return RiskRule -func (a *VigilanceAIApiService) GetRiskRuleExecute(r ApiGetRiskRuleRequest) (*RiskRule, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *RiskRule - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "VigilanceAIApiService.GetRiskRule") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/risk/rules/{rule_id}" - localVarPath = strings.Replace(localVarPath, "{"+"rule_id"+"}", url.PathEscape(parameterValueToString(r.ruleId, "ruleId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetRiskScoreRequest struct { - ctx context.Context - ApiService *VigilanceAIApiService - getRiskScoreRequest *GetRiskScoreRequest - before *string - after *string -} - -func (r ApiGetRiskScoreRequest) GetRiskScoreRequest(getRiskScoreRequest GetRiskScoreRequest) ApiGetRiskScoreRequest { - r.getRiskScoreRequest = &getRiskScoreRequest - return r -} - -// Optional ISO8601 formatted date string. Defaults to current date. Maximum date is 90 days ago. -func (r ApiGetRiskScoreRequest) Before(before string) ApiGetRiskScoreRequest { - r.before = &before - return r -} - -// Optional ISO8601 formatted date string. Defaults to 30 days ago. Maximum date is 90 days ago. -func (r ApiGetRiskScoreRequest) After(after string) ApiGetRiskScoreRequest { - r.after = &after - return r -} - -func (r ApiGetRiskScoreRequest) Execute() (*GetRiskScore200Response, *http.Response, error) { - return r.ApiService.GetRiskScoreExecute(r) -} - -/* -GetRiskScore Get a Risk Score - -Get Vigilance AI (Risk Service) Score - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetRiskScoreRequest -*/ -func (a *VigilanceAIApiService) GetRiskScore(ctx context.Context) ApiGetRiskScoreRequest { - return ApiGetRiskScoreRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return GetRiskScore200Response -func (a *VigilanceAIApiService) GetRiskScoreExecute(r ApiGetRiskScoreRequest) (*GetRiskScore200Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetRiskScore200Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "VigilanceAIApiService.GetRiskScore") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/risk/verify" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.getRiskScoreRequest == nil { - return localVarReturnValue, nil, reportError("getRiskScoreRequest is required and must be specified") - } - - if r.before != nil { - parameterAddToQuery(localVarQueryParams, "before", r.before, "") - } - if r.after != nil { - parameterAddToQuery(localVarQueryParams, "after", r.after, "") - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.getRiskScoreRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetRiskScoresRequest struct { - ctx context.Context - ApiService *VigilanceAIApiService -} - -func (r ApiGetRiskScoresRequest) Execute() (*GetRiskScores200Response, *http.Response, error) { - return r.ApiService.GetRiskScoresExecute(r) -} - -/* -GetRiskScores Get Score Summary - -Get Vigilance AI (Risk Service) Score Summary - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetRiskScoresRequest -*/ -func (a *VigilanceAIApiService) GetRiskScores(ctx context.Context) ApiGetRiskScoresRequest { - return ApiGetRiskScoresRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return GetRiskScores200Response -func (a *VigilanceAIApiService) GetRiskScoresExecute(r ApiGetRiskScoresRequest) (*GetRiskScores200Response, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GetRiskScores200Response - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "VigilanceAIApiService.GetRiskScores") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/risk/scores" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiListRiskRulesRequest struct { - ctx context.Context - ApiService *VigilanceAIApiService -} - -func (r ApiListRiskRulesRequest) Execute() ([]RiskRule, *http.Response, error) { - return r.ApiService.ListRiskRulesExecute(r) -} - -/* -ListRiskRules List Rules - -List Vigilance AI (Risk Service) Rules - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiListRiskRulesRequest -*/ -func (a *VigilanceAIApiService) ListRiskRules(ctx context.Context) ApiListRiskRulesRequest { - return ApiListRiskRulesRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return []RiskRule -func (a *VigilanceAIApiService) ListRiskRulesExecute(r ApiListRiskRulesRequest) ([]RiskRule, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []RiskRule - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "VigilanceAIApiService.ListRiskRules") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/risk/rules" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiTrackRiskEventRequest struct { - ctx context.Context - ApiService *VigilanceAIApiService - trackRiskEventRequest *TrackRiskEventRequest -} - -func (r ApiTrackRiskEventRequest) TrackRiskEventRequest(trackRiskEventRequest TrackRiskEventRequest) ApiTrackRiskEventRequest { - r.trackRiskEventRequest = &trackRiskEventRequest - return r -} - -func (r ApiTrackRiskEventRequest) Execute() (*http.Response, error) { - return r.ApiService.TrackRiskEventExecute(r) -} - -/* -TrackRiskEvent Track an Event - -Track Vigilance AI (Risk Service) Event - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiTrackRiskEventRequest -*/ -func (a *VigilanceAIApiService) TrackRiskEvent(ctx context.Context) ApiTrackRiskEventRequest { - return ApiTrackRiskEventRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -func (a *VigilanceAIApiService) TrackRiskEventExecute(r ApiTrackRiskEventRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "VigilanceAIApiService.TrackRiskEvent") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/risk/events" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.trackRiskEventRequest == nil { - return nil, reportError("trackRiskEventRequest is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.trackRiskEventRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiUpdateRiskRuleRequest struct { - ctx context.Context - ApiService *VigilanceAIApiService - ruleId string - updateRiskRuleRequest *UpdateRiskRuleRequest -} - -func (r ApiUpdateRiskRuleRequest) UpdateRiskRuleRequest(updateRiskRuleRequest UpdateRiskRuleRequest) ApiUpdateRiskRuleRequest { - r.updateRiskRuleRequest = &updateRiskRuleRequest - return r -} - -func (r ApiUpdateRiskRuleRequest) Execute() (*RiskRule, *http.Response, error) { - return r.ApiService.UpdateRiskRuleExecute(r) -} - -/* -UpdateRiskRule Update Rule - -Update Vigilance AI (Risk Service) Rule - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param ruleId - @return ApiUpdateRiskRuleRequest -*/ -func (a *VigilanceAIApiService) UpdateRiskRule(ctx context.Context, ruleId string) ApiUpdateRiskRuleRequest { - return ApiUpdateRiskRuleRequest{ - ApiService: a, - ctx: ctx, - ruleId: ruleId, - } -} - -// Execute executes the request -// @return RiskRule -func (a *VigilanceAIApiService) UpdateRiskRuleExecute(r ApiUpdateRiskRuleRequest) (*RiskRule, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *RiskRule - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "VigilanceAIApiService.UpdateRiskRule") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/api/2/risk/rules/{rule_id}" - localVarPath = strings.Replace(localVarPath, "{"+"rule_id"+"}", url.PathEscape(parameterValueToString(r.ruleId, "ruleId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.updateRiskRuleRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v Error - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} diff --git a/client.go b/client.go deleted file mode 100644 index 97fba65..0000000 --- a/client.go +++ /dev/null @@ -1,738 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "bytes" - "context" - "encoding/json" - "encoding/xml" - "errors" - "fmt" - "io" - "io/ioutil" - "log" - "mime/multipart" - "net/http" - "net/http/httputil" - "net/url" - "os" - "path/filepath" - "reflect" - "regexp" - "strconv" - "strings" - "time" - "unicode/utf8" - - "golang.org/x/oauth2" -) - -var ( - 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 OneLogin API API v3.1.1 -// In most cases there should be only one, shared, APIClient. -type APIClient struct { - cfg *Configuration - common service // Reuse a single struct instead of allocating one for each service on the heap. - - // API Services - - APIAuthClaimsApi *APIAuthClaimsApiService - - APIAuthClientAppsApi *APIAuthClientAppsApiService - - APIAuthScopesApi *APIAuthScopesApiService - - APIAuthorizationServerApi *APIAuthorizationServerApiService - - AppRulesApi *AppRulesApiService - - AppsApi *AppsApiService - - BrandingServiceApi *BrandingServiceApiService - - BrandingServiceSMTPApi *BrandingServiceSMTPApiService - - BrandingServiceTemplatesApi *BrandingServiceTemplatesApiService - - EventsApi *EventsApiService - - GroupsApi *GroupsApiService - - InviteLinksApi *InviteLinksApiService - - MultiFactorAuthenticationApi *MultiFactorAuthenticationApiService - - MultiFactorAuthenticationV1Api *MultiFactorAuthenticationV1ApiService - - OAuth2Api *OAuth2ApiService - - PrivilegesApi *PrivilegesApiService - - RolesApi *RolesApiService - - SAMLAssertionsApi *SAMLAssertionsApiService - - SmartHooksApi *SmartHooksApiService - - UserMappingsApi *UserMappingsApiService - - UsersV1Api *UsersV1ApiService - - UsersV2Api *UsersV2ApiService - - VigilanceAIApi *VigilanceAIApiService -} - -type service struct { - client *APIClient -} - -// NewAPIClient creates a new API client. Requires a userAgent string describing your application. -// optionally a custom http.Client to allow for advanced features such as caching. -func NewAPIClient(cfg *Configuration) *APIClient { - if cfg.HTTPClient == nil { - cfg.HTTPClient = http.DefaultClient - } - - c := &APIClient{} - c.cfg = cfg - c.common.client = c - - // API Services - c.APIAuthClaimsApi = (*APIAuthClaimsApiService)(&c.common) - c.APIAuthClientAppsApi = (*APIAuthClientAppsApiService)(&c.common) - c.APIAuthScopesApi = (*APIAuthScopesApiService)(&c.common) - c.APIAuthorizationServerApi = (*APIAuthorizationServerApiService)(&c.common) - c.AppRulesApi = (*AppRulesApiService)(&c.common) - c.AppsApi = (*AppsApiService)(&c.common) - c.BrandingServiceApi = (*BrandingServiceApiService)(&c.common) - c.BrandingServiceSMTPApi = (*BrandingServiceSMTPApiService)(&c.common) - c.BrandingServiceTemplatesApi = (*BrandingServiceTemplatesApiService)(&c.common) - c.EventsApi = (*EventsApiService)(&c.common) - c.GroupsApi = (*GroupsApiService)(&c.common) - c.InviteLinksApi = (*InviteLinksApiService)(&c.common) - c.MultiFactorAuthenticationApi = (*MultiFactorAuthenticationApiService)(&c.common) - c.MultiFactorAuthenticationV1Api = (*MultiFactorAuthenticationV1ApiService)(&c.common) - c.OAuth2Api = (*OAuth2ApiService)(&c.common) - c.PrivilegesApi = (*PrivilegesApiService)(&c.common) - c.RolesApi = (*RolesApiService)(&c.common) - c.SAMLAssertionsApi = (*SAMLAssertionsApiService)(&c.common) - c.SmartHooksApi = (*SmartHooksApiService)(&c.common) - c.UserMappingsApi = (*UserMappingsApiService)(&c.common) - c.UsersV1Api = (*UsersV1ApiService)(&c.common) - c.UsersV2Api = (*UsersV2ApiService)(&c.common) - c.VigilanceAIApi = (*VigilanceAIApiService)(&c.common) - - return c -} - -func atoi(in string) (int, error) { - return strconv.Atoi(in) -} - -// selectHeaderContentType select a content type from the available list. -func selectHeaderContentType(contentTypes []string) string { - if len(contentTypes) == 0 { - return "" - } - if contains(contentTypes, "application/json") { - return "application/json" - } - return contentTypes[0] // use the first content type specified in 'consumes' -} - -// selectHeaderAccept join all accept types and return -func selectHeaderAccept(accepts []string) string { - if len(accepts) == 0 { - return "" - } - - if contains(accepts, "application/json") { - return "application/json" - } - - return strings.Join(accepts, ",") -} - -// contains is a case insensitive match, finding needle in a haystack -func contains(haystack []string, needle string) bool { - for _, a := range haystack { - if strings.EqualFold(a, needle) { - return true - } - } - return false -} - -// Verify optional parameters are of the correct type. -func typeCheckParameter(obj interface{}, expected string, name string) error { - // Make sure there is an object. - if obj == nil { - return nil - } - - // 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 nil -} - -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]) -} - -// parameterAddToQuery adds the provided object to the url query supporting deep object syntax -func parameterAddToQuery(queryParams 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" - - case reflect.Struct: - if t,ok := obj.(MappedNullable); ok { - dataMap,err := t.ToMap() - if err != nil { - return - } - parameterAddToQuery(queryParams, keyPrefix, dataMap, collectionType) - return - } - if t, ok := obj.(time.Time); ok { - parameterAddToQuery(queryParams, 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 0 || (len(formFiles) > 0) { - if body != nil { - return nil, errors.New("Cannot specify postBody and multipart form at the same time.") - } - body = &bytes.Buffer{} - w := multipart.NewWriter(body) - - for k, v := range formParams { - for _, iv := range v { - if strings.HasPrefix(k, "@") { // file - err = addFile(w, k[1:], iv) - if err != nil { - return nil, err - } - } else { // form value - w.WriteField(k, iv) - } - } - } - for _, formFile := range formFiles { - if len(formFile.fileBytes) > 0 && formFile.fileName != "" { - w.Boundary() - part, err := w.CreateFormFile(formFile.formFileName, filepath.Base(formFile.fileName)) - if err != nil { - return nil, err - } - _, err = part.Write(formFile.fileBytes) - if err != nil { - return nil, err - } - } - } - - // Set the Boundary in the Content-Type - headerParams["Content-Type"] = w.FormDataContentType() - - // Set Content-Length - headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) - w.Close() - } - - if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 { - if body != nil { - return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.") - } - body = &bytes.Buffer{} - body.WriteString(formParams.Encode()) - // Set Content-Length - headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) - } - - // Setup path and query parameters - url, err := url.Parse(path) - if err != nil { - return nil, err - } - - // Override request host, if applicable - if c.cfg.Host != "" { - url.Host = c.cfg.Host - } - - // Override request scheme, if applicable - if c.cfg.Scheme != "" { - url.Scheme = c.cfg.Scheme - } - - // Adding Query Param - query := url.Query() - for k, v := range queryParams { - for _, iv := range v { - query.Add(k, iv) - } - } - - // Encode the parameters. - 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 { - localVarRequest, err = http.NewRequest(method, url.String(), body) - } else { - localVarRequest, err = http.NewRequest(method, url.String(), nil) - } - if err != nil { - return nil, err - } - - // add header parameters, if any - if len(headerParams) > 0 { - headers := http.Header{} - for h, v := range headerParams { - headers[h] = []string{v} - } - localVarRequest.Header = headers - } - - // Add the user agent to the request. - localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent) - - if ctx != nil { - // add context to the request - localVarRequest = localVarRequest.WithContext(ctx) - - // 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) - } - - } - - for header, value := range c.cfg.DefaultHeader { - localVarRequest.Header.Add(header, value) - } - return localVarRequest, nil -} - -func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) { - if len(b) == 0 { - return nil - } - if s, ok := v.(*string); ok { - *s = string(b) - return nil - } - if f, ok := v.(*os.File); ok { - f, err = ioutil.TempFile("", "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") - if err != nil { - return - } - _, err = (*f).Write(b) - if err != nil { - return - } - _, err = (*f).Seek(0, io.SeekStart) - return - } - if xmlCheck.MatchString(contentType) { - if err = xml.Unmarshal(b, v); err != nil { - return err - } - return nil - } - if jsonCheck.MatchString(contentType) { - if actualObj, ok := v.(interface{ GetActualInstance() interface{} }); ok { // oneOf, anyOf schemas - if unmarshalObj, ok := actualObj.(interface{ UnmarshalJSON([]byte) error }); ok { // make sure it has UnmarshalJSON defined - if err = unmarshalObj.UnmarshalJSON(b); err != nil { - return err - } - } else { - return errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined") - } - } else if err = json.Unmarshal(b, v); err != nil { // simple model - return err - } - return nil - } - return errors.New("undefined response type") -} - -// Add a file to the multipart request -func addFile(w *multipart.Writer, fieldName, path string) error { - file, err := os.Open(filepath.Clean(path)) - if err != nil { - return err - } - err = file.Close() - if err != nil { - return err - } - - part, err := w.CreateFormFile(fieldName, filepath.Base(path)) - if err != nil { - return err - } - _, err = io.Copy(part, file) - - return err -} - -// Prevent trying to import "fmt" -func reportError(format string, a ...interface{}) error { - return fmt.Errorf(format, a...) -} - -// A wrapper for strict JSON decoding -func newStrictDecoder(data []byte) *json.Decoder { - dec := json.NewDecoder(bytes.NewBuffer(data)) - dec.DisallowUnknownFields() - return dec -} - -// Set request body from an interface{} -func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) { - if bodyBuf == nil { - bodyBuf = &bytes.Buffer{} - } - - 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 b, ok := body.([]byte); ok { - _, err = bodyBuf.Write(b) - } else if s, ok := body.(string); ok { - _, err = bodyBuf.WriteString(s) - } else if s, ok := body.(*string); ok { - _, err = bodyBuf.WriteString(*s) - } else if jsonCheck.MatchString(contentType) { - err = json.NewEncoder(bodyBuf).Encode(body) - } else if xmlCheck.MatchString(contentType) { - err = xml.NewEncoder(bodyBuf).Encode(body) - } - - if err != nil { - return nil, err - } - - if bodyBuf.Len() == 0 { - err = fmt.Errorf("invalid body type %s\n", contentType) - return nil, err - } - return bodyBuf, nil -} - -// detectContentType method is used to figure out `Request.Body` content type for request header -func detectContentType(body interface{}) string { - contentType := "text/plain; charset=utf-8" - kind := reflect.TypeOf(body).Kind() - - switch kind { - case reflect.Struct, reflect.Map, reflect.Ptr: - contentType = "application/json; charset=utf-8" - case reflect.String: - contentType = "text/plain; charset=utf-8" - default: - if b, ok := body.([]byte); ok { - contentType = http.DetectContentType(b) - } else if kind == reflect.Slice { - contentType = "application/json; charset=utf-8" - } - } - - return contentType -} - -// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go -type cacheControl map[string]string - -func parseCacheControl(headers http.Header) cacheControl { - cc := cacheControl{} - ccHeader := headers.Get("Cache-Control") - for _, part := range strings.Split(ccHeader, ",") { - part = strings.Trim(part, " ") - if part == "" { - continue - } - if strings.ContainsRune(part, '=') { - keyval := strings.Split(part, "=") - cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",") - } else { - cc[part] = "" - } - } - return cc -} - -// CacheExpires helper function to determine remaining time before repeating a request. -func CacheExpires(r *http.Response) time.Time { - // Figure out when the cache expires. - var expires time.Time - now, err := time.Parse(time.RFC1123, r.Header.Get("date")) - if err != nil { - return time.Now() - } - respCacheControl := parseCacheControl(r.Header) - - if maxAge, ok := respCacheControl["max-age"]; ok { - lifetime, err := time.ParseDuration(maxAge + "s") - if err != nil { - expires = now - } else { - expires = now.Add(lifetime) - } - } else { - expiresHeader := r.Header.Get("Expires") - if expiresHeader != "" { - expires, err = time.Parse(time.RFC1123, expiresHeader) - if err != nil { - expires = now - } - } - } - return expires -} - -func strlen(s string) int { - return utf8.RuneCountInString(s) -} - -// GenericOpenAPIError Provides access to the body, error and model on returned errors. -type GenericOpenAPIError struct { - body []byte - error string - model interface{} -} - -// Error returns non-empty string if there was an error. -func (e GenericOpenAPIError) Error() string { - return e.error -} - -// Body returns the raw bytes of the response -func (e GenericOpenAPIError) Body() []byte { - return e.body -} - -// Model returns the unpacked model of the error -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/config.yml b/config.yml new file mode 100644 index 0000000..43e4475 --- /dev/null +++ b/config.yml @@ -0,0 +1 @@ +version: "0.4.0" diff --git a/configuration.go b/configuration.go deleted file mode 100644 index 9ba8f05..0000000 --- a/configuration.go +++ /dev/null @@ -1,221 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "context" - "fmt" - "net/http" - "strings" -) - -// contextKeys are used to identify the type of value in the context. -// Since these are string, it is possible to get a short description of the -// context key for logging and debugging using key.String(). - -type contextKey string - -func (c contextKey) String() string { - return "auth " + string(c) -} - -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") - - // ContextServerIndex uses a server configuration from the index. - ContextServerIndex = contextKey("serverIndex") - - // ContextOperationServerIndices uses a server configuration from the index mapping. - ContextOperationServerIndices = contextKey("serverOperationIndices") - - // ContextServerVariables overrides a server configuration variables. - ContextServerVariables = contextKey("serverVariables") - - // ContextOperationServerVariables overrides a server configuration variables using operation specific values. - ContextOperationServerVariables = contextKey("serverOperationVariables") -) - -// BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth -type BasicAuth struct { - UserName string `json:"userName,omitempty"` - Password string `json:"password,omitempty"` -} - -// APIKey provides API key based authentication to a request passed via context using ContextAPIKey -type APIKey struct { - Key string - Prefix string -} - -// ServerVariable stores the information about a server variable -type ServerVariable struct { - Description string - DefaultValue string - EnumValues []string -} - -// ServerConfiguration stores the information about a server -type ServerConfiguration struct { - URL string - Description string - Variables map[string]ServerVariable -} - -// ServerConfigurations stores multiple ServerConfiguration items -type ServerConfigurations []ServerConfiguration - -// Configuration stores the configuration of the API client -type Configuration struct { - Host string `json:"host,omitempty"` - Scheme string `json:"scheme,omitempty"` - DefaultHeader map[string]string `json:"defaultHeader,omitempty"` - UserAgent string `json:"userAgent,omitempty"` - Debug bool `json:"debug,omitempty"` - Servers ServerConfigurations - OperationServers map[string]ServerConfigurations - HTTPClient *http.Client -} - -// NewConfiguration returns a new Configuration object -func NewConfiguration() *Configuration { - cfg := &Configuration{ - DefaultHeader: make(map[string]string), - UserAgent: "OpenAPI-Generator/3.1.0/go", - Debug: false, - Servers: ServerConfigurations{ - { - URL: "https://your-api-subdomain.onelogin.com", - Description: "No description provided", - }, - }, - OperationServers: map[string]ServerConfigurations{ - }, - } - return cfg -} - -// AddDefaultHeader adds a new HTTP header to the default header in the request -func (c *Configuration) AddDefaultHeader(key string, value string) { - c.DefaultHeader[key] = value -} - -// 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) - } - server := sc[index] - url := server.URL - - // go through variables and replace placeholders - for name, variable := range server.Variables { - if value, ok := variables[name]; ok { - found := bool(len(variable.EnumValues) == 0) - for _, enumValue := range variable.EnumValues { - if value == enumValue { - found = true - } - } - if !found { - 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 { - url = strings.Replace(url, "{"+name+"}", variable.DefaultValue, -1) - } - } - return url, nil -} - -// ServerURL returns URL based on server settings -func (c *Configuration) ServerURL(index int, variables map[string]string) (string, error) { - return c.Servers.URL(index, variables) -} - -func getServerIndex(ctx context.Context) (int, error) { - si := ctx.Value(ContextServerIndex) - if si != nil { - if index, ok := si.(int); ok { - return index, nil - } - return 0, reportError("Invalid type %T should be int", si) - } - return 0, nil -} - -func getServerOperationIndex(ctx context.Context, endpoint string) (int, error) { - osi := ctx.Value(ContextOperationServerIndices) - if osi != nil { - if operationIndices, ok := osi.(map[string]int); !ok { - return 0, reportError("Invalid type %T should be map[string]int", osi) - } else { - index, ok := operationIndices[endpoint] - if ok { - return index, nil - } - } - } - return getServerIndex(ctx) -} - -func getServerVariables(ctx context.Context) (map[string]string, error) { - sv := ctx.Value(ContextServerVariables) - if sv != nil { - if variables, ok := sv.(map[string]string); ok { - return variables, nil - } - return nil, reportError("ctx value of ContextServerVariables has invalid type %T should be map[string]string", sv) - } - return nil, nil -} - -func getServerOperationVariables(ctx context.Context, endpoint string) (map[string]string, error) { - osv := ctx.Value(ContextOperationServerVariables) - if osv != nil { - if operationVariables, ok := osv.(map[string]map[string]string); !ok { - return nil, reportError("ctx value of ContextOperationServerVariables has invalid type %T should be map[string]map[string]string", osv) - } else { - variables, ok := operationVariables[endpoint] - if ok { - return variables, nil - } - } - } - return getServerVariables(ctx) -} - -// ServerURLWithContext returns a new server URL given an endpoint -func (c *Configuration) ServerURLWithContext(ctx context.Context, endpoint string) (string, error) { - sc, ok := c.OperationServers[endpoint] - if !ok { - sc = c.Servers - } - - if ctx == nil { - return sc.URL(0, nil) - } - - index, err := getServerOperationIndex(ctx, endpoint) - if err != nil { - return "", err - } - - variables, err := getServerOperationVariables(ctx, endpoint) - if err != nil { - return "", err - } - - return sc.URL(index, variables) -} diff --git a/docs/APIAuthClaimsApi.md b/docs/APIAuthClaimsApi.md deleted file mode 100644 index d548b63..0000000 --- a/docs/APIAuthClaimsApi.md +++ /dev/null @@ -1,308 +0,0 @@ -# \APIAuthClaimsApi - -All URIs are relative to *https://your-api-subdomain.onelogin.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateAuthClaim**](APIAuthClaimsApi.md#CreateAuthClaim) | **Post** /api/2/api_authorizations/{api_auth_id}/claims | Create Api Auth Server Claim -[**DeleteAuthClaim**](APIAuthClaimsApi.md#DeleteAuthClaim) | **Delete** /api/2/api_authorizations/{api_auth_id}/claims/{claim_id} | Delete Api Auth Server Claim -[**GetAuthclaims**](APIAuthClaimsApi.md#GetAuthclaims) | **Get** /api/2/api_authorizations/{api_auth_id}/claims | Get Api Auth Server claims -[**UpdateClaim**](APIAuthClaimsApi.md#UpdateClaim) | **Put** /api/2/api_authorizations/{api_auth_id}/claims/{claim_id} | Update Api Auth Server Claim - - - -## CreateAuthClaim - -> int32 CreateAuthClaim(ctx, apiAuthId).ContentType(contentType).AuthClaim(authClaim).Execute() - -Create Api Auth Server Claim - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - apiAuthId := "apiAuthId_example" // string | - contentType := "application/json" // string | (optional) (default to "application/json") - authClaim := *openapiclient.NewAuthClaim("email_address") // AuthClaim | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.APIAuthClaimsApi.CreateAuthClaim(context.Background(), apiAuthId).ContentType(contentType).AuthClaim(authClaim).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `APIAuthClaimsApi.CreateAuthClaim``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `CreateAuthClaim`: int32 - fmt.Fprintf(os.Stdout, "Response from `APIAuthClaimsApi.CreateAuthClaim`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**apiAuthId** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiCreateAuthClaimRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **contentType** | **string** | | [default to "application/json"] - **authClaim** | [**AuthClaim**](AuthClaim.md) | | - -### Return type - -**int32** - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## DeleteAuthClaim - -> DeleteAuthClaim(ctx, apiAuthId, claimId).ContentType(contentType).Execute() - -Delete Api Auth Server Claim - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - apiAuthId := "apiAuthId_example" // string | - claimId := int32(56) // int32 | - contentType := "application/json" // string | (optional) (default to "application/json") - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.APIAuthClaimsApi.DeleteAuthClaim(context.Background(), apiAuthId, claimId).ContentType(contentType).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `APIAuthClaimsApi.DeleteAuthClaim``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**apiAuthId** | **string** | | -**claimId** | **int32** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiDeleteAuthClaimRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - **contentType** | **string** | | [default to "application/json"] - -### Return type - - (empty response body) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetAuthclaims - -> []TokenClaim GetAuthclaims(ctx, apiAuthId).ContentType(contentType).Execute() - -Get Api Auth Server claims - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - apiAuthId := "apiAuthId_example" // string | - contentType := "application/json" // string | (optional) (default to "application/json") - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.APIAuthClaimsApi.GetAuthclaims(context.Background(), apiAuthId).ContentType(contentType).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `APIAuthClaimsApi.GetAuthclaims``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetAuthclaims`: []TokenClaim - fmt.Fprintf(os.Stdout, "Response from `APIAuthClaimsApi.GetAuthclaims`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**apiAuthId** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetAuthclaimsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **contentType** | **string** | | [default to "application/json"] - -### Return type - -[**[]TokenClaim**](TokenClaim.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## UpdateClaim - -> AuthId UpdateClaim(ctx, apiAuthId, claimId).ContentType(contentType).AuthClaim(authClaim).Execute() - -Update Api Auth Server Claim - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - apiAuthId := "apiAuthId_example" // string | - claimId := int32(56) // int32 | - contentType := "application/json" // string | (optional) (default to "application/json") - authClaim := *openapiclient.NewAuthClaim("email_address") // AuthClaim | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.APIAuthClaimsApi.UpdateClaim(context.Background(), apiAuthId, claimId).ContentType(contentType).AuthClaim(authClaim).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `APIAuthClaimsApi.UpdateClaim``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `UpdateClaim`: AuthId - fmt.Fprintf(os.Stdout, "Response from `APIAuthClaimsApi.UpdateClaim`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**apiAuthId** | **string** | | -**claimId** | **int32** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiUpdateClaimRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - **contentType** | **string** | | [default to "application/json"] - **authClaim** | [**AuthClaim**](AuthClaim.md) | | - -### Return type - -[**AuthId**](AuthId.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/docs/APIAuthClientAppsApi.md b/docs/APIAuthClientAppsApi.md deleted file mode 100644 index 5296ed3..0000000 --- a/docs/APIAuthClientAppsApi.md +++ /dev/null @@ -1,310 +0,0 @@ -# \APIAuthClientAppsApi - -All URIs are relative to *https://your-api-subdomain.onelogin.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**AddClientApp**](APIAuthClientAppsApi.md#AddClientApp) | **Post** /api/2/api_authorizations/{api_auth_id}/clients | Add Client App -[**DeleteClientApp**](APIAuthClientAppsApi.md#DeleteClientApp) | **Delete** /api/2/api_authorizations/{api_auth_id}/clients/{client_app_id} | Remove Client App -[**ListClientApps**](APIAuthClientAppsApi.md#ListClientApps) | **Get** /api/2/api_authorizations/{api_auth_id}/clients | List Clients Apps -[**UpdateClientApp**](APIAuthClientAppsApi.md#UpdateClientApp) | **Put** /api/2/api_authorizations/{api_auth_id}/clients/{client_app_id} | Update Client App - - - -## AddClientApp - -> AddClientApp201Response AddClientApp(ctx, apiAuthId).ContentType(contentType).AddClientAppRequest(addClientAppRequest).Execute() - -Add Client App - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - apiAuthId := "apiAuthId_example" // string | - contentType := "application/json" // string | (optional) (default to "application/json") - addClientAppRequest := *openapiclient.NewAddClientAppRequest() // AddClientAppRequest | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.APIAuthClientAppsApi.AddClientApp(context.Background(), apiAuthId).ContentType(contentType).AddClientAppRequest(addClientAppRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `APIAuthClientAppsApi.AddClientApp``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AddClientApp`: AddClientApp201Response - fmt.Fprintf(os.Stdout, "Response from `APIAuthClientAppsApi.AddClientApp`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**apiAuthId** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiAddClientAppRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **contentType** | **string** | | [default to "application/json"] - **addClientAppRequest** | [**AddClientAppRequest**](AddClientAppRequest.md) | | - -### Return type - -[**AddClientApp201Response**](AddClientApp201Response.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## DeleteClientApp - -> AddClientApp201Response DeleteClientApp(ctx, apiAuthId, clientAppId).ContentType(contentType).Execute() - -Remove Client App - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - apiAuthId := "apiAuthId_example" // string | - clientAppId := int32(56) // int32 | - contentType := "application/json" // string | (optional) (default to "application/json") - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.APIAuthClientAppsApi.DeleteClientApp(context.Background(), apiAuthId, clientAppId).ContentType(contentType).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `APIAuthClientAppsApi.DeleteClientApp``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `DeleteClientApp`: AddClientApp201Response - fmt.Fprintf(os.Stdout, "Response from `APIAuthClientAppsApi.DeleteClientApp`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**apiAuthId** | **string** | | -**clientAppId** | **int32** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiDeleteClientAppRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - **contentType** | **string** | | [default to "application/json"] - -### Return type - -[**AddClientApp201Response**](AddClientApp201Response.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## ListClientApps - -> ClientAppFull ListClientApps(ctx, apiAuthId).ContentType(contentType).Execute() - -List Clients Apps - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - apiAuthId := "apiAuthId_example" // string | - contentType := "application/json" // string | (optional) (default to "application/json") - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.APIAuthClientAppsApi.ListClientApps(context.Background(), apiAuthId).ContentType(contentType).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `APIAuthClientAppsApi.ListClientApps``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ListClientApps`: ClientAppFull - fmt.Fprintf(os.Stdout, "Response from `APIAuthClientAppsApi.ListClientApps`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**apiAuthId** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiListClientAppsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **contentType** | **string** | | [default to "application/json"] - -### Return type - -[**ClientAppFull**](ClientAppFull.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## UpdateClientApp - -> AddClientApp201Response UpdateClientApp(ctx, apiAuthId, clientAppId).ContentType(contentType).UpdateClientAppRequest(updateClientAppRequest).Execute() - -Update Client App - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - apiAuthId := "apiAuthId_example" // string | - clientAppId := int32(56) // int32 | - contentType := "application/json" // string | (optional) (default to "application/json") - updateClientAppRequest := *openapiclient.NewUpdateClientAppRequest() // UpdateClientAppRequest | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.APIAuthClientAppsApi.UpdateClientApp(context.Background(), apiAuthId, clientAppId).ContentType(contentType).UpdateClientAppRequest(updateClientAppRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `APIAuthClientAppsApi.UpdateClientApp``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `UpdateClientApp`: AddClientApp201Response - fmt.Fprintf(os.Stdout, "Response from `APIAuthClientAppsApi.UpdateClientApp`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**apiAuthId** | **string** | | -**clientAppId** | **int32** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiUpdateClientAppRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - **contentType** | **string** | | [default to "application/json"] - **updateClientAppRequest** | [**UpdateClientAppRequest**](UpdateClientAppRequest.md) | | - -### Return type - -[**AddClientApp201Response**](AddClientApp201Response.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/docs/APIAuthScopesApi.md b/docs/APIAuthScopesApi.md deleted file mode 100644 index 6c772af..0000000 --- a/docs/APIAuthScopesApi.md +++ /dev/null @@ -1,308 +0,0 @@ -# \APIAuthScopesApi - -All URIs are relative to *https://your-api-subdomain.onelogin.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateScope**](APIAuthScopesApi.md#CreateScope) | **Post** /api/2/api_authorizations/{api_auth_id}/scopes | Create Api Auth Server Scope -[**DeleteScope**](APIAuthScopesApi.md#DeleteScope) | **Delete** /api/2/api_authorizations/{api_auth_id}/scopes/{scope_id} | Delete Api Auth Server Scope -[**GetScopes**](APIAuthScopesApi.md#GetScopes) | **Get** /api/2/api_authorizations/{api_auth_id}/scopes | Get Api Auth Server Scopes -[**UpdateScope**](APIAuthScopesApi.md#UpdateScope) | **Put** /api/2/api_authorizations/{api_auth_id}/scopes/{scope_id} | Update Api Auth Server Scope - - - -## CreateScope - -> AuthScope CreateScope(ctx, apiAuthId).ContentType(contentType).AuthScope(authScope).Execute() - -Create Api Auth Server Scope - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - apiAuthId := "apiAuthId_example" // string | - contentType := "application/json" // string | (optional) (default to "application/json") - authScope := *openapiclient.NewAuthScope() // AuthScope | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.APIAuthScopesApi.CreateScope(context.Background(), apiAuthId).ContentType(contentType).AuthScope(authScope).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `APIAuthScopesApi.CreateScope``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `CreateScope`: AuthScope - fmt.Fprintf(os.Stdout, "Response from `APIAuthScopesApi.CreateScope`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**apiAuthId** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiCreateScopeRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **contentType** | **string** | | [default to "application/json"] - **authScope** | [**AuthScope**](AuthScope.md) | | - -### Return type - -[**AuthScope**](AuthScope.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## DeleteScope - -> DeleteScope(ctx, apiAuthId, scopeId).ContentType(contentType).Execute() - -Delete Api Auth Server Scope - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - apiAuthId := "apiAuthId_example" // string | - scopeId := int32(56) // int32 | - contentType := "application/json" // string | (optional) (default to "application/json") - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.APIAuthScopesApi.DeleteScope(context.Background(), apiAuthId, scopeId).ContentType(contentType).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `APIAuthScopesApi.DeleteScope``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**apiAuthId** | **string** | | -**scopeId** | **int32** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiDeleteScopeRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - **contentType** | **string** | | [default to "application/json"] - -### Return type - - (empty response body) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetScopes - -> []AuthScope GetScopes(ctx, apiAuthId).ContentType(contentType).Execute() - -Get Api Auth Server Scopes - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - apiAuthId := "apiAuthId_example" // string | - contentType := "application/json" // string | (optional) (default to "application/json") - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.APIAuthScopesApi.GetScopes(context.Background(), apiAuthId).ContentType(contentType).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `APIAuthScopesApi.GetScopes``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetScopes`: []AuthScope - fmt.Fprintf(os.Stdout, "Response from `APIAuthScopesApi.GetScopes`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**apiAuthId** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetScopesRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **contentType** | **string** | | [default to "application/json"] - -### Return type - -[**[]AuthScope**](AuthScope.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## UpdateScope - -> AuthId UpdateScope(ctx, apiAuthId, scopeId).ContentType(contentType).AuthScope(authScope).Execute() - -Update Api Auth Server Scope - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - apiAuthId := "apiAuthId_example" // string | - scopeId := int32(56) // int32 | - contentType := "application/json" // string | (optional) (default to "application/json") - authScope := *openapiclient.NewAuthScope() // AuthScope | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.APIAuthScopesApi.UpdateScope(context.Background(), apiAuthId, scopeId).ContentType(contentType).AuthScope(authScope).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `APIAuthScopesApi.UpdateScope``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `UpdateScope`: AuthId - fmt.Fprintf(os.Stdout, "Response from `APIAuthScopesApi.UpdateScope`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**apiAuthId** | **string** | | -**scopeId** | **int32** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiUpdateScopeRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - **contentType** | **string** | | [default to "application/json"] - **authScope** | [**AuthScope**](AuthScope.md) | | - -### Return type - -[**AuthId**](AuthId.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/docs/APIAuthorizationServerApi.md b/docs/APIAuthorizationServerApi.md deleted file mode 100644 index 2e7ee7b..0000000 --- a/docs/APIAuthorizationServerApi.md +++ /dev/null @@ -1,358 +0,0 @@ -# \APIAuthorizationServerApi - -All URIs are relative to *https://your-api-subdomain.onelogin.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateAuthServer**](APIAuthorizationServerApi.md#CreateAuthServer) | **Post** /api/2/api_authorizations | Create Api Auth Server -[**DeleteAuthServer**](APIAuthorizationServerApi.md#DeleteAuthServer) | **Delete** /api/2/api_authorizations/{api_auth_id} | Delete Api Auth Server -[**GetAuthServer**](APIAuthorizationServerApi.md#GetAuthServer) | **Get** /api/2/api_authorizations/{api_auth_id} | Get Api Auth Server -[**ListAuthServers**](APIAuthorizationServerApi.md#ListAuthServers) | **Get** /api/2/api_authorizations | List Api Auth Servers -[**UpdateAuthServer**](APIAuthorizationServerApi.md#UpdateAuthServer) | **Put** /api/2/api_authorizations/{api_auth_id} | Update Api Auth Server - - - -## CreateAuthServer - -> AuthServer CreateAuthServer(ctx).ContentType(contentType).AuthServer(authServer).Execute() - -Create Api Auth Server - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - contentType := "application/json" // string | (optional) (default to "application/json") - authServer := *openapiclient.NewAuthServer("Contacts API", "API manages contacts", *openapiclient.NewAuthServerConfiguration([]string{"Audiences_example"}, "https://example.com/contacts")) // AuthServer | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.APIAuthorizationServerApi.CreateAuthServer(context.Background()).ContentType(contentType).AuthServer(authServer).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `APIAuthorizationServerApi.CreateAuthServer``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `CreateAuthServer`: AuthServer - fmt.Fprintf(os.Stdout, "Response from `APIAuthorizationServerApi.CreateAuthServer`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiCreateAuthServerRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **contentType** | **string** | | [default to "application/json"] - **authServer** | [**AuthServer**](AuthServer.md) | | - -### Return type - -[**AuthServer**](AuthServer.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## DeleteAuthServer - -> DeleteAuthServer(ctx, apiAuthId).ContentType(contentType).Execute() - -Delete Api Auth Server - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - apiAuthId := "apiAuthId_example" // string | - contentType := "application/json" // string | (optional) (default to "application/json") - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.APIAuthorizationServerApi.DeleteAuthServer(context.Background(), apiAuthId).ContentType(contentType).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `APIAuthorizationServerApi.DeleteAuthServer``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**apiAuthId** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiDeleteAuthServerRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **contentType** | **string** | | [default to "application/json"] - -### Return type - - (empty response body) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetAuthServer - -> AuthServer GetAuthServer(ctx, apiAuthId).ContentType(contentType).Execute() - -Get Api Auth Server - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - apiAuthId := "apiAuthId_example" // string | - contentType := "application/json" // string | (optional) (default to "application/json") - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.APIAuthorizationServerApi.GetAuthServer(context.Background(), apiAuthId).ContentType(contentType).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `APIAuthorizationServerApi.GetAuthServer``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetAuthServer`: AuthServer - fmt.Fprintf(os.Stdout, "Response from `APIAuthorizationServerApi.GetAuthServer`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**apiAuthId** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetAuthServerRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **contentType** | **string** | | [default to "application/json"] - -### Return type - -[**AuthServer**](AuthServer.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## ListAuthServers - -> []AuthServer ListAuthServers(ctx).Execute() - -List Api Auth Servers - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.APIAuthorizationServerApi.ListAuthServers(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `APIAuthorizationServerApi.ListAuthServers``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ListAuthServers`: []AuthServer - fmt.Fprintf(os.Stdout, "Response from `APIAuthorizationServerApi.ListAuthServers`: %v\n", resp) -} -``` - -### Path Parameters - -This endpoint does not need any parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a apiListAuthServersRequest struct via the builder pattern - - -### Return type - -[**[]AuthServer**](AuthServer.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## UpdateAuthServer - -> AuthServer UpdateAuthServer(ctx, apiAuthId).ContentType(contentType).AuthServer(authServer).Execute() - -Update Api Auth Server - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - apiAuthId := "apiAuthId_example" // string | - contentType := "application/json" // string | (optional) (default to "application/json") - authServer := *openapiclient.NewAuthServer("Contacts API", "API manages contacts", *openapiclient.NewAuthServerConfiguration([]string{"Audiences_example"}, "https://example.com/contacts")) // AuthServer | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.APIAuthorizationServerApi.UpdateAuthServer(context.Background(), apiAuthId).ContentType(contentType).AuthServer(authServer).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `APIAuthorizationServerApi.UpdateAuthServer``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `UpdateAuthServer`: AuthServer - fmt.Fprintf(os.Stdout, "Response from `APIAuthorizationServerApi.UpdateAuthServer`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**apiAuthId** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiUpdateAuthServerRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **contentType** | **string** | | [default to "application/json"] - **authServer** | [**AuthServer**](AuthServer.md) | | - -### Return type - -[**AuthServer**](AuthServer.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/docs/ActionObj.md b/docs/ActionObj.md deleted file mode 100644 index cec1137..0000000 --- a/docs/ActionObj.md +++ /dev/null @@ -1,82 +0,0 @@ -# ActionObj - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Action** | Pointer to **string** | The action to apply | [optional] -**Value** | Pointer to **[]string** | Only applicable to provisioned and set_* actions. Items in the array will be a plain text string or valid value for the selected action. | [optional] - -## Methods - -### NewActionObj - -`func NewActionObj() *ActionObj` - -NewActionObj instantiates a new ActionObj 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 - -### NewActionObjWithDefaults - -`func NewActionObjWithDefaults() *ActionObj` - -NewActionObjWithDefaults instantiates a new ActionObj 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 - -### GetAction - -`func (o *ActionObj) GetAction() string` - -GetAction returns the Action field if non-nil, zero value otherwise. - -### GetActionOk - -`func (o *ActionObj) GetActionOk() (*string, bool)` - -GetActionOk returns a tuple with the Action field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAction - -`func (o *ActionObj) SetAction(v string)` - -SetAction sets Action field to given value. - -### HasAction - -`func (o *ActionObj) HasAction() bool` - -HasAction returns a boolean if a field has been set. - -### GetValue - -`func (o *ActionObj) GetValue() []string` - -GetValue returns the Value field if non-nil, zero value otherwise. - -### GetValueOk - -`func (o *ActionObj) GetValueOk() (*[]string, bool)` - -GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetValue - -`func (o *ActionObj) SetValue(v []string)` - -SetValue sets Value field to given value. - -### HasValue - -`func (o *ActionObj) HasValue() bool` - -HasValue 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/ActivateMfaFactorsRequest.md b/docs/ActivateMfaFactorsRequest.md deleted file mode 100644 index f594520..0000000 --- a/docs/ActivateMfaFactorsRequest.md +++ /dev/null @@ -1,108 +0,0 @@ -# ActivateMfaFactorsRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**StateTokenExpiresIn** | Pointer to **int32** | Optional. Sets the window of time in seconds that the factor must be verified within. Defaults to 120 seconds (2 minutes). Max 900 seconds (15 minutes). | [optional] -**NumericSmsOtp** | Pointer to **bool** | Optional. Defaults to false. Only applies to SMS factor. When set to `true` a 6 digit numeric code will be sent to the user instead of the standard code which is alphanumeric. | [optional] -**SmsMessage** | Pointer to **string** | Optional. Only applies to SMS factor. A message template that will be sent via SMS. Max length of the message after template items are inserted is 160 characters. The following template variables can be included in the message. - {{otp_code}} - The security code. - {{expiration}} - The number of minutes until the one time code expires. | [optional] - -## Methods - -### NewActivateMfaFactorsRequest - -`func NewActivateMfaFactorsRequest() *ActivateMfaFactorsRequest` - -NewActivateMfaFactorsRequest instantiates a new ActivateMfaFactorsRequest 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 - -### NewActivateMfaFactorsRequestWithDefaults - -`func NewActivateMfaFactorsRequestWithDefaults() *ActivateMfaFactorsRequest` - -NewActivateMfaFactorsRequestWithDefaults instantiates a new ActivateMfaFactorsRequest 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 - -### GetStateTokenExpiresIn - -`func (o *ActivateMfaFactorsRequest) GetStateTokenExpiresIn() int32` - -GetStateTokenExpiresIn returns the StateTokenExpiresIn field if non-nil, zero value otherwise. - -### GetStateTokenExpiresInOk - -`func (o *ActivateMfaFactorsRequest) GetStateTokenExpiresInOk() (*int32, bool)` - -GetStateTokenExpiresInOk returns a tuple with the StateTokenExpiresIn field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStateTokenExpiresIn - -`func (o *ActivateMfaFactorsRequest) SetStateTokenExpiresIn(v int32)` - -SetStateTokenExpiresIn sets StateTokenExpiresIn field to given value. - -### HasStateTokenExpiresIn - -`func (o *ActivateMfaFactorsRequest) HasStateTokenExpiresIn() bool` - -HasStateTokenExpiresIn returns a boolean if a field has been set. - -### GetNumericSmsOtp - -`func (o *ActivateMfaFactorsRequest) GetNumericSmsOtp() bool` - -GetNumericSmsOtp returns the NumericSmsOtp field if non-nil, zero value otherwise. - -### GetNumericSmsOtpOk - -`func (o *ActivateMfaFactorsRequest) GetNumericSmsOtpOk() (*bool, bool)` - -GetNumericSmsOtpOk returns a tuple with the NumericSmsOtp field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetNumericSmsOtp - -`func (o *ActivateMfaFactorsRequest) SetNumericSmsOtp(v bool)` - -SetNumericSmsOtp sets NumericSmsOtp field to given value. - -### HasNumericSmsOtp - -`func (o *ActivateMfaFactorsRequest) HasNumericSmsOtp() bool` - -HasNumericSmsOtp returns a boolean if a field has been set. - -### GetSmsMessage - -`func (o *ActivateMfaFactorsRequest) GetSmsMessage() string` - -GetSmsMessage returns the SmsMessage field if non-nil, zero value otherwise. - -### GetSmsMessageOk - -`func (o *ActivateMfaFactorsRequest) GetSmsMessageOk() (*string, bool)` - -GetSmsMessageOk returns a tuple with the SmsMessage field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSmsMessage - -`func (o *ActivateMfaFactorsRequest) SetSmsMessage(v string)` - -SetSmsMessage sets SmsMessage field to given value. - -### HasSmsMessage - -`func (o *ActivateMfaFactorsRequest) HasSmsMessage() bool` - -HasSmsMessage 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/AddClientApp201Response.md b/docs/AddClientApp201Response.md deleted file mode 100644 index a24bcd4..0000000 --- a/docs/AddClientApp201Response.md +++ /dev/null @@ -1,82 +0,0 @@ -# AddClientApp201Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**AppId** | Pointer to **int32** | | [optional] -**ApiAuthId** | Pointer to **int32** | | [optional] - -## Methods - -### NewAddClientApp201Response - -`func NewAddClientApp201Response() *AddClientApp201Response` - -NewAddClientApp201Response instantiates a new AddClientApp201Response 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 - -### NewAddClientApp201ResponseWithDefaults - -`func NewAddClientApp201ResponseWithDefaults() *AddClientApp201Response` - -NewAddClientApp201ResponseWithDefaults instantiates a new AddClientApp201Response 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 - -### GetAppId - -`func (o *AddClientApp201Response) GetAppId() int32` - -GetAppId returns the AppId field if non-nil, zero value otherwise. - -### GetAppIdOk - -`func (o *AddClientApp201Response) GetAppIdOk() (*int32, bool)` - -GetAppIdOk returns a tuple with the AppId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAppId - -`func (o *AddClientApp201Response) SetAppId(v int32)` - -SetAppId sets AppId field to given value. - -### HasAppId - -`func (o *AddClientApp201Response) HasAppId() bool` - -HasAppId returns a boolean if a field has been set. - -### GetApiAuthId - -`func (o *AddClientApp201Response) GetApiAuthId() int32` - -GetApiAuthId returns the ApiAuthId field if non-nil, zero value otherwise. - -### GetApiAuthIdOk - -`func (o *AddClientApp201Response) GetApiAuthIdOk() (*int32, bool)` - -GetApiAuthIdOk returns a tuple with the ApiAuthId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetApiAuthId - -`func (o *AddClientApp201Response) SetApiAuthId(v int32)` - -SetApiAuthId sets ApiAuthId field to given value. - -### HasApiAuthId - -`func (o *AddClientApp201Response) HasApiAuthId() bool` - -HasApiAuthId 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/AddClientAppRequest.md b/docs/AddClientAppRequest.md deleted file mode 100644 index 5dd85fb..0000000 --- a/docs/AddClientAppRequest.md +++ /dev/null @@ -1,82 +0,0 @@ -# AddClientAppRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**AppId** | Pointer to **int32** | The ID of the OpenId Connect app to allow access through. | [optional] -**Scopes** | Pointer to **[]int32** | An array of Scope IDs that represent scopes the app can request | [optional] - -## Methods - -### NewAddClientAppRequest - -`func NewAddClientAppRequest() *AddClientAppRequest` - -NewAddClientAppRequest instantiates a new AddClientAppRequest 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 - -### NewAddClientAppRequestWithDefaults - -`func NewAddClientAppRequestWithDefaults() *AddClientAppRequest` - -NewAddClientAppRequestWithDefaults instantiates a new AddClientAppRequest 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 - -### GetAppId - -`func (o *AddClientAppRequest) GetAppId() int32` - -GetAppId returns the AppId field if non-nil, zero value otherwise. - -### GetAppIdOk - -`func (o *AddClientAppRequest) GetAppIdOk() (*int32, bool)` - -GetAppIdOk returns a tuple with the AppId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAppId - -`func (o *AddClientAppRequest) SetAppId(v int32)` - -SetAppId sets AppId field to given value. - -### HasAppId - -`func (o *AddClientAppRequest) HasAppId() bool` - -HasAppId returns a boolean if a field has been set. - -### GetScopes - -`func (o *AddClientAppRequest) GetScopes() []int32` - -GetScopes returns the Scopes field if non-nil, zero value otherwise. - -### GetScopesOk - -`func (o *AddClientAppRequest) GetScopesOk() (*[]int32, bool)` - -GetScopesOk returns a tuple with the Scopes field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetScopes - -`func (o *AddClientAppRequest) SetScopes(v []int32)` - -SetScopes sets Scopes field to given value. - -### HasScopes - -`func (o *AddClientAppRequest) HasScopes() bool` - -HasScopes 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/AddPrivilegeToRole201Response.md b/docs/AddPrivilegeToRole201Response.md deleted file mode 100644 index e952172..0000000 --- a/docs/AddPrivilegeToRole201Response.md +++ /dev/null @@ -1,56 +0,0 @@ -# AddPrivilegeToRole201Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Success** | Pointer to **bool** | | [optional] - -## Methods - -### NewAddPrivilegeToRole201Response - -`func NewAddPrivilegeToRole201Response() *AddPrivilegeToRole201Response` - -NewAddPrivilegeToRole201Response instantiates a new AddPrivilegeToRole201Response 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 - -### NewAddPrivilegeToRole201ResponseWithDefaults - -`func NewAddPrivilegeToRole201ResponseWithDefaults() *AddPrivilegeToRole201Response` - -NewAddPrivilegeToRole201ResponseWithDefaults instantiates a new AddPrivilegeToRole201Response 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 - -### GetSuccess - -`func (o *AddPrivilegeToRole201Response) GetSuccess() bool` - -GetSuccess returns the Success field if non-nil, zero value otherwise. - -### GetSuccessOk - -`func (o *AddPrivilegeToRole201Response) GetSuccessOk() (*bool, bool)` - -GetSuccessOk returns a tuple with the Success field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSuccess - -`func (o *AddPrivilegeToRole201Response) SetSuccess(v bool)` - -SetSuccess sets Success field to given value. - -### HasSuccess - -`func (o *AddPrivilegeToRole201Response) HasSuccess() bool` - -HasSuccess 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/AddPrivilegeToRoleRequest.md b/docs/AddPrivilegeToRoleRequest.md deleted file mode 100644 index b8cb6b4..0000000 --- a/docs/AddPrivilegeToRoleRequest.md +++ /dev/null @@ -1,56 +0,0 @@ -# AddPrivilegeToRoleRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Roles** | Pointer to **[]int32** | | [optional] - -## Methods - -### NewAddPrivilegeToRoleRequest - -`func NewAddPrivilegeToRoleRequest() *AddPrivilegeToRoleRequest` - -NewAddPrivilegeToRoleRequest instantiates a new AddPrivilegeToRoleRequest 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 - -### NewAddPrivilegeToRoleRequestWithDefaults - -`func NewAddPrivilegeToRoleRequestWithDefaults() *AddPrivilegeToRoleRequest` - -NewAddPrivilegeToRoleRequestWithDefaults instantiates a new AddPrivilegeToRoleRequest 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 - -### GetRoles - -`func (o *AddPrivilegeToRoleRequest) GetRoles() []int32` - -GetRoles returns the Roles field if non-nil, zero value otherwise. - -### GetRolesOk - -`func (o *AddPrivilegeToRoleRequest) GetRolesOk() (*[]int32, bool)` - -GetRolesOk returns a tuple with the Roles field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRoles - -`func (o *AddPrivilegeToRoleRequest) SetRoles(v []int32)` - -SetRoles sets Roles field to given value. - -### HasRoles - -`func (o *AddPrivilegeToRoleRequest) HasRoles() bool` - -HasRoles 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/AddRolesToUserRequest.md b/docs/AddRolesToUserRequest.md deleted file mode 100644 index 5ab4c04..0000000 --- a/docs/AddRolesToUserRequest.md +++ /dev/null @@ -1,51 +0,0 @@ -# AddRolesToUserRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**RoleIdArray** | **[]int32** | Set to an array of one or more role IDs. The IDs must be positive integers. | - -## Methods - -### NewAddRolesToUserRequest - -`func NewAddRolesToUserRequest(roleIdArray []int32, ) *AddRolesToUserRequest` - -NewAddRolesToUserRequest instantiates a new AddRolesToUserRequest 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 - -### NewAddRolesToUserRequestWithDefaults - -`func NewAddRolesToUserRequestWithDefaults() *AddRolesToUserRequest` - -NewAddRolesToUserRequestWithDefaults instantiates a new AddRolesToUserRequest 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 - -### GetRoleIdArray - -`func (o *AddRolesToUserRequest) GetRoleIdArray() []int32` - -GetRoleIdArray returns the RoleIdArray field if non-nil, zero value otherwise. - -### GetRoleIdArrayOk - -`func (o *AddRolesToUserRequest) GetRoleIdArrayOk() (*[]int32, bool)` - -GetRoleIdArrayOk returns a tuple with the RoleIdArray field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRoleIdArray - -`func (o *AddRolesToUserRequest) SetRoleIdArray(v []int32)` - -SetRoleIdArray sets RoleIdArray 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/AltErr.md b/docs/AltErr.md deleted file mode 100644 index 0d25019..0000000 --- a/docs/AltErr.md +++ /dev/null @@ -1,108 +0,0 @@ -# AltErr - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**StatusCode** | Pointer to **int32** | HTTP error code https://developer.mozilla.org/en-US/docs/Web/HTTP/Status | [optional] -**Name** | Pointer to **string** | Error Code Name | [optional] -**Message** | Pointer to **string** | Description of Error | [optional] - -## Methods - -### NewAltErr - -`func NewAltErr() *AltErr` - -NewAltErr instantiates a new AltErr 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 - -### NewAltErrWithDefaults - -`func NewAltErrWithDefaults() *AltErr` - -NewAltErrWithDefaults instantiates a new AltErr 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 - -### GetStatusCode - -`func (o *AltErr) GetStatusCode() int32` - -GetStatusCode returns the StatusCode field if non-nil, zero value otherwise. - -### GetStatusCodeOk - -`func (o *AltErr) GetStatusCodeOk() (*int32, bool)` - -GetStatusCodeOk returns a tuple with the StatusCode field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStatusCode - -`func (o *AltErr) SetStatusCode(v int32)` - -SetStatusCode sets StatusCode field to given value. - -### HasStatusCode - -`func (o *AltErr) HasStatusCode() bool` - -HasStatusCode returns a boolean if a field has been set. - -### GetName - -`func (o *AltErr) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *AltErr) 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 *AltErr) SetName(v string)` - -SetName sets Name field to given value. - -### HasName - -`func (o *AltErr) HasName() bool` - -HasName returns a boolean if a field has been set. - -### GetMessage - -`func (o *AltErr) GetMessage() string` - -GetMessage returns the Message field if non-nil, zero value otherwise. - -### GetMessageOk - -`func (o *AltErr) GetMessageOk() (*string, bool)` - -GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMessage - -`func (o *AltErr) SetMessage(v string)` - -SetMessage sets Message field to given value. - -### HasMessage - -`func (o *AltErr) HasMessage() bool` - -HasMessage 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/AppParameters.md b/docs/AppParameters.md deleted file mode 100644 index db048b9..0000000 --- a/docs/AppParameters.md +++ /dev/null @@ -1,134 +0,0 @@ -# AppParameters - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**UserAttributeMappings** | Pointer to **string** | A user attribute to map values from For custom attributes prefix the name of the attribute with `custom_attribute_`. e.g. To get the value for custom attribute `employee_id` use `custom_attribute_employee_id`. | [optional] -**UserAttributeMacros** | Pointer to **string** | When `user_attribute_mappings` is set to `_macro_` this macro will be used to assign the parameter value. | [optional] -**Label** | Pointer to **string** | The can only be set when creating a new parameter. It can not be updated. | [optional] -**IncludeInSamlAssertion** | Pointer to **bool** | When true, this parameter will be included in a SAML assertion payload. | [optional] - -## Methods - -### NewAppParameters - -`func NewAppParameters() *AppParameters` - -NewAppParameters instantiates a new AppParameters 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 - -### NewAppParametersWithDefaults - -`func NewAppParametersWithDefaults() *AppParameters` - -NewAppParametersWithDefaults instantiates a new AppParameters 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 - -### GetUserAttributeMappings - -`func (o *AppParameters) GetUserAttributeMappings() string` - -GetUserAttributeMappings returns the UserAttributeMappings field if non-nil, zero value otherwise. - -### GetUserAttributeMappingsOk - -`func (o *AppParameters) GetUserAttributeMappingsOk() (*string, bool)` - -GetUserAttributeMappingsOk returns a tuple with the UserAttributeMappings field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUserAttributeMappings - -`func (o *AppParameters) SetUserAttributeMappings(v string)` - -SetUserAttributeMappings sets UserAttributeMappings field to given value. - -### HasUserAttributeMappings - -`func (o *AppParameters) HasUserAttributeMappings() bool` - -HasUserAttributeMappings returns a boolean if a field has been set. - -### GetUserAttributeMacros - -`func (o *AppParameters) GetUserAttributeMacros() string` - -GetUserAttributeMacros returns the UserAttributeMacros field if non-nil, zero value otherwise. - -### GetUserAttributeMacrosOk - -`func (o *AppParameters) GetUserAttributeMacrosOk() (*string, bool)` - -GetUserAttributeMacrosOk returns a tuple with the UserAttributeMacros field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUserAttributeMacros - -`func (o *AppParameters) SetUserAttributeMacros(v string)` - -SetUserAttributeMacros sets UserAttributeMacros field to given value. - -### HasUserAttributeMacros - -`func (o *AppParameters) HasUserAttributeMacros() bool` - -HasUserAttributeMacros returns a boolean if a field has been set. - -### GetLabel - -`func (o *AppParameters) GetLabel() string` - -GetLabel returns the Label field if non-nil, zero value otherwise. - -### GetLabelOk - -`func (o *AppParameters) GetLabelOk() (*string, bool)` - -GetLabelOk returns a tuple with the Label field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLabel - -`func (o *AppParameters) SetLabel(v string)` - -SetLabel sets Label field to given value. - -### HasLabel - -`func (o *AppParameters) HasLabel() bool` - -HasLabel returns a boolean if a field has been set. - -### GetIncludeInSamlAssertion - -`func (o *AppParameters) GetIncludeInSamlAssertion() bool` - -GetIncludeInSamlAssertion returns the IncludeInSamlAssertion field if non-nil, zero value otherwise. - -### GetIncludeInSamlAssertionOk - -`func (o *AppParameters) GetIncludeInSamlAssertionOk() (*bool, bool)` - -GetIncludeInSamlAssertionOk returns a tuple with the IncludeInSamlAssertion field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIncludeInSamlAssertion - -`func (o *AppParameters) SetIncludeInSamlAssertion(v bool)` - -SetIncludeInSamlAssertion sets IncludeInSamlAssertion field to given value. - -### HasIncludeInSamlAssertion - -`func (o *AppParameters) HasIncludeInSamlAssertion() bool` - -HasIncludeInSamlAssertion 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/AppRule.md b/docs/AppRule.md deleted file mode 100644 index 3d8701d..0000000 --- a/docs/AppRule.md +++ /dev/null @@ -1,212 +0,0 @@ -# AppRule - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | Pointer to **int32** | App Rule ID | [optional] -**Name** | Pointer to **string** | Rule Name | [optional] -**Match** | Pointer to **string** | Indicates how conditions should be matched. | [optional] -**Enabled** | Pointer to **bool** | Indicates if the rule is enabled or not. | [optional] -**Position** | Pointer to **int32** | Indicates the order of the rule. When `null` this will default to last position. | [optional] -**Conditions** | Pointer to [**[]Condition**](Condition.md) | An array of conditions that the user must meet in order for the rule to be applied. | [optional] -**Actions** | Pointer to [**[]ActionObj**](ActionObj.md) | | [optional] - -## Methods - -### NewAppRule - -`func NewAppRule() *AppRule` - -NewAppRule instantiates a new AppRule 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 - -### NewAppRuleWithDefaults - -`func NewAppRuleWithDefaults() *AppRule` - -NewAppRuleWithDefaults instantiates a new AppRule 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 - -### GetId - -`func (o *AppRule) GetId() int32` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *AppRule) GetIdOk() (*int32, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *AppRule) SetId(v int32)` - -SetId sets Id field to given value. - -### HasId - -`func (o *AppRule) HasId() bool` - -HasId returns a boolean if a field has been set. - -### GetName - -`func (o *AppRule) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *AppRule) 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 *AppRule) SetName(v string)` - -SetName sets Name field to given value. - -### HasName - -`func (o *AppRule) HasName() bool` - -HasName returns a boolean if a field has been set. - -### GetMatch - -`func (o *AppRule) GetMatch() string` - -GetMatch returns the Match field if non-nil, zero value otherwise. - -### GetMatchOk - -`func (o *AppRule) GetMatchOk() (*string, bool)` - -GetMatchOk returns a tuple with the Match field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMatch - -`func (o *AppRule) SetMatch(v string)` - -SetMatch sets Match field to given value. - -### HasMatch - -`func (o *AppRule) HasMatch() bool` - -HasMatch returns a boolean if a field has been set. - -### GetEnabled - -`func (o *AppRule) GetEnabled() bool` - -GetEnabled returns the Enabled field if non-nil, zero value otherwise. - -### GetEnabledOk - -`func (o *AppRule) 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 *AppRule) SetEnabled(v bool)` - -SetEnabled sets Enabled field to given value. - -### HasEnabled - -`func (o *AppRule) HasEnabled() bool` - -HasEnabled returns a boolean if a field has been set. - -### GetPosition - -`func (o *AppRule) GetPosition() int32` - -GetPosition returns the Position field if non-nil, zero value otherwise. - -### GetPositionOk - -`func (o *AppRule) GetPositionOk() (*int32, bool)` - -GetPositionOk returns a tuple with the Position field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPosition - -`func (o *AppRule) SetPosition(v int32)` - -SetPosition sets Position field to given value. - -### HasPosition - -`func (o *AppRule) HasPosition() bool` - -HasPosition returns a boolean if a field has been set. - -### GetConditions - -`func (o *AppRule) GetConditions() []Condition` - -GetConditions returns the Conditions field if non-nil, zero value otherwise. - -### GetConditionsOk - -`func (o *AppRule) GetConditionsOk() (*[]Condition, bool)` - -GetConditionsOk returns a tuple with the Conditions field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConditions - -`func (o *AppRule) SetConditions(v []Condition)` - -SetConditions sets Conditions field to given value. - -### HasConditions - -`func (o *AppRule) HasConditions() bool` - -HasConditions returns a boolean if a field has been set. - -### GetActions - -`func (o *AppRule) GetActions() []ActionObj` - -GetActions returns the Actions field if non-nil, zero value otherwise. - -### GetActionsOk - -`func (o *AppRule) GetActionsOk() (*[]ActionObj, bool)` - -GetActionsOk returns a tuple with the Actions field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetActions - -`func (o *AppRule) SetActions(v []ActionObj)` - -SetActions sets Actions field to given value. - -### HasActions - -`func (o *AppRule) HasActions() bool` - -HasActions 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/AppRulesApi.md b/docs/AppRulesApi.md deleted file mode 100644 index dab9064..0000000 --- a/docs/AppRulesApi.md +++ /dev/null @@ -1,821 +0,0 @@ -# \AppRulesApi - -All URIs are relative to *https://your-api-subdomain.onelogin.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateAppRule**](AppRulesApi.md#CreateAppRule) | **Post** /api/2/apps/{app_id}/rules | -[**DeleteRule**](AppRulesApi.md#DeleteRule) | **Delete** /api/2/apps/{app_id}/rules/{rule_id} | Delete Rule -[**GetAppRule**](AppRulesApi.md#GetAppRule) | **Get** /api/2/apps/{app_id}/rules/{rule_id} | Get Rule -[**ListActionValies**](AppRulesApi.md#ListActionValies) | **Get** /api/2/apps/{app_id}/rules/actions/{rule_action_value}/values | List Actions Values -[**ListActions**](AppRulesApi.md#ListActions) | **Get** /api/2/apps/{app_id}/rules/actions | List Actions -[**ListAppRules**](AppRulesApi.md#ListAppRules) | **Get** /api/2/apps/{app_id}/rules | List Rules -[**ListConditionOperators**](AppRulesApi.md#ListConditionOperators) | **Get** /api/2/apps/{app_id}/rules/conditions/{rule_condition_value}/operators | List Conditions Operators -[**ListConditionValues**](AppRulesApi.md#ListConditionValues) | **Get** /api/2/apps/{app_id}/rules/conditions/{rule_condition_value}/values | List Conditions Values -[**ListConditions**](AppRulesApi.md#ListConditions) | **Get** /api/2/apps/{app_id}/rules/conditions | List Conditions -[**SortAppRules**](AppRulesApi.md#SortAppRules) | **Put** /api/2/apps/{app_id}/rules/sort | Bulk Sort -[**UpdateAppRule**](AppRulesApi.md#UpdateAppRule) | **Put** /api/2/apps/{app_id}/rules/{rule_id} | Update Rule - - - -## CreateAppRule - -> AppRule CreateAppRule(ctx, appId).AppRule(appRule).Execute() - - - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - appId := int32(56) // int32 | - appRule := *openapiclient.NewAppRule() // AppRule | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AppRulesApi.CreateAppRule(context.Background(), appId).AppRule(appRule).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AppRulesApi.CreateAppRule``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `CreateAppRule`: AppRule - fmt.Fprintf(os.Stdout, "Response from `AppRulesApi.CreateAppRule`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**appId** | **int32** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiCreateAppRuleRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **appRule** | [**AppRule**](AppRule.md) | | - -### Return type - -[**AppRule**](AppRule.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## DeleteRule - -> DeleteRule(ctx, appId, ruleId).Execute() - -Delete Rule - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - appId := int32(56) // int32 | - ruleId := "ruleId_example" // string | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AppRulesApi.DeleteRule(context.Background(), appId, ruleId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AppRulesApi.DeleteRule``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**appId** | **int32** | | -**ruleId** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiDeleteRuleRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - -### Return type - - (empty response body) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetAppRule - -> AppRule GetAppRule(ctx, appId, ruleId).Execute() - -Get Rule - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - appId := int32(56) // int32 | - ruleId := "ruleId_example" // string | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AppRulesApi.GetAppRule(context.Background(), appId, ruleId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AppRulesApi.GetAppRule``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetAppRule`: AppRule - fmt.Fprintf(os.Stdout, "Response from `AppRulesApi.GetAppRule`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**appId** | **int32** | | -**ruleId** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetAppRuleRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - -### Return type - -[**AppRule**](AppRule.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## ListActionValies - -> []RuleAction ListActionValies(ctx, appId, ruleActionValue).Execute() - -List Actions Values - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - appId := int32(56) // int32 | - ruleActionValue := "ruleActionValue_example" // string | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AppRulesApi.ListActionValies(context.Background(), appId, ruleActionValue).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AppRulesApi.ListActionValies``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ListActionValies`: []RuleAction - fmt.Fprintf(os.Stdout, "Response from `AppRulesApi.ListActionValies`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**appId** | **int32** | | -**ruleActionValue** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiListActionValiesRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - -### Return type - -[**[]RuleAction**](RuleAction.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## ListActions - -> []RuleAction ListActions(ctx, appId).Execute() - -List Actions - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - appId := int32(56) // int32 | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AppRulesApi.ListActions(context.Background(), appId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AppRulesApi.ListActions``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ListActions`: []RuleAction - fmt.Fprintf(os.Stdout, "Response from `AppRulesApi.ListActions`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**appId** | **int32** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiListActionsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**[]RuleAction**](RuleAction.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## ListAppRules - -> []AppRule ListAppRules(ctx, appId).HasCondition(hasCondition).HasConditionType(hasConditionType).HasAction(hasAction).HasActionType(hasActionType).Enabled(enabled).Execute() - -List Rules - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - appId := int32(56) // int32 | - hasCondition := "has_condition=has_role:123456" // string | Filters Rules based on their Conditions. Values formatted as :, where name is the Condition to look for, and value is the value to find. Multiple filters can be declared by using a comma delimited list. Wildcards are supported in both the name and value fields. For example: Single filter. has_condition=has_role:123456 Multiple filters. has_condition=has_role:123456,status:1 Wildcard for conditions. has_condition=*:123456 Wildcard for condition values. has_condition=has_role:* (optional) - hasConditionType := "hasConditionType_example" // string | Filters Rules based on their Conditions. Values formatted as :, where name is the Condition to look for, and value is the value to find. Multiple filters can be declared by using a comma delimited list. Wildcards are supported in both the name and value fields. For example: Single filter. has_condition=has_role:123456 Multiple filters. has_condition=has_role:123456,status:1 Wildcard for conditions. has_condition=*:123456 Wildcard for condition values. has_condition=has_role:* (optional) - hasAction := "has_action=set_groups:123456,set_usertype:*" // string | Filters Rules based on their Actions. Values formatted as :, where name is the Action to look for, and value is the value to find. Multiple filters can be declared by using a comma delimited list. Wildcards are supported in both the name and value fields. For example: Single filter. has_action=set_licenses:123456 Multiple filters. has_action=set_groups:123456,set_usertype:* Wildcard for actions. has_action=*:123456 Wildcard for action values. has_action=set_userprincipalname:* (optional) - hasActionType := "hasActionType_example" // string | Filters Rules based on their action types. Allowed values are: builtin - actions that involve standard attributes custom - actions that involve custom attributes none - no actions are defined For example: Find Rules with no actions has_action_type=none (optional) - enabled := true // bool | Defaults to true. When set to `false` will return all disabled mappings. (optional) (default to true) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AppRulesApi.ListAppRules(context.Background(), appId).HasCondition(hasCondition).HasConditionType(hasConditionType).HasAction(hasAction).HasActionType(hasActionType).Enabled(enabled).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AppRulesApi.ListAppRules``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ListAppRules`: []AppRule - fmt.Fprintf(os.Stdout, "Response from `AppRulesApi.ListAppRules`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**appId** | **int32** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiListAppRulesRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **hasCondition** | **string** | Filters Rules based on their Conditions. Values formatted as :, where name is the Condition to look for, and value is the value to find. Multiple filters can be declared by using a comma delimited list. Wildcards are supported in both the name and value fields. For example: Single filter. has_condition=has_role:123456 Multiple filters. has_condition=has_role:123456,status:1 Wildcard for conditions. has_condition=*:123456 Wildcard for condition values. has_condition=has_role:* | - **hasConditionType** | **string** | Filters Rules based on their Conditions. Values formatted as :, where name is the Condition to look for, and value is the value to find. Multiple filters can be declared by using a comma delimited list. Wildcards are supported in both the name and value fields. For example: Single filter. has_condition=has_role:123456 Multiple filters. has_condition=has_role:123456,status:1 Wildcard for conditions. has_condition=*:123456 Wildcard for condition values. has_condition=has_role:* | - **hasAction** | **string** | Filters Rules based on their Actions. Values formatted as :, where name is the Action to look for, and value is the value to find. Multiple filters can be declared by using a comma delimited list. Wildcards are supported in both the name and value fields. For example: Single filter. has_action=set_licenses:123456 Multiple filters. has_action=set_groups:123456,set_usertype:* Wildcard for actions. has_action=*:123456 Wildcard for action values. has_action=set_userprincipalname:* | - **hasActionType** | **string** | Filters Rules based on their action types. Allowed values are: builtin - actions that involve standard attributes custom - actions that involve custom attributes none - no actions are defined For example: Find Rules with no actions has_action_type=none | - **enabled** | **bool** | Defaults to true. When set to `false` will return all disabled mappings. | [default to true] - -### Return type - -[**[]AppRule**](AppRule.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## ListConditionOperators - -> []RuleCondition ListConditionOperators(ctx, appId, ruleConditionValue).Execute() - -List Conditions Operators - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - appId := int32(56) // int32 | - ruleConditionValue := "ruleConditionValue_example" // string | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AppRulesApi.ListConditionOperators(context.Background(), appId, ruleConditionValue).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AppRulesApi.ListConditionOperators``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ListConditionOperators`: []RuleCondition - fmt.Fprintf(os.Stdout, "Response from `AppRulesApi.ListConditionOperators`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**appId** | **int32** | | -**ruleConditionValue** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiListConditionOperatorsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - -### Return type - -[**[]RuleCondition**](RuleCondition.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## ListConditionValues - -> RuleCondition ListConditionValues(ctx, appId, ruleConditionValue).Execute() - -List Conditions Values - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - appId := int32(56) // int32 | - ruleConditionValue := "ruleConditionValue_example" // string | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AppRulesApi.ListConditionValues(context.Background(), appId, ruleConditionValue).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AppRulesApi.ListConditionValues``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ListConditionValues`: RuleCondition - fmt.Fprintf(os.Stdout, "Response from `AppRulesApi.ListConditionValues`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**appId** | **int32** | | -**ruleConditionValue** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiListConditionValuesRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - -### Return type - -[**RuleCondition**](RuleCondition.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## ListConditions - -> []ListConditions200ResponseInner ListConditions(ctx, appId).Execute() - -List Conditions - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - appId := int32(56) // int32 | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AppRulesApi.ListConditions(context.Background(), appId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AppRulesApi.ListConditions``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ListConditions`: []ListConditions200ResponseInner - fmt.Fprintf(os.Stdout, "Response from `AppRulesApi.ListConditions`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**appId** | **int32** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiListConditionsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**[]ListConditions200ResponseInner**](ListConditions200ResponseInner.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## SortAppRules - -> []int32 SortAppRules(ctx, appId).RequestBody(requestBody).Execute() - -Bulk Sort - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - appId := int32(56) // int32 | - requestBody := []int32{int32(123)} // []int32 | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AppRulesApi.SortAppRules(context.Background(), appId).RequestBody(requestBody).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AppRulesApi.SortAppRules``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `SortAppRules`: []int32 - fmt.Fprintf(os.Stdout, "Response from `AppRulesApi.SortAppRules`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**appId** | **int32** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiSortAppRulesRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **requestBody** | **[]int32** | | - -### Return type - -**[]int32** - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## UpdateAppRule - -> AppRule UpdateAppRule(ctx, appId, ruleId).AppRule(appRule).Execute() - -Update Rule - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - appId := int32(56) // int32 | - ruleId := "ruleId_example" // string | - appRule := *openapiclient.NewAppRule() // AppRule | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AppRulesApi.UpdateAppRule(context.Background(), appId, ruleId).AppRule(appRule).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AppRulesApi.UpdateAppRule``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `UpdateAppRule`: AppRule - fmt.Fprintf(os.Stdout, "Response from `AppRulesApi.UpdateAppRule`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**appId** | **int32** | | -**ruleId** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiUpdateAppRuleRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - **appRule** | [**AppRule**](AppRule.md) | | - -### Return type - -[**AppRule**](AppRule.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/docs/AppsApi.md b/docs/AppsApi.md deleted file mode 100644 index 1f6bc6f..0000000 --- a/docs/AppsApi.md +++ /dev/null @@ -1,562 +0,0 @@ -# \AppsApi - -All URIs are relative to *https://your-api-subdomain.onelogin.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateApp**](AppsApi.md#CreateApp) | **Post** /api/2/apps | Create App -[**DeleteApp**](AppsApi.md#DeleteApp) | **Delete** /api/2/apps/{app_id} | Delete App -[**DeleteAppParameter**](AppsApi.md#DeleteAppParameter) | **Delete** /api/2/apps/{app_id}/parameters/{parameter_id} | Delete Parameter from App -[**GetApp**](AppsApi.md#GetApp) | **Get** /api/2/apps/{app_id} | Get App -[**GetAppUsers**](AppsApi.md#GetAppUsers) | **Get** /api/2/apps/{app_id}/users | Get App Users -[**ListApps**](AppsApi.md#ListApps) | **Get** /api/2/apps | List Apps -[**ListConnectors**](AppsApi.md#ListConnectors) | **Get** /api/2/connectors | List Connectors -[**UpdateApp**](AppsApi.md#UpdateApp) | **Put** /api/2/apps/{app_id} | Update App - - - -## CreateApp - -> CreateApp200Response CreateApp(ctx).ContentType(contentType).CreateAppRequest(createAppRequest).Execute() - -Create App - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - contentType := "application/json" // string | (optional) (default to "application/json") - createAppRequest := openapiclient.createApp_request{GenericApp: openapiclient.NewGenericApp()} // CreateAppRequest | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AppsApi.CreateApp(context.Background()).ContentType(contentType).CreateAppRequest(createAppRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AppsApi.CreateApp``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `CreateApp`: CreateApp200Response - fmt.Fprintf(os.Stdout, "Response from `AppsApi.CreateApp`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiCreateAppRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **contentType** | **string** | | [default to "application/json"] - **createAppRequest** | [**CreateAppRequest**](CreateAppRequest.md) | | - -### Return type - -[**CreateApp200Response**](CreateApp200Response.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## DeleteApp - -> DeleteApp(ctx, appId).Execute() - -Delete App - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - appId := int32(56) // int32 | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AppsApi.DeleteApp(context.Background(), appId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AppsApi.DeleteApp``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**appId** | **int32** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiDeleteAppRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - - (empty response body) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## DeleteAppParameter - -> DeleteAppParameter(ctx, appId, parameterId).Execute() - -Delete Parameter from App - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - appId := int32(56) // int32 | - parameterId := "parameterId_example" // string | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AppsApi.DeleteAppParameter(context.Background(), appId, parameterId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AppsApi.DeleteAppParameter``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**appId** | **int32** | | -**parameterId** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiDeleteAppParameterRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - -### Return type - - (empty response body) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetApp - -> GenericApp GetApp(ctx, appId).Execute() - -Get App - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - appId := int32(56) // int32 | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AppsApi.GetApp(context.Background(), appId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AppsApi.GetApp``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetApp`: GenericApp - fmt.Fprintf(os.Stdout, "Response from `AppsApi.GetApp`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**appId** | **int32** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetAppRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**GenericApp**](GenericApp.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetAppUsers - -> []User GetAppUsers(ctx, appId).Execute() - -Get App Users - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - appId := int32(56) // int32 | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AppsApi.GetAppUsers(context.Background(), appId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AppsApi.GetAppUsers``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetAppUsers`: []User - fmt.Fprintf(os.Stdout, "Response from `AppsApi.GetAppUsers`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**appId** | **int32** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetAppUsersRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**[]User**](User.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## ListApps - -> []GenericApp ListApps(ctx).Execute() - -List Apps - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AppsApi.ListApps(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AppsApi.ListApps``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ListApps`: []GenericApp - fmt.Fprintf(os.Stdout, "Response from `AppsApi.ListApps`: %v\n", resp) -} -``` - -### Path Parameters - -This endpoint does not need any parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a apiListAppsRequest struct via the builder pattern - - -### Return type - -[**[]GenericApp**](GenericApp.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## ListConnectors - -> Connector ListConnectors(ctx).Name(name).Execute() - -List Connectors - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - name := "name_example" // string | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AppsApi.ListConnectors(context.Background()).Name(name).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AppsApi.ListConnectors``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ListConnectors`: Connector - fmt.Fprintf(os.Stdout, "Response from `AppsApi.ListConnectors`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiListConnectorsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **name** | **string** | | - -### Return type - -[**Connector**](Connector.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## UpdateApp - -> GenericApp UpdateApp(ctx, appId).RequestBody(requestBody).Execute() - -Update App - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - appId := int32(56) // int32 | - requestBody := map[string]interface{}{"key": interface{}(123)} // map[string]interface{} | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AppsApi.UpdateApp(context.Background(), appId).RequestBody(requestBody).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AppsApi.UpdateApp``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `UpdateApp`: GenericApp - fmt.Fprintf(os.Stdout, "Response from `AppsApi.UpdateApp`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**appId** | **int32** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiUpdateAppRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **requestBody** | **map[string]interface{}** | | - -### Return type - -[**GenericApp**](GenericApp.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/docs/AssignUsersToPrivilegeRequest.md b/docs/AssignUsersToPrivilegeRequest.md deleted file mode 100644 index 0d9c7f8..0000000 --- a/docs/AssignUsersToPrivilegeRequest.md +++ /dev/null @@ -1,56 +0,0 @@ -# AssignUsersToPrivilegeRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Users** | Pointer to **[]int32** | | [optional] - -## Methods - -### NewAssignUsersToPrivilegeRequest - -`func NewAssignUsersToPrivilegeRequest() *AssignUsersToPrivilegeRequest` - -NewAssignUsersToPrivilegeRequest instantiates a new AssignUsersToPrivilegeRequest 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 - -### NewAssignUsersToPrivilegeRequestWithDefaults - -`func NewAssignUsersToPrivilegeRequestWithDefaults() *AssignUsersToPrivilegeRequest` - -NewAssignUsersToPrivilegeRequestWithDefaults instantiates a new AssignUsersToPrivilegeRequest 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 - -### GetUsers - -`func (o *AssignUsersToPrivilegeRequest) GetUsers() []int32` - -GetUsers returns the Users field if non-nil, zero value otherwise. - -### GetUsersOk - -`func (o *AssignUsersToPrivilegeRequest) 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 *AssignUsersToPrivilegeRequest) SetUsers(v []int32)` - -SetUsers sets Users field to given value. - -### HasUsers - -`func (o *AssignUsersToPrivilegeRequest) HasUsers() bool` - -HasUsers 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/AuthClaim.md b/docs/AuthClaim.md deleted file mode 100644 index 09f7a16..0000000 --- a/docs/AuthClaim.md +++ /dev/null @@ -1,103 +0,0 @@ -# AuthClaim - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | The attribute name for the claim when its returned in an Access Token | -**UserAttributeMappings** | Pointer to **string** | A user attribute to map values from For custom attributes prefix the name of the attribute with `custom_attribute_`. e.g. To get the value for custom attribute `employee_id` use `custom_attribute_employee_id`. | [optional] -**UserAttributeMacros** | Pointer to **string** | When `user_attribute_mappings` is set to `_macro_` this macro will be used to assign the parameter value. | [optional] - -## Methods - -### NewAuthClaim - -`func NewAuthClaim(name string, ) *AuthClaim` - -NewAuthClaim instantiates a new AuthClaim 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 - -### NewAuthClaimWithDefaults - -`func NewAuthClaimWithDefaults() *AuthClaim` - -NewAuthClaimWithDefaults instantiates a new AuthClaim 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 *AuthClaim) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *AuthClaim) 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 *AuthClaim) SetName(v string)` - -SetName sets Name field to given value. - - -### GetUserAttributeMappings - -`func (o *AuthClaim) GetUserAttributeMappings() string` - -GetUserAttributeMappings returns the UserAttributeMappings field if non-nil, zero value otherwise. - -### GetUserAttributeMappingsOk - -`func (o *AuthClaim) GetUserAttributeMappingsOk() (*string, bool)` - -GetUserAttributeMappingsOk returns a tuple with the UserAttributeMappings field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUserAttributeMappings - -`func (o *AuthClaim) SetUserAttributeMappings(v string)` - -SetUserAttributeMappings sets UserAttributeMappings field to given value. - -### HasUserAttributeMappings - -`func (o *AuthClaim) HasUserAttributeMappings() bool` - -HasUserAttributeMappings returns a boolean if a field has been set. - -### GetUserAttributeMacros - -`func (o *AuthClaim) GetUserAttributeMacros() string` - -GetUserAttributeMacros returns the UserAttributeMacros field if non-nil, zero value otherwise. - -### GetUserAttributeMacrosOk - -`func (o *AuthClaim) GetUserAttributeMacrosOk() (*string, bool)` - -GetUserAttributeMacrosOk returns a tuple with the UserAttributeMacros field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUserAttributeMacros - -`func (o *AuthClaim) SetUserAttributeMacros(v string)` - -SetUserAttributeMacros sets UserAttributeMacros field to given value. - -### HasUserAttributeMacros - -`func (o *AuthClaim) HasUserAttributeMacros() bool` - -HasUserAttributeMacros 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/AuthId.md b/docs/AuthId.md deleted file mode 100644 index 91598d1..0000000 --- a/docs/AuthId.md +++ /dev/null @@ -1,56 +0,0 @@ -# AuthId - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | Pointer to **int32** | Unique ID for the Scope | [optional] - -## Methods - -### NewAuthId - -`func NewAuthId() *AuthId` - -NewAuthId instantiates a new AuthId 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 - -### NewAuthIdWithDefaults - -`func NewAuthIdWithDefaults() *AuthId` - -NewAuthIdWithDefaults instantiates a new AuthId 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 - -### GetId - -`func (o *AuthId) GetId() int32` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *AuthId) GetIdOk() (*int32, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *AuthId) SetId(v int32)` - -SetId sets Id field to given value. - -### HasId - -`func (o *AuthId) HasId() bool` - -HasId 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/AuthMethod.md b/docs/AuthMethod.md deleted file mode 100644 index 8b02bd1..0000000 --- a/docs/AuthMethod.md +++ /dev/null @@ -1,27 +0,0 @@ -# AuthMethod - -## Enum - - -* `_0` (value: `0`) - -* `_1` (value: `1`) - -* `_2` (value: `2`) - -* `_3` (value: `3`) - -* `_4` (value: `4`) - -* `_5` (value: `5`) - -* `_6` (value: `6`) - -* `_7` (value: `7`) - -* `_8` (value: `8`) - - -[[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/AuthScope.md b/docs/AuthScope.md deleted file mode 100644 index aedc8b1..0000000 --- a/docs/AuthScope.md +++ /dev/null @@ -1,108 +0,0 @@ -# AuthScope - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | Pointer to **int32** | Unique ID for the Scope | [optional] [readonly] -**Value** | Pointer to **string** | A value representing the api scope that with be authorized | [optional] -**Description** | Pointer to **string** | A description of what access the scope enables | [optional] - -## Methods - -### NewAuthScope - -`func NewAuthScope() *AuthScope` - -NewAuthScope instantiates a new AuthScope 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 - -### NewAuthScopeWithDefaults - -`func NewAuthScopeWithDefaults() *AuthScope` - -NewAuthScopeWithDefaults instantiates a new AuthScope 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 - -### GetId - -`func (o *AuthScope) GetId() int32` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *AuthScope) GetIdOk() (*int32, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *AuthScope) SetId(v int32)` - -SetId sets Id field to given value. - -### HasId - -`func (o *AuthScope) HasId() bool` - -HasId returns a boolean if a field has been set. - -### GetValue - -`func (o *AuthScope) GetValue() string` - -GetValue returns the Value field if non-nil, zero value otherwise. - -### GetValueOk - -`func (o *AuthScope) GetValueOk() (*string, bool)` - -GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetValue - -`func (o *AuthScope) SetValue(v string)` - -SetValue sets Value field to given value. - -### HasValue - -`func (o *AuthScope) HasValue() bool` - -HasValue returns a boolean if a field has been set. - -### GetDescription - -`func (o *AuthScope) GetDescription() string` - -GetDescription returns the Description field if non-nil, zero value otherwise. - -### GetDescriptionOk - -`func (o *AuthScope) GetDescriptionOk() (*string, bool)` - -GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDescription - -`func (o *AuthScope) SetDescription(v string)` - -SetDescription sets Description field to given value. - -### HasDescription - -`func (o *AuthScope) HasDescription() bool` - -HasDescription 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/AuthServer.md b/docs/AuthServer.md deleted file mode 100644 index 74c160b..0000000 --- a/docs/AuthServer.md +++ /dev/null @@ -1,119 +0,0 @@ -# AuthServer - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | Pointer to **int32** | Auth server unique ID in Onelogin | [optional] [readonly] -**Name** | **string** | Name of the API. | -**Description** | **string** | Description of what the API does. | -**Configuration** | [**AuthServerConfiguration**](AuthServerConfiguration.md) | | - -## Methods - -### NewAuthServer - -`func NewAuthServer(name string, description string, configuration AuthServerConfiguration, ) *AuthServer` - -NewAuthServer instantiates a new AuthServer 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 - -### NewAuthServerWithDefaults - -`func NewAuthServerWithDefaults() *AuthServer` - -NewAuthServerWithDefaults instantiates a new AuthServer 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 - -### GetId - -`func (o *AuthServer) GetId() int32` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *AuthServer) GetIdOk() (*int32, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *AuthServer) SetId(v int32)` - -SetId sets Id field to given value. - -### HasId - -`func (o *AuthServer) HasId() bool` - -HasId returns a boolean if a field has been set. - -### GetName - -`func (o *AuthServer) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *AuthServer) 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 *AuthServer) SetName(v string)` - -SetName sets Name field to given value. - - -### GetDescription - -`func (o *AuthServer) GetDescription() string` - -GetDescription returns the Description field if non-nil, zero value otherwise. - -### GetDescriptionOk - -`func (o *AuthServer) GetDescriptionOk() (*string, bool)` - -GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDescription - -`func (o *AuthServer) SetDescription(v string)` - -SetDescription sets Description field to given value. - - -### GetConfiguration - -`func (o *AuthServer) GetConfiguration() AuthServerConfiguration` - -GetConfiguration returns the Configuration field if non-nil, zero value otherwise. - -### GetConfigurationOk - -`func (o *AuthServer) GetConfigurationOk() (*AuthServerConfiguration, bool)` - -GetConfigurationOk returns a tuple with the Configuration field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConfiguration - -`func (o *AuthServer) SetConfiguration(v AuthServerConfiguration)` - -SetConfiguration sets Configuration 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/AuthServerConfiguration.md b/docs/AuthServerConfiguration.md deleted file mode 100644 index c512f49..0000000 --- a/docs/AuthServerConfiguration.md +++ /dev/null @@ -1,124 +0,0 @@ -# AuthServerConfiguration - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Audiences** | **[]string** | List of API endpoints that will be returned in Access Tokens. | -**RefreshTokenExpirationMinutes** | Pointer to **int32** | The number of minutes until refresh token expires. There is no maximum expiry limit. | [optional] -**ResourceIdentifier** | **string** | Unique identifier for the API that the Authorization Server will issue Access Tokens for. | -**AccessTokenExpirationMinutes** | Pointer to **int32** | The number of minutes until access token expires. There is no maximum expiry limit. | [optional] - -## Methods - -### NewAuthServerConfiguration - -`func NewAuthServerConfiguration(audiences []string, resourceIdentifier string, ) *AuthServerConfiguration` - -NewAuthServerConfiguration instantiates a new AuthServerConfiguration 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 - -### NewAuthServerConfigurationWithDefaults - -`func NewAuthServerConfigurationWithDefaults() *AuthServerConfiguration` - -NewAuthServerConfigurationWithDefaults instantiates a new AuthServerConfiguration 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 - -### GetAudiences - -`func (o *AuthServerConfiguration) GetAudiences() []string` - -GetAudiences returns the Audiences field if non-nil, zero value otherwise. - -### GetAudiencesOk - -`func (o *AuthServerConfiguration) GetAudiencesOk() (*[]string, bool)` - -GetAudiencesOk returns a tuple with the Audiences field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAudiences - -`func (o *AuthServerConfiguration) SetAudiences(v []string)` - -SetAudiences sets Audiences field to given value. - - -### GetRefreshTokenExpirationMinutes - -`func (o *AuthServerConfiguration) GetRefreshTokenExpirationMinutes() int32` - -GetRefreshTokenExpirationMinutes returns the RefreshTokenExpirationMinutes field if non-nil, zero value otherwise. - -### GetRefreshTokenExpirationMinutesOk - -`func (o *AuthServerConfiguration) GetRefreshTokenExpirationMinutesOk() (*int32, bool)` - -GetRefreshTokenExpirationMinutesOk returns a tuple with the RefreshTokenExpirationMinutes field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRefreshTokenExpirationMinutes - -`func (o *AuthServerConfiguration) SetRefreshTokenExpirationMinutes(v int32)` - -SetRefreshTokenExpirationMinutes sets RefreshTokenExpirationMinutes field to given value. - -### HasRefreshTokenExpirationMinutes - -`func (o *AuthServerConfiguration) HasRefreshTokenExpirationMinutes() bool` - -HasRefreshTokenExpirationMinutes returns a boolean if a field has been set. - -### GetResourceIdentifier - -`func (o *AuthServerConfiguration) GetResourceIdentifier() string` - -GetResourceIdentifier returns the ResourceIdentifier field if non-nil, zero value otherwise. - -### GetResourceIdentifierOk - -`func (o *AuthServerConfiguration) GetResourceIdentifierOk() (*string, bool)` - -GetResourceIdentifierOk returns a tuple with the ResourceIdentifier field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetResourceIdentifier - -`func (o *AuthServerConfiguration) SetResourceIdentifier(v string)` - -SetResourceIdentifier sets ResourceIdentifier field to given value. - - -### GetAccessTokenExpirationMinutes - -`func (o *AuthServerConfiguration) GetAccessTokenExpirationMinutes() int32` - -GetAccessTokenExpirationMinutes returns the AccessTokenExpirationMinutes field if non-nil, zero value otherwise. - -### GetAccessTokenExpirationMinutesOk - -`func (o *AuthServerConfiguration) GetAccessTokenExpirationMinutesOk() (*int32, bool)` - -GetAccessTokenExpirationMinutesOk returns a tuple with the AccessTokenExpirationMinutes field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAccessTokenExpirationMinutes - -`func (o *AuthServerConfiguration) SetAccessTokenExpirationMinutes(v int32)` - -SetAccessTokenExpirationMinutes sets AccessTokenExpirationMinutes field to given value. - -### HasAccessTokenExpirationMinutes - -`func (o *AuthServerConfiguration) HasAccessTokenExpirationMinutes() bool` - -HasAccessTokenExpirationMinutes 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/Brand.md b/docs/Brand.md deleted file mode 100644 index d07572b..0000000 --- a/docs/Brand.md +++ /dev/null @@ -1,345 +0,0 @@ -# Brand - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **int32** | | -**Enabled** | **bool** | Indicates if the brand is enabled or not | [default to false] -**CustomSupportEnabled** | **bool** | Indicates if the custom support is enabled. If enabled, the login page includes the ability to submit a support request. | -**CustomColor** | **string** | Primary brand color | -**CustomAccentColor** | **string** | Secondary brand color | -**CustomMaskingColor** | **string** | Color for the masking layer above the background image of the branded login screen. | -**CustomMaskingOpacity** | **int32** | Opacity for the custom_masking_color. | -**MfaEnrollmentMessage** | **string** | Text that replaces the default text displayed on the initial screen of the MFA Registration. | -**EnableCustomLabelForLoginScreen** | **bool** | Indicates if the custom Username/Email field label is enabled or not | -**CustomLabelTextForLoginScreen** | **string** | Custom label for the Username/Email field on the login screen. See example here. | -**LoginInstruction** | **string** | Text for the login instruction screen, styled in Markdown. | -**LoginInstructionTitle** | **string** | Link text to show login instruction screen. | -**HideOneloginFooter** | **bool** | Indicates if the OneLogin footer will appear at the bottom of the login page. | -**Background** | [**BrandBackground**](BrandBackground.md) | | -**Logo** | [**BrandLogo**](BrandLogo.md) | | - -## Methods - -### NewBrand - -`func NewBrand(id int32, enabled bool, customSupportEnabled bool, customColor string, customAccentColor string, customMaskingColor string, customMaskingOpacity int32, mfaEnrollmentMessage string, enableCustomLabelForLoginScreen bool, customLabelTextForLoginScreen string, loginInstruction string, loginInstructionTitle string, hideOneloginFooter bool, background BrandBackground, logo BrandLogo, ) *Brand` - -NewBrand instantiates a new Brand 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 - -### NewBrandWithDefaults - -`func NewBrandWithDefaults() *Brand` - -NewBrandWithDefaults instantiates a new Brand 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 - -### GetId - -`func (o *Brand) GetId() int32` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *Brand) GetIdOk() (*int32, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *Brand) SetId(v int32)` - -SetId sets Id field to given value. - - -### GetEnabled - -`func (o *Brand) GetEnabled() bool` - -GetEnabled returns the Enabled field if non-nil, zero value otherwise. - -### GetEnabledOk - -`func (o *Brand) 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 *Brand) SetEnabled(v bool)` - -SetEnabled sets Enabled field to given value. - - -### GetCustomSupportEnabled - -`func (o *Brand) GetCustomSupportEnabled() bool` - -GetCustomSupportEnabled returns the CustomSupportEnabled field if non-nil, zero value otherwise. - -### GetCustomSupportEnabledOk - -`func (o *Brand) GetCustomSupportEnabledOk() (*bool, bool)` - -GetCustomSupportEnabledOk returns a tuple with the CustomSupportEnabled field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCustomSupportEnabled - -`func (o *Brand) SetCustomSupportEnabled(v bool)` - -SetCustomSupportEnabled sets CustomSupportEnabled field to given value. - - -### GetCustomColor - -`func (o *Brand) GetCustomColor() string` - -GetCustomColor returns the CustomColor field if non-nil, zero value otherwise. - -### GetCustomColorOk - -`func (o *Brand) GetCustomColorOk() (*string, bool)` - -GetCustomColorOk returns a tuple with the CustomColor field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCustomColor - -`func (o *Brand) SetCustomColor(v string)` - -SetCustomColor sets CustomColor field to given value. - - -### GetCustomAccentColor - -`func (o *Brand) GetCustomAccentColor() string` - -GetCustomAccentColor returns the CustomAccentColor field if non-nil, zero value otherwise. - -### GetCustomAccentColorOk - -`func (o *Brand) GetCustomAccentColorOk() (*string, bool)` - -GetCustomAccentColorOk returns a tuple with the CustomAccentColor field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCustomAccentColor - -`func (o *Brand) SetCustomAccentColor(v string)` - -SetCustomAccentColor sets CustomAccentColor field to given value. - - -### GetCustomMaskingColor - -`func (o *Brand) GetCustomMaskingColor() string` - -GetCustomMaskingColor returns the CustomMaskingColor field if non-nil, zero value otherwise. - -### GetCustomMaskingColorOk - -`func (o *Brand) GetCustomMaskingColorOk() (*string, bool)` - -GetCustomMaskingColorOk returns a tuple with the CustomMaskingColor field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCustomMaskingColor - -`func (o *Brand) SetCustomMaskingColor(v string)` - -SetCustomMaskingColor sets CustomMaskingColor field to given value. - - -### GetCustomMaskingOpacity - -`func (o *Brand) GetCustomMaskingOpacity() int32` - -GetCustomMaskingOpacity returns the CustomMaskingOpacity field if non-nil, zero value otherwise. - -### GetCustomMaskingOpacityOk - -`func (o *Brand) GetCustomMaskingOpacityOk() (*int32, bool)` - -GetCustomMaskingOpacityOk returns a tuple with the CustomMaskingOpacity field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCustomMaskingOpacity - -`func (o *Brand) SetCustomMaskingOpacity(v int32)` - -SetCustomMaskingOpacity sets CustomMaskingOpacity field to given value. - - -### GetMfaEnrollmentMessage - -`func (o *Brand) GetMfaEnrollmentMessage() string` - -GetMfaEnrollmentMessage returns the MfaEnrollmentMessage field if non-nil, zero value otherwise. - -### GetMfaEnrollmentMessageOk - -`func (o *Brand) GetMfaEnrollmentMessageOk() (*string, bool)` - -GetMfaEnrollmentMessageOk returns a tuple with the MfaEnrollmentMessage field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMfaEnrollmentMessage - -`func (o *Brand) SetMfaEnrollmentMessage(v string)` - -SetMfaEnrollmentMessage sets MfaEnrollmentMessage field to given value. - - -### GetEnableCustomLabelForLoginScreen - -`func (o *Brand) GetEnableCustomLabelForLoginScreen() bool` - -GetEnableCustomLabelForLoginScreen returns the EnableCustomLabelForLoginScreen field if non-nil, zero value otherwise. - -### GetEnableCustomLabelForLoginScreenOk - -`func (o *Brand) GetEnableCustomLabelForLoginScreenOk() (*bool, bool)` - -GetEnableCustomLabelForLoginScreenOk returns a tuple with the EnableCustomLabelForLoginScreen field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetEnableCustomLabelForLoginScreen - -`func (o *Brand) SetEnableCustomLabelForLoginScreen(v bool)` - -SetEnableCustomLabelForLoginScreen sets EnableCustomLabelForLoginScreen field to given value. - - -### GetCustomLabelTextForLoginScreen - -`func (o *Brand) GetCustomLabelTextForLoginScreen() string` - -GetCustomLabelTextForLoginScreen returns the CustomLabelTextForLoginScreen field if non-nil, zero value otherwise. - -### GetCustomLabelTextForLoginScreenOk - -`func (o *Brand) GetCustomLabelTextForLoginScreenOk() (*string, bool)` - -GetCustomLabelTextForLoginScreenOk returns a tuple with the CustomLabelTextForLoginScreen field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCustomLabelTextForLoginScreen - -`func (o *Brand) SetCustomLabelTextForLoginScreen(v string)` - -SetCustomLabelTextForLoginScreen sets CustomLabelTextForLoginScreen field to given value. - - -### GetLoginInstruction - -`func (o *Brand) GetLoginInstruction() string` - -GetLoginInstruction returns the LoginInstruction field if non-nil, zero value otherwise. - -### GetLoginInstructionOk - -`func (o *Brand) GetLoginInstructionOk() (*string, bool)` - -GetLoginInstructionOk returns a tuple with the LoginInstruction field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLoginInstruction - -`func (o *Brand) SetLoginInstruction(v string)` - -SetLoginInstruction sets LoginInstruction field to given value. - - -### GetLoginInstructionTitle - -`func (o *Brand) GetLoginInstructionTitle() string` - -GetLoginInstructionTitle returns the LoginInstructionTitle field if non-nil, zero value otherwise. - -### GetLoginInstructionTitleOk - -`func (o *Brand) GetLoginInstructionTitleOk() (*string, bool)` - -GetLoginInstructionTitleOk returns a tuple with the LoginInstructionTitle field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLoginInstructionTitle - -`func (o *Brand) SetLoginInstructionTitle(v string)` - -SetLoginInstructionTitle sets LoginInstructionTitle field to given value. - - -### GetHideOneloginFooter - -`func (o *Brand) GetHideOneloginFooter() bool` - -GetHideOneloginFooter returns the HideOneloginFooter field if non-nil, zero value otherwise. - -### GetHideOneloginFooterOk - -`func (o *Brand) GetHideOneloginFooterOk() (*bool, bool)` - -GetHideOneloginFooterOk returns a tuple with the HideOneloginFooter field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetHideOneloginFooter - -`func (o *Brand) SetHideOneloginFooter(v bool)` - -SetHideOneloginFooter sets HideOneloginFooter field to given value. - - -### GetBackground - -`func (o *Brand) GetBackground() BrandBackground` - -GetBackground returns the Background field if non-nil, zero value otherwise. - -### GetBackgroundOk - -`func (o *Brand) GetBackgroundOk() (*BrandBackground, 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 *Brand) SetBackground(v BrandBackground)` - -SetBackground sets Background field to given value. - - -### GetLogo - -`func (o *Brand) GetLogo() BrandLogo` - -GetLogo returns the Logo field if non-nil, zero value otherwise. - -### GetLogoOk - -`func (o *Brand) GetLogoOk() (*BrandLogo, bool)` - -GetLogoOk returns a tuple with the Logo field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLogo - -`func (o *Brand) SetLogo(v BrandLogo)` - -SetLogo sets Logo 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/BrandApp.md b/docs/BrandApp.md deleted file mode 100644 index b2286a1..0000000 --- a/docs/BrandApp.md +++ /dev/null @@ -1,219 +0,0 @@ -# BrandApp - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **int32** | | -**UpdatedAt** | **string** | | -**Name** | **string** | | -**ConnectorId** | **int32** | | -**AuthMethodDescription** | **string** | | -**Description** | **string** | | -**AuthMethod** | **int32** | | -**CreatedAt** | **string** | | -**Visible** | **bool** | | - -## Methods - -### NewBrandApp - -`func NewBrandApp(id int32, updatedAt string, name string, connectorId int32, authMethodDescription string, description string, authMethod int32, createdAt string, visible bool, ) *BrandApp` - -NewBrandApp instantiates a new BrandApp 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 - -### NewBrandAppWithDefaults - -`func NewBrandAppWithDefaults() *BrandApp` - -NewBrandAppWithDefaults instantiates a new BrandApp 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 - -### GetId - -`func (o *BrandApp) GetId() int32` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *BrandApp) GetIdOk() (*int32, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *BrandApp) SetId(v int32)` - -SetId sets Id field to given value. - - -### GetUpdatedAt - -`func (o *BrandApp) GetUpdatedAt() string` - -GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. - -### GetUpdatedAtOk - -`func (o *BrandApp) GetUpdatedAtOk() (*string, bool)` - -GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUpdatedAt - -`func (o *BrandApp) SetUpdatedAt(v string)` - -SetUpdatedAt sets UpdatedAt field to given value. - - -### GetName - -`func (o *BrandApp) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *BrandApp) 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 *BrandApp) SetName(v string)` - -SetName sets Name field to given value. - - -### GetConnectorId - -`func (o *BrandApp) GetConnectorId() int32` - -GetConnectorId returns the ConnectorId field if non-nil, zero value otherwise. - -### GetConnectorIdOk - -`func (o *BrandApp) GetConnectorIdOk() (*int32, bool)` - -GetConnectorIdOk returns a tuple with the ConnectorId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConnectorId - -`func (o *BrandApp) SetConnectorId(v int32)` - -SetConnectorId sets ConnectorId field to given value. - - -### GetAuthMethodDescription - -`func (o *BrandApp) GetAuthMethodDescription() string` - -GetAuthMethodDescription returns the AuthMethodDescription field if non-nil, zero value otherwise. - -### GetAuthMethodDescriptionOk - -`func (o *BrandApp) GetAuthMethodDescriptionOk() (*string, bool)` - -GetAuthMethodDescriptionOk returns a tuple with the AuthMethodDescription field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAuthMethodDescription - -`func (o *BrandApp) SetAuthMethodDescription(v string)` - -SetAuthMethodDescription sets AuthMethodDescription field to given value. - - -### GetDescription - -`func (o *BrandApp) GetDescription() string` - -GetDescription returns the Description field if non-nil, zero value otherwise. - -### GetDescriptionOk - -`func (o *BrandApp) GetDescriptionOk() (*string, bool)` - -GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDescription - -`func (o *BrandApp) SetDescription(v string)` - -SetDescription sets Description field to given value. - - -### GetAuthMethod - -`func (o *BrandApp) GetAuthMethod() int32` - -GetAuthMethod returns the AuthMethod field if non-nil, zero value otherwise. - -### GetAuthMethodOk - -`func (o *BrandApp) GetAuthMethodOk() (*int32, bool)` - -GetAuthMethodOk returns a tuple with the AuthMethod field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAuthMethod - -`func (o *BrandApp) SetAuthMethod(v int32)` - -SetAuthMethod sets AuthMethod field to given value. - - -### GetCreatedAt - -`func (o *BrandApp) GetCreatedAt() string` - -GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. - -### GetCreatedAtOk - -`func (o *BrandApp) GetCreatedAtOk() (*string, bool)` - -GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCreatedAt - -`func (o *BrandApp) SetCreatedAt(v string)` - -SetCreatedAt sets CreatedAt field to given value. - - -### GetVisible - -`func (o *BrandApp) GetVisible() bool` - -GetVisible returns the Visible field if non-nil, zero value otherwise. - -### GetVisibleOk - -`func (o *BrandApp) GetVisibleOk() (*bool, bool)` - -GetVisibleOk returns a tuple with the Visible field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetVisible - -`func (o *BrandApp) SetVisible(v bool)` - -SetVisible sets Visible 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/BrandBackground.md b/docs/BrandBackground.md deleted file mode 100644 index e5386d5..0000000 --- a/docs/BrandBackground.md +++ /dev/null @@ -1,114 +0,0 @@ -# BrandBackground - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Urls** | [**BrandBackgroundUrls**](BrandBackgroundUrls.md) | | -**FileSize** | **int32** | | -**UpdatedAt** | **string** | | -**ContentType** | **string** | | - -## Methods - -### NewBrandBackground - -`func NewBrandBackground(urls BrandBackgroundUrls, fileSize int32, updatedAt string, contentType string, ) *BrandBackground` - -NewBrandBackground instantiates a new BrandBackground 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 - -### NewBrandBackgroundWithDefaults - -`func NewBrandBackgroundWithDefaults() *BrandBackground` - -NewBrandBackgroundWithDefaults instantiates a new BrandBackground 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 - -### GetUrls - -`func (o *BrandBackground) GetUrls() BrandBackgroundUrls` - -GetUrls returns the Urls field if non-nil, zero value otherwise. - -### GetUrlsOk - -`func (o *BrandBackground) GetUrlsOk() (*BrandBackgroundUrls, bool)` - -GetUrlsOk returns a tuple with the Urls field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUrls - -`func (o *BrandBackground) SetUrls(v BrandBackgroundUrls)` - -SetUrls sets Urls field to given value. - - -### GetFileSize - -`func (o *BrandBackground) GetFileSize() int32` - -GetFileSize returns the FileSize field if non-nil, zero value otherwise. - -### GetFileSizeOk - -`func (o *BrandBackground) GetFileSizeOk() (*int32, bool)` - -GetFileSizeOk returns a tuple with the FileSize field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetFileSize - -`func (o *BrandBackground) SetFileSize(v int32)` - -SetFileSize sets FileSize field to given value. - - -### GetUpdatedAt - -`func (o *BrandBackground) GetUpdatedAt() string` - -GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. - -### GetUpdatedAtOk - -`func (o *BrandBackground) GetUpdatedAtOk() (*string, bool)` - -GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUpdatedAt - -`func (o *BrandBackground) SetUpdatedAt(v string)` - -SetUpdatedAt sets UpdatedAt field to given value. - - -### GetContentType - -`func (o *BrandBackground) GetContentType() string` - -GetContentType returns the ContentType field if non-nil, zero value otherwise. - -### GetContentTypeOk - -`func (o *BrandBackground) GetContentTypeOk() (*string, bool)` - -GetContentTypeOk returns a tuple with the ContentType field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetContentType - -`func (o *BrandBackground) SetContentType(v string)` - -SetContentType sets ContentType 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/BrandBackgroundUrls.md b/docs/BrandBackgroundUrls.md deleted file mode 100644 index f65675a..0000000 --- a/docs/BrandBackgroundUrls.md +++ /dev/null @@ -1,93 +0,0 @@ -# BrandBackgroundUrls - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Original** | **string** | | -**Login** | **string** | | -**Branding** | **string** | | - -## Methods - -### NewBrandBackgroundUrls - -`func NewBrandBackgroundUrls(original string, login string, branding string, ) *BrandBackgroundUrls` - -NewBrandBackgroundUrls instantiates a new BrandBackgroundUrls 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 - -### NewBrandBackgroundUrlsWithDefaults - -`func NewBrandBackgroundUrlsWithDefaults() *BrandBackgroundUrls` - -NewBrandBackgroundUrlsWithDefaults instantiates a new BrandBackgroundUrls 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 - -### GetOriginal - -`func (o *BrandBackgroundUrls) GetOriginal() string` - -GetOriginal returns the Original field if non-nil, zero value otherwise. - -### GetOriginalOk - -`func (o *BrandBackgroundUrls) GetOriginalOk() (*string, bool)` - -GetOriginalOk returns a tuple with the Original field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetOriginal - -`func (o *BrandBackgroundUrls) SetOriginal(v string)` - -SetOriginal sets Original field to given value. - - -### GetLogin - -`func (o *BrandBackgroundUrls) GetLogin() string` - -GetLogin returns the Login field if non-nil, zero value otherwise. - -### GetLoginOk - -`func (o *BrandBackgroundUrls) GetLoginOk() (*string, bool)` - -GetLoginOk returns a tuple with the Login field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLogin - -`func (o *BrandBackgroundUrls) SetLogin(v string)` - -SetLogin sets Login field to given value. - - -### GetBranding - -`func (o *BrandBackgroundUrls) GetBranding() string` - -GetBranding returns the Branding field if non-nil, zero value otherwise. - -### GetBrandingOk - -`func (o *BrandBackgroundUrls) GetBrandingOk() (*string, bool)` - -GetBrandingOk returns a tuple with the Branding field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetBranding - -`func (o *BrandBackgroundUrls) SetBranding(v string)` - -SetBranding sets Branding 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/BrandLogo.md b/docs/BrandLogo.md deleted file mode 100644 index 4648907..0000000 --- a/docs/BrandLogo.md +++ /dev/null @@ -1,114 +0,0 @@ -# BrandLogo - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Urls** | [**BrandLogoUrls**](BrandLogoUrls.md) | | -**FileSize** | **int32** | | -**UpdatedAt** | **string** | | -**ContentType** | **string** | | - -## Methods - -### NewBrandLogo - -`func NewBrandLogo(urls BrandLogoUrls, fileSize int32, updatedAt string, contentType string, ) *BrandLogo` - -NewBrandLogo instantiates a new BrandLogo 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 - -### NewBrandLogoWithDefaults - -`func NewBrandLogoWithDefaults() *BrandLogo` - -NewBrandLogoWithDefaults instantiates a new BrandLogo 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 - -### GetUrls - -`func (o *BrandLogo) GetUrls() BrandLogoUrls` - -GetUrls returns the Urls field if non-nil, zero value otherwise. - -### GetUrlsOk - -`func (o *BrandLogo) GetUrlsOk() (*BrandLogoUrls, bool)` - -GetUrlsOk returns a tuple with the Urls field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUrls - -`func (o *BrandLogo) SetUrls(v BrandLogoUrls)` - -SetUrls sets Urls field to given value. - - -### GetFileSize - -`func (o *BrandLogo) GetFileSize() int32` - -GetFileSize returns the FileSize field if non-nil, zero value otherwise. - -### GetFileSizeOk - -`func (o *BrandLogo) GetFileSizeOk() (*int32, bool)` - -GetFileSizeOk returns a tuple with the FileSize field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetFileSize - -`func (o *BrandLogo) SetFileSize(v int32)` - -SetFileSize sets FileSize field to given value. - - -### GetUpdatedAt - -`func (o *BrandLogo) GetUpdatedAt() string` - -GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. - -### GetUpdatedAtOk - -`func (o *BrandLogo) GetUpdatedAtOk() (*string, bool)` - -GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUpdatedAt - -`func (o *BrandLogo) SetUpdatedAt(v string)` - -SetUpdatedAt sets UpdatedAt field to given value. - - -### GetContentType - -`func (o *BrandLogo) GetContentType() string` - -GetContentType returns the ContentType field if non-nil, zero value otherwise. - -### GetContentTypeOk - -`func (o *BrandLogo) GetContentTypeOk() (*string, bool)` - -GetContentTypeOk returns a tuple with the ContentType field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetContentType - -`func (o *BrandLogo) SetContentType(v string)` - -SetContentType sets ContentType 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/BrandLogoUrls.md b/docs/BrandLogoUrls.md deleted file mode 100644 index f17584a..0000000 --- a/docs/BrandLogoUrls.md +++ /dev/null @@ -1,93 +0,0 @@ -# BrandLogoUrls - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Original** | **string** | | -**Login** | **string** | | -**Navigation** | **string** | | - -## Methods - -### NewBrandLogoUrls - -`func NewBrandLogoUrls(original string, login string, navigation string, ) *BrandLogoUrls` - -NewBrandLogoUrls instantiates a new BrandLogoUrls 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 - -### NewBrandLogoUrlsWithDefaults - -`func NewBrandLogoUrlsWithDefaults() *BrandLogoUrls` - -NewBrandLogoUrlsWithDefaults instantiates a new BrandLogoUrls 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 - -### GetOriginal - -`func (o *BrandLogoUrls) GetOriginal() string` - -GetOriginal returns the Original field if non-nil, zero value otherwise. - -### GetOriginalOk - -`func (o *BrandLogoUrls) GetOriginalOk() (*string, bool)` - -GetOriginalOk returns a tuple with the Original field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetOriginal - -`func (o *BrandLogoUrls) SetOriginal(v string)` - -SetOriginal sets Original field to given value. - - -### GetLogin - -`func (o *BrandLogoUrls) GetLogin() string` - -GetLogin returns the Login field if non-nil, zero value otherwise. - -### GetLoginOk - -`func (o *BrandLogoUrls) GetLoginOk() (*string, bool)` - -GetLoginOk returns a tuple with the Login field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLogin - -`func (o *BrandLogoUrls) SetLogin(v string)` - -SetLogin sets Login field to given value. - - -### GetNavigation - -`func (o *BrandLogoUrls) GetNavigation() string` - -GetNavigation returns the Navigation field if non-nil, zero value otherwise. - -### GetNavigationOk - -`func (o *BrandLogoUrls) GetNavigationOk() (*string, bool)` - -GetNavigationOk returns a tuple with the Navigation field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetNavigation - -`func (o *BrandLogoUrls) SetNavigation(v string)` - -SetNavigation sets Navigation 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/BrandReq.md b/docs/BrandReq.md deleted file mode 100644 index aa32990..0000000 --- a/docs/BrandReq.md +++ /dev/null @@ -1,108 +0,0 @@ -# BrandReq - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | Pointer to **int32** | Brand’s unique ID in OneLogin. | [optional] -**Enabled** | Pointer to **bool** | Indicates if the brand is enabled or not. | [optional] -**Name** | Pointer to **string** | Brand name for humans. This isn’t related to subdomains. | [optional] - -## Methods - -### NewBrandReq - -`func NewBrandReq() *BrandReq` - -NewBrandReq instantiates a new BrandReq 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 - -### NewBrandReqWithDefaults - -`func NewBrandReqWithDefaults() *BrandReq` - -NewBrandReqWithDefaults instantiates a new BrandReq 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 - -### GetId - -`func (o *BrandReq) GetId() int32` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *BrandReq) GetIdOk() (*int32, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *BrandReq) SetId(v int32)` - -SetId sets Id field to given value. - -### HasId - -`func (o *BrandReq) HasId() bool` - -HasId returns a boolean if a field has been set. - -### GetEnabled - -`func (o *BrandReq) GetEnabled() bool` - -GetEnabled returns the Enabled field if non-nil, zero value otherwise. - -### GetEnabledOk - -`func (o *BrandReq) 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 *BrandReq) SetEnabled(v bool)` - -SetEnabled sets Enabled field to given value. - -### HasEnabled - -`func (o *BrandReq) HasEnabled() bool` - -HasEnabled returns a boolean if a field has been set. - -### GetName - -`func (o *BrandReq) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *BrandReq) 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 *BrandReq) SetName(v string)` - -SetName sets Name field to given value. - -### HasName - -`func (o *BrandReq) HasName() bool` - -HasName 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/BrandingServiceApi.md b/docs/BrandingServiceApi.md deleted file mode 100644 index 5909e89..0000000 --- a/docs/BrandingServiceApi.md +++ /dev/null @@ -1,421 +0,0 @@ -# \BrandingServiceApi - -All URIs are relative to *https://your-api-subdomain.onelogin.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateBrand**](BrandingServiceApi.md#CreateBrand) | **Post** /api/2/branding/brands | Create Brand -[**DeleteBrand**](BrandingServiceApi.md#DeleteBrand) | **Delete** /api/2/branding/brands/{brand_id} | Delete Brand -[**GetBrand**](BrandingServiceApi.md#GetBrand) | **Get** /api/2/branding/brands/{brand_id} | Get Brand -[**GetBrandApps**](BrandingServiceApi.md#GetBrandApps) | **Get** /api/2/branding/brands/{brand_id}/apps | Get Brand Apps -[**ListBrands**](BrandingServiceApi.md#ListBrands) | **Get** /api/2/branding/brands | List Account Brands -[**UpdateBrand**](BrandingServiceApi.md#UpdateBrand) | **Put** /api/2/branding/brands/{brand_id} | Update Brand - - - -## CreateBrand - -> Brand CreateBrand(ctx).Brand(brand).Execute() - -Create Brand - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - brand := *openapiclient.NewBrand(int32(123), true, false, "#1298b4", "#b60012", "#beefed", int32(40), "You must register with the OneLogin Protect app in order to login", true, "ACME Username or Email", "To login, enter your ACME Username or Email. Reach out to help.desk@acme.org if you have trouble logging in.", "ACME Login Instructions", true, *openapiclient.NewBrandBackground(*openapiclient.NewBrandBackgroundUrls("Original_example", "Login_example", "Branding_example"), int32(123), "UpdatedAt_example", "ContentType_example"), *openapiclient.NewBrandLogo(*openapiclient.NewBrandLogoUrls("Original_example", "Login_example", "Navigation_example"), int32(123), "UpdatedAt_example", "ContentType_example")) // Brand | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.BrandingServiceApi.CreateBrand(context.Background()).Brand(brand).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `BrandingServiceApi.CreateBrand``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `CreateBrand`: Brand - fmt.Fprintf(os.Stdout, "Response from `BrandingServiceApi.CreateBrand`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiCreateBrandRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **brand** | [**Brand**](Brand.md) | | - -### Return type - -[**Brand**](Brand.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## DeleteBrand - -> DeleteBrand(ctx, brandId).Execute() - -Delete Brand - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - brandId := int32(9) // int32 | Unique identifier for the branding object. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.BrandingServiceApi.DeleteBrand(context.Background(), brandId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `BrandingServiceApi.DeleteBrand``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**brandId** | **int32** | Unique identifier for the branding object. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiDeleteBrandRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - - (empty response body) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetBrand - -> Brand GetBrand(ctx, brandId).Execute() - -Get Brand - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - brandId := int32(9) // int32 | Unique identifier for the branding object. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.BrandingServiceApi.GetBrand(context.Background(), brandId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `BrandingServiceApi.GetBrand``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetBrand`: Brand - fmt.Fprintf(os.Stdout, "Response from `BrandingServiceApi.GetBrand`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**brandId** | **int32** | Unique identifier for the branding object. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetBrandRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**Brand**](Brand.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetBrandApps - -> []BrandApp GetBrandApps(ctx, brandId).Execute() - -Get Brand Apps - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - brandId := int32(9) // int32 | Unique identifier for the branding object. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.BrandingServiceApi.GetBrandApps(context.Background(), brandId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `BrandingServiceApi.GetBrandApps``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetBrandApps`: []BrandApp - fmt.Fprintf(os.Stdout, "Response from `BrandingServiceApi.GetBrandApps`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**brandId** | **int32** | Unique identifier for the branding object. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetBrandAppsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**[]BrandApp**](BrandApp.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## ListBrands - -> []BrandReq ListBrands(ctx).Execute() - -List Account Brands - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.BrandingServiceApi.ListBrands(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `BrandingServiceApi.ListBrands``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ListBrands`: []BrandReq - fmt.Fprintf(os.Stdout, "Response from `BrandingServiceApi.ListBrands`: %v\n", resp) -} -``` - -### Path Parameters - -This endpoint does not need any parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a apiListBrandsRequest struct via the builder pattern - - -### Return type - -[**[]BrandReq**](BrandReq.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## UpdateBrand - -> Brand UpdateBrand(ctx, brandId).RequestBrand(requestBrand).Execute() - -Update Brand - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - brandId := int32(9) // int32 | Unique identifier for the branding object. - requestBrand := *openapiclient.NewRequestBrand("Acme Branding") // RequestBrand | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.BrandingServiceApi.UpdateBrand(context.Background(), brandId).RequestBrand(requestBrand).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `BrandingServiceApi.UpdateBrand``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `UpdateBrand`: Brand - fmt.Fprintf(os.Stdout, "Response from `BrandingServiceApi.UpdateBrand`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**brandId** | **int32** | Unique identifier for the branding object. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiUpdateBrandRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **requestBrand** | [**RequestBrand**](RequestBrand.md) | | - -### Return type - -[**Brand**](Brand.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/docs/BrandingServiceSMTPApi.md b/docs/BrandingServiceSMTPApi.md deleted file mode 100644 index 52cb358..0000000 --- a/docs/BrandingServiceSMTPApi.md +++ /dev/null @@ -1,199 +0,0 @@ -# \BrandingServiceSMTPApi - -All URIs are relative to *https://your-api-subdomain.onelogin.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DeleteEmailSettings**](BrandingServiceSMTPApi.md#DeleteEmailSettings) | **Delete** /api/2/branding/email_settings | Delete Custom Email Settings -[**GetEmailSettings**](BrandingServiceSMTPApi.md#GetEmailSettings) | **Get** /api/2/branding/email_settings | Get Email Settings -[**UpdateEmailSettings**](BrandingServiceSMTPApi.md#UpdateEmailSettings) | **Put** /api/2/branding/email_settings | Update Email Settings - - - -## DeleteEmailSettings - -> AltErr DeleteEmailSettings(ctx).Execute() - -Delete Custom Email Settings - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.BrandingServiceSMTPApi.DeleteEmailSettings(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `BrandingServiceSMTPApi.DeleteEmailSettings``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `DeleteEmailSettings`: AltErr - fmt.Fprintf(os.Stdout, "Response from `BrandingServiceSMTPApi.DeleteEmailSettings`: %v\n", resp) -} -``` - -### Path Parameters - -This endpoint does not need any parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a apiDeleteEmailSettingsRequest struct via the builder pattern - - -### Return type - -[**AltErr**](AltErr.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetEmailSettings - -> GetEmailSettings200Response GetEmailSettings(ctx).Execute() - -Get Email Settings - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.BrandingServiceSMTPApi.GetEmailSettings(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `BrandingServiceSMTPApi.GetEmailSettings``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetEmailSettings`: GetEmailSettings200Response - fmt.Fprintf(os.Stdout, "Response from `BrandingServiceSMTPApi.GetEmailSettings`: %v\n", resp) -} -``` - -### Path Parameters - -This endpoint does not need any parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetEmailSettingsRequest struct via the builder pattern - - -### Return type - -[**GetEmailSettings200Response**](GetEmailSettings200Response.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## UpdateEmailSettings - -> AltErr UpdateEmailSettings(ctx).EmailConfig(emailConfig).Execute() - -Update Email Settings - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - emailConfig := *openapiclient.NewEmailConfig("smtp.sendgrid.net", "email@example.com", "example.com") // EmailConfig | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.BrandingServiceSMTPApi.UpdateEmailSettings(context.Background()).EmailConfig(emailConfig).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `BrandingServiceSMTPApi.UpdateEmailSettings``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `UpdateEmailSettings`: AltErr - fmt.Fprintf(os.Stdout, "Response from `BrandingServiceSMTPApi.UpdateEmailSettings`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiUpdateEmailSettingsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **emailConfig** | [**EmailConfig**](EmailConfig.md) | | - -### Return type - -[**AltErr**](AltErr.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/docs/BrandingServiceTemplatesApi.md b/docs/BrandingServiceTemplatesApi.md deleted file mode 100644 index f74485e..0000000 --- a/docs/BrandingServiceTemplatesApi.md +++ /dev/null @@ -1,601 +0,0 @@ -# \BrandingServiceTemplatesApi - -All URIs are relative to *https://your-api-subdomain.onelogin.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateMessageTemplate**](BrandingServiceTemplatesApi.md#CreateMessageTemplate) | **Post** /api/2/branding/brands/{brand_id}/templates | Create Message Template -[**DeleteMessageTemplate**](BrandingServiceTemplatesApi.md#DeleteMessageTemplate) | **Delete** /api/2/branding/brands/{brand_id}/templates/{template_id} | Delete Message Template -[**GetMasterByType**](BrandingServiceTemplatesApi.md#GetMasterByType) | **Get** /api/2/branding/brands/master/templates/{template_type} | Get Master Template by Type -[**GetMessageTemplateById**](BrandingServiceTemplatesApi.md#GetMessageTemplateById) | **Get** /api/2/branding/brands/{brand_id}/templates/{template_id} | Get Message Template -[**GetTemplateByLocale**](BrandingServiceTemplatesApi.md#GetTemplateByLocale) | **Get** /api/2/branding/brands/{brand_id}/templates/{template_type}/{locale} | Get Template by Type & Locale -[**ListMessageTemplates**](BrandingServiceTemplatesApi.md#ListMessageTemplates) | **Get** /api/2/branding/brands/{brand_id}/templates | List Message Templates -[**UpdateMessageTemplateById**](BrandingServiceTemplatesApi.md#UpdateMessageTemplateById) | **Put** /api/2/branding/brands/{brand_id}/templates/{template_id} | Update Message Template -[**UpdateTemplateByLocale**](BrandingServiceTemplatesApi.md#UpdateTemplateByLocale) | **Put** /api/2/branding/brands/{brand_id}/templates/{template_type}/{locale} | Update Template by Type & Locale - - - -## CreateMessageTemplate - -> MessageTemplate CreateMessageTemplate(ctx, brandId).Locale(locale).MessageTemplate(messageTemplate).Execute() - -Create Message Template - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - brandId := int32(9) // int32 | Unique identifier for the branding object. - locale := "en" // string | The 2 character language locale for the template. e.g. en = English, es = Spanish (optional) - messageTemplate := *openapiclient.NewMessageTemplate("Type_example", "en", openapiclient.message_template_template{MessageTemplateTemplateOneOf: openapiclient.NewMessageTemplateTemplateOneOf("Email MFA App Verification Code", "

Here is the code: {{otp_code}}

", "Here is the code: {{otp_code}}")}) // MessageTemplate | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.BrandingServiceTemplatesApi.CreateMessageTemplate(context.Background(), brandId).Locale(locale).MessageTemplate(messageTemplate).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `BrandingServiceTemplatesApi.CreateMessageTemplate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `CreateMessageTemplate`: MessageTemplate - fmt.Fprintf(os.Stdout, "Response from `BrandingServiceTemplatesApi.CreateMessageTemplate`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**brandId** | **int32** | Unique identifier for the branding object. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiCreateMessageTemplateRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **locale** | **string** | The 2 character language locale for the template. e.g. en = English, es = Spanish | - **messageTemplate** | [**MessageTemplate**](MessageTemplate.md) | | - -### Return type - -[**MessageTemplate**](MessageTemplate.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## DeleteMessageTemplate - -> DeleteMessageTemplate(ctx, brandId, templateId).Execute() - -Delete Message Template - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - brandId := int32(9) // int32 | Unique identifier for the branding object. - templateId := int32(25) // int32 | Unique identifier for the template to return. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.BrandingServiceTemplatesApi.DeleteMessageTemplate(context.Background(), brandId, templateId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `BrandingServiceTemplatesApi.DeleteMessageTemplate``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**brandId** | **int32** | Unique identifier for the branding object. | -**templateId** | **int32** | Unique identifier for the template to return. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiDeleteMessageTemplateRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - -### Return type - - (empty response body) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetMasterByType - -> MessageTemplate GetMasterByType(ctx, templateType).Execute() - -Get Master Template by Type - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - templateType := "email_template" // string | The message template type to return. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.BrandingServiceTemplatesApi.GetMasterByType(context.Background(), templateType).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `BrandingServiceTemplatesApi.GetMasterByType``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetMasterByType`: MessageTemplate - fmt.Fprintf(os.Stdout, "Response from `BrandingServiceTemplatesApi.GetMasterByType`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**templateType** | **string** | The message template type to return. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetMasterByTypeRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**MessageTemplate**](MessageTemplate.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetMessageTemplateById - -> MessageTemplate GetMessageTemplateById(ctx, brandId, templateId).Execute() - -Get Message Template - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - brandId := int32(9) // int32 | Unique identifier for the branding object. - templateId := int32(25) // int32 | Unique identifier for the template to return. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.BrandingServiceTemplatesApi.GetMessageTemplateById(context.Background(), brandId, templateId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `BrandingServiceTemplatesApi.GetMessageTemplateById``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetMessageTemplateById`: MessageTemplate - fmt.Fprintf(os.Stdout, "Response from `BrandingServiceTemplatesApi.GetMessageTemplateById`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**brandId** | **int32** | Unique identifier for the branding object. | -**templateId** | **int32** | Unique identifier for the template to return. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetMessageTemplateByIdRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - -### Return type - -[**MessageTemplate**](MessageTemplate.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetTemplateByLocale - -> MessageTemplate GetTemplateByLocale(ctx, brandId, templateType, locale).Execute() - -Get Template by Type & Locale - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - brandId := int32(9) // int32 | Unique identifier for the branding object. - templateType := "email_template" // string | The message template type to return. - locale := "en" // string | The 2 character language locale for the template. e.g. en = English, es = Spanish - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.BrandingServiceTemplatesApi.GetTemplateByLocale(context.Background(), brandId, templateType, locale).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `BrandingServiceTemplatesApi.GetTemplateByLocale``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetTemplateByLocale`: MessageTemplate - fmt.Fprintf(os.Stdout, "Response from `BrandingServiceTemplatesApi.GetTemplateByLocale`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**brandId** | **int32** | Unique identifier for the branding object. | -**templateType** | **string** | The message template type to return. | -**locale** | **string** | The 2 character language locale for the template. e.g. en = English, es = Spanish | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetTemplateByLocaleRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - - -### Return type - -[**MessageTemplate**](MessageTemplate.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## ListMessageTemplates - -> []ListMessageTemplates200ResponseInner ListMessageTemplates(ctx, brandId).Locale(locale).Execute() - -List Message Templates - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - brandId := int32(9) // int32 | Unique identifier for the branding object. - locale := "en" // string | The 2 character language locale for the template. e.g. en = English, es = Spanish (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.BrandingServiceTemplatesApi.ListMessageTemplates(context.Background(), brandId).Locale(locale).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `BrandingServiceTemplatesApi.ListMessageTemplates``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ListMessageTemplates`: []ListMessageTemplates200ResponseInner - fmt.Fprintf(os.Stdout, "Response from `BrandingServiceTemplatesApi.ListMessageTemplates`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**brandId** | **int32** | Unique identifier for the branding object. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiListMessageTemplatesRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **locale** | **string** | The 2 character language locale for the template. e.g. en = English, es = Spanish | - -### Return type - -[**[]ListMessageTemplates200ResponseInner**](ListMessageTemplates200ResponseInner.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## UpdateMessageTemplateById - -> MessageTemplate UpdateMessageTemplateById(ctx, brandId, templateId).Execute() - -Update Message Template - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - brandId := int32(9) // int32 | Unique identifier for the branding object. - templateId := int32(25) // int32 | Unique identifier for the template to return. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.BrandingServiceTemplatesApi.UpdateMessageTemplateById(context.Background(), brandId, templateId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `BrandingServiceTemplatesApi.UpdateMessageTemplateById``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `UpdateMessageTemplateById`: MessageTemplate - fmt.Fprintf(os.Stdout, "Response from `BrandingServiceTemplatesApi.UpdateMessageTemplateById`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**brandId** | **int32** | Unique identifier for the branding object. | -**templateId** | **int32** | Unique identifier for the template to return. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiUpdateMessageTemplateByIdRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - -### Return type - -[**MessageTemplate**](MessageTemplate.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## UpdateTemplateByLocale - -> MessageTemplate UpdateTemplateByLocale(ctx, brandId, templateType, locale).Execute() - -Update Template by Type & Locale - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - brandId := int32(9) // int32 | Unique identifier for the branding object. - templateType := "email_template" // string | The message template type to return. - locale := "en" // string | The 2 character language locale for the template. e.g. en = English, es = Spanish - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.BrandingServiceTemplatesApi.UpdateTemplateByLocale(context.Background(), brandId, templateType, locale).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `BrandingServiceTemplatesApi.UpdateTemplateByLocale``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `UpdateTemplateByLocale`: MessageTemplate - fmt.Fprintf(os.Stdout, "Response from `BrandingServiceTemplatesApi.UpdateTemplateByLocale`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**brandId** | **int32** | Unique identifier for the branding object. | -**templateType** | **string** | The message template type to return. | -**locale** | **string** | The 2 character language locale for the template. e.g. en = English, es = Spanish | - -### Other Parameters - -Other parameters are passed through a pointer to a apiUpdateTemplateByLocaleRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - - -### Return type - -[**MessageTemplate**](MessageTemplate.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/docs/ClientAppFull.md b/docs/ClientAppFull.md deleted file mode 100644 index 7f1b3e6..0000000 --- a/docs/ClientAppFull.md +++ /dev/null @@ -1,134 +0,0 @@ -# ClientAppFull - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Scopes** | Pointer to [**[]Scope**](Scope.md) | List of All Scopes assigned to a client app | [optional] -**AppId** | Pointer to **int32** | Unique Client App ID | [optional] -**Name** | Pointer to **string** | Name of client app | [optional] -**ApiAuthId** | Pointer to **int32** | | [optional] - -## Methods - -### NewClientAppFull - -`func NewClientAppFull() *ClientAppFull` - -NewClientAppFull instantiates a new ClientAppFull 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 - -### NewClientAppFullWithDefaults - -`func NewClientAppFullWithDefaults() *ClientAppFull` - -NewClientAppFullWithDefaults instantiates a new ClientAppFull 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 - -### GetScopes - -`func (o *ClientAppFull) GetScopes() []Scope` - -GetScopes returns the Scopes field if non-nil, zero value otherwise. - -### GetScopesOk - -`func (o *ClientAppFull) GetScopesOk() (*[]Scope, bool)` - -GetScopesOk returns a tuple with the Scopes field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetScopes - -`func (o *ClientAppFull) SetScopes(v []Scope)` - -SetScopes sets Scopes field to given value. - -### HasScopes - -`func (o *ClientAppFull) HasScopes() bool` - -HasScopes returns a boolean if a field has been set. - -### GetAppId - -`func (o *ClientAppFull) GetAppId() int32` - -GetAppId returns the AppId field if non-nil, zero value otherwise. - -### GetAppIdOk - -`func (o *ClientAppFull) GetAppIdOk() (*int32, bool)` - -GetAppIdOk returns a tuple with the AppId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAppId - -`func (o *ClientAppFull) SetAppId(v int32)` - -SetAppId sets AppId field to given value. - -### HasAppId - -`func (o *ClientAppFull) HasAppId() bool` - -HasAppId returns a boolean if a field has been set. - -### GetName - -`func (o *ClientAppFull) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *ClientAppFull) 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 *ClientAppFull) SetName(v string)` - -SetName sets Name field to given value. - -### HasName - -`func (o *ClientAppFull) HasName() bool` - -HasName returns a boolean if a field has been set. - -### GetApiAuthId - -`func (o *ClientAppFull) GetApiAuthId() int32` - -GetApiAuthId returns the ApiAuthId field if non-nil, zero value otherwise. - -### GetApiAuthIdOk - -`func (o *ClientAppFull) GetApiAuthIdOk() (*int32, bool)` - -GetApiAuthIdOk returns a tuple with the ApiAuthId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetApiAuthId - -`func (o *ClientAppFull) SetApiAuthId(v int32)` - -SetApiAuthId sets ApiAuthId field to given value. - -### HasApiAuthId - -`func (o *ClientAppFull) HasApiAuthId() bool` - -HasApiAuthId 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/ClockCounter.md b/docs/ClockCounter.md deleted file mode 100644 index fef39a5..0000000 --- a/docs/ClockCounter.md +++ /dev/null @@ -1,82 +0,0 @@ -# ClockCounter - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Value** | Pointer to **int32** | | [optional] -**Unit** | Pointer to **int32** | | [optional] - -## Methods - -### NewClockCounter - -`func NewClockCounter() *ClockCounter` - -NewClockCounter instantiates a new ClockCounter 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 - -### NewClockCounterWithDefaults - -`func NewClockCounterWithDefaults() *ClockCounter` - -NewClockCounterWithDefaults instantiates a new ClockCounter 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 - -### GetValue - -`func (o *ClockCounter) GetValue() int32` - -GetValue returns the Value field if non-nil, zero value otherwise. - -### GetValueOk - -`func (o *ClockCounter) GetValueOk() (*int32, bool)` - -GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetValue - -`func (o *ClockCounter) SetValue(v int32)` - -SetValue sets Value field to given value. - -### HasValue - -`func (o *ClockCounter) HasValue() bool` - -HasValue returns a boolean if a field has been set. - -### GetUnit - -`func (o *ClockCounter) GetUnit() int32` - -GetUnit returns the Unit field if non-nil, zero value otherwise. - -### GetUnitOk - -`func (o *ClockCounter) GetUnitOk() (*int32, bool)` - -GetUnitOk returns a tuple with the Unit field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUnit - -`func (o *ClockCounter) SetUnit(v int32)` - -SetUnit sets Unit field to given value. - -### HasUnit - -`func (o *ClockCounter) HasUnit() bool` - -HasUnit 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/Condition.md b/docs/Condition.md deleted file mode 100644 index 429dcab..0000000 --- a/docs/Condition.md +++ /dev/null @@ -1,108 +0,0 @@ -# Condition - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Source** | Pointer to **string** | source field to check. | [optional] -**Operator** | Pointer to **string** | A valid operator for the selected condition source | [optional] -**Value** | Pointer to **string** | A plain text string or valid value for the selected condition source | [optional] - -## Methods - -### NewCondition - -`func NewCondition() *Condition` - -NewCondition instantiates a new Condition 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 - -### NewConditionWithDefaults - -`func NewConditionWithDefaults() *Condition` - -NewConditionWithDefaults instantiates a new Condition 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 - -### GetSource - -`func (o *Condition) GetSource() string` - -GetSource returns the Source field if non-nil, zero value otherwise. - -### GetSourceOk - -`func (o *Condition) GetSourceOk() (*string, 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 *Condition) SetSource(v string)` - -SetSource sets Source field to given value. - -### HasSource - -`func (o *Condition) HasSource() bool` - -HasSource returns a boolean if a field has been set. - -### GetOperator - -`func (o *Condition) GetOperator() string` - -GetOperator returns the Operator field if non-nil, zero value otherwise. - -### GetOperatorOk - -`func (o *Condition) GetOperatorOk() (*string, bool)` - -GetOperatorOk returns a tuple with the Operator field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetOperator - -`func (o *Condition) SetOperator(v string)` - -SetOperator sets Operator field to given value. - -### HasOperator - -`func (o *Condition) HasOperator() bool` - -HasOperator returns a boolean if a field has been set. - -### GetValue - -`func (o *Condition) GetValue() string` - -GetValue returns the Value field if non-nil, zero value otherwise. - -### GetValueOk - -`func (o *Condition) GetValueOk() (*string, bool)` - -GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetValue - -`func (o *Condition) SetValue(v string)` - -SetValue sets Value field to given value. - -### HasValue - -`func (o *Condition) HasValue() bool` - -HasValue 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/ConfigurationOidc.md b/docs/ConfigurationOidc.md deleted file mode 100644 index 5a21b04..0000000 --- a/docs/ConfigurationOidc.md +++ /dev/null @@ -1,156 +0,0 @@ -# ConfigurationOidc - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**LoginUrl** | **string** | The OpenId Connect Client Id. Note that client_secret is only returned after Creating an App. | -**RedirectUri** | **string** | Comma or newline separated list of valid redirect uris for the OpenId Connect Authorization Code flow. | -**AccessTokenExpirationMinutes** | **int32** | Number of minutes the refresh token will be valid for. | -**RefreshTokenExpirationMinutes** | **int32** | Number of minutes the refresh token will be valid for. | -**TokenEndpointAuthMethod** | **int32** | - 0: Basic - 1: POST - 2: None / PKCE | -**OidcApplicationType** | **int32** | - 0 : Web - 1 : Native / Mobile | - -## Methods - -### NewConfigurationOidc - -`func NewConfigurationOidc(loginUrl string, redirectUri string, accessTokenExpirationMinutes int32, refreshTokenExpirationMinutes int32, tokenEndpointAuthMethod int32, oidcApplicationType int32, ) *ConfigurationOidc` - -NewConfigurationOidc instantiates a new ConfigurationOidc 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 - -### NewConfigurationOidcWithDefaults - -`func NewConfigurationOidcWithDefaults() *ConfigurationOidc` - -NewConfigurationOidcWithDefaults instantiates a new ConfigurationOidc 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 - -### GetLoginUrl - -`func (o *ConfigurationOidc) GetLoginUrl() string` - -GetLoginUrl returns the LoginUrl field if non-nil, zero value otherwise. - -### GetLoginUrlOk - -`func (o *ConfigurationOidc) GetLoginUrlOk() (*string, bool)` - -GetLoginUrlOk returns a tuple with the LoginUrl field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLoginUrl - -`func (o *ConfigurationOidc) SetLoginUrl(v string)` - -SetLoginUrl sets LoginUrl field to given value. - - -### GetRedirectUri - -`func (o *ConfigurationOidc) GetRedirectUri() string` - -GetRedirectUri returns the RedirectUri field if non-nil, zero value otherwise. - -### GetRedirectUriOk - -`func (o *ConfigurationOidc) GetRedirectUriOk() (*string, bool)` - -GetRedirectUriOk returns a tuple with the RedirectUri field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRedirectUri - -`func (o *ConfigurationOidc) SetRedirectUri(v string)` - -SetRedirectUri sets RedirectUri field to given value. - - -### GetAccessTokenExpirationMinutes - -`func (o *ConfigurationOidc) GetAccessTokenExpirationMinutes() int32` - -GetAccessTokenExpirationMinutes returns the AccessTokenExpirationMinutes field if non-nil, zero value otherwise. - -### GetAccessTokenExpirationMinutesOk - -`func (o *ConfigurationOidc) GetAccessTokenExpirationMinutesOk() (*int32, bool)` - -GetAccessTokenExpirationMinutesOk returns a tuple with the AccessTokenExpirationMinutes field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAccessTokenExpirationMinutes - -`func (o *ConfigurationOidc) SetAccessTokenExpirationMinutes(v int32)` - -SetAccessTokenExpirationMinutes sets AccessTokenExpirationMinutes field to given value. - - -### GetRefreshTokenExpirationMinutes - -`func (o *ConfigurationOidc) GetRefreshTokenExpirationMinutes() int32` - -GetRefreshTokenExpirationMinutes returns the RefreshTokenExpirationMinutes field if non-nil, zero value otherwise. - -### GetRefreshTokenExpirationMinutesOk - -`func (o *ConfigurationOidc) GetRefreshTokenExpirationMinutesOk() (*int32, bool)` - -GetRefreshTokenExpirationMinutesOk returns a tuple with the RefreshTokenExpirationMinutes field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRefreshTokenExpirationMinutes - -`func (o *ConfigurationOidc) SetRefreshTokenExpirationMinutes(v int32)` - -SetRefreshTokenExpirationMinutes sets RefreshTokenExpirationMinutes field to given value. - - -### GetTokenEndpointAuthMethod - -`func (o *ConfigurationOidc) GetTokenEndpointAuthMethod() int32` - -GetTokenEndpointAuthMethod returns the TokenEndpointAuthMethod field if non-nil, zero value otherwise. - -### GetTokenEndpointAuthMethodOk - -`func (o *ConfigurationOidc) GetTokenEndpointAuthMethodOk() (*int32, bool)` - -GetTokenEndpointAuthMethodOk returns a tuple with the TokenEndpointAuthMethod field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTokenEndpointAuthMethod - -`func (o *ConfigurationOidc) SetTokenEndpointAuthMethod(v int32)` - -SetTokenEndpointAuthMethod sets TokenEndpointAuthMethod field to given value. - - -### GetOidcApplicationType - -`func (o *ConfigurationOidc) GetOidcApplicationType() int32` - -GetOidcApplicationType returns the OidcApplicationType field if non-nil, zero value otherwise. - -### GetOidcApplicationTypeOk - -`func (o *ConfigurationOidc) GetOidcApplicationTypeOk() (*int32, bool)` - -GetOidcApplicationTypeOk returns a tuple with the OidcApplicationType field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetOidcApplicationType - -`func (o *ConfigurationOidc) SetOidcApplicationType(v int32)` - -SetOidcApplicationType sets OidcApplicationType 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/ConfigurationSaml.md b/docs/ConfigurationSaml.md deleted file mode 100644 index 271e8bd..0000000 --- a/docs/ConfigurationSaml.md +++ /dev/null @@ -1,72 +0,0 @@ -# ConfigurationSaml - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**SignatureAlgorithm** | **string** | One of the following: - SHA-1 - SHA-256 - SHA-348 - SHA-512 | -**CertificateId** | **int32** | When creating apps the default certificate will be used unless the `certificate_id` attribute is applied in the `configuration` object. | - -## Methods - -### NewConfigurationSaml - -`func NewConfigurationSaml(signatureAlgorithm string, certificateId int32, ) *ConfigurationSaml` - -NewConfigurationSaml instantiates a new ConfigurationSaml 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 - -### NewConfigurationSamlWithDefaults - -`func NewConfigurationSamlWithDefaults() *ConfigurationSaml` - -NewConfigurationSamlWithDefaults instantiates a new ConfigurationSaml 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 - -### GetSignatureAlgorithm - -`func (o *ConfigurationSaml) GetSignatureAlgorithm() string` - -GetSignatureAlgorithm returns the SignatureAlgorithm field if non-nil, zero value otherwise. - -### GetSignatureAlgorithmOk - -`func (o *ConfigurationSaml) GetSignatureAlgorithmOk() (*string, bool)` - -GetSignatureAlgorithmOk returns a tuple with the SignatureAlgorithm field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSignatureAlgorithm - -`func (o *ConfigurationSaml) SetSignatureAlgorithm(v string)` - -SetSignatureAlgorithm sets SignatureAlgorithm field to given value. - - -### GetCertificateId - -`func (o *ConfigurationSaml) GetCertificateId() int32` - -GetCertificateId returns the CertificateId field if non-nil, zero value otherwise. - -### GetCertificateIdOk - -`func (o *ConfigurationSaml) GetCertificateIdOk() (*int32, bool)` - -GetCertificateIdOk returns a tuple with the CertificateId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCertificateId - -`func (o *ConfigurationSaml) SetCertificateId(v int32)` - -SetCertificateId sets CertificateId 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/Connector.md b/docs/Connector.md deleted file mode 100644 index 62e4fc7..0000000 --- a/docs/Connector.md +++ /dev/null @@ -1,160 +0,0 @@ -# Connector - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | Pointer to **int32** | Connectors unique ID in OneLogin. | [optional] -**Name** | Pointer to **string** | Name of Connector | [optional] -**IconUrl** | Pointer to **string** | A link to the icon's url. | [optional] -**AuthMethod** | Pointer to [**AuthMethod**](AuthMethod.md) | | [optional] -**AllowsNewParameters** | Pointer to **bool** | Indicates if apps created using this connector will be allowed to create custom parameters. | [optional] - -## Methods - -### NewConnector - -`func NewConnector() *Connector` - -NewConnector instantiates a new Connector 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 - -### NewConnectorWithDefaults - -`func NewConnectorWithDefaults() *Connector` - -NewConnectorWithDefaults instantiates a new Connector 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 - -### GetId - -`func (o *Connector) GetId() int32` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *Connector) GetIdOk() (*int32, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *Connector) SetId(v int32)` - -SetId sets Id field to given value. - -### HasId - -`func (o *Connector) HasId() bool` - -HasId returns a boolean if a field has been set. - -### GetName - -`func (o *Connector) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *Connector) 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 *Connector) SetName(v string)` - -SetName sets Name field to given value. - -### HasName - -`func (o *Connector) HasName() bool` - -HasName returns a boolean if a field has been set. - -### GetIconUrl - -`func (o *Connector) GetIconUrl() string` - -GetIconUrl returns the IconUrl field if non-nil, zero value otherwise. - -### GetIconUrlOk - -`func (o *Connector) GetIconUrlOk() (*string, bool)` - -GetIconUrlOk returns a tuple with the IconUrl field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIconUrl - -`func (o *Connector) SetIconUrl(v string)` - -SetIconUrl sets IconUrl field to given value. - -### HasIconUrl - -`func (o *Connector) HasIconUrl() bool` - -HasIconUrl returns a boolean if a field has been set. - -### GetAuthMethod - -`func (o *Connector) GetAuthMethod() AuthMethod` - -GetAuthMethod returns the AuthMethod field if non-nil, zero value otherwise. - -### GetAuthMethodOk - -`func (o *Connector) GetAuthMethodOk() (*AuthMethod, bool)` - -GetAuthMethodOk returns a tuple with the AuthMethod field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAuthMethod - -`func (o *Connector) SetAuthMethod(v AuthMethod)` - -SetAuthMethod sets AuthMethod field to given value. - -### HasAuthMethod - -`func (o *Connector) HasAuthMethod() bool` - -HasAuthMethod returns a boolean if a field has been set. - -### GetAllowsNewParameters - -`func (o *Connector) GetAllowsNewParameters() bool` - -GetAllowsNewParameters returns the AllowsNewParameters field if non-nil, zero value otherwise. - -### GetAllowsNewParametersOk - -`func (o *Connector) GetAllowsNewParametersOk() (*bool, bool)` - -GetAllowsNewParametersOk returns a tuple with the AllowsNewParameters field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAllowsNewParameters - -`func (o *Connector) SetAllowsNewParameters(v bool)` - -SetAllowsNewParameters sets AllowsNewParameters field to given value. - -### HasAllowsNewParameters - -`func (o *Connector) HasAllowsNewParameters() bool` - -HasAllowsNewParameters 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/CreateApp200Response.md b/docs/CreateApp200Response.md deleted file mode 100644 index 8b9ef77..0000000 --- a/docs/CreateApp200Response.md +++ /dev/null @@ -1,489 +0,0 @@ -# CreateApp200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | Pointer to **int32** | Apps unique ID in OneLogin. | [optional] [readonly] -**Name** | **string** | The name of the app. | -**Visible** | **bool** | Indicates if the app is visible in the OneLogin portal. | -**Description** | **string** | Freeform description of the app. | -**Notes** | Pointer to **string** | Freeform notes about the app. | [optional] -**IconUrl** | Pointer to **string** | A link to the apps icon url | [optional] -**AuthMethod** | Pointer to [**AuthMethod**](AuthMethod.md) | | [optional] -**PolicyId** | **int32** | The security policy assigned to the app. | -**AllowAssumedSignin** | Pointer to **bool** | Indicates whether or not administrators can access the app as a user that they have assumed control over. | [optional] -**TabId** | Pointer to **int32** | ID of the OneLogin portal tab that the app is assigned to. | [optional] -**ConnectorId** | **int32** | ID of the connector to base the app from. | -**CreatedAt** | Pointer to **string** | the date the app was created | [optional] -**UpdatedAt** | Pointer to **string** | the date the app was last updated | [optional] -**RoleIds** | Pointer to **[]int32** | List of Role IDs that are assigned to the app. On App Create or Update the entire array is replaced with the values provided. | [optional] -**Provisioning** | Pointer to [**GenericAppProvisioning**](GenericAppProvisioning.md) | | [optional] -**Parameters** | [**AppParameters**](AppParameters.md) | | -**EnforcementPoint** | Pointer to [**EnforcementPoint**](EnforcementPoint.md) | | [optional] -**Configuration** | [**ConfigurationSaml**](ConfigurationSaml.md) | | -**Sso** | Pointer to [**SsoSaml**](SsoSaml.md) | | [optional] - -## Methods - -### NewCreateApp200Response - -`func NewCreateApp200Response(name string, visible bool, description string, policyId int32, connectorId int32, parameters AppParameters, configuration ConfigurationSaml, ) *CreateApp200Response` - -NewCreateApp200Response instantiates a new CreateApp200Response 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 - -### NewCreateApp200ResponseWithDefaults - -`func NewCreateApp200ResponseWithDefaults() *CreateApp200Response` - -NewCreateApp200ResponseWithDefaults instantiates a new CreateApp200Response 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 - -### GetId - -`func (o *CreateApp200Response) GetId() int32` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *CreateApp200Response) GetIdOk() (*int32, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *CreateApp200Response) SetId(v int32)` - -SetId sets Id field to given value. - -### HasId - -`func (o *CreateApp200Response) HasId() bool` - -HasId returns a boolean if a field has been set. - -### GetName - -`func (o *CreateApp200Response) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *CreateApp200Response) 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 *CreateApp200Response) SetName(v string)` - -SetName sets Name field to given value. - - -### GetVisible - -`func (o *CreateApp200Response) GetVisible() bool` - -GetVisible returns the Visible field if non-nil, zero value otherwise. - -### GetVisibleOk - -`func (o *CreateApp200Response) GetVisibleOk() (*bool, bool)` - -GetVisibleOk returns a tuple with the Visible field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetVisible - -`func (o *CreateApp200Response) SetVisible(v bool)` - -SetVisible sets Visible field to given value. - - -### GetDescription - -`func (o *CreateApp200Response) GetDescription() string` - -GetDescription returns the Description field if non-nil, zero value otherwise. - -### GetDescriptionOk - -`func (o *CreateApp200Response) GetDescriptionOk() (*string, bool)` - -GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDescription - -`func (o *CreateApp200Response) SetDescription(v string)` - -SetDescription sets Description field to given value. - - -### GetNotes - -`func (o *CreateApp200Response) GetNotes() string` - -GetNotes returns the Notes field if non-nil, zero value otherwise. - -### GetNotesOk - -`func (o *CreateApp200Response) GetNotesOk() (*string, bool)` - -GetNotesOk returns a tuple with the Notes field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetNotes - -`func (o *CreateApp200Response) SetNotes(v string)` - -SetNotes sets Notes field to given value. - -### HasNotes - -`func (o *CreateApp200Response) HasNotes() bool` - -HasNotes returns a boolean if a field has been set. - -### GetIconUrl - -`func (o *CreateApp200Response) GetIconUrl() string` - -GetIconUrl returns the IconUrl field if non-nil, zero value otherwise. - -### GetIconUrlOk - -`func (o *CreateApp200Response) GetIconUrlOk() (*string, bool)` - -GetIconUrlOk returns a tuple with the IconUrl field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIconUrl - -`func (o *CreateApp200Response) SetIconUrl(v string)` - -SetIconUrl sets IconUrl field to given value. - -### HasIconUrl - -`func (o *CreateApp200Response) HasIconUrl() bool` - -HasIconUrl returns a boolean if a field has been set. - -### GetAuthMethod - -`func (o *CreateApp200Response) GetAuthMethod() AuthMethod` - -GetAuthMethod returns the AuthMethod field if non-nil, zero value otherwise. - -### GetAuthMethodOk - -`func (o *CreateApp200Response) GetAuthMethodOk() (*AuthMethod, bool)` - -GetAuthMethodOk returns a tuple with the AuthMethod field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAuthMethod - -`func (o *CreateApp200Response) SetAuthMethod(v AuthMethod)` - -SetAuthMethod sets AuthMethod field to given value. - -### HasAuthMethod - -`func (o *CreateApp200Response) HasAuthMethod() bool` - -HasAuthMethod returns a boolean if a field has been set. - -### GetPolicyId - -`func (o *CreateApp200Response) GetPolicyId() int32` - -GetPolicyId returns the PolicyId field if non-nil, zero value otherwise. - -### GetPolicyIdOk - -`func (o *CreateApp200Response) GetPolicyIdOk() (*int32, bool)` - -GetPolicyIdOk returns a tuple with the PolicyId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPolicyId - -`func (o *CreateApp200Response) SetPolicyId(v int32)` - -SetPolicyId sets PolicyId field to given value. - - -### GetAllowAssumedSignin - -`func (o *CreateApp200Response) GetAllowAssumedSignin() bool` - -GetAllowAssumedSignin returns the AllowAssumedSignin field if non-nil, zero value otherwise. - -### GetAllowAssumedSigninOk - -`func (o *CreateApp200Response) GetAllowAssumedSigninOk() (*bool, bool)` - -GetAllowAssumedSigninOk returns a tuple with the AllowAssumedSignin field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAllowAssumedSignin - -`func (o *CreateApp200Response) SetAllowAssumedSignin(v bool)` - -SetAllowAssumedSignin sets AllowAssumedSignin field to given value. - -### HasAllowAssumedSignin - -`func (o *CreateApp200Response) HasAllowAssumedSignin() bool` - -HasAllowAssumedSignin returns a boolean if a field has been set. - -### GetTabId - -`func (o *CreateApp200Response) GetTabId() int32` - -GetTabId returns the TabId field if non-nil, zero value otherwise. - -### GetTabIdOk - -`func (o *CreateApp200Response) GetTabIdOk() (*int32, bool)` - -GetTabIdOk returns a tuple with the TabId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTabId - -`func (o *CreateApp200Response) SetTabId(v int32)` - -SetTabId sets TabId field to given value. - -### HasTabId - -`func (o *CreateApp200Response) HasTabId() bool` - -HasTabId returns a boolean if a field has been set. - -### GetConnectorId - -`func (o *CreateApp200Response) GetConnectorId() int32` - -GetConnectorId returns the ConnectorId field if non-nil, zero value otherwise. - -### GetConnectorIdOk - -`func (o *CreateApp200Response) GetConnectorIdOk() (*int32, bool)` - -GetConnectorIdOk returns a tuple with the ConnectorId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConnectorId - -`func (o *CreateApp200Response) SetConnectorId(v int32)` - -SetConnectorId sets ConnectorId field to given value. - - -### GetCreatedAt - -`func (o *CreateApp200Response) GetCreatedAt() string` - -GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. - -### GetCreatedAtOk - -`func (o *CreateApp200Response) GetCreatedAtOk() (*string, bool)` - -GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCreatedAt - -`func (o *CreateApp200Response) SetCreatedAt(v string)` - -SetCreatedAt sets CreatedAt field to given value. - -### HasCreatedAt - -`func (o *CreateApp200Response) HasCreatedAt() bool` - -HasCreatedAt returns a boolean if a field has been set. - -### GetUpdatedAt - -`func (o *CreateApp200Response) GetUpdatedAt() string` - -GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. - -### GetUpdatedAtOk - -`func (o *CreateApp200Response) GetUpdatedAtOk() (*string, bool)` - -GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUpdatedAt - -`func (o *CreateApp200Response) SetUpdatedAt(v string)` - -SetUpdatedAt sets UpdatedAt field to given value. - -### HasUpdatedAt - -`func (o *CreateApp200Response) HasUpdatedAt() bool` - -HasUpdatedAt returns a boolean if a field has been set. - -### GetRoleIds - -`func (o *CreateApp200Response) GetRoleIds() []int32` - -GetRoleIds returns the RoleIds field if non-nil, zero value otherwise. - -### GetRoleIdsOk - -`func (o *CreateApp200Response) GetRoleIdsOk() (*[]int32, bool)` - -GetRoleIdsOk returns a tuple with the RoleIds field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRoleIds - -`func (o *CreateApp200Response) SetRoleIds(v []int32)` - -SetRoleIds sets RoleIds field to given value. - -### HasRoleIds - -`func (o *CreateApp200Response) HasRoleIds() bool` - -HasRoleIds returns a boolean if a field has been set. - -### GetProvisioning - -`func (o *CreateApp200Response) GetProvisioning() GenericAppProvisioning` - -GetProvisioning returns the Provisioning field if non-nil, zero value otherwise. - -### GetProvisioningOk - -`func (o *CreateApp200Response) GetProvisioningOk() (*GenericAppProvisioning, bool)` - -GetProvisioningOk returns a tuple with the Provisioning field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetProvisioning - -`func (o *CreateApp200Response) SetProvisioning(v GenericAppProvisioning)` - -SetProvisioning sets Provisioning field to given value. - -### HasProvisioning - -`func (o *CreateApp200Response) HasProvisioning() bool` - -HasProvisioning returns a boolean if a field has been set. - -### GetParameters - -`func (o *CreateApp200Response) GetParameters() AppParameters` - -GetParameters returns the Parameters field if non-nil, zero value otherwise. - -### GetParametersOk - -`func (o *CreateApp200Response) GetParametersOk() (*AppParameters, bool)` - -GetParametersOk returns a tuple with the Parameters field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetParameters - -`func (o *CreateApp200Response) SetParameters(v AppParameters)` - -SetParameters sets Parameters field to given value. - - -### GetEnforcementPoint - -`func (o *CreateApp200Response) GetEnforcementPoint() EnforcementPoint` - -GetEnforcementPoint returns the EnforcementPoint field if non-nil, zero value otherwise. - -### GetEnforcementPointOk - -`func (o *CreateApp200Response) GetEnforcementPointOk() (*EnforcementPoint, bool)` - -GetEnforcementPointOk returns a tuple with the EnforcementPoint field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetEnforcementPoint - -`func (o *CreateApp200Response) SetEnforcementPoint(v EnforcementPoint)` - -SetEnforcementPoint sets EnforcementPoint field to given value. - -### HasEnforcementPoint - -`func (o *CreateApp200Response) HasEnforcementPoint() bool` - -HasEnforcementPoint returns a boolean if a field has been set. - -### GetConfiguration - -`func (o *CreateApp200Response) GetConfiguration() ConfigurationSaml` - -GetConfiguration returns the Configuration field if non-nil, zero value otherwise. - -### GetConfigurationOk - -`func (o *CreateApp200Response) GetConfigurationOk() (*ConfigurationSaml, bool)` - -GetConfigurationOk returns a tuple with the Configuration field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConfiguration - -`func (o *CreateApp200Response) SetConfiguration(v ConfigurationSaml)` - -SetConfiguration sets Configuration field to given value. - - -### GetSso - -`func (o *CreateApp200Response) GetSso() SsoSaml` - -GetSso returns the Sso field if non-nil, zero value otherwise. - -### GetSsoOk - -`func (o *CreateApp200Response) GetSsoOk() (*SsoSaml, bool)` - -GetSsoOk returns a tuple with the Sso field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSso - -`func (o *CreateApp200Response) SetSso(v SsoSaml)` - -SetSso sets Sso field to given value. - -### HasSso - -`func (o *CreateApp200Response) HasSso() bool` - -HasSso 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/CreateAppRequest.md b/docs/CreateAppRequest.md deleted file mode 100644 index 90eb1d6..0000000 --- a/docs/CreateAppRequest.md +++ /dev/null @@ -1,489 +0,0 @@ -# CreateAppRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | Pointer to **int32** | Apps unique ID in OneLogin. | [optional] [readonly] -**Name** | **string** | The name of the app. | -**Visible** | **bool** | Indicates if the app is visible in the OneLogin portal. | -**Description** | **string** | Freeform description of the app. | -**Notes** | Pointer to **string** | Freeform notes about the app. | [optional] -**IconUrl** | Pointer to **string** | A link to the apps icon url | [optional] -**AuthMethod** | Pointer to [**AuthMethod**](AuthMethod.md) | | [optional] -**PolicyId** | **int32** | The security policy assigned to the app. | -**AllowAssumedSignin** | Pointer to **bool** | Indicates whether or not administrators can access the app as a user that they have assumed control over. | [optional] -**TabId** | Pointer to **int32** | ID of the OneLogin portal tab that the app is assigned to. | [optional] -**ConnectorId** | **int32** | ID of the connector to base the app from. | -**CreatedAt** | Pointer to **string** | the date the app was created | [optional] -**UpdatedAt** | Pointer to **string** | the date the app was last updated | [optional] -**RoleIds** | Pointer to **[]int32** | List of Role IDs that are assigned to the app. On App Create or Update the entire array is replaced with the values provided. | [optional] -**Provisioning** | Pointer to [**GenericAppProvisioning**](GenericAppProvisioning.md) | | [optional] -**Parameters** | [**AppParameters**](AppParameters.md) | | -**EnforcementPoint** | Pointer to [**EnforcementPoint**](EnforcementPoint.md) | | [optional] -**Configuration** | [**ConfigurationSaml**](ConfigurationSaml.md) | | -**Sso** | Pointer to [**SsoSaml**](SsoSaml.md) | | [optional] - -## Methods - -### NewCreateAppRequest - -`func NewCreateAppRequest(name string, visible bool, description string, policyId int32, connectorId int32, parameters AppParameters, configuration ConfigurationSaml, ) *CreateAppRequest` - -NewCreateAppRequest instantiates a new CreateAppRequest 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 - -### NewCreateAppRequestWithDefaults - -`func NewCreateAppRequestWithDefaults() *CreateAppRequest` - -NewCreateAppRequestWithDefaults instantiates a new CreateAppRequest 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 - -### GetId - -`func (o *CreateAppRequest) GetId() int32` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *CreateAppRequest) GetIdOk() (*int32, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *CreateAppRequest) SetId(v int32)` - -SetId sets Id field to given value. - -### HasId - -`func (o *CreateAppRequest) HasId() bool` - -HasId returns a boolean if a field has been set. - -### GetName - -`func (o *CreateAppRequest) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *CreateAppRequest) 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 *CreateAppRequest) SetName(v string)` - -SetName sets Name field to given value. - - -### GetVisible - -`func (o *CreateAppRequest) GetVisible() bool` - -GetVisible returns the Visible field if non-nil, zero value otherwise. - -### GetVisibleOk - -`func (o *CreateAppRequest) GetVisibleOk() (*bool, bool)` - -GetVisibleOk returns a tuple with the Visible field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetVisible - -`func (o *CreateAppRequest) SetVisible(v bool)` - -SetVisible sets Visible field to given value. - - -### GetDescription - -`func (o *CreateAppRequest) GetDescription() string` - -GetDescription returns the Description field if non-nil, zero value otherwise. - -### GetDescriptionOk - -`func (o *CreateAppRequest) GetDescriptionOk() (*string, bool)` - -GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDescription - -`func (o *CreateAppRequest) SetDescription(v string)` - -SetDescription sets Description field to given value. - - -### GetNotes - -`func (o *CreateAppRequest) GetNotes() string` - -GetNotes returns the Notes field if non-nil, zero value otherwise. - -### GetNotesOk - -`func (o *CreateAppRequest) GetNotesOk() (*string, bool)` - -GetNotesOk returns a tuple with the Notes field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetNotes - -`func (o *CreateAppRequest) SetNotes(v string)` - -SetNotes sets Notes field to given value. - -### HasNotes - -`func (o *CreateAppRequest) HasNotes() bool` - -HasNotes returns a boolean if a field has been set. - -### GetIconUrl - -`func (o *CreateAppRequest) GetIconUrl() string` - -GetIconUrl returns the IconUrl field if non-nil, zero value otherwise. - -### GetIconUrlOk - -`func (o *CreateAppRequest) GetIconUrlOk() (*string, bool)` - -GetIconUrlOk returns a tuple with the IconUrl field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIconUrl - -`func (o *CreateAppRequest) SetIconUrl(v string)` - -SetIconUrl sets IconUrl field to given value. - -### HasIconUrl - -`func (o *CreateAppRequest) HasIconUrl() bool` - -HasIconUrl returns a boolean if a field has been set. - -### GetAuthMethod - -`func (o *CreateAppRequest) GetAuthMethod() AuthMethod` - -GetAuthMethod returns the AuthMethod field if non-nil, zero value otherwise. - -### GetAuthMethodOk - -`func (o *CreateAppRequest) GetAuthMethodOk() (*AuthMethod, bool)` - -GetAuthMethodOk returns a tuple with the AuthMethod field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAuthMethod - -`func (o *CreateAppRequest) SetAuthMethod(v AuthMethod)` - -SetAuthMethod sets AuthMethod field to given value. - -### HasAuthMethod - -`func (o *CreateAppRequest) HasAuthMethod() bool` - -HasAuthMethod returns a boolean if a field has been set. - -### GetPolicyId - -`func (o *CreateAppRequest) GetPolicyId() int32` - -GetPolicyId returns the PolicyId field if non-nil, zero value otherwise. - -### GetPolicyIdOk - -`func (o *CreateAppRequest) GetPolicyIdOk() (*int32, bool)` - -GetPolicyIdOk returns a tuple with the PolicyId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPolicyId - -`func (o *CreateAppRequest) SetPolicyId(v int32)` - -SetPolicyId sets PolicyId field to given value. - - -### GetAllowAssumedSignin - -`func (o *CreateAppRequest) GetAllowAssumedSignin() bool` - -GetAllowAssumedSignin returns the AllowAssumedSignin field if non-nil, zero value otherwise. - -### GetAllowAssumedSigninOk - -`func (o *CreateAppRequest) GetAllowAssumedSigninOk() (*bool, bool)` - -GetAllowAssumedSigninOk returns a tuple with the AllowAssumedSignin field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAllowAssumedSignin - -`func (o *CreateAppRequest) SetAllowAssumedSignin(v bool)` - -SetAllowAssumedSignin sets AllowAssumedSignin field to given value. - -### HasAllowAssumedSignin - -`func (o *CreateAppRequest) HasAllowAssumedSignin() bool` - -HasAllowAssumedSignin returns a boolean if a field has been set. - -### GetTabId - -`func (o *CreateAppRequest) GetTabId() int32` - -GetTabId returns the TabId field if non-nil, zero value otherwise. - -### GetTabIdOk - -`func (o *CreateAppRequest) GetTabIdOk() (*int32, bool)` - -GetTabIdOk returns a tuple with the TabId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTabId - -`func (o *CreateAppRequest) SetTabId(v int32)` - -SetTabId sets TabId field to given value. - -### HasTabId - -`func (o *CreateAppRequest) HasTabId() bool` - -HasTabId returns a boolean if a field has been set. - -### GetConnectorId - -`func (o *CreateAppRequest) GetConnectorId() int32` - -GetConnectorId returns the ConnectorId field if non-nil, zero value otherwise. - -### GetConnectorIdOk - -`func (o *CreateAppRequest) GetConnectorIdOk() (*int32, bool)` - -GetConnectorIdOk returns a tuple with the ConnectorId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConnectorId - -`func (o *CreateAppRequest) SetConnectorId(v int32)` - -SetConnectorId sets ConnectorId field to given value. - - -### GetCreatedAt - -`func (o *CreateAppRequest) GetCreatedAt() string` - -GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. - -### GetCreatedAtOk - -`func (o *CreateAppRequest) GetCreatedAtOk() (*string, bool)` - -GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCreatedAt - -`func (o *CreateAppRequest) SetCreatedAt(v string)` - -SetCreatedAt sets CreatedAt field to given value. - -### HasCreatedAt - -`func (o *CreateAppRequest) HasCreatedAt() bool` - -HasCreatedAt returns a boolean if a field has been set. - -### GetUpdatedAt - -`func (o *CreateAppRequest) GetUpdatedAt() string` - -GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. - -### GetUpdatedAtOk - -`func (o *CreateAppRequest) GetUpdatedAtOk() (*string, bool)` - -GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUpdatedAt - -`func (o *CreateAppRequest) SetUpdatedAt(v string)` - -SetUpdatedAt sets UpdatedAt field to given value. - -### HasUpdatedAt - -`func (o *CreateAppRequest) HasUpdatedAt() bool` - -HasUpdatedAt returns a boolean if a field has been set. - -### GetRoleIds - -`func (o *CreateAppRequest) GetRoleIds() []int32` - -GetRoleIds returns the RoleIds field if non-nil, zero value otherwise. - -### GetRoleIdsOk - -`func (o *CreateAppRequest) GetRoleIdsOk() (*[]int32, bool)` - -GetRoleIdsOk returns a tuple with the RoleIds field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRoleIds - -`func (o *CreateAppRequest) SetRoleIds(v []int32)` - -SetRoleIds sets RoleIds field to given value. - -### HasRoleIds - -`func (o *CreateAppRequest) HasRoleIds() bool` - -HasRoleIds returns a boolean if a field has been set. - -### GetProvisioning - -`func (o *CreateAppRequest) GetProvisioning() GenericAppProvisioning` - -GetProvisioning returns the Provisioning field if non-nil, zero value otherwise. - -### GetProvisioningOk - -`func (o *CreateAppRequest) GetProvisioningOk() (*GenericAppProvisioning, bool)` - -GetProvisioningOk returns a tuple with the Provisioning field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetProvisioning - -`func (o *CreateAppRequest) SetProvisioning(v GenericAppProvisioning)` - -SetProvisioning sets Provisioning field to given value. - -### HasProvisioning - -`func (o *CreateAppRequest) HasProvisioning() bool` - -HasProvisioning returns a boolean if a field has been set. - -### GetParameters - -`func (o *CreateAppRequest) GetParameters() AppParameters` - -GetParameters returns the Parameters field if non-nil, zero value otherwise. - -### GetParametersOk - -`func (o *CreateAppRequest) GetParametersOk() (*AppParameters, bool)` - -GetParametersOk returns a tuple with the Parameters field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetParameters - -`func (o *CreateAppRequest) SetParameters(v AppParameters)` - -SetParameters sets Parameters field to given value. - - -### GetEnforcementPoint - -`func (o *CreateAppRequest) GetEnforcementPoint() EnforcementPoint` - -GetEnforcementPoint returns the EnforcementPoint field if non-nil, zero value otherwise. - -### GetEnforcementPointOk - -`func (o *CreateAppRequest) GetEnforcementPointOk() (*EnforcementPoint, bool)` - -GetEnforcementPointOk returns a tuple with the EnforcementPoint field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetEnforcementPoint - -`func (o *CreateAppRequest) SetEnforcementPoint(v EnforcementPoint)` - -SetEnforcementPoint sets EnforcementPoint field to given value. - -### HasEnforcementPoint - -`func (o *CreateAppRequest) HasEnforcementPoint() bool` - -HasEnforcementPoint returns a boolean if a field has been set. - -### GetConfiguration - -`func (o *CreateAppRequest) GetConfiguration() ConfigurationSaml` - -GetConfiguration returns the Configuration field if non-nil, zero value otherwise. - -### GetConfigurationOk - -`func (o *CreateAppRequest) GetConfigurationOk() (*ConfigurationSaml, bool)` - -GetConfigurationOk returns a tuple with the Configuration field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConfiguration - -`func (o *CreateAppRequest) SetConfiguration(v ConfigurationSaml)` - -SetConfiguration sets Configuration field to given value. - - -### GetSso - -`func (o *CreateAppRequest) GetSso() SsoSaml` - -GetSso returns the Sso field if non-nil, zero value otherwise. - -### GetSsoOk - -`func (o *CreateAppRequest) GetSsoOk() (*SsoSaml, bool)` - -GetSsoOk returns a tuple with the Sso field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSso - -`func (o *CreateAppRequest) SetSso(v SsoSaml)` - -SetSso sets Sso field to given value. - -### HasSso - -`func (o *CreateAppRequest) HasSso() bool` - -HasSso 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/CreateDeviceVerification201Response.md b/docs/CreateDeviceVerification201Response.md deleted file mode 100644 index 07dc46a..0000000 --- a/docs/CreateDeviceVerification201Response.md +++ /dev/null @@ -1,238 +0,0 @@ -# CreateDeviceVerification201Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**DeviceId** | Pointer to **int32** | Specifies the factor to be verified. | [optional] -**DisplayName** | Pointer to **string** | A name for the users device | [optional] -**ExpiresAt** | Pointer to **string** | A short lived token that is required to Verify the Factor. This token expires based on the expires_in parameter passed in. | [optional] -**RedirectTo** | Pointer to **string** | Only applies to Email MagicLink factor. Redirects MagicLink success page to specified URL after 2 seconds. Email must already be configured by the user. | [optional] -**UserDisplayName** | Pointer to **string** | Authentication factor display name assigned by users when they register the device. | [optional] -**Id** | Pointer to **string** | Registration identifier. | [optional] -**TypeDisplayName** | Pointer to **string** | Authentication factor display name as it appears to users upon initial registration, as defined by admins at Settings > Authentication Factors. | [optional] -**AuthFactorName** | Pointer to **string** | Authentication factor name, as it appears to administrators in OneLogin. | [optional] - -## Methods - -### NewCreateDeviceVerification201Response - -`func NewCreateDeviceVerification201Response() *CreateDeviceVerification201Response` - -NewCreateDeviceVerification201Response instantiates a new CreateDeviceVerification201Response 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 - -### NewCreateDeviceVerification201ResponseWithDefaults - -`func NewCreateDeviceVerification201ResponseWithDefaults() *CreateDeviceVerification201Response` - -NewCreateDeviceVerification201ResponseWithDefaults instantiates a new CreateDeviceVerification201Response 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 - -### GetDeviceId - -`func (o *CreateDeviceVerification201Response) GetDeviceId() int32` - -GetDeviceId returns the DeviceId field if non-nil, zero value otherwise. - -### GetDeviceIdOk - -`func (o *CreateDeviceVerification201Response) GetDeviceIdOk() (*int32, bool)` - -GetDeviceIdOk returns a tuple with the DeviceId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDeviceId - -`func (o *CreateDeviceVerification201Response) SetDeviceId(v int32)` - -SetDeviceId sets DeviceId field to given value. - -### HasDeviceId - -`func (o *CreateDeviceVerification201Response) HasDeviceId() bool` - -HasDeviceId returns a boolean if a field has been set. - -### GetDisplayName - -`func (o *CreateDeviceVerification201Response) GetDisplayName() string` - -GetDisplayName returns the DisplayName field if non-nil, zero value otherwise. - -### GetDisplayNameOk - -`func (o *CreateDeviceVerification201Response) GetDisplayNameOk() (*string, bool)` - -GetDisplayNameOk returns a tuple with the DisplayName field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDisplayName - -`func (o *CreateDeviceVerification201Response) SetDisplayName(v string)` - -SetDisplayName sets DisplayName field to given value. - -### HasDisplayName - -`func (o *CreateDeviceVerification201Response) HasDisplayName() bool` - -HasDisplayName returns a boolean if a field has been set. - -### GetExpiresAt - -`func (o *CreateDeviceVerification201Response) GetExpiresAt() string` - -GetExpiresAt returns the ExpiresAt field if non-nil, zero value otherwise. - -### GetExpiresAtOk - -`func (o *CreateDeviceVerification201Response) GetExpiresAtOk() (*string, bool)` - -GetExpiresAtOk returns a tuple with the ExpiresAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetExpiresAt - -`func (o *CreateDeviceVerification201Response) SetExpiresAt(v string)` - -SetExpiresAt sets ExpiresAt field to given value. - -### HasExpiresAt - -`func (o *CreateDeviceVerification201Response) HasExpiresAt() bool` - -HasExpiresAt returns a boolean if a field has been set. - -### GetRedirectTo - -`func (o *CreateDeviceVerification201Response) GetRedirectTo() string` - -GetRedirectTo returns the RedirectTo field if non-nil, zero value otherwise. - -### GetRedirectToOk - -`func (o *CreateDeviceVerification201Response) GetRedirectToOk() (*string, bool)` - -GetRedirectToOk returns a tuple with the RedirectTo field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRedirectTo - -`func (o *CreateDeviceVerification201Response) SetRedirectTo(v string)` - -SetRedirectTo sets RedirectTo field to given value. - -### HasRedirectTo - -`func (o *CreateDeviceVerification201Response) HasRedirectTo() bool` - -HasRedirectTo returns a boolean if a field has been set. - -### GetUserDisplayName - -`func (o *CreateDeviceVerification201Response) GetUserDisplayName() string` - -GetUserDisplayName returns the UserDisplayName field if non-nil, zero value otherwise. - -### GetUserDisplayNameOk - -`func (o *CreateDeviceVerification201Response) GetUserDisplayNameOk() (*string, bool)` - -GetUserDisplayNameOk returns a tuple with the UserDisplayName field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUserDisplayName - -`func (o *CreateDeviceVerification201Response) SetUserDisplayName(v string)` - -SetUserDisplayName sets UserDisplayName field to given value. - -### HasUserDisplayName - -`func (o *CreateDeviceVerification201Response) HasUserDisplayName() bool` - -HasUserDisplayName returns a boolean if a field has been set. - -### GetId - -`func (o *CreateDeviceVerification201Response) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *CreateDeviceVerification201Response) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *CreateDeviceVerification201Response) SetId(v string)` - -SetId sets Id field to given value. - -### HasId - -`func (o *CreateDeviceVerification201Response) HasId() bool` - -HasId returns a boolean if a field has been set. - -### GetTypeDisplayName - -`func (o *CreateDeviceVerification201Response) GetTypeDisplayName() string` - -GetTypeDisplayName returns the TypeDisplayName field if non-nil, zero value otherwise. - -### GetTypeDisplayNameOk - -`func (o *CreateDeviceVerification201Response) GetTypeDisplayNameOk() (*string, bool)` - -GetTypeDisplayNameOk returns a tuple with the TypeDisplayName field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTypeDisplayName - -`func (o *CreateDeviceVerification201Response) SetTypeDisplayName(v string)` - -SetTypeDisplayName sets TypeDisplayName field to given value. - -### HasTypeDisplayName - -`func (o *CreateDeviceVerification201Response) HasTypeDisplayName() bool` - -HasTypeDisplayName returns a boolean if a field has been set. - -### GetAuthFactorName - -`func (o *CreateDeviceVerification201Response) GetAuthFactorName() string` - -GetAuthFactorName returns the AuthFactorName field if non-nil, zero value otherwise. - -### GetAuthFactorNameOk - -`func (o *CreateDeviceVerification201Response) GetAuthFactorNameOk() (*string, bool)` - -GetAuthFactorNameOk returns a tuple with the AuthFactorName field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAuthFactorName - -`func (o *CreateDeviceVerification201Response) SetAuthFactorName(v string)` - -SetAuthFactorName sets AuthFactorName field to given value. - -### HasAuthFactorName - -`func (o *CreateDeviceVerification201Response) HasAuthFactorName() bool` - -HasAuthFactorName 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/CreateDeviceVerificationRequest.md b/docs/CreateDeviceVerificationRequest.md deleted file mode 100644 index d1a406f..0000000 --- a/docs/CreateDeviceVerificationRequest.md +++ /dev/null @@ -1,155 +0,0 @@ -# CreateDeviceVerificationRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**DeviceId** | **int32** | Specifies the factor to be verified. | -**DisplayName** | Pointer to **string** | A name for the users device | [optional] -**ExpiresIn** | Pointer to **string** | Defaults to 120. Valid values are: 120-900 seconds. | [optional] -**RedirectTo** | Pointer to **string** | Only applies to Email MagicLink factor. Redirects MagicLink success page to specified URL after 2 seconds. Email must already be configured by the user. | [optional] -**CustomMessage** | Pointer to **string** | Only applies to SMS factor. A message template that will be sent via SMS. Max length of the message after template items are inserted is 160 characters including the OTP code. SMS must already be configured by the user. The following template variables can be included in the message. - {{otp_code}} - The security code. - {{otp_expiry}} - The number of minutes until the one time code expires. | [optional] - -## Methods - -### NewCreateDeviceVerificationRequest - -`func NewCreateDeviceVerificationRequest(deviceId int32, ) *CreateDeviceVerificationRequest` - -NewCreateDeviceVerificationRequest instantiates a new CreateDeviceVerificationRequest 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 - -### NewCreateDeviceVerificationRequestWithDefaults - -`func NewCreateDeviceVerificationRequestWithDefaults() *CreateDeviceVerificationRequest` - -NewCreateDeviceVerificationRequestWithDefaults instantiates a new CreateDeviceVerificationRequest 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 - -### GetDeviceId - -`func (o *CreateDeviceVerificationRequest) GetDeviceId() int32` - -GetDeviceId returns the DeviceId field if non-nil, zero value otherwise. - -### GetDeviceIdOk - -`func (o *CreateDeviceVerificationRequest) GetDeviceIdOk() (*int32, bool)` - -GetDeviceIdOk returns a tuple with the DeviceId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDeviceId - -`func (o *CreateDeviceVerificationRequest) SetDeviceId(v int32)` - -SetDeviceId sets DeviceId field to given value. - - -### GetDisplayName - -`func (o *CreateDeviceVerificationRequest) GetDisplayName() string` - -GetDisplayName returns the DisplayName field if non-nil, zero value otherwise. - -### GetDisplayNameOk - -`func (o *CreateDeviceVerificationRequest) GetDisplayNameOk() (*string, bool)` - -GetDisplayNameOk returns a tuple with the DisplayName field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDisplayName - -`func (o *CreateDeviceVerificationRequest) SetDisplayName(v string)` - -SetDisplayName sets DisplayName field to given value. - -### HasDisplayName - -`func (o *CreateDeviceVerificationRequest) HasDisplayName() bool` - -HasDisplayName returns a boolean if a field has been set. - -### GetExpiresIn - -`func (o *CreateDeviceVerificationRequest) GetExpiresIn() string` - -GetExpiresIn returns the ExpiresIn field if non-nil, zero value otherwise. - -### GetExpiresInOk - -`func (o *CreateDeviceVerificationRequest) GetExpiresInOk() (*string, bool)` - -GetExpiresInOk returns a tuple with the ExpiresIn field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetExpiresIn - -`func (o *CreateDeviceVerificationRequest) SetExpiresIn(v string)` - -SetExpiresIn sets ExpiresIn field to given value. - -### HasExpiresIn - -`func (o *CreateDeviceVerificationRequest) HasExpiresIn() bool` - -HasExpiresIn returns a boolean if a field has been set. - -### GetRedirectTo - -`func (o *CreateDeviceVerificationRequest) GetRedirectTo() string` - -GetRedirectTo returns the RedirectTo field if non-nil, zero value otherwise. - -### GetRedirectToOk - -`func (o *CreateDeviceVerificationRequest) GetRedirectToOk() (*string, bool)` - -GetRedirectToOk returns a tuple with the RedirectTo field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRedirectTo - -`func (o *CreateDeviceVerificationRequest) SetRedirectTo(v string)` - -SetRedirectTo sets RedirectTo field to given value. - -### HasRedirectTo - -`func (o *CreateDeviceVerificationRequest) HasRedirectTo() bool` - -HasRedirectTo returns a boolean if a field has been set. - -### GetCustomMessage - -`func (o *CreateDeviceVerificationRequest) GetCustomMessage() string` - -GetCustomMessage returns the CustomMessage field if non-nil, zero value otherwise. - -### GetCustomMessageOk - -`func (o *CreateDeviceVerificationRequest) GetCustomMessageOk() (*string, bool)` - -GetCustomMessageOk returns a tuple with the CustomMessage field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCustomMessage - -`func (o *CreateDeviceVerificationRequest) SetCustomMessage(v string)` - -SetCustomMessage sets CustomMessage field to given value. - -### HasCustomMessage - -`func (o *CreateDeviceVerificationRequest) HasCustomMessage() bool` - -HasCustomMessage 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/CreateFactorRegistration201Response.md b/docs/CreateFactorRegistration201Response.md deleted file mode 100644 index 90aa328..0000000 --- a/docs/CreateFactorRegistration201Response.md +++ /dev/null @@ -1,186 +0,0 @@ -# CreateFactorRegistration201Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**DeviceId** | Pointer to **string** | MFA device identifier. | [optional] -**UserDisplayName** | Pointer to **string** | Authentication factor display name assigned by users when they register the device. | [optional] -**TypeDisplayName** | Pointer to **string** | Authentication factor display name as it appears to users upon initial registration, as defined by admins at Settings > Authentication Factors. | [optional] -**AuthFactorName** | Pointer to **string** | Authentication factor name, as it appears to administrators in OneLogin. | [optional] -**Id** | Pointer to **string** | Verification identifier used in subsequent verification step. | [optional] -**UserId** | Pointer to **string** | User identifier | [optional] - -## Methods - -### NewCreateFactorRegistration201Response - -`func NewCreateFactorRegistration201Response() *CreateFactorRegistration201Response` - -NewCreateFactorRegistration201Response instantiates a new CreateFactorRegistration201Response 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 - -### NewCreateFactorRegistration201ResponseWithDefaults - -`func NewCreateFactorRegistration201ResponseWithDefaults() *CreateFactorRegistration201Response` - -NewCreateFactorRegistration201ResponseWithDefaults instantiates a new CreateFactorRegistration201Response 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 - -### GetDeviceId - -`func (o *CreateFactorRegistration201Response) GetDeviceId() string` - -GetDeviceId returns the DeviceId field if non-nil, zero value otherwise. - -### GetDeviceIdOk - -`func (o *CreateFactorRegistration201Response) GetDeviceIdOk() (*string, bool)` - -GetDeviceIdOk returns a tuple with the DeviceId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDeviceId - -`func (o *CreateFactorRegistration201Response) SetDeviceId(v string)` - -SetDeviceId sets DeviceId field to given value. - -### HasDeviceId - -`func (o *CreateFactorRegistration201Response) HasDeviceId() bool` - -HasDeviceId returns a boolean if a field has been set. - -### GetUserDisplayName - -`func (o *CreateFactorRegistration201Response) GetUserDisplayName() string` - -GetUserDisplayName returns the UserDisplayName field if non-nil, zero value otherwise. - -### GetUserDisplayNameOk - -`func (o *CreateFactorRegistration201Response) GetUserDisplayNameOk() (*string, bool)` - -GetUserDisplayNameOk returns a tuple with the UserDisplayName field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUserDisplayName - -`func (o *CreateFactorRegistration201Response) SetUserDisplayName(v string)` - -SetUserDisplayName sets UserDisplayName field to given value. - -### HasUserDisplayName - -`func (o *CreateFactorRegistration201Response) HasUserDisplayName() bool` - -HasUserDisplayName returns a boolean if a field has been set. - -### GetTypeDisplayName - -`func (o *CreateFactorRegistration201Response) GetTypeDisplayName() string` - -GetTypeDisplayName returns the TypeDisplayName field if non-nil, zero value otherwise. - -### GetTypeDisplayNameOk - -`func (o *CreateFactorRegistration201Response) GetTypeDisplayNameOk() (*string, bool)` - -GetTypeDisplayNameOk returns a tuple with the TypeDisplayName field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTypeDisplayName - -`func (o *CreateFactorRegistration201Response) SetTypeDisplayName(v string)` - -SetTypeDisplayName sets TypeDisplayName field to given value. - -### HasTypeDisplayName - -`func (o *CreateFactorRegistration201Response) HasTypeDisplayName() bool` - -HasTypeDisplayName returns a boolean if a field has been set. - -### GetAuthFactorName - -`func (o *CreateFactorRegistration201Response) GetAuthFactorName() string` - -GetAuthFactorName returns the AuthFactorName field if non-nil, zero value otherwise. - -### GetAuthFactorNameOk - -`func (o *CreateFactorRegistration201Response) GetAuthFactorNameOk() (*string, bool)` - -GetAuthFactorNameOk returns a tuple with the AuthFactorName field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAuthFactorName - -`func (o *CreateFactorRegistration201Response) SetAuthFactorName(v string)` - -SetAuthFactorName sets AuthFactorName field to given value. - -### HasAuthFactorName - -`func (o *CreateFactorRegistration201Response) HasAuthFactorName() bool` - -HasAuthFactorName returns a boolean if a field has been set. - -### GetId - -`func (o *CreateFactorRegistration201Response) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *CreateFactorRegistration201Response) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *CreateFactorRegistration201Response) SetId(v string)` - -SetId sets Id field to given value. - -### HasId - -`func (o *CreateFactorRegistration201Response) HasId() bool` - -HasId returns a boolean if a field has been set. - -### GetUserId - -`func (o *CreateFactorRegistration201Response) GetUserId() string` - -GetUserId returns the UserId field if non-nil, zero value otherwise. - -### GetUserIdOk - -`func (o *CreateFactorRegistration201Response) GetUserIdOk() (*string, bool)` - -GetUserIdOk returns a tuple with the UserId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUserId - -`func (o *CreateFactorRegistration201Response) SetUserId(v string)` - -SetUserId sets UserId field to given value. - -### HasUserId - -`func (o *CreateFactorRegistration201Response) HasUserId() bool` - -HasUserId 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/CreateFactorRegistrationRequest.md b/docs/CreateFactorRegistrationRequest.md deleted file mode 100644 index 104a4f6..0000000 --- a/docs/CreateFactorRegistrationRequest.md +++ /dev/null @@ -1,176 +0,0 @@ -# CreateFactorRegistrationRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**FactorId** | **int32** | The identifier of the factor to enroll the user with. See Get Available Factors for a list of possible id values. | -**DisplayName** | **string** | A name for the users device | -**ExpiresIn** | Pointer to **string** | Defaults to 120. Valid values are: 120-900 seconds. | [optional] -**Verified** | Pointer to **bool** | Defaults to false. The following factors support verified = true as part of the initial registration request: OneLogin SMS, OneLogin Voice, OneLogin Email. When using verified = true it is critical that the supported factors have pre-verified values, most likely imported from an existing directory or by the users themselvdes. Factors such as Authenticator and OneLogin Protect do not support verification = true as the user interaction is required to verify the factor. | [optional] -**RedirectTo** | Pointer to **string** | Only applies to Email MagicLink factor. Redirects MagicLink success page to specified URL after 2 seconds. Email must already be configured by the user. | [optional] -**CustomMessage** | Pointer to **string** | Only applies to SMS factor. A message template that will be sent via SMS. Max length of the message after template items are inserted is 160 characters including the OTP code. SMS must already be configured by the user. The following template variables can be included in the message. - {{otp_code}} - The security code. - {{otp_expiry}} - The number of minutes until the one time code expires. | [optional] - -## Methods - -### NewCreateFactorRegistrationRequest - -`func NewCreateFactorRegistrationRequest(factorId int32, displayName string, ) *CreateFactorRegistrationRequest` - -NewCreateFactorRegistrationRequest instantiates a new CreateFactorRegistrationRequest 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 - -### NewCreateFactorRegistrationRequestWithDefaults - -`func NewCreateFactorRegistrationRequestWithDefaults() *CreateFactorRegistrationRequest` - -NewCreateFactorRegistrationRequestWithDefaults instantiates a new CreateFactorRegistrationRequest 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 - -### GetFactorId - -`func (o *CreateFactorRegistrationRequest) GetFactorId() int32` - -GetFactorId returns the FactorId field if non-nil, zero value otherwise. - -### GetFactorIdOk - -`func (o *CreateFactorRegistrationRequest) GetFactorIdOk() (*int32, bool)` - -GetFactorIdOk returns a tuple with the FactorId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetFactorId - -`func (o *CreateFactorRegistrationRequest) SetFactorId(v int32)` - -SetFactorId sets FactorId field to given value. - - -### GetDisplayName - -`func (o *CreateFactorRegistrationRequest) GetDisplayName() string` - -GetDisplayName returns the DisplayName field if non-nil, zero value otherwise. - -### GetDisplayNameOk - -`func (o *CreateFactorRegistrationRequest) GetDisplayNameOk() (*string, bool)` - -GetDisplayNameOk returns a tuple with the DisplayName field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDisplayName - -`func (o *CreateFactorRegistrationRequest) SetDisplayName(v string)` - -SetDisplayName sets DisplayName field to given value. - - -### GetExpiresIn - -`func (o *CreateFactorRegistrationRequest) GetExpiresIn() string` - -GetExpiresIn returns the ExpiresIn field if non-nil, zero value otherwise. - -### GetExpiresInOk - -`func (o *CreateFactorRegistrationRequest) GetExpiresInOk() (*string, bool)` - -GetExpiresInOk returns a tuple with the ExpiresIn field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetExpiresIn - -`func (o *CreateFactorRegistrationRequest) SetExpiresIn(v string)` - -SetExpiresIn sets ExpiresIn field to given value. - -### HasExpiresIn - -`func (o *CreateFactorRegistrationRequest) HasExpiresIn() bool` - -HasExpiresIn returns a boolean if a field has been set. - -### GetVerified - -`func (o *CreateFactorRegistrationRequest) GetVerified() bool` - -GetVerified returns the Verified field if non-nil, zero value otherwise. - -### GetVerifiedOk - -`func (o *CreateFactorRegistrationRequest) GetVerifiedOk() (*bool, bool)` - -GetVerifiedOk returns a tuple with the Verified field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetVerified - -`func (o *CreateFactorRegistrationRequest) SetVerified(v bool)` - -SetVerified sets Verified field to given value. - -### HasVerified - -`func (o *CreateFactorRegistrationRequest) HasVerified() bool` - -HasVerified returns a boolean if a field has been set. - -### GetRedirectTo - -`func (o *CreateFactorRegistrationRequest) GetRedirectTo() string` - -GetRedirectTo returns the RedirectTo field if non-nil, zero value otherwise. - -### GetRedirectToOk - -`func (o *CreateFactorRegistrationRequest) GetRedirectToOk() (*string, bool)` - -GetRedirectToOk returns a tuple with the RedirectTo field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRedirectTo - -`func (o *CreateFactorRegistrationRequest) SetRedirectTo(v string)` - -SetRedirectTo sets RedirectTo field to given value. - -### HasRedirectTo - -`func (o *CreateFactorRegistrationRequest) HasRedirectTo() bool` - -HasRedirectTo returns a boolean if a field has been set. - -### GetCustomMessage - -`func (o *CreateFactorRegistrationRequest) GetCustomMessage() string` - -GetCustomMessage returns the CustomMessage field if non-nil, zero value otherwise. - -### GetCustomMessageOk - -`func (o *CreateFactorRegistrationRequest) GetCustomMessageOk() (*string, bool)` - -GetCustomMessageOk returns a tuple with the CustomMessage field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCustomMessage - -`func (o *CreateFactorRegistrationRequest) SetCustomMessage(v string)` - -SetCustomMessage sets CustomMessage field to given value. - -### HasCustomMessage - -`func (o *CreateFactorRegistrationRequest) HasCustomMessage() bool` - -HasCustomMessage 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/CreatePrivilege200Response.md b/docs/CreatePrivilege200Response.md deleted file mode 100644 index 62fb6dc..0000000 --- a/docs/CreatePrivilege200Response.md +++ /dev/null @@ -1,56 +0,0 @@ -# CreatePrivilege200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | Pointer to **string** | Privilege Id | [optional] - -## Methods - -### NewCreatePrivilege200Response - -`func NewCreatePrivilege200Response() *CreatePrivilege200Response` - -NewCreatePrivilege200Response instantiates a new CreatePrivilege200Response 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 - -### NewCreatePrivilege200ResponseWithDefaults - -`func NewCreatePrivilege200ResponseWithDefaults() *CreatePrivilege200Response` - -NewCreatePrivilege200ResponseWithDefaults instantiates a new CreatePrivilege200Response 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 - -### GetId - -`func (o *CreatePrivilege200Response) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *CreatePrivilege200Response) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *CreatePrivilege200Response) SetId(v string)` - -SetId sets Id field to given value. - -### HasId - -`func (o *CreatePrivilege200Response) HasId() bool` - -HasId 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/CreateRole201ResponseInner.md b/docs/CreateRole201ResponseInner.md deleted file mode 100644 index 5b1d759..0000000 --- a/docs/CreateRole201ResponseInner.md +++ /dev/null @@ -1,56 +0,0 @@ -# CreateRole201ResponseInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | Pointer to **int32** | | [optional] - -## Methods - -### NewCreateRole201ResponseInner - -`func NewCreateRole201ResponseInner() *CreateRole201ResponseInner` - -NewCreateRole201ResponseInner instantiates a new CreateRole201ResponseInner 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 - -### NewCreateRole201ResponseInnerWithDefaults - -`func NewCreateRole201ResponseInnerWithDefaults() *CreateRole201ResponseInner` - -NewCreateRole201ResponseInnerWithDefaults instantiates a new CreateRole201ResponseInner 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 - -### GetId - -`func (o *CreateRole201ResponseInner) GetId() int32` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *CreateRole201ResponseInner) GetIdOk() (*int32, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *CreateRole201ResponseInner) SetId(v int32)` - -SetId sets Id field to given value. - -### HasId - -`func (o *CreateRole201ResponseInner) HasId() bool` - -HasId 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/Design.md b/docs/Design.md new file mode 100644 index 0000000..875db88 --- /dev/null +++ b/docs/Design.md @@ -0,0 +1,85 @@ +# SDK Design Document + +## Introduction + +This design document outlines the architecture and implementation approach for building a new SDK for Onelogin's API. The SDK aims to provide developers with a convenient and user-friendly interface to interact with Onelogin's services. + +## Goals + +- Modularity: Design the SDK with separate modules for authentication, API request handling, data models, error handling, and utility functions. +- Encapsulation: Define well-defined interfaces for each module to encapsulate their functionality and hide implementation details. +- Simplified Interface: Use the Facade pattern to provide a unified and simplified interface for users of the SDK, shielding them from underlying complexities. +- Customizability: Implement dependency injection to allow users to customize or replace certain components, such as authentication or HTTP client implementations. + +## Architecture Overview + +The SDK architecture will be based on a combination of Modular Architecture, Facade Pattern, and Dependency Injection. + +### Modular Architecture + +Identify the following functional components for the SDK: + +1. Authentication: Responsible for handling authentication mechanisms. +2. API: Handles API request construction, communication, and response handling. +3. Models: Represents entities and resources in the Onelogin API. +4. Error Handling: Manages errors and provides error types and codes. +5. Utilities: Contains utility functions and helper methods. + +Create separate modules or packages for each component to ensure clear separation of concerns and better organization. + +### Facade Pattern + +Design a facade module or package, "onelogin," that acts as the entry point for SDK users. The facade will provide a simplified interface and shield users from the complexities of underlying modules. + +The facade will offer methods for authentication, making API requests, handling responses, and error management. It will internally coordinate and interact with the authentication and API modules to fulfill these functionalities. + +### Dependency Injection + +Identify components within the SDK that can benefit from customization or replacement by users, such as the authentication module or the HTTP client implementation. + +Design interfaces for these components, such as "Authenticator" and "HTTPClient," specifying the required methods or functionality. Implement default implementations for these interfaces, which will be used if users do not provide custom implementations. + +Allow users to provide their custom implementations of these interfaces by accepting them as parameters in relevant methods or constructors. Use dependency injection to inject the appropriate implementation instances into the modules or components that require them. + +## Implementation Steps + +1. Set up the project structure with separate directories for each module: authentication, api, models, error, and utilities. +2. Implement the authentication module: + - Create an "auth.go" file within the authentication package to handle authentication mechanisms (e.g., API key, OAuth, or SAML). + - Implement methods to authenticate and generate authentication tokens. +3. Implement the API module: + - Create a "client.go" file within the api package to handle API request construction, communication, and response handling. + - Implement methods for making HTTP requests, handling response parsing, and error handling. +4. Implement the models module: + - Create files (e.g., "user.go" and "group.go") within the models package to define the data models that represent Onelogin entities and resources. + - Define appropriate struct types, fields, and methods for convenient data access and manipulation. +5. Implement the error handling module: + - Create an "error.go" file within the error package to define error types and codes that reflect possible failures and error scenarios in the Onelogin API. + - Implement error handling mechanisms that allow users to handle and recover from errors effectively. +6. Implement the utilities module: + - Create a "util.go" file within the utilities package to include utility functions and helper methods used across the SDK. + - Implement commonly used functions, such as data serialization, date/time formatting, or string manipulation. + +7. Design and implement the facade module: + - Create an "onelogin.go" file within the onelogin package to define the facade module. + - Implement methods that provide a simplified interface for users, delegating calls to the relevant modules. + - Coordinate authentication and API request handling using the appropriate modules. +8. Apply dependency injection: + - Identify components that can be customized or replaced by users, such as the authentication module or the HTTP client implementation. + - Design interfaces (e.g., "Authenticator" and "HTTPClient") within their respective modules and implement default implementations. + - Allow users to provide their custom implementations by accepting them as parameters in relevant methods or constructors. + - Use dependency injection to inject the appropriate implementation instances into the modules or components that require them. +9. Write comprehensive documentation: + - Create documentation files (e.g., index.md, authentication.md, api.md, models.md, error_handling.md, usage_examples.md) within the docs directory. + - Provide clear explanations of the SDK's features, functionalities, and usage examples. + - Include code samples and guidelines to help users integrate and utilize the SDK efficiently. + - Document any customization options and how to use dependency injection. +10. Conduct thorough testing: + - Write unit tests for each module, covering different functionalities and edge cases. + - Create test files (e.g., authentication_test.go, api_test.go, models_test.go, error_handling_test.go) within the tests directory. + - Ensure that the SDK behaves as expected and handles errors appropriately. +11. Continuously iterate and gather feedback from users, making improvements and addressing any issues that arise. + +## Conclusion + +By following this architecture pattern, we aim to develop a modular, user-friendly SDK for Onelogin's API. The combination of Modular Architecture, Facade Pattern, and Dependency Injection will ensure maintainability, extensibility, and ease of use for developers integrating with Onelogin. diff --git a/docs/Device.md b/docs/Device.md deleted file mode 100644 index 026b83b..0000000 --- a/docs/Device.md +++ /dev/null @@ -1,82 +0,0 @@ -# Device - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**DeviceId** | Pointer to **int32** | an ID for the device type that must be submitted with the Verify Factor API call. | [optional] -**DeviceType** | Pointer to **string** | Lists an available MFA device type, such as OneLogin OTP SMS or Google Authenticator. | [optional] - -## Methods - -### NewDevice - -`func NewDevice() *Device` - -NewDevice instantiates a new Device 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 - -### NewDeviceWithDefaults - -`func NewDeviceWithDefaults() *Device` - -NewDeviceWithDefaults instantiates a new Device 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 - -### GetDeviceId - -`func (o *Device) GetDeviceId() int32` - -GetDeviceId returns the DeviceId field if non-nil, zero value otherwise. - -### GetDeviceIdOk - -`func (o *Device) GetDeviceIdOk() (*int32, bool)` - -GetDeviceIdOk returns a tuple with the DeviceId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDeviceId - -`func (o *Device) SetDeviceId(v int32)` - -SetDeviceId sets DeviceId field to given value. - -### HasDeviceId - -`func (o *Device) HasDeviceId() bool` - -HasDeviceId returns a boolean if a field has been set. - -### GetDeviceType - -`func (o *Device) GetDeviceType() string` - -GetDeviceType returns the DeviceType field if non-nil, zero value otherwise. - -### GetDeviceTypeOk - -`func (o *Device) GetDeviceTypeOk() (*string, bool)` - -GetDeviceTypeOk returns a tuple with the DeviceType field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDeviceType - -`func (o *Device) SetDeviceType(v string)` - -SetDeviceType sets DeviceType field to given value. - -### HasDeviceType - -`func (o *Device) HasDeviceType() bool` - -HasDeviceType 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/EmailConfig.md b/docs/EmailConfig.md deleted file mode 100644 index c1152c9..0000000 --- a/docs/EmailConfig.md +++ /dev/null @@ -1,197 +0,0 @@ -# EmailConfig - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Address** | **string** | Email Settings server address | -**UseTls** | Pointer to **bool** | Use TLS | [optional] [default to true] -**From** | **string** | The From email address in the message. | -**Domain** | **string** | Domain of the From address. | -**UserName** | Pointer to **string** | The user name of the account to authenticate with the Email Settings server. | [optional] -**Password** | Pointer to **string** | The password of the account to authenticate with the Email Settings server. | [optional] -**Port** | Pointer to **int32** | Defaults to 25. | [optional] [default to 25] - -## Methods - -### NewEmailConfig - -`func NewEmailConfig(address string, from string, domain string, ) *EmailConfig` - -NewEmailConfig instantiates a new EmailConfig 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 - -### NewEmailConfigWithDefaults - -`func NewEmailConfigWithDefaults() *EmailConfig` - -NewEmailConfigWithDefaults instantiates a new EmailConfig 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 - -### GetAddress - -`func (o *EmailConfig) GetAddress() string` - -GetAddress returns the Address field if non-nil, zero value otherwise. - -### GetAddressOk - -`func (o *EmailConfig) GetAddressOk() (*string, bool)` - -GetAddressOk returns a tuple with the Address field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAddress - -`func (o *EmailConfig) SetAddress(v string)` - -SetAddress sets Address field to given value. - - -### GetUseTls - -`func (o *EmailConfig) GetUseTls() bool` - -GetUseTls returns the UseTls field if non-nil, zero value otherwise. - -### GetUseTlsOk - -`func (o *EmailConfig) GetUseTlsOk() (*bool, bool)` - -GetUseTlsOk returns a tuple with the UseTls field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUseTls - -`func (o *EmailConfig) SetUseTls(v bool)` - -SetUseTls sets UseTls field to given value. - -### HasUseTls - -`func (o *EmailConfig) HasUseTls() bool` - -HasUseTls returns a boolean if a field has been set. - -### GetFrom - -`func (o *EmailConfig) GetFrom() string` - -GetFrom returns the From field if non-nil, zero value otherwise. - -### GetFromOk - -`func (o *EmailConfig) GetFromOk() (*string, bool)` - -GetFromOk returns a tuple with the From field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetFrom - -`func (o *EmailConfig) SetFrom(v string)` - -SetFrom sets From field to given value. - - -### GetDomain - -`func (o *EmailConfig) GetDomain() string` - -GetDomain returns the Domain field if non-nil, zero value otherwise. - -### GetDomainOk - -`func (o *EmailConfig) GetDomainOk() (*string, bool)` - -GetDomainOk returns a tuple with the Domain field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDomain - -`func (o *EmailConfig) SetDomain(v string)` - -SetDomain sets Domain field to given value. - - -### GetUserName - -`func (o *EmailConfig) GetUserName() string` - -GetUserName returns the UserName field if non-nil, zero value otherwise. - -### GetUserNameOk - -`func (o *EmailConfig) 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 *EmailConfig) SetUserName(v string)` - -SetUserName sets UserName field to given value. - -### HasUserName - -`func (o *EmailConfig) HasUserName() bool` - -HasUserName returns a boolean if a field has been set. - -### GetPassword - -`func (o *EmailConfig) GetPassword() string` - -GetPassword returns the Password field if non-nil, zero value otherwise. - -### GetPasswordOk - -`func (o *EmailConfig) GetPasswordOk() (*string, bool)` - -GetPasswordOk returns a tuple with the Password field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPassword - -`func (o *EmailConfig) SetPassword(v string)` - -SetPassword sets Password field to given value. - -### HasPassword - -`func (o *EmailConfig) HasPassword() bool` - -HasPassword returns a boolean if a field has been set. - -### GetPort - -`func (o *EmailConfig) GetPort() int32` - -GetPort returns the Port field if non-nil, zero value otherwise. - -### GetPortOk - -`func (o *EmailConfig) GetPortOk() (*int32, bool)` - -GetPortOk returns a tuple with the Port field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPort - -`func (o *EmailConfig) SetPort(v int32)` - -SetPort sets Port field to given value. - -### HasPort - -`func (o *EmailConfig) HasPort() bool` - -HasPort 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/EnforcementPoint.md b/docs/EnforcementPoint.md deleted file mode 100644 index 03cc94e..0000000 --- a/docs/EnforcementPoint.md +++ /dev/null @@ -1,398 +0,0 @@ -# EnforcementPoint - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**RequireSitewideAuthentication** | Pointer to **bool** | Require user authentication to access any resource protected by this enforcement point. | [optional] -**Conditions** | Pointer to **string** | If access is conditional, the conditions that must evaluate to true to allow access to a resource. For example, to require the user must be authenticated and have either the role Admin or User | [optional] -**SessionExpiryFixed** | Pointer to [**ClockCounter**](ClockCounter.md) | | [optional] -**SessionExpiryInactivity** | Pointer to [**ClockCounter**](ClockCounter.md) | | [optional] -**Permissions** | Pointer to **string** | Specify to always `allow`, `deny` access to resources, of if access is `conditional`. | [optional] -**Token** | Pointer to **string** | Can only be set on create. Access Gateway Token. | [optional] [readonly] -**Target** | Pointer to **NullableString** | A fully-qualified URL to the internal application including scheme, authority and path. The target host authority must be an IP address, not a hostname. | [optional] -**Resources** | Pointer to [**[]EnforcementPointResourcesInner**](EnforcementPointResourcesInner.md) | Array of resource objects | [optional] -**ContextRoot** | Pointer to **string** | The root path to the application, often the name of the application. Can be any name, path or just a slash (“/”). The context root uniquely identifies the application within the enforcement point. | [optional] -**UseTargetHostHeader** | Pointer to **bool** | Use the target host header as opposed to the original gateway or upstream host header. | [optional] -**Vhost** | Pointer to **NullableString** | A comma-delimited list of one or more virtual hosts that map to applications assigned to the enforcement point. A VHOST may be a host name or an IP address. VHOST distinguish between applications that are at the same context root. | [optional] -**LandingPage** | Pointer to **NullableString** | The location within the context root to which the browser will be redirected for IdP-initiated single sign-on. For example, the landing page might be an index page in the context root such as index.html or default.aspx. The landing page cannot begin with a slash and must use valid URL characters. | [optional] -**CaseSensitive** | Pointer to **bool** | The URL path evaluation is case insensitive by default. Resources hosted on web servers such as Apache, NGINX and Java EE are case sensitive paths. Web servers such as Microsoft IIS are not case-sensitive. | [optional] - -## Methods - -### NewEnforcementPoint - -`func NewEnforcementPoint() *EnforcementPoint` - -NewEnforcementPoint instantiates a new EnforcementPoint 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 - -### NewEnforcementPointWithDefaults - -`func NewEnforcementPointWithDefaults() *EnforcementPoint` - -NewEnforcementPointWithDefaults instantiates a new EnforcementPoint 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 - -### GetRequireSitewideAuthentication - -`func (o *EnforcementPoint) GetRequireSitewideAuthentication() bool` - -GetRequireSitewideAuthentication returns the RequireSitewideAuthentication field if non-nil, zero value otherwise. - -### GetRequireSitewideAuthenticationOk - -`func (o *EnforcementPoint) GetRequireSitewideAuthenticationOk() (*bool, bool)` - -GetRequireSitewideAuthenticationOk returns a tuple with the RequireSitewideAuthentication field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRequireSitewideAuthentication - -`func (o *EnforcementPoint) SetRequireSitewideAuthentication(v bool)` - -SetRequireSitewideAuthentication sets RequireSitewideAuthentication field to given value. - -### HasRequireSitewideAuthentication - -`func (o *EnforcementPoint) HasRequireSitewideAuthentication() bool` - -HasRequireSitewideAuthentication returns a boolean if a field has been set. - -### GetConditions - -`func (o *EnforcementPoint) GetConditions() string` - -GetConditions returns the Conditions field if non-nil, zero value otherwise. - -### GetConditionsOk - -`func (o *EnforcementPoint) GetConditionsOk() (*string, bool)` - -GetConditionsOk returns a tuple with the Conditions field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConditions - -`func (o *EnforcementPoint) SetConditions(v string)` - -SetConditions sets Conditions field to given value. - -### HasConditions - -`func (o *EnforcementPoint) HasConditions() bool` - -HasConditions returns a boolean if a field has been set. - -### GetSessionExpiryFixed - -`func (o *EnforcementPoint) GetSessionExpiryFixed() ClockCounter` - -GetSessionExpiryFixed returns the SessionExpiryFixed field if non-nil, zero value otherwise. - -### GetSessionExpiryFixedOk - -`func (o *EnforcementPoint) GetSessionExpiryFixedOk() (*ClockCounter, bool)` - -GetSessionExpiryFixedOk returns a tuple with the SessionExpiryFixed field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSessionExpiryFixed - -`func (o *EnforcementPoint) SetSessionExpiryFixed(v ClockCounter)` - -SetSessionExpiryFixed sets SessionExpiryFixed field to given value. - -### HasSessionExpiryFixed - -`func (o *EnforcementPoint) HasSessionExpiryFixed() bool` - -HasSessionExpiryFixed returns a boolean if a field has been set. - -### GetSessionExpiryInactivity - -`func (o *EnforcementPoint) GetSessionExpiryInactivity() ClockCounter` - -GetSessionExpiryInactivity returns the SessionExpiryInactivity field if non-nil, zero value otherwise. - -### GetSessionExpiryInactivityOk - -`func (o *EnforcementPoint) GetSessionExpiryInactivityOk() (*ClockCounter, bool)` - -GetSessionExpiryInactivityOk returns a tuple with the SessionExpiryInactivity field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSessionExpiryInactivity - -`func (o *EnforcementPoint) SetSessionExpiryInactivity(v ClockCounter)` - -SetSessionExpiryInactivity sets SessionExpiryInactivity field to given value. - -### HasSessionExpiryInactivity - -`func (o *EnforcementPoint) HasSessionExpiryInactivity() bool` - -HasSessionExpiryInactivity returns a boolean if a field has been set. - -### GetPermissions - -`func (o *EnforcementPoint) GetPermissions() string` - -GetPermissions returns the Permissions field if non-nil, zero value otherwise. - -### GetPermissionsOk - -`func (o *EnforcementPoint) GetPermissionsOk() (*string, bool)` - -GetPermissionsOk returns a tuple with the Permissions field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPermissions - -`func (o *EnforcementPoint) SetPermissions(v string)` - -SetPermissions sets Permissions field to given value. - -### HasPermissions - -`func (o *EnforcementPoint) HasPermissions() bool` - -HasPermissions returns a boolean if a field has been set. - -### GetToken - -`func (o *EnforcementPoint) GetToken() string` - -GetToken returns the Token field if non-nil, zero value otherwise. - -### GetTokenOk - -`func (o *EnforcementPoint) GetTokenOk() (*string, bool)` - -GetTokenOk returns a tuple with the Token field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetToken - -`func (o *EnforcementPoint) SetToken(v string)` - -SetToken sets Token field to given value. - -### HasToken - -`func (o *EnforcementPoint) HasToken() bool` - -HasToken returns a boolean if a field has been set. - -### GetTarget - -`func (o *EnforcementPoint) GetTarget() string` - -GetTarget returns the Target field if non-nil, zero value otherwise. - -### GetTargetOk - -`func (o *EnforcementPoint) 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 *EnforcementPoint) SetTarget(v string)` - -SetTarget sets Target field to given value. - -### HasTarget - -`func (o *EnforcementPoint) HasTarget() bool` - -HasTarget returns a boolean if a field has been set. - -### SetTargetNil - -`func (o *EnforcementPoint) SetTargetNil(b bool)` - - SetTargetNil sets the value for Target to be an explicit nil - -### UnsetTarget -`func (o *EnforcementPoint) UnsetTarget()` - -UnsetTarget ensures that no value is present for Target, not even an explicit nil -### GetResources - -`func (o *EnforcementPoint) GetResources() []EnforcementPointResourcesInner` - -GetResources returns the Resources field if non-nil, zero value otherwise. - -### GetResourcesOk - -`func (o *EnforcementPoint) GetResourcesOk() (*[]EnforcementPointResourcesInner, bool)` - -GetResourcesOk returns a tuple with the Resources field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetResources - -`func (o *EnforcementPoint) SetResources(v []EnforcementPointResourcesInner)` - -SetResources sets Resources field to given value. - -### HasResources - -`func (o *EnforcementPoint) HasResources() bool` - -HasResources returns a boolean if a field has been set. - -### GetContextRoot - -`func (o *EnforcementPoint) GetContextRoot() string` - -GetContextRoot returns the ContextRoot field if non-nil, zero value otherwise. - -### GetContextRootOk - -`func (o *EnforcementPoint) GetContextRootOk() (*string, bool)` - -GetContextRootOk returns a tuple with the ContextRoot field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetContextRoot - -`func (o *EnforcementPoint) SetContextRoot(v string)` - -SetContextRoot sets ContextRoot field to given value. - -### HasContextRoot - -`func (o *EnforcementPoint) HasContextRoot() bool` - -HasContextRoot returns a boolean if a field has been set. - -### GetUseTargetHostHeader - -`func (o *EnforcementPoint) GetUseTargetHostHeader() bool` - -GetUseTargetHostHeader returns the UseTargetHostHeader field if non-nil, zero value otherwise. - -### GetUseTargetHostHeaderOk - -`func (o *EnforcementPoint) GetUseTargetHostHeaderOk() (*bool, bool)` - -GetUseTargetHostHeaderOk returns a tuple with the UseTargetHostHeader field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUseTargetHostHeader - -`func (o *EnforcementPoint) SetUseTargetHostHeader(v bool)` - -SetUseTargetHostHeader sets UseTargetHostHeader field to given value. - -### HasUseTargetHostHeader - -`func (o *EnforcementPoint) HasUseTargetHostHeader() bool` - -HasUseTargetHostHeader returns a boolean if a field has been set. - -### GetVhost - -`func (o *EnforcementPoint) GetVhost() string` - -GetVhost returns the Vhost field if non-nil, zero value otherwise. - -### GetVhostOk - -`func (o *EnforcementPoint) GetVhostOk() (*string, bool)` - -GetVhostOk returns a tuple with the Vhost field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetVhost - -`func (o *EnforcementPoint) SetVhost(v string)` - -SetVhost sets Vhost field to given value. - -### HasVhost - -`func (o *EnforcementPoint) HasVhost() bool` - -HasVhost returns a boolean if a field has been set. - -### SetVhostNil - -`func (o *EnforcementPoint) SetVhostNil(b bool)` - - SetVhostNil sets the value for Vhost to be an explicit nil - -### UnsetVhost -`func (o *EnforcementPoint) UnsetVhost()` - -UnsetVhost ensures that no value is present for Vhost, not even an explicit nil -### GetLandingPage - -`func (o *EnforcementPoint) GetLandingPage() string` - -GetLandingPage returns the LandingPage field if non-nil, zero value otherwise. - -### GetLandingPageOk - -`func (o *EnforcementPoint) GetLandingPageOk() (*string, bool)` - -GetLandingPageOk returns a tuple with the LandingPage field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLandingPage - -`func (o *EnforcementPoint) SetLandingPage(v string)` - -SetLandingPage sets LandingPage field to given value. - -### HasLandingPage - -`func (o *EnforcementPoint) HasLandingPage() bool` - -HasLandingPage returns a boolean if a field has been set. - -### SetLandingPageNil - -`func (o *EnforcementPoint) SetLandingPageNil(b bool)` - - SetLandingPageNil sets the value for LandingPage to be an explicit nil - -### UnsetLandingPage -`func (o *EnforcementPoint) UnsetLandingPage()` - -UnsetLandingPage ensures that no value is present for LandingPage, not even an explicit nil -### GetCaseSensitive - -`func (o *EnforcementPoint) GetCaseSensitive() bool` - -GetCaseSensitive returns the CaseSensitive field if non-nil, zero value otherwise. - -### GetCaseSensitiveOk - -`func (o *EnforcementPoint) GetCaseSensitiveOk() (*bool, bool)` - -GetCaseSensitiveOk returns a tuple with the CaseSensitive field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCaseSensitive - -`func (o *EnforcementPoint) SetCaseSensitive(v bool)` - -SetCaseSensitive sets CaseSensitive field to given value. - -### HasCaseSensitive - -`func (o *EnforcementPoint) HasCaseSensitive() bool` - -HasCaseSensitive 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/EnforcementPointResourcesInner.md b/docs/EnforcementPointResourcesInner.md deleted file mode 100644 index 404d87e..0000000 --- a/docs/EnforcementPointResourcesInner.md +++ /dev/null @@ -1,170 +0,0 @@ -# EnforcementPointResourcesInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Path** | Pointer to **string** | | [optional] -**IsPathRegex** | Pointer to **NullableBool** | | [optional] -**RequireAuth** | Pointer to **bool** | | [optional] -**Permission** | Pointer to **string** | | [optional] -**Conditions** | Pointer to **string** | required if permission == \"conditions\" | [optional] - -## Methods - -### NewEnforcementPointResourcesInner - -`func NewEnforcementPointResourcesInner() *EnforcementPointResourcesInner` - -NewEnforcementPointResourcesInner instantiates a new EnforcementPointResourcesInner 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 - -### NewEnforcementPointResourcesInnerWithDefaults - -`func NewEnforcementPointResourcesInnerWithDefaults() *EnforcementPointResourcesInner` - -NewEnforcementPointResourcesInnerWithDefaults instantiates a new EnforcementPointResourcesInner 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 - -### GetPath - -`func (o *EnforcementPointResourcesInner) GetPath() string` - -GetPath returns the Path field if non-nil, zero value otherwise. - -### GetPathOk - -`func (o *EnforcementPointResourcesInner) 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 *EnforcementPointResourcesInner) SetPath(v string)` - -SetPath sets Path field to given value. - -### HasPath - -`func (o *EnforcementPointResourcesInner) HasPath() bool` - -HasPath returns a boolean if a field has been set. - -### GetIsPathRegex - -`func (o *EnforcementPointResourcesInner) GetIsPathRegex() bool` - -GetIsPathRegex returns the IsPathRegex field if non-nil, zero value otherwise. - -### GetIsPathRegexOk - -`func (o *EnforcementPointResourcesInner) GetIsPathRegexOk() (*bool, bool)` - -GetIsPathRegexOk returns a tuple with the IsPathRegex field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIsPathRegex - -`func (o *EnforcementPointResourcesInner) SetIsPathRegex(v bool)` - -SetIsPathRegex sets IsPathRegex field to given value. - -### HasIsPathRegex - -`func (o *EnforcementPointResourcesInner) HasIsPathRegex() bool` - -HasIsPathRegex returns a boolean if a field has been set. - -### SetIsPathRegexNil - -`func (o *EnforcementPointResourcesInner) SetIsPathRegexNil(b bool)` - - SetIsPathRegexNil sets the value for IsPathRegex to be an explicit nil - -### UnsetIsPathRegex -`func (o *EnforcementPointResourcesInner) UnsetIsPathRegex()` - -UnsetIsPathRegex ensures that no value is present for IsPathRegex, not even an explicit nil -### GetRequireAuth - -`func (o *EnforcementPointResourcesInner) GetRequireAuth() bool` - -GetRequireAuth returns the RequireAuth field if non-nil, zero value otherwise. - -### GetRequireAuthOk - -`func (o *EnforcementPointResourcesInner) GetRequireAuthOk() (*bool, bool)` - -GetRequireAuthOk returns a tuple with the RequireAuth field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRequireAuth - -`func (o *EnforcementPointResourcesInner) SetRequireAuth(v bool)` - -SetRequireAuth sets RequireAuth field to given value. - -### HasRequireAuth - -`func (o *EnforcementPointResourcesInner) HasRequireAuth() bool` - -HasRequireAuth returns a boolean if a field has been set. - -### GetPermission - -`func (o *EnforcementPointResourcesInner) GetPermission() string` - -GetPermission returns the Permission field if non-nil, zero value otherwise. - -### GetPermissionOk - -`func (o *EnforcementPointResourcesInner) GetPermissionOk() (*string, bool)` - -GetPermissionOk returns a tuple with the Permission field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPermission - -`func (o *EnforcementPointResourcesInner) SetPermission(v string)` - -SetPermission sets Permission field to given value. - -### HasPermission - -`func (o *EnforcementPointResourcesInner) HasPermission() bool` - -HasPermission returns a boolean if a field has been set. - -### GetConditions - -`func (o *EnforcementPointResourcesInner) GetConditions() string` - -GetConditions returns the Conditions field if non-nil, zero value otherwise. - -### GetConditionsOk - -`func (o *EnforcementPointResourcesInner) GetConditionsOk() (*string, bool)` - -GetConditionsOk returns a tuple with the Conditions field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConditions - -`func (o *EnforcementPointResourcesInner) SetConditions(v string)` - -SetConditions sets Conditions field to given value. - -### HasConditions - -`func (o *EnforcementPointResourcesInner) HasConditions() bool` - -HasConditions 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/EnrollMfaFactor200Response.md b/docs/EnrollMfaFactor200Response.md deleted file mode 100644 index 6c4c5ae..0000000 --- a/docs/EnrollMfaFactor200Response.md +++ /dev/null @@ -1,82 +0,0 @@ -# EnrollMfaFactor200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Status** | Pointer to [**Error**](Error.md) | | [optional] -**Data** | Pointer to [**[]GetEnrolledFactors200ResponseDataOtpDevicesInner**](GetEnrolledFactors200ResponseDataOtpDevicesInner.md) | | [optional] - -## Methods - -### NewEnrollMfaFactor200Response - -`func NewEnrollMfaFactor200Response() *EnrollMfaFactor200Response` - -NewEnrollMfaFactor200Response instantiates a new EnrollMfaFactor200Response 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 - -### NewEnrollMfaFactor200ResponseWithDefaults - -`func NewEnrollMfaFactor200ResponseWithDefaults() *EnrollMfaFactor200Response` - -NewEnrollMfaFactor200ResponseWithDefaults instantiates a new EnrollMfaFactor200Response 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 - -### GetStatus - -`func (o *EnrollMfaFactor200Response) GetStatus() Error` - -GetStatus returns the Status field if non-nil, zero value otherwise. - -### GetStatusOk - -`func (o *EnrollMfaFactor200Response) GetStatusOk() (*Error, bool)` - -GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStatus - -`func (o *EnrollMfaFactor200Response) SetStatus(v Error)` - -SetStatus sets Status field to given value. - -### HasStatus - -`func (o *EnrollMfaFactor200Response) HasStatus() bool` - -HasStatus returns a boolean if a field has been set. - -### GetData - -`func (o *EnrollMfaFactor200Response) GetData() []GetEnrolledFactors200ResponseDataOtpDevicesInner` - -GetData returns the Data field if non-nil, zero value otherwise. - -### GetDataOk - -`func (o *EnrollMfaFactor200Response) GetDataOk() (*[]GetEnrolledFactors200ResponseDataOtpDevicesInner, bool)` - -GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetData - -`func (o *EnrollMfaFactor200Response) SetData(v []GetEnrolledFactors200ResponseDataOtpDevicesInner)` - -SetData sets Data field to given value. - -### HasData - -`func (o *EnrollMfaFactor200Response) HasData() bool` - -HasData 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/Error.md b/docs/Error.md deleted file mode 100644 index b878e7c..0000000 --- a/docs/Error.md +++ /dev/null @@ -1,124 +0,0 @@ -# Error - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Error** | Pointer to **bool** | | [optional] -**Code** | **int32** | | -**Type** | Pointer to **string** | | [optional] -**Message** | **string** | | - -## Methods - -### NewError - -`func NewError(code int32, message string, ) *Error` - -NewError instantiates a new Error 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 - -### NewErrorWithDefaults - -`func NewErrorWithDefaults() *Error` - -NewErrorWithDefaults instantiates a new Error 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 - -### GetError - -`func (o *Error) GetError() bool` - -GetError returns the Error field if non-nil, zero value otherwise. - -### GetErrorOk - -`func (o *Error) GetErrorOk() (*bool, bool)` - -GetErrorOk returns a tuple with the Error field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetError - -`func (o *Error) SetError(v bool)` - -SetError sets Error field to given value. - -### HasError - -`func (o *Error) HasError() bool` - -HasError returns a boolean if a field has been set. - -### GetCode - -`func (o *Error) GetCode() int32` - -GetCode returns the Code field if non-nil, zero value otherwise. - -### GetCodeOk - -`func (o *Error) GetCodeOk() (*int32, bool)` - -GetCodeOk returns a tuple with the Code field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCode - -`func (o *Error) SetCode(v int32)` - -SetCode sets Code field to given value. - - -### GetType - -`func (o *Error) GetType() string` - -GetType returns the Type field if non-nil, zero value otherwise. - -### GetTypeOk - -`func (o *Error) GetTypeOk() (*string, 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 *Error) SetType(v string)` - -SetType sets Type field to given value. - -### HasType - -`func (o *Error) HasType() bool` - -HasType returns a boolean if a field has been set. - -### GetMessage - -`func (o *Error) GetMessage() string` - -GetMessage returns the Message field if non-nil, zero value otherwise. - -### GetMessageOk - -`func (o *Error) GetMessageOk() (*string, bool)` - -GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMessage - -`func (o *Error) SetMessage(v string)` - -SetMessage sets Message 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/Event.md b/docs/Event.md deleted file mode 100644 index 8a3cebf..0000000 --- a/docs/Event.md +++ /dev/null @@ -1,1200 +0,0 @@ -# Event - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**AccountId** | Pointer to **int32** | Account that triggered the event. | [optional] -**ActorSystem** | Pointer to **string** | Acting system that triggered the event when the actor is not a user. | [optional] -**ActorUserId** | Pointer to **int32** | ID of the user whose action triggered the event. | [optional] -**ActorUserName** | Pointer to **string** | First and last name of the user whose action triggered the event. | [optional] -**AdcId** | Pointer to **int32** | | [optional] -**AppName** | Pointer to **string** | Name of the app involved in the event, if applicable. | [optional] -**AppId** | Pointer to **int32** | ID of the app involved in the event, if applicable. | [optional] -**AssumedBySuperadminOrReseller** | Pointer to **int32** | | [optional] -**AssumingActingUserId** | Pointer to **int32** | ID of the user who assumed the role of the acting user to trigger the event, if applicable. | [optional] -**CertificateId** | Pointer to **int32** | | [optional] -**ClientId** | Pointer to **string** | Client ID used to generate the access token that made the API call that generated the event. | [optional] -**CreatedAt** | Pointer to **string** | ISO8601 Time and date at which the event was created. This value is autogenerated by OneLogin. | [optional] -**CustomMessage** | Pointer to **string** | More details about the event. | [optional] -**DirectorySyncRunId** | Pointer to **int32** | Directory sync run ID. | [optional] -**ErrorDescription** | Pointer to **string** | Provisioning error details, if applicable. | [optional] -**EventTypeId** | Pointer to **int32** | Type of event triggered. | [optional] -**GroupName** | Pointer to **string** | Name of a group involved in the event. | [optional] -**GroupId** | Pointer to **int32** | ID of a group involved in the event. | [optional] -**Id** | Pointer to **int32** | Event's unique ID in OneLogin. Autogenerated by OneLogin. | [optional] -**Ipaddr** | Pointer to **string** | IP address of the machine used to trigger the event. | [optional] -**MappingId** | Pointer to **int32** | | [optional] -**Notes** | Pointer to **string** | More details about the event. | [optional] -**ObjectId** | Pointer to **int32** | | [optional] -**OtpDeviceId** | Pointer to **int32** | ID of a device involved in the event. | [optional] -**OtpDeviceName** | Pointer to **string** | Name of a device involved in the event. | [optional] -**Param** | Pointer to **string** | | [optional] -**PolicyId** | Pointer to **int32** | ID of the policy involved in the event. | [optional] -**PolicyName** | Pointer to **string** | Name of the policy involved in the event. | [optional] -**PolicyType** | Pointer to **string** | | [optional] -**PrivilegeId** | Pointer to **int32** | | [optional] -**ProxyIp** | Pointer to **string** | | [optional] -**RadiusConfigId** | Pointer to **int32** | | [optional] -**ResolvedAt** | Pointer to **string** | | [optional] -**ResourceTypeId** | Pointer to **int32** | ID of the resource (user, role, group, and so forth) associated with the event. | [optional] -**RiskCookieId** | Pointer to **string** | Identifier for risk cookie | [optional] -**RiskReasons** | Pointer to **string** | | [optional] -**RiskScore** | Pointer to **int32** | | [optional] -**RoleId** | Pointer to **int32** | ID of a role involved in the event. | [optional] -**RoleName** | Pointer to **string** | Name of a role involved in the event. | [optional] -**ServiceDirectoryId** | Pointer to **int32** | | [optional] -**Solved** | Pointer to **bool** | | [optional] -**TrustedIdpId** | Pointer to **int32** | | [optional] -**UserFieldId** | Pointer to **int32** | | [optional] -**UserId** | Pointer to **int32** | ID of the user that was acted upon to trigger the event. | [optional] -**UserName** | Pointer to **string** | Name of the user that was acted upon to trigger the event. | [optional] - -## Methods - -### NewEvent - -`func NewEvent() *Event` - -NewEvent instantiates a new Event 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 - -### NewEventWithDefaults - -`func NewEventWithDefaults() *Event` - -NewEventWithDefaults instantiates a new Event 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 - -### GetAccountId - -`func (o *Event) GetAccountId() int32` - -GetAccountId returns the AccountId field if non-nil, zero value otherwise. - -### GetAccountIdOk - -`func (o *Event) GetAccountIdOk() (*int32, bool)` - -GetAccountIdOk returns a tuple with the AccountId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAccountId - -`func (o *Event) SetAccountId(v int32)` - -SetAccountId sets AccountId field to given value. - -### HasAccountId - -`func (o *Event) HasAccountId() bool` - -HasAccountId returns a boolean if a field has been set. - -### GetActorSystem - -`func (o *Event) GetActorSystem() string` - -GetActorSystem returns the ActorSystem field if non-nil, zero value otherwise. - -### GetActorSystemOk - -`func (o *Event) GetActorSystemOk() (*string, bool)` - -GetActorSystemOk returns a tuple with the ActorSystem field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetActorSystem - -`func (o *Event) SetActorSystem(v string)` - -SetActorSystem sets ActorSystem field to given value. - -### HasActorSystem - -`func (o *Event) HasActorSystem() bool` - -HasActorSystem returns a boolean if a field has been set. - -### GetActorUserId - -`func (o *Event) GetActorUserId() int32` - -GetActorUserId returns the ActorUserId field if non-nil, zero value otherwise. - -### GetActorUserIdOk - -`func (o *Event) GetActorUserIdOk() (*int32, bool)` - -GetActorUserIdOk returns a tuple with the ActorUserId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetActorUserId - -`func (o *Event) SetActorUserId(v int32)` - -SetActorUserId sets ActorUserId field to given value. - -### HasActorUserId - -`func (o *Event) HasActorUserId() bool` - -HasActorUserId returns a boolean if a field has been set. - -### GetActorUserName - -`func (o *Event) GetActorUserName() string` - -GetActorUserName returns the ActorUserName field if non-nil, zero value otherwise. - -### GetActorUserNameOk - -`func (o *Event) GetActorUserNameOk() (*string, bool)` - -GetActorUserNameOk returns a tuple with the ActorUserName field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetActorUserName - -`func (o *Event) SetActorUserName(v string)` - -SetActorUserName sets ActorUserName field to given value. - -### HasActorUserName - -`func (o *Event) HasActorUserName() bool` - -HasActorUserName returns a boolean if a field has been set. - -### GetAdcId - -`func (o *Event) GetAdcId() int32` - -GetAdcId returns the AdcId field if non-nil, zero value otherwise. - -### GetAdcIdOk - -`func (o *Event) GetAdcIdOk() (*int32, bool)` - -GetAdcIdOk returns a tuple with the AdcId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAdcId - -`func (o *Event) SetAdcId(v int32)` - -SetAdcId sets AdcId field to given value. - -### HasAdcId - -`func (o *Event) HasAdcId() bool` - -HasAdcId returns a boolean if a field has been set. - -### GetAppName - -`func (o *Event) GetAppName() string` - -GetAppName returns the AppName field if non-nil, zero value otherwise. - -### GetAppNameOk - -`func (o *Event) GetAppNameOk() (*string, bool)` - -GetAppNameOk returns a tuple with the AppName field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAppName - -`func (o *Event) SetAppName(v string)` - -SetAppName sets AppName field to given value. - -### HasAppName - -`func (o *Event) HasAppName() bool` - -HasAppName returns a boolean if a field has been set. - -### GetAppId - -`func (o *Event) GetAppId() int32` - -GetAppId returns the AppId field if non-nil, zero value otherwise. - -### GetAppIdOk - -`func (o *Event) GetAppIdOk() (*int32, bool)` - -GetAppIdOk returns a tuple with the AppId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAppId - -`func (o *Event) SetAppId(v int32)` - -SetAppId sets AppId field to given value. - -### HasAppId - -`func (o *Event) HasAppId() bool` - -HasAppId returns a boolean if a field has been set. - -### GetAssumedBySuperadminOrReseller - -`func (o *Event) GetAssumedBySuperadminOrReseller() int32` - -GetAssumedBySuperadminOrReseller returns the AssumedBySuperadminOrReseller field if non-nil, zero value otherwise. - -### GetAssumedBySuperadminOrResellerOk - -`func (o *Event) GetAssumedBySuperadminOrResellerOk() (*int32, bool)` - -GetAssumedBySuperadminOrResellerOk returns a tuple with the AssumedBySuperadminOrReseller field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAssumedBySuperadminOrReseller - -`func (o *Event) SetAssumedBySuperadminOrReseller(v int32)` - -SetAssumedBySuperadminOrReseller sets AssumedBySuperadminOrReseller field to given value. - -### HasAssumedBySuperadminOrReseller - -`func (o *Event) HasAssumedBySuperadminOrReseller() bool` - -HasAssumedBySuperadminOrReseller returns a boolean if a field has been set. - -### GetAssumingActingUserId - -`func (o *Event) GetAssumingActingUserId() int32` - -GetAssumingActingUserId returns the AssumingActingUserId field if non-nil, zero value otherwise. - -### GetAssumingActingUserIdOk - -`func (o *Event) GetAssumingActingUserIdOk() (*int32, bool)` - -GetAssumingActingUserIdOk returns a tuple with the AssumingActingUserId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAssumingActingUserId - -`func (o *Event) SetAssumingActingUserId(v int32)` - -SetAssumingActingUserId sets AssumingActingUserId field to given value. - -### HasAssumingActingUserId - -`func (o *Event) HasAssumingActingUserId() bool` - -HasAssumingActingUserId returns a boolean if a field has been set. - -### GetCertificateId - -`func (o *Event) GetCertificateId() int32` - -GetCertificateId returns the CertificateId field if non-nil, zero value otherwise. - -### GetCertificateIdOk - -`func (o *Event) GetCertificateIdOk() (*int32, bool)` - -GetCertificateIdOk returns a tuple with the CertificateId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCertificateId - -`func (o *Event) SetCertificateId(v int32)` - -SetCertificateId sets CertificateId field to given value. - -### HasCertificateId - -`func (o *Event) HasCertificateId() bool` - -HasCertificateId returns a boolean if a field has been set. - -### GetClientId - -`func (o *Event) GetClientId() string` - -GetClientId returns the ClientId field if non-nil, zero value otherwise. - -### GetClientIdOk - -`func (o *Event) GetClientIdOk() (*string, bool)` - -GetClientIdOk returns a tuple with the ClientId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetClientId - -`func (o *Event) SetClientId(v string)` - -SetClientId sets ClientId field to given value. - -### HasClientId - -`func (o *Event) HasClientId() bool` - -HasClientId returns a boolean if a field has been set. - -### GetCreatedAt - -`func (o *Event) GetCreatedAt() string` - -GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. - -### GetCreatedAtOk - -`func (o *Event) GetCreatedAtOk() (*string, bool)` - -GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCreatedAt - -`func (o *Event) SetCreatedAt(v string)` - -SetCreatedAt sets CreatedAt field to given value. - -### HasCreatedAt - -`func (o *Event) HasCreatedAt() bool` - -HasCreatedAt returns a boolean if a field has been set. - -### GetCustomMessage - -`func (o *Event) GetCustomMessage() string` - -GetCustomMessage returns the CustomMessage field if non-nil, zero value otherwise. - -### GetCustomMessageOk - -`func (o *Event) GetCustomMessageOk() (*string, bool)` - -GetCustomMessageOk returns a tuple with the CustomMessage field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCustomMessage - -`func (o *Event) SetCustomMessage(v string)` - -SetCustomMessage sets CustomMessage field to given value. - -### HasCustomMessage - -`func (o *Event) HasCustomMessage() bool` - -HasCustomMessage returns a boolean if a field has been set. - -### GetDirectorySyncRunId - -`func (o *Event) GetDirectorySyncRunId() int32` - -GetDirectorySyncRunId returns the DirectorySyncRunId field if non-nil, zero value otherwise. - -### GetDirectorySyncRunIdOk - -`func (o *Event) GetDirectorySyncRunIdOk() (*int32, bool)` - -GetDirectorySyncRunIdOk returns a tuple with the DirectorySyncRunId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDirectorySyncRunId - -`func (o *Event) SetDirectorySyncRunId(v int32)` - -SetDirectorySyncRunId sets DirectorySyncRunId field to given value. - -### HasDirectorySyncRunId - -`func (o *Event) HasDirectorySyncRunId() bool` - -HasDirectorySyncRunId returns a boolean if a field has been set. - -### GetErrorDescription - -`func (o *Event) GetErrorDescription() string` - -GetErrorDescription returns the ErrorDescription field if non-nil, zero value otherwise. - -### GetErrorDescriptionOk - -`func (o *Event) GetErrorDescriptionOk() (*string, bool)` - -GetErrorDescriptionOk returns a tuple with the ErrorDescription field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetErrorDescription - -`func (o *Event) SetErrorDescription(v string)` - -SetErrorDescription sets ErrorDescription field to given value. - -### HasErrorDescription - -`func (o *Event) HasErrorDescription() bool` - -HasErrorDescription returns a boolean if a field has been set. - -### GetEventTypeId - -`func (o *Event) GetEventTypeId() int32` - -GetEventTypeId returns the EventTypeId field if non-nil, zero value otherwise. - -### GetEventTypeIdOk - -`func (o *Event) GetEventTypeIdOk() (*int32, bool)` - -GetEventTypeIdOk returns a tuple with the EventTypeId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetEventTypeId - -`func (o *Event) SetEventTypeId(v int32)` - -SetEventTypeId sets EventTypeId field to given value. - -### HasEventTypeId - -`func (o *Event) HasEventTypeId() bool` - -HasEventTypeId returns a boolean if a field has been set. - -### GetGroupName - -`func (o *Event) GetGroupName() string` - -GetGroupName returns the GroupName field if non-nil, zero value otherwise. - -### GetGroupNameOk - -`func (o *Event) GetGroupNameOk() (*string, bool)` - -GetGroupNameOk returns a tuple with the GroupName field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetGroupName - -`func (o *Event) SetGroupName(v string)` - -SetGroupName sets GroupName field to given value. - -### HasGroupName - -`func (o *Event) HasGroupName() bool` - -HasGroupName returns a boolean if a field has been set. - -### GetGroupId - -`func (o *Event) GetGroupId() int32` - -GetGroupId returns the GroupId field if non-nil, zero value otherwise. - -### GetGroupIdOk - -`func (o *Event) GetGroupIdOk() (*int32, bool)` - -GetGroupIdOk returns a tuple with the GroupId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetGroupId - -`func (o *Event) SetGroupId(v int32)` - -SetGroupId sets GroupId field to given value. - -### HasGroupId - -`func (o *Event) HasGroupId() bool` - -HasGroupId returns a boolean if a field has been set. - -### GetId - -`func (o *Event) GetId() int32` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *Event) GetIdOk() (*int32, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *Event) SetId(v int32)` - -SetId sets Id field to given value. - -### HasId - -`func (o *Event) HasId() bool` - -HasId returns a boolean if a field has been set. - -### GetIpaddr - -`func (o *Event) GetIpaddr() string` - -GetIpaddr returns the Ipaddr field if non-nil, zero value otherwise. - -### GetIpaddrOk - -`func (o *Event) GetIpaddrOk() (*string, bool)` - -GetIpaddrOk returns a tuple with the Ipaddr field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIpaddr - -`func (o *Event) SetIpaddr(v string)` - -SetIpaddr sets Ipaddr field to given value. - -### HasIpaddr - -`func (o *Event) HasIpaddr() bool` - -HasIpaddr returns a boolean if a field has been set. - -### GetMappingId - -`func (o *Event) GetMappingId() int32` - -GetMappingId returns the MappingId field if non-nil, zero value otherwise. - -### GetMappingIdOk - -`func (o *Event) GetMappingIdOk() (*int32, bool)` - -GetMappingIdOk returns a tuple with the MappingId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMappingId - -`func (o *Event) SetMappingId(v int32)` - -SetMappingId sets MappingId field to given value. - -### HasMappingId - -`func (o *Event) HasMappingId() bool` - -HasMappingId returns a boolean if a field has been set. - -### GetNotes - -`func (o *Event) GetNotes() string` - -GetNotes returns the Notes field if non-nil, zero value otherwise. - -### GetNotesOk - -`func (o *Event) GetNotesOk() (*string, bool)` - -GetNotesOk returns a tuple with the Notes field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetNotes - -`func (o *Event) SetNotes(v string)` - -SetNotes sets Notes field to given value. - -### HasNotes - -`func (o *Event) HasNotes() bool` - -HasNotes returns a boolean if a field has been set. - -### GetObjectId - -`func (o *Event) GetObjectId() int32` - -GetObjectId returns the ObjectId field if non-nil, zero value otherwise. - -### GetObjectIdOk - -`func (o *Event) GetObjectIdOk() (*int32, bool)` - -GetObjectIdOk returns a tuple with the ObjectId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetObjectId - -`func (o *Event) SetObjectId(v int32)` - -SetObjectId sets ObjectId field to given value. - -### HasObjectId - -`func (o *Event) HasObjectId() bool` - -HasObjectId returns a boolean if a field has been set. - -### GetOtpDeviceId - -`func (o *Event) GetOtpDeviceId() int32` - -GetOtpDeviceId returns the OtpDeviceId field if non-nil, zero value otherwise. - -### GetOtpDeviceIdOk - -`func (o *Event) GetOtpDeviceIdOk() (*int32, bool)` - -GetOtpDeviceIdOk returns a tuple with the OtpDeviceId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetOtpDeviceId - -`func (o *Event) SetOtpDeviceId(v int32)` - -SetOtpDeviceId sets OtpDeviceId field to given value. - -### HasOtpDeviceId - -`func (o *Event) HasOtpDeviceId() bool` - -HasOtpDeviceId returns a boolean if a field has been set. - -### GetOtpDeviceName - -`func (o *Event) GetOtpDeviceName() string` - -GetOtpDeviceName returns the OtpDeviceName field if non-nil, zero value otherwise. - -### GetOtpDeviceNameOk - -`func (o *Event) GetOtpDeviceNameOk() (*string, bool)` - -GetOtpDeviceNameOk returns a tuple with the OtpDeviceName field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetOtpDeviceName - -`func (o *Event) SetOtpDeviceName(v string)` - -SetOtpDeviceName sets OtpDeviceName field to given value. - -### HasOtpDeviceName - -`func (o *Event) HasOtpDeviceName() bool` - -HasOtpDeviceName returns a boolean if a field has been set. - -### GetParam - -`func (o *Event) GetParam() string` - -GetParam returns the Param field if non-nil, zero value otherwise. - -### GetParamOk - -`func (o *Event) GetParamOk() (*string, bool)` - -GetParamOk returns a tuple with the Param field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetParam - -`func (o *Event) SetParam(v string)` - -SetParam sets Param field to given value. - -### HasParam - -`func (o *Event) HasParam() bool` - -HasParam returns a boolean if a field has been set. - -### GetPolicyId - -`func (o *Event) GetPolicyId() int32` - -GetPolicyId returns the PolicyId field if non-nil, zero value otherwise. - -### GetPolicyIdOk - -`func (o *Event) GetPolicyIdOk() (*int32, bool)` - -GetPolicyIdOk returns a tuple with the PolicyId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPolicyId - -`func (o *Event) SetPolicyId(v int32)` - -SetPolicyId sets PolicyId field to given value. - -### HasPolicyId - -`func (o *Event) HasPolicyId() bool` - -HasPolicyId returns a boolean if a field has been set. - -### GetPolicyName - -`func (o *Event) GetPolicyName() string` - -GetPolicyName returns the PolicyName field if non-nil, zero value otherwise. - -### GetPolicyNameOk - -`func (o *Event) GetPolicyNameOk() (*string, bool)` - -GetPolicyNameOk returns a tuple with the PolicyName field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPolicyName - -`func (o *Event) SetPolicyName(v string)` - -SetPolicyName sets PolicyName field to given value. - -### HasPolicyName - -`func (o *Event) HasPolicyName() bool` - -HasPolicyName returns a boolean if a field has been set. - -### GetPolicyType - -`func (o *Event) GetPolicyType() string` - -GetPolicyType returns the PolicyType field if non-nil, zero value otherwise. - -### GetPolicyTypeOk - -`func (o *Event) GetPolicyTypeOk() (*string, bool)` - -GetPolicyTypeOk returns a tuple with the PolicyType field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPolicyType - -`func (o *Event) SetPolicyType(v string)` - -SetPolicyType sets PolicyType field to given value. - -### HasPolicyType - -`func (o *Event) HasPolicyType() bool` - -HasPolicyType returns a boolean if a field has been set. - -### GetPrivilegeId - -`func (o *Event) GetPrivilegeId() int32` - -GetPrivilegeId returns the PrivilegeId field if non-nil, zero value otherwise. - -### GetPrivilegeIdOk - -`func (o *Event) GetPrivilegeIdOk() (*int32, bool)` - -GetPrivilegeIdOk returns a tuple with the PrivilegeId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPrivilegeId - -`func (o *Event) SetPrivilegeId(v int32)` - -SetPrivilegeId sets PrivilegeId field to given value. - -### HasPrivilegeId - -`func (o *Event) HasPrivilegeId() bool` - -HasPrivilegeId returns a boolean if a field has been set. - -### GetProxyIp - -`func (o *Event) GetProxyIp() string` - -GetProxyIp returns the ProxyIp field if non-nil, zero value otherwise. - -### GetProxyIpOk - -`func (o *Event) GetProxyIpOk() (*string, bool)` - -GetProxyIpOk returns a tuple with the ProxyIp field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetProxyIp - -`func (o *Event) SetProxyIp(v string)` - -SetProxyIp sets ProxyIp field to given value. - -### HasProxyIp - -`func (o *Event) HasProxyIp() bool` - -HasProxyIp returns a boolean if a field has been set. - -### GetRadiusConfigId - -`func (o *Event) GetRadiusConfigId() int32` - -GetRadiusConfigId returns the RadiusConfigId field if non-nil, zero value otherwise. - -### GetRadiusConfigIdOk - -`func (o *Event) GetRadiusConfigIdOk() (*int32, bool)` - -GetRadiusConfigIdOk returns a tuple with the RadiusConfigId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRadiusConfigId - -`func (o *Event) SetRadiusConfigId(v int32)` - -SetRadiusConfigId sets RadiusConfigId field to given value. - -### HasRadiusConfigId - -`func (o *Event) HasRadiusConfigId() bool` - -HasRadiusConfigId returns a boolean if a field has been set. - -### GetResolvedAt - -`func (o *Event) GetResolvedAt() string` - -GetResolvedAt returns the ResolvedAt field if non-nil, zero value otherwise. - -### GetResolvedAtOk - -`func (o *Event) GetResolvedAtOk() (*string, bool)` - -GetResolvedAtOk returns a tuple with the ResolvedAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetResolvedAt - -`func (o *Event) SetResolvedAt(v string)` - -SetResolvedAt sets ResolvedAt field to given value. - -### HasResolvedAt - -`func (o *Event) HasResolvedAt() bool` - -HasResolvedAt returns a boolean if a field has been set. - -### GetResourceTypeId - -`func (o *Event) GetResourceTypeId() int32` - -GetResourceTypeId returns the ResourceTypeId field if non-nil, zero value otherwise. - -### GetResourceTypeIdOk - -`func (o *Event) GetResourceTypeIdOk() (*int32, bool)` - -GetResourceTypeIdOk returns a tuple with the ResourceTypeId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetResourceTypeId - -`func (o *Event) SetResourceTypeId(v int32)` - -SetResourceTypeId sets ResourceTypeId field to given value. - -### HasResourceTypeId - -`func (o *Event) HasResourceTypeId() bool` - -HasResourceTypeId returns a boolean if a field has been set. - -### GetRiskCookieId - -`func (o *Event) GetRiskCookieId() string` - -GetRiskCookieId returns the RiskCookieId field if non-nil, zero value otherwise. - -### GetRiskCookieIdOk - -`func (o *Event) GetRiskCookieIdOk() (*string, bool)` - -GetRiskCookieIdOk returns a tuple with the RiskCookieId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRiskCookieId - -`func (o *Event) SetRiskCookieId(v string)` - -SetRiskCookieId sets RiskCookieId field to given value. - -### HasRiskCookieId - -`func (o *Event) HasRiskCookieId() bool` - -HasRiskCookieId returns a boolean if a field has been set. - -### GetRiskReasons - -`func (o *Event) GetRiskReasons() string` - -GetRiskReasons returns the RiskReasons field if non-nil, zero value otherwise. - -### GetRiskReasonsOk - -`func (o *Event) GetRiskReasonsOk() (*string, bool)` - -GetRiskReasonsOk returns a tuple with the RiskReasons field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRiskReasons - -`func (o *Event) SetRiskReasons(v string)` - -SetRiskReasons sets RiskReasons field to given value. - -### HasRiskReasons - -`func (o *Event) HasRiskReasons() bool` - -HasRiskReasons returns a boolean if a field has been set. - -### GetRiskScore - -`func (o *Event) GetRiskScore() int32` - -GetRiskScore returns the RiskScore field if non-nil, zero value otherwise. - -### GetRiskScoreOk - -`func (o *Event) GetRiskScoreOk() (*int32, bool)` - -GetRiskScoreOk returns a tuple with the RiskScore field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRiskScore - -`func (o *Event) SetRiskScore(v int32)` - -SetRiskScore sets RiskScore field to given value. - -### HasRiskScore - -`func (o *Event) HasRiskScore() bool` - -HasRiskScore returns a boolean if a field has been set. - -### GetRoleId - -`func (o *Event) GetRoleId() int32` - -GetRoleId returns the RoleId field if non-nil, zero value otherwise. - -### GetRoleIdOk - -`func (o *Event) GetRoleIdOk() (*int32, bool)` - -GetRoleIdOk returns a tuple with the RoleId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRoleId - -`func (o *Event) SetRoleId(v int32)` - -SetRoleId sets RoleId field to given value. - -### HasRoleId - -`func (o *Event) HasRoleId() bool` - -HasRoleId returns a boolean if a field has been set. - -### GetRoleName - -`func (o *Event) GetRoleName() string` - -GetRoleName returns the RoleName field if non-nil, zero value otherwise. - -### GetRoleNameOk - -`func (o *Event) GetRoleNameOk() (*string, bool)` - -GetRoleNameOk returns a tuple with the RoleName field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRoleName - -`func (o *Event) SetRoleName(v string)` - -SetRoleName sets RoleName field to given value. - -### HasRoleName - -`func (o *Event) HasRoleName() bool` - -HasRoleName returns a boolean if a field has been set. - -### GetServiceDirectoryId - -`func (o *Event) GetServiceDirectoryId() int32` - -GetServiceDirectoryId returns the ServiceDirectoryId field if non-nil, zero value otherwise. - -### GetServiceDirectoryIdOk - -`func (o *Event) GetServiceDirectoryIdOk() (*int32, bool)` - -GetServiceDirectoryIdOk returns a tuple with the ServiceDirectoryId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetServiceDirectoryId - -`func (o *Event) SetServiceDirectoryId(v int32)` - -SetServiceDirectoryId sets ServiceDirectoryId field to given value. - -### HasServiceDirectoryId - -`func (o *Event) HasServiceDirectoryId() bool` - -HasServiceDirectoryId returns a boolean if a field has been set. - -### GetSolved - -`func (o *Event) GetSolved() bool` - -GetSolved returns the Solved field if non-nil, zero value otherwise. - -### GetSolvedOk - -`func (o *Event) GetSolvedOk() (*bool, bool)` - -GetSolvedOk returns a tuple with the Solved field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSolved - -`func (o *Event) SetSolved(v bool)` - -SetSolved sets Solved field to given value. - -### HasSolved - -`func (o *Event) HasSolved() bool` - -HasSolved returns a boolean if a field has been set. - -### GetTrustedIdpId - -`func (o *Event) GetTrustedIdpId() int32` - -GetTrustedIdpId returns the TrustedIdpId field if non-nil, zero value otherwise. - -### GetTrustedIdpIdOk - -`func (o *Event) GetTrustedIdpIdOk() (*int32, bool)` - -GetTrustedIdpIdOk returns a tuple with the TrustedIdpId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTrustedIdpId - -`func (o *Event) SetTrustedIdpId(v int32)` - -SetTrustedIdpId sets TrustedIdpId field to given value. - -### HasTrustedIdpId - -`func (o *Event) HasTrustedIdpId() bool` - -HasTrustedIdpId returns a boolean if a field has been set. - -### GetUserFieldId - -`func (o *Event) GetUserFieldId() int32` - -GetUserFieldId returns the UserFieldId field if non-nil, zero value otherwise. - -### GetUserFieldIdOk - -`func (o *Event) GetUserFieldIdOk() (*int32, bool)` - -GetUserFieldIdOk returns a tuple with the UserFieldId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUserFieldId - -`func (o *Event) SetUserFieldId(v int32)` - -SetUserFieldId sets UserFieldId field to given value. - -### HasUserFieldId - -`func (o *Event) HasUserFieldId() bool` - -HasUserFieldId returns a boolean if a field has been set. - -### GetUserId - -`func (o *Event) GetUserId() int32` - -GetUserId returns the UserId field if non-nil, zero value otherwise. - -### GetUserIdOk - -`func (o *Event) GetUserIdOk() (*int32, bool)` - -GetUserIdOk returns a tuple with the UserId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUserId - -`func (o *Event) SetUserId(v int32)` - -SetUserId sets UserId field to given value. - -### HasUserId - -`func (o *Event) HasUserId() bool` - -HasUserId returns a boolean if a field has been set. - -### GetUserName - -`func (o *Event) GetUserName() string` - -GetUserName returns the UserName field if non-nil, zero value otherwise. - -### GetUserNameOk - -`func (o *Event) 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 *Event) SetUserName(v string)` - -SetUserName sets UserName field to given value. - -### HasUserName - -`func (o *Event) HasUserName() bool` - -HasUserName 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/EventsApi.md b/docs/EventsApi.md deleted file mode 100644 index fddb744..0000000 --- a/docs/EventsApi.md +++ /dev/null @@ -1,229 +0,0 @@ -# \EventsApi - -All URIs are relative to *https://your-api-subdomain.onelogin.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetEventById**](EventsApi.md#GetEventById) | **Get** /api/1/events/{event_id} | Get Event by ID -[**GetEventTypes**](EventsApi.md#GetEventTypes) | **Get** /api/1/events/types | Get Event Types -[**GetEvents**](EventsApi.md#GetEvents) | **Get** /api/1/events | Get Events - - - -## GetEventById - -> GetEventById200Response GetEventById(ctx, eventId).Execute() - -Get Event by ID - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - eventId := int32(56) // int32 | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.EventsApi.GetEventById(context.Background(), eventId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `EventsApi.GetEventById``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetEventById`: GetEventById200Response - fmt.Fprintf(os.Stdout, "Response from `EventsApi.GetEventById`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**eventId** | **int32** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetEventByIdRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**GetEventById200Response**](GetEventById200Response.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetEventTypes - -> GetEventTypes200Response GetEventTypes(ctx).ContentType(contentType).Execute() - -Get Event Types - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - contentType := "application/json" // string | (optional) (default to "application/json") - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.EventsApi.GetEventTypes(context.Background()).ContentType(contentType).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `EventsApi.GetEventTypes``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetEventTypes`: GetEventTypes200Response - fmt.Fprintf(os.Stdout, "Response from `EventsApi.GetEventTypes`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetEventTypesRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **contentType** | **string** | | [default to "application/json"] - -### Return type - -[**GetEventTypes200Response**](GetEventTypes200Response.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetEvents - -> GetEvents200Response GetEvents(ctx).EventTypeId(eventTypeId).ClientId(clientId).DirectoryId(directoryId).Id(id).CreatedAt(createdAt).Resolution(resolution).Since(since).Until(until).UserId(userId).Execute() - -Get Events - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - eventTypeId := []int32{int32(123)} // []int32 | (optional) - clientId := int32(56) // int32 | (optional) - directoryId := int32(56) // int32 | (optional) - id := int32(56) // int32 | (optional) - createdAt := "createdAt_example" // string | (optional) - resolution := "resolution_example" // string | (optional) - since := "since_example" // string | (optional) - until := "until_example" // string | (optional) - userId := int32(56) // int32 | Set to the id of the user that you want to return. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.EventsApi.GetEvents(context.Background()).EventTypeId(eventTypeId).ClientId(clientId).DirectoryId(directoryId).Id(id).CreatedAt(createdAt).Resolution(resolution).Since(since).Until(until).UserId(userId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `EventsApi.GetEvents``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetEvents`: GetEvents200Response - fmt.Fprintf(os.Stdout, "Response from `EventsApi.GetEvents`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetEventsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **eventTypeId** | **[]int32** | | - **clientId** | **int32** | | - **directoryId** | **int32** | | - **id** | **int32** | | - **createdAt** | **string** | | - **resolution** | **string** | | - **since** | **string** | | - **until** | **string** | | - **userId** | **int32** | Set to the id of the user that you want to return. | - -### Return type - -[**GetEvents200Response**](GetEvents200Response.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/docs/GenerateMfaToken200Response.md b/docs/GenerateMfaToken200Response.md deleted file mode 100644 index 6d26f97..0000000 --- a/docs/GenerateMfaToken200Response.md +++ /dev/null @@ -1,108 +0,0 @@ -# GenerateMFAtoken200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**MfaToken** | Pointer to **string** | Token can function as a temporary MFA token. It can be used to authenticate for any app when valid. | [optional] -**Resuable** | Pointer to **bool** | true indcates the token can be used multiple times, until it expires. false indicates the token is invalid after a single use or once it expires. Defaults to false. | [optional] -**ExpiresAt** | Pointer to **string** | Defines the expiration time and date for the token. Format is UTC time. | [optional] - -## Methods - -### NewGenerateMFAtoken200Response - -`func NewGenerateMFAtoken200Response() *GenerateMFAtoken200Response` - -NewGenerateMFAtoken200Response instantiates a new GenerateMFAtoken200Response 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 - -### NewGenerateMFAtoken200ResponseWithDefaults - -`func NewGenerateMFAtoken200ResponseWithDefaults() *GenerateMFAtoken200Response` - -NewGenerateMFAtoken200ResponseWithDefaults instantiates a new GenerateMFAtoken200Response 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 - -### GetMfaToken - -`func (o *GenerateMFAtoken200Response) GetMfaToken() string` - -GetMfaToken returns the MfaToken field if non-nil, zero value otherwise. - -### GetMfaTokenOk - -`func (o *GenerateMFAtoken200Response) GetMfaTokenOk() (*string, bool)` - -GetMfaTokenOk returns a tuple with the MfaToken field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMfaToken - -`func (o *GenerateMFAtoken200Response) SetMfaToken(v string)` - -SetMfaToken sets MfaToken field to given value. - -### HasMfaToken - -`func (o *GenerateMFAtoken200Response) HasMfaToken() bool` - -HasMfaToken returns a boolean if a field has been set. - -### GetResuable - -`func (o *GenerateMFAtoken200Response) GetResuable() bool` - -GetResuable returns the Resuable field if non-nil, zero value otherwise. - -### GetResuableOk - -`func (o *GenerateMFAtoken200Response) GetResuableOk() (*bool, bool)` - -GetResuableOk returns a tuple with the Resuable field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetResuable - -`func (o *GenerateMFAtoken200Response) SetResuable(v bool)` - -SetResuable sets Resuable field to given value. - -### HasResuable - -`func (o *GenerateMFAtoken200Response) HasResuable() bool` - -HasResuable returns a boolean if a field has been set. - -### GetExpiresAt - -`func (o *GenerateMFAtoken200Response) GetExpiresAt() string` - -GetExpiresAt returns the ExpiresAt field if non-nil, zero value otherwise. - -### GetExpiresAtOk - -`func (o *GenerateMFAtoken200Response) GetExpiresAtOk() (*string, bool)` - -GetExpiresAtOk returns a tuple with the ExpiresAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetExpiresAt - -`func (o *GenerateMFAtoken200Response) SetExpiresAt(v string)` - -SetExpiresAt sets ExpiresAt field to given value. - -### HasExpiresAt - -`func (o *GenerateMFAtoken200Response) HasExpiresAt() bool` - -HasExpiresAt 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/GenerateMfaTokenRequest.md b/docs/GenerateMfaTokenRequest.md deleted file mode 100644 index a4c7c98..0000000 --- a/docs/GenerateMfaTokenRequest.md +++ /dev/null @@ -1,82 +0,0 @@ -# GenerateMFAtokenRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ExpiresIn** | Pointer to **int32** | Set the duration of the token in seconds. Token expiration defaults to 259200 seconds = 72 hours. 72 hours is the max value. | [optional] -**Reusable** | Pointer to **bool** | Defines if the token is reusable multiple times within the expiry window. Value defaults to false. If set to true, token can be used multiple times, until it expires. | [optional] [default to false] - -## Methods - -### NewGenerateMFAtokenRequest - -`func NewGenerateMFAtokenRequest() *GenerateMFAtokenRequest` - -NewGenerateMFAtokenRequest instantiates a new GenerateMFAtokenRequest 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 - -### NewGenerateMFAtokenRequestWithDefaults - -`func NewGenerateMFAtokenRequestWithDefaults() *GenerateMFAtokenRequest` - -NewGenerateMFAtokenRequestWithDefaults instantiates a new GenerateMFAtokenRequest 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 - -### GetExpiresIn - -`func (o *GenerateMFAtokenRequest) GetExpiresIn() int32` - -GetExpiresIn returns the ExpiresIn field if non-nil, zero value otherwise. - -### GetExpiresInOk - -`func (o *GenerateMFAtokenRequest) GetExpiresInOk() (*int32, bool)` - -GetExpiresInOk returns a tuple with the ExpiresIn field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetExpiresIn - -`func (o *GenerateMFAtokenRequest) SetExpiresIn(v int32)` - -SetExpiresIn sets ExpiresIn field to given value. - -### HasExpiresIn - -`func (o *GenerateMFAtokenRequest) HasExpiresIn() bool` - -HasExpiresIn returns a boolean if a field has been set. - -### GetReusable - -`func (o *GenerateMFAtokenRequest) GetReusable() bool` - -GetReusable returns the Reusable field if non-nil, zero value otherwise. - -### GetReusableOk - -`func (o *GenerateMFAtokenRequest) GetReusableOk() (*bool, bool)` - -GetReusableOk returns a tuple with the Reusable field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetReusable - -`func (o *GenerateMFAtokenRequest) SetReusable(v bool)` - -SetReusable sets Reusable field to given value. - -### HasReusable - -`func (o *GenerateMFAtokenRequest) HasReusable() bool` - -HasReusable 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/GenerateOTP201Response.md b/docs/GenerateOTP201Response.md deleted file mode 100644 index 7c2b1f8..0000000 --- a/docs/GenerateOTP201Response.md +++ /dev/null @@ -1,134 +0,0 @@ -# GenerateOTP201Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**MfaToken** | Pointer to **string** | Token can function as a temporary MFA token. It can be used to authenticate for any app when valid. | [optional] -**Reusable** | Pointer to **bool** | true indcates the token can be used multiple times, until it expires. false indicates the token is invalid after a single use or once it expires. Defaults to false. | [optional] [default to false] -**ExpiresAt** | Pointer to **string** | Defines the expiration time and date for the token. Format is UTC time. | [optional] -**DeviceId** | Pointer to **string** | A unique identifier for the temp otp device that has been created for this token. | [optional] - -## Methods - -### NewGenerateOTP201Response - -`func NewGenerateOTP201Response() *GenerateOTP201Response` - -NewGenerateOTP201Response instantiates a new GenerateOTP201Response 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 - -### NewGenerateOTP201ResponseWithDefaults - -`func NewGenerateOTP201ResponseWithDefaults() *GenerateOTP201Response` - -NewGenerateOTP201ResponseWithDefaults instantiates a new GenerateOTP201Response 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 - -### GetMfaToken - -`func (o *GenerateOTP201Response) GetMfaToken() string` - -GetMfaToken returns the MfaToken field if non-nil, zero value otherwise. - -### GetMfaTokenOk - -`func (o *GenerateOTP201Response) GetMfaTokenOk() (*string, bool)` - -GetMfaTokenOk returns a tuple with the MfaToken field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMfaToken - -`func (o *GenerateOTP201Response) SetMfaToken(v string)` - -SetMfaToken sets MfaToken field to given value. - -### HasMfaToken - -`func (o *GenerateOTP201Response) HasMfaToken() bool` - -HasMfaToken returns a boolean if a field has been set. - -### GetReusable - -`func (o *GenerateOTP201Response) GetReusable() bool` - -GetReusable returns the Reusable field if non-nil, zero value otherwise. - -### GetReusableOk - -`func (o *GenerateOTP201Response) GetReusableOk() (*bool, bool)` - -GetReusableOk returns a tuple with the Reusable field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetReusable - -`func (o *GenerateOTP201Response) SetReusable(v bool)` - -SetReusable sets Reusable field to given value. - -### HasReusable - -`func (o *GenerateOTP201Response) HasReusable() bool` - -HasReusable returns a boolean if a field has been set. - -### GetExpiresAt - -`func (o *GenerateOTP201Response) GetExpiresAt() string` - -GetExpiresAt returns the ExpiresAt field if non-nil, zero value otherwise. - -### GetExpiresAtOk - -`func (o *GenerateOTP201Response) GetExpiresAtOk() (*string, bool)` - -GetExpiresAtOk returns a tuple with the ExpiresAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetExpiresAt - -`func (o *GenerateOTP201Response) SetExpiresAt(v string)` - -SetExpiresAt sets ExpiresAt field to given value. - -### HasExpiresAt - -`func (o *GenerateOTP201Response) HasExpiresAt() bool` - -HasExpiresAt returns a boolean if a field has been set. - -### GetDeviceId - -`func (o *GenerateOTP201Response) GetDeviceId() string` - -GetDeviceId returns the DeviceId field if non-nil, zero value otherwise. - -### GetDeviceIdOk - -`func (o *GenerateOTP201Response) GetDeviceIdOk() (*string, bool)` - -GetDeviceIdOk returns a tuple with the DeviceId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDeviceId - -`func (o *GenerateOTP201Response) SetDeviceId(v string)` - -SetDeviceId sets DeviceId field to given value. - -### HasDeviceId - -`func (o *GenerateOTP201Response) HasDeviceId() bool` - -HasDeviceId 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/GenerateOTPRequest.md b/docs/GenerateOTPRequest.md deleted file mode 100644 index a1c2cdb..0000000 --- a/docs/GenerateOTPRequest.md +++ /dev/null @@ -1,82 +0,0 @@ -# GenerateOTPRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ExpiresIn** | Pointer to **int32** | Set the duration of the token in seconds. Token expiration defaults to 259200 seconds = 72 hours. 72 hours is the max value. | [optional] -**Reusable** | Pointer to **bool** | Defines if the token is reusable multiple times within the expiry window. Value defaults to false. If set to true, token can be used multiple times, until it expires. | [optional] [default to false] - -## Methods - -### NewGenerateOTPRequest - -`func NewGenerateOTPRequest() *GenerateOTPRequest` - -NewGenerateOTPRequest instantiates a new GenerateOTPRequest 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 - -### NewGenerateOTPRequestWithDefaults - -`func NewGenerateOTPRequestWithDefaults() *GenerateOTPRequest` - -NewGenerateOTPRequestWithDefaults instantiates a new GenerateOTPRequest 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 - -### GetExpiresIn - -`func (o *GenerateOTPRequest) GetExpiresIn() int32` - -GetExpiresIn returns the ExpiresIn field if non-nil, zero value otherwise. - -### GetExpiresInOk - -`func (o *GenerateOTPRequest) GetExpiresInOk() (*int32, bool)` - -GetExpiresInOk returns a tuple with the ExpiresIn field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetExpiresIn - -`func (o *GenerateOTPRequest) SetExpiresIn(v int32)` - -SetExpiresIn sets ExpiresIn field to given value. - -### HasExpiresIn - -`func (o *GenerateOTPRequest) HasExpiresIn() bool` - -HasExpiresIn returns a boolean if a field has been set. - -### GetReusable - -`func (o *GenerateOTPRequest) GetReusable() bool` - -GetReusable returns the Reusable field if non-nil, zero value otherwise. - -### GetReusableOk - -`func (o *GenerateOTPRequest) GetReusableOk() (*bool, bool)` - -GetReusableOk returns a tuple with the Reusable field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetReusable - -`func (o *GenerateOTPRequest) SetReusable(v bool)` - -SetReusable sets Reusable field to given value. - -### HasReusable - -`func (o *GenerateOTPRequest) HasReusable() bool` - -HasReusable 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/GenerateSamlAssert200Response.md b/docs/GenerateSamlAssert200Response.md deleted file mode 100644 index f410752..0000000 --- a/docs/GenerateSamlAssert200Response.md +++ /dev/null @@ -1,82 +0,0 @@ -# GenerateSamlAssert200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Status** | Pointer to [**Error**](Error.md) | | [optional] -**Data** | Pointer to **[]map[string]interface{}** | | [optional] - -## Methods - -### NewGenerateSamlAssert200Response - -`func NewGenerateSamlAssert200Response() *GenerateSamlAssert200Response` - -NewGenerateSamlAssert200Response instantiates a new GenerateSamlAssert200Response 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 - -### NewGenerateSamlAssert200ResponseWithDefaults - -`func NewGenerateSamlAssert200ResponseWithDefaults() *GenerateSamlAssert200Response` - -NewGenerateSamlAssert200ResponseWithDefaults instantiates a new GenerateSamlAssert200Response 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 - -### GetStatus - -`func (o *GenerateSamlAssert200Response) GetStatus() Error` - -GetStatus returns the Status field if non-nil, zero value otherwise. - -### GetStatusOk - -`func (o *GenerateSamlAssert200Response) GetStatusOk() (*Error, bool)` - -GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStatus - -`func (o *GenerateSamlAssert200Response) SetStatus(v Error)` - -SetStatus sets Status field to given value. - -### HasStatus - -`func (o *GenerateSamlAssert200Response) HasStatus() bool` - -HasStatus returns a boolean if a field has been set. - -### GetData - -`func (o *GenerateSamlAssert200Response) GetData() []map[string]interface{}` - -GetData returns the Data field if non-nil, zero value otherwise. - -### GetDataOk - -`func (o *GenerateSamlAssert200Response) GetDataOk() (*[]map[string]interface{}, bool)` - -GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetData - -`func (o *GenerateSamlAssert200Response) SetData(v []map[string]interface{})` - -SetData sets Data field to given value. - -### HasData - -`func (o *GenerateSamlAssert200Response) HasData() bool` - -HasData 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/GenerateTokenRequest.md b/docs/GenerateTokenRequest.md deleted file mode 100644 index 9facda4..0000000 --- a/docs/GenerateTokenRequest.md +++ /dev/null @@ -1,51 +0,0 @@ -# GenerateTokenRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**GrantType** | **string** | Set to client_credentials. | [default to "client_credentials"] - -## Methods - -### NewGenerateTokenRequest - -`func NewGenerateTokenRequest(grantType string, ) *GenerateTokenRequest` - -NewGenerateTokenRequest instantiates a new GenerateTokenRequest 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 - -### NewGenerateTokenRequestWithDefaults - -`func NewGenerateTokenRequestWithDefaults() *GenerateTokenRequest` - -NewGenerateTokenRequestWithDefaults instantiates a new GenerateTokenRequest 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 - -### GetGrantType - -`func (o *GenerateTokenRequest) GetGrantType() string` - -GetGrantType returns the GrantType field if non-nil, zero value otherwise. - -### GetGrantTypeOk - -`func (o *GenerateTokenRequest) GetGrantTypeOk() (*string, bool)` - -GetGrantTypeOk returns a tuple with the GrantType field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetGrantType - -`func (o *GenerateTokenRequest) SetGrantType(v string)` - -SetGrantType sets GrantType 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/GenericApp.md b/docs/GenericApp.md deleted file mode 100644 index 05bf94e..0000000 --- a/docs/GenericApp.md +++ /dev/null @@ -1,472 +0,0 @@ -# GenericApp - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | Pointer to **int32** | Apps unique ID in OneLogin. | [optional] [readonly] -**Name** | Pointer to **string** | The name of the app. | [optional] -**Visible** | Pointer to **bool** | Indicates if the app is visible in the OneLogin portal. | [optional] -**Description** | Pointer to **string** | Freeform description of the app. | [optional] -**Notes** | Pointer to **string** | Freeform notes about the app. | [optional] -**IconUrl** | Pointer to **string** | A link to the apps icon url | [optional] -**AuthMethod** | Pointer to [**AuthMethod**](AuthMethod.md) | | [optional] -**PolicyId** | Pointer to **int32** | The security policy assigned to the app. | [optional] -**AllowAssumedSignin** | Pointer to **bool** | Indicates whether or not administrators can access the app as a user that they have assumed control over. | [optional] -**TabId** | Pointer to **int32** | ID of the OneLogin portal tab that the app is assigned to. | [optional] -**ConnectorId** | Pointer to **int32** | ID of the connector to base the app from. | [optional] -**CreatedAt** | Pointer to **string** | the date the app was created | [optional] -**UpdatedAt** | Pointer to **string** | the date the app was last updated | [optional] -**RoleIds** | Pointer to **[]int32** | List of Role IDs that are assigned to the app. On App Create or Update the entire array is replaced with the values provided. | [optional] -**Provisioning** | Pointer to [**GenericAppProvisioning**](GenericAppProvisioning.md) | | [optional] -**Parameters** | Pointer to [**AppParameters**](AppParameters.md) | | [optional] -**EnforcementPoint** | Pointer to [**EnforcementPoint**](EnforcementPoint.md) | | [optional] - -## Methods - -### NewGenericApp - -`func NewGenericApp() *GenericApp` - -NewGenericApp instantiates a new GenericApp 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 - -### NewGenericAppWithDefaults - -`func NewGenericAppWithDefaults() *GenericApp` - -NewGenericAppWithDefaults instantiates a new GenericApp 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 - -### GetId - -`func (o *GenericApp) GetId() int32` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *GenericApp) GetIdOk() (*int32, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *GenericApp) SetId(v int32)` - -SetId sets Id field to given value. - -### HasId - -`func (o *GenericApp) HasId() bool` - -HasId returns a boolean if a field has been set. - -### GetName - -`func (o *GenericApp) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *GenericApp) 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 *GenericApp) SetName(v string)` - -SetName sets Name field to given value. - -### HasName - -`func (o *GenericApp) HasName() bool` - -HasName returns a boolean if a field has been set. - -### GetVisible - -`func (o *GenericApp) GetVisible() bool` - -GetVisible returns the Visible field if non-nil, zero value otherwise. - -### GetVisibleOk - -`func (o *GenericApp) GetVisibleOk() (*bool, bool)` - -GetVisibleOk returns a tuple with the Visible field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetVisible - -`func (o *GenericApp) SetVisible(v bool)` - -SetVisible sets Visible field to given value. - -### HasVisible - -`func (o *GenericApp) HasVisible() bool` - -HasVisible returns a boolean if a field has been set. - -### GetDescription - -`func (o *GenericApp) GetDescription() string` - -GetDescription returns the Description field if non-nil, zero value otherwise. - -### GetDescriptionOk - -`func (o *GenericApp) GetDescriptionOk() (*string, bool)` - -GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDescription - -`func (o *GenericApp) SetDescription(v string)` - -SetDescription sets Description field to given value. - -### HasDescription - -`func (o *GenericApp) HasDescription() bool` - -HasDescription returns a boolean if a field has been set. - -### GetNotes - -`func (o *GenericApp) GetNotes() string` - -GetNotes returns the Notes field if non-nil, zero value otherwise. - -### GetNotesOk - -`func (o *GenericApp) GetNotesOk() (*string, bool)` - -GetNotesOk returns a tuple with the Notes field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetNotes - -`func (o *GenericApp) SetNotes(v string)` - -SetNotes sets Notes field to given value. - -### HasNotes - -`func (o *GenericApp) HasNotes() bool` - -HasNotes returns a boolean if a field has been set. - -### GetIconUrl - -`func (o *GenericApp) GetIconUrl() string` - -GetIconUrl returns the IconUrl field if non-nil, zero value otherwise. - -### GetIconUrlOk - -`func (o *GenericApp) GetIconUrlOk() (*string, bool)` - -GetIconUrlOk returns a tuple with the IconUrl field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIconUrl - -`func (o *GenericApp) SetIconUrl(v string)` - -SetIconUrl sets IconUrl field to given value. - -### HasIconUrl - -`func (o *GenericApp) HasIconUrl() bool` - -HasIconUrl returns a boolean if a field has been set. - -### GetAuthMethod - -`func (o *GenericApp) GetAuthMethod() AuthMethod` - -GetAuthMethod returns the AuthMethod field if non-nil, zero value otherwise. - -### GetAuthMethodOk - -`func (o *GenericApp) GetAuthMethodOk() (*AuthMethod, bool)` - -GetAuthMethodOk returns a tuple with the AuthMethod field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAuthMethod - -`func (o *GenericApp) SetAuthMethod(v AuthMethod)` - -SetAuthMethod sets AuthMethod field to given value. - -### HasAuthMethod - -`func (o *GenericApp) HasAuthMethod() bool` - -HasAuthMethod returns a boolean if a field has been set. - -### GetPolicyId - -`func (o *GenericApp) GetPolicyId() int32` - -GetPolicyId returns the PolicyId field if non-nil, zero value otherwise. - -### GetPolicyIdOk - -`func (o *GenericApp) GetPolicyIdOk() (*int32, bool)` - -GetPolicyIdOk returns a tuple with the PolicyId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPolicyId - -`func (o *GenericApp) SetPolicyId(v int32)` - -SetPolicyId sets PolicyId field to given value. - -### HasPolicyId - -`func (o *GenericApp) HasPolicyId() bool` - -HasPolicyId returns a boolean if a field has been set. - -### GetAllowAssumedSignin - -`func (o *GenericApp) GetAllowAssumedSignin() bool` - -GetAllowAssumedSignin returns the AllowAssumedSignin field if non-nil, zero value otherwise. - -### GetAllowAssumedSigninOk - -`func (o *GenericApp) GetAllowAssumedSigninOk() (*bool, bool)` - -GetAllowAssumedSigninOk returns a tuple with the AllowAssumedSignin field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAllowAssumedSignin - -`func (o *GenericApp) SetAllowAssumedSignin(v bool)` - -SetAllowAssumedSignin sets AllowAssumedSignin field to given value. - -### HasAllowAssumedSignin - -`func (o *GenericApp) HasAllowAssumedSignin() bool` - -HasAllowAssumedSignin returns a boolean if a field has been set. - -### GetTabId - -`func (o *GenericApp) GetTabId() int32` - -GetTabId returns the TabId field if non-nil, zero value otherwise. - -### GetTabIdOk - -`func (o *GenericApp) GetTabIdOk() (*int32, bool)` - -GetTabIdOk returns a tuple with the TabId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTabId - -`func (o *GenericApp) SetTabId(v int32)` - -SetTabId sets TabId field to given value. - -### HasTabId - -`func (o *GenericApp) HasTabId() bool` - -HasTabId returns a boolean if a field has been set. - -### GetConnectorId - -`func (o *GenericApp) GetConnectorId() int32` - -GetConnectorId returns the ConnectorId field if non-nil, zero value otherwise. - -### GetConnectorIdOk - -`func (o *GenericApp) GetConnectorIdOk() (*int32, bool)` - -GetConnectorIdOk returns a tuple with the ConnectorId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConnectorId - -`func (o *GenericApp) SetConnectorId(v int32)` - -SetConnectorId sets ConnectorId field to given value. - -### HasConnectorId - -`func (o *GenericApp) HasConnectorId() bool` - -HasConnectorId returns a boolean if a field has been set. - -### GetCreatedAt - -`func (o *GenericApp) GetCreatedAt() string` - -GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. - -### GetCreatedAtOk - -`func (o *GenericApp) GetCreatedAtOk() (*string, bool)` - -GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCreatedAt - -`func (o *GenericApp) SetCreatedAt(v string)` - -SetCreatedAt sets CreatedAt field to given value. - -### HasCreatedAt - -`func (o *GenericApp) HasCreatedAt() bool` - -HasCreatedAt returns a boolean if a field has been set. - -### GetUpdatedAt - -`func (o *GenericApp) GetUpdatedAt() string` - -GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. - -### GetUpdatedAtOk - -`func (o *GenericApp) GetUpdatedAtOk() (*string, bool)` - -GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUpdatedAt - -`func (o *GenericApp) SetUpdatedAt(v string)` - -SetUpdatedAt sets UpdatedAt field to given value. - -### HasUpdatedAt - -`func (o *GenericApp) HasUpdatedAt() bool` - -HasUpdatedAt returns a boolean if a field has been set. - -### GetRoleIds - -`func (o *GenericApp) GetRoleIds() []int32` - -GetRoleIds returns the RoleIds field if non-nil, zero value otherwise. - -### GetRoleIdsOk - -`func (o *GenericApp) GetRoleIdsOk() (*[]int32, bool)` - -GetRoleIdsOk returns a tuple with the RoleIds field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRoleIds - -`func (o *GenericApp) SetRoleIds(v []int32)` - -SetRoleIds sets RoleIds field to given value. - -### HasRoleIds - -`func (o *GenericApp) HasRoleIds() bool` - -HasRoleIds returns a boolean if a field has been set. - -### GetProvisioning - -`func (o *GenericApp) GetProvisioning() GenericAppProvisioning` - -GetProvisioning returns the Provisioning field if non-nil, zero value otherwise. - -### GetProvisioningOk - -`func (o *GenericApp) GetProvisioningOk() (*GenericAppProvisioning, bool)` - -GetProvisioningOk returns a tuple with the Provisioning field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetProvisioning - -`func (o *GenericApp) SetProvisioning(v GenericAppProvisioning)` - -SetProvisioning sets Provisioning field to given value. - -### HasProvisioning - -`func (o *GenericApp) HasProvisioning() bool` - -HasProvisioning returns a boolean if a field has been set. - -### GetParameters - -`func (o *GenericApp) GetParameters() AppParameters` - -GetParameters returns the Parameters field if non-nil, zero value otherwise. - -### GetParametersOk - -`func (o *GenericApp) GetParametersOk() (*AppParameters, bool)` - -GetParametersOk returns a tuple with the Parameters field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetParameters - -`func (o *GenericApp) SetParameters(v AppParameters)` - -SetParameters sets Parameters field to given value. - -### HasParameters - -`func (o *GenericApp) HasParameters() bool` - -HasParameters returns a boolean if a field has been set. - -### GetEnforcementPoint - -`func (o *GenericApp) GetEnforcementPoint() EnforcementPoint` - -GetEnforcementPoint returns the EnforcementPoint field if non-nil, zero value otherwise. - -### GetEnforcementPointOk - -`func (o *GenericApp) GetEnforcementPointOk() (*EnforcementPoint, bool)` - -GetEnforcementPointOk returns a tuple with the EnforcementPoint field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetEnforcementPoint - -`func (o *GenericApp) SetEnforcementPoint(v EnforcementPoint)` - -SetEnforcementPoint sets EnforcementPoint field to given value. - -### HasEnforcementPoint - -`func (o *GenericApp) HasEnforcementPoint() bool` - -HasEnforcementPoint 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/GenericAppProvisioning.md b/docs/GenericAppProvisioning.md deleted file mode 100644 index 2e704d9..0000000 --- a/docs/GenericAppProvisioning.md +++ /dev/null @@ -1,56 +0,0 @@ -# GenericAppProvisioning - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Enabled** | Pointer to **bool** | | [optional] - -## Methods - -### NewGenericAppProvisioning - -`func NewGenericAppProvisioning() *GenericAppProvisioning` - -NewGenericAppProvisioning instantiates a new GenericAppProvisioning 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 - -### NewGenericAppProvisioningWithDefaults - -`func NewGenericAppProvisioningWithDefaults() *GenericAppProvisioning` - -NewGenericAppProvisioningWithDefaults instantiates a new GenericAppProvisioning 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 - -### GetEnabled - -`func (o *GenericAppProvisioning) GetEnabled() bool` - -GetEnabled returns the Enabled field if non-nil, zero value otherwise. - -### GetEnabledOk - -`func (o *GenericAppProvisioning) 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 *GenericAppProvisioning) SetEnabled(v bool)` - -SetEnabled sets Enabled field to given value. - -### HasEnabled - -`func (o *GenericAppProvisioning) HasEnabled() bool` - -HasEnabled 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/GetAssignedUser200Response.md b/docs/GetAssignedUser200Response.md deleted file mode 100644 index a79fac2..0000000 --- a/docs/GetAssignedUser200Response.md +++ /dev/null @@ -1,226 +0,0 @@ -# GetAssignedUser200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Total** | Pointer to **int32** | | [optional] -**Users** | Pointer to **[]int32** | | [optional] -**BeforeCursor** | Pointer to **NullableInt32** | | [optional] -**PreviousLink** | Pointer to **NullableString** | | [optional] -**AfterCursor** | Pointer to **NullableInt32** | | [optional] -**NextLink** | Pointer to **NullableString** | | [optional] - -## Methods - -### NewGetAssignedUser200Response - -`func NewGetAssignedUser200Response() *GetAssignedUser200Response` - -NewGetAssignedUser200Response instantiates a new GetAssignedUser200Response 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 - -### NewGetAssignedUser200ResponseWithDefaults - -`func NewGetAssignedUser200ResponseWithDefaults() *GetAssignedUser200Response` - -NewGetAssignedUser200ResponseWithDefaults instantiates a new GetAssignedUser200Response 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 - -### GetTotal - -`func (o *GetAssignedUser200Response) GetTotal() int32` - -GetTotal returns the Total field if non-nil, zero value otherwise. - -### GetTotalOk - -`func (o *GetAssignedUser200Response) GetTotalOk() (*int32, bool)` - -GetTotalOk returns a tuple with the Total field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTotal - -`func (o *GetAssignedUser200Response) SetTotal(v int32)` - -SetTotal sets Total field to given value. - -### HasTotal - -`func (o *GetAssignedUser200Response) HasTotal() bool` - -HasTotal returns a boolean if a field has been set. - -### GetUsers - -`func (o *GetAssignedUser200Response) GetUsers() []int32` - -GetUsers returns the Users field if non-nil, zero value otherwise. - -### GetUsersOk - -`func (o *GetAssignedUser200Response) 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 *GetAssignedUser200Response) SetUsers(v []int32)` - -SetUsers sets Users field to given value. - -### HasUsers - -`func (o *GetAssignedUser200Response) HasUsers() bool` - -HasUsers returns a boolean if a field has been set. - -### GetBeforeCursor - -`func (o *GetAssignedUser200Response) GetBeforeCursor() int32` - -GetBeforeCursor returns the BeforeCursor field if non-nil, zero value otherwise. - -### GetBeforeCursorOk - -`func (o *GetAssignedUser200Response) GetBeforeCursorOk() (*int32, bool)` - -GetBeforeCursorOk returns a tuple with the BeforeCursor field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetBeforeCursor - -`func (o *GetAssignedUser200Response) SetBeforeCursor(v int32)` - -SetBeforeCursor sets BeforeCursor field to given value. - -### HasBeforeCursor - -`func (o *GetAssignedUser200Response) HasBeforeCursor() bool` - -HasBeforeCursor returns a boolean if a field has been set. - -### SetBeforeCursorNil - -`func (o *GetAssignedUser200Response) SetBeforeCursorNil(b bool)` - - SetBeforeCursorNil sets the value for BeforeCursor to be an explicit nil - -### UnsetBeforeCursor -`func (o *GetAssignedUser200Response) UnsetBeforeCursor()` - -UnsetBeforeCursor ensures that no value is present for BeforeCursor, not even an explicit nil -### GetPreviousLink - -`func (o *GetAssignedUser200Response) GetPreviousLink() string` - -GetPreviousLink returns the PreviousLink field if non-nil, zero value otherwise. - -### GetPreviousLinkOk - -`func (o *GetAssignedUser200Response) GetPreviousLinkOk() (*string, bool)` - -GetPreviousLinkOk returns a tuple with the PreviousLink field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPreviousLink - -`func (o *GetAssignedUser200Response) SetPreviousLink(v string)` - -SetPreviousLink sets PreviousLink field to given value. - -### HasPreviousLink - -`func (o *GetAssignedUser200Response) HasPreviousLink() bool` - -HasPreviousLink returns a boolean if a field has been set. - -### SetPreviousLinkNil - -`func (o *GetAssignedUser200Response) SetPreviousLinkNil(b bool)` - - SetPreviousLinkNil sets the value for PreviousLink to be an explicit nil - -### UnsetPreviousLink -`func (o *GetAssignedUser200Response) UnsetPreviousLink()` - -UnsetPreviousLink ensures that no value is present for PreviousLink, not even an explicit nil -### GetAfterCursor - -`func (o *GetAssignedUser200Response) GetAfterCursor() int32` - -GetAfterCursor returns the AfterCursor field if non-nil, zero value otherwise. - -### GetAfterCursorOk - -`func (o *GetAssignedUser200Response) GetAfterCursorOk() (*int32, bool)` - -GetAfterCursorOk returns a tuple with the AfterCursor field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAfterCursor - -`func (o *GetAssignedUser200Response) SetAfterCursor(v int32)` - -SetAfterCursor sets AfterCursor field to given value. - -### HasAfterCursor - -`func (o *GetAssignedUser200Response) HasAfterCursor() bool` - -HasAfterCursor returns a boolean if a field has been set. - -### SetAfterCursorNil - -`func (o *GetAssignedUser200Response) SetAfterCursorNil(b bool)` - - SetAfterCursorNil sets the value for AfterCursor to be an explicit nil - -### UnsetAfterCursor -`func (o *GetAssignedUser200Response) UnsetAfterCursor()` - -UnsetAfterCursor ensures that no value is present for AfterCursor, not even an explicit nil -### GetNextLink - -`func (o *GetAssignedUser200Response) GetNextLink() string` - -GetNextLink returns the NextLink field if non-nil, zero value otherwise. - -### GetNextLinkOk - -`func (o *GetAssignedUser200Response) GetNextLinkOk() (*string, bool)` - -GetNextLinkOk returns a tuple with the NextLink field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetNextLink - -`func (o *GetAssignedUser200Response) SetNextLink(v string)` - -SetNextLink sets NextLink field to given value. - -### HasNextLink - -`func (o *GetAssignedUser200Response) HasNextLink() bool` - -HasNextLink returns a boolean if a field has been set. - -### SetNextLinkNil - -`func (o *GetAssignedUser200Response) SetNextLinkNil(b bool)` - - SetNextLinkNil sets the value for NextLink to be an explicit nil - -### UnsetNextLink -`func (o *GetAssignedUser200Response) UnsetNextLink()` - -UnsetNextLink ensures that no value is present for NextLink, 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/GetAuthFactors200Response.md b/docs/GetAuthFactors200Response.md deleted file mode 100644 index 8023c4e..0000000 --- a/docs/GetAuthFactors200Response.md +++ /dev/null @@ -1,108 +0,0 @@ -# GetAuthFactors200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**FactorId** | Pointer to **int32** | Identifier for the factor which will be used for user enrollment | [optional] -**Name** | Pointer to **string** | Authentication factor name, as it appears to administrators in OneLogin. | [optional] -**AuthFactorName** | Pointer to **string** | Internal use only | [optional] - -## Methods - -### NewGetAuthFactors200Response - -`func NewGetAuthFactors200Response() *GetAuthFactors200Response` - -NewGetAuthFactors200Response instantiates a new GetAuthFactors200Response 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 - -### NewGetAuthFactors200ResponseWithDefaults - -`func NewGetAuthFactors200ResponseWithDefaults() *GetAuthFactors200Response` - -NewGetAuthFactors200ResponseWithDefaults instantiates a new GetAuthFactors200Response 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 - -### GetFactorId - -`func (o *GetAuthFactors200Response) GetFactorId() int32` - -GetFactorId returns the FactorId field if non-nil, zero value otherwise. - -### GetFactorIdOk - -`func (o *GetAuthFactors200Response) GetFactorIdOk() (*int32, bool)` - -GetFactorIdOk returns a tuple with the FactorId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetFactorId - -`func (o *GetAuthFactors200Response) SetFactorId(v int32)` - -SetFactorId sets FactorId field to given value. - -### HasFactorId - -`func (o *GetAuthFactors200Response) HasFactorId() bool` - -HasFactorId returns a boolean if a field has been set. - -### GetName - -`func (o *GetAuthFactors200Response) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *GetAuthFactors200Response) 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 *GetAuthFactors200Response) SetName(v string)` - -SetName sets Name field to given value. - -### HasName - -`func (o *GetAuthFactors200Response) HasName() bool` - -HasName returns a boolean if a field has been set. - -### GetAuthFactorName - -`func (o *GetAuthFactors200Response) GetAuthFactorName() string` - -GetAuthFactorName returns the AuthFactorName field if non-nil, zero value otherwise. - -### GetAuthFactorNameOk - -`func (o *GetAuthFactors200Response) GetAuthFactorNameOk() (*string, bool)` - -GetAuthFactorNameOk returns a tuple with the AuthFactorName field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAuthFactorName - -`func (o *GetAuthFactors200Response) SetAuthFactorName(v string)` - -SetAuthFactorName sets AuthFactorName field to given value. - -### HasAuthFactorName - -`func (o *GetAuthFactors200Response) HasAuthFactorName() bool` - -HasAuthFactorName 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/GetAuthenticationDevices200ResponseInner.md b/docs/GetAuthenticationDevices200ResponseInner.md deleted file mode 100644 index c9142b5..0000000 --- a/docs/GetAuthenticationDevices200ResponseInner.md +++ /dev/null @@ -1,160 +0,0 @@ -# GetAuthenticationDevices200ResponseInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**DeviceId** | Pointer to **string** | MFA device identifier. | [optional] -**UserDisplayName** | Pointer to **string** | Authentication factor display name assigned by users when they register the device. | [optional] -**TypeDisplayName** | Pointer to **string** | Authentication factor display name as it appears to users upon initial registration, as defined by admins at Settings > Authentication Factors. | [optional] -**AuthFactorName** | Pointer to **string** | Authentication factor name, as it appears to administrators in OneLogin. | [optional] -**Default** | Pointer to **bool** | true = is user’s default MFA device for OneLogin. | [optional] [default to false] - -## Methods - -### NewGetAuthenticationDevices200ResponseInner - -`func NewGetAuthenticationDevices200ResponseInner() *GetAuthenticationDevices200ResponseInner` - -NewGetAuthenticationDevices200ResponseInner instantiates a new GetAuthenticationDevices200ResponseInner 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 - -### NewGetAuthenticationDevices200ResponseInnerWithDefaults - -`func NewGetAuthenticationDevices200ResponseInnerWithDefaults() *GetAuthenticationDevices200ResponseInner` - -NewGetAuthenticationDevices200ResponseInnerWithDefaults instantiates a new GetAuthenticationDevices200ResponseInner 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 - -### GetDeviceId - -`func (o *GetAuthenticationDevices200ResponseInner) GetDeviceId() string` - -GetDeviceId returns the DeviceId field if non-nil, zero value otherwise. - -### GetDeviceIdOk - -`func (o *GetAuthenticationDevices200ResponseInner) GetDeviceIdOk() (*string, bool)` - -GetDeviceIdOk returns a tuple with the DeviceId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDeviceId - -`func (o *GetAuthenticationDevices200ResponseInner) SetDeviceId(v string)` - -SetDeviceId sets DeviceId field to given value. - -### HasDeviceId - -`func (o *GetAuthenticationDevices200ResponseInner) HasDeviceId() bool` - -HasDeviceId returns a boolean if a field has been set. - -### GetUserDisplayName - -`func (o *GetAuthenticationDevices200ResponseInner) GetUserDisplayName() string` - -GetUserDisplayName returns the UserDisplayName field if non-nil, zero value otherwise. - -### GetUserDisplayNameOk - -`func (o *GetAuthenticationDevices200ResponseInner) GetUserDisplayNameOk() (*string, bool)` - -GetUserDisplayNameOk returns a tuple with the UserDisplayName field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUserDisplayName - -`func (o *GetAuthenticationDevices200ResponseInner) SetUserDisplayName(v string)` - -SetUserDisplayName sets UserDisplayName field to given value. - -### HasUserDisplayName - -`func (o *GetAuthenticationDevices200ResponseInner) HasUserDisplayName() bool` - -HasUserDisplayName returns a boolean if a field has been set. - -### GetTypeDisplayName - -`func (o *GetAuthenticationDevices200ResponseInner) GetTypeDisplayName() string` - -GetTypeDisplayName returns the TypeDisplayName field if non-nil, zero value otherwise. - -### GetTypeDisplayNameOk - -`func (o *GetAuthenticationDevices200ResponseInner) GetTypeDisplayNameOk() (*string, bool)` - -GetTypeDisplayNameOk returns a tuple with the TypeDisplayName field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTypeDisplayName - -`func (o *GetAuthenticationDevices200ResponseInner) SetTypeDisplayName(v string)` - -SetTypeDisplayName sets TypeDisplayName field to given value. - -### HasTypeDisplayName - -`func (o *GetAuthenticationDevices200ResponseInner) HasTypeDisplayName() bool` - -HasTypeDisplayName returns a boolean if a field has been set. - -### GetAuthFactorName - -`func (o *GetAuthenticationDevices200ResponseInner) GetAuthFactorName() string` - -GetAuthFactorName returns the AuthFactorName field if non-nil, zero value otherwise. - -### GetAuthFactorNameOk - -`func (o *GetAuthenticationDevices200ResponseInner) GetAuthFactorNameOk() (*string, bool)` - -GetAuthFactorNameOk returns a tuple with the AuthFactorName field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAuthFactorName - -`func (o *GetAuthenticationDevices200ResponseInner) SetAuthFactorName(v string)` - -SetAuthFactorName sets AuthFactorName field to given value. - -### HasAuthFactorName - -`func (o *GetAuthenticationDevices200ResponseInner) HasAuthFactorName() bool` - -HasAuthFactorName returns a boolean if a field has been set. - -### GetDefault - -`func (o *GetAuthenticationDevices200ResponseInner) GetDefault() bool` - -GetDefault returns the Default field if non-nil, zero value otherwise. - -### GetDefaultOk - -`func (o *GetAuthenticationDevices200ResponseInner) GetDefaultOk() (*bool, bool)` - -GetDefaultOk returns a tuple with the Default field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDefault - -`func (o *GetAuthenticationDevices200ResponseInner) SetDefault(v bool)` - -SetDefault sets Default field to given value. - -### HasDefault - -`func (o *GetAuthenticationDevices200ResponseInner) HasDefault() bool` - -HasDefault 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/GetCustomAttributes200Response.md b/docs/GetCustomAttributes200Response.md deleted file mode 100644 index 58fbc26..0000000 --- a/docs/GetCustomAttributes200Response.md +++ /dev/null @@ -1,82 +0,0 @@ -# GetCustomAttributes200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Status** | Pointer to [**Error**](Error.md) | | [optional] -**Data** | Pointer to **[][]string** | Provides a list of custom attribute fields (also known as custom user fields) that are available for your account. The values returned correspond to the values you provided in the Shortname field when you defined the custom user field. For details about defining custom user fields, see Custom User Fields. | [optional] - -## Methods - -### NewGetCustomAttributes200Response - -`func NewGetCustomAttributes200Response() *GetCustomAttributes200Response` - -NewGetCustomAttributes200Response instantiates a new GetCustomAttributes200Response 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 - -### NewGetCustomAttributes200ResponseWithDefaults - -`func NewGetCustomAttributes200ResponseWithDefaults() *GetCustomAttributes200Response` - -NewGetCustomAttributes200ResponseWithDefaults instantiates a new GetCustomAttributes200Response 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 - -### GetStatus - -`func (o *GetCustomAttributes200Response) GetStatus() Error` - -GetStatus returns the Status field if non-nil, zero value otherwise. - -### GetStatusOk - -`func (o *GetCustomAttributes200Response) GetStatusOk() (*Error, bool)` - -GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStatus - -`func (o *GetCustomAttributes200Response) SetStatus(v Error)` - -SetStatus sets Status field to given value. - -### HasStatus - -`func (o *GetCustomAttributes200Response) HasStatus() bool` - -HasStatus returns a boolean if a field has been set. - -### GetData - -`func (o *GetCustomAttributes200Response) GetData() [][]string` - -GetData returns the Data field if non-nil, zero value otherwise. - -### GetDataOk - -`func (o *GetCustomAttributes200Response) GetDataOk() (*[][]string, bool)` - -GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetData - -`func (o *GetCustomAttributes200Response) SetData(v [][]string)` - -SetData sets Data field to given value. - -### HasData - -`func (o *GetCustomAttributes200Response) HasData() bool` - -HasData 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/GetEmailSettings200Response.md b/docs/GetEmailSettings200Response.md deleted file mode 100644 index c597dd0..0000000 --- a/docs/GetEmailSettings200Response.md +++ /dev/null @@ -1,223 +0,0 @@ -# GetEmailSettings200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Mode** | Pointer to **string** | | [optional] -**Address** | **string** | Email Settings server address | -**UseTls** | Pointer to **bool** | Use TLS | [optional] [default to true] -**From** | **string** | The From email address in the message. | -**Domain** | **string** | Domain of the From address. | -**UserName** | Pointer to **string** | The user name of the account to authenticate with the Email Settings server. | [optional] -**Password** | Pointer to **string** | The password of the account to authenticate with the Email Settings server. | [optional] -**Port** | Pointer to **int32** | Defaults to 25. | [optional] [default to 25] - -## Methods - -### NewGetEmailSettings200Response - -`func NewGetEmailSettings200Response(address string, from string, domain string, ) *GetEmailSettings200Response` - -NewGetEmailSettings200Response instantiates a new GetEmailSettings200Response 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 - -### NewGetEmailSettings200ResponseWithDefaults - -`func NewGetEmailSettings200ResponseWithDefaults() *GetEmailSettings200Response` - -NewGetEmailSettings200ResponseWithDefaults instantiates a new GetEmailSettings200Response 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 - -### GetMode - -`func (o *GetEmailSettings200Response) GetMode() string` - -GetMode returns the Mode field if non-nil, zero value otherwise. - -### GetModeOk - -`func (o *GetEmailSettings200Response) GetModeOk() (*string, bool)` - -GetModeOk returns a tuple with the Mode field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMode - -`func (o *GetEmailSettings200Response) SetMode(v string)` - -SetMode sets Mode field to given value. - -### HasMode - -`func (o *GetEmailSettings200Response) HasMode() bool` - -HasMode returns a boolean if a field has been set. - -### GetAddress - -`func (o *GetEmailSettings200Response) GetAddress() string` - -GetAddress returns the Address field if non-nil, zero value otherwise. - -### GetAddressOk - -`func (o *GetEmailSettings200Response) GetAddressOk() (*string, bool)` - -GetAddressOk returns a tuple with the Address field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAddress - -`func (o *GetEmailSettings200Response) SetAddress(v string)` - -SetAddress sets Address field to given value. - - -### GetUseTls - -`func (o *GetEmailSettings200Response) GetUseTls() bool` - -GetUseTls returns the UseTls field if non-nil, zero value otherwise. - -### GetUseTlsOk - -`func (o *GetEmailSettings200Response) GetUseTlsOk() (*bool, bool)` - -GetUseTlsOk returns a tuple with the UseTls field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUseTls - -`func (o *GetEmailSettings200Response) SetUseTls(v bool)` - -SetUseTls sets UseTls field to given value. - -### HasUseTls - -`func (o *GetEmailSettings200Response) HasUseTls() bool` - -HasUseTls returns a boolean if a field has been set. - -### GetFrom - -`func (o *GetEmailSettings200Response) GetFrom() string` - -GetFrom returns the From field if non-nil, zero value otherwise. - -### GetFromOk - -`func (o *GetEmailSettings200Response) GetFromOk() (*string, bool)` - -GetFromOk returns a tuple with the From field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetFrom - -`func (o *GetEmailSettings200Response) SetFrom(v string)` - -SetFrom sets From field to given value. - - -### GetDomain - -`func (o *GetEmailSettings200Response) GetDomain() string` - -GetDomain returns the Domain field if non-nil, zero value otherwise. - -### GetDomainOk - -`func (o *GetEmailSettings200Response) GetDomainOk() (*string, bool)` - -GetDomainOk returns a tuple with the Domain field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDomain - -`func (o *GetEmailSettings200Response) SetDomain(v string)` - -SetDomain sets Domain field to given value. - - -### GetUserName - -`func (o *GetEmailSettings200Response) GetUserName() string` - -GetUserName returns the UserName field if non-nil, zero value otherwise. - -### GetUserNameOk - -`func (o *GetEmailSettings200Response) 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 *GetEmailSettings200Response) SetUserName(v string)` - -SetUserName sets UserName field to given value. - -### HasUserName - -`func (o *GetEmailSettings200Response) HasUserName() bool` - -HasUserName returns a boolean if a field has been set. - -### GetPassword - -`func (o *GetEmailSettings200Response) GetPassword() string` - -GetPassword returns the Password field if non-nil, zero value otherwise. - -### GetPasswordOk - -`func (o *GetEmailSettings200Response) GetPasswordOk() (*string, bool)` - -GetPasswordOk returns a tuple with the Password field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPassword - -`func (o *GetEmailSettings200Response) SetPassword(v string)` - -SetPassword sets Password field to given value. - -### HasPassword - -`func (o *GetEmailSettings200Response) HasPassword() bool` - -HasPassword returns a boolean if a field has been set. - -### GetPort - -`func (o *GetEmailSettings200Response) GetPort() int32` - -GetPort returns the Port field if non-nil, zero value otherwise. - -### GetPortOk - -`func (o *GetEmailSettings200Response) GetPortOk() (*int32, bool)` - -GetPortOk returns a tuple with the Port field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPort - -`func (o *GetEmailSettings200Response) SetPort(v int32)` - -SetPort sets Port field to given value. - -### HasPort - -`func (o *GetEmailSettings200Response) HasPort() bool` - -HasPort 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/GetEmailSettings200ResponseOneOf.md b/docs/GetEmailSettings200ResponseOneOf.md deleted file mode 100644 index 28f9a40..0000000 --- a/docs/GetEmailSettings200ResponseOneOf.md +++ /dev/null @@ -1,56 +0,0 @@ -# GetEmailSettings200ResponseOneOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Mode** | Pointer to **string** | | [optional] - -## Methods - -### NewGetEmailSettings200ResponseOneOf - -`func NewGetEmailSettings200ResponseOneOf() *GetEmailSettings200ResponseOneOf` - -NewGetEmailSettings200ResponseOneOf instantiates a new GetEmailSettings200ResponseOneOf 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 - -### NewGetEmailSettings200ResponseOneOfWithDefaults - -`func NewGetEmailSettings200ResponseOneOfWithDefaults() *GetEmailSettings200ResponseOneOf` - -NewGetEmailSettings200ResponseOneOfWithDefaults instantiates a new GetEmailSettings200ResponseOneOf 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 - -### GetMode - -`func (o *GetEmailSettings200ResponseOneOf) GetMode() string` - -GetMode returns the Mode field if non-nil, zero value otherwise. - -### GetModeOk - -`func (o *GetEmailSettings200ResponseOneOf) GetModeOk() (*string, bool)` - -GetModeOk returns a tuple with the Mode field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMode - -`func (o *GetEmailSettings200ResponseOneOf) SetMode(v string)` - -SetMode sets Mode field to given value. - -### HasMode - -`func (o *GetEmailSettings200ResponseOneOf) HasMode() bool` - -HasMode 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/GetEnrolledFactors200Response.md b/docs/GetEnrolledFactors200Response.md deleted file mode 100644 index ec22820..0000000 --- a/docs/GetEnrolledFactors200Response.md +++ /dev/null @@ -1,82 +0,0 @@ -# GetEnrolledFactors200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Status** | Pointer to [**Error**](Error.md) | | [optional] -**Data** | Pointer to [**GetEnrolledFactors200ResponseData**](GetEnrolledFactors200ResponseData.md) | | [optional] - -## Methods - -### NewGetEnrolledFactors200Response - -`func NewGetEnrolledFactors200Response() *GetEnrolledFactors200Response` - -NewGetEnrolledFactors200Response instantiates a new GetEnrolledFactors200Response 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 - -### NewGetEnrolledFactors200ResponseWithDefaults - -`func NewGetEnrolledFactors200ResponseWithDefaults() *GetEnrolledFactors200Response` - -NewGetEnrolledFactors200ResponseWithDefaults instantiates a new GetEnrolledFactors200Response 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 - -### GetStatus - -`func (o *GetEnrolledFactors200Response) GetStatus() Error` - -GetStatus returns the Status field if non-nil, zero value otherwise. - -### GetStatusOk - -`func (o *GetEnrolledFactors200Response) GetStatusOk() (*Error, bool)` - -GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStatus - -`func (o *GetEnrolledFactors200Response) SetStatus(v Error)` - -SetStatus sets Status field to given value. - -### HasStatus - -`func (o *GetEnrolledFactors200Response) HasStatus() bool` - -HasStatus returns a boolean if a field has been set. - -### GetData - -`func (o *GetEnrolledFactors200Response) GetData() GetEnrolledFactors200ResponseData` - -GetData returns the Data field if non-nil, zero value otherwise. - -### GetDataOk - -`func (o *GetEnrolledFactors200Response) GetDataOk() (*GetEnrolledFactors200ResponseData, bool)` - -GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetData - -`func (o *GetEnrolledFactors200Response) SetData(v GetEnrolledFactors200ResponseData)` - -SetData sets Data field to given value. - -### HasData - -`func (o *GetEnrolledFactors200Response) HasData() bool` - -HasData 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/GetEnrolledFactors200ResponseData.md b/docs/GetEnrolledFactors200ResponseData.md deleted file mode 100644 index 219918a..0000000 --- a/docs/GetEnrolledFactors200ResponseData.md +++ /dev/null @@ -1,56 +0,0 @@ -# GetEnrolledFactors200ResponseData - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**OtpDevices** | Pointer to [**[]GetEnrolledFactors200ResponseDataOtpDevicesInner**](GetEnrolledFactors200ResponseDataOtpDevicesInner.md) | | [optional] - -## Methods - -### NewGetEnrolledFactors200ResponseData - -`func NewGetEnrolledFactors200ResponseData() *GetEnrolledFactors200ResponseData` - -NewGetEnrolledFactors200ResponseData instantiates a new GetEnrolledFactors200ResponseData 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 - -### NewGetEnrolledFactors200ResponseDataWithDefaults - -`func NewGetEnrolledFactors200ResponseDataWithDefaults() *GetEnrolledFactors200ResponseData` - -NewGetEnrolledFactors200ResponseDataWithDefaults instantiates a new GetEnrolledFactors200ResponseData 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 - -### GetOtpDevices - -`func (o *GetEnrolledFactors200ResponseData) GetOtpDevices() []GetEnrolledFactors200ResponseDataOtpDevicesInner` - -GetOtpDevices returns the OtpDevices field if non-nil, zero value otherwise. - -### GetOtpDevicesOk - -`func (o *GetEnrolledFactors200ResponseData) GetOtpDevicesOk() (*[]GetEnrolledFactors200ResponseDataOtpDevicesInner, bool)` - -GetOtpDevicesOk returns a tuple with the OtpDevices field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetOtpDevices - -`func (o *GetEnrolledFactors200ResponseData) SetOtpDevices(v []GetEnrolledFactors200ResponseDataOtpDevicesInner)` - -SetOtpDevices sets OtpDevices field to given value. - -### HasOtpDevices - -`func (o *GetEnrolledFactors200ResponseData) HasOtpDevices() bool` - -HasOtpDevices 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/GetEnrolledFactors200ResponseDataOtpDevicesInner.md b/docs/GetEnrolledFactors200ResponseDataOtpDevicesInner.md deleted file mode 100644 index 9c340f7..0000000 --- a/docs/GetEnrolledFactors200ResponseDataOtpDevicesInner.md +++ /dev/null @@ -1,264 +0,0 @@ -# GetEnrolledFactors200ResponseDataOtpDevicesInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Active** | Pointer to **bool** | True = enabled (used successfully for authentication at least once). False = pending (registered but never used). | [optional] -**Default** | Pointer to **bool** | True = is user’s default MFA device for OneLogin. | [optional] -**StateToken** | Pointer to **string** | A short lived token that is required to Verify the Factor. This token expires in 120 seconds. | [optional] -**AuthFactorName** | Pointer to **string** | \"Official\" authentication factor name, as it appears to administrators in OneLogin. | [optional] -**PhoneNumber** | Pointer to **string** | For OTP codes sent via SMS, the phone number receiving the SMS message. | [optional] -**TypeDisplayName** | Pointer to **string** | Authentication factor display name as it appears to users upon initial registration, as defined by admins at Settings > Authentication Factors. | [optional] -**NeedsTrigger** | Pointer to **bool** | true: You MUST Activate this Factor to trigger an SMS or Push notification before Verifying the OTP code. false: No Activation required. You can Verify the OTP immediately. MFA factors that provide both push notifications (user accepts notification) and pull code submission (user initiates code submission from device or enters it manually) should appear twice; once with needs_trigger: true and once with needs_trigger: false. | [optional] -**UserDisplayName** | Pointer to **string** | Authentication factor display name assigned by users when they enroll the device. | [optional] -**Id** | Pointer to **int32** | MFA device identifier. | [optional] - -## Methods - -### NewGetEnrolledFactors200ResponseDataOtpDevicesInner - -`func NewGetEnrolledFactors200ResponseDataOtpDevicesInner() *GetEnrolledFactors200ResponseDataOtpDevicesInner` - -NewGetEnrolledFactors200ResponseDataOtpDevicesInner instantiates a new GetEnrolledFactors200ResponseDataOtpDevicesInner 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 - -### NewGetEnrolledFactors200ResponseDataOtpDevicesInnerWithDefaults - -`func NewGetEnrolledFactors200ResponseDataOtpDevicesInnerWithDefaults() *GetEnrolledFactors200ResponseDataOtpDevicesInner` - -NewGetEnrolledFactors200ResponseDataOtpDevicesInnerWithDefaults instantiates a new GetEnrolledFactors200ResponseDataOtpDevicesInner 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 - -### GetActive - -`func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) GetActive() bool` - -GetActive returns the Active field if non-nil, zero value otherwise. - -### GetActiveOk - -`func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) GetActiveOk() (*bool, bool)` - -GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetActive - -`func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) SetActive(v bool)` - -SetActive sets Active field to given value. - -### HasActive - -`func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) HasActive() bool` - -HasActive returns a boolean if a field has been set. - -### GetDefault - -`func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) GetDefault() bool` - -GetDefault returns the Default field if non-nil, zero value otherwise. - -### GetDefaultOk - -`func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) GetDefaultOk() (*bool, bool)` - -GetDefaultOk returns a tuple with the Default field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDefault - -`func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) SetDefault(v bool)` - -SetDefault sets Default field to given value. - -### HasDefault - -`func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) HasDefault() bool` - -HasDefault returns a boolean if a field has been set. - -### GetStateToken - -`func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) GetStateToken() string` - -GetStateToken returns the StateToken field if non-nil, zero value otherwise. - -### GetStateTokenOk - -`func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) GetStateTokenOk() (*string, bool)` - -GetStateTokenOk returns a tuple with the StateToken field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStateToken - -`func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) SetStateToken(v string)` - -SetStateToken sets StateToken field to given value. - -### HasStateToken - -`func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) HasStateToken() bool` - -HasStateToken returns a boolean if a field has been set. - -### GetAuthFactorName - -`func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) GetAuthFactorName() string` - -GetAuthFactorName returns the AuthFactorName field if non-nil, zero value otherwise. - -### GetAuthFactorNameOk - -`func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) GetAuthFactorNameOk() (*string, bool)` - -GetAuthFactorNameOk returns a tuple with the AuthFactorName field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAuthFactorName - -`func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) SetAuthFactorName(v string)` - -SetAuthFactorName sets AuthFactorName field to given value. - -### HasAuthFactorName - -`func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) HasAuthFactorName() bool` - -HasAuthFactorName returns a boolean if a field has been set. - -### GetPhoneNumber - -`func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) GetPhoneNumber() string` - -GetPhoneNumber returns the PhoneNumber field if non-nil, zero value otherwise. - -### GetPhoneNumberOk - -`func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) GetPhoneNumberOk() (*string, bool)` - -GetPhoneNumberOk returns a tuple with the PhoneNumber field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPhoneNumber - -`func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) SetPhoneNumber(v string)` - -SetPhoneNumber sets PhoneNumber field to given value. - -### HasPhoneNumber - -`func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) HasPhoneNumber() bool` - -HasPhoneNumber returns a boolean if a field has been set. - -### GetTypeDisplayName - -`func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) GetTypeDisplayName() string` - -GetTypeDisplayName returns the TypeDisplayName field if non-nil, zero value otherwise. - -### GetTypeDisplayNameOk - -`func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) GetTypeDisplayNameOk() (*string, bool)` - -GetTypeDisplayNameOk returns a tuple with the TypeDisplayName field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTypeDisplayName - -`func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) SetTypeDisplayName(v string)` - -SetTypeDisplayName sets TypeDisplayName field to given value. - -### HasTypeDisplayName - -`func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) HasTypeDisplayName() bool` - -HasTypeDisplayName returns a boolean if a field has been set. - -### GetNeedsTrigger - -`func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) GetNeedsTrigger() bool` - -GetNeedsTrigger returns the NeedsTrigger field if non-nil, zero value otherwise. - -### GetNeedsTriggerOk - -`func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) GetNeedsTriggerOk() (*bool, bool)` - -GetNeedsTriggerOk returns a tuple with the NeedsTrigger field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetNeedsTrigger - -`func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) SetNeedsTrigger(v bool)` - -SetNeedsTrigger sets NeedsTrigger field to given value. - -### HasNeedsTrigger - -`func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) HasNeedsTrigger() bool` - -HasNeedsTrigger returns a boolean if a field has been set. - -### GetUserDisplayName - -`func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) GetUserDisplayName() string` - -GetUserDisplayName returns the UserDisplayName field if non-nil, zero value otherwise. - -### GetUserDisplayNameOk - -`func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) GetUserDisplayNameOk() (*string, bool)` - -GetUserDisplayNameOk returns a tuple with the UserDisplayName field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUserDisplayName - -`func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) SetUserDisplayName(v string)` - -SetUserDisplayName sets UserDisplayName field to given value. - -### HasUserDisplayName - -`func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) HasUserDisplayName() bool` - -HasUserDisplayName returns a boolean if a field has been set. - -### GetId - -`func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) GetId() int32` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) GetIdOk() (*int32, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) SetId(v int32)` - -SetId sets Id field to given value. - -### HasId - -`func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) HasId() bool` - -HasId 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/GetEventById200Response.md b/docs/GetEventById200Response.md deleted file mode 100644 index 94c56e5..0000000 --- a/docs/GetEventById200Response.md +++ /dev/null @@ -1,82 +0,0 @@ -# GetEventById200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Status** | Pointer to [**Error**](Error.md) | | [optional] -**Data** | Pointer to [**Event**](Event.md) | | [optional] - -## Methods - -### NewGetEventById200Response - -`func NewGetEventById200Response() *GetEventById200Response` - -NewGetEventById200Response instantiates a new GetEventById200Response 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 - -### NewGetEventById200ResponseWithDefaults - -`func NewGetEventById200ResponseWithDefaults() *GetEventById200Response` - -NewGetEventById200ResponseWithDefaults instantiates a new GetEventById200Response 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 - -### GetStatus - -`func (o *GetEventById200Response) GetStatus() Error` - -GetStatus returns the Status field if non-nil, zero value otherwise. - -### GetStatusOk - -`func (o *GetEventById200Response) GetStatusOk() (*Error, bool)` - -GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStatus - -`func (o *GetEventById200Response) SetStatus(v Error)` - -SetStatus sets Status field to given value. - -### HasStatus - -`func (o *GetEventById200Response) HasStatus() bool` - -HasStatus returns a boolean if a field has been set. - -### GetData - -`func (o *GetEventById200Response) GetData() Event` - -GetData returns the Data field if non-nil, zero value otherwise. - -### GetDataOk - -`func (o *GetEventById200Response) GetDataOk() (*Event, bool)` - -GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetData - -`func (o *GetEventById200Response) SetData(v Event)` - -SetData sets Data field to given value. - -### HasData - -`func (o *GetEventById200Response) HasData() bool` - -HasData 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/GetEventTypes200Response.md b/docs/GetEventTypes200Response.md deleted file mode 100644 index 90f26ac..0000000 --- a/docs/GetEventTypes200Response.md +++ /dev/null @@ -1,82 +0,0 @@ -# GetEventTypes200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Status** | Pointer to [**Error**](Error.md) | | [optional] -**Data** | Pointer to [**[]GetEventTypes200ResponseDataInner**](GetEventTypes200ResponseDataInner.md) | | [optional] - -## Methods - -### NewGetEventTypes200Response - -`func NewGetEventTypes200Response() *GetEventTypes200Response` - -NewGetEventTypes200Response instantiates a new GetEventTypes200Response 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 - -### NewGetEventTypes200ResponseWithDefaults - -`func NewGetEventTypes200ResponseWithDefaults() *GetEventTypes200Response` - -NewGetEventTypes200ResponseWithDefaults instantiates a new GetEventTypes200Response 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 - -### GetStatus - -`func (o *GetEventTypes200Response) GetStatus() Error` - -GetStatus returns the Status field if non-nil, zero value otherwise. - -### GetStatusOk - -`func (o *GetEventTypes200Response) GetStatusOk() (*Error, bool)` - -GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStatus - -`func (o *GetEventTypes200Response) SetStatus(v Error)` - -SetStatus sets Status field to given value. - -### HasStatus - -`func (o *GetEventTypes200Response) HasStatus() bool` - -HasStatus returns a boolean if a field has been set. - -### GetData - -`func (o *GetEventTypes200Response) GetData() []GetEventTypes200ResponseDataInner` - -GetData returns the Data field if non-nil, zero value otherwise. - -### GetDataOk - -`func (o *GetEventTypes200Response) GetDataOk() (*[]GetEventTypes200ResponseDataInner, bool)` - -GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetData - -`func (o *GetEventTypes200Response) SetData(v []GetEventTypes200ResponseDataInner)` - -SetData sets Data field to given value. - -### HasData - -`func (o *GetEventTypes200Response) HasData() bool` - -HasData 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/GetEventTypes200ResponseDataInner.md b/docs/GetEventTypes200ResponseDataInner.md deleted file mode 100644 index 867558b..0000000 --- a/docs/GetEventTypes200ResponseDataInner.md +++ /dev/null @@ -1,108 +0,0 @@ -# GetEventTypes200ResponseDataInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | Pointer to **string** | | [optional] -**Description** | Pointer to **string** | | [optional] -**Id** | Pointer to **int32** | | [optional] - -## Methods - -### NewGetEventTypes200ResponseDataInner - -`func NewGetEventTypes200ResponseDataInner() *GetEventTypes200ResponseDataInner` - -NewGetEventTypes200ResponseDataInner instantiates a new GetEventTypes200ResponseDataInner 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 - -### NewGetEventTypes200ResponseDataInnerWithDefaults - -`func NewGetEventTypes200ResponseDataInnerWithDefaults() *GetEventTypes200ResponseDataInner` - -NewGetEventTypes200ResponseDataInnerWithDefaults instantiates a new GetEventTypes200ResponseDataInner 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 *GetEventTypes200ResponseDataInner) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *GetEventTypes200ResponseDataInner) 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 *GetEventTypes200ResponseDataInner) SetName(v string)` - -SetName sets Name field to given value. - -### HasName - -`func (o *GetEventTypes200ResponseDataInner) HasName() bool` - -HasName returns a boolean if a field has been set. - -### GetDescription - -`func (o *GetEventTypes200ResponseDataInner) GetDescription() string` - -GetDescription returns the Description field if non-nil, zero value otherwise. - -### GetDescriptionOk - -`func (o *GetEventTypes200ResponseDataInner) GetDescriptionOk() (*string, bool)` - -GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDescription - -`func (o *GetEventTypes200ResponseDataInner) SetDescription(v string)` - -SetDescription sets Description field to given value. - -### HasDescription - -`func (o *GetEventTypes200ResponseDataInner) HasDescription() bool` - -HasDescription returns a boolean if a field has been set. - -### GetId - -`func (o *GetEventTypes200ResponseDataInner) GetId() int32` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *GetEventTypes200ResponseDataInner) GetIdOk() (*int32, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *GetEventTypes200ResponseDataInner) SetId(v int32)` - -SetId sets Id field to given value. - -### HasId - -`func (o *GetEventTypes200ResponseDataInner) HasId() bool` - -HasId 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/GetEvents200Response.md b/docs/GetEvents200Response.md deleted file mode 100644 index 720b8e2..0000000 --- a/docs/GetEvents200Response.md +++ /dev/null @@ -1,108 +0,0 @@ -# GetEvents200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Status** | Pointer to [**Error**](Error.md) | | [optional] -**Pagination** | Pointer to [**GetEvents200ResponsePagination**](GetEvents200ResponsePagination.md) | | [optional] -**Data** | Pointer to [**[]Event**](Event.md) | | [optional] - -## Methods - -### NewGetEvents200Response - -`func NewGetEvents200Response() *GetEvents200Response` - -NewGetEvents200Response instantiates a new GetEvents200Response 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 - -### NewGetEvents200ResponseWithDefaults - -`func NewGetEvents200ResponseWithDefaults() *GetEvents200Response` - -NewGetEvents200ResponseWithDefaults instantiates a new GetEvents200Response 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 - -### GetStatus - -`func (o *GetEvents200Response) GetStatus() Error` - -GetStatus returns the Status field if non-nil, zero value otherwise. - -### GetStatusOk - -`func (o *GetEvents200Response) GetStatusOk() (*Error, bool)` - -GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStatus - -`func (o *GetEvents200Response) SetStatus(v Error)` - -SetStatus sets Status field to given value. - -### HasStatus - -`func (o *GetEvents200Response) HasStatus() bool` - -HasStatus returns a boolean if a field has been set. - -### GetPagination - -`func (o *GetEvents200Response) GetPagination() GetEvents200ResponsePagination` - -GetPagination returns the Pagination field if non-nil, zero value otherwise. - -### GetPaginationOk - -`func (o *GetEvents200Response) GetPaginationOk() (*GetEvents200ResponsePagination, bool)` - -GetPaginationOk returns a tuple with the Pagination field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPagination - -`func (o *GetEvents200Response) SetPagination(v GetEvents200ResponsePagination)` - -SetPagination sets Pagination field to given value. - -### HasPagination - -`func (o *GetEvents200Response) HasPagination() bool` - -HasPagination returns a boolean if a field has been set. - -### GetData - -`func (o *GetEvents200Response) GetData() []Event` - -GetData returns the Data field if non-nil, zero value otherwise. - -### GetDataOk - -`func (o *GetEvents200Response) GetDataOk() (*[]Event, bool)` - -GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetData - -`func (o *GetEvents200Response) SetData(v []Event)` - -SetData sets Data field to given value. - -### HasData - -`func (o *GetEvents200Response) HasData() bool` - -HasData 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/GetEvents200ResponsePagination.md b/docs/GetEvents200ResponsePagination.md deleted file mode 100644 index dbb8cda..0000000 --- a/docs/GetEvents200ResponsePagination.md +++ /dev/null @@ -1,134 +0,0 @@ -# GetEvents200ResponsePagination - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**BeforeCursor** | Pointer to **string** | | [optional] -**AfterCursor** | Pointer to **string** | | [optional] -**PreviousLink** | Pointer to **string** | | [optional] -**NextLink** | Pointer to **string** | | [optional] - -## Methods - -### NewGetEvents200ResponsePagination - -`func NewGetEvents200ResponsePagination() *GetEvents200ResponsePagination` - -NewGetEvents200ResponsePagination instantiates a new GetEvents200ResponsePagination 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 - -### NewGetEvents200ResponsePaginationWithDefaults - -`func NewGetEvents200ResponsePaginationWithDefaults() *GetEvents200ResponsePagination` - -NewGetEvents200ResponsePaginationWithDefaults instantiates a new GetEvents200ResponsePagination 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 - -### GetBeforeCursor - -`func (o *GetEvents200ResponsePagination) GetBeforeCursor() string` - -GetBeforeCursor returns the BeforeCursor field if non-nil, zero value otherwise. - -### GetBeforeCursorOk - -`func (o *GetEvents200ResponsePagination) GetBeforeCursorOk() (*string, bool)` - -GetBeforeCursorOk returns a tuple with the BeforeCursor field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetBeforeCursor - -`func (o *GetEvents200ResponsePagination) SetBeforeCursor(v string)` - -SetBeforeCursor sets BeforeCursor field to given value. - -### HasBeforeCursor - -`func (o *GetEvents200ResponsePagination) HasBeforeCursor() bool` - -HasBeforeCursor returns a boolean if a field has been set. - -### GetAfterCursor - -`func (o *GetEvents200ResponsePagination) GetAfterCursor() string` - -GetAfterCursor returns the AfterCursor field if non-nil, zero value otherwise. - -### GetAfterCursorOk - -`func (o *GetEvents200ResponsePagination) GetAfterCursorOk() (*string, bool)` - -GetAfterCursorOk returns a tuple with the AfterCursor field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAfterCursor - -`func (o *GetEvents200ResponsePagination) SetAfterCursor(v string)` - -SetAfterCursor sets AfterCursor field to given value. - -### HasAfterCursor - -`func (o *GetEvents200ResponsePagination) HasAfterCursor() bool` - -HasAfterCursor returns a boolean if a field has been set. - -### GetPreviousLink - -`func (o *GetEvents200ResponsePagination) GetPreviousLink() string` - -GetPreviousLink returns the PreviousLink field if non-nil, zero value otherwise. - -### GetPreviousLinkOk - -`func (o *GetEvents200ResponsePagination) GetPreviousLinkOk() (*string, bool)` - -GetPreviousLinkOk returns a tuple with the PreviousLink field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPreviousLink - -`func (o *GetEvents200ResponsePagination) SetPreviousLink(v string)` - -SetPreviousLink sets PreviousLink field to given value. - -### HasPreviousLink - -`func (o *GetEvents200ResponsePagination) HasPreviousLink() bool` - -HasPreviousLink returns a boolean if a field has been set. - -### GetNextLink - -`func (o *GetEvents200ResponsePagination) GetNextLink() string` - -GetNextLink returns the NextLink field if non-nil, zero value otherwise. - -### GetNextLinkOk - -`func (o *GetEvents200ResponsePagination) GetNextLinkOk() (*string, bool)` - -GetNextLinkOk returns a tuple with the NextLink field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetNextLink - -`func (o *GetEvents200ResponsePagination) SetNextLink(v string)` - -SetNextLink sets NextLink field to given value. - -### HasNextLink - -`func (o *GetEvents200ResponsePagination) HasNextLink() bool` - -HasNextLink 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/GetGroups200Response.md b/docs/GetGroups200Response.md deleted file mode 100644 index 315e26e..0000000 --- a/docs/GetGroups200Response.md +++ /dev/null @@ -1,82 +0,0 @@ -# GetGroups200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Status** | Pointer to [**Error**](Error.md) | | [optional] -**Data** | Pointer to [**[]Group**](Group.md) | | [optional] - -## Methods - -### NewGetGroups200Response - -`func NewGetGroups200Response() *GetGroups200Response` - -NewGetGroups200Response instantiates a new GetGroups200Response 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 - -### NewGetGroups200ResponseWithDefaults - -`func NewGetGroups200ResponseWithDefaults() *GetGroups200Response` - -NewGetGroups200ResponseWithDefaults instantiates a new GetGroups200Response 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 - -### GetStatus - -`func (o *GetGroups200Response) GetStatus() Error` - -GetStatus returns the Status field if non-nil, zero value otherwise. - -### GetStatusOk - -`func (o *GetGroups200Response) GetStatusOk() (*Error, bool)` - -GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStatus - -`func (o *GetGroups200Response) SetStatus(v Error)` - -SetStatus sets Status field to given value. - -### HasStatus - -`func (o *GetGroups200Response) HasStatus() bool` - -HasStatus returns a boolean if a field has been set. - -### GetData - -`func (o *GetGroups200Response) GetData() []Group` - -GetData returns the Data field if non-nil, zero value otherwise. - -### GetDataOk - -`func (o *GetGroups200Response) GetDataOk() (*[]Group, bool)` - -GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetData - -`func (o *GetGroups200Response) SetData(v []Group)` - -SetData sets Data field to given value. - -### HasData - -`func (o *GetGroups200Response) HasData() bool` - -HasData 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/GetInviteLink200Response.md b/docs/GetInviteLink200Response.md deleted file mode 100644 index 9f724b9..0000000 --- a/docs/GetInviteLink200Response.md +++ /dev/null @@ -1,82 +0,0 @@ -# GetInviteLink200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Status** | Pointer to [**Error**](Error.md) | | [optional] -**Data** | Pointer to **[]string** | Provides reset password link | [optional] - -## Methods - -### NewGetInviteLink200Response - -`func NewGetInviteLink200Response() *GetInviteLink200Response` - -NewGetInviteLink200Response instantiates a new GetInviteLink200Response 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 - -### NewGetInviteLink200ResponseWithDefaults - -`func NewGetInviteLink200ResponseWithDefaults() *GetInviteLink200Response` - -NewGetInviteLink200ResponseWithDefaults instantiates a new GetInviteLink200Response 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 - -### GetStatus - -`func (o *GetInviteLink200Response) GetStatus() Error` - -GetStatus returns the Status field if non-nil, zero value otherwise. - -### GetStatusOk - -`func (o *GetInviteLink200Response) GetStatusOk() (*Error, bool)` - -GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStatus - -`func (o *GetInviteLink200Response) SetStatus(v Error)` - -SetStatus sets Status field to given value. - -### HasStatus - -`func (o *GetInviteLink200Response) HasStatus() bool` - -HasStatus returns a boolean if a field has been set. - -### GetData - -`func (o *GetInviteLink200Response) GetData() []string` - -GetData returns the Data field if non-nil, zero value otherwise. - -### GetDataOk - -`func (o *GetInviteLink200Response) GetDataOk() (*[]string, bool)` - -GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetData - -`func (o *GetInviteLink200Response) SetData(v []string)` - -SetData sets Data field to given value. - -### HasData - -`func (o *GetInviteLink200Response) HasData() bool` - -HasData 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/GetInviteLinkRequest.md b/docs/GetInviteLinkRequest.md deleted file mode 100644 index d1068ef..0000000 --- a/docs/GetInviteLinkRequest.md +++ /dev/null @@ -1,56 +0,0 @@ -# GetInviteLinkRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Email** | Pointer to **string** | Set to the user email address to generate an invite link. The value is case sensitive. | [optional] - -## Methods - -### NewGetInviteLinkRequest - -`func NewGetInviteLinkRequest() *GetInviteLinkRequest` - -NewGetInviteLinkRequest instantiates a new GetInviteLinkRequest 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 - -### NewGetInviteLinkRequestWithDefaults - -`func NewGetInviteLinkRequestWithDefaults() *GetInviteLinkRequest` - -NewGetInviteLinkRequestWithDefaults instantiates a new GetInviteLinkRequest 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 - -### GetEmail - -`func (o *GetInviteLinkRequest) GetEmail() string` - -GetEmail returns the Email field if non-nil, zero value otherwise. - -### GetEmailOk - -`func (o *GetInviteLinkRequest) 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 *GetInviteLinkRequest) SetEmail(v string)` - -SetEmail sets Email field to given value. - -### HasEmail - -`func (o *GetInviteLinkRequest) HasEmail() bool` - -HasEmail 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/GetMFAFactors200Response.md b/docs/GetMFAFactors200Response.md deleted file mode 100644 index 25febc3..0000000 --- a/docs/GetMFAFactors200Response.md +++ /dev/null @@ -1,82 +0,0 @@ -# GetMFAFactors200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Status** | Pointer to [**Error**](Error.md) | | [optional] -**Data** | Pointer to [**GetMFAFactors200ResponseData**](GetMFAFactors200ResponseData.md) | | [optional] - -## Methods - -### NewGetMFAFactors200Response - -`func NewGetMFAFactors200Response() *GetMFAFactors200Response` - -NewGetMFAFactors200Response instantiates a new GetMFAFactors200Response 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 - -### NewGetMFAFactors200ResponseWithDefaults - -`func NewGetMFAFactors200ResponseWithDefaults() *GetMFAFactors200Response` - -NewGetMFAFactors200ResponseWithDefaults instantiates a new GetMFAFactors200Response 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 - -### GetStatus - -`func (o *GetMFAFactors200Response) GetStatus() Error` - -GetStatus returns the Status field if non-nil, zero value otherwise. - -### GetStatusOk - -`func (o *GetMFAFactors200Response) GetStatusOk() (*Error, bool)` - -GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStatus - -`func (o *GetMFAFactors200Response) SetStatus(v Error)` - -SetStatus sets Status field to given value. - -### HasStatus - -`func (o *GetMFAFactors200Response) HasStatus() bool` - -HasStatus returns a boolean if a field has been set. - -### GetData - -`func (o *GetMFAFactors200Response) GetData() GetMFAFactors200ResponseData` - -GetData returns the Data field if non-nil, zero value otherwise. - -### GetDataOk - -`func (o *GetMFAFactors200Response) GetDataOk() (*GetMFAFactors200ResponseData, bool)` - -GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetData - -`func (o *GetMFAFactors200Response) SetData(v GetMFAFactors200ResponseData)` - -SetData sets Data field to given value. - -### HasData - -`func (o *GetMFAFactors200Response) HasData() bool` - -HasData 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/GetMFAFactors200ResponseData.md b/docs/GetMFAFactors200ResponseData.md deleted file mode 100644 index 7a9a19e..0000000 --- a/docs/GetMFAFactors200ResponseData.md +++ /dev/null @@ -1,56 +0,0 @@ -# GetMFAFactors200ResponseData - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**AuthFactors** | Pointer to [**[]GetMFAFactors200ResponseDataAuthFactorsInner**](GetMFAFactors200ResponseDataAuthFactorsInner.md) | | [optional] - -## Methods - -### NewGetMFAFactors200ResponseData - -`func NewGetMFAFactors200ResponseData() *GetMFAFactors200ResponseData` - -NewGetMFAFactors200ResponseData instantiates a new GetMFAFactors200ResponseData 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 - -### NewGetMFAFactors200ResponseDataWithDefaults - -`func NewGetMFAFactors200ResponseDataWithDefaults() *GetMFAFactors200ResponseData` - -NewGetMFAFactors200ResponseDataWithDefaults instantiates a new GetMFAFactors200ResponseData 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 - -### GetAuthFactors - -`func (o *GetMFAFactors200ResponseData) GetAuthFactors() []GetMFAFactors200ResponseDataAuthFactorsInner` - -GetAuthFactors returns the AuthFactors field if non-nil, zero value otherwise. - -### GetAuthFactorsOk - -`func (o *GetMFAFactors200ResponseData) GetAuthFactorsOk() (*[]GetMFAFactors200ResponseDataAuthFactorsInner, bool)` - -GetAuthFactorsOk returns a tuple with the AuthFactors field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAuthFactors - -`func (o *GetMFAFactors200ResponseData) SetAuthFactors(v []GetMFAFactors200ResponseDataAuthFactorsInner)` - -SetAuthFactors sets AuthFactors field to given value. - -### HasAuthFactors - -`func (o *GetMFAFactors200ResponseData) HasAuthFactors() bool` - -HasAuthFactors 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/GetMFAFactors200ResponseDataAuthFactorsInner.md b/docs/GetMFAFactors200ResponseDataAuthFactorsInner.md deleted file mode 100644 index 3933643..0000000 --- a/docs/GetMFAFactors200ResponseDataAuthFactorsInner.md +++ /dev/null @@ -1,82 +0,0 @@ -# GetMFAFactors200ResponseDataAuthFactorsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | Pointer to **string** | Official authentication factor name, as it appears to administrators in OneLogin. | [optional] -**FactorId** | Pointer to **int32** | Identifier for the factor which will be used for user enrollment | [optional] - -## Methods - -### NewGetMFAFactors200ResponseDataAuthFactorsInner - -`func NewGetMFAFactors200ResponseDataAuthFactorsInner() *GetMFAFactors200ResponseDataAuthFactorsInner` - -NewGetMFAFactors200ResponseDataAuthFactorsInner instantiates a new GetMFAFactors200ResponseDataAuthFactorsInner 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 - -### NewGetMFAFactors200ResponseDataAuthFactorsInnerWithDefaults - -`func NewGetMFAFactors200ResponseDataAuthFactorsInnerWithDefaults() *GetMFAFactors200ResponseDataAuthFactorsInner` - -NewGetMFAFactors200ResponseDataAuthFactorsInnerWithDefaults instantiates a new GetMFAFactors200ResponseDataAuthFactorsInner 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 *GetMFAFactors200ResponseDataAuthFactorsInner) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *GetMFAFactors200ResponseDataAuthFactorsInner) 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 *GetMFAFactors200ResponseDataAuthFactorsInner) SetName(v string)` - -SetName sets Name field to given value. - -### HasName - -`func (o *GetMFAFactors200ResponseDataAuthFactorsInner) HasName() bool` - -HasName returns a boolean if a field has been set. - -### GetFactorId - -`func (o *GetMFAFactors200ResponseDataAuthFactorsInner) GetFactorId() int32` - -GetFactorId returns the FactorId field if non-nil, zero value otherwise. - -### GetFactorIdOk - -`func (o *GetMFAFactors200ResponseDataAuthFactorsInner) GetFactorIdOk() (*int32, bool)` - -GetFactorIdOk returns a tuple with the FactorId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetFactorId - -`func (o *GetMFAFactors200ResponseDataAuthFactorsInner) SetFactorId(v int32)` - -SetFactorId sets FactorId field to given value. - -### HasFactorId - -`func (o *GetMFAFactors200ResponseDataAuthFactorsInner) HasFactorId() bool` - -HasFactorId 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/GetRateLimit200Response.md b/docs/GetRateLimit200Response.md deleted file mode 100644 index 89ece77..0000000 --- a/docs/GetRateLimit200Response.md +++ /dev/null @@ -1,82 +0,0 @@ -# GetRateLimit200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Status** | Pointer to [**Error**](Error.md) | | [optional] -**Data** | Pointer to [**RateLimit**](RateLimit.md) | | [optional] - -## Methods - -### NewGetRateLimit200Response - -`func NewGetRateLimit200Response() *GetRateLimit200Response` - -NewGetRateLimit200Response instantiates a new GetRateLimit200Response 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 - -### NewGetRateLimit200ResponseWithDefaults - -`func NewGetRateLimit200ResponseWithDefaults() *GetRateLimit200Response` - -NewGetRateLimit200ResponseWithDefaults instantiates a new GetRateLimit200Response 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 - -### GetStatus - -`func (o *GetRateLimit200Response) GetStatus() Error` - -GetStatus returns the Status field if non-nil, zero value otherwise. - -### GetStatusOk - -`func (o *GetRateLimit200Response) GetStatusOk() (*Error, bool)` - -GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStatus - -`func (o *GetRateLimit200Response) SetStatus(v Error)` - -SetStatus sets Status field to given value. - -### HasStatus - -`func (o *GetRateLimit200Response) HasStatus() bool` - -HasStatus returns a boolean if a field has been set. - -### GetData - -`func (o *GetRateLimit200Response) GetData() RateLimit` - -GetData returns the Data field if non-nil, zero value otherwise. - -### GetDataOk - -`func (o *GetRateLimit200Response) GetDataOk() (*RateLimit, bool)` - -GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetData - -`func (o *GetRateLimit200Response) SetData(v RateLimit)` - -SetData sets Data field to given value. - -### HasData - -`func (o *GetRateLimit200Response) HasData() bool` - -HasData 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/GetRiskScore200Response.md b/docs/GetRiskScore200Response.md deleted file mode 100644 index 2594773..0000000 --- a/docs/GetRiskScore200Response.md +++ /dev/null @@ -1,82 +0,0 @@ -# GetRiskScore200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Score** | Pointer to **float32** | A risk score 0 is low risk and 100 is the highest risk level possible. | [optional] -**Triggers** | Pointer to **[]string** | Triggers are indicators of some of the key items that influenced the risk score. | [optional] - -## Methods - -### NewGetRiskScore200Response - -`func NewGetRiskScore200Response() *GetRiskScore200Response` - -NewGetRiskScore200Response instantiates a new GetRiskScore200Response 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 - -### NewGetRiskScore200ResponseWithDefaults - -`func NewGetRiskScore200ResponseWithDefaults() *GetRiskScore200Response` - -NewGetRiskScore200ResponseWithDefaults instantiates a new GetRiskScore200Response 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 - -### GetScore - -`func (o *GetRiskScore200Response) GetScore() float32` - -GetScore returns the Score field if non-nil, zero value otherwise. - -### GetScoreOk - -`func (o *GetRiskScore200Response) GetScoreOk() (*float32, bool)` - -GetScoreOk returns a tuple with the Score field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetScore - -`func (o *GetRiskScore200Response) SetScore(v float32)` - -SetScore sets Score field to given value. - -### HasScore - -`func (o *GetRiskScore200Response) HasScore() bool` - -HasScore returns a boolean if a field has been set. - -### GetTriggers - -`func (o *GetRiskScore200Response) GetTriggers() []string` - -GetTriggers returns the Triggers field if non-nil, zero value otherwise. - -### GetTriggersOk - -`func (o *GetRiskScore200Response) GetTriggersOk() (*[]string, bool)` - -GetTriggersOk returns a tuple with the Triggers field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTriggers - -`func (o *GetRiskScore200Response) SetTriggers(v []string)` - -SetTriggers sets Triggers field to given value. - -### HasTriggers - -`func (o *GetRiskScore200Response) HasTriggers() bool` - -HasTriggers 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/GetRiskScoreRequest.md b/docs/GetRiskScoreRequest.md deleted file mode 100644 index 54623b1..0000000 --- a/docs/GetRiskScoreRequest.md +++ /dev/null @@ -1,197 +0,0 @@ -# GetRiskScoreRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Ip** | **string** | The IP address of the User's request. | -**UserAgent** | **string** | The user agent of the User's request. | -**User** | [**RiskUser**](RiskUser.md) | | -**Source** | Pointer to [**Source**](Source.md) | | [optional] -**Session** | Pointer to [**Session**](Session.md) | | [optional] -**Device** | Pointer to [**RiskDevice**](RiskDevice.md) | | [optional] -**Fp** | Pointer to **string** | Set to the value of the __tdli_fp cookie. | [optional] - -## Methods - -### NewGetRiskScoreRequest - -`func NewGetRiskScoreRequest(ip string, userAgent string, user RiskUser, ) *GetRiskScoreRequest` - -NewGetRiskScoreRequest instantiates a new GetRiskScoreRequest 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 - -### NewGetRiskScoreRequestWithDefaults - -`func NewGetRiskScoreRequestWithDefaults() *GetRiskScoreRequest` - -NewGetRiskScoreRequestWithDefaults instantiates a new GetRiskScoreRequest 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 - -### GetIp - -`func (o *GetRiskScoreRequest) GetIp() string` - -GetIp returns the Ip field if non-nil, zero value otherwise. - -### GetIpOk - -`func (o *GetRiskScoreRequest) GetIpOk() (*string, bool)` - -GetIpOk returns a tuple with the Ip field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIp - -`func (o *GetRiskScoreRequest) SetIp(v string)` - -SetIp sets Ip field to given value. - - -### GetUserAgent - -`func (o *GetRiskScoreRequest) GetUserAgent() string` - -GetUserAgent returns the UserAgent field if non-nil, zero value otherwise. - -### GetUserAgentOk - -`func (o *GetRiskScoreRequest) GetUserAgentOk() (*string, bool)` - -GetUserAgentOk returns a tuple with the UserAgent field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUserAgent - -`func (o *GetRiskScoreRequest) SetUserAgent(v string)` - -SetUserAgent sets UserAgent field to given value. - - -### GetUser - -`func (o *GetRiskScoreRequest) GetUser() RiskUser` - -GetUser returns the User field if non-nil, zero value otherwise. - -### GetUserOk - -`func (o *GetRiskScoreRequest) GetUserOk() (*RiskUser, bool)` - -GetUserOk returns a tuple with the User field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUser - -`func (o *GetRiskScoreRequest) SetUser(v RiskUser)` - -SetUser sets User field to given value. - - -### GetSource - -`func (o *GetRiskScoreRequest) GetSource() Source` - -GetSource returns the Source field if non-nil, zero value otherwise. - -### GetSourceOk - -`func (o *GetRiskScoreRequest) 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 *GetRiskScoreRequest) SetSource(v Source)` - -SetSource sets Source field to given value. - -### HasSource - -`func (o *GetRiskScoreRequest) HasSource() bool` - -HasSource returns a boolean if a field has been set. - -### GetSession - -`func (o *GetRiskScoreRequest) GetSession() Session` - -GetSession returns the Session field if non-nil, zero value otherwise. - -### GetSessionOk - -`func (o *GetRiskScoreRequest) GetSessionOk() (*Session, bool)` - -GetSessionOk returns a tuple with the Session field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSession - -`func (o *GetRiskScoreRequest) SetSession(v Session)` - -SetSession sets Session field to given value. - -### HasSession - -`func (o *GetRiskScoreRequest) HasSession() bool` - -HasSession returns a boolean if a field has been set. - -### GetDevice - -`func (o *GetRiskScoreRequest) GetDevice() RiskDevice` - -GetDevice returns the Device field if non-nil, zero value otherwise. - -### GetDeviceOk - -`func (o *GetRiskScoreRequest) GetDeviceOk() (*RiskDevice, bool)` - -GetDeviceOk returns a tuple with the Device field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDevice - -`func (o *GetRiskScoreRequest) SetDevice(v RiskDevice)` - -SetDevice sets Device field to given value. - -### HasDevice - -`func (o *GetRiskScoreRequest) HasDevice() bool` - -HasDevice returns a boolean if a field has been set. - -### GetFp - -`func (o *GetRiskScoreRequest) GetFp() string` - -GetFp returns the Fp field if non-nil, zero value otherwise. - -### GetFpOk - -`func (o *GetRiskScoreRequest) GetFpOk() (*string, bool)` - -GetFpOk returns a tuple with the Fp field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetFp - -`func (o *GetRiskScoreRequest) SetFp(v string)` - -SetFp sets Fp field to given value. - -### HasFp - -`func (o *GetRiskScoreRequest) HasFp() bool` - -HasFp 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/GetRiskScores200Response.md b/docs/GetRiskScores200Response.md deleted file mode 100644 index 1cf605b..0000000 --- a/docs/GetRiskScores200Response.md +++ /dev/null @@ -1,82 +0,0 @@ -# GetRiskScores200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Scores** | Pointer to [**GetRiskScores200ResponseScores**](GetRiskScores200ResponseScores.md) | | [optional] -**Total** | Pointer to **int32** | | [optional] - -## Methods - -### NewGetRiskScores200Response - -`func NewGetRiskScores200Response() *GetRiskScores200Response` - -NewGetRiskScores200Response instantiates a new GetRiskScores200Response 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 - -### NewGetRiskScores200ResponseWithDefaults - -`func NewGetRiskScores200ResponseWithDefaults() *GetRiskScores200Response` - -NewGetRiskScores200ResponseWithDefaults instantiates a new GetRiskScores200Response 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 - -### GetScores - -`func (o *GetRiskScores200Response) GetScores() GetRiskScores200ResponseScores` - -GetScores returns the Scores field if non-nil, zero value otherwise. - -### GetScoresOk - -`func (o *GetRiskScores200Response) GetScoresOk() (*GetRiskScores200ResponseScores, bool)` - -GetScoresOk returns a tuple with the Scores field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetScores - -`func (o *GetRiskScores200Response) SetScores(v GetRiskScores200ResponseScores)` - -SetScores sets Scores field to given value. - -### HasScores - -`func (o *GetRiskScores200Response) HasScores() bool` - -HasScores returns a boolean if a field has been set. - -### GetTotal - -`func (o *GetRiskScores200Response) GetTotal() int32` - -GetTotal returns the Total field if non-nil, zero value otherwise. - -### GetTotalOk - -`func (o *GetRiskScores200Response) GetTotalOk() (*int32, bool)` - -GetTotalOk returns a tuple with the Total field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTotal - -`func (o *GetRiskScores200Response) SetTotal(v int32)` - -SetTotal sets Total field to given value. - -### HasTotal - -`func (o *GetRiskScores200Response) HasTotal() bool` - -HasTotal 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/GetRiskScores200ResponseScores.md b/docs/GetRiskScores200ResponseScores.md deleted file mode 100644 index 464b4d2..0000000 --- a/docs/GetRiskScores200ResponseScores.md +++ /dev/null @@ -1,160 +0,0 @@ -# GetRiskScores200ResponseScores - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Minimal** | Pointer to **int32** | | [optional] -**Low** | Pointer to **int32** | | [optional] -**Medium** | Pointer to **int32** | | [optional] -**High** | Pointer to **int32** | | [optional] -**VeryHigh** | Pointer to **int32** | | [optional] - -## Methods - -### NewGetRiskScores200ResponseScores - -`func NewGetRiskScores200ResponseScores() *GetRiskScores200ResponseScores` - -NewGetRiskScores200ResponseScores instantiates a new GetRiskScores200ResponseScores 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 - -### NewGetRiskScores200ResponseScoresWithDefaults - -`func NewGetRiskScores200ResponseScoresWithDefaults() *GetRiskScores200ResponseScores` - -NewGetRiskScores200ResponseScoresWithDefaults instantiates a new GetRiskScores200ResponseScores 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 - -### GetMinimal - -`func (o *GetRiskScores200ResponseScores) GetMinimal() int32` - -GetMinimal returns the Minimal field if non-nil, zero value otherwise. - -### GetMinimalOk - -`func (o *GetRiskScores200ResponseScores) GetMinimalOk() (*int32, bool)` - -GetMinimalOk returns a tuple with the Minimal field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMinimal - -`func (o *GetRiskScores200ResponseScores) SetMinimal(v int32)` - -SetMinimal sets Minimal field to given value. - -### HasMinimal - -`func (o *GetRiskScores200ResponseScores) HasMinimal() bool` - -HasMinimal returns a boolean if a field has been set. - -### GetLow - -`func (o *GetRiskScores200ResponseScores) GetLow() int32` - -GetLow returns the Low field if non-nil, zero value otherwise. - -### GetLowOk - -`func (o *GetRiskScores200ResponseScores) GetLowOk() (*int32, bool)` - -GetLowOk returns a tuple with the Low field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLow - -`func (o *GetRiskScores200ResponseScores) SetLow(v int32)` - -SetLow sets Low field to given value. - -### HasLow - -`func (o *GetRiskScores200ResponseScores) HasLow() bool` - -HasLow returns a boolean if a field has been set. - -### GetMedium - -`func (o *GetRiskScores200ResponseScores) GetMedium() int32` - -GetMedium returns the Medium field if non-nil, zero value otherwise. - -### GetMediumOk - -`func (o *GetRiskScores200ResponseScores) GetMediumOk() (*int32, bool)` - -GetMediumOk returns a tuple with the Medium field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMedium - -`func (o *GetRiskScores200ResponseScores) SetMedium(v int32)` - -SetMedium sets Medium field to given value. - -### HasMedium - -`func (o *GetRiskScores200ResponseScores) HasMedium() bool` - -HasMedium returns a boolean if a field has been set. - -### GetHigh - -`func (o *GetRiskScores200ResponseScores) GetHigh() int32` - -GetHigh returns the High field if non-nil, zero value otherwise. - -### GetHighOk - -`func (o *GetRiskScores200ResponseScores) GetHighOk() (*int32, bool)` - -GetHighOk returns a tuple with the High field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetHigh - -`func (o *GetRiskScores200ResponseScores) SetHigh(v int32)` - -SetHigh sets High field to given value. - -### HasHigh - -`func (o *GetRiskScores200ResponseScores) HasHigh() bool` - -HasHigh returns a boolean if a field has been set. - -### GetVeryHigh - -`func (o *GetRiskScores200ResponseScores) GetVeryHigh() int32` - -GetVeryHigh returns the VeryHigh field if non-nil, zero value otherwise. - -### GetVeryHighOk - -`func (o *GetRiskScores200ResponseScores) GetVeryHighOk() (*int32, bool)` - -GetVeryHighOk returns a tuple with the VeryHigh field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetVeryHigh - -`func (o *GetRiskScores200ResponseScores) SetVeryHigh(v int32)` - -SetVeryHigh sets VeryHigh field to given value. - -### HasVeryHigh - -`func (o *GetRiskScores200ResponseScores) HasVeryHigh() bool` - -HasVeryHigh 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/GetRoleApps200ResponseInner.md b/docs/GetRoleApps200ResponseInner.md deleted file mode 100644 index e8eacdb..0000000 --- a/docs/GetRoleApps200ResponseInner.md +++ /dev/null @@ -1,108 +0,0 @@ -# GetRoleApps200ResponseInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | Pointer to **int32** | app id | [optional] -**Name** | Pointer to **string** | app name | [optional] -**IconUrl** | Pointer to **string** | url of Icon | [optional] - -## Methods - -### NewGetRoleApps200ResponseInner - -`func NewGetRoleApps200ResponseInner() *GetRoleApps200ResponseInner` - -NewGetRoleApps200ResponseInner instantiates a new GetRoleApps200ResponseInner 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 - -### NewGetRoleApps200ResponseInnerWithDefaults - -`func NewGetRoleApps200ResponseInnerWithDefaults() *GetRoleApps200ResponseInner` - -NewGetRoleApps200ResponseInnerWithDefaults instantiates a new GetRoleApps200ResponseInner 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 - -### GetId - -`func (o *GetRoleApps200ResponseInner) GetId() int32` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *GetRoleApps200ResponseInner) GetIdOk() (*int32, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *GetRoleApps200ResponseInner) SetId(v int32)` - -SetId sets Id field to given value. - -### HasId - -`func (o *GetRoleApps200ResponseInner) HasId() bool` - -HasId returns a boolean if a field has been set. - -### GetName - -`func (o *GetRoleApps200ResponseInner) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *GetRoleApps200ResponseInner) 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 *GetRoleApps200ResponseInner) SetName(v string)` - -SetName sets Name field to given value. - -### HasName - -`func (o *GetRoleApps200ResponseInner) HasName() bool` - -HasName returns a boolean if a field has been set. - -### GetIconUrl - -`func (o *GetRoleApps200ResponseInner) GetIconUrl() string` - -GetIconUrl returns the IconUrl field if non-nil, zero value otherwise. - -### GetIconUrlOk - -`func (o *GetRoleApps200ResponseInner) GetIconUrlOk() (*string, bool)` - -GetIconUrlOk returns a tuple with the IconUrl field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIconUrl - -`func (o *GetRoleApps200ResponseInner) SetIconUrl(v string)` - -SetIconUrl sets IconUrl field to given value. - -### HasIconUrl - -`func (o *GetRoleApps200ResponseInner) HasIconUrl() bool` - -HasIconUrl 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/GetRoleById200Response.md b/docs/GetRoleById200Response.md deleted file mode 100644 index 157c4ce..0000000 --- a/docs/GetRoleById200Response.md +++ /dev/null @@ -1,82 +0,0 @@ -# GetRoleById200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Status** | Pointer to [**Error**](Error.md) | | [optional] -**Data** | Pointer to [**[]GetRoleById200ResponseDataInner**](GetRoleById200ResponseDataInner.md) | | [optional] - -## Methods - -### NewGetRoleById200Response - -`func NewGetRoleById200Response() *GetRoleById200Response` - -NewGetRoleById200Response instantiates a new GetRoleById200Response 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 - -### NewGetRoleById200ResponseWithDefaults - -`func NewGetRoleById200ResponseWithDefaults() *GetRoleById200Response` - -NewGetRoleById200ResponseWithDefaults instantiates a new GetRoleById200Response 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 - -### GetStatus - -`func (o *GetRoleById200Response) GetStatus() Error` - -GetStatus returns the Status field if non-nil, zero value otherwise. - -### GetStatusOk - -`func (o *GetRoleById200Response) GetStatusOk() (*Error, bool)` - -GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStatus - -`func (o *GetRoleById200Response) SetStatus(v Error)` - -SetStatus sets Status field to given value. - -### HasStatus - -`func (o *GetRoleById200Response) HasStatus() bool` - -HasStatus returns a boolean if a field has been set. - -### GetData - -`func (o *GetRoleById200Response) GetData() []GetRoleById200ResponseDataInner` - -GetData returns the Data field if non-nil, zero value otherwise. - -### GetDataOk - -`func (o *GetRoleById200Response) GetDataOk() (*[]GetRoleById200ResponseDataInner, bool)` - -GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetData - -`func (o *GetRoleById200Response) SetData(v []GetRoleById200ResponseDataInner)` - -SetData sets Data field to given value. - -### HasData - -`func (o *GetRoleById200Response) HasData() bool` - -HasData 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/GetRoleById200ResponseDataInner.md b/docs/GetRoleById200ResponseDataInner.md deleted file mode 100644 index b9d7220..0000000 --- a/docs/GetRoleById200ResponseDataInner.md +++ /dev/null @@ -1,82 +0,0 @@ -# GetRoleById200ResponseDataInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | Pointer to **int32** | role's unique ID in Onelogin | [optional] -**Name** | Pointer to **string** | Role name | [optional] - -## Methods - -### NewGetRoleById200ResponseDataInner - -`func NewGetRoleById200ResponseDataInner() *GetRoleById200ResponseDataInner` - -NewGetRoleById200ResponseDataInner instantiates a new GetRoleById200ResponseDataInner 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 - -### NewGetRoleById200ResponseDataInnerWithDefaults - -`func NewGetRoleById200ResponseDataInnerWithDefaults() *GetRoleById200ResponseDataInner` - -NewGetRoleById200ResponseDataInnerWithDefaults instantiates a new GetRoleById200ResponseDataInner 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 - -### GetId - -`func (o *GetRoleById200ResponseDataInner) GetId() int32` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *GetRoleById200ResponseDataInner) GetIdOk() (*int32, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *GetRoleById200ResponseDataInner) SetId(v int32)` - -SetId sets Id field to given value. - -### HasId - -`func (o *GetRoleById200ResponseDataInner) HasId() bool` - -HasId returns a boolean if a field has been set. - -### GetName - -`func (o *GetRoleById200ResponseDataInner) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *GetRoleById200ResponseDataInner) 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 *GetRoleById200ResponseDataInner) SetName(v string)` - -SetName sets Name field to given value. - -### HasName - -`func (o *GetRoleById200ResponseDataInner) HasName() bool` - -HasName 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/GetRoleByName200Response.md b/docs/GetRoleByName200Response.md deleted file mode 100644 index 7da2b83..0000000 --- a/docs/GetRoleByName200Response.md +++ /dev/null @@ -1,108 +0,0 @@ -# GetRoleByName200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Status** | Pointer to [**Error**](Error.md) | | [optional] -**Pagination** | Pointer to [**GetRoleByName200ResponsePagination**](GetRoleByName200ResponsePagination.md) | | [optional] -**Data** | Pointer to [**[]GetRoleByName200ResponseDataInner**](GetRoleByName200ResponseDataInner.md) | | [optional] - -## Methods - -### NewGetRoleByName200Response - -`func NewGetRoleByName200Response() *GetRoleByName200Response` - -NewGetRoleByName200Response instantiates a new GetRoleByName200Response 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 - -### NewGetRoleByName200ResponseWithDefaults - -`func NewGetRoleByName200ResponseWithDefaults() *GetRoleByName200Response` - -NewGetRoleByName200ResponseWithDefaults instantiates a new GetRoleByName200Response 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 - -### GetStatus - -`func (o *GetRoleByName200Response) GetStatus() Error` - -GetStatus returns the Status field if non-nil, zero value otherwise. - -### GetStatusOk - -`func (o *GetRoleByName200Response) GetStatusOk() (*Error, bool)` - -GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStatus - -`func (o *GetRoleByName200Response) SetStatus(v Error)` - -SetStatus sets Status field to given value. - -### HasStatus - -`func (o *GetRoleByName200Response) HasStatus() bool` - -HasStatus returns a boolean if a field has been set. - -### GetPagination - -`func (o *GetRoleByName200Response) GetPagination() GetRoleByName200ResponsePagination` - -GetPagination returns the Pagination field if non-nil, zero value otherwise. - -### GetPaginationOk - -`func (o *GetRoleByName200Response) GetPaginationOk() (*GetRoleByName200ResponsePagination, bool)` - -GetPaginationOk returns a tuple with the Pagination field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPagination - -`func (o *GetRoleByName200Response) SetPagination(v GetRoleByName200ResponsePagination)` - -SetPagination sets Pagination field to given value. - -### HasPagination - -`func (o *GetRoleByName200Response) HasPagination() bool` - -HasPagination returns a boolean if a field has been set. - -### GetData - -`func (o *GetRoleByName200Response) GetData() []GetRoleByName200ResponseDataInner` - -GetData returns the Data field if non-nil, zero value otherwise. - -### GetDataOk - -`func (o *GetRoleByName200Response) GetDataOk() (*[]GetRoleByName200ResponseDataInner, bool)` - -GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetData - -`func (o *GetRoleByName200Response) SetData(v []GetRoleByName200ResponseDataInner)` - -SetData sets Data field to given value. - -### HasData - -`func (o *GetRoleByName200Response) HasData() bool` - -HasData 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/GetRoleByName200ResponseDataInner.md b/docs/GetRoleByName200ResponseDataInner.md deleted file mode 100644 index b05659d..0000000 --- a/docs/GetRoleByName200ResponseDataInner.md +++ /dev/null @@ -1,82 +0,0 @@ -# GetRoleByName200ResponseDataInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | Pointer to **int32** | Role ID | [optional] -**Name** | Pointer to **string** | Role Name | [optional] - -## Methods - -### NewGetRoleByName200ResponseDataInner - -`func NewGetRoleByName200ResponseDataInner() *GetRoleByName200ResponseDataInner` - -NewGetRoleByName200ResponseDataInner instantiates a new GetRoleByName200ResponseDataInner 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 - -### NewGetRoleByName200ResponseDataInnerWithDefaults - -`func NewGetRoleByName200ResponseDataInnerWithDefaults() *GetRoleByName200ResponseDataInner` - -NewGetRoleByName200ResponseDataInnerWithDefaults instantiates a new GetRoleByName200ResponseDataInner 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 - -### GetId - -`func (o *GetRoleByName200ResponseDataInner) GetId() int32` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *GetRoleByName200ResponseDataInner) GetIdOk() (*int32, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *GetRoleByName200ResponseDataInner) SetId(v int32)` - -SetId sets Id field to given value. - -### HasId - -`func (o *GetRoleByName200ResponseDataInner) HasId() bool` - -HasId returns a boolean if a field has been set. - -### GetName - -`func (o *GetRoleByName200ResponseDataInner) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *GetRoleByName200ResponseDataInner) 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 *GetRoleByName200ResponseDataInner) SetName(v string)` - -SetName sets Name field to given value. - -### HasName - -`func (o *GetRoleByName200ResponseDataInner) HasName() bool` - -HasName 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/GetRoleByName200ResponsePagination.md b/docs/GetRoleByName200ResponsePagination.md deleted file mode 100644 index 1288acd..0000000 --- a/docs/GetRoleByName200ResponsePagination.md +++ /dev/null @@ -1,134 +0,0 @@ -# GetRoleByName200ResponsePagination - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**AfterCursor** | Pointer to **string** | | [optional] -**BeforeCursor** | Pointer to **string** | | [optional] -**NextLink** | Pointer to **string** | | [optional] -**PreviousLink** | Pointer to **string** | | [optional] - -## Methods - -### NewGetRoleByName200ResponsePagination - -`func NewGetRoleByName200ResponsePagination() *GetRoleByName200ResponsePagination` - -NewGetRoleByName200ResponsePagination instantiates a new GetRoleByName200ResponsePagination 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 - -### NewGetRoleByName200ResponsePaginationWithDefaults - -`func NewGetRoleByName200ResponsePaginationWithDefaults() *GetRoleByName200ResponsePagination` - -NewGetRoleByName200ResponsePaginationWithDefaults instantiates a new GetRoleByName200ResponsePagination 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 - -### GetAfterCursor - -`func (o *GetRoleByName200ResponsePagination) GetAfterCursor() string` - -GetAfterCursor returns the AfterCursor field if non-nil, zero value otherwise. - -### GetAfterCursorOk - -`func (o *GetRoleByName200ResponsePagination) GetAfterCursorOk() (*string, bool)` - -GetAfterCursorOk returns a tuple with the AfterCursor field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAfterCursor - -`func (o *GetRoleByName200ResponsePagination) SetAfterCursor(v string)` - -SetAfterCursor sets AfterCursor field to given value. - -### HasAfterCursor - -`func (o *GetRoleByName200ResponsePagination) HasAfterCursor() bool` - -HasAfterCursor returns a boolean if a field has been set. - -### GetBeforeCursor - -`func (o *GetRoleByName200ResponsePagination) GetBeforeCursor() string` - -GetBeforeCursor returns the BeforeCursor field if non-nil, zero value otherwise. - -### GetBeforeCursorOk - -`func (o *GetRoleByName200ResponsePagination) GetBeforeCursorOk() (*string, bool)` - -GetBeforeCursorOk returns a tuple with the BeforeCursor field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetBeforeCursor - -`func (o *GetRoleByName200ResponsePagination) SetBeforeCursor(v string)` - -SetBeforeCursor sets BeforeCursor field to given value. - -### HasBeforeCursor - -`func (o *GetRoleByName200ResponsePagination) HasBeforeCursor() bool` - -HasBeforeCursor returns a boolean if a field has been set. - -### GetNextLink - -`func (o *GetRoleByName200ResponsePagination) GetNextLink() string` - -GetNextLink returns the NextLink field if non-nil, zero value otherwise. - -### GetNextLinkOk - -`func (o *GetRoleByName200ResponsePagination) GetNextLinkOk() (*string, bool)` - -GetNextLinkOk returns a tuple with the NextLink field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetNextLink - -`func (o *GetRoleByName200ResponsePagination) SetNextLink(v string)` - -SetNextLink sets NextLink field to given value. - -### HasNextLink - -`func (o *GetRoleByName200ResponsePagination) HasNextLink() bool` - -HasNextLink returns a boolean if a field has been set. - -### GetPreviousLink - -`func (o *GetRoleByName200ResponsePagination) GetPreviousLink() string` - -GetPreviousLink returns the PreviousLink field if non-nil, zero value otherwise. - -### GetPreviousLinkOk - -`func (o *GetRoleByName200ResponsePagination) GetPreviousLinkOk() (*string, bool)` - -GetPreviousLinkOk returns a tuple with the PreviousLink field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPreviousLink - -`func (o *GetRoleByName200ResponsePagination) SetPreviousLink(v string)` - -SetPreviousLink sets PreviousLink field to given value. - -### HasPreviousLink - -`func (o *GetRoleByName200ResponsePagination) HasPreviousLink() bool` - -HasPreviousLink 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/GetUserApps200ResponseInner.md b/docs/GetUserApps200ResponseInner.md deleted file mode 100644 index 6290706..0000000 --- a/docs/GetUserApps200ResponseInner.md +++ /dev/null @@ -1,238 +0,0 @@ -# GetUserApps200ResponseInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | Pointer to **int32** | The App ID | [optional] -**IconUrl** | Pointer to **string** | A url for the icon that represents the app in the OneLogin portal | [optional] -**Extension** | Pointer to **bool** | Boolean that indicates if the OneLogin browser extension is required to launch this app. | [optional] -**LoginId** | Pointer to **int32** | Unqiue identifier for this user and app combination. | [optional] -**Name** | Pointer to **string** | The name of the app. | [optional] -**ProvisioningStatus** | Pointer to **string** | | [optional] -**ProvisioningState** | Pointer to **string** | If provisioning is enabled this indicates the state of provisioning for the given user. | [optional] -**ProvisioningEnabled** | Pointer to **bool** | Indicates if provisioning is enabled for this app. | [optional] - -## Methods - -### NewGetUserApps200ResponseInner - -`func NewGetUserApps200ResponseInner() *GetUserApps200ResponseInner` - -NewGetUserApps200ResponseInner instantiates a new GetUserApps200ResponseInner 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 - -### NewGetUserApps200ResponseInnerWithDefaults - -`func NewGetUserApps200ResponseInnerWithDefaults() *GetUserApps200ResponseInner` - -NewGetUserApps200ResponseInnerWithDefaults instantiates a new GetUserApps200ResponseInner 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 - -### GetId - -`func (o *GetUserApps200ResponseInner) GetId() int32` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *GetUserApps200ResponseInner) GetIdOk() (*int32, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *GetUserApps200ResponseInner) SetId(v int32)` - -SetId sets Id field to given value. - -### HasId - -`func (o *GetUserApps200ResponseInner) HasId() bool` - -HasId returns a boolean if a field has been set. - -### GetIconUrl - -`func (o *GetUserApps200ResponseInner) GetIconUrl() string` - -GetIconUrl returns the IconUrl field if non-nil, zero value otherwise. - -### GetIconUrlOk - -`func (o *GetUserApps200ResponseInner) GetIconUrlOk() (*string, bool)` - -GetIconUrlOk returns a tuple with the IconUrl field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIconUrl - -`func (o *GetUserApps200ResponseInner) SetIconUrl(v string)` - -SetIconUrl sets IconUrl field to given value. - -### HasIconUrl - -`func (o *GetUserApps200ResponseInner) HasIconUrl() bool` - -HasIconUrl returns a boolean if a field has been set. - -### GetExtension - -`func (o *GetUserApps200ResponseInner) GetExtension() bool` - -GetExtension returns the Extension field if non-nil, zero value otherwise. - -### GetExtensionOk - -`func (o *GetUserApps200ResponseInner) GetExtensionOk() (*bool, bool)` - -GetExtensionOk returns a tuple with the Extension field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetExtension - -`func (o *GetUserApps200ResponseInner) SetExtension(v bool)` - -SetExtension sets Extension field to given value. - -### HasExtension - -`func (o *GetUserApps200ResponseInner) HasExtension() bool` - -HasExtension returns a boolean if a field has been set. - -### GetLoginId - -`func (o *GetUserApps200ResponseInner) GetLoginId() int32` - -GetLoginId returns the LoginId field if non-nil, zero value otherwise. - -### GetLoginIdOk - -`func (o *GetUserApps200ResponseInner) GetLoginIdOk() (*int32, bool)` - -GetLoginIdOk returns a tuple with the LoginId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLoginId - -`func (o *GetUserApps200ResponseInner) SetLoginId(v int32)` - -SetLoginId sets LoginId field to given value. - -### HasLoginId - -`func (o *GetUserApps200ResponseInner) HasLoginId() bool` - -HasLoginId returns a boolean if a field has been set. - -### GetName - -`func (o *GetUserApps200ResponseInner) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *GetUserApps200ResponseInner) 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 *GetUserApps200ResponseInner) SetName(v string)` - -SetName sets Name field to given value. - -### HasName - -`func (o *GetUserApps200ResponseInner) HasName() bool` - -HasName returns a boolean if a field has been set. - -### GetProvisioningStatus - -`func (o *GetUserApps200ResponseInner) GetProvisioningStatus() string` - -GetProvisioningStatus returns the ProvisioningStatus field if non-nil, zero value otherwise. - -### GetProvisioningStatusOk - -`func (o *GetUserApps200ResponseInner) GetProvisioningStatusOk() (*string, bool)` - -GetProvisioningStatusOk returns a tuple with the ProvisioningStatus field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetProvisioningStatus - -`func (o *GetUserApps200ResponseInner) SetProvisioningStatus(v string)` - -SetProvisioningStatus sets ProvisioningStatus field to given value. - -### HasProvisioningStatus - -`func (o *GetUserApps200ResponseInner) HasProvisioningStatus() bool` - -HasProvisioningStatus returns a boolean if a field has been set. - -### GetProvisioningState - -`func (o *GetUserApps200ResponseInner) GetProvisioningState() string` - -GetProvisioningState returns the ProvisioningState field if non-nil, zero value otherwise. - -### GetProvisioningStateOk - -`func (o *GetUserApps200ResponseInner) GetProvisioningStateOk() (*string, bool)` - -GetProvisioningStateOk returns a tuple with the ProvisioningState field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetProvisioningState - -`func (o *GetUserApps200ResponseInner) SetProvisioningState(v string)` - -SetProvisioningState sets ProvisioningState field to given value. - -### HasProvisioningState - -`func (o *GetUserApps200ResponseInner) HasProvisioningState() bool` - -HasProvisioningState returns a boolean if a field has been set. - -### GetProvisioningEnabled - -`func (o *GetUserApps200ResponseInner) GetProvisioningEnabled() bool` - -GetProvisioningEnabled returns the ProvisioningEnabled field if non-nil, zero value otherwise. - -### GetProvisioningEnabledOk - -`func (o *GetUserApps200ResponseInner) GetProvisioningEnabledOk() (*bool, bool)` - -GetProvisioningEnabledOk returns a tuple with the ProvisioningEnabled field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetProvisioningEnabled - -`func (o *GetUserApps200ResponseInner) SetProvisioningEnabled(v bool)` - -SetProvisioningEnabled sets ProvisioningEnabled field to given value. - -### HasProvisioningEnabled - -`func (o *GetUserApps200ResponseInner) HasProvisioningEnabled() bool` - -HasProvisioningEnabled 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/GetUserRoles200Response.md b/docs/GetUserRoles200Response.md deleted file mode 100644 index 052c203..0000000 --- a/docs/GetUserRoles200Response.md +++ /dev/null @@ -1,82 +0,0 @@ -# GetUserRoles200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Status** | Pointer to [**Error**](Error.md) | | [optional] -**Data** | Pointer to **[]int32** | List of Role IDs that are assigned to the User | [optional] - -## Methods - -### NewGetUserRoles200Response - -`func NewGetUserRoles200Response() *GetUserRoles200Response` - -NewGetUserRoles200Response instantiates a new GetUserRoles200Response 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 - -### NewGetUserRoles200ResponseWithDefaults - -`func NewGetUserRoles200ResponseWithDefaults() *GetUserRoles200Response` - -NewGetUserRoles200ResponseWithDefaults instantiates a new GetUserRoles200Response 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 - -### GetStatus - -`func (o *GetUserRoles200Response) GetStatus() Error` - -GetStatus returns the Status field if non-nil, zero value otherwise. - -### GetStatusOk - -`func (o *GetUserRoles200Response) GetStatusOk() (*Error, bool)` - -GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStatus - -`func (o *GetUserRoles200Response) SetStatus(v Error)` - -SetStatus sets Status field to given value. - -### HasStatus - -`func (o *GetUserRoles200Response) HasStatus() bool` - -HasStatus returns a boolean if a field has been set. - -### GetData - -`func (o *GetUserRoles200Response) GetData() []int32` - -GetData returns the Data field if non-nil, zero value otherwise. - -### GetDataOk - -`func (o *GetUserRoles200Response) GetDataOk() (*[]int32, bool)` - -GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetData - -`func (o *GetUserRoles200Response) SetData(v []int32)` - -SetData sets Data field to given value. - -### HasData - -`func (o *GetUserRoles200Response) HasData() bool` - -HasData 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/GetUserVerification200Response.md b/docs/GetUserVerification200Response.md deleted file mode 100644 index bebb962..0000000 --- a/docs/GetUserVerification200Response.md +++ /dev/null @@ -1,108 +0,0 @@ -# GetUserVerification200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | Pointer to **string** | registration identifier | [optional] -**Status** | Pointer to **string** | pending = has not been completed. accepted registration has successfully completed, rejected user has denied the MFA attempt or incorrectly provided the OneLogin Voice OTP code. | [optional] -**DeviceId** | Pointer to **string** | Device Id to be used with verify factor | [optional] - -## Methods - -### NewGetUserVerification200Response - -`func NewGetUserVerification200Response() *GetUserVerification200Response` - -NewGetUserVerification200Response instantiates a new GetUserVerification200Response 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 - -### NewGetUserVerification200ResponseWithDefaults - -`func NewGetUserVerification200ResponseWithDefaults() *GetUserVerification200Response` - -NewGetUserVerification200ResponseWithDefaults instantiates a new GetUserVerification200Response 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 - -### GetId - -`func (o *GetUserVerification200Response) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *GetUserVerification200Response) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *GetUserVerification200Response) SetId(v string)` - -SetId sets Id field to given value. - -### HasId - -`func (o *GetUserVerification200Response) HasId() bool` - -HasId returns a boolean if a field has been set. - -### GetStatus - -`func (o *GetUserVerification200Response) GetStatus() string` - -GetStatus returns the Status field if non-nil, zero value otherwise. - -### GetStatusOk - -`func (o *GetUserVerification200Response) GetStatusOk() (*string, bool)` - -GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStatus - -`func (o *GetUserVerification200Response) SetStatus(v string)` - -SetStatus sets Status field to given value. - -### HasStatus - -`func (o *GetUserVerification200Response) HasStatus() bool` - -HasStatus returns a boolean if a field has been set. - -### GetDeviceId - -`func (o *GetUserVerification200Response) GetDeviceId() string` - -GetDeviceId returns the DeviceId field if non-nil, zero value otherwise. - -### GetDeviceIdOk - -`func (o *GetUserVerification200Response) GetDeviceIdOk() (*string, bool)` - -GetDeviceIdOk returns a tuple with the DeviceId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDeviceId - -`func (o *GetUserVerification200Response) SetDeviceId(v string)` - -SetDeviceId sets DeviceId field to given value. - -### HasDeviceId - -`func (o *GetUserVerification200Response) HasDeviceId() bool` - -HasDeviceId 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/Group.md b/docs/Group.md deleted file mode 100644 index 6373a3e..0000000 --- a/docs/Group.md +++ /dev/null @@ -1,108 +0,0 @@ -# Group - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | Pointer to **int32** | Group's unique Onelogin ID | [optional] -**Name** | Pointer to **string** | Group name | [optional] -**Reference** | Pointer to **string** | Deprecated. Will always show the attribute nil=\"true\". | [optional] - -## Methods - -### NewGroup - -`func NewGroup() *Group` - -NewGroup instantiates a new Group 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 - -### NewGroupWithDefaults - -`func NewGroupWithDefaults() *Group` - -NewGroupWithDefaults instantiates a new Group 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 - -### GetId - -`func (o *Group) GetId() int32` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *Group) GetIdOk() (*int32, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *Group) SetId(v int32)` - -SetId sets Id field to given value. - -### HasId - -`func (o *Group) HasId() bool` - -HasId returns a boolean if a field has been set. - -### GetName - -`func (o *Group) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *Group) 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 *Group) SetName(v string)` - -SetName sets Name field to given value. - -### HasName - -`func (o *Group) HasName() bool` - -HasName returns a boolean if a field has been set. - -### GetReference - -`func (o *Group) GetReference() string` - -GetReference returns the Reference field if non-nil, zero value otherwise. - -### GetReferenceOk - -`func (o *Group) GetReferenceOk() (*string, bool)` - -GetReferenceOk returns a tuple with the Reference field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetReference - -`func (o *Group) SetReference(v string)` - -SetReference sets Reference field to given value. - -### HasReference - -`func (o *Group) HasReference() bool` - -HasReference 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/GroupsApi.md b/docs/GroupsApi.md deleted file mode 100644 index a71eb5f..0000000 --- a/docs/GroupsApi.md +++ /dev/null @@ -1,141 +0,0 @@ -# \GroupsApi - -All URIs are relative to *https://your-api-subdomain.onelogin.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetGroupById**](GroupsApi.md#GetGroupById) | **Get** /api/1/groups/{group_id} | Get Group by ID -[**GetGroups**](GroupsApi.md#GetGroups) | **Get** /api/1/groups | Get Groups - - - -## GetGroupById - -> GetGroups200Response GetGroupById(ctx, groupId).Execute() - -Get Group by ID - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - groupId := "groupId_example" // string | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.GroupsApi.GetGroupById(context.Background(), groupId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `GroupsApi.GetGroupById``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetGroupById`: GetGroups200Response - fmt.Fprintf(os.Stdout, "Response from `GroupsApi.GetGroupById`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**groupId** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetGroupByIdRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**GetGroups200Response**](GetGroups200Response.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetGroups - -> GetGroups200Response GetGroups(ctx).Execute() - -Get Groups - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.GroupsApi.GetGroups(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `GroupsApi.GetGroups``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetGroups`: GetGroups200Response - fmt.Fprintf(os.Stdout, "Response from `GroupsApi.GetGroups`: %v\n", resp) -} -``` - -### Path Parameters - -This endpoint does not need any parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetGroupsRequest struct via the builder pattern - - -### Return type - -[**GetGroups200Response**](GetGroups200Response.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/docs/Hook.md b/docs/Hook.md deleted file mode 100644 index 3465d45..0000000 --- a/docs/Hook.md +++ /dev/null @@ -1,380 +0,0 @@ -# Hook - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | Pointer to **string** | The Hook unique ID in OneLogin. | [optional] -**Type** | **string** | A string describing the type of hook. e.g. `pre-authentication` | -**Disabled** | **bool** | Boolean to enable or disable the hook. Disabled hooks will not run. | [default to true] -**Timeout** | **int32** | The number of seconds to allow the hook function to run before before timing out. Maximum timeout varies based on the type of hook. | [default to 1] -**EnvVars** | **[]string** | Environment Variable objects that will be available via process.env.ENV_VAR_NAME in the hook code. | -**Runtime** | **string** | The Smart Hooks supported Node.js version to execute this hook with. | -**Retries** | **int32** | Number of retries if execution fails. | [default to 0] -**Packages** | **map[string]string** | An object containing NPM packages that are bundled with the hook function. | -**Function** | **string** | A base64 encoded string containing the javascript function code. | -**ContextVersion** | Pointer to **string** | The semantic version of the content that will be injected into this hook. | [optional] -**Status** | Pointer to **string** | String describing the state of the hook function. When a hook is ready and disabled is false it will be executed. | [optional] -**Options** | Pointer to [**HookOptions**](HookOptions.md) | | [optional] -**Conditions** | Pointer to [**[]Condition**](Condition.md) | An array of objects that let you limit the execution of a hook to users in specific roles. | [optional] -**CreatedAt** | Pointer to **string** | ISO8601 format date that they hook function was created. | [optional] -**UpdatedAt** | Pointer to **string** | ISO8601 format date that they hook function was last updated. | [optional] - -## Methods - -### NewHook - -`func NewHook(type_ string, disabled bool, timeout int32, envVars []string, runtime string, retries int32, packages map[string]string, function string, ) *Hook` - -NewHook instantiates a new Hook 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 - -### NewHookWithDefaults - -`func NewHookWithDefaults() *Hook` - -NewHookWithDefaults instantiates a new Hook 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 - -### GetId - -`func (o *Hook) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *Hook) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *Hook) SetId(v string)` - -SetId sets Id field to given value. - -### HasId - -`func (o *Hook) HasId() bool` - -HasId returns a boolean if a field has been set. - -### GetType - -`func (o *Hook) GetType() string` - -GetType returns the Type field if non-nil, zero value otherwise. - -### GetTypeOk - -`func (o *Hook) GetTypeOk() (*string, 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 *Hook) SetType(v string)` - -SetType sets Type field to given value. - - -### GetDisabled - -`func (o *Hook) GetDisabled() bool` - -GetDisabled returns the Disabled field if non-nil, zero value otherwise. - -### GetDisabledOk - -`func (o *Hook) GetDisabledOk() (*bool, bool)` - -GetDisabledOk returns a tuple with the Disabled field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDisabled - -`func (o *Hook) SetDisabled(v bool)` - -SetDisabled sets Disabled field to given value. - - -### GetTimeout - -`func (o *Hook) GetTimeout() int32` - -GetTimeout returns the Timeout field if non-nil, zero value otherwise. - -### GetTimeoutOk - -`func (o *Hook) GetTimeoutOk() (*int32, bool)` - -GetTimeoutOk returns a tuple with the Timeout field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTimeout - -`func (o *Hook) SetTimeout(v int32)` - -SetTimeout sets Timeout field to given value. - - -### GetEnvVars - -`func (o *Hook) GetEnvVars() []string` - -GetEnvVars returns the EnvVars field if non-nil, zero value otherwise. - -### GetEnvVarsOk - -`func (o *Hook) GetEnvVarsOk() (*[]string, bool)` - -GetEnvVarsOk returns a tuple with the EnvVars field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetEnvVars - -`func (o *Hook) SetEnvVars(v []string)` - -SetEnvVars sets EnvVars field to given value. - - -### GetRuntime - -`func (o *Hook) GetRuntime() string` - -GetRuntime returns the Runtime field if non-nil, zero value otherwise. - -### GetRuntimeOk - -`func (o *Hook) GetRuntimeOk() (*string, bool)` - -GetRuntimeOk returns a tuple with the Runtime field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRuntime - -`func (o *Hook) SetRuntime(v string)` - -SetRuntime sets Runtime field to given value. - - -### GetRetries - -`func (o *Hook) GetRetries() int32` - -GetRetries returns the Retries field if non-nil, zero value otherwise. - -### GetRetriesOk - -`func (o *Hook) GetRetriesOk() (*int32, bool)` - -GetRetriesOk returns a tuple with the Retries field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRetries - -`func (o *Hook) SetRetries(v int32)` - -SetRetries sets Retries field to given value. - - -### GetPackages - -`func (o *Hook) GetPackages() map[string]string` - -GetPackages returns the Packages field if non-nil, zero value otherwise. - -### GetPackagesOk - -`func (o *Hook) GetPackagesOk() (*map[string]string, bool)` - -GetPackagesOk returns a tuple with the Packages field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPackages - -`func (o *Hook) SetPackages(v map[string]string)` - -SetPackages sets Packages field to given value. - - -### GetFunction - -`func (o *Hook) GetFunction() string` - -GetFunction returns the Function field if non-nil, zero value otherwise. - -### GetFunctionOk - -`func (o *Hook) GetFunctionOk() (*string, bool)` - -GetFunctionOk returns a tuple with the Function field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetFunction - -`func (o *Hook) SetFunction(v string)` - -SetFunction sets Function field to given value. - - -### GetContextVersion - -`func (o *Hook) GetContextVersion() string` - -GetContextVersion returns the ContextVersion field if non-nil, zero value otherwise. - -### GetContextVersionOk - -`func (o *Hook) GetContextVersionOk() (*string, bool)` - -GetContextVersionOk returns a tuple with the ContextVersion field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetContextVersion - -`func (o *Hook) SetContextVersion(v string)` - -SetContextVersion sets ContextVersion field to given value. - -### HasContextVersion - -`func (o *Hook) HasContextVersion() bool` - -HasContextVersion returns a boolean if a field has been set. - -### GetStatus - -`func (o *Hook) GetStatus() string` - -GetStatus returns the Status field if non-nil, zero value otherwise. - -### GetStatusOk - -`func (o *Hook) GetStatusOk() (*string, bool)` - -GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStatus - -`func (o *Hook) SetStatus(v string)` - -SetStatus sets Status field to given value. - -### HasStatus - -`func (o *Hook) HasStatus() bool` - -HasStatus returns a boolean if a field has been set. - -### GetOptions - -`func (o *Hook) GetOptions() HookOptions` - -GetOptions returns the Options field if non-nil, zero value otherwise. - -### GetOptionsOk - -`func (o *Hook) GetOptionsOk() (*HookOptions, bool)` - -GetOptionsOk returns a tuple with the Options field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetOptions - -`func (o *Hook) SetOptions(v HookOptions)` - -SetOptions sets Options field to given value. - -### HasOptions - -`func (o *Hook) HasOptions() bool` - -HasOptions returns a boolean if a field has been set. - -### GetConditions - -`func (o *Hook) GetConditions() []Condition` - -GetConditions returns the Conditions field if non-nil, zero value otherwise. - -### GetConditionsOk - -`func (o *Hook) GetConditionsOk() (*[]Condition, bool)` - -GetConditionsOk returns a tuple with the Conditions field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConditions - -`func (o *Hook) SetConditions(v []Condition)` - -SetConditions sets Conditions field to given value. - -### HasConditions - -`func (o *Hook) HasConditions() bool` - -HasConditions returns a boolean if a field has been set. - -### GetCreatedAt - -`func (o *Hook) GetCreatedAt() string` - -GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. - -### GetCreatedAtOk - -`func (o *Hook) GetCreatedAtOk() (*string, bool)` - -GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCreatedAt - -`func (o *Hook) SetCreatedAt(v string)` - -SetCreatedAt sets CreatedAt field to given value. - -### HasCreatedAt - -`func (o *Hook) HasCreatedAt() bool` - -HasCreatedAt returns a boolean if a field has been set. - -### GetUpdatedAt - -`func (o *Hook) GetUpdatedAt() string` - -GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. - -### GetUpdatedAtOk - -`func (o *Hook) GetUpdatedAtOk() (*string, bool)` - -GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUpdatedAt - -`func (o *Hook) SetUpdatedAt(v string)` - -SetUpdatedAt sets UpdatedAt field to given value. - -### HasUpdatedAt - -`func (o *Hook) HasUpdatedAt() bool` - -HasUpdatedAt 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/HookEnvvar.md b/docs/HookEnvvar.md deleted file mode 100644 index 9c50469..0000000 --- a/docs/HookEnvvar.md +++ /dev/null @@ -1,150 +0,0 @@ -# HookEnvvar - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | Pointer to **string** | A unique identifier for the Hook Environment Variable | [optional] [readonly] -**Name** | **string** | The name of the environment variable. | -**CreatedAt** | Pointer to **string** | The ISO8601 formatted date that the environment variable was created. | [optional] -**UpdatedAt** | Pointer to **string** | The ISO8601 formatted date that the environment variable was last updated. | [optional] -**Value** | **string** | The secret value that will be encrypted at rest and injected in applicable hook functions at run time. | - -## Methods - -### NewHookEnvvar - -`func NewHookEnvvar(name string, value string, ) *HookEnvvar` - -NewHookEnvvar instantiates a new HookEnvvar 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 - -### NewHookEnvvarWithDefaults - -`func NewHookEnvvarWithDefaults() *HookEnvvar` - -NewHookEnvvarWithDefaults instantiates a new HookEnvvar 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 - -### GetId - -`func (o *HookEnvvar) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *HookEnvvar) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *HookEnvvar) SetId(v string)` - -SetId sets Id field to given value. - -### HasId - -`func (o *HookEnvvar) HasId() bool` - -HasId returns a boolean if a field has been set. - -### GetName - -`func (o *HookEnvvar) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *HookEnvvar) 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 *HookEnvvar) SetName(v string)` - -SetName sets Name field to given value. - - -### GetCreatedAt - -`func (o *HookEnvvar) GetCreatedAt() string` - -GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. - -### GetCreatedAtOk - -`func (o *HookEnvvar) GetCreatedAtOk() (*string, bool)` - -GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCreatedAt - -`func (o *HookEnvvar) SetCreatedAt(v string)` - -SetCreatedAt sets CreatedAt field to given value. - -### HasCreatedAt - -`func (o *HookEnvvar) HasCreatedAt() bool` - -HasCreatedAt returns a boolean if a field has been set. - -### GetUpdatedAt - -`func (o *HookEnvvar) GetUpdatedAt() string` - -GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. - -### GetUpdatedAtOk - -`func (o *HookEnvvar) GetUpdatedAtOk() (*string, bool)` - -GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUpdatedAt - -`func (o *HookEnvvar) SetUpdatedAt(v string)` - -SetUpdatedAt sets UpdatedAt field to given value. - -### HasUpdatedAt - -`func (o *HookEnvvar) HasUpdatedAt() bool` - -HasUpdatedAt returns a boolean if a field has been set. - -### GetValue - -`func (o *HookEnvvar) GetValue() string` - -GetValue returns the Value field if non-nil, zero value otherwise. - -### GetValueOk - -`func (o *HookEnvvar) GetValueOk() (*string, bool)` - -GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetValue - -`func (o *HookEnvvar) SetValue(v string)` - -SetValue sets Value 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/HookLog.md b/docs/HookLog.md deleted file mode 100644 index 91cf809..0000000 --- a/docs/HookLog.md +++ /dev/null @@ -1,134 +0,0 @@ -# HookLog - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**RequestId** | Pointer to **string** | | [optional] -**CorrelationId** | Pointer to **string** | | [optional] -**CreatedAt** | Pointer to **string** | | [optional] -**Events** | Pointer to **[]string** | | [optional] - -## Methods - -### NewHookLog - -`func NewHookLog() *HookLog` - -NewHookLog instantiates a new HookLog 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 - -### NewHookLogWithDefaults - -`func NewHookLogWithDefaults() *HookLog` - -NewHookLogWithDefaults instantiates a new HookLog 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 - -### GetRequestId - -`func (o *HookLog) GetRequestId() string` - -GetRequestId returns the RequestId field if non-nil, zero value otherwise. - -### GetRequestIdOk - -`func (o *HookLog) GetRequestIdOk() (*string, bool)` - -GetRequestIdOk returns a tuple with the RequestId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRequestId - -`func (o *HookLog) SetRequestId(v string)` - -SetRequestId sets RequestId field to given value. - -### HasRequestId - -`func (o *HookLog) HasRequestId() bool` - -HasRequestId returns a boolean if a field has been set. - -### GetCorrelationId - -`func (o *HookLog) GetCorrelationId() string` - -GetCorrelationId returns the CorrelationId field if non-nil, zero value otherwise. - -### GetCorrelationIdOk - -`func (o *HookLog) GetCorrelationIdOk() (*string, bool)` - -GetCorrelationIdOk returns a tuple with the CorrelationId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCorrelationId - -`func (o *HookLog) SetCorrelationId(v string)` - -SetCorrelationId sets CorrelationId field to given value. - -### HasCorrelationId - -`func (o *HookLog) HasCorrelationId() bool` - -HasCorrelationId returns a boolean if a field has been set. - -### GetCreatedAt - -`func (o *HookLog) GetCreatedAt() string` - -GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. - -### GetCreatedAtOk - -`func (o *HookLog) GetCreatedAtOk() (*string, bool)` - -GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCreatedAt - -`func (o *HookLog) SetCreatedAt(v string)` - -SetCreatedAt sets CreatedAt field to given value. - -### HasCreatedAt - -`func (o *HookLog) HasCreatedAt() bool` - -HasCreatedAt returns a boolean if a field has been set. - -### GetEvents - -`func (o *HookLog) GetEvents() []string` - -GetEvents returns the Events field if non-nil, zero value otherwise. - -### GetEventsOk - -`func (o *HookLog) GetEventsOk() (*[]string, bool)` - -GetEventsOk returns a tuple with the Events field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetEvents - -`func (o *HookLog) SetEvents(v []string)` - -SetEvents sets Events field to given value. - -### HasEvents - -`func (o *HookLog) HasEvents() bool` - -HasEvents 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/HookOptions.md b/docs/HookOptions.md deleted file mode 100644 index 51a5f15..0000000 --- a/docs/HookOptions.md +++ /dev/null @@ -1,108 +0,0 @@ -# HookOptions - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**RiskEnabled** | Pointer to **bool** | | [optional] -**LocationEnabled** | Pointer to **bool** | | [optional] -**MfaDeviceInfoEnabled** | Pointer to **bool** | | [optional] - -## Methods - -### NewHookOptions - -`func NewHookOptions() *HookOptions` - -NewHookOptions instantiates a new HookOptions 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 - -### NewHookOptionsWithDefaults - -`func NewHookOptionsWithDefaults() *HookOptions` - -NewHookOptionsWithDefaults instantiates a new HookOptions 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 - -### GetRiskEnabled - -`func (o *HookOptions) GetRiskEnabled() bool` - -GetRiskEnabled returns the RiskEnabled field if non-nil, zero value otherwise. - -### GetRiskEnabledOk - -`func (o *HookOptions) GetRiskEnabledOk() (*bool, bool)` - -GetRiskEnabledOk returns a tuple with the RiskEnabled field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRiskEnabled - -`func (o *HookOptions) SetRiskEnabled(v bool)` - -SetRiskEnabled sets RiskEnabled field to given value. - -### HasRiskEnabled - -`func (o *HookOptions) HasRiskEnabled() bool` - -HasRiskEnabled returns a boolean if a field has been set. - -### GetLocationEnabled - -`func (o *HookOptions) GetLocationEnabled() bool` - -GetLocationEnabled returns the LocationEnabled field if non-nil, zero value otherwise. - -### GetLocationEnabledOk - -`func (o *HookOptions) GetLocationEnabledOk() (*bool, bool)` - -GetLocationEnabledOk returns a tuple with the LocationEnabled field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLocationEnabled - -`func (o *HookOptions) SetLocationEnabled(v bool)` - -SetLocationEnabled sets LocationEnabled field to given value. - -### HasLocationEnabled - -`func (o *HookOptions) HasLocationEnabled() bool` - -HasLocationEnabled returns a boolean if a field has been set. - -### GetMfaDeviceInfoEnabled - -`func (o *HookOptions) GetMfaDeviceInfoEnabled() bool` - -GetMfaDeviceInfoEnabled returns the MfaDeviceInfoEnabled field if non-nil, zero value otherwise. - -### GetMfaDeviceInfoEnabledOk - -`func (o *HookOptions) GetMfaDeviceInfoEnabledOk() (*bool, bool)` - -GetMfaDeviceInfoEnabledOk returns a tuple with the MfaDeviceInfoEnabled field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMfaDeviceInfoEnabled - -`func (o *HookOptions) SetMfaDeviceInfoEnabled(v bool)` - -SetMfaDeviceInfoEnabled sets MfaDeviceInfoEnabled field to given value. - -### HasMfaDeviceInfoEnabled - -`func (o *HookOptions) HasMfaDeviceInfoEnabled() bool` - -HasMfaDeviceInfoEnabled 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/HookStatus.md b/docs/HookStatus.md deleted file mode 100644 index e2148d6..0000000 --- a/docs/HookStatus.md +++ /dev/null @@ -1,82 +0,0 @@ -# HookStatus - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | Pointer to **string** | responses status nam | [optional] -**Message** | Pointer to **string** | your operation was successful | [optional] - -## Methods - -### NewHookStatus - -`func NewHookStatus() *HookStatus` - -NewHookStatus instantiates a new HookStatus 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 - -### NewHookStatusWithDefaults - -`func NewHookStatusWithDefaults() *HookStatus` - -NewHookStatusWithDefaults instantiates a new HookStatus 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 *HookStatus) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *HookStatus) 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 *HookStatus) SetName(v string)` - -SetName sets Name field to given value. - -### HasName - -`func (o *HookStatus) HasName() bool` - -HasName returns a boolean if a field has been set. - -### GetMessage - -`func (o *HookStatus) GetMessage() string` - -GetMessage returns the Message field if non-nil, zero value otherwise. - -### GetMessageOk - -`func (o *HookStatus) GetMessageOk() (*string, bool)` - -GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMessage - -`func (o *HookStatus) SetMessage(v string)` - -SetMessage sets Message field to given value. - -### HasMessage - -`func (o *HookStatus) HasMessage() bool` - -HasMessage 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/InviteLinksApi.md b/docs/InviteLinksApi.md deleted file mode 100644 index ce2a087..0000000 --- a/docs/InviteLinksApi.md +++ /dev/null @@ -1,142 +0,0 @@ -# \InviteLinksApi - -All URIs are relative to *https://your-api-subdomain.onelogin.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetInviteLink**](InviteLinksApi.md#GetInviteLink) | **Post** /api/1/invites/get_invite_link | Generate Invite Link -[**SendInviteLink**](InviteLinksApi.md#SendInviteLink) | **Post** /api/1/invites/send_invite_link | Send Invite Link - - - -## GetInviteLink - -> GetInviteLink200Response GetInviteLink(ctx).GetInviteLinkRequest(getInviteLinkRequest).Execute() - -Generate Invite Link - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - getInviteLinkRequest := *openapiclient.NewGetInviteLinkRequest() // GetInviteLinkRequest | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.InviteLinksApi.GetInviteLink(context.Background()).GetInviteLinkRequest(getInviteLinkRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `InviteLinksApi.GetInviteLink``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetInviteLink`: GetInviteLink200Response - fmt.Fprintf(os.Stdout, "Response from `InviteLinksApi.GetInviteLink`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetInviteLinkRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **getInviteLinkRequest** | [**GetInviteLinkRequest**](GetInviteLinkRequest.md) | | - -### Return type - -[**GetInviteLink200Response**](GetInviteLink200Response.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## SendInviteLink - -> SendInviteLink200Response SendInviteLink(ctx).SendInviteLinkRequest(sendInviteLinkRequest).Execute() - -Send Invite Link - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - sendInviteLinkRequest := *openapiclient.NewSendInviteLinkRequest() // SendInviteLinkRequest | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.InviteLinksApi.SendInviteLink(context.Background()).SendInviteLinkRequest(sendInviteLinkRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `InviteLinksApi.SendInviteLink``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `SendInviteLink`: SendInviteLink200Response - fmt.Fprintf(os.Stdout, "Response from `InviteLinksApi.SendInviteLink`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiSendInviteLinkRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **sendInviteLinkRequest** | [**SendInviteLinkRequest**](SendInviteLinkRequest.md) | | - -### Return type - -[**SendInviteLink200Response**](SendInviteLink200Response.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/docs/ListConditions200ResponseInner.md b/docs/ListConditions200ResponseInner.md deleted file mode 100644 index 1ffb2a1..0000000 --- a/docs/ListConditions200ResponseInner.md +++ /dev/null @@ -1,82 +0,0 @@ -# ListConditions200ResponseInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | Pointer to **string** | Name of the rule condition | [optional] -**Value** | Pointer to **string** | The unique identifier of the condition. This should be used when defining conditions for a rule. | [optional] - -## Methods - -### NewListConditions200ResponseInner - -`func NewListConditions200ResponseInner() *ListConditions200ResponseInner` - -NewListConditions200ResponseInner instantiates a new ListConditions200ResponseInner 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 - -### NewListConditions200ResponseInnerWithDefaults - -`func NewListConditions200ResponseInnerWithDefaults() *ListConditions200ResponseInner` - -NewListConditions200ResponseInnerWithDefaults instantiates a new ListConditions200ResponseInner 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 *ListConditions200ResponseInner) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *ListConditions200ResponseInner) 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 *ListConditions200ResponseInner) SetName(v string)` - -SetName sets Name field to given value. - -### HasName - -`func (o *ListConditions200ResponseInner) HasName() bool` - -HasName returns a boolean if a field has been set. - -### GetValue - -`func (o *ListConditions200ResponseInner) GetValue() string` - -GetValue returns the Value field if non-nil, zero value otherwise. - -### GetValueOk - -`func (o *ListConditions200ResponseInner) GetValueOk() (*string, bool)` - -GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetValue - -`func (o *ListConditions200ResponseInner) SetValue(v string)` - -SetValue sets Value field to given value. - -### HasValue - -`func (o *ListConditions200ResponseInner) HasValue() bool` - -HasValue 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/ListMappingActionValues200ResponseInner.md b/docs/ListMappingActionValues200ResponseInner.md deleted file mode 100644 index b604d9d..0000000 --- a/docs/ListMappingActionValues200ResponseInner.md +++ /dev/null @@ -1,82 +0,0 @@ -# ListMappingActionValues200ResponseInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | Pointer to **string** | Name or description of operator | [optional] -**Value** | Pointer to **int32** | The action operator value to use when creating or updating User Mappings. | [optional] - -## Methods - -### NewListMappingActionValues200ResponseInner - -`func NewListMappingActionValues200ResponseInner() *ListMappingActionValues200ResponseInner` - -NewListMappingActionValues200ResponseInner instantiates a new ListMappingActionValues200ResponseInner 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 - -### NewListMappingActionValues200ResponseInnerWithDefaults - -`func NewListMappingActionValues200ResponseInnerWithDefaults() *ListMappingActionValues200ResponseInner` - -NewListMappingActionValues200ResponseInnerWithDefaults instantiates a new ListMappingActionValues200ResponseInner 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 *ListMappingActionValues200ResponseInner) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *ListMappingActionValues200ResponseInner) 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 *ListMappingActionValues200ResponseInner) SetName(v string)` - -SetName sets Name field to given value. - -### HasName - -`func (o *ListMappingActionValues200ResponseInner) HasName() bool` - -HasName returns a boolean if a field has been set. - -### GetValue - -`func (o *ListMappingActionValues200ResponseInner) GetValue() int32` - -GetValue returns the Value field if non-nil, zero value otherwise. - -### GetValueOk - -`func (o *ListMappingActionValues200ResponseInner) GetValueOk() (*int32, bool)` - -GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetValue - -`func (o *ListMappingActionValues200ResponseInner) SetValue(v int32)` - -SetValue sets Value field to given value. - -### HasValue - -`func (o *ListMappingActionValues200ResponseInner) HasValue() bool` - -HasValue 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/ListMappingConditions200Response.md b/docs/ListMappingConditions200Response.md deleted file mode 100644 index d0f1ef5..0000000 --- a/docs/ListMappingConditions200Response.md +++ /dev/null @@ -1,82 +0,0 @@ -# ListMappingConditions200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | Pointer to **string** | Name of Condition | [optional] -**Value** | Pointer to **string** | The unique identifier of the condition. This should be used when defining conditions for a User Mapping | [optional] - -## Methods - -### NewListMappingConditions200Response - -`func NewListMappingConditions200Response() *ListMappingConditions200Response` - -NewListMappingConditions200Response instantiates a new ListMappingConditions200Response 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 - -### NewListMappingConditions200ResponseWithDefaults - -`func NewListMappingConditions200ResponseWithDefaults() *ListMappingConditions200Response` - -NewListMappingConditions200ResponseWithDefaults instantiates a new ListMappingConditions200Response 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 *ListMappingConditions200Response) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *ListMappingConditions200Response) 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 *ListMappingConditions200Response) SetName(v string)` - -SetName sets Name field to given value. - -### HasName - -`func (o *ListMappingConditions200Response) HasName() bool` - -HasName returns a boolean if a field has been set. - -### GetValue - -`func (o *ListMappingConditions200Response) GetValue() string` - -GetValue returns the Value field if non-nil, zero value otherwise. - -### GetValueOk - -`func (o *ListMappingConditions200Response) GetValueOk() (*string, bool)` - -GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetValue - -`func (o *ListMappingConditions200Response) SetValue(v string)` - -SetValue sets Value field to given value. - -### HasValue - -`func (o *ListMappingConditions200Response) HasValue() bool` - -HasValue 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/ListMappingConditionsOperators200ResponseInner.md b/docs/ListMappingConditionsOperators200ResponseInner.md deleted file mode 100644 index 144f5b2..0000000 --- a/docs/ListMappingConditionsOperators200ResponseInner.md +++ /dev/null @@ -1,82 +0,0 @@ -# ListMappingConditionsOperators200ResponseInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | Pointer to **string** | Name or description of operator | [optional] -**Value** | Pointer to **string** | The condition operator value to use when creating or updating User Mappings. | [optional] - -## Methods - -### NewListMappingConditionsOperators200ResponseInner - -`func NewListMappingConditionsOperators200ResponseInner() *ListMappingConditionsOperators200ResponseInner` - -NewListMappingConditionsOperators200ResponseInner instantiates a new ListMappingConditionsOperators200ResponseInner 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 - -### NewListMappingConditionsOperators200ResponseInnerWithDefaults - -`func NewListMappingConditionsOperators200ResponseInnerWithDefaults() *ListMappingConditionsOperators200ResponseInner` - -NewListMappingConditionsOperators200ResponseInnerWithDefaults instantiates a new ListMappingConditionsOperators200ResponseInner 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 *ListMappingConditionsOperators200ResponseInner) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *ListMappingConditionsOperators200ResponseInner) 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 *ListMappingConditionsOperators200ResponseInner) SetName(v string)` - -SetName sets Name field to given value. - -### HasName - -`func (o *ListMappingConditionsOperators200ResponseInner) HasName() bool` - -HasName returns a boolean if a field has been set. - -### GetValue - -`func (o *ListMappingConditionsOperators200ResponseInner) GetValue() string` - -GetValue returns the Value field if non-nil, zero value otherwise. - -### GetValueOk - -`func (o *ListMappingConditionsOperators200ResponseInner) GetValueOk() (*string, bool)` - -GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetValue - -`func (o *ListMappingConditionsOperators200ResponseInner) SetValue(v string)` - -SetValue sets Value field to given value. - -### HasValue - -`func (o *ListMappingConditionsOperators200ResponseInner) HasValue() bool` - -HasValue 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/ListMappingContionValues200ResponseInner.md b/docs/ListMappingContionValues200ResponseInner.md deleted file mode 100644 index 8e51b3f..0000000 --- a/docs/ListMappingContionValues200ResponseInner.md +++ /dev/null @@ -1,82 +0,0 @@ -# ListMappingContionValues200ResponseInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | Pointer to **string** | Name or description of operator | [optional] -**Value** | Pointer to **int32** | The condition operator value to use when creating or updating User Mappings. | [optional] - -## Methods - -### NewListMappingContionValues200ResponseInner - -`func NewListMappingContionValues200ResponseInner() *ListMappingContionValues200ResponseInner` - -NewListMappingContionValues200ResponseInner instantiates a new ListMappingContionValues200ResponseInner 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 - -### NewListMappingContionValues200ResponseInnerWithDefaults - -`func NewListMappingContionValues200ResponseInnerWithDefaults() *ListMappingContionValues200ResponseInner` - -NewListMappingContionValues200ResponseInnerWithDefaults instantiates a new ListMappingContionValues200ResponseInner 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 *ListMappingContionValues200ResponseInner) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *ListMappingContionValues200ResponseInner) 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 *ListMappingContionValues200ResponseInner) SetName(v string)` - -SetName sets Name field to given value. - -### HasName - -`func (o *ListMappingContionValues200ResponseInner) HasName() bool` - -HasName returns a boolean if a field has been set. - -### GetValue - -`func (o *ListMappingContionValues200ResponseInner) GetValue() int32` - -GetValue returns the Value field if non-nil, zero value otherwise. - -### GetValueOk - -`func (o *ListMappingContionValues200ResponseInner) GetValueOk() (*int32, bool)` - -GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetValue - -`func (o *ListMappingContionValues200ResponseInner) SetValue(v int32)` - -SetValue sets Value field to given value. - -### HasValue - -`func (o *ListMappingContionValues200ResponseInner) HasValue() bool` - -HasValue 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/ListMappingsActions200ResponseInner.md b/docs/ListMappingsActions200ResponseInner.md deleted file mode 100644 index 1a92cca..0000000 --- a/docs/ListMappingsActions200ResponseInner.md +++ /dev/null @@ -1,82 +0,0 @@ -# ListMappingsActions200ResponseInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | Pointer to **string** | Name of the action | [optional] -**Value** | Pointer to **string** | The unique identifier of the action. This should be used when defining actions for a User Mapping. | [optional] - -## Methods - -### NewListMappingsActions200ResponseInner - -`func NewListMappingsActions200ResponseInner() *ListMappingsActions200ResponseInner` - -NewListMappingsActions200ResponseInner instantiates a new ListMappingsActions200ResponseInner 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 - -### NewListMappingsActions200ResponseInnerWithDefaults - -`func NewListMappingsActions200ResponseInnerWithDefaults() *ListMappingsActions200ResponseInner` - -NewListMappingsActions200ResponseInnerWithDefaults instantiates a new ListMappingsActions200ResponseInner 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 *ListMappingsActions200ResponseInner) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *ListMappingsActions200ResponseInner) 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 *ListMappingsActions200ResponseInner) SetName(v string)` - -SetName sets Name field to given value. - -### HasName - -`func (o *ListMappingsActions200ResponseInner) HasName() bool` - -HasName returns a boolean if a field has been set. - -### GetValue - -`func (o *ListMappingsActions200ResponseInner) GetValue() string` - -GetValue returns the Value field if non-nil, zero value otherwise. - -### GetValueOk - -`func (o *ListMappingsActions200ResponseInner) GetValueOk() (*string, bool)` - -GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetValue - -`func (o *ListMappingsActions200ResponseInner) SetValue(v string)` - -SetValue sets Value field to given value. - -### HasValue - -`func (o *ListMappingsActions200ResponseInner) HasValue() bool` - -HasValue 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/ListMessageTemplates200ResponseInner.md b/docs/ListMessageTemplates200ResponseInner.md deleted file mode 100644 index cdab3d6..0000000 --- a/docs/ListMessageTemplates200ResponseInner.md +++ /dev/null @@ -1,108 +0,0 @@ -# ListMessageTemplates200ResponseInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | Pointer to **int32** | template ID | [optional] -**Enabled** | Pointer to **bool** | indicator if template is enabled | [optional] -**Name** | Pointer to **string** | name of message template | [optional] - -## Methods - -### NewListMessageTemplates200ResponseInner - -`func NewListMessageTemplates200ResponseInner() *ListMessageTemplates200ResponseInner` - -NewListMessageTemplates200ResponseInner instantiates a new ListMessageTemplates200ResponseInner 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 - -### NewListMessageTemplates200ResponseInnerWithDefaults - -`func NewListMessageTemplates200ResponseInnerWithDefaults() *ListMessageTemplates200ResponseInner` - -NewListMessageTemplates200ResponseInnerWithDefaults instantiates a new ListMessageTemplates200ResponseInner 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 - -### GetId - -`func (o *ListMessageTemplates200ResponseInner) GetId() int32` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *ListMessageTemplates200ResponseInner) GetIdOk() (*int32, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *ListMessageTemplates200ResponseInner) SetId(v int32)` - -SetId sets Id field to given value. - -### HasId - -`func (o *ListMessageTemplates200ResponseInner) HasId() bool` - -HasId returns a boolean if a field has been set. - -### GetEnabled - -`func (o *ListMessageTemplates200ResponseInner) GetEnabled() bool` - -GetEnabled returns the Enabled field if non-nil, zero value otherwise. - -### GetEnabledOk - -`func (o *ListMessageTemplates200ResponseInner) 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 *ListMessageTemplates200ResponseInner) SetEnabled(v bool)` - -SetEnabled sets Enabled field to given value. - -### HasEnabled - -`func (o *ListMessageTemplates200ResponseInner) HasEnabled() bool` - -HasEnabled returns a boolean if a field has been set. - -### GetName - -`func (o *ListMessageTemplates200ResponseInner) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *ListMessageTemplates200ResponseInner) 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 *ListMessageTemplates200ResponseInner) SetName(v string)` - -SetName sets Name field to given value. - -### HasName - -`func (o *ListMessageTemplates200ResponseInner) HasName() bool` - -HasName 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/ListPrivelegeRoles200Response.md b/docs/ListPrivelegeRoles200Response.md deleted file mode 100644 index 3194a66..0000000 --- a/docs/ListPrivelegeRoles200Response.md +++ /dev/null @@ -1,226 +0,0 @@ -# ListPrivelegeRoles200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Total** | Pointer to **int32** | | [optional] -**Roles** | Pointer to **[]int32** | | [optional] -**BeforeCursor** | Pointer to **NullableInt32** | | [optional] -**PreviousLink** | Pointer to **NullableString** | | [optional] -**AfterCursor** | Pointer to **NullableInt32** | | [optional] -**NextLink** | Pointer to **NullableString** | | [optional] - -## Methods - -### NewListPrivelegeRoles200Response - -`func NewListPrivelegeRoles200Response() *ListPrivelegeRoles200Response` - -NewListPrivelegeRoles200Response instantiates a new ListPrivelegeRoles200Response 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 - -### NewListPrivelegeRoles200ResponseWithDefaults - -`func NewListPrivelegeRoles200ResponseWithDefaults() *ListPrivelegeRoles200Response` - -NewListPrivelegeRoles200ResponseWithDefaults instantiates a new ListPrivelegeRoles200Response 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 - -### GetTotal - -`func (o *ListPrivelegeRoles200Response) GetTotal() int32` - -GetTotal returns the Total field if non-nil, zero value otherwise. - -### GetTotalOk - -`func (o *ListPrivelegeRoles200Response) GetTotalOk() (*int32, bool)` - -GetTotalOk returns a tuple with the Total field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTotal - -`func (o *ListPrivelegeRoles200Response) SetTotal(v int32)` - -SetTotal sets Total field to given value. - -### HasTotal - -`func (o *ListPrivelegeRoles200Response) HasTotal() bool` - -HasTotal returns a boolean if a field has been set. - -### GetRoles - -`func (o *ListPrivelegeRoles200Response) GetRoles() []int32` - -GetRoles returns the Roles field if non-nil, zero value otherwise. - -### GetRolesOk - -`func (o *ListPrivelegeRoles200Response) GetRolesOk() (*[]int32, bool)` - -GetRolesOk returns a tuple with the Roles field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRoles - -`func (o *ListPrivelegeRoles200Response) SetRoles(v []int32)` - -SetRoles sets Roles field to given value. - -### HasRoles - -`func (o *ListPrivelegeRoles200Response) HasRoles() bool` - -HasRoles returns a boolean if a field has been set. - -### GetBeforeCursor - -`func (o *ListPrivelegeRoles200Response) GetBeforeCursor() int32` - -GetBeforeCursor returns the BeforeCursor field if non-nil, zero value otherwise. - -### GetBeforeCursorOk - -`func (o *ListPrivelegeRoles200Response) GetBeforeCursorOk() (*int32, bool)` - -GetBeforeCursorOk returns a tuple with the BeforeCursor field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetBeforeCursor - -`func (o *ListPrivelegeRoles200Response) SetBeforeCursor(v int32)` - -SetBeforeCursor sets BeforeCursor field to given value. - -### HasBeforeCursor - -`func (o *ListPrivelegeRoles200Response) HasBeforeCursor() bool` - -HasBeforeCursor returns a boolean if a field has been set. - -### SetBeforeCursorNil - -`func (o *ListPrivelegeRoles200Response) SetBeforeCursorNil(b bool)` - - SetBeforeCursorNil sets the value for BeforeCursor to be an explicit nil - -### UnsetBeforeCursor -`func (o *ListPrivelegeRoles200Response) UnsetBeforeCursor()` - -UnsetBeforeCursor ensures that no value is present for BeforeCursor, not even an explicit nil -### GetPreviousLink - -`func (o *ListPrivelegeRoles200Response) GetPreviousLink() string` - -GetPreviousLink returns the PreviousLink field if non-nil, zero value otherwise. - -### GetPreviousLinkOk - -`func (o *ListPrivelegeRoles200Response) GetPreviousLinkOk() (*string, bool)` - -GetPreviousLinkOk returns a tuple with the PreviousLink field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPreviousLink - -`func (o *ListPrivelegeRoles200Response) SetPreviousLink(v string)` - -SetPreviousLink sets PreviousLink field to given value. - -### HasPreviousLink - -`func (o *ListPrivelegeRoles200Response) HasPreviousLink() bool` - -HasPreviousLink returns a boolean if a field has been set. - -### SetPreviousLinkNil - -`func (o *ListPrivelegeRoles200Response) SetPreviousLinkNil(b bool)` - - SetPreviousLinkNil sets the value for PreviousLink to be an explicit nil - -### UnsetPreviousLink -`func (o *ListPrivelegeRoles200Response) UnsetPreviousLink()` - -UnsetPreviousLink ensures that no value is present for PreviousLink, not even an explicit nil -### GetAfterCursor - -`func (o *ListPrivelegeRoles200Response) GetAfterCursor() int32` - -GetAfterCursor returns the AfterCursor field if non-nil, zero value otherwise. - -### GetAfterCursorOk - -`func (o *ListPrivelegeRoles200Response) GetAfterCursorOk() (*int32, bool)` - -GetAfterCursorOk returns a tuple with the AfterCursor field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAfterCursor - -`func (o *ListPrivelegeRoles200Response) SetAfterCursor(v int32)` - -SetAfterCursor sets AfterCursor field to given value. - -### HasAfterCursor - -`func (o *ListPrivelegeRoles200Response) HasAfterCursor() bool` - -HasAfterCursor returns a boolean if a field has been set. - -### SetAfterCursorNil - -`func (o *ListPrivelegeRoles200Response) SetAfterCursorNil(b bool)` - - SetAfterCursorNil sets the value for AfterCursor to be an explicit nil - -### UnsetAfterCursor -`func (o *ListPrivelegeRoles200Response) UnsetAfterCursor()` - -UnsetAfterCursor ensures that no value is present for AfterCursor, not even an explicit nil -### GetNextLink - -`func (o *ListPrivelegeRoles200Response) GetNextLink() string` - -GetNextLink returns the NextLink field if non-nil, zero value otherwise. - -### GetNextLinkOk - -`func (o *ListPrivelegeRoles200Response) GetNextLinkOk() (*string, bool)` - -GetNextLinkOk returns a tuple with the NextLink field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetNextLink - -`func (o *ListPrivelegeRoles200Response) SetNextLink(v string)` - -SetNextLink sets NextLink field to given value. - -### HasNextLink - -`func (o *ListPrivelegeRoles200Response) HasNextLink() bool` - -HasNextLink returns a boolean if a field has been set. - -### SetNextLinkNil - -`func (o *ListPrivelegeRoles200Response) SetNextLinkNil(b bool)` - - SetNextLinkNil sets the value for NextLink to be an explicit nil - -### UnsetNextLink -`func (o *ListPrivelegeRoles200Response) UnsetNextLink()` - -UnsetNextLink ensures that no value is present for NextLink, 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/Locale.md b/docs/Locale.md deleted file mode 100644 index 006214a..0000000 --- a/docs/Locale.md +++ /dev/null @@ -1,82 +0,0 @@ -# Locale - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Language** | Pointer to **string** | locale string | [optional] -**IsDefault** | Pointer to **bool** | indicator if language is default | [optional] - -## Methods - -### NewLocale - -`func NewLocale() *Locale` - -NewLocale instantiates a new Locale 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 - -### NewLocaleWithDefaults - -`func NewLocaleWithDefaults() *Locale` - -NewLocaleWithDefaults instantiates a new Locale 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 - -### GetLanguage - -`func (o *Locale) GetLanguage() string` - -GetLanguage returns the Language field if non-nil, zero value otherwise. - -### GetLanguageOk - -`func (o *Locale) GetLanguageOk() (*string, bool)` - -GetLanguageOk returns a tuple with the Language field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLanguage - -`func (o *Locale) SetLanguage(v string)` - -SetLanguage sets Language field to given value. - -### HasLanguage - -`func (o *Locale) HasLanguage() bool` - -HasLanguage returns a boolean if a field has been set. - -### GetIsDefault - -`func (o *Locale) GetIsDefault() bool` - -GetIsDefault returns the IsDefault field if non-nil, zero value otherwise. - -### GetIsDefaultOk - -`func (o *Locale) GetIsDefaultOk() (*bool, bool)` - -GetIsDefaultOk returns a tuple with the IsDefault field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIsDefault - -`func (o *Locale) SetIsDefault(v bool)` - -SetIsDefault sets IsDefault field to given value. - -### HasIsDefault - -`func (o *Locale) HasIsDefault() bool` - -HasIsDefault 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/LockAccountUserRequest.md b/docs/LockAccountUserRequest.md deleted file mode 100644 index 7cc137a..0000000 --- a/docs/LockAccountUserRequest.md +++ /dev/null @@ -1,51 +0,0 @@ -# LockAccountUserRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**LockedUntil** | **int32** | Set to the number of minutes for which you want to lock the user account. Set to 0 if you want to lock the user account based on the Lock effective period set in the policy assigned to the user. If no policy is assigned to the user, setting this value to 0 will lock the user’s account until you unlock it Note that this value can not be less time that the Lock Effective Period specified on a user policy. | - -## Methods - -### NewLockAccountUserRequest - -`func NewLockAccountUserRequest(lockedUntil int32, ) *LockAccountUserRequest` - -NewLockAccountUserRequest instantiates a new LockAccountUserRequest 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 - -### NewLockAccountUserRequestWithDefaults - -`func NewLockAccountUserRequestWithDefaults() *LockAccountUserRequest` - -NewLockAccountUserRequestWithDefaults instantiates a new LockAccountUserRequest 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 - -### GetLockedUntil - -`func (o *LockAccountUserRequest) GetLockedUntil() int32` - -GetLockedUntil returns the LockedUntil field if non-nil, zero value otherwise. - -### GetLockedUntilOk - -`func (o *LockAccountUserRequest) GetLockedUntilOk() (*int32, bool)` - -GetLockedUntilOk returns a tuple with the LockedUntil field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLockedUntil - -`func (o *LockAccountUserRequest) SetLockedUntil(v int32)` - -SetLockedUntil sets LockedUntil 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/Mapping.md b/docs/Mapping.md deleted file mode 100644 index 6903107..0000000 --- a/docs/Mapping.md +++ /dev/null @@ -1,182 +0,0 @@ -# Mapping - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | Pointer to **int32** | | [optional] -**Name** | **string** | The name of the mapping. | -**Enabled** | **bool** | Indicates if the mapping is enabled or not. | -**Match** | **string** | Indicates how conditions should be matched. | -**Position** | **int32** | Indicates the order of the mapping. When `null` this will default to last position. | -**Conditions** | [**[]Condition**](Condition.md) | An array of conditions that the user must meet in order for the mapping to be applied. | -**Actions** | [**[]ActionObj**](ActionObj.md) | An array of actions that will be applied to the users that are matched by the conditions. | - -## Methods - -### NewMapping - -`func NewMapping(name string, enabled bool, match string, position int32, conditions []Condition, actions []ActionObj, ) *Mapping` - -NewMapping instantiates a new Mapping 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 - -### NewMappingWithDefaults - -`func NewMappingWithDefaults() *Mapping` - -NewMappingWithDefaults instantiates a new Mapping 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 - -### GetId - -`func (o *Mapping) GetId() int32` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *Mapping) GetIdOk() (*int32, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *Mapping) SetId(v int32)` - -SetId sets Id field to given value. - -### HasId - -`func (o *Mapping) HasId() bool` - -HasId returns a boolean if a field has been set. - -### GetName - -`func (o *Mapping) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *Mapping) 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 *Mapping) SetName(v string)` - -SetName sets Name field to given value. - - -### GetEnabled - -`func (o *Mapping) GetEnabled() bool` - -GetEnabled returns the Enabled field if non-nil, zero value otherwise. - -### GetEnabledOk - -`func (o *Mapping) 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 *Mapping) SetEnabled(v bool)` - -SetEnabled sets Enabled field to given value. - - -### GetMatch - -`func (o *Mapping) GetMatch() string` - -GetMatch returns the Match field if non-nil, zero value otherwise. - -### GetMatchOk - -`func (o *Mapping) GetMatchOk() (*string, bool)` - -GetMatchOk returns a tuple with the Match field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMatch - -`func (o *Mapping) SetMatch(v string)` - -SetMatch sets Match field to given value. - - -### GetPosition - -`func (o *Mapping) GetPosition() int32` - -GetPosition returns the Position field if non-nil, zero value otherwise. - -### GetPositionOk - -`func (o *Mapping) GetPositionOk() (*int32, bool)` - -GetPositionOk returns a tuple with the Position field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPosition - -`func (o *Mapping) SetPosition(v int32)` - -SetPosition sets Position field to given value. - - -### GetConditions - -`func (o *Mapping) GetConditions() []Condition` - -GetConditions returns the Conditions field if non-nil, zero value otherwise. - -### GetConditionsOk - -`func (o *Mapping) GetConditionsOk() (*[]Condition, bool)` - -GetConditionsOk returns a tuple with the Conditions field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConditions - -`func (o *Mapping) SetConditions(v []Condition)` - -SetConditions sets Conditions field to given value. - - -### GetActions - -`func (o *Mapping) GetActions() []ActionObj` - -GetActions returns the Actions field if non-nil, zero value otherwise. - -### GetActionsOk - -`func (o *Mapping) GetActionsOk() (*[]ActionObj, bool)` - -GetActionsOk returns a tuple with the Actions field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetActions - -`func (o *Mapping) SetActions(v []ActionObj)` - -SetActions sets Actions 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/MessageTemplate.md b/docs/MessageTemplate.md deleted file mode 100644 index 70c7085..0000000 --- a/docs/MessageTemplate.md +++ /dev/null @@ -1,223 +0,0 @@ -# MessageTemplate - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | Pointer to **int32** | | [optional] [readonly] -**AccountId** | Pointer to **int32** | | [optional] [readonly] -**Type** | **string** | Template type that describes the source (sms, voice, email) and purpose (registration, invite, etc) | -**Locale** | **string** | The 2 character language locale for the template. e.g. en = English, es = Spanish | -**Template** | [**MessageTemplateTemplate**](MessageTemplateTemplate.md) | | -**TemplateClass** | Pointer to **string** | | [optional] [readonly] -**UpdatedAt** | Pointer to **string** | Last time template was updated | [optional] [readonly] -**BrandId** | Pointer to **int32** | brand id number | [optional] [readonly] - -## Methods - -### NewMessageTemplate - -`func NewMessageTemplate(type_ string, locale string, template MessageTemplateTemplate, ) *MessageTemplate` - -NewMessageTemplate instantiates a new MessageTemplate 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 - -### NewMessageTemplateWithDefaults - -`func NewMessageTemplateWithDefaults() *MessageTemplate` - -NewMessageTemplateWithDefaults instantiates a new MessageTemplate 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 - -### GetId - -`func (o *MessageTemplate) GetId() int32` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *MessageTemplate) GetIdOk() (*int32, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *MessageTemplate) SetId(v int32)` - -SetId sets Id field to given value. - -### HasId - -`func (o *MessageTemplate) HasId() bool` - -HasId returns a boolean if a field has been set. - -### GetAccountId - -`func (o *MessageTemplate) GetAccountId() int32` - -GetAccountId returns the AccountId field if non-nil, zero value otherwise. - -### GetAccountIdOk - -`func (o *MessageTemplate) GetAccountIdOk() (*int32, bool)` - -GetAccountIdOk returns a tuple with the AccountId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAccountId - -`func (o *MessageTemplate) SetAccountId(v int32)` - -SetAccountId sets AccountId field to given value. - -### HasAccountId - -`func (o *MessageTemplate) HasAccountId() bool` - -HasAccountId returns a boolean if a field has been set. - -### GetType - -`func (o *MessageTemplate) GetType() string` - -GetType returns the Type field if non-nil, zero value otherwise. - -### GetTypeOk - -`func (o *MessageTemplate) GetTypeOk() (*string, 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 *MessageTemplate) SetType(v string)` - -SetType sets Type field to given value. - - -### GetLocale - -`func (o *MessageTemplate) GetLocale() string` - -GetLocale returns the Locale field if non-nil, zero value otherwise. - -### GetLocaleOk - -`func (o *MessageTemplate) GetLocaleOk() (*string, bool)` - -GetLocaleOk returns a tuple with the Locale field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLocale - -`func (o *MessageTemplate) SetLocale(v string)` - -SetLocale sets Locale field to given value. - - -### GetTemplate - -`func (o *MessageTemplate) GetTemplate() MessageTemplateTemplate` - -GetTemplate returns the Template field if non-nil, zero value otherwise. - -### GetTemplateOk - -`func (o *MessageTemplate) GetTemplateOk() (*MessageTemplateTemplate, bool)` - -GetTemplateOk returns a tuple with the Template field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTemplate - -`func (o *MessageTemplate) SetTemplate(v MessageTemplateTemplate)` - -SetTemplate sets Template field to given value. - - -### GetTemplateClass - -`func (o *MessageTemplate) GetTemplateClass() string` - -GetTemplateClass returns the TemplateClass field if non-nil, zero value otherwise. - -### GetTemplateClassOk - -`func (o *MessageTemplate) GetTemplateClassOk() (*string, bool)` - -GetTemplateClassOk returns a tuple with the TemplateClass field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTemplateClass - -`func (o *MessageTemplate) SetTemplateClass(v string)` - -SetTemplateClass sets TemplateClass field to given value. - -### HasTemplateClass - -`func (o *MessageTemplate) HasTemplateClass() bool` - -HasTemplateClass returns a boolean if a field has been set. - -### GetUpdatedAt - -`func (o *MessageTemplate) GetUpdatedAt() string` - -GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. - -### GetUpdatedAtOk - -`func (o *MessageTemplate) GetUpdatedAtOk() (*string, bool)` - -GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUpdatedAt - -`func (o *MessageTemplate) SetUpdatedAt(v string)` - -SetUpdatedAt sets UpdatedAt field to given value. - -### HasUpdatedAt - -`func (o *MessageTemplate) HasUpdatedAt() bool` - -HasUpdatedAt returns a boolean if a field has been set. - -### GetBrandId - -`func (o *MessageTemplate) GetBrandId() int32` - -GetBrandId returns the BrandId field if non-nil, zero value otherwise. - -### GetBrandIdOk - -`func (o *MessageTemplate) GetBrandIdOk() (*int32, bool)` - -GetBrandIdOk returns a tuple with the BrandId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetBrandId - -`func (o *MessageTemplate) SetBrandId(v int32)` - -SetBrandId sets BrandId field to given value. - -### HasBrandId - -`func (o *MessageTemplate) HasBrandId() bool` - -HasBrandId 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/MessageTemplateTemplate.md b/docs/MessageTemplateTemplate.md deleted file mode 100644 index efe39a8..0000000 --- a/docs/MessageTemplateTemplate.md +++ /dev/null @@ -1,114 +0,0 @@ -# MessageTemplateTemplate - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Subject** | **string** | Custom Email Subject | -**Html** | **string** | The HTML body of the Custom Email | -**Plain** | **string** | The Plain text body of the email | -**Message** | **string** | The body of the SMS message. Max length 160 characters. | - -## Methods - -### NewMessageTemplateTemplate - -`func NewMessageTemplateTemplate(subject string, html string, plain string, message string, ) *MessageTemplateTemplate` - -NewMessageTemplateTemplate instantiates a new MessageTemplateTemplate 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 - -### NewMessageTemplateTemplateWithDefaults - -`func NewMessageTemplateTemplateWithDefaults() *MessageTemplateTemplate` - -NewMessageTemplateTemplateWithDefaults instantiates a new MessageTemplateTemplate 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 - -### GetSubject - -`func (o *MessageTemplateTemplate) GetSubject() string` - -GetSubject returns the Subject field if non-nil, zero value otherwise. - -### GetSubjectOk - -`func (o *MessageTemplateTemplate) GetSubjectOk() (*string, bool)` - -GetSubjectOk returns a tuple with the Subject field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSubject - -`func (o *MessageTemplateTemplate) SetSubject(v string)` - -SetSubject sets Subject field to given value. - - -### GetHtml - -`func (o *MessageTemplateTemplate) GetHtml() string` - -GetHtml returns the Html field if non-nil, zero value otherwise. - -### GetHtmlOk - -`func (o *MessageTemplateTemplate) GetHtmlOk() (*string, bool)` - -GetHtmlOk returns a tuple with the Html field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetHtml - -`func (o *MessageTemplateTemplate) SetHtml(v string)` - -SetHtml sets Html field to given value. - - -### GetPlain - -`func (o *MessageTemplateTemplate) GetPlain() string` - -GetPlain returns the Plain field if non-nil, zero value otherwise. - -### GetPlainOk - -`func (o *MessageTemplateTemplate) GetPlainOk() (*string, bool)` - -GetPlainOk returns a tuple with the Plain field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPlain - -`func (o *MessageTemplateTemplate) SetPlain(v string)` - -SetPlain sets Plain field to given value. - - -### GetMessage - -`func (o *MessageTemplateTemplate) GetMessage() string` - -GetMessage returns the Message field if non-nil, zero value otherwise. - -### GetMessageOk - -`func (o *MessageTemplateTemplate) GetMessageOk() (*string, bool)` - -GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMessage - -`func (o *MessageTemplateTemplate) SetMessage(v string)` - -SetMessage sets Message 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/MessageTemplateTemplateOneOf.md b/docs/MessageTemplateTemplateOneOf.md deleted file mode 100644 index 87aba87..0000000 --- a/docs/MessageTemplateTemplateOneOf.md +++ /dev/null @@ -1,93 +0,0 @@ -# MessageTemplateTemplateOneOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Subject** | **string** | Custom Email Subject | -**Html** | **string** | The HTML body of the Custom Email | -**Plain** | **string** | The Plain text body of the email | - -## Methods - -### NewMessageTemplateTemplateOneOf - -`func NewMessageTemplateTemplateOneOf(subject string, html string, plain string, ) *MessageTemplateTemplateOneOf` - -NewMessageTemplateTemplateOneOf instantiates a new MessageTemplateTemplateOneOf 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 - -### NewMessageTemplateTemplateOneOfWithDefaults - -`func NewMessageTemplateTemplateOneOfWithDefaults() *MessageTemplateTemplateOneOf` - -NewMessageTemplateTemplateOneOfWithDefaults instantiates a new MessageTemplateTemplateOneOf 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 - -### GetSubject - -`func (o *MessageTemplateTemplateOneOf) GetSubject() string` - -GetSubject returns the Subject field if non-nil, zero value otherwise. - -### GetSubjectOk - -`func (o *MessageTemplateTemplateOneOf) GetSubjectOk() (*string, bool)` - -GetSubjectOk returns a tuple with the Subject field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSubject - -`func (o *MessageTemplateTemplateOneOf) SetSubject(v string)` - -SetSubject sets Subject field to given value. - - -### GetHtml - -`func (o *MessageTemplateTemplateOneOf) GetHtml() string` - -GetHtml returns the Html field if non-nil, zero value otherwise. - -### GetHtmlOk - -`func (o *MessageTemplateTemplateOneOf) GetHtmlOk() (*string, bool)` - -GetHtmlOk returns a tuple with the Html field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetHtml - -`func (o *MessageTemplateTemplateOneOf) SetHtml(v string)` - -SetHtml sets Html field to given value. - - -### GetPlain - -`func (o *MessageTemplateTemplateOneOf) GetPlain() string` - -GetPlain returns the Plain field if non-nil, zero value otherwise. - -### GetPlainOk - -`func (o *MessageTemplateTemplateOneOf) GetPlainOk() (*string, bool)` - -GetPlainOk returns a tuple with the Plain field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPlain - -`func (o *MessageTemplateTemplateOneOf) SetPlain(v string)` - -SetPlain sets Plain 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/MessageTemplateTemplateOneOf1.md b/docs/MessageTemplateTemplateOneOf1.md deleted file mode 100644 index 1b99b24..0000000 --- a/docs/MessageTemplateTemplateOneOf1.md +++ /dev/null @@ -1,51 +0,0 @@ -# MessageTemplateTemplateOneOf1 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Message** | **string** | The body of the SMS message. Max length 160 characters. | - -## Methods - -### NewMessageTemplateTemplateOneOf1 - -`func NewMessageTemplateTemplateOneOf1(message string, ) *MessageTemplateTemplateOneOf1` - -NewMessageTemplateTemplateOneOf1 instantiates a new MessageTemplateTemplateOneOf1 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 - -### NewMessageTemplateTemplateOneOf1WithDefaults - -`func NewMessageTemplateTemplateOneOf1WithDefaults() *MessageTemplateTemplateOneOf1` - -NewMessageTemplateTemplateOneOf1WithDefaults instantiates a new MessageTemplateTemplateOneOf1 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 - -### GetMessage - -`func (o *MessageTemplateTemplateOneOf1) GetMessage() string` - -GetMessage returns the Message field if non-nil, zero value otherwise. - -### GetMessageOk - -`func (o *MessageTemplateTemplateOneOf1) GetMessageOk() (*string, bool)` - -GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMessage - -`func (o *MessageTemplateTemplateOneOf1) SetMessage(v string)` - -SetMessage sets Message 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/MultiFactorAuthenticationApi.md b/docs/MultiFactorAuthenticationApi.md deleted file mode 100644 index 4051608..0000000 --- a/docs/MultiFactorAuthenticationApi.md +++ /dev/null @@ -1,751 +0,0 @@ -# \MultiFactorAuthenticationApi - -All URIs are relative to *https://your-api-subdomain.onelogin.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateDeviceVerification**](MultiFactorAuthenticationApi.md#CreateDeviceVerification) | **Post** /api/2/mfa/users/{user_id}/verifications | Create Device Verification -[**CreateFactorRegistration**](MultiFactorAuthenticationApi.md#CreateFactorRegistration) | **Post** /api/2/mfa/users/{user_id}/registrations | Create Factor Registration -[**DeleteEnrolledFactor**](MultiFactorAuthenticationApi.md#DeleteEnrolledFactor) | **Delete** /api/2/mfa/users/{user_id}/devices/{device_id} | Delete Enrolled Factor -[**GenerateOTP**](MultiFactorAuthenticationApi.md#GenerateOTP) | **Post** /api/2/mfa/users/{user_id}/mfa_token | Generate MFA token -[**GetAuthFactors**](MultiFactorAuthenticationApi.md#GetAuthFactors) | **Get** /api/2/mfa/users/{user_id}/factors | Get User Factors -[**GetAuthenticationDevices**](MultiFactorAuthenticationApi.md#GetAuthenticationDevices) | **Get** /api/2/mfa/users/{user_id}/devices | Get User Devices -[**GetUserRegistration**](MultiFactorAuthenticationApi.md#GetUserRegistration) | **Get** /api/2/mfa/users/{user_id}/registrations/{registration_id} | Get User Registration -[**GetUserVerification**](MultiFactorAuthenticationApi.md#GetUserVerification) | **Get** /api/2/mfa/users/{user_id}/verifications/{verification_id} | Get User Verification -[**VerifyUserRegistration**](MultiFactorAuthenticationApi.md#VerifyUserRegistration) | **Put** /api/2/mfa/users/{user_id}/registrations/{registration_id} | Verify User Registration -[**VerifyUserVerification**](MultiFactorAuthenticationApi.md#VerifyUserVerification) | **Put** /api/2/mfa/users/{user_id}/verifications/{verification_id} | Verify User Verification - - - -## CreateDeviceVerification - -> CreateDeviceVerification201Response CreateDeviceVerification(ctx, userId).ContentType(contentType).CreateDeviceVerificationRequest(createDeviceVerificationRequest).Execute() - -Create Device Verification - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - userId := int32(56) // int32 | Set to the id of the user that you want to return. - contentType := "application/json" // string | (optional) (default to "application/json") - createDeviceVerificationRequest := *openapiclient.NewCreateDeviceVerificationRequest(int32(58959)) // CreateDeviceVerificationRequest | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.MultiFactorAuthenticationApi.CreateDeviceVerification(context.Background(), userId).ContentType(contentType).CreateDeviceVerificationRequest(createDeviceVerificationRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `MultiFactorAuthenticationApi.CreateDeviceVerification``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `CreateDeviceVerification`: CreateDeviceVerification201Response - fmt.Fprintf(os.Stdout, "Response from `MultiFactorAuthenticationApi.CreateDeviceVerification`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**userId** | **int32** | Set to the id of the user that you want to return. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiCreateDeviceVerificationRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **contentType** | **string** | | [default to "application/json"] - **createDeviceVerificationRequest** | [**CreateDeviceVerificationRequest**](CreateDeviceVerificationRequest.md) | | - -### Return type - -[**CreateDeviceVerification201Response**](CreateDeviceVerification201Response.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## CreateFactorRegistration - -> CreateFactorRegistration201Response CreateFactorRegistration(ctx, userId).ContentType(contentType).CreateFactorRegistrationRequest(createFactorRegistrationRequest).Execute() - -Create Factor Registration - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - userId := int32(56) // int32 | Set to the id of the user that you want to return. - contentType := "application/json" // string | (optional) (default to "application/json") - createFactorRegistrationRequest := *openapiclient.NewCreateFactorRegistrationRequest(int32(58959), "OneLogin SMS") // CreateFactorRegistrationRequest | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.MultiFactorAuthenticationApi.CreateFactorRegistration(context.Background(), userId).ContentType(contentType).CreateFactorRegistrationRequest(createFactorRegistrationRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `MultiFactorAuthenticationApi.CreateFactorRegistration``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `CreateFactorRegistration`: CreateFactorRegistration201Response - fmt.Fprintf(os.Stdout, "Response from `MultiFactorAuthenticationApi.CreateFactorRegistration`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**userId** | **int32** | Set to the id of the user that you want to return. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiCreateFactorRegistrationRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **contentType** | **string** | | [default to "application/json"] - **createFactorRegistrationRequest** | [**CreateFactorRegistrationRequest**](CreateFactorRegistrationRequest.md) | | - -### Return type - -[**CreateFactorRegistration201Response**](CreateFactorRegistration201Response.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## DeleteEnrolledFactor - -> DeleteEnrolledFactor(ctx, userId, deviceId).Execute() - -Delete Enrolled Factor - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - userId := int32(56) // int32 | Set to the id of the user that you want to return. - deviceId := "deviceId_example" // string | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.MultiFactorAuthenticationApi.DeleteEnrolledFactor(context.Background(), userId, deviceId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `MultiFactorAuthenticationApi.DeleteEnrolledFactor``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**userId** | **int32** | Set to the id of the user that you want to return. | -**deviceId** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiDeleteEnrolledFactorRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - -### Return type - - (empty response body) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GenerateOTP - -> GenerateOTP201Response GenerateOTP(ctx, userId).ContentType(contentType).GenerateOTPRequest(generateOTPRequest).Execute() - -Generate MFA token - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - userId := int32(56) // int32 | Set to the id of the user that you want to return. - contentType := "application/json" // string | (optional) (default to "application/json") - generateOTPRequest := *openapiclient.NewGenerateOTPRequest() // GenerateOTPRequest | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.MultiFactorAuthenticationApi.GenerateOTP(context.Background(), userId).ContentType(contentType).GenerateOTPRequest(generateOTPRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `MultiFactorAuthenticationApi.GenerateOTP``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GenerateOTP`: GenerateOTP201Response - fmt.Fprintf(os.Stdout, "Response from `MultiFactorAuthenticationApi.GenerateOTP`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**userId** | **int32** | Set to the id of the user that you want to return. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGenerateOTPRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **contentType** | **string** | | [default to "application/json"] - **generateOTPRequest** | [**GenerateOTPRequest**](GenerateOTPRequest.md) | | - -### Return type - -[**GenerateOTP201Response**](GenerateOTP201Response.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetAuthFactors - -> GetAuthFactors200Response GetAuthFactors(ctx, userId).Execute() - -Get User Factors - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - userId := int32(56) // int32 | Set to the id of the user that you want to return. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.MultiFactorAuthenticationApi.GetAuthFactors(context.Background(), userId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `MultiFactorAuthenticationApi.GetAuthFactors``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetAuthFactors`: GetAuthFactors200Response - fmt.Fprintf(os.Stdout, "Response from `MultiFactorAuthenticationApi.GetAuthFactors`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**userId** | **int32** | Set to the id of the user that you want to return. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetAuthFactorsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**GetAuthFactors200Response**](GetAuthFactors200Response.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetAuthenticationDevices - -> []GetAuthenticationDevices200ResponseInner GetAuthenticationDevices(ctx, userId).Execute() - -Get User Devices - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - userId := int32(56) // int32 | Set to the id of the user that you want to return. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.MultiFactorAuthenticationApi.GetAuthenticationDevices(context.Background(), userId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `MultiFactorAuthenticationApi.GetAuthenticationDevices``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetAuthenticationDevices`: []GetAuthenticationDevices200ResponseInner - fmt.Fprintf(os.Stdout, "Response from `MultiFactorAuthenticationApi.GetAuthenticationDevices`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**userId** | **int32** | Set to the id of the user that you want to return. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetAuthenticationDevicesRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**[]GetAuthenticationDevices200ResponseInner**](GetAuthenticationDevices200ResponseInner.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetUserRegistration - -> map[string]interface{} GetUserRegistration(ctx, userId, registrationId).Execute() - -Get User Registration - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - userId := int32(56) // int32 | Set to the id of the user that you want to return. - registrationId := "" // string | The id of a registration - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.MultiFactorAuthenticationApi.GetUserRegistration(context.Background(), userId, registrationId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `MultiFactorAuthenticationApi.GetUserRegistration``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetUserRegistration`: map[string]interface{} - fmt.Fprintf(os.Stdout, "Response from `MultiFactorAuthenticationApi.GetUserRegistration`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**userId** | **int32** | Set to the id of the user that you want to return. | -**registrationId** | **string** | The id of a registration | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetUserRegistrationRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - -### Return type - -**map[string]interface{}** - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetUserVerification - -> GetUserVerification200Response GetUserVerification(ctx, userId, verificationId).Execute() - -Get User Verification - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - userId := int32(56) // int32 | Set to the id of the user that you want to return. - verificationId := "" // string | The verification_id is returned on activation of the factor or you can get the device_id using the Activate Factor API call. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.MultiFactorAuthenticationApi.GetUserVerification(context.Background(), userId, verificationId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `MultiFactorAuthenticationApi.GetUserVerification``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetUserVerification`: GetUserVerification200Response - fmt.Fprintf(os.Stdout, "Response from `MultiFactorAuthenticationApi.GetUserVerification`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**userId** | **int32** | Set to the id of the user that you want to return. | -**verificationId** | **string** | The verification_id is returned on activation of the factor or you can get the device_id using the Activate Factor API call. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetUserVerificationRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - -### Return type - -[**GetUserVerification200Response**](GetUserVerification200Response.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## VerifyUserRegistration - -> VerifyUserRegistration200Response VerifyUserRegistration(ctx, userId, registrationId).ContentType(contentType).VerifyUserRegistrationRequest(verifyUserRegistrationRequest).Execute() - -Verify User Registration - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - userId := int32(56) // int32 | Set to the id of the user that you want to return. - registrationId := "" // string | The id of a registration - contentType := "application/json" // string | (optional) (default to "application/json") - verifyUserRegistrationRequest := *openapiclient.NewVerifyUserRegistrationRequest() // VerifyUserRegistrationRequest | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.MultiFactorAuthenticationApi.VerifyUserRegistration(context.Background(), userId, registrationId).ContentType(contentType).VerifyUserRegistrationRequest(verifyUserRegistrationRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `MultiFactorAuthenticationApi.VerifyUserRegistration``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `VerifyUserRegistration`: VerifyUserRegistration200Response - fmt.Fprintf(os.Stdout, "Response from `MultiFactorAuthenticationApi.VerifyUserRegistration`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**userId** | **int32** | Set to the id of the user that you want to return. | -**registrationId** | **string** | The id of a registration | - -### Other Parameters - -Other parameters are passed through a pointer to a apiVerifyUserRegistrationRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - **contentType** | **string** | | [default to "application/json"] - **verifyUserRegistrationRequest** | [**VerifyUserRegistrationRequest**](VerifyUserRegistrationRequest.md) | | - -### Return type - -[**VerifyUserRegistration200Response**](VerifyUserRegistration200Response.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## VerifyUserVerification - -> Error VerifyUserVerification(ctx, userId, verificationId).ContentType(contentType).VerifyUserVerificationRequest(verifyUserVerificationRequest).Execute() - -Verify User Verification - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - userId := int32(56) // int32 | Set to the id of the user that you want to return. - verificationId := "" // string | The verification_id is returned on activation of the factor or you can get the device_id using the Activate Factor API call. - contentType := "application/json" // string | (optional) (default to "application/json") - verifyUserVerificationRequest := *openapiclient.NewVerifyUserVerificationRequest() // VerifyUserVerificationRequest | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.MultiFactorAuthenticationApi.VerifyUserVerification(context.Background(), userId, verificationId).ContentType(contentType).VerifyUserVerificationRequest(verifyUserVerificationRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `MultiFactorAuthenticationApi.VerifyUserVerification``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `VerifyUserVerification`: Error - fmt.Fprintf(os.Stdout, "Response from `MultiFactorAuthenticationApi.VerifyUserVerification`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**userId** | **int32** | Set to the id of the user that you want to return. | -**verificationId** | **string** | The verification_id is returned on activation of the factor or you can get the device_id using the Activate Factor API call. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiVerifyUserVerificationRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - **contentType** | **string** | | [default to "application/json"] - **verifyUserVerificationRequest** | [**VerifyUserVerificationRequest**](VerifyUserVerificationRequest.md) | | - -### Return type - -[**Error**](Error.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/docs/MultiFactorAuthenticationV1Api.md b/docs/MultiFactorAuthenticationV1Api.md deleted file mode 100644 index 62b981e..0000000 --- a/docs/MultiFactorAuthenticationV1Api.md +++ /dev/null @@ -1,520 +0,0 @@ -# \MultiFactorAuthenticationV1Api - -All URIs are relative to *https://your-api-subdomain.onelogin.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ActivateMfaFactors**](MultiFactorAuthenticationV1Api.md#ActivateMfaFactors) | **Post** /api/1/users/{user_id}/otp_devices/{device_id}/trigger | Activate a Factor -[**EnrollMfaFactor**](MultiFactorAuthenticationV1Api.md#EnrollMfaFactor) | **Post** /api/1/users/{user_id}/otp_devices | Enroll a Factor -[**GenerateMFAtoken**](MultiFactorAuthenticationV1Api.md#GenerateMFAtoken) | **Post** /api/1/users/{user_id}/mfa_token | Generate Temp MFA Token -[**GetEnrolledFactors**](MultiFactorAuthenticationV1Api.md#GetEnrolledFactors) | **Get** /api/1/users/{user_id}/otp_devices | Get Enrolled Factors -[**GetMFAFactors**](MultiFactorAuthenticationV1Api.md#GetMFAFactors) | **Get** /api/1/users/{user_id}/auth_factor | Get Available Factors -[**RemoveMfaFactors**](MultiFactorAuthenticationV1Api.md#RemoveMfaFactors) | **Delete** /api/1/users/{user_id}/otp_devices/{device_id} | Remove an Enrolled Factor -[**VerifyMfaFactor**](MultiFactorAuthenticationV1Api.md#VerifyMfaFactor) | **Post** /api/1/users/{user_id}/otp_devices/{device_id}/verify | Verify a Factor - - - -## ActivateMfaFactors - -> GetEnrolledFactors200Response ActivateMfaFactors(ctx, userId, deviceId).ActivateMfaFactorsRequest(activateMfaFactorsRequest).Execute() - -Activate a Factor - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - userId := int32(56) // int32 | Set to the id of the user that you want to return. - deviceId := "deviceId_example" // string | - activateMfaFactorsRequest := *openapiclient.NewActivateMfaFactorsRequest() // ActivateMfaFactorsRequest | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.MultiFactorAuthenticationV1Api.ActivateMfaFactors(context.Background(), userId, deviceId).ActivateMfaFactorsRequest(activateMfaFactorsRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `MultiFactorAuthenticationV1Api.ActivateMfaFactors``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ActivateMfaFactors`: GetEnrolledFactors200Response - fmt.Fprintf(os.Stdout, "Response from `MultiFactorAuthenticationV1Api.ActivateMfaFactors`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**userId** | **int32** | Set to the id of the user that you want to return. | -**deviceId** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiActivateMfaFactorsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - **activateMfaFactorsRequest** | [**ActivateMfaFactorsRequest**](ActivateMfaFactorsRequest.md) | | - -### Return type - -[**GetEnrolledFactors200Response**](GetEnrolledFactors200Response.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## EnrollMfaFactor - -> EnrollMfaFactor200Response EnrollMfaFactor(ctx, userId).OtpDevice(otpDevice).Execute() - -Enroll a Factor - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - userId := int32(56) // int32 | Set to the id of the user that you want to return. - otpDevice := *openapiclient.NewOtpDevice(int32(16282), "Rich's Phone", "+1xxxxxxxxxx") // OtpDevice | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.MultiFactorAuthenticationV1Api.EnrollMfaFactor(context.Background(), userId).OtpDevice(otpDevice).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `MultiFactorAuthenticationV1Api.EnrollMfaFactor``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `EnrollMfaFactor`: EnrollMfaFactor200Response - fmt.Fprintf(os.Stdout, "Response from `MultiFactorAuthenticationV1Api.EnrollMfaFactor`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**userId** | **int32** | Set to the id of the user that you want to return. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiEnrollMfaFactorRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **otpDevice** | [**OtpDevice**](OtpDevice.md) | | - -### Return type - -[**EnrollMfaFactor200Response**](EnrollMfaFactor200Response.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GenerateMFAtoken - -> GenerateMFAtoken200Response GenerateMFAtoken(ctx, userId).GenerateMFAtokenRequest(generateMFAtokenRequest).Execute() - -Generate Temp MFA Token - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - userId := int32(56) // int32 | Set to the id of the user that you want to return. - generateMFAtokenRequest := *openapiclient.NewGenerateMFAtokenRequest() // GenerateMFAtokenRequest | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.MultiFactorAuthenticationV1Api.GenerateMFAtoken(context.Background(), userId).GenerateMFAtokenRequest(generateMFAtokenRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `MultiFactorAuthenticationV1Api.GenerateMFAtoken``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GenerateMFAtoken`: GenerateMFAtoken200Response - fmt.Fprintf(os.Stdout, "Response from `MultiFactorAuthenticationV1Api.GenerateMFAtoken`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**userId** | **int32** | Set to the id of the user that you want to return. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGenerateMFAtokenRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **generateMFAtokenRequest** | [**GenerateMFAtokenRequest**](GenerateMFAtokenRequest.md) | | - -### Return type - -[**GenerateMFAtoken200Response**](GenerateMFAtoken200Response.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetEnrolledFactors - -> GetEnrolledFactors200Response GetEnrolledFactors(ctx, userId).Execute() - -Get Enrolled Factors - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - userId := int32(56) // int32 | Set to the id of the user that you want to return. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.MultiFactorAuthenticationV1Api.GetEnrolledFactors(context.Background(), userId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `MultiFactorAuthenticationV1Api.GetEnrolledFactors``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetEnrolledFactors`: GetEnrolledFactors200Response - fmt.Fprintf(os.Stdout, "Response from `MultiFactorAuthenticationV1Api.GetEnrolledFactors`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**userId** | **int32** | Set to the id of the user that you want to return. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetEnrolledFactorsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**GetEnrolledFactors200Response**](GetEnrolledFactors200Response.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetMFAFactors - -> GetMFAFactors200Response GetMFAFactors(ctx, userId).Execute() - -Get Available Factors - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - userId := int32(56) // int32 | Set to the id of the user that you want to return. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.MultiFactorAuthenticationV1Api.GetMFAFactors(context.Background(), userId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `MultiFactorAuthenticationV1Api.GetMFAFactors``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetMFAFactors`: GetMFAFactors200Response - fmt.Fprintf(os.Stdout, "Response from `MultiFactorAuthenticationV1Api.GetMFAFactors`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**userId** | **int32** | Set to the id of the user that you want to return. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetMFAFactorsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**GetMFAFactors200Response**](GetMFAFactors200Response.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## RemoveMfaFactors - -> RemoveMfaFactors(ctx, userId, deviceId).Execute() - -Remove an Enrolled Factor - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - userId := int32(56) // int32 | Set to the id of the user that you want to return. - deviceId := "deviceId_example" // string | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.MultiFactorAuthenticationV1Api.RemoveMfaFactors(context.Background(), userId, deviceId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `MultiFactorAuthenticationV1Api.RemoveMfaFactors``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**userId** | **int32** | Set to the id of the user that you want to return. | -**deviceId** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiRemoveMfaFactorsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - -### Return type - - (empty response body) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## VerifyMfaFactor - -> Error VerifyMfaFactor(ctx, userId, deviceId).VerifyMfaFactorRequest(verifyMfaFactorRequest).Execute() - -Verify a Factor - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - userId := int32(56) // int32 | Set to the id of the user that you want to return. - deviceId := "deviceId_example" // string | - verifyMfaFactorRequest := *openapiclient.NewVerifyMfaFactorRequest() // VerifyMfaFactorRequest | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.MultiFactorAuthenticationV1Api.VerifyMfaFactor(context.Background(), userId, deviceId).VerifyMfaFactorRequest(verifyMfaFactorRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `MultiFactorAuthenticationV1Api.VerifyMfaFactor``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `VerifyMfaFactor`: Error - fmt.Fprintf(os.Stdout, "Response from `MultiFactorAuthenticationV1Api.VerifyMfaFactor`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**userId** | **int32** | Set to the id of the user that you want to return. | -**deviceId** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiVerifyMfaFactorRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - **verifyMfaFactorRequest** | [**VerifyMfaFactorRequest**](VerifyMfaFactorRequest.md) | | - -### Return type - -[**Error**](Error.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/docs/OAuth2Api.md b/docs/OAuth2Api.md deleted file mode 100644 index be5cfba..0000000 --- a/docs/OAuth2Api.md +++ /dev/null @@ -1,208 +0,0 @@ -# \OAuth2Api - -All URIs are relative to *https://your-api-subdomain.onelogin.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GenerateToken**](OAuth2Api.md#GenerateToken) | **Post** /auth/oauth2/v2/token | Generate Token -[**GetRateLimit**](OAuth2Api.md#GetRateLimit) | **Get** /auth/rate_limit | Get Rate Limit -[**RevokeTokens**](OAuth2Api.md#RevokeTokens) | **Post** /auth/oauth2/revoke | Revoke Tokens - - - -## GenerateToken - -> OauthToken GenerateToken(ctx).GenerateTokenRequest(generateTokenRequest).ContentType(contentType).Execute() - -Generate Token - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - generateTokenRequest := *openapiclient.NewGenerateTokenRequest("GrantType_example") // GenerateTokenRequest | Request Body to Generate OAuth Token - contentType := "application/json" // string | (optional) (default to "application/json") - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OAuth2Api.GenerateToken(context.Background()).GenerateTokenRequest(generateTokenRequest).ContentType(contentType).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OAuth2Api.GenerateToken``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GenerateToken`: OauthToken - fmt.Fprintf(os.Stdout, "Response from `OAuth2Api.GenerateToken`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiGenerateTokenRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **generateTokenRequest** | [**GenerateTokenRequest**](GenerateTokenRequest.md) | Request Body to Generate OAuth Token | - **contentType** | **string** | | [default to "application/json"] - -### Return type - -[**OauthToken**](OauthToken.md) - -### Authorization - -[basicAuth](../README.md#basicAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetRateLimit - -> GetRateLimit200Response GetRateLimit(ctx).Execute() - -Get Rate Limit - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OAuth2Api.GetRateLimit(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OAuth2Api.GetRateLimit``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetRateLimit`: GetRateLimit200Response - fmt.Fprintf(os.Stdout, "Response from `OAuth2Api.GetRateLimit`: %v\n", resp) -} -``` - -### Path Parameters - -This endpoint does not need any parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetRateLimitRequest struct via the builder pattern - - -### Return type - -[**GetRateLimit200Response**](GetRateLimit200Response.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## RevokeTokens - -> Error RevokeTokens(ctx).ContentType(contentType).RevokeTokensRequest(revokeTokensRequest).Execute() - -Revoke Tokens - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - contentType := "application/json" // string | (optional) (default to "application/json") - revokeTokensRequest := *openapiclient.NewRevokeTokensRequest("xx508xx63817x752xx74004x30705xx92x58349x5x78f5xx34x8x614xxxx1451") // RevokeTokensRequest | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OAuth2Api.RevokeTokens(context.Background()).ContentType(contentType).RevokeTokensRequest(revokeTokensRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OAuth2Api.RevokeTokens``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `RevokeTokens`: Error - fmt.Fprintf(os.Stdout, "Response from `OAuth2Api.RevokeTokens`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiRevokeTokensRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **contentType** | **string** | | [default to "application/json"] - **revokeTokensRequest** | [**RevokeTokensRequest**](RevokeTokensRequest.md) | | - -### Return type - -[**Error**](Error.md) - -### Authorization - -[basicAuth](../README.md#basicAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/docs/OauthToken.md b/docs/OauthToken.md deleted file mode 100644 index d6058b3..0000000 --- a/docs/OauthToken.md +++ /dev/null @@ -1,186 +0,0 @@ -# OauthToken - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**AccessToken** | Pointer to **string** | Provides the requested access token. You can use this token to call our resource APIs. | [optional] -**CreatedAt** | Pointer to **string** | Time at which the access token was generated. | [optional] -**ExpiresIn** | Pointer to **int32** | Indicates that the generated access token expires in 36,000 seconds, 600 minutes, or 10 hours. An expired access token cannot be used to make resource API calls, but it can still be used along with its associated refresh token to call the Refresh Tokens v2 API. | [optional] -**RefreshToken** | Pointer to **string** | deprecated No longer in use | [optional] -**TokenType** | Pointer to **string** | Indicates that the generated access token is a bearer token. | [optional] -**AccountId** | Pointer to **int32** | Account ID associated with the API credentials used to generate the token. | [optional] - -## Methods - -### NewOauthToken - -`func NewOauthToken() *OauthToken` - -NewOauthToken instantiates a new OauthToken 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 - -### NewOauthTokenWithDefaults - -`func NewOauthTokenWithDefaults() *OauthToken` - -NewOauthTokenWithDefaults instantiates a new OauthToken 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 - -### GetAccessToken - -`func (o *OauthToken) GetAccessToken() string` - -GetAccessToken returns the AccessToken field if non-nil, zero value otherwise. - -### GetAccessTokenOk - -`func (o *OauthToken) GetAccessTokenOk() (*string, bool)` - -GetAccessTokenOk returns a tuple with the AccessToken field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAccessToken - -`func (o *OauthToken) SetAccessToken(v string)` - -SetAccessToken sets AccessToken field to given value. - -### HasAccessToken - -`func (o *OauthToken) HasAccessToken() bool` - -HasAccessToken returns a boolean if a field has been set. - -### GetCreatedAt - -`func (o *OauthToken) GetCreatedAt() string` - -GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. - -### GetCreatedAtOk - -`func (o *OauthToken) GetCreatedAtOk() (*string, bool)` - -GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCreatedAt - -`func (o *OauthToken) SetCreatedAt(v string)` - -SetCreatedAt sets CreatedAt field to given value. - -### HasCreatedAt - -`func (o *OauthToken) HasCreatedAt() bool` - -HasCreatedAt returns a boolean if a field has been set. - -### GetExpiresIn - -`func (o *OauthToken) GetExpiresIn() int32` - -GetExpiresIn returns the ExpiresIn field if non-nil, zero value otherwise. - -### GetExpiresInOk - -`func (o *OauthToken) GetExpiresInOk() (*int32, bool)` - -GetExpiresInOk returns a tuple with the ExpiresIn field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetExpiresIn - -`func (o *OauthToken) SetExpiresIn(v int32)` - -SetExpiresIn sets ExpiresIn field to given value. - -### HasExpiresIn - -`func (o *OauthToken) HasExpiresIn() bool` - -HasExpiresIn returns a boolean if a field has been set. - -### GetRefreshToken - -`func (o *OauthToken) GetRefreshToken() string` - -GetRefreshToken returns the RefreshToken field if non-nil, zero value otherwise. - -### GetRefreshTokenOk - -`func (o *OauthToken) GetRefreshTokenOk() (*string, bool)` - -GetRefreshTokenOk returns a tuple with the RefreshToken field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRefreshToken - -`func (o *OauthToken) SetRefreshToken(v string)` - -SetRefreshToken sets RefreshToken field to given value. - -### HasRefreshToken - -`func (o *OauthToken) HasRefreshToken() bool` - -HasRefreshToken returns a boolean if a field has been set. - -### GetTokenType - -`func (o *OauthToken) GetTokenType() string` - -GetTokenType returns the TokenType field if non-nil, zero value otherwise. - -### GetTokenTypeOk - -`func (o *OauthToken) GetTokenTypeOk() (*string, bool)` - -GetTokenTypeOk returns a tuple with the TokenType field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTokenType - -`func (o *OauthToken) SetTokenType(v string)` - -SetTokenType sets TokenType field to given value. - -### HasTokenType - -`func (o *OauthToken) HasTokenType() bool` - -HasTokenType returns a boolean if a field has been set. - -### GetAccountId - -`func (o *OauthToken) GetAccountId() int32` - -GetAccountId returns the AccountId field if non-nil, zero value otherwise. - -### GetAccountIdOk - -`func (o *OauthToken) GetAccountIdOk() (*int32, bool)` - -GetAccountIdOk returns a tuple with the AccountId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAccountId - -`func (o *OauthToken) SetAccountId(v int32)` - -SetAccountId sets AccountId field to given value. - -### HasAccountId - -`func (o *OauthToken) HasAccountId() bool` - -HasAccountId 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/OidcApp.md b/docs/OidcApp.md deleted file mode 100644 index ab488c0..0000000 --- a/docs/OidcApp.md +++ /dev/null @@ -1,494 +0,0 @@ -# OidcApp - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | Pointer to **int32** | Apps unique ID in OneLogin. | [optional] [readonly] -**Name** | **string** | The name of the app. | -**Visible** | **bool** | Indicates if the app is visible in the OneLogin portal. | -**Description** | **string** | Freeform description of the app. | -**Notes** | Pointer to **string** | Freeform notes about the app. | [optional] -**IconUrl** | Pointer to **string** | A link to the apps icon url | [optional] -**AuthMethod** | Pointer to [**AuthMethod**](AuthMethod.md) | | [optional] -**PolicyId** | **int32** | The security policy assigned to the app. | -**AllowAssumedSignin** | Pointer to **bool** | Indicates whether or not administrators can access the app as a user that they have assumed control over. | [optional] -**TabId** | Pointer to **int32** | ID of the OneLogin portal tab that the app is assigned to. | [optional] -**ConnectorId** | **int32** | ID of the connector to base the app from. | -**CreatedAt** | Pointer to **string** | the date the app was created | [optional] -**UpdatedAt** | Pointer to **string** | the date the app was last updated | [optional] -**RoleIds** | Pointer to **[]int32** | List of Role IDs that are assigned to the app. On App Create or Update the entire array is replaced with the values provided. | [optional] -**Provisioning** | Pointer to [**GenericAppProvisioning**](GenericAppProvisioning.md) | | [optional] -**Parameters** | Pointer to [**AppParameters**](AppParameters.md) | | [optional] -**EnforcementPoint** | Pointer to [**EnforcementPoint**](EnforcementPoint.md) | | [optional] -**Configuration** | [**ConfigurationOidc**](ConfigurationOidc.md) | | -**Sso** | Pointer to [**SsoOidc**](SsoOidc.md) | | [optional] - -## Methods - -### NewOidcApp - -`func NewOidcApp(name string, visible bool, description string, policyId int32, connectorId int32, configuration ConfigurationOidc, ) *OidcApp` - -NewOidcApp instantiates a new OidcApp 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 - -### NewOidcAppWithDefaults - -`func NewOidcAppWithDefaults() *OidcApp` - -NewOidcAppWithDefaults instantiates a new OidcApp 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 - -### GetId - -`func (o *OidcApp) GetId() int32` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *OidcApp) GetIdOk() (*int32, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *OidcApp) SetId(v int32)` - -SetId sets Id field to given value. - -### HasId - -`func (o *OidcApp) HasId() bool` - -HasId returns a boolean if a field has been set. - -### GetName - -`func (o *OidcApp) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *OidcApp) 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 *OidcApp) SetName(v string)` - -SetName sets Name field to given value. - - -### GetVisible - -`func (o *OidcApp) GetVisible() bool` - -GetVisible returns the Visible field if non-nil, zero value otherwise. - -### GetVisibleOk - -`func (o *OidcApp) GetVisibleOk() (*bool, bool)` - -GetVisibleOk returns a tuple with the Visible field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetVisible - -`func (o *OidcApp) SetVisible(v bool)` - -SetVisible sets Visible field to given value. - - -### GetDescription - -`func (o *OidcApp) GetDescription() string` - -GetDescription returns the Description field if non-nil, zero value otherwise. - -### GetDescriptionOk - -`func (o *OidcApp) GetDescriptionOk() (*string, bool)` - -GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDescription - -`func (o *OidcApp) SetDescription(v string)` - -SetDescription sets Description field to given value. - - -### GetNotes - -`func (o *OidcApp) GetNotes() string` - -GetNotes returns the Notes field if non-nil, zero value otherwise. - -### GetNotesOk - -`func (o *OidcApp) GetNotesOk() (*string, bool)` - -GetNotesOk returns a tuple with the Notes field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetNotes - -`func (o *OidcApp) SetNotes(v string)` - -SetNotes sets Notes field to given value. - -### HasNotes - -`func (o *OidcApp) HasNotes() bool` - -HasNotes returns a boolean if a field has been set. - -### GetIconUrl - -`func (o *OidcApp) GetIconUrl() string` - -GetIconUrl returns the IconUrl field if non-nil, zero value otherwise. - -### GetIconUrlOk - -`func (o *OidcApp) GetIconUrlOk() (*string, bool)` - -GetIconUrlOk returns a tuple with the IconUrl field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIconUrl - -`func (o *OidcApp) SetIconUrl(v string)` - -SetIconUrl sets IconUrl field to given value. - -### HasIconUrl - -`func (o *OidcApp) HasIconUrl() bool` - -HasIconUrl returns a boolean if a field has been set. - -### GetAuthMethod - -`func (o *OidcApp) GetAuthMethod() AuthMethod` - -GetAuthMethod returns the AuthMethod field if non-nil, zero value otherwise. - -### GetAuthMethodOk - -`func (o *OidcApp) GetAuthMethodOk() (*AuthMethod, bool)` - -GetAuthMethodOk returns a tuple with the AuthMethod field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAuthMethod - -`func (o *OidcApp) SetAuthMethod(v AuthMethod)` - -SetAuthMethod sets AuthMethod field to given value. - -### HasAuthMethod - -`func (o *OidcApp) HasAuthMethod() bool` - -HasAuthMethod returns a boolean if a field has been set. - -### GetPolicyId - -`func (o *OidcApp) GetPolicyId() int32` - -GetPolicyId returns the PolicyId field if non-nil, zero value otherwise. - -### GetPolicyIdOk - -`func (o *OidcApp) GetPolicyIdOk() (*int32, bool)` - -GetPolicyIdOk returns a tuple with the PolicyId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPolicyId - -`func (o *OidcApp) SetPolicyId(v int32)` - -SetPolicyId sets PolicyId field to given value. - - -### GetAllowAssumedSignin - -`func (o *OidcApp) GetAllowAssumedSignin() bool` - -GetAllowAssumedSignin returns the AllowAssumedSignin field if non-nil, zero value otherwise. - -### GetAllowAssumedSigninOk - -`func (o *OidcApp) GetAllowAssumedSigninOk() (*bool, bool)` - -GetAllowAssumedSigninOk returns a tuple with the AllowAssumedSignin field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAllowAssumedSignin - -`func (o *OidcApp) SetAllowAssumedSignin(v bool)` - -SetAllowAssumedSignin sets AllowAssumedSignin field to given value. - -### HasAllowAssumedSignin - -`func (o *OidcApp) HasAllowAssumedSignin() bool` - -HasAllowAssumedSignin returns a boolean if a field has been set. - -### GetTabId - -`func (o *OidcApp) GetTabId() int32` - -GetTabId returns the TabId field if non-nil, zero value otherwise. - -### GetTabIdOk - -`func (o *OidcApp) GetTabIdOk() (*int32, bool)` - -GetTabIdOk returns a tuple with the TabId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTabId - -`func (o *OidcApp) SetTabId(v int32)` - -SetTabId sets TabId field to given value. - -### HasTabId - -`func (o *OidcApp) HasTabId() bool` - -HasTabId returns a boolean if a field has been set. - -### GetConnectorId - -`func (o *OidcApp) GetConnectorId() int32` - -GetConnectorId returns the ConnectorId field if non-nil, zero value otherwise. - -### GetConnectorIdOk - -`func (o *OidcApp) GetConnectorIdOk() (*int32, bool)` - -GetConnectorIdOk returns a tuple with the ConnectorId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConnectorId - -`func (o *OidcApp) SetConnectorId(v int32)` - -SetConnectorId sets ConnectorId field to given value. - - -### GetCreatedAt - -`func (o *OidcApp) GetCreatedAt() string` - -GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. - -### GetCreatedAtOk - -`func (o *OidcApp) GetCreatedAtOk() (*string, bool)` - -GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCreatedAt - -`func (o *OidcApp) SetCreatedAt(v string)` - -SetCreatedAt sets CreatedAt field to given value. - -### HasCreatedAt - -`func (o *OidcApp) HasCreatedAt() bool` - -HasCreatedAt returns a boolean if a field has been set. - -### GetUpdatedAt - -`func (o *OidcApp) GetUpdatedAt() string` - -GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. - -### GetUpdatedAtOk - -`func (o *OidcApp) GetUpdatedAtOk() (*string, bool)` - -GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUpdatedAt - -`func (o *OidcApp) SetUpdatedAt(v string)` - -SetUpdatedAt sets UpdatedAt field to given value. - -### HasUpdatedAt - -`func (o *OidcApp) HasUpdatedAt() bool` - -HasUpdatedAt returns a boolean if a field has been set. - -### GetRoleIds - -`func (o *OidcApp) GetRoleIds() []int32` - -GetRoleIds returns the RoleIds field if non-nil, zero value otherwise. - -### GetRoleIdsOk - -`func (o *OidcApp) GetRoleIdsOk() (*[]int32, bool)` - -GetRoleIdsOk returns a tuple with the RoleIds field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRoleIds - -`func (o *OidcApp) SetRoleIds(v []int32)` - -SetRoleIds sets RoleIds field to given value. - -### HasRoleIds - -`func (o *OidcApp) HasRoleIds() bool` - -HasRoleIds returns a boolean if a field has been set. - -### GetProvisioning - -`func (o *OidcApp) GetProvisioning() GenericAppProvisioning` - -GetProvisioning returns the Provisioning field if non-nil, zero value otherwise. - -### GetProvisioningOk - -`func (o *OidcApp) GetProvisioningOk() (*GenericAppProvisioning, bool)` - -GetProvisioningOk returns a tuple with the Provisioning field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetProvisioning - -`func (o *OidcApp) SetProvisioning(v GenericAppProvisioning)` - -SetProvisioning sets Provisioning field to given value. - -### HasProvisioning - -`func (o *OidcApp) HasProvisioning() bool` - -HasProvisioning returns a boolean if a field has been set. - -### GetParameters - -`func (o *OidcApp) GetParameters() AppParameters` - -GetParameters returns the Parameters field if non-nil, zero value otherwise. - -### GetParametersOk - -`func (o *OidcApp) GetParametersOk() (*AppParameters, bool)` - -GetParametersOk returns a tuple with the Parameters field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetParameters - -`func (o *OidcApp) SetParameters(v AppParameters)` - -SetParameters sets Parameters field to given value. - -### HasParameters - -`func (o *OidcApp) HasParameters() bool` - -HasParameters returns a boolean if a field has been set. - -### GetEnforcementPoint - -`func (o *OidcApp) GetEnforcementPoint() EnforcementPoint` - -GetEnforcementPoint returns the EnforcementPoint field if non-nil, zero value otherwise. - -### GetEnforcementPointOk - -`func (o *OidcApp) GetEnforcementPointOk() (*EnforcementPoint, bool)` - -GetEnforcementPointOk returns a tuple with the EnforcementPoint field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetEnforcementPoint - -`func (o *OidcApp) SetEnforcementPoint(v EnforcementPoint)` - -SetEnforcementPoint sets EnforcementPoint field to given value. - -### HasEnforcementPoint - -`func (o *OidcApp) HasEnforcementPoint() bool` - -HasEnforcementPoint returns a boolean if a field has been set. - -### GetConfiguration - -`func (o *OidcApp) GetConfiguration() ConfigurationOidc` - -GetConfiguration returns the Configuration field if non-nil, zero value otherwise. - -### GetConfigurationOk - -`func (o *OidcApp) GetConfigurationOk() (*ConfigurationOidc, bool)` - -GetConfigurationOk returns a tuple with the Configuration field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConfiguration - -`func (o *OidcApp) SetConfiguration(v ConfigurationOidc)` - -SetConfiguration sets Configuration field to given value. - - -### GetSso - -`func (o *OidcApp) GetSso() SsoOidc` - -GetSso returns the Sso field if non-nil, zero value otherwise. - -### GetSsoOk - -`func (o *OidcApp) GetSsoOk() (*SsoOidc, bool)` - -GetSsoOk returns a tuple with the Sso field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSso - -`func (o *OidcApp) SetSso(v SsoOidc)` - -SetSso sets Sso field to given value. - -### HasSso - -`func (o *OidcApp) HasSso() bool` - -HasSso 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/OidcAppAllOf.md b/docs/OidcAppAllOf.md deleted file mode 100644 index 3a1a1d4..0000000 --- a/docs/OidcAppAllOf.md +++ /dev/null @@ -1,77 +0,0 @@ -# OidcAppAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Configuration** | [**ConfigurationOidc**](ConfigurationOidc.md) | | -**Sso** | Pointer to [**SsoOidc**](SsoOidc.md) | | [optional] - -## Methods - -### NewOidcAppAllOf - -`func NewOidcAppAllOf(configuration ConfigurationOidc, ) *OidcAppAllOf` - -NewOidcAppAllOf instantiates a new OidcAppAllOf 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 - -### NewOidcAppAllOfWithDefaults - -`func NewOidcAppAllOfWithDefaults() *OidcAppAllOf` - -NewOidcAppAllOfWithDefaults instantiates a new OidcAppAllOf 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 - -### GetConfiguration - -`func (o *OidcAppAllOf) GetConfiguration() ConfigurationOidc` - -GetConfiguration returns the Configuration field if non-nil, zero value otherwise. - -### GetConfigurationOk - -`func (o *OidcAppAllOf) GetConfigurationOk() (*ConfigurationOidc, bool)` - -GetConfigurationOk returns a tuple with the Configuration field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConfiguration - -`func (o *OidcAppAllOf) SetConfiguration(v ConfigurationOidc)` - -SetConfiguration sets Configuration field to given value. - - -### GetSso - -`func (o *OidcAppAllOf) GetSso() SsoOidc` - -GetSso returns the Sso field if non-nil, zero value otherwise. - -### GetSsoOk - -`func (o *OidcAppAllOf) GetSsoOk() (*SsoOidc, bool)` - -GetSsoOk returns a tuple with the Sso field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSso - -`func (o *OidcAppAllOf) SetSso(v SsoOidc)` - -SetSso sets Sso field to given value. - -### HasSso - -`func (o *OidcAppAllOf) HasSso() bool` - -HasSso 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/OtpDevice.md b/docs/OtpDevice.md deleted file mode 100644 index 16c7fba..0000000 --- a/docs/OtpDevice.md +++ /dev/null @@ -1,119 +0,0 @@ -# OtpDevice - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**FactorId** | **int32** | The identifier of the factor to enroll the user with. | [readonly] -**DisplayName** | **string** | A name for the users device | -**Number** | **string** | The phone number of the user in E.164 format. | -**Verified** | Pointer to **bool** | Defaults to false. Some factors like SMS or Voice require that a user recieve a token and then that token is supplied to the Verify endpoint before the device is considered active. You can set verfied to `true` which indicates the the users phone number is pre verified and the device can be immediately activated. | [optional] - -## Methods - -### NewOtpDevice - -`func NewOtpDevice(factorId int32, displayName string, number string, ) *OtpDevice` - -NewOtpDevice instantiates a new OtpDevice 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 - -### NewOtpDeviceWithDefaults - -`func NewOtpDeviceWithDefaults() *OtpDevice` - -NewOtpDeviceWithDefaults instantiates a new OtpDevice 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 - -### GetFactorId - -`func (o *OtpDevice) GetFactorId() int32` - -GetFactorId returns the FactorId field if non-nil, zero value otherwise. - -### GetFactorIdOk - -`func (o *OtpDevice) GetFactorIdOk() (*int32, bool)` - -GetFactorIdOk returns a tuple with the FactorId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetFactorId - -`func (o *OtpDevice) SetFactorId(v int32)` - -SetFactorId sets FactorId field to given value. - - -### GetDisplayName - -`func (o *OtpDevice) GetDisplayName() string` - -GetDisplayName returns the DisplayName field if non-nil, zero value otherwise. - -### GetDisplayNameOk - -`func (o *OtpDevice) GetDisplayNameOk() (*string, bool)` - -GetDisplayNameOk returns a tuple with the DisplayName field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDisplayName - -`func (o *OtpDevice) SetDisplayName(v string)` - -SetDisplayName sets DisplayName field to given value. - - -### GetNumber - -`func (o *OtpDevice) GetNumber() string` - -GetNumber returns the Number field if non-nil, zero value otherwise. - -### GetNumberOk - -`func (o *OtpDevice) GetNumberOk() (*string, bool)` - -GetNumberOk returns a tuple with the Number field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetNumber - -`func (o *OtpDevice) SetNumber(v string)` - -SetNumber sets Number field to given value. - - -### GetVerified - -`func (o *OtpDevice) GetVerified() bool` - -GetVerified returns the Verified field if non-nil, zero value otherwise. - -### GetVerifiedOk - -`func (o *OtpDevice) GetVerifiedOk() (*bool, bool)` - -GetVerifiedOk returns a tuple with the Verified field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetVerified - -`func (o *OtpDevice) SetVerified(v bool)` - -SetVerified sets Verified field to given value. - -### HasVerified - -`func (o *OtpDevice) HasVerified() bool` - -HasVerified 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/Privilege.md b/docs/Privilege.md deleted file mode 100644 index 641a89e..0000000 --- a/docs/Privilege.md +++ /dev/null @@ -1,124 +0,0 @@ -# Privilege - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | Pointer to **string** | | [optional] -**Name** | **string** | | -**Description** | Pointer to **string** | | [optional] -**Privilege** | [**PrivilegePrivilege**](PrivilegePrivilege.md) | | - -## Methods - -### NewPrivilege - -`func NewPrivilege(name string, privilege PrivilegePrivilege, ) *Privilege` - -NewPrivilege instantiates a new Privilege 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 - -### NewPrivilegeWithDefaults - -`func NewPrivilegeWithDefaults() *Privilege` - -NewPrivilegeWithDefaults instantiates a new Privilege 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 - -### GetId - -`func (o *Privilege) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *Privilege) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *Privilege) SetId(v string)` - -SetId sets Id field to given value. - -### HasId - -`func (o *Privilege) HasId() bool` - -HasId returns a boolean if a field has been set. - -### GetName - -`func (o *Privilege) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *Privilege) 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 *Privilege) SetName(v string)` - -SetName sets Name field to given value. - - -### GetDescription - -`func (o *Privilege) GetDescription() string` - -GetDescription returns the Description field if non-nil, zero value otherwise. - -### GetDescriptionOk - -`func (o *Privilege) GetDescriptionOk() (*string, bool)` - -GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDescription - -`func (o *Privilege) SetDescription(v string)` - -SetDescription sets Description field to given value. - -### HasDescription - -`func (o *Privilege) HasDescription() bool` - -HasDescription returns a boolean if a field has been set. - -### GetPrivilege - -`func (o *Privilege) GetPrivilege() PrivilegePrivilege` - -GetPrivilege returns the Privilege field if non-nil, zero value otherwise. - -### GetPrivilegeOk - -`func (o *Privilege) GetPrivilegeOk() (*PrivilegePrivilege, bool)` - -GetPrivilegeOk returns a tuple with the Privilege field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPrivilege - -`func (o *Privilege) SetPrivilege(v PrivilegePrivilege)` - -SetPrivilege sets Privilege 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/PrivilegePrivilege.md b/docs/PrivilegePrivilege.md deleted file mode 100644 index ac07fff..0000000 --- a/docs/PrivilegePrivilege.md +++ /dev/null @@ -1,82 +0,0 @@ -# PrivilegePrivilege - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Version** | Pointer to **string** | | [optional] -**Statement** | Pointer to [**[]PrivilegePrivilegeStatementInner**](PrivilegePrivilegeStatementInner.md) | | [optional] - -## Methods - -### NewPrivilegePrivilege - -`func NewPrivilegePrivilege() *PrivilegePrivilege` - -NewPrivilegePrivilege instantiates a new PrivilegePrivilege 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 - -### NewPrivilegePrivilegeWithDefaults - -`func NewPrivilegePrivilegeWithDefaults() *PrivilegePrivilege` - -NewPrivilegePrivilegeWithDefaults instantiates a new PrivilegePrivilege 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 - -### GetVersion - -`func (o *PrivilegePrivilege) GetVersion() string` - -GetVersion returns the Version field if non-nil, zero value otherwise. - -### GetVersionOk - -`func (o *PrivilegePrivilege) GetVersionOk() (*string, bool)` - -GetVersionOk returns a tuple with the Version field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetVersion - -`func (o *PrivilegePrivilege) SetVersion(v string)` - -SetVersion sets Version field to given value. - -### HasVersion - -`func (o *PrivilegePrivilege) HasVersion() bool` - -HasVersion returns a boolean if a field has been set. - -### GetStatement - -`func (o *PrivilegePrivilege) GetStatement() []PrivilegePrivilegeStatementInner` - -GetStatement returns the Statement field if non-nil, zero value otherwise. - -### GetStatementOk - -`func (o *PrivilegePrivilege) GetStatementOk() (*[]PrivilegePrivilegeStatementInner, bool)` - -GetStatementOk returns a tuple with the Statement field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStatement - -`func (o *PrivilegePrivilege) SetStatement(v []PrivilegePrivilegeStatementInner)` - -SetStatement sets Statement field to given value. - -### HasStatement - -`func (o *PrivilegePrivilege) HasStatement() bool` - -HasStatement 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/PrivilegePrivilegeStatementInner.md b/docs/PrivilegePrivilegeStatementInner.md deleted file mode 100644 index 855e333..0000000 --- a/docs/PrivilegePrivilegeStatementInner.md +++ /dev/null @@ -1,93 +0,0 @@ -# PrivilegePrivilegeStatementInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Effect** | **string** | Set to “Allow.” By default, all actions are denied, this Statement allows the listed actions to be executed. | -**Action** | **[]string** | An array of strings that represent actions within OneLogin. Actions are prefixed with the class of object they are related to and followed by a specific action for the given class. e.g. users:List, where the class is users and the specific action is List. Don’t mix classes within an Action array. To create a privilege that includes multiple different classes, create multiple statements. A wildcard * that includes all actions is supported. Use wildcards to create a Super User privilege. | -**Scope** | **[]string** | Target the privileged action against specific resources with the scope. The scope pattern is the class of object used by the Action, followed by an ID that represents a resource in OneLogin. e.g. apps/1234, where apps is the class and 1234 is the ID of an app. The wildcard * is supported and indicates that all resources of the class type declared, in the Action, are in scope. The Action and Scope classes must match. However, there is an exception, a scope of roles/{role_id} can be combined with Actions on the user or app class. The exception allows you to target groups of users or apps with specific actions. | - -## Methods - -### NewPrivilegePrivilegeStatementInner - -`func NewPrivilegePrivilegeStatementInner(effect string, action []string, scope []string, ) *PrivilegePrivilegeStatementInner` - -NewPrivilegePrivilegeStatementInner instantiates a new PrivilegePrivilegeStatementInner 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 - -### NewPrivilegePrivilegeStatementInnerWithDefaults - -`func NewPrivilegePrivilegeStatementInnerWithDefaults() *PrivilegePrivilegeStatementInner` - -NewPrivilegePrivilegeStatementInnerWithDefaults instantiates a new PrivilegePrivilegeStatementInner 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 - -### GetEffect - -`func (o *PrivilegePrivilegeStatementInner) GetEffect() string` - -GetEffect returns the Effect field if non-nil, zero value otherwise. - -### GetEffectOk - -`func (o *PrivilegePrivilegeStatementInner) GetEffectOk() (*string, bool)` - -GetEffectOk returns a tuple with the Effect field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetEffect - -`func (o *PrivilegePrivilegeStatementInner) SetEffect(v string)` - -SetEffect sets Effect field to given value. - - -### GetAction - -`func (o *PrivilegePrivilegeStatementInner) GetAction() []string` - -GetAction returns the Action field if non-nil, zero value otherwise. - -### GetActionOk - -`func (o *PrivilegePrivilegeStatementInner) GetActionOk() (*[]string, bool)` - -GetActionOk returns a tuple with the Action field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAction - -`func (o *PrivilegePrivilegeStatementInner) SetAction(v []string)` - -SetAction sets Action field to given value. - - -### GetScope - -`func (o *PrivilegePrivilegeStatementInner) GetScope() []string` - -GetScope returns the Scope field if non-nil, zero value otherwise. - -### GetScopeOk - -`func (o *PrivilegePrivilegeStatementInner) GetScopeOk() (*[]string, bool)` - -GetScopeOk returns a tuple with the Scope field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetScope - -`func (o *PrivilegePrivilegeStatementInner) SetScope(v []string)` - -SetScope sets Scope 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/PrivilegesApi.md b/docs/PrivilegesApi.md deleted file mode 100644 index e7c5222..0000000 --- a/docs/PrivilegesApi.md +++ /dev/null @@ -1,782 +0,0 @@ -# \PrivilegesApi - -All URIs are relative to *https://your-api-subdomain.onelogin.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**AddPrivilegeToRole**](PrivilegesApi.md#AddPrivilegeToRole) | **Post** /api/1/privileges/{privilege_id}/roles | Assign a Privilege to Roles -[**AssignUsersToPrivilege**](PrivilegesApi.md#AssignUsersToPrivilege) | **Post** /api/1/privileges/{privilege_id}/users | Assign Users to a Privilege -[**CreatePrivilege**](PrivilegesApi.md#CreatePrivilege) | **Post** /api/1/privileges | Create a Privilege -[**DeletePrivilege**](PrivilegesApi.md#DeletePrivilege) | **Delete** /api/1/privileges/{privilege_id} | Delete a Privilege -[**DeleteRoleFromPrivilege**](PrivilegesApi.md#DeleteRoleFromPrivilege) | **Delete** /api/1/privileges/{privilege_id}/roles/{role_id} | Remove a Privilege from a Role -[**GetAssignedUser**](PrivilegesApi.md#GetAssignedUser) | **Get** /api/1/privileges/{privilege_id}/users | Get Users assigned to a Privilege -[**GetPrivilege**](PrivilegesApi.md#GetPrivilege) | **Get** /api/1/privileges/{privilege_id} | Get a Privilege -[**ListPrivelegeRoles**](PrivilegesApi.md#ListPrivelegeRoles) | **Get** /api/1/privileges/{privilege_id}/roles | Get Roles assigned to Privilege -[**ListPriveleges**](PrivilegesApi.md#ListPriveleges) | **Get** /api/1/privileges | List Privileges -[**RemoveUserFromPrivilege**](PrivilegesApi.md#RemoveUserFromPrivilege) | **Delete** /api/1/privileges/{privilege_id}/users/{user_id} | Remove a Privilege from Users -[**UpdatePrivilege**](PrivilegesApi.md#UpdatePrivilege) | **Put** /api/1/privileges/{privilege_id} | Update a Privilege - - - -## AddPrivilegeToRole - -> AddPrivilegeToRole201Response AddPrivilegeToRole(ctx, privilegeId).AddPrivilegeToRoleRequest(addPrivilegeToRoleRequest).Execute() - -Assign a Privilege to Roles - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - privilegeId := "privilegeId_example" // string | - addPrivilegeToRoleRequest := *openapiclient.NewAddPrivilegeToRoleRequest() // AddPrivilegeToRoleRequest | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.PrivilegesApi.AddPrivilegeToRole(context.Background(), privilegeId).AddPrivilegeToRoleRequest(addPrivilegeToRoleRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `PrivilegesApi.AddPrivilegeToRole``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AddPrivilegeToRole`: AddPrivilegeToRole201Response - fmt.Fprintf(os.Stdout, "Response from `PrivilegesApi.AddPrivilegeToRole`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**privilegeId** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiAddPrivilegeToRoleRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **addPrivilegeToRoleRequest** | [**AddPrivilegeToRoleRequest**](AddPrivilegeToRoleRequest.md) | | - -### Return type - -[**AddPrivilegeToRole201Response**](AddPrivilegeToRole201Response.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## AssignUsersToPrivilege - -> AddPrivilegeToRole201Response AssignUsersToPrivilege(ctx, privilegeId).AssignUsersToPrivilegeRequest(assignUsersToPrivilegeRequest).Execute() - -Assign Users to a Privilege - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - privilegeId := "privilegeId_example" // string | - assignUsersToPrivilegeRequest := *openapiclient.NewAssignUsersToPrivilegeRequest() // AssignUsersToPrivilegeRequest | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.PrivilegesApi.AssignUsersToPrivilege(context.Background(), privilegeId).AssignUsersToPrivilegeRequest(assignUsersToPrivilegeRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `PrivilegesApi.AssignUsersToPrivilege``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AssignUsersToPrivilege`: AddPrivilegeToRole201Response - fmt.Fprintf(os.Stdout, "Response from `PrivilegesApi.AssignUsersToPrivilege`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**privilegeId** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiAssignUsersToPrivilegeRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **assignUsersToPrivilegeRequest** | [**AssignUsersToPrivilegeRequest**](AssignUsersToPrivilegeRequest.md) | | - -### Return type - -[**AddPrivilegeToRole201Response**](AddPrivilegeToRole201Response.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## CreatePrivilege - -> CreatePrivilege200Response CreatePrivilege(ctx).Privilege(privilege).Execute() - -Create a Privilege - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - privilege := *openapiclient.NewPrivilege("User Administrator", *openapiclient.NewPrivilegePrivilege()) // Privilege | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.PrivilegesApi.CreatePrivilege(context.Background()).Privilege(privilege).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `PrivilegesApi.CreatePrivilege``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `CreatePrivilege`: CreatePrivilege200Response - fmt.Fprintf(os.Stdout, "Response from `PrivilegesApi.CreatePrivilege`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiCreatePrivilegeRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **privilege** | [**Privilege**](Privilege.md) | | - -### Return type - -[**CreatePrivilege200Response**](CreatePrivilege200Response.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## DeletePrivilege - -> DeletePrivilege(ctx, privilegeId).Execute() - -Delete a Privilege - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - privilegeId := "privilegeId_example" // string | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.PrivilegesApi.DeletePrivilege(context.Background(), privilegeId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `PrivilegesApi.DeletePrivilege``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**privilegeId** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiDeletePrivilegeRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - - (empty response body) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## DeleteRoleFromPrivilege - -> DeleteRoleFromPrivilege(ctx, privilegeId, roleId).Execute() - -Remove a Privilege from a Role - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - privilegeId := "privilegeId_example" // string | - roleId := "roleId_example" // string | Set to the id of the role you want to return. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.PrivilegesApi.DeleteRoleFromPrivilege(context.Background(), privilegeId, roleId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `PrivilegesApi.DeleteRoleFromPrivilege``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**privilegeId** | **string** | | -**roleId** | **string** | Set to the id of the role you want to return. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiDeleteRoleFromPrivilegeRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - -### Return type - - (empty response body) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetAssignedUser - -> GetAssignedUser200Response GetAssignedUser(ctx, privilegeId).Execute() - -Get Users assigned to a Privilege - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - privilegeId := "privilegeId_example" // string | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.PrivilegesApi.GetAssignedUser(context.Background(), privilegeId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `PrivilegesApi.GetAssignedUser``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetAssignedUser`: GetAssignedUser200Response - fmt.Fprintf(os.Stdout, "Response from `PrivilegesApi.GetAssignedUser`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**privilegeId** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetAssignedUserRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**GetAssignedUser200Response**](GetAssignedUser200Response.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetPrivilege - -> Privilege GetPrivilege(ctx, privilegeId).Execute() - -Get a Privilege - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - privilegeId := "privilegeId_example" // string | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.PrivilegesApi.GetPrivilege(context.Background(), privilegeId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `PrivilegesApi.GetPrivilege``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetPrivilege`: Privilege - fmt.Fprintf(os.Stdout, "Response from `PrivilegesApi.GetPrivilege`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**privilegeId** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetPrivilegeRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**Privilege**](Privilege.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## ListPrivelegeRoles - -> ListPrivelegeRoles200Response ListPrivelegeRoles(ctx, privilegeId).Execute() - -Get Roles assigned to Privilege - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - privilegeId := "privilegeId_example" // string | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.PrivilegesApi.ListPrivelegeRoles(context.Background(), privilegeId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `PrivilegesApi.ListPrivelegeRoles``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ListPrivelegeRoles`: ListPrivelegeRoles200Response - fmt.Fprintf(os.Stdout, "Response from `PrivilegesApi.ListPrivelegeRoles`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**privilegeId** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiListPrivelegeRolesRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**ListPrivelegeRoles200Response**](ListPrivelegeRoles200Response.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## ListPriveleges - -> []Privilege ListPriveleges(ctx).Execute() - -List Privileges - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.PrivilegesApi.ListPriveleges(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `PrivilegesApi.ListPriveleges``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ListPriveleges`: []Privilege - fmt.Fprintf(os.Stdout, "Response from `PrivilegesApi.ListPriveleges`: %v\n", resp) -} -``` - -### Path Parameters - -This endpoint does not need any parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a apiListPrivelegesRequest struct via the builder pattern - - -### Return type - -[**[]Privilege**](Privilege.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## RemoveUserFromPrivilege - -> RemoveUserFromPrivilege(ctx, privilegeId, userId).Execute() - -Remove a Privilege from Users - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - privilegeId := "privilegeId_example" // string | - userId := int32(56) // int32 | Set to the id of the user that you want to return. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.PrivilegesApi.RemoveUserFromPrivilege(context.Background(), privilegeId, userId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `PrivilegesApi.RemoveUserFromPrivilege``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**privilegeId** | **string** | | -**userId** | **int32** | Set to the id of the user that you want to return. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiRemoveUserFromPrivilegeRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - -### Return type - - (empty response body) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## UpdatePrivilege - -> UpdatePrivilege200Response UpdatePrivilege(ctx, privilegeId).Privilege(privilege).Execute() - -Update a Privilege - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - privilegeId := "privilegeId_example" // string | - privilege := *openapiclient.NewPrivilege("User Administrator", *openapiclient.NewPrivilegePrivilege()) // Privilege | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.PrivilegesApi.UpdatePrivilege(context.Background(), privilegeId).Privilege(privilege).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `PrivilegesApi.UpdatePrivilege``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `UpdatePrivilege`: UpdatePrivilege200Response - fmt.Fprintf(os.Stdout, "Response from `PrivilegesApi.UpdatePrivilege`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**privilegeId** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiUpdatePrivilegeRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **privilege** | [**Privilege**](Privilege.md) | | - -### Return type - -[**UpdatePrivilege200Response**](UpdatePrivilege200Response.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/docs/RateLimit.md b/docs/RateLimit.md deleted file mode 100644 index 5a4f1f4..0000000 --- a/docs/RateLimit.md +++ /dev/null @@ -1,108 +0,0 @@ -# RateLimit - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**XRateLimitLimit** | Pointer to **int32** | Rate Limit Limit | [optional] -**XRateLimitRemaining** | Pointer to **int32** | Rate Limit Remaining | [optional] -**XRateLimitReset** | Pointer to **int32** | Rate Limit Reset | [optional] - -## Methods - -### NewRateLimit - -`func NewRateLimit() *RateLimit` - -NewRateLimit instantiates a new RateLimit 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 - -### NewRateLimitWithDefaults - -`func NewRateLimitWithDefaults() *RateLimit` - -NewRateLimitWithDefaults instantiates a new RateLimit 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 - -### GetXRateLimitLimit - -`func (o *RateLimit) GetXRateLimitLimit() int32` - -GetXRateLimitLimit returns the XRateLimitLimit field if non-nil, zero value otherwise. - -### GetXRateLimitLimitOk - -`func (o *RateLimit) GetXRateLimitLimitOk() (*int32, bool)` - -GetXRateLimitLimitOk returns a tuple with the XRateLimitLimit field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetXRateLimitLimit - -`func (o *RateLimit) SetXRateLimitLimit(v int32)` - -SetXRateLimitLimit sets XRateLimitLimit field to given value. - -### HasXRateLimitLimit - -`func (o *RateLimit) HasXRateLimitLimit() bool` - -HasXRateLimitLimit returns a boolean if a field has been set. - -### GetXRateLimitRemaining - -`func (o *RateLimit) GetXRateLimitRemaining() int32` - -GetXRateLimitRemaining returns the XRateLimitRemaining field if non-nil, zero value otherwise. - -### GetXRateLimitRemainingOk - -`func (o *RateLimit) GetXRateLimitRemainingOk() (*int32, bool)` - -GetXRateLimitRemainingOk returns a tuple with the XRateLimitRemaining field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetXRateLimitRemaining - -`func (o *RateLimit) SetXRateLimitRemaining(v int32)` - -SetXRateLimitRemaining sets XRateLimitRemaining field to given value. - -### HasXRateLimitRemaining - -`func (o *RateLimit) HasXRateLimitRemaining() bool` - -HasXRateLimitRemaining returns a boolean if a field has been set. - -### GetXRateLimitReset - -`func (o *RateLimit) GetXRateLimitReset() int32` - -GetXRateLimitReset returns the XRateLimitReset field if non-nil, zero value otherwise. - -### GetXRateLimitResetOk - -`func (o *RateLimit) GetXRateLimitResetOk() (*int32, bool)` - -GetXRateLimitResetOk returns a tuple with the XRateLimitReset field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetXRateLimitReset - -`func (o *RateLimit) SetXRateLimitReset(v int32)` - -SetXRateLimitReset sets XRateLimitReset field to given value. - -### HasXRateLimitReset - -`func (o *RateLimit) HasXRateLimitReset() bool` - -HasXRateLimitReset 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/RemoveRoleUsersRequest.md b/docs/RemoveRoleUsersRequest.md deleted file mode 100644 index fc29925..0000000 --- a/docs/RemoveRoleUsersRequest.md +++ /dev/null @@ -1,56 +0,0 @@ -# RemoveRoleUsersRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**UserId** | Pointer to **[]int32** | | [optional] - -## Methods - -### NewRemoveRoleUsersRequest - -`func NewRemoveRoleUsersRequest() *RemoveRoleUsersRequest` - -NewRemoveRoleUsersRequest instantiates a new RemoveRoleUsersRequest 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 - -### NewRemoveRoleUsersRequestWithDefaults - -`func NewRemoveRoleUsersRequestWithDefaults() *RemoveRoleUsersRequest` - -NewRemoveRoleUsersRequestWithDefaults instantiates a new RemoveRoleUsersRequest 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 - -### GetUserId - -`func (o *RemoveRoleUsersRequest) GetUserId() []int32` - -GetUserId returns the UserId field if non-nil, zero value otherwise. - -### GetUserIdOk - -`func (o *RemoveRoleUsersRequest) GetUserIdOk() (*[]int32, bool)` - -GetUserIdOk returns a tuple with the UserId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUserId - -`func (o *RemoveRoleUsersRequest) SetUserId(v []int32)` - -SetUserId sets UserId field to given value. - -### HasUserId - -`func (o *RemoveRoleUsersRequest) HasUserId() bool` - -HasUserId 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/RemoveUserRoleRequest.md b/docs/RemoveUserRoleRequest.md deleted file mode 100644 index f050949..0000000 --- a/docs/RemoveUserRoleRequest.md +++ /dev/null @@ -1,51 +0,0 @@ -# RemoveUserRoleRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**RoleIdArray** | [**[]RemoveUserRoleRequestRoleIdArrayInner**](RemoveUserRoleRequestRoleIdArrayInner.md) | | - -## Methods - -### NewRemoveUserRoleRequest - -`func NewRemoveUserRoleRequest(roleIdArray []RemoveUserRoleRequestRoleIdArrayInner, ) *RemoveUserRoleRequest` - -NewRemoveUserRoleRequest instantiates a new RemoveUserRoleRequest 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 - -### NewRemoveUserRoleRequestWithDefaults - -`func NewRemoveUserRoleRequestWithDefaults() *RemoveUserRoleRequest` - -NewRemoveUserRoleRequestWithDefaults instantiates a new RemoveUserRoleRequest 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 - -### GetRoleIdArray - -`func (o *RemoveUserRoleRequest) GetRoleIdArray() []RemoveUserRoleRequestRoleIdArrayInner` - -GetRoleIdArray returns the RoleIdArray field if non-nil, zero value otherwise. - -### GetRoleIdArrayOk - -`func (o *RemoveUserRoleRequest) GetRoleIdArrayOk() (*[]RemoveUserRoleRequestRoleIdArrayInner, bool)` - -GetRoleIdArrayOk returns a tuple with the RoleIdArray field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRoleIdArray - -`func (o *RemoveUserRoleRequest) SetRoleIdArray(v []RemoveUserRoleRequestRoleIdArrayInner)` - -SetRoleIdArray sets RoleIdArray 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/RemoveUserRoleRequestRoleIdArrayInner.md b/docs/RemoveUserRoleRequestRoleIdArrayInner.md deleted file mode 100644 index 03f0f4d..0000000 --- a/docs/RemoveUserRoleRequestRoleIdArrayInner.md +++ /dev/null @@ -1,56 +0,0 @@ -# RemoveUserRoleRequestRoleIdArrayInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**RoleId** | Pointer to **int32** | | [optional] - -## Methods - -### NewRemoveUserRoleRequestRoleIdArrayInner - -`func NewRemoveUserRoleRequestRoleIdArrayInner() *RemoveUserRoleRequestRoleIdArrayInner` - -NewRemoveUserRoleRequestRoleIdArrayInner instantiates a new RemoveUserRoleRequestRoleIdArrayInner 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 - -### NewRemoveUserRoleRequestRoleIdArrayInnerWithDefaults - -`func NewRemoveUserRoleRequestRoleIdArrayInnerWithDefaults() *RemoveUserRoleRequestRoleIdArrayInner` - -NewRemoveUserRoleRequestRoleIdArrayInnerWithDefaults instantiates a new RemoveUserRoleRequestRoleIdArrayInner 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 - -### GetRoleId - -`func (o *RemoveUserRoleRequestRoleIdArrayInner) GetRoleId() int32` - -GetRoleId returns the RoleId field if non-nil, zero value otherwise. - -### GetRoleIdOk - -`func (o *RemoveUserRoleRequestRoleIdArrayInner) GetRoleIdOk() (*int32, bool)` - -GetRoleIdOk returns a tuple with the RoleId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRoleId - -`func (o *RemoveUserRoleRequestRoleIdArrayInner) SetRoleId(v int32)` - -SetRoleId sets RoleId field to given value. - -### HasRoleId - -`func (o *RemoveUserRoleRequestRoleIdArrayInner) HasRoleId() bool` - -HasRoleId 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/RequestBrand.md b/docs/RequestBrand.md deleted file mode 100644 index 4b1af7b..0000000 --- a/docs/RequestBrand.md +++ /dev/null @@ -1,415 +0,0 @@ -# RequestBrand - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Enabled** | Pointer to **bool** | Indicates if the brand is enabled or not | [optional] [default to false] -**Name** | **string** | Brand’s name for humans. This isn’t related to subdomains. | -**CustomSupportEnabled** | Pointer to **bool** | Indicates if the custom support is enabled. If enabled, the login page includes the ability to submit a support request. | [optional] -**CustomColor** | Pointer to **string** | Primary brand color | [optional] -**CustomAccentColor** | Pointer to **string** | Secondary brand color | [optional] -**CustomMaskingColor** | Pointer to **string** | Color for the masking layer above the background image of the branded login screen. | [optional] -**CustomMaskingOpacity** | Pointer to **int32** | Opacity for the custom_masking_color. | [optional] -**EnableCustomLabelForLoginScreen** | Pointer to **bool** | Indicates if the custom Username/Email field label is enabled or not | [optional] -**CustomLabelTextForLoginScreen** | Pointer to **string** | Custom label for the Username/Email field on the login screen. See example here. | [optional] -**LoginInstructionTitle** | Pointer to **string** | Link text to show login instruction screen. | [optional] -**LoginInstruction** | Pointer to **string** | Text for the login instruction screen, styled in Markdown. | [optional] -**HideOneloginFooter** | Pointer to **bool** | Indicates if the OneLogin footer will appear at the bottom of the login page. | [optional] -**MfaEnrollmentMessage** | Pointer to **string** | Text that replaces the default text displayed on the initial screen of the MFA Registration. | [optional] -**Background** | Pointer to **string** | Base64 encoded image data (JPG/PNG, <5MB) | [optional] -**Logo** | Pointer to **string** | Base64 encoded image data (PNG, <1MB) | [optional] - -## Methods - -### NewRequestBrand - -`func NewRequestBrand(name string, ) *RequestBrand` - -NewRequestBrand instantiates a new RequestBrand 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 - -### NewRequestBrandWithDefaults - -`func NewRequestBrandWithDefaults() *RequestBrand` - -NewRequestBrandWithDefaults instantiates a new RequestBrand 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 - -### GetEnabled - -`func (o *RequestBrand) GetEnabled() bool` - -GetEnabled returns the Enabled field if non-nil, zero value otherwise. - -### GetEnabledOk - -`func (o *RequestBrand) 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 *RequestBrand) SetEnabled(v bool)` - -SetEnabled sets Enabled field to given value. - -### HasEnabled - -`func (o *RequestBrand) HasEnabled() bool` - -HasEnabled returns a boolean if a field has been set. - -### GetName - -`func (o *RequestBrand) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *RequestBrand) 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 *RequestBrand) SetName(v string)` - -SetName sets Name field to given value. - - -### GetCustomSupportEnabled - -`func (o *RequestBrand) GetCustomSupportEnabled() bool` - -GetCustomSupportEnabled returns the CustomSupportEnabled field if non-nil, zero value otherwise. - -### GetCustomSupportEnabledOk - -`func (o *RequestBrand) GetCustomSupportEnabledOk() (*bool, bool)` - -GetCustomSupportEnabledOk returns a tuple with the CustomSupportEnabled field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCustomSupportEnabled - -`func (o *RequestBrand) SetCustomSupportEnabled(v bool)` - -SetCustomSupportEnabled sets CustomSupportEnabled field to given value. - -### HasCustomSupportEnabled - -`func (o *RequestBrand) HasCustomSupportEnabled() bool` - -HasCustomSupportEnabled returns a boolean if a field has been set. - -### GetCustomColor - -`func (o *RequestBrand) GetCustomColor() string` - -GetCustomColor returns the CustomColor field if non-nil, zero value otherwise. - -### GetCustomColorOk - -`func (o *RequestBrand) GetCustomColorOk() (*string, bool)` - -GetCustomColorOk returns a tuple with the CustomColor field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCustomColor - -`func (o *RequestBrand) SetCustomColor(v string)` - -SetCustomColor sets CustomColor field to given value. - -### HasCustomColor - -`func (o *RequestBrand) HasCustomColor() bool` - -HasCustomColor returns a boolean if a field has been set. - -### GetCustomAccentColor - -`func (o *RequestBrand) GetCustomAccentColor() string` - -GetCustomAccentColor returns the CustomAccentColor field if non-nil, zero value otherwise. - -### GetCustomAccentColorOk - -`func (o *RequestBrand) GetCustomAccentColorOk() (*string, bool)` - -GetCustomAccentColorOk returns a tuple with the CustomAccentColor field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCustomAccentColor - -`func (o *RequestBrand) SetCustomAccentColor(v string)` - -SetCustomAccentColor sets CustomAccentColor field to given value. - -### HasCustomAccentColor - -`func (o *RequestBrand) HasCustomAccentColor() bool` - -HasCustomAccentColor returns a boolean if a field has been set. - -### GetCustomMaskingColor - -`func (o *RequestBrand) GetCustomMaskingColor() string` - -GetCustomMaskingColor returns the CustomMaskingColor field if non-nil, zero value otherwise. - -### GetCustomMaskingColorOk - -`func (o *RequestBrand) GetCustomMaskingColorOk() (*string, bool)` - -GetCustomMaskingColorOk returns a tuple with the CustomMaskingColor field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCustomMaskingColor - -`func (o *RequestBrand) SetCustomMaskingColor(v string)` - -SetCustomMaskingColor sets CustomMaskingColor field to given value. - -### HasCustomMaskingColor - -`func (o *RequestBrand) HasCustomMaskingColor() bool` - -HasCustomMaskingColor returns a boolean if a field has been set. - -### GetCustomMaskingOpacity - -`func (o *RequestBrand) GetCustomMaskingOpacity() int32` - -GetCustomMaskingOpacity returns the CustomMaskingOpacity field if non-nil, zero value otherwise. - -### GetCustomMaskingOpacityOk - -`func (o *RequestBrand) GetCustomMaskingOpacityOk() (*int32, bool)` - -GetCustomMaskingOpacityOk returns a tuple with the CustomMaskingOpacity field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCustomMaskingOpacity - -`func (o *RequestBrand) SetCustomMaskingOpacity(v int32)` - -SetCustomMaskingOpacity sets CustomMaskingOpacity field to given value. - -### HasCustomMaskingOpacity - -`func (o *RequestBrand) HasCustomMaskingOpacity() bool` - -HasCustomMaskingOpacity returns a boolean if a field has been set. - -### GetEnableCustomLabelForLoginScreen - -`func (o *RequestBrand) GetEnableCustomLabelForLoginScreen() bool` - -GetEnableCustomLabelForLoginScreen returns the EnableCustomLabelForLoginScreen field if non-nil, zero value otherwise. - -### GetEnableCustomLabelForLoginScreenOk - -`func (o *RequestBrand) GetEnableCustomLabelForLoginScreenOk() (*bool, bool)` - -GetEnableCustomLabelForLoginScreenOk returns a tuple with the EnableCustomLabelForLoginScreen field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetEnableCustomLabelForLoginScreen - -`func (o *RequestBrand) SetEnableCustomLabelForLoginScreen(v bool)` - -SetEnableCustomLabelForLoginScreen sets EnableCustomLabelForLoginScreen field to given value. - -### HasEnableCustomLabelForLoginScreen - -`func (o *RequestBrand) HasEnableCustomLabelForLoginScreen() bool` - -HasEnableCustomLabelForLoginScreen returns a boolean if a field has been set. - -### GetCustomLabelTextForLoginScreen - -`func (o *RequestBrand) GetCustomLabelTextForLoginScreen() string` - -GetCustomLabelTextForLoginScreen returns the CustomLabelTextForLoginScreen field if non-nil, zero value otherwise. - -### GetCustomLabelTextForLoginScreenOk - -`func (o *RequestBrand) GetCustomLabelTextForLoginScreenOk() (*string, bool)` - -GetCustomLabelTextForLoginScreenOk returns a tuple with the CustomLabelTextForLoginScreen field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCustomLabelTextForLoginScreen - -`func (o *RequestBrand) SetCustomLabelTextForLoginScreen(v string)` - -SetCustomLabelTextForLoginScreen sets CustomLabelTextForLoginScreen field to given value. - -### HasCustomLabelTextForLoginScreen - -`func (o *RequestBrand) HasCustomLabelTextForLoginScreen() bool` - -HasCustomLabelTextForLoginScreen returns a boolean if a field has been set. - -### GetLoginInstructionTitle - -`func (o *RequestBrand) GetLoginInstructionTitle() string` - -GetLoginInstructionTitle returns the LoginInstructionTitle field if non-nil, zero value otherwise. - -### GetLoginInstructionTitleOk - -`func (o *RequestBrand) GetLoginInstructionTitleOk() (*string, bool)` - -GetLoginInstructionTitleOk returns a tuple with the LoginInstructionTitle field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLoginInstructionTitle - -`func (o *RequestBrand) SetLoginInstructionTitle(v string)` - -SetLoginInstructionTitle sets LoginInstructionTitle field to given value. - -### HasLoginInstructionTitle - -`func (o *RequestBrand) HasLoginInstructionTitle() bool` - -HasLoginInstructionTitle returns a boolean if a field has been set. - -### GetLoginInstruction - -`func (o *RequestBrand) GetLoginInstruction() string` - -GetLoginInstruction returns the LoginInstruction field if non-nil, zero value otherwise. - -### GetLoginInstructionOk - -`func (o *RequestBrand) GetLoginInstructionOk() (*string, bool)` - -GetLoginInstructionOk returns a tuple with the LoginInstruction field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLoginInstruction - -`func (o *RequestBrand) SetLoginInstruction(v string)` - -SetLoginInstruction sets LoginInstruction field to given value. - -### HasLoginInstruction - -`func (o *RequestBrand) HasLoginInstruction() bool` - -HasLoginInstruction returns a boolean if a field has been set. - -### GetHideOneloginFooter - -`func (o *RequestBrand) GetHideOneloginFooter() bool` - -GetHideOneloginFooter returns the HideOneloginFooter field if non-nil, zero value otherwise. - -### GetHideOneloginFooterOk - -`func (o *RequestBrand) GetHideOneloginFooterOk() (*bool, bool)` - -GetHideOneloginFooterOk returns a tuple with the HideOneloginFooter field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetHideOneloginFooter - -`func (o *RequestBrand) SetHideOneloginFooter(v bool)` - -SetHideOneloginFooter sets HideOneloginFooter field to given value. - -### HasHideOneloginFooter - -`func (o *RequestBrand) HasHideOneloginFooter() bool` - -HasHideOneloginFooter returns a boolean if a field has been set. - -### GetMfaEnrollmentMessage - -`func (o *RequestBrand) GetMfaEnrollmentMessage() string` - -GetMfaEnrollmentMessage returns the MfaEnrollmentMessage field if non-nil, zero value otherwise. - -### GetMfaEnrollmentMessageOk - -`func (o *RequestBrand) GetMfaEnrollmentMessageOk() (*string, bool)` - -GetMfaEnrollmentMessageOk returns a tuple with the MfaEnrollmentMessage field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMfaEnrollmentMessage - -`func (o *RequestBrand) SetMfaEnrollmentMessage(v string)` - -SetMfaEnrollmentMessage sets MfaEnrollmentMessage field to given value. - -### HasMfaEnrollmentMessage - -`func (o *RequestBrand) HasMfaEnrollmentMessage() bool` - -HasMfaEnrollmentMessage returns a boolean if a field has been set. - -### GetBackground - -`func (o *RequestBrand) GetBackground() string` - -GetBackground returns the Background field if non-nil, zero value otherwise. - -### GetBackgroundOk - -`func (o *RequestBrand) 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 *RequestBrand) SetBackground(v string)` - -SetBackground sets Background field to given value. - -### HasBackground - -`func (o *RequestBrand) HasBackground() bool` - -HasBackground returns a boolean if a field has been set. - -### GetLogo - -`func (o *RequestBrand) GetLogo() string` - -GetLogo returns the Logo field if non-nil, zero value otherwise. - -### GetLogoOk - -`func (o *RequestBrand) GetLogoOk() (*string, bool)` - -GetLogoOk returns a tuple with the Logo field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLogo - -`func (o *RequestBrand) SetLogo(v string)` - -SetLogo sets Logo field to given value. - -### HasLogo - -`func (o *RequestBrand) HasLogo() bool` - -HasLogo 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/RevokeTokensRequest.md b/docs/RevokeTokensRequest.md deleted file mode 100644 index 70e4be3..0000000 --- a/docs/RevokeTokensRequest.md +++ /dev/null @@ -1,51 +0,0 @@ -# RevokeTokensRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**AccessToken** | **string** | Set to the access token you want to revoke. This access token must have been generated using the client_id and client_secret provided in the Authorization header. | - -## Methods - -### NewRevokeTokensRequest - -`func NewRevokeTokensRequest(accessToken string, ) *RevokeTokensRequest` - -NewRevokeTokensRequest instantiates a new RevokeTokensRequest 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 - -### NewRevokeTokensRequestWithDefaults - -`func NewRevokeTokensRequestWithDefaults() *RevokeTokensRequest` - -NewRevokeTokensRequestWithDefaults instantiates a new RevokeTokensRequest 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 - -### GetAccessToken - -`func (o *RevokeTokensRequest) GetAccessToken() string` - -GetAccessToken returns the AccessToken field if non-nil, zero value otherwise. - -### GetAccessTokenOk - -`func (o *RevokeTokensRequest) GetAccessTokenOk() (*string, bool)` - -GetAccessTokenOk returns a tuple with the AccessToken field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAccessToken - -`func (o *RevokeTokensRequest) SetAccessToken(v string)` - -SetAccessToken sets AccessToken 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/RiskDevice.md b/docs/RiskDevice.md deleted file mode 100644 index 98827ad..0000000 --- a/docs/RiskDevice.md +++ /dev/null @@ -1,56 +0,0 @@ -# RiskDevice - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | Pointer to **string** | This device's unique identifier | [optional] - -## Methods - -### NewRiskDevice - -`func NewRiskDevice() *RiskDevice` - -NewRiskDevice instantiates a new RiskDevice 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 - -### NewRiskDeviceWithDefaults - -`func NewRiskDeviceWithDefaults() *RiskDevice` - -NewRiskDeviceWithDefaults instantiates a new RiskDevice 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 - -### GetId - -`func (o *RiskDevice) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *RiskDevice) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *RiskDevice) SetId(v string)` - -SetId sets Id field to given value. - -### HasId - -`func (o *RiskDevice) HasId() bool` - -HasId 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/RiskRule.md b/docs/RiskRule.md deleted file mode 100644 index 1c6eeec..0000000 --- a/docs/RiskRule.md +++ /dev/null @@ -1,212 +0,0 @@ -# RiskRule - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | Pointer to **string** | | [optional] -**Name** | Pointer to **string** | The name of this rule | [optional] -**Description** | Pointer to **string** | | [optional] -**Type** | Pointer to **string** | The type parameter specifies the type of rule that will be created. | [optional] -**Target** | Pointer to **string** | The target parameter that will be used when evaluating the rule against an incoming event. | [optional] -**Filters** | Pointer to **[]string** | A list of IP addresses or country codes or names to evaluate against each event. | [optional] -**Source** | Pointer to [**Source**](Source.md) | | [optional] - -## Methods - -### NewRiskRule - -`func NewRiskRule() *RiskRule` - -NewRiskRule instantiates a new RiskRule 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 - -### NewRiskRuleWithDefaults - -`func NewRiskRuleWithDefaults() *RiskRule` - -NewRiskRuleWithDefaults instantiates a new RiskRule 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 - -### GetId - -`func (o *RiskRule) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *RiskRule) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *RiskRule) SetId(v string)` - -SetId sets Id field to given value. - -### HasId - -`func (o *RiskRule) HasId() bool` - -HasId returns a boolean if a field has been set. - -### GetName - -`func (o *RiskRule) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *RiskRule) 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 *RiskRule) SetName(v string)` - -SetName sets Name field to given value. - -### HasName - -`func (o *RiskRule) HasName() bool` - -HasName returns a boolean if a field has been set. - -### GetDescription - -`func (o *RiskRule) GetDescription() string` - -GetDescription returns the Description field if non-nil, zero value otherwise. - -### GetDescriptionOk - -`func (o *RiskRule) GetDescriptionOk() (*string, bool)` - -GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDescription - -`func (o *RiskRule) SetDescription(v string)` - -SetDescription sets Description field to given value. - -### HasDescription - -`func (o *RiskRule) HasDescription() bool` - -HasDescription returns a boolean if a field has been set. - -### GetType - -`func (o *RiskRule) GetType() string` - -GetType returns the Type field if non-nil, zero value otherwise. - -### GetTypeOk - -`func (o *RiskRule) GetTypeOk() (*string, 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 *RiskRule) SetType(v string)` - -SetType sets Type field to given value. - -### HasType - -`func (o *RiskRule) HasType() bool` - -HasType returns a boolean if a field has been set. - -### GetTarget - -`func (o *RiskRule) GetTarget() string` - -GetTarget returns the Target field if non-nil, zero value otherwise. - -### GetTargetOk - -`func (o *RiskRule) 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 *RiskRule) SetTarget(v string)` - -SetTarget sets Target field to given value. - -### HasTarget - -`func (o *RiskRule) HasTarget() bool` - -HasTarget returns a boolean if a field has been set. - -### GetFilters - -`func (o *RiskRule) GetFilters() []string` - -GetFilters returns the Filters field if non-nil, zero value otherwise. - -### GetFiltersOk - -`func (o *RiskRule) GetFiltersOk() (*[]string, bool)` - -GetFiltersOk returns a tuple with the Filters field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetFilters - -`func (o *RiskRule) SetFilters(v []string)` - -SetFilters sets Filters field to given value. - -### HasFilters - -`func (o *RiskRule) HasFilters() bool` - -HasFilters returns a boolean if a field has been set. - -### GetSource - -`func (o *RiskRule) GetSource() Source` - -GetSource returns the Source field if non-nil, zero value otherwise. - -### GetSourceOk - -`func (o *RiskRule) 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 *RiskRule) SetSource(v Source)` - -SetSource sets Source field to given value. - -### HasSource - -`func (o *RiskRule) HasSource() bool` - -HasSource 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/RiskUser.md b/docs/RiskUser.md deleted file mode 100644 index 5ac06b1..0000000 --- a/docs/RiskUser.md +++ /dev/null @@ -1,103 +0,0 @@ -# RiskUser - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **string** | A unique identifier for the user. | -**Name** | Pointer to **string** | A name for the user. | [optional] -**Authenticated** | Pointer to **bool** | Indicates if the metadata supplied in this event should be considered as trusted for the user. | [optional] [default to false] - -## Methods - -### NewRiskUser - -`func NewRiskUser(id string, ) *RiskUser` - -NewRiskUser instantiates a new RiskUser 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 - -### NewRiskUserWithDefaults - -`func NewRiskUserWithDefaults() *RiskUser` - -NewRiskUserWithDefaults instantiates a new RiskUser 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 - -### GetId - -`func (o *RiskUser) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *RiskUser) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *RiskUser) SetId(v string)` - -SetId sets Id field to given value. - - -### GetName - -`func (o *RiskUser) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *RiskUser) 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 *RiskUser) SetName(v string)` - -SetName sets Name field to given value. - -### HasName - -`func (o *RiskUser) HasName() bool` - -HasName returns a boolean if a field has been set. - -### GetAuthenticated - -`func (o *RiskUser) GetAuthenticated() bool` - -GetAuthenticated returns the Authenticated field if non-nil, zero value otherwise. - -### GetAuthenticatedOk - -`func (o *RiskUser) GetAuthenticatedOk() (*bool, bool)` - -GetAuthenticatedOk returns a tuple with the Authenticated field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAuthenticated - -`func (o *RiskUser) SetAuthenticated(v bool)` - -SetAuthenticated sets Authenticated field to given value. - -### HasAuthenticated - -`func (o *RiskUser) HasAuthenticated() bool` - -HasAuthenticated 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/Role.md b/docs/Role.md deleted file mode 100644 index 64d7c7c..0000000 --- a/docs/Role.md +++ /dev/null @@ -1,155 +0,0 @@ -# Role - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | Pointer to **int32** | Role ID | [optional] [readonly] -**Name** | **string** | The name of the role. | -**Apps** | Pointer to **[]int32** | A list of app IDs that will be assigned to the role. | [optional] -**Users** | Pointer to **[]int32** | A list of user IDs to assign to the role. | [optional] -**Admins** | Pointer to **[]int32** | A list of user IDs to assign as role administrators. | [optional] - -## Methods - -### NewRole - -`func NewRole(name string, ) *Role` - -NewRole instantiates a new Role 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 - -### NewRoleWithDefaults - -`func NewRoleWithDefaults() *Role` - -NewRoleWithDefaults instantiates a new Role 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 - -### GetId - -`func (o *Role) GetId() int32` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *Role) GetIdOk() (*int32, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *Role) SetId(v int32)` - -SetId sets Id field to given value. - -### HasId - -`func (o *Role) HasId() bool` - -HasId returns a boolean if a field has been set. - -### GetName - -`func (o *Role) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *Role) 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 *Role) SetName(v string)` - -SetName sets Name field to given value. - - -### GetApps - -`func (o *Role) GetApps() []int32` - -GetApps returns the Apps field if non-nil, zero value otherwise. - -### GetAppsOk - -`func (o *Role) GetAppsOk() (*[]int32, bool)` - -GetAppsOk returns a tuple with the Apps field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetApps - -`func (o *Role) SetApps(v []int32)` - -SetApps sets Apps field to given value. - -### HasApps - -`func (o *Role) HasApps() bool` - -HasApps returns a boolean if a field has been set. - -### GetUsers - -`func (o *Role) GetUsers() []int32` - -GetUsers returns the Users field if non-nil, zero value otherwise. - -### GetUsersOk - -`func (o *Role) 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 *Role) SetUsers(v []int32)` - -SetUsers sets Users field to given value. - -### HasUsers - -`func (o *Role) HasUsers() bool` - -HasUsers returns a boolean if a field has been set. - -### GetAdmins - -`func (o *Role) GetAdmins() []int32` - -GetAdmins returns the Admins field if non-nil, zero value otherwise. - -### GetAdminsOk - -`func (o *Role) GetAdminsOk() (*[]int32, bool)` - -GetAdminsOk returns a tuple with the Admins field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAdmins - -`func (o *Role) SetAdmins(v []int32)` - -SetAdmins sets Admins field to given value. - -### HasAdmins - -`func (o *Role) HasAdmins() bool` - -HasAdmins 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/RolesApi.md b/docs/RolesApi.md deleted file mode 100644 index 136f3c4..0000000 --- a/docs/RolesApi.md +++ /dev/null @@ -1,1107 +0,0 @@ -# \RolesApi - -All URIs are relative to *https://your-api-subdomain.onelogin.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**AddRoleAdmins**](RolesApi.md#AddRoleAdmins) | **Post** /api/2/roles/{role_id}/admins | Add Role Admins -[**AddRoleUsers**](RolesApi.md#AddRoleUsers) | **Post** /api/2/roles/{role_id}/users | Add Role Users -[**CreateRole**](RolesApi.md#CreateRole) | **Post** /api/2/roles | Create Role -[**DeleteRole**](RolesApi.md#DeleteRole) | **Delete** /api/2/roles/{role_id} | Delete Role by ID -[**GetRole**](RolesApi.md#GetRole) | **Get** /api/2/roles/{role_id} | Get Role by ID -[**GetRoleAdmins**](RolesApi.md#GetRoleAdmins) | **Get** /api/2/roles/{role_id}/admins | Get Role Admins -[**GetRoleApps**](RolesApi.md#GetRoleApps) | **Get** /api/2/roles/{role_id}/apps | Get all Apps assigned to Role -[**GetRoleById**](RolesApi.md#GetRoleById) | **Get** /api/1/roles/{role_id} | Get Role by ID -[**GetRoleByName**](RolesApi.md#GetRoleByName) | **Get** /api/1/roles | Get Role by Name -[**GetRoleUsers**](RolesApi.md#GetRoleUsers) | **Get** /api/2/roles/{role_id}/users | Get Role Users -[**ListRoles**](RolesApi.md#ListRoles) | **Get** /api/2/roles | List Roles -[**RemoveRoleAdmins**](RolesApi.md#RemoveRoleAdmins) | **Delete** /api/2/roles/{role_id}/admins | Remove Role Admins -[**RemoveRoleUsers**](RolesApi.md#RemoveRoleUsers) | **Delete** /api/2/roles/{role_id}/users | Remove Role Users -[**SetRoleApps**](RolesApi.md#SetRoleApps) | **Put** /api/2/roles/{role_id}/apps | Set Role Apps -[**UpdateRole**](RolesApi.md#UpdateRole) | **Put** /api/2/roles/{role_id} | Update Role - - - -## AddRoleAdmins - -> []CreateRole201ResponseInner AddRoleAdmins(ctx, roleId).RequestBody(requestBody).Execute() - -Add Role Admins - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - roleId := "roleId_example" // string | Set to the id of the role you want to return. - requestBody := []int32{int32(123)} // []int32 | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.RolesApi.AddRoleAdmins(context.Background(), roleId).RequestBody(requestBody).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `RolesApi.AddRoleAdmins``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AddRoleAdmins`: []CreateRole201ResponseInner - fmt.Fprintf(os.Stdout, "Response from `RolesApi.AddRoleAdmins`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**roleId** | **string** | Set to the id of the role you want to return. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiAddRoleAdminsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **requestBody** | **[]int32** | | - -### Return type - -[**[]CreateRole201ResponseInner**](CreateRole201ResponseInner.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## AddRoleUsers - -> []CreateRole201ResponseInner AddRoleUsers(ctx, roleId).RequestBody(requestBody).Execute() - -Add Role Users - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - roleId := "roleId_example" // string | Set to the id of the role you want to return. - requestBody := []int32{int32(123)} // []int32 | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.RolesApi.AddRoleUsers(context.Background(), roleId).RequestBody(requestBody).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `RolesApi.AddRoleUsers``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AddRoleUsers`: []CreateRole201ResponseInner - fmt.Fprintf(os.Stdout, "Response from `RolesApi.AddRoleUsers`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**roleId** | **string** | Set to the id of the role you want to return. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiAddRoleUsersRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **requestBody** | **[]int32** | | - -### Return type - -[**[]CreateRole201ResponseInner**](CreateRole201ResponseInner.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## CreateRole - -> []CreateRole201ResponseInner CreateRole(ctx).Role(role).Execute() - -Create Role - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - role := *openapiclient.NewRole("Name_example") // Role | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.RolesApi.CreateRole(context.Background()).Role(role).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `RolesApi.CreateRole``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `CreateRole`: []CreateRole201ResponseInner - fmt.Fprintf(os.Stdout, "Response from `RolesApi.CreateRole`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiCreateRoleRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **role** | [**Role**](Role.md) | | - -### Return type - -[**[]CreateRole201ResponseInner**](CreateRole201ResponseInner.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## DeleteRole - -> DeleteRole(ctx, roleId).Execute() - -Delete Role by ID - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - roleId := "roleId_example" // string | Set to the id of the role you want to return. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.RolesApi.DeleteRole(context.Background(), roleId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `RolesApi.DeleteRole``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**roleId** | **string** | Set to the id of the role you want to return. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiDeleteRoleRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - - (empty response body) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetRole - -> Role GetRole(ctx, roleId).Execute() - -Get Role by ID - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - roleId := "roleId_example" // string | Set to the id of the role you want to return. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.RolesApi.GetRole(context.Background(), roleId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `RolesApi.GetRole``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetRole`: Role - fmt.Fprintf(os.Stdout, "Response from `RolesApi.GetRole`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**roleId** | **string** | Set to the id of the role you want to return. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetRoleRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**Role**](Role.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetRoleAdmins - -> []User GetRoleAdmins(ctx, roleId).Limit(limit).Page(page).Cursor(cursor).Name(name).IncludeUnassigned(includeUnassigned).Execute() - -Get Role Admins - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - roleId := "roleId_example" // string | Set to the id of the role you want to return. - limit := int32(56) // int32 | How many items to return at one time (max 100) (optional) - page := int32(56) // int32 | The page number of results to return. (optional) - cursor := "cursor_example" // string | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. (optional) - name := "name_example" // string | Allows you to filter on first name, last name, username, and email address. (optional) - includeUnassigned := true // bool | Optional. Defaults to false. Include users that aren’t assigned to the role. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.RolesApi.GetRoleAdmins(context.Background(), roleId).Limit(limit).Page(page).Cursor(cursor).Name(name).IncludeUnassigned(includeUnassigned).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `RolesApi.GetRoleAdmins``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetRoleAdmins`: []User - fmt.Fprintf(os.Stdout, "Response from `RolesApi.GetRoleAdmins`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**roleId** | **string** | Set to the id of the role you want to return. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetRoleAdminsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **limit** | **int32** | How many items to return at one time (max 100) | - **page** | **int32** | The page number of results to return. | - **cursor** | **string** | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. | - **name** | **string** | Allows you to filter on first name, last name, username, and email address. | - **includeUnassigned** | **bool** | Optional. Defaults to false. Include users that aren’t assigned to the role. | - -### Return type - -[**[]User**](User.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: applcation/json, application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetRoleApps - -> []GetRoleApps200ResponseInner GetRoleApps(ctx, roleId).Limit(limit).Page(page).Cursor(cursor).Assigned(assigned).Execute() - -Get all Apps assigned to Role - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - roleId := "roleId_example" // string | Set to the id of the role you want to return. - limit := int32(56) // int32 | How many items to return at one time (max 100) (optional) - page := int32(56) // int32 | The page number of results to return. (optional) - cursor := "cursor_example" // string | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. (optional) - assigned := true // bool | Optional. Defaults to true. Returns all apps not yet assigned to the role. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.RolesApi.GetRoleApps(context.Background(), roleId).Limit(limit).Page(page).Cursor(cursor).Assigned(assigned).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `RolesApi.GetRoleApps``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetRoleApps`: []GetRoleApps200ResponseInner - fmt.Fprintf(os.Stdout, "Response from `RolesApi.GetRoleApps`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**roleId** | **string** | Set to the id of the role you want to return. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetRoleAppsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **limit** | **int32** | How many items to return at one time (max 100) | - **page** | **int32** | The page number of results to return. | - **cursor** | **string** | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. | - **assigned** | **bool** | Optional. Defaults to true. Returns all apps not yet assigned to the role. | - -### Return type - -[**[]GetRoleApps200ResponseInner**](GetRoleApps200ResponseInner.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: applcation/json, application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetRoleById - -> GetRoleById200Response GetRoleById(ctx, roleId).Execute() - -Get Role by ID - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - roleId := "roleId_example" // string | Set to the id of the role you want to return. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.RolesApi.GetRoleById(context.Background(), roleId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `RolesApi.GetRoleById``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetRoleById`: GetRoleById200Response - fmt.Fprintf(os.Stdout, "Response from `RolesApi.GetRoleById`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**roleId** | **string** | Set to the id of the role you want to return. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetRoleByIdRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**GetRoleById200Response**](GetRoleById200Response.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetRoleByName - -> GetRoleByName200Response GetRoleByName(ctx).Name(name).Execute() - -Get Role by Name - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - name := "name_example" // string | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.RolesApi.GetRoleByName(context.Background()).Name(name).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `RolesApi.GetRoleByName``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetRoleByName`: GetRoleByName200Response - fmt.Fprintf(os.Stdout, "Response from `RolesApi.GetRoleByName`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetRoleByNameRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **name** | **string** | | - -### Return type - -[**GetRoleByName200Response**](GetRoleByName200Response.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetRoleUsers - -> []User GetRoleUsers(ctx, roleId).Limit(limit).Page(page).Cursor(cursor).Name(name).IncludeUnassigned(includeUnassigned).Execute() - -Get Role Users - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - roleId := "roleId_example" // string | Set to the id of the role you want to return. - limit := int32(56) // int32 | How many items to return at one time (max 100) (optional) - page := int32(56) // int32 | The page number of results to return. (optional) - cursor := "cursor_example" // string | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. (optional) - name := "name_example" // string | Allows you to filter on first name, last name, username, and email address. (optional) - includeUnassigned := true // bool | Optional. Defaults to false. Include users that aren’t assigned to the role. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.RolesApi.GetRoleUsers(context.Background(), roleId).Limit(limit).Page(page).Cursor(cursor).Name(name).IncludeUnassigned(includeUnassigned).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `RolesApi.GetRoleUsers``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetRoleUsers`: []User - fmt.Fprintf(os.Stdout, "Response from `RolesApi.GetRoleUsers`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**roleId** | **string** | Set to the id of the role you want to return. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetRoleUsersRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **limit** | **int32** | How many items to return at one time (max 100) | - **page** | **int32** | The page number of results to return. | - **cursor** | **string** | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. | - **name** | **string** | Allows you to filter on first name, last name, username, and email address. | - **includeUnassigned** | **bool** | Optional. Defaults to false. Include users that aren’t assigned to the role. | - -### Return type - -[**[]User**](User.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: applcation/json, application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## ListRoles - -> []Role ListRoles(ctx).AppId(appId).Limit(limit).Page(page).Cursor(cursor).RoleName(roleName).AppName(appName).Fields(fields).Execute() - -List Roles - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - appId := int32(56) // int32 | - limit := int32(56) // int32 | How many items to return at one time (max 100) (optional) - page := int32(56) // int32 | The page number of results to return. (optional) - cursor := "cursor_example" // string | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. (optional) - roleName := "roleName_example" // string | Optional. Filters by role name. (optional) - appName := "appName_example" // string | Optional. Returns roles that contain this app name. (optional) - fields := "fields_example" // string | Optional. Comma delimited list of fields to return. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.RolesApi.ListRoles(context.Background()).AppId(appId).Limit(limit).Page(page).Cursor(cursor).RoleName(roleName).AppName(appName).Fields(fields).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `RolesApi.ListRoles``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ListRoles`: []Role - fmt.Fprintf(os.Stdout, "Response from `RolesApi.ListRoles`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiListRolesRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **appId** | **int32** | | - **limit** | **int32** | How many items to return at one time (max 100) | - **page** | **int32** | The page number of results to return. | - **cursor** | **string** | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. | - **roleName** | **string** | Optional. Filters by role name. | - **appName** | **string** | Optional. Returns roles that contain this app name. | - **fields** | **string** | Optional. Comma delimited list of fields to return. | - -### Return type - -[**[]Role**](Role.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## RemoveRoleAdmins - -> RemoveRoleAdmins(ctx, roleId).RemoveRoleUsersRequest(removeRoleUsersRequest).Execute() - -Remove Role Admins - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - roleId := "roleId_example" // string | Set to the id of the role you want to return. - removeRoleUsersRequest := *openapiclient.NewRemoveRoleUsersRequest() // RemoveRoleUsersRequest | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.RolesApi.RemoveRoleAdmins(context.Background(), roleId).RemoveRoleUsersRequest(removeRoleUsersRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `RolesApi.RemoveRoleAdmins``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**roleId** | **string** | Set to the id of the role you want to return. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiRemoveRoleAdminsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **removeRoleUsersRequest** | [**RemoveRoleUsersRequest**](RemoveRoleUsersRequest.md) | | - -### Return type - - (empty response body) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## RemoveRoleUsers - -> RemoveRoleUsers(ctx, roleId).RemoveRoleUsersRequest(removeRoleUsersRequest).Execute() - -Remove Role Users - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - roleId := "roleId_example" // string | Set to the id of the role you want to return. - removeRoleUsersRequest := *openapiclient.NewRemoveRoleUsersRequest() // RemoveRoleUsersRequest | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.RolesApi.RemoveRoleUsers(context.Background(), roleId).RemoveRoleUsersRequest(removeRoleUsersRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `RolesApi.RemoveRoleUsers``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**roleId** | **string** | Set to the id of the role you want to return. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiRemoveRoleUsersRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **removeRoleUsersRequest** | [**RemoveRoleUsersRequest**](RemoveRoleUsersRequest.md) | | - -### Return type - - (empty response body) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## SetRoleApps - -> []CreateRole201ResponseInner SetRoleApps(ctx, roleId).RequestBody(requestBody).Execute() - -Set Role Apps - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - roleId := "roleId_example" // string | Set to the id of the role you want to return. - requestBody := []int32{int32(123)} // []int32 | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.RolesApi.SetRoleApps(context.Background(), roleId).RequestBody(requestBody).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `RolesApi.SetRoleApps``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `SetRoleApps`: []CreateRole201ResponseInner - fmt.Fprintf(os.Stdout, "Response from `RolesApi.SetRoleApps`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**roleId** | **string** | Set to the id of the role you want to return. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiSetRoleAppsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **requestBody** | **[]int32** | | - -### Return type - -[**[]CreateRole201ResponseInner**](CreateRole201ResponseInner.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## UpdateRole - -> UpdateRole200Response UpdateRole(ctx, roleId).Role(role).Execute() - -Update Role - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - roleId := "roleId_example" // string | Set to the id of the role you want to return. - role := *openapiclient.NewRole("Name_example") // Role | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.RolesApi.UpdateRole(context.Background(), roleId).Role(role).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `RolesApi.UpdateRole``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `UpdateRole`: UpdateRole200Response - fmt.Fprintf(os.Stdout, "Response from `RolesApi.UpdateRole`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**roleId** | **string** | Set to the id of the role you want to return. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiUpdateRoleRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **role** | [**Role**](Role.md) | | - -### Return type - -[**UpdateRole200Response**](UpdateRole200Response.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/docs/RuleAction.md b/docs/RuleAction.md deleted file mode 100644 index 1605b48..0000000 --- a/docs/RuleAction.md +++ /dev/null @@ -1,82 +0,0 @@ -# RuleAction - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | Pointer to **string** | Name of the Action | [optional] -**Value** | Pointer to **string** | The unique identifier of the action. This should be used when defining actions for a User Mapping. | [optional] - -## Methods - -### NewRuleAction - -`func NewRuleAction() *RuleAction` - -NewRuleAction instantiates a new RuleAction 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 - -### NewRuleActionWithDefaults - -`func NewRuleActionWithDefaults() *RuleAction` - -NewRuleActionWithDefaults instantiates a new RuleAction 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 *RuleAction) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *RuleAction) 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 *RuleAction) SetName(v string)` - -SetName sets Name field to given value. - -### HasName - -`func (o *RuleAction) HasName() bool` - -HasName returns a boolean if a field has been set. - -### GetValue - -`func (o *RuleAction) GetValue() string` - -GetValue returns the Value field if non-nil, zero value otherwise. - -### GetValueOk - -`func (o *RuleAction) GetValueOk() (*string, bool)` - -GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetValue - -`func (o *RuleAction) SetValue(v string)` - -SetValue sets Value field to given value. - -### HasValue - -`func (o *RuleAction) HasValue() bool` - -HasValue 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/RuleCondition.md b/docs/RuleCondition.md deleted file mode 100644 index 0d01af9..0000000 --- a/docs/RuleCondition.md +++ /dev/null @@ -1,82 +0,0 @@ -# RuleCondition - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | Pointer to **string** | Name of the operator | [optional] -**Value** | Pointer to **string** | The condition operator value to use when creating or updating rules. | [optional] - -## Methods - -### NewRuleCondition - -`func NewRuleCondition() *RuleCondition` - -NewRuleCondition instantiates a new RuleCondition 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 - -### NewRuleConditionWithDefaults - -`func NewRuleConditionWithDefaults() *RuleCondition` - -NewRuleConditionWithDefaults instantiates a new RuleCondition 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 *RuleCondition) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *RuleCondition) 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 *RuleCondition) SetName(v string)` - -SetName sets Name field to given value. - -### HasName - -`func (o *RuleCondition) HasName() bool` - -HasName returns a boolean if a field has been set. - -### GetValue - -`func (o *RuleCondition) GetValue() string` - -GetValue returns the Value field if non-nil, zero value otherwise. - -### GetValueOk - -`func (o *RuleCondition) GetValueOk() (*string, bool)` - -GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetValue - -`func (o *RuleCondition) SetValue(v string)` - -SetValue sets Value field to given value. - -### HasValue - -`func (o *RuleCondition) HasValue() bool` - -HasValue 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/SAMLAssertionsApi.md b/docs/SAMLAssertionsApi.md deleted file mode 100644 index ae7c581..0000000 --- a/docs/SAMLAssertionsApi.md +++ /dev/null @@ -1,284 +0,0 @@ -# \SAMLAssertionsApi - -All URIs are relative to *https://your-api-subdomain.onelogin.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GenerateSamlAssert**](SAMLAssertionsApi.md#GenerateSamlAssert) | **Post** /api/1/saml_assertion | Generate SAML Assertion -[**GenerateSamlAssert2**](SAMLAssertionsApi.md#GenerateSamlAssert2) | **Post** /api/2/saml_assertion | Generate SAML Assertion -[**VerFactorSaml**](SAMLAssertionsApi.md#VerFactorSaml) | **Post** /api/1/saml_assertion/verify_factor | Verify Factor SAML -[**VerFactorSaml2**](SAMLAssertionsApi.md#VerFactorSaml2) | **Post** /api/2/saml_assertion/verify_factor | Verify Factor SAML - - - -## GenerateSamlAssert - -> GenerateSamlAssert200Response GenerateSamlAssert(ctx).ContentType(contentType).SamlAssert(samlAssert).Execute() - -Generate SAML Assertion - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - contentType := "application/json" // string | (optional) (default to "application/json") - samlAssert := *openapiclient.NewSamlAssert("UsernameOrEmail_example", "Password_example", "AppId_example", "Subdomain_example") // SamlAssert | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.SAMLAssertionsApi.GenerateSamlAssert(context.Background()).ContentType(contentType).SamlAssert(samlAssert).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `SAMLAssertionsApi.GenerateSamlAssert``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GenerateSamlAssert`: GenerateSamlAssert200Response - fmt.Fprintf(os.Stdout, "Response from `SAMLAssertionsApi.GenerateSamlAssert`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiGenerateSamlAssertRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **contentType** | **string** | | [default to "application/json"] - **samlAssert** | [**SamlAssert**](SamlAssert.md) | | - -### Return type - -[**GenerateSamlAssert200Response**](GenerateSamlAssert200Response.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GenerateSamlAssert2 - -> GenerateSamlAssert200Response GenerateSamlAssert2(ctx).ContentType(contentType).SamlAssert(samlAssert).Execute() - -Generate SAML Assertion - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - contentType := "application/json" // string | (optional) (default to "application/json") - samlAssert := *openapiclient.NewSamlAssert("UsernameOrEmail_example", "Password_example", "AppId_example", "Subdomain_example") // SamlAssert | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.SAMLAssertionsApi.GenerateSamlAssert2(context.Background()).ContentType(contentType).SamlAssert(samlAssert).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `SAMLAssertionsApi.GenerateSamlAssert2``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GenerateSamlAssert2`: GenerateSamlAssert200Response - fmt.Fprintf(os.Stdout, "Response from `SAMLAssertionsApi.GenerateSamlAssert2`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiGenerateSamlAssert2Request struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **contentType** | **string** | | [default to "application/json"] - **samlAssert** | [**SamlAssert**](SamlAssert.md) | | - -### Return type - -[**GenerateSamlAssert200Response**](GenerateSamlAssert200Response.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## VerFactorSaml - -> VerFactorSaml200Response VerFactorSaml(ctx).ContentType(contentType).SamlFactor(samlFactor).Execute() - -Verify Factor SAML - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - contentType := "application/json" // string | (optional) (default to "application/json") - samlFactor := *openapiclient.NewSamlFactor("1657651", "1657651", "11x0x1x16x1x3259xxxx0x59xx6xxxx670x61x45xxxxx") // SamlFactor | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.SAMLAssertionsApi.VerFactorSaml(context.Background()).ContentType(contentType).SamlFactor(samlFactor).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `SAMLAssertionsApi.VerFactorSaml``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `VerFactorSaml`: VerFactorSaml200Response - fmt.Fprintf(os.Stdout, "Response from `SAMLAssertionsApi.VerFactorSaml`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiVerFactorSamlRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **contentType** | **string** | | [default to "application/json"] - **samlFactor** | [**SamlFactor**](SamlFactor.md) | | - -### Return type - -[**VerFactorSaml200Response**](VerFactorSaml200Response.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## VerFactorSaml2 - -> VerFactorSaml200Response VerFactorSaml2(ctx).ContentType(contentType).SamlFactor(samlFactor).Execute() - -Verify Factor SAML - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - contentType := "application/json" // string | (optional) (default to "application/json") - samlFactor := *openapiclient.NewSamlFactor("1657651", "1657651", "11x0x1x16x1x3259xxxx0x59xx6xxxx670x61x45xxxxx") // SamlFactor | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.SAMLAssertionsApi.VerFactorSaml2(context.Background()).ContentType(contentType).SamlFactor(samlFactor).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `SAMLAssertionsApi.VerFactorSaml2``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `VerFactorSaml2`: VerFactorSaml200Response - fmt.Fprintf(os.Stdout, "Response from `SAMLAssertionsApi.VerFactorSaml2`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiVerFactorSaml2Request struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **contentType** | **string** | | [default to "application/json"] - **samlFactor** | [**SamlFactor**](SamlFactor.md) | | - -### Return type - -[**VerFactorSaml200Response**](VerFactorSaml200Response.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/docs/SamlApp.md b/docs/SamlApp.md deleted file mode 100644 index 13644ac..0000000 --- a/docs/SamlApp.md +++ /dev/null @@ -1,489 +0,0 @@ -# SamlApp - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | Pointer to **int32** | Apps unique ID in OneLogin. | [optional] [readonly] -**Name** | **string** | The name of the app. | -**Visible** | **bool** | Indicates if the app is visible in the OneLogin portal. | -**Description** | **string** | Freeform description of the app. | -**Notes** | Pointer to **string** | Freeform notes about the app. | [optional] -**IconUrl** | Pointer to **string** | A link to the apps icon url | [optional] -**AuthMethod** | Pointer to [**AuthMethod**](AuthMethod.md) | | [optional] -**PolicyId** | **int32** | The security policy assigned to the app. | -**AllowAssumedSignin** | Pointer to **bool** | Indicates whether or not administrators can access the app as a user that they have assumed control over. | [optional] -**TabId** | Pointer to **int32** | ID of the OneLogin portal tab that the app is assigned to. | [optional] -**ConnectorId** | **int32** | ID of the connector to base the app from. | -**CreatedAt** | Pointer to **string** | the date the app was created | [optional] -**UpdatedAt** | Pointer to **string** | the date the app was last updated | [optional] -**RoleIds** | Pointer to **[]int32** | List of Role IDs that are assigned to the app. On App Create or Update the entire array is replaced with the values provided. | [optional] -**Provisioning** | Pointer to [**GenericAppProvisioning**](GenericAppProvisioning.md) | | [optional] -**Parameters** | [**SamlAppAllOfParameters**](SamlAppAllOfParameters.md) | | -**EnforcementPoint** | Pointer to [**EnforcementPoint**](EnforcementPoint.md) | | [optional] -**Configuration** | [**ConfigurationSaml**](ConfigurationSaml.md) | | -**Sso** | Pointer to [**SsoSaml**](SsoSaml.md) | | [optional] - -## Methods - -### NewSamlApp - -`func NewSamlApp(name string, visible bool, description string, policyId int32, connectorId int32, parameters SamlAppAllOfParameters, configuration ConfigurationSaml, ) *SamlApp` - -NewSamlApp instantiates a new SamlApp 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 - -### NewSamlAppWithDefaults - -`func NewSamlAppWithDefaults() *SamlApp` - -NewSamlAppWithDefaults instantiates a new SamlApp 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 - -### GetId - -`func (o *SamlApp) GetId() int32` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *SamlApp) GetIdOk() (*int32, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *SamlApp) SetId(v int32)` - -SetId sets Id field to given value. - -### HasId - -`func (o *SamlApp) HasId() bool` - -HasId returns a boolean if a field has been set. - -### GetName - -`func (o *SamlApp) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *SamlApp) 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 *SamlApp) SetName(v string)` - -SetName sets Name field to given value. - - -### GetVisible - -`func (o *SamlApp) GetVisible() bool` - -GetVisible returns the Visible field if non-nil, zero value otherwise. - -### GetVisibleOk - -`func (o *SamlApp) GetVisibleOk() (*bool, bool)` - -GetVisibleOk returns a tuple with the Visible field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetVisible - -`func (o *SamlApp) SetVisible(v bool)` - -SetVisible sets Visible field to given value. - - -### GetDescription - -`func (o *SamlApp) GetDescription() string` - -GetDescription returns the Description field if non-nil, zero value otherwise. - -### GetDescriptionOk - -`func (o *SamlApp) GetDescriptionOk() (*string, bool)` - -GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDescription - -`func (o *SamlApp) SetDescription(v string)` - -SetDescription sets Description field to given value. - - -### GetNotes - -`func (o *SamlApp) GetNotes() string` - -GetNotes returns the Notes field if non-nil, zero value otherwise. - -### GetNotesOk - -`func (o *SamlApp) GetNotesOk() (*string, bool)` - -GetNotesOk returns a tuple with the Notes field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetNotes - -`func (o *SamlApp) SetNotes(v string)` - -SetNotes sets Notes field to given value. - -### HasNotes - -`func (o *SamlApp) HasNotes() bool` - -HasNotes returns a boolean if a field has been set. - -### GetIconUrl - -`func (o *SamlApp) GetIconUrl() string` - -GetIconUrl returns the IconUrl field if non-nil, zero value otherwise. - -### GetIconUrlOk - -`func (o *SamlApp) GetIconUrlOk() (*string, bool)` - -GetIconUrlOk returns a tuple with the IconUrl field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIconUrl - -`func (o *SamlApp) SetIconUrl(v string)` - -SetIconUrl sets IconUrl field to given value. - -### HasIconUrl - -`func (o *SamlApp) HasIconUrl() bool` - -HasIconUrl returns a boolean if a field has been set. - -### GetAuthMethod - -`func (o *SamlApp) GetAuthMethod() AuthMethod` - -GetAuthMethod returns the AuthMethod field if non-nil, zero value otherwise. - -### GetAuthMethodOk - -`func (o *SamlApp) GetAuthMethodOk() (*AuthMethod, bool)` - -GetAuthMethodOk returns a tuple with the AuthMethod field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAuthMethod - -`func (o *SamlApp) SetAuthMethod(v AuthMethod)` - -SetAuthMethod sets AuthMethod field to given value. - -### HasAuthMethod - -`func (o *SamlApp) HasAuthMethod() bool` - -HasAuthMethod returns a boolean if a field has been set. - -### GetPolicyId - -`func (o *SamlApp) GetPolicyId() int32` - -GetPolicyId returns the PolicyId field if non-nil, zero value otherwise. - -### GetPolicyIdOk - -`func (o *SamlApp) GetPolicyIdOk() (*int32, bool)` - -GetPolicyIdOk returns a tuple with the PolicyId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPolicyId - -`func (o *SamlApp) SetPolicyId(v int32)` - -SetPolicyId sets PolicyId field to given value. - - -### GetAllowAssumedSignin - -`func (o *SamlApp) GetAllowAssumedSignin() bool` - -GetAllowAssumedSignin returns the AllowAssumedSignin field if non-nil, zero value otherwise. - -### GetAllowAssumedSigninOk - -`func (o *SamlApp) GetAllowAssumedSigninOk() (*bool, bool)` - -GetAllowAssumedSigninOk returns a tuple with the AllowAssumedSignin field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAllowAssumedSignin - -`func (o *SamlApp) SetAllowAssumedSignin(v bool)` - -SetAllowAssumedSignin sets AllowAssumedSignin field to given value. - -### HasAllowAssumedSignin - -`func (o *SamlApp) HasAllowAssumedSignin() bool` - -HasAllowAssumedSignin returns a boolean if a field has been set. - -### GetTabId - -`func (o *SamlApp) GetTabId() int32` - -GetTabId returns the TabId field if non-nil, zero value otherwise. - -### GetTabIdOk - -`func (o *SamlApp) GetTabIdOk() (*int32, bool)` - -GetTabIdOk returns a tuple with the TabId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTabId - -`func (o *SamlApp) SetTabId(v int32)` - -SetTabId sets TabId field to given value. - -### HasTabId - -`func (o *SamlApp) HasTabId() bool` - -HasTabId returns a boolean if a field has been set. - -### GetConnectorId - -`func (o *SamlApp) GetConnectorId() int32` - -GetConnectorId returns the ConnectorId field if non-nil, zero value otherwise. - -### GetConnectorIdOk - -`func (o *SamlApp) GetConnectorIdOk() (*int32, bool)` - -GetConnectorIdOk returns a tuple with the ConnectorId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConnectorId - -`func (o *SamlApp) SetConnectorId(v int32)` - -SetConnectorId sets ConnectorId field to given value. - - -### GetCreatedAt - -`func (o *SamlApp) GetCreatedAt() string` - -GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. - -### GetCreatedAtOk - -`func (o *SamlApp) GetCreatedAtOk() (*string, bool)` - -GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCreatedAt - -`func (o *SamlApp) SetCreatedAt(v string)` - -SetCreatedAt sets CreatedAt field to given value. - -### HasCreatedAt - -`func (o *SamlApp) HasCreatedAt() bool` - -HasCreatedAt returns a boolean if a field has been set. - -### GetUpdatedAt - -`func (o *SamlApp) GetUpdatedAt() string` - -GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. - -### GetUpdatedAtOk - -`func (o *SamlApp) GetUpdatedAtOk() (*string, bool)` - -GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUpdatedAt - -`func (o *SamlApp) SetUpdatedAt(v string)` - -SetUpdatedAt sets UpdatedAt field to given value. - -### HasUpdatedAt - -`func (o *SamlApp) HasUpdatedAt() bool` - -HasUpdatedAt returns a boolean if a field has been set. - -### GetRoleIds - -`func (o *SamlApp) GetRoleIds() []int32` - -GetRoleIds returns the RoleIds field if non-nil, zero value otherwise. - -### GetRoleIdsOk - -`func (o *SamlApp) GetRoleIdsOk() (*[]int32, bool)` - -GetRoleIdsOk returns a tuple with the RoleIds field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRoleIds - -`func (o *SamlApp) SetRoleIds(v []int32)` - -SetRoleIds sets RoleIds field to given value. - -### HasRoleIds - -`func (o *SamlApp) HasRoleIds() bool` - -HasRoleIds returns a boolean if a field has been set. - -### GetProvisioning - -`func (o *SamlApp) GetProvisioning() GenericAppProvisioning` - -GetProvisioning returns the Provisioning field if non-nil, zero value otherwise. - -### GetProvisioningOk - -`func (o *SamlApp) GetProvisioningOk() (*GenericAppProvisioning, bool)` - -GetProvisioningOk returns a tuple with the Provisioning field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetProvisioning - -`func (o *SamlApp) SetProvisioning(v GenericAppProvisioning)` - -SetProvisioning sets Provisioning field to given value. - -### HasProvisioning - -`func (o *SamlApp) HasProvisioning() bool` - -HasProvisioning returns a boolean if a field has been set. - -### GetParameters - -`func (o *SamlApp) GetParameters() SamlAppAllOfParameters` - -GetParameters returns the Parameters field if non-nil, zero value otherwise. - -### GetParametersOk - -`func (o *SamlApp) GetParametersOk() (*SamlAppAllOfParameters, bool)` - -GetParametersOk returns a tuple with the Parameters field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetParameters - -`func (o *SamlApp) SetParameters(v SamlAppAllOfParameters)` - -SetParameters sets Parameters field to given value. - - -### GetEnforcementPoint - -`func (o *SamlApp) GetEnforcementPoint() EnforcementPoint` - -GetEnforcementPoint returns the EnforcementPoint field if non-nil, zero value otherwise. - -### GetEnforcementPointOk - -`func (o *SamlApp) GetEnforcementPointOk() (*EnforcementPoint, bool)` - -GetEnforcementPointOk returns a tuple with the EnforcementPoint field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetEnforcementPoint - -`func (o *SamlApp) SetEnforcementPoint(v EnforcementPoint)` - -SetEnforcementPoint sets EnforcementPoint field to given value. - -### HasEnforcementPoint - -`func (o *SamlApp) HasEnforcementPoint() bool` - -HasEnforcementPoint returns a boolean if a field has been set. - -### GetConfiguration - -`func (o *SamlApp) GetConfiguration() ConfigurationSaml` - -GetConfiguration returns the Configuration field if non-nil, zero value otherwise. - -### GetConfigurationOk - -`func (o *SamlApp) GetConfigurationOk() (*ConfigurationSaml, bool)` - -GetConfigurationOk returns a tuple with the Configuration field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConfiguration - -`func (o *SamlApp) SetConfiguration(v ConfigurationSaml)` - -SetConfiguration sets Configuration field to given value. - - -### GetSso - -`func (o *SamlApp) GetSso() SsoSaml` - -GetSso returns the Sso field if non-nil, zero value otherwise. - -### GetSsoOk - -`func (o *SamlApp) GetSsoOk() (*SsoSaml, bool)` - -GetSsoOk returns a tuple with the Sso field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSso - -`func (o *SamlApp) SetSso(v SsoSaml)` - -SetSso sets Sso field to given value. - -### HasSso - -`func (o *SamlApp) HasSso() bool` - -HasSso 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/SamlAppAllOf.md b/docs/SamlAppAllOf.md deleted file mode 100644 index cd93514..0000000 --- a/docs/SamlAppAllOf.md +++ /dev/null @@ -1,98 +0,0 @@ -# SamlAppAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Configuration** | [**ConfigurationSaml**](ConfigurationSaml.md) | | -**Sso** | Pointer to [**SsoSaml**](SsoSaml.md) | | [optional] -**Parameters** | [**SamlAppAllOfParameters**](SamlAppAllOfParameters.md) | | - -## Methods - -### NewSamlAppAllOf - -`func NewSamlAppAllOf(configuration ConfigurationSaml, parameters SamlAppAllOfParameters, ) *SamlAppAllOf` - -NewSamlAppAllOf instantiates a new SamlAppAllOf 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 - -### NewSamlAppAllOfWithDefaults - -`func NewSamlAppAllOfWithDefaults() *SamlAppAllOf` - -NewSamlAppAllOfWithDefaults instantiates a new SamlAppAllOf 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 - -### GetConfiguration - -`func (o *SamlAppAllOf) GetConfiguration() ConfigurationSaml` - -GetConfiguration returns the Configuration field if non-nil, zero value otherwise. - -### GetConfigurationOk - -`func (o *SamlAppAllOf) GetConfigurationOk() (*ConfigurationSaml, bool)` - -GetConfigurationOk returns a tuple with the Configuration field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetConfiguration - -`func (o *SamlAppAllOf) SetConfiguration(v ConfigurationSaml)` - -SetConfiguration sets Configuration field to given value. - - -### GetSso - -`func (o *SamlAppAllOf) GetSso() SsoSaml` - -GetSso returns the Sso field if non-nil, zero value otherwise. - -### GetSsoOk - -`func (o *SamlAppAllOf) GetSsoOk() (*SsoSaml, bool)` - -GetSsoOk returns a tuple with the Sso field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSso - -`func (o *SamlAppAllOf) SetSso(v SsoSaml)` - -SetSso sets Sso field to given value. - -### HasSso - -`func (o *SamlAppAllOf) HasSso() bool` - -HasSso returns a boolean if a field has been set. - -### GetParameters - -`func (o *SamlAppAllOf) GetParameters() SamlAppAllOfParameters` - -GetParameters returns the Parameters field if non-nil, zero value otherwise. - -### GetParametersOk - -`func (o *SamlAppAllOf) GetParametersOk() (*SamlAppAllOfParameters, bool)` - -GetParametersOk returns a tuple with the Parameters field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetParameters - -`func (o *SamlAppAllOf) SetParameters(v SamlAppAllOfParameters)` - -SetParameters sets Parameters 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/SamlAppAllOfParameters.md b/docs/SamlAppAllOfParameters.md deleted file mode 100644 index f0985a1..0000000 --- a/docs/SamlAppAllOfParameters.md +++ /dev/null @@ -1,51 +0,0 @@ -# SamlAppAllOfParameters - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**SamlUsername** | [**SamlAppAllOfParametersSamlUsername**](SamlAppAllOfParametersSamlUsername.md) | | - -## Methods - -### NewSamlAppAllOfParameters - -`func NewSamlAppAllOfParameters(samlUsername SamlAppAllOfParametersSamlUsername, ) *SamlAppAllOfParameters` - -NewSamlAppAllOfParameters instantiates a new SamlAppAllOfParameters 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 - -### NewSamlAppAllOfParametersWithDefaults - -`func NewSamlAppAllOfParametersWithDefaults() *SamlAppAllOfParameters` - -NewSamlAppAllOfParametersWithDefaults instantiates a new SamlAppAllOfParameters 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 - -### GetSamlUsername - -`func (o *SamlAppAllOfParameters) GetSamlUsername() SamlAppAllOfParametersSamlUsername` - -GetSamlUsername returns the SamlUsername field if non-nil, zero value otherwise. - -### GetSamlUsernameOk - -`func (o *SamlAppAllOfParameters) GetSamlUsernameOk() (*SamlAppAllOfParametersSamlUsername, bool)` - -GetSamlUsernameOk returns a tuple with the SamlUsername field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSamlUsername - -`func (o *SamlAppAllOfParameters) SetSamlUsername(v SamlAppAllOfParametersSamlUsername)` - -SetSamlUsername sets SamlUsername 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/SamlAppAllOfParametersSamlUsername.md b/docs/SamlAppAllOfParametersSamlUsername.md deleted file mode 100644 index 339f70e..0000000 --- a/docs/SamlAppAllOfParametersSamlUsername.md +++ /dev/null @@ -1,51 +0,0 @@ -# SamlAppAllOfParametersSamlUsername - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**UserAttributeMappings** | **string** | | - -## Methods - -### NewSamlAppAllOfParametersSamlUsername - -`func NewSamlAppAllOfParametersSamlUsername(userAttributeMappings string, ) *SamlAppAllOfParametersSamlUsername` - -NewSamlAppAllOfParametersSamlUsername instantiates a new SamlAppAllOfParametersSamlUsername 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 - -### NewSamlAppAllOfParametersSamlUsernameWithDefaults - -`func NewSamlAppAllOfParametersSamlUsernameWithDefaults() *SamlAppAllOfParametersSamlUsername` - -NewSamlAppAllOfParametersSamlUsernameWithDefaults instantiates a new SamlAppAllOfParametersSamlUsername 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 - -### GetUserAttributeMappings - -`func (o *SamlAppAllOfParametersSamlUsername) GetUserAttributeMappings() string` - -GetUserAttributeMappings returns the UserAttributeMappings field if non-nil, zero value otherwise. - -### GetUserAttributeMappingsOk - -`func (o *SamlAppAllOfParametersSamlUsername) GetUserAttributeMappingsOk() (*string, bool)` - -GetUserAttributeMappingsOk returns a tuple with the UserAttributeMappings field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUserAttributeMappings - -`func (o *SamlAppAllOfParametersSamlUsername) SetUserAttributeMappings(v string)` - -SetUserAttributeMappings sets UserAttributeMappings 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/SamlAssert.md b/docs/SamlAssert.md deleted file mode 100644 index a2eff6c..0000000 --- a/docs/SamlAssert.md +++ /dev/null @@ -1,140 +0,0 @@ -# SamlAssert - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**UsernameOrEmail** | **string** | Set this to the username or email of the OneLogin user accessing the app for which you want to generate a SAML token. | -**Password** | **string** | Password of the OneLogin user accessing the app for which you want to generate a SAML token. | -**AppId** | **string** | App ID of the app for which you want to generate a SAML token. This is the app ID in OneLogin. | -**Subdomain** | **string** | Set to the subdomain of the OneLogin user accessing the app for which you want to generate a SAML token. | -**IpAddress** | Pointer to **string** | If you are using this API in a scenario in which MFA is required and you’ll need to be able to honor IP address whitelisting defined in MFA policies, provide this parameter and set its value to the whitelisted IP address that needs to be bypassed. | [optional] - -## Methods - -### NewSamlAssert - -`func NewSamlAssert(usernameOrEmail string, password string, appId string, subdomain string, ) *SamlAssert` - -NewSamlAssert instantiates a new SamlAssert 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 - -### NewSamlAssertWithDefaults - -`func NewSamlAssertWithDefaults() *SamlAssert` - -NewSamlAssertWithDefaults instantiates a new SamlAssert 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 - -### GetUsernameOrEmail - -`func (o *SamlAssert) GetUsernameOrEmail() string` - -GetUsernameOrEmail returns the UsernameOrEmail field if non-nil, zero value otherwise. - -### GetUsernameOrEmailOk - -`func (o *SamlAssert) GetUsernameOrEmailOk() (*string, bool)` - -GetUsernameOrEmailOk returns a tuple with the UsernameOrEmail field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUsernameOrEmail - -`func (o *SamlAssert) SetUsernameOrEmail(v string)` - -SetUsernameOrEmail sets UsernameOrEmail field to given value. - - -### GetPassword - -`func (o *SamlAssert) GetPassword() string` - -GetPassword returns the Password field if non-nil, zero value otherwise. - -### GetPasswordOk - -`func (o *SamlAssert) GetPasswordOk() (*string, bool)` - -GetPasswordOk returns a tuple with the Password field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPassword - -`func (o *SamlAssert) SetPassword(v string)` - -SetPassword sets Password field to given value. - - -### GetAppId - -`func (o *SamlAssert) GetAppId() string` - -GetAppId returns the AppId field if non-nil, zero value otherwise. - -### GetAppIdOk - -`func (o *SamlAssert) GetAppIdOk() (*string, bool)` - -GetAppIdOk returns a tuple with the AppId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAppId - -`func (o *SamlAssert) SetAppId(v string)` - -SetAppId sets AppId field to given value. - - -### GetSubdomain - -`func (o *SamlAssert) GetSubdomain() string` - -GetSubdomain returns the Subdomain field if non-nil, zero value otherwise. - -### GetSubdomainOk - -`func (o *SamlAssert) GetSubdomainOk() (*string, bool)` - -GetSubdomainOk returns a tuple with the Subdomain field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSubdomain - -`func (o *SamlAssert) SetSubdomain(v string)` - -SetSubdomain sets Subdomain field to given value. - - -### GetIpAddress - -`func (o *SamlAssert) GetIpAddress() string` - -GetIpAddress returns the IpAddress field if non-nil, zero value otherwise. - -### GetIpAddressOk - -`func (o *SamlAssert) GetIpAddressOk() (*string, bool)` - -GetIpAddressOk returns a tuple with the IpAddress field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIpAddress - -`func (o *SamlAssert) SetIpAddress(v string)` - -SetIpAddress sets IpAddress field to given value. - -### HasIpAddress - -`func (o *SamlAssert) HasIpAddress() bool` - -HasIpAddress 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/SamlFactor.md b/docs/SamlFactor.md deleted file mode 100644 index 00f56e9..0000000 --- a/docs/SamlFactor.md +++ /dev/null @@ -1,145 +0,0 @@ -# SamlFactor - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**AppId** | **string** | App ID of the app for which you want to generate a SAML token. This is the app ID in OneLogin. | -**DeviceId** | **string** | Provide the MFA device_id you are submitting for verification. The device_id is supplied by the Generate SAML Assertion API. | -**StateToken** | **string** | Provide the state_token associated with the MFA device_id you are submitting for verification. The state_token is supplied by the Generate SAML Assertion API. | -**OtpToken** | Pointer to **string** | Provide the OTP value for the MFA factor you are submitting for verification. For some MFA factors; such as OneLogin OTP SMS, which requires the user to request an OTP; the otp_token value is not required, and if not included, returns a 200 OK - Pending result. You’ll make a subsequent Verify Factor API call to provide the otp_token value once it has been provided to the user. | [optional] -**DoNotNotify** | Pointer to **bool** | When verifying MFA via Protect Push, set this to true to stop additional push notifications being sent to the OneLogin Protect device. | [optional] - -## Methods - -### NewSamlFactor - -`func NewSamlFactor(appId string, deviceId string, stateToken string, ) *SamlFactor` - -NewSamlFactor instantiates a new SamlFactor 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 - -### NewSamlFactorWithDefaults - -`func NewSamlFactorWithDefaults() *SamlFactor` - -NewSamlFactorWithDefaults instantiates a new SamlFactor 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 - -### GetAppId - -`func (o *SamlFactor) GetAppId() string` - -GetAppId returns the AppId field if non-nil, zero value otherwise. - -### GetAppIdOk - -`func (o *SamlFactor) GetAppIdOk() (*string, bool)` - -GetAppIdOk returns a tuple with the AppId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAppId - -`func (o *SamlFactor) SetAppId(v string)` - -SetAppId sets AppId field to given value. - - -### GetDeviceId - -`func (o *SamlFactor) GetDeviceId() string` - -GetDeviceId returns the DeviceId field if non-nil, zero value otherwise. - -### GetDeviceIdOk - -`func (o *SamlFactor) GetDeviceIdOk() (*string, bool)` - -GetDeviceIdOk returns a tuple with the DeviceId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDeviceId - -`func (o *SamlFactor) SetDeviceId(v string)` - -SetDeviceId sets DeviceId field to given value. - - -### GetStateToken - -`func (o *SamlFactor) GetStateToken() string` - -GetStateToken returns the StateToken field if non-nil, zero value otherwise. - -### GetStateTokenOk - -`func (o *SamlFactor) GetStateTokenOk() (*string, bool)` - -GetStateTokenOk returns a tuple with the StateToken field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStateToken - -`func (o *SamlFactor) SetStateToken(v string)` - -SetStateToken sets StateToken field to given value. - - -### GetOtpToken - -`func (o *SamlFactor) GetOtpToken() string` - -GetOtpToken returns the OtpToken field if non-nil, zero value otherwise. - -### GetOtpTokenOk - -`func (o *SamlFactor) GetOtpTokenOk() (*string, bool)` - -GetOtpTokenOk returns a tuple with the OtpToken field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetOtpToken - -`func (o *SamlFactor) SetOtpToken(v string)` - -SetOtpToken sets OtpToken field to given value. - -### HasOtpToken - -`func (o *SamlFactor) HasOtpToken() bool` - -HasOtpToken returns a boolean if a field has been set. - -### GetDoNotNotify - -`func (o *SamlFactor) GetDoNotNotify() bool` - -GetDoNotNotify returns the DoNotNotify field if non-nil, zero value otherwise. - -### GetDoNotNotifyOk - -`func (o *SamlFactor) GetDoNotNotifyOk() (*bool, bool)` - -GetDoNotNotifyOk returns a tuple with the DoNotNotify field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDoNotNotify - -`func (o *SamlFactor) SetDoNotNotify(v bool)` - -SetDoNotNotify sets DoNotNotify field to given value. - -### HasDoNotNotify - -`func (o *SamlFactor) HasDoNotNotify() bool` - -HasDoNotNotify 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/Scope.md b/docs/Scope.md deleted file mode 100644 index 0b9bd90..0000000 --- a/docs/Scope.md +++ /dev/null @@ -1,108 +0,0 @@ -# Scope - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | Pointer to **int32** | Unique Scope ID value | [optional] -**Value** | Pointer to **string** | Scope Value | [optional] -**Description** | Pointer to **string** | Description of the scope | [optional] - -## Methods - -### NewScope - -`func NewScope() *Scope` - -NewScope instantiates a new Scope 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 - -### NewScopeWithDefaults - -`func NewScopeWithDefaults() *Scope` - -NewScopeWithDefaults instantiates a new Scope 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 - -### GetId - -`func (o *Scope) GetId() int32` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *Scope) GetIdOk() (*int32, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *Scope) SetId(v int32)` - -SetId sets Id field to given value. - -### HasId - -`func (o *Scope) HasId() bool` - -HasId returns a boolean if a field has been set. - -### GetValue - -`func (o *Scope) GetValue() string` - -GetValue returns the Value field if non-nil, zero value otherwise. - -### GetValueOk - -`func (o *Scope) GetValueOk() (*string, bool)` - -GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetValue - -`func (o *Scope) SetValue(v string)` - -SetValue sets Value field to given value. - -### HasValue - -`func (o *Scope) HasValue() bool` - -HasValue returns a boolean if a field has been set. - -### GetDescription - -`func (o *Scope) GetDescription() string` - -GetDescription returns the Description field if non-nil, zero value otherwise. - -### GetDescriptionOk - -`func (o *Scope) GetDescriptionOk() (*string, bool)` - -GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDescription - -`func (o *Scope) SetDescription(v string)` - -SetDescription sets Description field to given value. - -### HasDescription - -`func (o *Scope) HasDescription() bool` - -HasDescription 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/SendInviteLink200Response.md b/docs/SendInviteLink200Response.md deleted file mode 100644 index 040de9f..0000000 --- a/docs/SendInviteLink200Response.md +++ /dev/null @@ -1,56 +0,0 @@ -# SendInviteLink200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Status** | Pointer to [**Error**](Error.md) | | [optional] - -## Methods - -### NewSendInviteLink200Response - -`func NewSendInviteLink200Response() *SendInviteLink200Response` - -NewSendInviteLink200Response instantiates a new SendInviteLink200Response 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 - -### NewSendInviteLink200ResponseWithDefaults - -`func NewSendInviteLink200ResponseWithDefaults() *SendInviteLink200Response` - -NewSendInviteLink200ResponseWithDefaults instantiates a new SendInviteLink200Response 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 - -### GetStatus - -`func (o *SendInviteLink200Response) GetStatus() Error` - -GetStatus returns the Status field if non-nil, zero value otherwise. - -### GetStatusOk - -`func (o *SendInviteLink200Response) GetStatusOk() (*Error, bool)` - -GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStatus - -`func (o *SendInviteLink200Response) SetStatus(v Error)` - -SetStatus sets Status field to given value. - -### HasStatus - -`func (o *SendInviteLink200Response) HasStatus() bool` - -HasStatus 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/SendInviteLinkRequest.md b/docs/SendInviteLinkRequest.md deleted file mode 100644 index 0c4762e..0000000 --- a/docs/SendInviteLinkRequest.md +++ /dev/null @@ -1,82 +0,0 @@ -# SendInviteLinkRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Email** | Pointer to **string** | Set to the user email address to generate an invite link. The value is case sensitive. | [optional] -**PersonalEmail** | Pointer to **string** | To send an invite email to a different address than the one provided in email, provide it here. The invite link is sent to this address instead. | [optional] - -## Methods - -### NewSendInviteLinkRequest - -`func NewSendInviteLinkRequest() *SendInviteLinkRequest` - -NewSendInviteLinkRequest instantiates a new SendInviteLinkRequest 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 - -### NewSendInviteLinkRequestWithDefaults - -`func NewSendInviteLinkRequestWithDefaults() *SendInviteLinkRequest` - -NewSendInviteLinkRequestWithDefaults instantiates a new SendInviteLinkRequest 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 - -### GetEmail - -`func (o *SendInviteLinkRequest) GetEmail() string` - -GetEmail returns the Email field if non-nil, zero value otherwise. - -### GetEmailOk - -`func (o *SendInviteLinkRequest) 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 *SendInviteLinkRequest) SetEmail(v string)` - -SetEmail sets Email field to given value. - -### HasEmail - -`func (o *SendInviteLinkRequest) HasEmail() bool` - -HasEmail returns a boolean if a field has been set. - -### GetPersonalEmail - -`func (o *SendInviteLinkRequest) GetPersonalEmail() string` - -GetPersonalEmail returns the PersonalEmail field if non-nil, zero value otherwise. - -### GetPersonalEmailOk - -`func (o *SendInviteLinkRequest) GetPersonalEmailOk() (*string, bool)` - -GetPersonalEmailOk returns a tuple with the PersonalEmail field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPersonalEmail - -`func (o *SendInviteLinkRequest) SetPersonalEmail(v string)` - -SetPersonalEmail sets PersonalEmail field to given value. - -### HasPersonalEmail - -`func (o *SendInviteLinkRequest) HasPersonalEmail() bool` - -HasPersonalEmail 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/Session.md b/docs/Session.md deleted file mode 100644 index 8137467..0000000 --- a/docs/Session.md +++ /dev/null @@ -1,56 +0,0 @@ -# Session - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | Pointer to **string** | If you use a database to track sessions, you can send us the session ID. | [optional] - -## Methods - -### NewSession - -`func NewSession() *Session` - -NewSession instantiates a new Session 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 - -### NewSessionWithDefaults - -`func NewSessionWithDefaults() *Session` - -NewSessionWithDefaults instantiates a new Session 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 - -### GetId - -`func (o *Session) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *Session) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *Session) SetId(v string)` - -SetId sets Id field to given value. - -### HasId - -`func (o *Session) HasId() bool` - -HasId 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/SetUserStateRequest.md b/docs/SetUserStateRequest.md deleted file mode 100644 index 957480d..0000000 --- a/docs/SetUserStateRequest.md +++ /dev/null @@ -1,51 +0,0 @@ -# SetUserStateRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**State** | **int32** | Set to the state value. Valid values include: - 0 : Unapproved - 1 : Approved - 2 : Rejected - 3 : Unlicensed | - -## Methods - -### NewSetUserStateRequest - -`func NewSetUserStateRequest(state int32, ) *SetUserStateRequest` - -NewSetUserStateRequest instantiates a new SetUserStateRequest 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 - -### NewSetUserStateRequestWithDefaults - -`func NewSetUserStateRequestWithDefaults() *SetUserStateRequest` - -NewSetUserStateRequestWithDefaults instantiates a new SetUserStateRequest 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 - -### GetState - -`func (o *SetUserStateRequest) GetState() int32` - -GetState returns the State field if non-nil, zero value otherwise. - -### GetStateOk - -`func (o *SetUserStateRequest) GetStateOk() (*int32, bool)` - -GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetState - -`func (o *SetUserStateRequest) SetState(v int32)` - -SetState sets State 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/SmartHooksApi.md b/docs/SmartHooksApi.md deleted file mode 100644 index a631499..0000000 --- a/docs/SmartHooksApi.md +++ /dev/null @@ -1,791 +0,0 @@ -# \SmartHooksApi - -All URIs are relative to *https://your-api-subdomain.onelogin.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateEnvironmentVariable**](SmartHooksApi.md#CreateEnvironmentVariable) | **Post** /api/2/hooks/envs | Create Environment Variable -[**CreateHook**](SmartHooksApi.md#CreateHook) | **Post** /api/2/hooks | Create Smart Hook -[**DeleteEnvironmentVariable**](SmartHooksApi.md#DeleteEnvironmentVariable) | **Delete** /api/2/hooks/envs/{envvar_id} | Delete Environment Variable -[**DeleteHook**](SmartHooksApi.md#DeleteHook) | **Delete** /api/2/hooks/{hook_id} | Delete Smart Hook by ID -[**GetEnvironmentVariable**](SmartHooksApi.md#GetEnvironmentVariable) | **Get** /api/2/hooks/envs/{envvar_id} | Get Environment Variable -[**GetHook**](SmartHooksApi.md#GetHook) | **Get** /api/2/hooks/{hook_id} | Get Smart Hook by ID -[**GetLogs**](SmartHooksApi.md#GetLogs) | **Get** /api/2/hooks/{hook_id}/logs | Get Smart Hook Logs -[**ListEnvironmentVariables**](SmartHooksApi.md#ListEnvironmentVariables) | **Get** /api/2/hooks/envs | List Environment Variables -[**ListHooks**](SmartHooksApi.md#ListHooks) | **Get** /api/2/hooks | List all Smart Hooks -[**UpdateEnvironmentVariable**](SmartHooksApi.md#UpdateEnvironmentVariable) | **Put** /api/2/hooks/envs/{envvar_id} | Update Environment Variable -[**UpdateHook**](SmartHooksApi.md#UpdateHook) | **Put** /api/2/hooks/{hook_id} | Update Smart Hook by ID - - - -## CreateEnvironmentVariable - -> HookEnvvar CreateEnvironmentVariable(ctx).HookEnvvar(hookEnvvar).Execute() - -Create Environment Variable - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - hookEnvvar := *openapiclient.NewHookEnvvar("Name_example", "Value_example") // HookEnvvar | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.SmartHooksApi.CreateEnvironmentVariable(context.Background()).HookEnvvar(hookEnvvar).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `SmartHooksApi.CreateEnvironmentVariable``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `CreateEnvironmentVariable`: HookEnvvar - fmt.Fprintf(os.Stdout, "Response from `SmartHooksApi.CreateEnvironmentVariable`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiCreateEnvironmentVariableRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **hookEnvvar** | [**HookEnvvar**](HookEnvvar.md) | | - -### Return type - -[**HookEnvvar**](HookEnvvar.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## CreateHook - -> Hook CreateHook(ctx).Hook(hook).Execute() - -Create Smart Hook - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - hook := *openapiclient.NewHook("Type_example", false, int32(123), []string{"EnvVars_example"}, "Runtime_example", int32(123), map[string]string{"key": "Inner_example"}, "Function_example") // Hook | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.SmartHooksApi.CreateHook(context.Background()).Hook(hook).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `SmartHooksApi.CreateHook``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `CreateHook`: Hook - fmt.Fprintf(os.Stdout, "Response from `SmartHooksApi.CreateHook`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiCreateHookRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **hook** | [**Hook**](Hook.md) | | - -### Return type - -[**Hook**](Hook.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## DeleteEnvironmentVariable - -> DeleteEnvironmentVariable(ctx, envvarId).Execute() - -Delete Environment Variable - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - envvarId := "envvarId_example" // string | Set to the id of the Hook Environment Variable that you want to fetch. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.SmartHooksApi.DeleteEnvironmentVariable(context.Background(), envvarId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `SmartHooksApi.DeleteEnvironmentVariable``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**envvarId** | **string** | Set to the id of the Hook Environment Variable that you want to fetch. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiDeleteEnvironmentVariableRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - - (empty response body) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## DeleteHook - -> DeleteHook(ctx, hookId).Execute() - -Delete Smart Hook by ID - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - hookId := "hookId_example" // string | Set to the id of the Hook that you want to return. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.SmartHooksApi.DeleteHook(context.Background(), hookId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `SmartHooksApi.DeleteHook``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**hookId** | **string** | Set to the id of the Hook that you want to return. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiDeleteHookRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - - (empty response body) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetEnvironmentVariable - -> HookEnvvar GetEnvironmentVariable(ctx, envvarId).Execute() - -Get Environment Variable - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - envvarId := "envvarId_example" // string | Set to the id of the Hook Environment Variable that you want to fetch. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.SmartHooksApi.GetEnvironmentVariable(context.Background(), envvarId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `SmartHooksApi.GetEnvironmentVariable``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetEnvironmentVariable`: HookEnvvar - fmt.Fprintf(os.Stdout, "Response from `SmartHooksApi.GetEnvironmentVariable`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**envvarId** | **string** | Set to the id of the Hook Environment Variable that you want to fetch. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetEnvironmentVariableRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**HookEnvvar**](HookEnvvar.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetHook - -> Hook GetHook(ctx, hookId).Execute() - -Get Smart Hook by ID - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - hookId := "hookId_example" // string | Set to the id of the Hook that you want to return. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.SmartHooksApi.GetHook(context.Background(), hookId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `SmartHooksApi.GetHook``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetHook`: Hook - fmt.Fprintf(os.Stdout, "Response from `SmartHooksApi.GetHook`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**hookId** | **string** | Set to the id of the Hook that you want to return. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetHookRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**Hook**](Hook.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetLogs - -> []HookLog GetLogs(ctx, hookId).Limit(limit).Page(page).Cursor(cursor).RequestId(requestId).CorrelationId(correlationId).Execute() - -Get Smart Hook Logs - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - hookId := "hookId_example" // string | Set to the id of the Hook that you want to return. - limit := int32(56) // int32 | How many items to return at one time (max 100) (optional) - page := int32(56) // int32 | The page number of results to return. (optional) - cursor := "cursor_example" // string | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. (optional) - requestId := "requestId_example" // string | Returns logs that contain this request_id. (optional) - correlationId := "correlationId_example" // string | Returns logs that contain this correlation_id. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.SmartHooksApi.GetLogs(context.Background(), hookId).Limit(limit).Page(page).Cursor(cursor).RequestId(requestId).CorrelationId(correlationId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `SmartHooksApi.GetLogs``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetLogs`: []HookLog - fmt.Fprintf(os.Stdout, "Response from `SmartHooksApi.GetLogs`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**hookId** | **string** | Set to the id of the Hook that you want to return. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetLogsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **limit** | **int32** | How many items to return at one time (max 100) | - **page** | **int32** | The page number of results to return. | - **cursor** | **string** | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. | - **requestId** | **string** | Returns logs that contain this request_id. | - **correlationId** | **string** | Returns logs that contain this correlation_id. | - -### Return type - -[**[]HookLog**](HookLog.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## ListEnvironmentVariables - -> []HookEnvvar ListEnvironmentVariables(ctx).Limit(limit).Page(page).Cursor(cursor).Execute() - -List Environment Variables - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - limit := int32(56) // int32 | How many items to return at one time (max 100) (optional) - page := int32(56) // int32 | The page number of results to return. (optional) - cursor := "cursor_example" // string | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.SmartHooksApi.ListEnvironmentVariables(context.Background()).Limit(limit).Page(page).Cursor(cursor).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `SmartHooksApi.ListEnvironmentVariables``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ListEnvironmentVariables`: []HookEnvvar - fmt.Fprintf(os.Stdout, "Response from `SmartHooksApi.ListEnvironmentVariables`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiListEnvironmentVariablesRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **limit** | **int32** | How many items to return at one time (max 100) | - **page** | **int32** | The page number of results to return. | - **cursor** | **string** | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. | - -### Return type - -[**[]HookEnvvar**](HookEnvvar.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## ListHooks - -> []Hook ListHooks(ctx).Limit(limit).Page(page).Cursor(cursor).Execute() - -List all Smart Hooks - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - limit := int32(56) // int32 | How many items to return at one time (max 100) (optional) - page := int32(56) // int32 | The page number of results to return. (optional) - cursor := "cursor_example" // string | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.SmartHooksApi.ListHooks(context.Background()).Limit(limit).Page(page).Cursor(cursor).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `SmartHooksApi.ListHooks``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ListHooks`: []Hook - fmt.Fprintf(os.Stdout, "Response from `SmartHooksApi.ListHooks`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiListHooksRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **limit** | **int32** | How many items to return at one time (max 100) | - **page** | **int32** | The page number of results to return. | - **cursor** | **string** | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. | - -### Return type - -[**[]Hook**](Hook.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## UpdateEnvironmentVariable - -> HookEnvvar UpdateEnvironmentVariable(ctx, envvarId).UpdateEnvironmentVariableRequest(updateEnvironmentVariableRequest).Execute() - -Update Environment Variable - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - envvarId := "envvarId_example" // string | Set to the id of the Hook Environment Variable that you want to fetch. - updateEnvironmentVariableRequest := *openapiclient.NewUpdateEnvironmentVariableRequest("Value_example") // UpdateEnvironmentVariableRequest | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.SmartHooksApi.UpdateEnvironmentVariable(context.Background(), envvarId).UpdateEnvironmentVariableRequest(updateEnvironmentVariableRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `SmartHooksApi.UpdateEnvironmentVariable``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `UpdateEnvironmentVariable`: HookEnvvar - fmt.Fprintf(os.Stdout, "Response from `SmartHooksApi.UpdateEnvironmentVariable`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**envvarId** | **string** | Set to the id of the Hook Environment Variable that you want to fetch. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiUpdateEnvironmentVariableRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **updateEnvironmentVariableRequest** | [**UpdateEnvironmentVariableRequest**](UpdateEnvironmentVariableRequest.md) | | - -### Return type - -[**HookEnvvar**](HookEnvvar.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## UpdateHook - -> Hook UpdateHook(ctx, hookId).Hook(hook).Execute() - -Update Smart Hook by ID - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - hookId := "hookId_example" // string | Set to the id of the Hook that you want to return. - hook := *openapiclient.NewHook("Type_example", false, int32(123), []string{"EnvVars_example"}, "Runtime_example", int32(123), map[string]string{"key": "Inner_example"}, "Function_example") // Hook | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.SmartHooksApi.UpdateHook(context.Background(), hookId).Hook(hook).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `SmartHooksApi.UpdateHook``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `UpdateHook`: Hook - fmt.Fprintf(os.Stdout, "Response from `SmartHooksApi.UpdateHook`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**hookId** | **string** | Set to the id of the Hook that you want to return. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiUpdateHookRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **hook** | [**Hook**](Hook.md) | | - -### Return type - -[**Hook**](Hook.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/docs/Source.md b/docs/Source.md deleted file mode 100644 index 86185fe..0000000 --- a/docs/Source.md +++ /dev/null @@ -1,82 +0,0 @@ -# Source - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | Pointer to **string** | A unique id that represents the source of the event. | [optional] -**Name** | Pointer to **string** | The name of the source | [optional] - -## Methods - -### NewSource - -`func NewSource() *Source` - -NewSource instantiates a new Source 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 - -### NewSourceWithDefaults - -`func NewSourceWithDefaults() *Source` - -NewSourceWithDefaults instantiates a new Source 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 - -### GetId - -`func (o *Source) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *Source) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *Source) SetId(v string)` - -SetId sets Id field to given value. - -### HasId - -`func (o *Source) HasId() bool` - -HasId returns a boolean if a field has been set. - -### GetName - -`func (o *Source) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *Source) 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 *Source) SetName(v string)` - -SetName sets Name field to given value. - -### HasName - -`func (o *Source) HasName() bool` - -HasName 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/SsoOidc.md b/docs/SsoOidc.md deleted file mode 100644 index 0b424df..0000000 --- a/docs/SsoOidc.md +++ /dev/null @@ -1,56 +0,0 @@ -# SsoOidc - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ClientId** | Pointer to **string** | OIDC: The OpenId Connect Client Id. Note that client_secret is only returned after Creating an App | [optional] - -## Methods - -### NewSsoOidc - -`func NewSsoOidc() *SsoOidc` - -NewSsoOidc instantiates a new SsoOidc 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 - -### NewSsoOidcWithDefaults - -`func NewSsoOidcWithDefaults() *SsoOidc` - -NewSsoOidcWithDefaults instantiates a new SsoOidc 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 - -### GetClientId - -`func (o *SsoOidc) GetClientId() string` - -GetClientId returns the ClientId field if non-nil, zero value otherwise. - -### GetClientIdOk - -`func (o *SsoOidc) GetClientIdOk() (*string, bool)` - -GetClientIdOk returns a tuple with the ClientId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetClientId - -`func (o *SsoOidc) SetClientId(v string)` - -SetClientId sets ClientId field to given value. - -### HasClientId - -`func (o *SsoOidc) HasClientId() bool` - -HasClientId 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/SsoSaml.md b/docs/SsoSaml.md deleted file mode 100644 index c9887d8..0000000 --- a/docs/SsoSaml.md +++ /dev/null @@ -1,160 +0,0 @@ -# SsoSaml - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**MetadataUrl** | Pointer to **string** | | [optional] -**AcsUrl** | Pointer to **string** | | [optional] -**SlsUrl** | Pointer to **string** | | [optional] -**Issuer** | Pointer to **string** | | [optional] -**Certificate** | Pointer to [**SsoSamlCertificate**](SsoSamlCertificate.md) | | [optional] - -## Methods - -### NewSsoSaml - -`func NewSsoSaml() *SsoSaml` - -NewSsoSaml instantiates a new SsoSaml 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 - -### NewSsoSamlWithDefaults - -`func NewSsoSamlWithDefaults() *SsoSaml` - -NewSsoSamlWithDefaults instantiates a new SsoSaml 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 - -### GetMetadataUrl - -`func (o *SsoSaml) GetMetadataUrl() string` - -GetMetadataUrl returns the MetadataUrl field if non-nil, zero value otherwise. - -### GetMetadataUrlOk - -`func (o *SsoSaml) GetMetadataUrlOk() (*string, bool)` - -GetMetadataUrlOk returns a tuple with the MetadataUrl field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMetadataUrl - -`func (o *SsoSaml) SetMetadataUrl(v string)` - -SetMetadataUrl sets MetadataUrl field to given value. - -### HasMetadataUrl - -`func (o *SsoSaml) HasMetadataUrl() bool` - -HasMetadataUrl returns a boolean if a field has been set. - -### GetAcsUrl - -`func (o *SsoSaml) GetAcsUrl() string` - -GetAcsUrl returns the AcsUrl field if non-nil, zero value otherwise. - -### GetAcsUrlOk - -`func (o *SsoSaml) GetAcsUrlOk() (*string, bool)` - -GetAcsUrlOk returns a tuple with the AcsUrl field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAcsUrl - -`func (o *SsoSaml) SetAcsUrl(v string)` - -SetAcsUrl sets AcsUrl field to given value. - -### HasAcsUrl - -`func (o *SsoSaml) HasAcsUrl() bool` - -HasAcsUrl returns a boolean if a field has been set. - -### GetSlsUrl - -`func (o *SsoSaml) GetSlsUrl() string` - -GetSlsUrl returns the SlsUrl field if non-nil, zero value otherwise. - -### GetSlsUrlOk - -`func (o *SsoSaml) GetSlsUrlOk() (*string, bool)` - -GetSlsUrlOk returns a tuple with the SlsUrl field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSlsUrl - -`func (o *SsoSaml) SetSlsUrl(v string)` - -SetSlsUrl sets SlsUrl field to given value. - -### HasSlsUrl - -`func (o *SsoSaml) HasSlsUrl() bool` - -HasSlsUrl returns a boolean if a field has been set. - -### GetIssuer - -`func (o *SsoSaml) GetIssuer() string` - -GetIssuer returns the Issuer field if non-nil, zero value otherwise. - -### GetIssuerOk - -`func (o *SsoSaml) 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 *SsoSaml) SetIssuer(v string)` - -SetIssuer sets Issuer field to given value. - -### HasIssuer - -`func (o *SsoSaml) HasIssuer() bool` - -HasIssuer returns a boolean if a field has been set. - -### GetCertificate - -`func (o *SsoSaml) GetCertificate() SsoSamlCertificate` - -GetCertificate returns the Certificate field if non-nil, zero value otherwise. - -### GetCertificateOk - -`func (o *SsoSaml) GetCertificateOk() (*SsoSamlCertificate, bool)` - -GetCertificateOk returns a tuple with the Certificate field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCertificate - -`func (o *SsoSaml) SetCertificate(v SsoSamlCertificate)` - -SetCertificate sets Certificate field to given value. - -### HasCertificate - -`func (o *SsoSaml) HasCertificate() bool` - -HasCertificate 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/SsoSamlCertificate.md b/docs/SsoSamlCertificate.md deleted file mode 100644 index 9536cca..0000000 --- a/docs/SsoSamlCertificate.md +++ /dev/null @@ -1,108 +0,0 @@ -# SsoSamlCertificate - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | Pointer to **int32** | SAML Certificate ID | [optional] -**Name** | Pointer to **string** | SAML Certificate Name | [optional] -**Value** | Pointer to **string** | SAML Certificate Value | [optional] - -## Methods - -### NewSsoSamlCertificate - -`func NewSsoSamlCertificate() *SsoSamlCertificate` - -NewSsoSamlCertificate instantiates a new SsoSamlCertificate 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 - -### NewSsoSamlCertificateWithDefaults - -`func NewSsoSamlCertificateWithDefaults() *SsoSamlCertificate` - -NewSsoSamlCertificateWithDefaults instantiates a new SsoSamlCertificate 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 - -### GetId - -`func (o *SsoSamlCertificate) GetId() int32` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *SsoSamlCertificate) GetIdOk() (*int32, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *SsoSamlCertificate) SetId(v int32)` - -SetId sets Id field to given value. - -### HasId - -`func (o *SsoSamlCertificate) HasId() bool` - -HasId returns a boolean if a field has been set. - -### GetName - -`func (o *SsoSamlCertificate) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *SsoSamlCertificate) 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 *SsoSamlCertificate) SetName(v string)` - -SetName sets Name field to given value. - -### HasName - -`func (o *SsoSamlCertificate) HasName() bool` - -HasName returns a boolean if a field has been set. - -### GetValue - -`func (o *SsoSamlCertificate) GetValue() string` - -GetValue returns the Value field if non-nil, zero value otherwise. - -### GetValueOk - -`func (o *SsoSamlCertificate) GetValueOk() (*string, bool)` - -GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetValue - -`func (o *SsoSamlCertificate) SetValue(v string)` - -SetValue sets Value field to given value. - -### HasValue - -`func (o *SsoSamlCertificate) HasValue() bool` - -HasValue 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/TokenClaim.md b/docs/TokenClaim.md deleted file mode 100644 index d84d072..0000000 --- a/docs/TokenClaim.md +++ /dev/null @@ -1,264 +0,0 @@ -# TokenClaim - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | Pointer to **int32** | The unique ID of the claim. | [optional] -**Label** | Pointer to **string** | The UI label for the claims. | [optional] -**UserAttributeMappings** | Pointer to **string** | A user attribute to map values from. | [optional] -**UserAttributeMacros** | Pointer to **string** | When `user_attribute_mappings` is set to `_macro_` this macro will be used to assign the claims value. | [optional] -**AttributeTransformations** | Pointer to **string** | The type of transformation to perform on multi valued attributes. | [optional] -**SkipIfBlank** | Pointer to **bool** | not used | [optional] -**Values** | Pointer to **[]string** | Relates to Rules/Entitlements. Not supported yet. | [optional] -**DefaultValues** | Pointer to **string** | Relates to Rules/Entitlements. Not supported yet. | [optional] -**ProvisionedEntitlements** | Pointer to **bool** | Relates to Rules/Entitlements. Not supported yet. | [optional] - -## Methods - -### NewTokenClaim - -`func NewTokenClaim() *TokenClaim` - -NewTokenClaim instantiates a new TokenClaim 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 - -### NewTokenClaimWithDefaults - -`func NewTokenClaimWithDefaults() *TokenClaim` - -NewTokenClaimWithDefaults instantiates a new TokenClaim 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 - -### GetId - -`func (o *TokenClaim) GetId() int32` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *TokenClaim) GetIdOk() (*int32, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *TokenClaim) SetId(v int32)` - -SetId sets Id field to given value. - -### HasId - -`func (o *TokenClaim) HasId() bool` - -HasId returns a boolean if a field has been set. - -### GetLabel - -`func (o *TokenClaim) GetLabel() string` - -GetLabel returns the Label field if non-nil, zero value otherwise. - -### GetLabelOk - -`func (o *TokenClaim) GetLabelOk() (*string, bool)` - -GetLabelOk returns a tuple with the Label field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLabel - -`func (o *TokenClaim) SetLabel(v string)` - -SetLabel sets Label field to given value. - -### HasLabel - -`func (o *TokenClaim) HasLabel() bool` - -HasLabel returns a boolean if a field has been set. - -### GetUserAttributeMappings - -`func (o *TokenClaim) GetUserAttributeMappings() string` - -GetUserAttributeMappings returns the UserAttributeMappings field if non-nil, zero value otherwise. - -### GetUserAttributeMappingsOk - -`func (o *TokenClaim) GetUserAttributeMappingsOk() (*string, bool)` - -GetUserAttributeMappingsOk returns a tuple with the UserAttributeMappings field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUserAttributeMappings - -`func (o *TokenClaim) SetUserAttributeMappings(v string)` - -SetUserAttributeMappings sets UserAttributeMappings field to given value. - -### HasUserAttributeMappings - -`func (o *TokenClaim) HasUserAttributeMappings() bool` - -HasUserAttributeMappings returns a boolean if a field has been set. - -### GetUserAttributeMacros - -`func (o *TokenClaim) GetUserAttributeMacros() string` - -GetUserAttributeMacros returns the UserAttributeMacros field if non-nil, zero value otherwise. - -### GetUserAttributeMacrosOk - -`func (o *TokenClaim) GetUserAttributeMacrosOk() (*string, bool)` - -GetUserAttributeMacrosOk returns a tuple with the UserAttributeMacros field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUserAttributeMacros - -`func (o *TokenClaim) SetUserAttributeMacros(v string)` - -SetUserAttributeMacros sets UserAttributeMacros field to given value. - -### HasUserAttributeMacros - -`func (o *TokenClaim) HasUserAttributeMacros() bool` - -HasUserAttributeMacros returns a boolean if a field has been set. - -### GetAttributeTransformations - -`func (o *TokenClaim) GetAttributeTransformations() string` - -GetAttributeTransformations returns the AttributeTransformations field if non-nil, zero value otherwise. - -### GetAttributeTransformationsOk - -`func (o *TokenClaim) GetAttributeTransformationsOk() (*string, bool)` - -GetAttributeTransformationsOk returns a tuple with the AttributeTransformations field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAttributeTransformations - -`func (o *TokenClaim) SetAttributeTransformations(v string)` - -SetAttributeTransformations sets AttributeTransformations field to given value. - -### HasAttributeTransformations - -`func (o *TokenClaim) HasAttributeTransformations() bool` - -HasAttributeTransformations returns a boolean if a field has been set. - -### GetSkipIfBlank - -`func (o *TokenClaim) GetSkipIfBlank() bool` - -GetSkipIfBlank returns the SkipIfBlank field if non-nil, zero value otherwise. - -### GetSkipIfBlankOk - -`func (o *TokenClaim) GetSkipIfBlankOk() (*bool, bool)` - -GetSkipIfBlankOk returns a tuple with the SkipIfBlank field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSkipIfBlank - -`func (o *TokenClaim) SetSkipIfBlank(v bool)` - -SetSkipIfBlank sets SkipIfBlank field to given value. - -### HasSkipIfBlank - -`func (o *TokenClaim) HasSkipIfBlank() bool` - -HasSkipIfBlank returns a boolean if a field has been set. - -### GetValues - -`func (o *TokenClaim) GetValues() []string` - -GetValues returns the Values field if non-nil, zero value otherwise. - -### GetValuesOk - -`func (o *TokenClaim) GetValuesOk() (*[]string, bool)` - -GetValuesOk returns a tuple with the Values field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetValues - -`func (o *TokenClaim) SetValues(v []string)` - -SetValues sets Values field to given value. - -### HasValues - -`func (o *TokenClaim) HasValues() bool` - -HasValues returns a boolean if a field has been set. - -### GetDefaultValues - -`func (o *TokenClaim) GetDefaultValues() string` - -GetDefaultValues returns the DefaultValues field if non-nil, zero value otherwise. - -### GetDefaultValuesOk - -`func (o *TokenClaim) GetDefaultValuesOk() (*string, bool)` - -GetDefaultValuesOk returns a tuple with the DefaultValues field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDefaultValues - -`func (o *TokenClaim) SetDefaultValues(v string)` - -SetDefaultValues sets DefaultValues field to given value. - -### HasDefaultValues - -`func (o *TokenClaim) HasDefaultValues() bool` - -HasDefaultValues returns a boolean if a field has been set. - -### GetProvisionedEntitlements - -`func (o *TokenClaim) GetProvisionedEntitlements() bool` - -GetProvisionedEntitlements returns the ProvisionedEntitlements field if non-nil, zero value otherwise. - -### GetProvisionedEntitlementsOk - -`func (o *TokenClaim) GetProvisionedEntitlementsOk() (*bool, bool)` - -GetProvisionedEntitlementsOk returns a tuple with the ProvisionedEntitlements field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetProvisionedEntitlements - -`func (o *TokenClaim) SetProvisionedEntitlements(v bool)` - -SetProvisionedEntitlements sets ProvisionedEntitlements field to given value. - -### HasProvisionedEntitlements - -`func (o *TokenClaim) HasProvisionedEntitlements() bool` - -HasProvisionedEntitlements 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/TrackRiskEventRequest.md b/docs/TrackRiskEventRequest.md deleted file mode 100644 index 81e9dad..0000000 --- a/docs/TrackRiskEventRequest.md +++ /dev/null @@ -1,244 +0,0 @@ -# TrackRiskEventRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Verb** | **string** | Verbs are used to distinguish between different types of events. | -**Ip** | **string** | The IP address of the User's request. | -**UserAgent** | **string** | The user agent of the User's request. | -**User** | [**RiskUser**](RiskUser.md) | | -**Source** | Pointer to [**Source**](Source.md) | | [optional] -**Session** | Pointer to [**Session**](Session.md) | | [optional] -**Device** | Pointer to [**RiskDevice**](RiskDevice.md) | | [optional] -**Fp** | Pointer to **string** | Set to the value of the __tdli_fp cookie. | [optional] -**Published** | Pointer to **string** | Date and time of the event in IS08601 format. Useful for preloading old events. Defaults to date time this API request is received. | [optional] - -## Methods - -### NewTrackRiskEventRequest - -`func NewTrackRiskEventRequest(verb string, ip string, userAgent string, user RiskUser, ) *TrackRiskEventRequest` - -NewTrackRiskEventRequest instantiates a new TrackRiskEventRequest 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 - -### NewTrackRiskEventRequestWithDefaults - -`func NewTrackRiskEventRequestWithDefaults() *TrackRiskEventRequest` - -NewTrackRiskEventRequestWithDefaults instantiates a new TrackRiskEventRequest 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 - -### GetVerb - -`func (o *TrackRiskEventRequest) GetVerb() string` - -GetVerb returns the Verb field if non-nil, zero value otherwise. - -### GetVerbOk - -`func (o *TrackRiskEventRequest) GetVerbOk() (*string, bool)` - -GetVerbOk returns a tuple with the Verb field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetVerb - -`func (o *TrackRiskEventRequest) SetVerb(v string)` - -SetVerb sets Verb field to given value. - - -### GetIp - -`func (o *TrackRiskEventRequest) GetIp() string` - -GetIp returns the Ip field if non-nil, zero value otherwise. - -### GetIpOk - -`func (o *TrackRiskEventRequest) GetIpOk() (*string, bool)` - -GetIpOk returns a tuple with the Ip field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIp - -`func (o *TrackRiskEventRequest) SetIp(v string)` - -SetIp sets Ip field to given value. - - -### GetUserAgent - -`func (o *TrackRiskEventRequest) GetUserAgent() string` - -GetUserAgent returns the UserAgent field if non-nil, zero value otherwise. - -### GetUserAgentOk - -`func (o *TrackRiskEventRequest) GetUserAgentOk() (*string, bool)` - -GetUserAgentOk returns a tuple with the UserAgent field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUserAgent - -`func (o *TrackRiskEventRequest) SetUserAgent(v string)` - -SetUserAgent sets UserAgent field to given value. - - -### GetUser - -`func (o *TrackRiskEventRequest) GetUser() RiskUser` - -GetUser returns the User field if non-nil, zero value otherwise. - -### GetUserOk - -`func (o *TrackRiskEventRequest) GetUserOk() (*RiskUser, bool)` - -GetUserOk returns a tuple with the User field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUser - -`func (o *TrackRiskEventRequest) SetUser(v RiskUser)` - -SetUser sets User field to given value. - - -### GetSource - -`func (o *TrackRiskEventRequest) GetSource() Source` - -GetSource returns the Source field if non-nil, zero value otherwise. - -### GetSourceOk - -`func (o *TrackRiskEventRequest) 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 *TrackRiskEventRequest) SetSource(v Source)` - -SetSource sets Source field to given value. - -### HasSource - -`func (o *TrackRiskEventRequest) HasSource() bool` - -HasSource returns a boolean if a field has been set. - -### GetSession - -`func (o *TrackRiskEventRequest) GetSession() Session` - -GetSession returns the Session field if non-nil, zero value otherwise. - -### GetSessionOk - -`func (o *TrackRiskEventRequest) GetSessionOk() (*Session, bool)` - -GetSessionOk returns a tuple with the Session field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSession - -`func (o *TrackRiskEventRequest) SetSession(v Session)` - -SetSession sets Session field to given value. - -### HasSession - -`func (o *TrackRiskEventRequest) HasSession() bool` - -HasSession returns a boolean if a field has been set. - -### GetDevice - -`func (o *TrackRiskEventRequest) GetDevice() RiskDevice` - -GetDevice returns the Device field if non-nil, zero value otherwise. - -### GetDeviceOk - -`func (o *TrackRiskEventRequest) GetDeviceOk() (*RiskDevice, bool)` - -GetDeviceOk returns a tuple with the Device field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDevice - -`func (o *TrackRiskEventRequest) SetDevice(v RiskDevice)` - -SetDevice sets Device field to given value. - -### HasDevice - -`func (o *TrackRiskEventRequest) HasDevice() bool` - -HasDevice returns a boolean if a field has been set. - -### GetFp - -`func (o *TrackRiskEventRequest) GetFp() string` - -GetFp returns the Fp field if non-nil, zero value otherwise. - -### GetFpOk - -`func (o *TrackRiskEventRequest) GetFpOk() (*string, bool)` - -GetFpOk returns a tuple with the Fp field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetFp - -`func (o *TrackRiskEventRequest) SetFp(v string)` - -SetFp sets Fp field to given value. - -### HasFp - -`func (o *TrackRiskEventRequest) HasFp() bool` - -HasFp returns a boolean if a field has been set. - -### GetPublished - -`func (o *TrackRiskEventRequest) GetPublished() string` - -GetPublished returns the Published field if non-nil, zero value otherwise. - -### GetPublishedOk - -`func (o *TrackRiskEventRequest) GetPublishedOk() (*string, bool)` - -GetPublishedOk returns a tuple with the Published field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPublished - -`func (o *TrackRiskEventRequest) SetPublished(v string)` - -SetPublished sets Published field to given value. - -### HasPublished - -`func (o *TrackRiskEventRequest) HasPublished() bool` - -HasPublished 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/UpdateClientAppRequest.md b/docs/UpdateClientAppRequest.md deleted file mode 100644 index 2fd85f9..0000000 --- a/docs/UpdateClientAppRequest.md +++ /dev/null @@ -1,56 +0,0 @@ -# UpdateClientAppRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Scopes** | Pointer to **[]int32** | An array of Scope IDs the scopes the app can request | [optional] - -## Methods - -### NewUpdateClientAppRequest - -`func NewUpdateClientAppRequest() *UpdateClientAppRequest` - -NewUpdateClientAppRequest instantiates a new UpdateClientAppRequest 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 - -### NewUpdateClientAppRequestWithDefaults - -`func NewUpdateClientAppRequestWithDefaults() *UpdateClientAppRequest` - -NewUpdateClientAppRequestWithDefaults instantiates a new UpdateClientAppRequest 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 - -### GetScopes - -`func (o *UpdateClientAppRequest) GetScopes() []int32` - -GetScopes returns the Scopes field if non-nil, zero value otherwise. - -### GetScopesOk - -`func (o *UpdateClientAppRequest) GetScopesOk() (*[]int32, bool)` - -GetScopesOk returns a tuple with the Scopes field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetScopes - -`func (o *UpdateClientAppRequest) SetScopes(v []int32)` - -SetScopes sets Scopes field to given value. - -### HasScopes - -`func (o *UpdateClientAppRequest) HasScopes() bool` - -HasScopes 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/UpdateEnvironmentVariableRequest.md b/docs/UpdateEnvironmentVariableRequest.md deleted file mode 100644 index 829f0e5..0000000 --- a/docs/UpdateEnvironmentVariableRequest.md +++ /dev/null @@ -1,51 +0,0 @@ -# UpdateEnvironmentVariableRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Value** | **string** | The secret value that will be encrypted at rest and injected in applicable hook functions at run time. | - -## Methods - -### NewUpdateEnvironmentVariableRequest - -`func NewUpdateEnvironmentVariableRequest(value string, ) *UpdateEnvironmentVariableRequest` - -NewUpdateEnvironmentVariableRequest instantiates a new UpdateEnvironmentVariableRequest 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 - -### NewUpdateEnvironmentVariableRequestWithDefaults - -`func NewUpdateEnvironmentVariableRequestWithDefaults() *UpdateEnvironmentVariableRequest` - -NewUpdateEnvironmentVariableRequestWithDefaults instantiates a new UpdateEnvironmentVariableRequest 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 - -### GetValue - -`func (o *UpdateEnvironmentVariableRequest) GetValue() string` - -GetValue returns the Value field if non-nil, zero value otherwise. - -### GetValueOk - -`func (o *UpdateEnvironmentVariableRequest) GetValueOk() (*string, bool)` - -GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetValue - -`func (o *UpdateEnvironmentVariableRequest) SetValue(v string)` - -SetValue sets Value 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/UpdatePasswordInsecureRequest.md b/docs/UpdatePasswordInsecureRequest.md deleted file mode 100644 index b56d593..0000000 --- a/docs/UpdatePasswordInsecureRequest.md +++ /dev/null @@ -1,98 +0,0 @@ -# UpdatePasswordInsecureRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Password** | **string** | Set to the password value using cleartext. Hashes are never stored as cleartext. They are stored securely using cryptographic hash. OneLogin continuously upgrades the strength of the hash. Ensure that the value meets the password strength requirements set for the account. | -**PasswordConfirmation** | **string** | Ensure that this value matches the password value exactly. | -**ValidatePolicy** | Pointer to **bool** | Will passwords validate against the User Policy. Defaults to false. | [optional] [default to false] - -## Methods - -### NewUpdatePasswordInsecureRequest - -`func NewUpdatePasswordInsecureRequest(password string, passwordConfirmation string, ) *UpdatePasswordInsecureRequest` - -NewUpdatePasswordInsecureRequest instantiates a new UpdatePasswordInsecureRequest 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 - -### NewUpdatePasswordInsecureRequestWithDefaults - -`func NewUpdatePasswordInsecureRequestWithDefaults() *UpdatePasswordInsecureRequest` - -NewUpdatePasswordInsecureRequestWithDefaults instantiates a new UpdatePasswordInsecureRequest 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 - -### GetPassword - -`func (o *UpdatePasswordInsecureRequest) GetPassword() string` - -GetPassword returns the Password field if non-nil, zero value otherwise. - -### GetPasswordOk - -`func (o *UpdatePasswordInsecureRequest) GetPasswordOk() (*string, bool)` - -GetPasswordOk returns a tuple with the Password field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPassword - -`func (o *UpdatePasswordInsecureRequest) SetPassword(v string)` - -SetPassword sets Password field to given value. - - -### GetPasswordConfirmation - -`func (o *UpdatePasswordInsecureRequest) GetPasswordConfirmation() string` - -GetPasswordConfirmation returns the PasswordConfirmation field if non-nil, zero value otherwise. - -### GetPasswordConfirmationOk - -`func (o *UpdatePasswordInsecureRequest) GetPasswordConfirmationOk() (*string, bool)` - -GetPasswordConfirmationOk returns a tuple with the PasswordConfirmation field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPasswordConfirmation - -`func (o *UpdatePasswordInsecureRequest) SetPasswordConfirmation(v string)` - -SetPasswordConfirmation sets PasswordConfirmation field to given value. - - -### GetValidatePolicy - -`func (o *UpdatePasswordInsecureRequest) GetValidatePolicy() bool` - -GetValidatePolicy returns the ValidatePolicy field if non-nil, zero value otherwise. - -### GetValidatePolicyOk - -`func (o *UpdatePasswordInsecureRequest) GetValidatePolicyOk() (*bool, bool)` - -GetValidatePolicyOk returns a tuple with the ValidatePolicy field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetValidatePolicy - -`func (o *UpdatePasswordInsecureRequest) SetValidatePolicy(v bool)` - -SetValidatePolicy sets ValidatePolicy field to given value. - -### HasValidatePolicy - -`func (o *UpdatePasswordInsecureRequest) HasValidatePolicy() bool` - -HasValidatePolicy 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/UpdatePasswordSecureRequest.md b/docs/UpdatePasswordSecureRequest.md deleted file mode 100644 index 92f6d47..0000000 --- a/docs/UpdatePasswordSecureRequest.md +++ /dev/null @@ -1,119 +0,0 @@ -# UpdatePasswordSecureRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Password** | **string** | Set to the password value using a SHA-256-encoded value. If you are including your own password_salt value in your request, prepend the salt value to the cleartext password value before SHA-256-encoding it. For example, if your salt value is hello and your cleartext password value is password, the value you need to SHA-256-encode is hellopassword. The resulting encoded value would be b1c788abac15390de987ad17b65ac73c9b475d428a51f245c645a442fddd078b. Note that the alpha characters in this has must all be lower case. | -**PasswordConfirmation** | **string** | This value must match the password value. | -**PasswordAlgorithm** | **string** | Set to salt+sha256. | -**PasswordSalt** | Pointer to **string** | Optional. If your password hash has been salted then you can provide the salt used in this param. This assumes that the salt was prepended to the password before doing the SHA256 hash. The API supports a salt value that is up to 40 characters long. | [optional] - -## Methods - -### NewUpdatePasswordSecureRequest - -`func NewUpdatePasswordSecureRequest(password string, passwordConfirmation string, passwordAlgorithm string, ) *UpdatePasswordSecureRequest` - -NewUpdatePasswordSecureRequest instantiates a new UpdatePasswordSecureRequest 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 - -### NewUpdatePasswordSecureRequestWithDefaults - -`func NewUpdatePasswordSecureRequestWithDefaults() *UpdatePasswordSecureRequest` - -NewUpdatePasswordSecureRequestWithDefaults instantiates a new UpdatePasswordSecureRequest 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 - -### GetPassword - -`func (o *UpdatePasswordSecureRequest) GetPassword() string` - -GetPassword returns the Password field if non-nil, zero value otherwise. - -### GetPasswordOk - -`func (o *UpdatePasswordSecureRequest) GetPasswordOk() (*string, bool)` - -GetPasswordOk returns a tuple with the Password field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPassword - -`func (o *UpdatePasswordSecureRequest) SetPassword(v string)` - -SetPassword sets Password field to given value. - - -### GetPasswordConfirmation - -`func (o *UpdatePasswordSecureRequest) GetPasswordConfirmation() string` - -GetPasswordConfirmation returns the PasswordConfirmation field if non-nil, zero value otherwise. - -### GetPasswordConfirmationOk - -`func (o *UpdatePasswordSecureRequest) GetPasswordConfirmationOk() (*string, bool)` - -GetPasswordConfirmationOk returns a tuple with the PasswordConfirmation field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPasswordConfirmation - -`func (o *UpdatePasswordSecureRequest) SetPasswordConfirmation(v string)` - -SetPasswordConfirmation sets PasswordConfirmation field to given value. - - -### GetPasswordAlgorithm - -`func (o *UpdatePasswordSecureRequest) GetPasswordAlgorithm() string` - -GetPasswordAlgorithm returns the PasswordAlgorithm field if non-nil, zero value otherwise. - -### GetPasswordAlgorithmOk - -`func (o *UpdatePasswordSecureRequest) GetPasswordAlgorithmOk() (*string, bool)` - -GetPasswordAlgorithmOk returns a tuple with the PasswordAlgorithm field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPasswordAlgorithm - -`func (o *UpdatePasswordSecureRequest) SetPasswordAlgorithm(v string)` - -SetPasswordAlgorithm sets PasswordAlgorithm field to given value. - - -### GetPasswordSalt - -`func (o *UpdatePasswordSecureRequest) GetPasswordSalt() string` - -GetPasswordSalt returns the PasswordSalt field if non-nil, zero value otherwise. - -### GetPasswordSaltOk - -`func (o *UpdatePasswordSecureRequest) GetPasswordSaltOk() (*string, bool)` - -GetPasswordSaltOk returns a tuple with the PasswordSalt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPasswordSalt - -`func (o *UpdatePasswordSecureRequest) SetPasswordSalt(v string)` - -SetPasswordSalt sets PasswordSalt field to given value. - -### HasPasswordSalt - -`func (o *UpdatePasswordSecureRequest) HasPasswordSalt() bool` - -HasPasswordSalt 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/UpdatePrivilege200Response.md b/docs/UpdatePrivilege200Response.md deleted file mode 100644 index 2c722e7..0000000 --- a/docs/UpdatePrivilege200Response.md +++ /dev/null @@ -1,56 +0,0 @@ -# UpdatePrivilege200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | Pointer to **string** | Privilege ID | [optional] - -## Methods - -### NewUpdatePrivilege200Response - -`func NewUpdatePrivilege200Response() *UpdatePrivilege200Response` - -NewUpdatePrivilege200Response instantiates a new UpdatePrivilege200Response 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 - -### NewUpdatePrivilege200ResponseWithDefaults - -`func NewUpdatePrivilege200ResponseWithDefaults() *UpdatePrivilege200Response` - -NewUpdatePrivilege200ResponseWithDefaults instantiates a new UpdatePrivilege200Response 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 - -### GetId - -`func (o *UpdatePrivilege200Response) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *UpdatePrivilege200Response) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *UpdatePrivilege200Response) SetId(v string)` - -SetId sets Id field to given value. - -### HasId - -`func (o *UpdatePrivilege200Response) HasId() bool` - -HasId 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/UpdateRiskRuleRequest.md b/docs/UpdateRiskRuleRequest.md deleted file mode 100644 index 5354e23..0000000 --- a/docs/UpdateRiskRuleRequest.md +++ /dev/null @@ -1,56 +0,0 @@ -# UpdateRiskRuleRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | Pointer to **string** | The ID of the Rule to Update | [optional] - -## Methods - -### NewUpdateRiskRuleRequest - -`func NewUpdateRiskRuleRequest() *UpdateRiskRuleRequest` - -NewUpdateRiskRuleRequest instantiates a new UpdateRiskRuleRequest 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 - -### NewUpdateRiskRuleRequestWithDefaults - -`func NewUpdateRiskRuleRequestWithDefaults() *UpdateRiskRuleRequest` - -NewUpdateRiskRuleRequestWithDefaults instantiates a new UpdateRiskRuleRequest 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 - -### GetId - -`func (o *UpdateRiskRuleRequest) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *UpdateRiskRuleRequest) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *UpdateRiskRuleRequest) SetId(v string)` - -SetId sets Id field to given value. - -### HasId - -`func (o *UpdateRiskRuleRequest) HasId() bool` - -HasId 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/UpdateRole200Response.md b/docs/UpdateRole200Response.md deleted file mode 100644 index d06efc9..0000000 --- a/docs/UpdateRole200Response.md +++ /dev/null @@ -1,56 +0,0 @@ -# UpdateRole200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | Pointer to **int32** | | [optional] - -## Methods - -### NewUpdateRole200Response - -`func NewUpdateRole200Response() *UpdateRole200Response` - -NewUpdateRole200Response instantiates a new UpdateRole200Response 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 - -### NewUpdateRole200ResponseWithDefaults - -`func NewUpdateRole200ResponseWithDefaults() *UpdateRole200Response` - -NewUpdateRole200ResponseWithDefaults instantiates a new UpdateRole200Response 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 - -### GetId - -`func (o *UpdateRole200Response) GetId() int32` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *UpdateRole200Response) GetIdOk() (*int32, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *UpdateRole200Response) SetId(v int32)` - -SetId sets Id field to given value. - -### HasId - -`func (o *UpdateRole200Response) HasId() bool` - -HasId 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/User.md b/docs/User.md deleted file mode 100644 index 5232424..0000000 --- a/docs/User.md +++ /dev/null @@ -1,966 +0,0 @@ -# User - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | Pointer to **int32** | | [optional] -**Username** | Pointer to **string** | A username for the user. | [optional] -**Email** | Pointer to **string** | A valid email for the user. | [optional] -**Firstname** | Pointer to **string** | The user's first name. | [optional] -**Lastname** | Pointer to **string** | The user's last name. | [optional] -**Title** | Pointer to **string** | The user's job title. | [optional] -**Department** | Pointer to **string** | The user's department. | [optional] -**Company** | Pointer to **string** | The user's company. | [optional] -**Comment** | Pointer to **string** | Free text related to the user. | [optional] -**GroupId** | Pointer to **int32** | The ID of the Group in OneLogin that the user is assigned to. | [optional] -**RoleIds** | Pointer to **[]int32** | A list of OneLogin Role IDs of the user | [optional] -**Phone** | Pointer to **string** | The E.164 format phone number for a user. | [optional] -**State** | Pointer to **int32** | | [optional] -**Status** | Pointer to **int32** | | [optional] -**DirectoryId** | Pointer to **int32** | The ID of the OneLogin Directory of the user. | [optional] -**TrustedIdpId** | Pointer to **int32** | The ID of the OneLogin Trusted IDP of the user. | [optional] -**ManagerAdId** | Pointer to **string** | The ID of the user's manager in Active Directory. | [optional] -**ManagerUserId** | Pointer to **string** | The OneLogin User ID for the user's manager. | [optional] -**Samaccountname** | Pointer to **string** | The user's Active Directory username. | [optional] -**MemberOf** | Pointer to **string** | The user's directory membership. | [optional] -**Userprincipalname** | Pointer to **string** | The principle name of the user. | [optional] -**DistinguishedName** | Pointer to **string** | The distinguished name of the user. | [optional] -**ExternalId** | Pointer to **string** | The ID of the user in an external directory. | [optional] -**ActivatedAt** | Pointer to **string** | | [optional] -**LastLogin** | Pointer to **string** | | [optional] -**InvitationSentAt** | Pointer to **string** | | [optional] -**UpdatedAt** | Pointer to **string** | | [optional] -**PreferredLocaleCode** | Pointer to **string** | | [optional] -**CreatedAt** | Pointer to **string** | | [optional] -**InvalidLoginAttempts** | Pointer to **int32** | | [optional] -**LockedUntil** | Pointer to **string** | | [optional] -**PasswordChangedAt** | Pointer to **string** | | [optional] -**Password** | Pointer to **string** | The password to set for a user. | [optional] -**PasswordConfirmation** | Pointer to **string** | Required if the password is being set. | [optional] -**PasswordAlgorithm** | Pointer to **string** | Use this when importing a password that's already hashed. Prepend the salt value to the cleartext password value before SHA-256-encoding it | [optional] -**Salt** | Pointer to **string** | The salt value used with the password_algorithm. | [optional] - -## Methods - -### NewUser - -`func NewUser() *User` - -NewUser instantiates a new User 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 - -### NewUserWithDefaults - -`func NewUserWithDefaults() *User` - -NewUserWithDefaults instantiates a new User 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 - -### GetId - -`func (o *User) GetId() int32` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *User) GetIdOk() (*int32, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *User) SetId(v int32)` - -SetId sets Id field to given value. - -### HasId - -`func (o *User) HasId() bool` - -HasId returns a boolean if a field has been set. - -### GetUsername - -`func (o *User) GetUsername() string` - -GetUsername returns the Username field if non-nil, zero value otherwise. - -### GetUsernameOk - -`func (o *User) 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 *User) SetUsername(v string)` - -SetUsername sets Username field to given value. - -### HasUsername - -`func (o *User) HasUsername() bool` - -HasUsername returns a boolean if a field has been set. - -### GetEmail - -`func (o *User) GetEmail() string` - -GetEmail returns the Email field if non-nil, zero value otherwise. - -### GetEmailOk - -`func (o *User) 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 *User) SetEmail(v string)` - -SetEmail sets Email field to given value. - -### HasEmail - -`func (o *User) HasEmail() bool` - -HasEmail returns a boolean if a field has been set. - -### GetFirstname - -`func (o *User) GetFirstname() string` - -GetFirstname returns the Firstname field if non-nil, zero value otherwise. - -### GetFirstnameOk - -`func (o *User) GetFirstnameOk() (*string, bool)` - -GetFirstnameOk returns a tuple with the Firstname field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetFirstname - -`func (o *User) SetFirstname(v string)` - -SetFirstname sets Firstname field to given value. - -### HasFirstname - -`func (o *User) HasFirstname() bool` - -HasFirstname returns a boolean if a field has been set. - -### GetLastname - -`func (o *User) GetLastname() string` - -GetLastname returns the Lastname field if non-nil, zero value otherwise. - -### GetLastnameOk - -`func (o *User) GetLastnameOk() (*string, bool)` - -GetLastnameOk returns a tuple with the Lastname field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLastname - -`func (o *User) SetLastname(v string)` - -SetLastname sets Lastname field to given value. - -### HasLastname - -`func (o *User) HasLastname() bool` - -HasLastname returns a boolean if a field has been set. - -### GetTitle - -`func (o *User) GetTitle() string` - -GetTitle returns the Title field if non-nil, zero value otherwise. - -### GetTitleOk - -`func (o *User) 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 *User) SetTitle(v string)` - -SetTitle sets Title field to given value. - -### HasTitle - -`func (o *User) HasTitle() bool` - -HasTitle returns a boolean if a field has been set. - -### GetDepartment - -`func (o *User) GetDepartment() string` - -GetDepartment returns the Department field if non-nil, zero value otherwise. - -### GetDepartmentOk - -`func (o *User) GetDepartmentOk() (*string, bool)` - -GetDepartmentOk returns a tuple with the Department field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDepartment - -`func (o *User) SetDepartment(v string)` - -SetDepartment sets Department field to given value. - -### HasDepartment - -`func (o *User) HasDepartment() bool` - -HasDepartment returns a boolean if a field has been set. - -### GetCompany - -`func (o *User) GetCompany() string` - -GetCompany returns the Company field if non-nil, zero value otherwise. - -### GetCompanyOk - -`func (o *User) GetCompanyOk() (*string, bool)` - -GetCompanyOk returns a tuple with the Company field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCompany - -`func (o *User) SetCompany(v string)` - -SetCompany sets Company field to given value. - -### HasCompany - -`func (o *User) HasCompany() bool` - -HasCompany returns a boolean if a field has been set. - -### GetComment - -`func (o *User) GetComment() string` - -GetComment returns the Comment field if non-nil, zero value otherwise. - -### GetCommentOk - -`func (o *User) GetCommentOk() (*string, bool)` - -GetCommentOk returns a tuple with the Comment field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetComment - -`func (o *User) SetComment(v string)` - -SetComment sets Comment field to given value. - -### HasComment - -`func (o *User) HasComment() bool` - -HasComment returns a boolean if a field has been set. - -### GetGroupId - -`func (o *User) GetGroupId() int32` - -GetGroupId returns the GroupId field if non-nil, zero value otherwise. - -### GetGroupIdOk - -`func (o *User) GetGroupIdOk() (*int32, bool)` - -GetGroupIdOk returns a tuple with the GroupId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetGroupId - -`func (o *User) SetGroupId(v int32)` - -SetGroupId sets GroupId field to given value. - -### HasGroupId - -`func (o *User) HasGroupId() bool` - -HasGroupId returns a boolean if a field has been set. - -### GetRoleIds - -`func (o *User) GetRoleIds() []int32` - -GetRoleIds returns the RoleIds field if non-nil, zero value otherwise. - -### GetRoleIdsOk - -`func (o *User) GetRoleIdsOk() (*[]int32, bool)` - -GetRoleIdsOk returns a tuple with the RoleIds field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRoleIds - -`func (o *User) SetRoleIds(v []int32)` - -SetRoleIds sets RoleIds field to given value. - -### HasRoleIds - -`func (o *User) HasRoleIds() bool` - -HasRoleIds returns a boolean if a field has been set. - -### GetPhone - -`func (o *User) GetPhone() string` - -GetPhone returns the Phone field if non-nil, zero value otherwise. - -### GetPhoneOk - -`func (o *User) GetPhoneOk() (*string, bool)` - -GetPhoneOk returns a tuple with the Phone field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPhone - -`func (o *User) SetPhone(v string)` - -SetPhone sets Phone field to given value. - -### HasPhone - -`func (o *User) HasPhone() bool` - -HasPhone returns a boolean if a field has been set. - -### GetState - -`func (o *User) GetState() int32` - -GetState returns the State field if non-nil, zero value otherwise. - -### GetStateOk - -`func (o *User) GetStateOk() (*int32, bool)` - -GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetState - -`func (o *User) SetState(v int32)` - -SetState sets State field to given value. - -### HasState - -`func (o *User) HasState() bool` - -HasState returns a boolean if a field has been set. - -### GetStatus - -`func (o *User) GetStatus() int32` - -GetStatus returns the Status field if non-nil, zero value otherwise. - -### GetStatusOk - -`func (o *User) GetStatusOk() (*int32, bool)` - -GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStatus - -`func (o *User) SetStatus(v int32)` - -SetStatus sets Status field to given value. - -### HasStatus - -`func (o *User) HasStatus() bool` - -HasStatus returns a boolean if a field has been set. - -### GetDirectoryId - -`func (o *User) GetDirectoryId() int32` - -GetDirectoryId returns the DirectoryId field if non-nil, zero value otherwise. - -### GetDirectoryIdOk - -`func (o *User) GetDirectoryIdOk() (*int32, bool)` - -GetDirectoryIdOk returns a tuple with the DirectoryId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDirectoryId - -`func (o *User) SetDirectoryId(v int32)` - -SetDirectoryId sets DirectoryId field to given value. - -### HasDirectoryId - -`func (o *User) HasDirectoryId() bool` - -HasDirectoryId returns a boolean if a field has been set. - -### GetTrustedIdpId - -`func (o *User) GetTrustedIdpId() int32` - -GetTrustedIdpId returns the TrustedIdpId field if non-nil, zero value otherwise. - -### GetTrustedIdpIdOk - -`func (o *User) GetTrustedIdpIdOk() (*int32, bool)` - -GetTrustedIdpIdOk returns a tuple with the TrustedIdpId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTrustedIdpId - -`func (o *User) SetTrustedIdpId(v int32)` - -SetTrustedIdpId sets TrustedIdpId field to given value. - -### HasTrustedIdpId - -`func (o *User) HasTrustedIdpId() bool` - -HasTrustedIdpId returns a boolean if a field has been set. - -### GetManagerAdId - -`func (o *User) GetManagerAdId() string` - -GetManagerAdId returns the ManagerAdId field if non-nil, zero value otherwise. - -### GetManagerAdIdOk - -`func (o *User) GetManagerAdIdOk() (*string, bool)` - -GetManagerAdIdOk returns a tuple with the ManagerAdId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetManagerAdId - -`func (o *User) SetManagerAdId(v string)` - -SetManagerAdId sets ManagerAdId field to given value. - -### HasManagerAdId - -`func (o *User) HasManagerAdId() bool` - -HasManagerAdId returns a boolean if a field has been set. - -### GetManagerUserId - -`func (o *User) GetManagerUserId() string` - -GetManagerUserId returns the ManagerUserId field if non-nil, zero value otherwise. - -### GetManagerUserIdOk - -`func (o *User) GetManagerUserIdOk() (*string, bool)` - -GetManagerUserIdOk returns a tuple with the ManagerUserId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetManagerUserId - -`func (o *User) SetManagerUserId(v string)` - -SetManagerUserId sets ManagerUserId field to given value. - -### HasManagerUserId - -`func (o *User) HasManagerUserId() bool` - -HasManagerUserId returns a boolean if a field has been set. - -### GetSamaccountname - -`func (o *User) GetSamaccountname() string` - -GetSamaccountname returns the Samaccountname field if non-nil, zero value otherwise. - -### GetSamaccountnameOk - -`func (o *User) GetSamaccountnameOk() (*string, bool)` - -GetSamaccountnameOk returns a tuple with the Samaccountname field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSamaccountname - -`func (o *User) SetSamaccountname(v string)` - -SetSamaccountname sets Samaccountname field to given value. - -### HasSamaccountname - -`func (o *User) HasSamaccountname() bool` - -HasSamaccountname returns a boolean if a field has been set. - -### GetMemberOf - -`func (o *User) GetMemberOf() string` - -GetMemberOf returns the MemberOf field if non-nil, zero value otherwise. - -### GetMemberOfOk - -`func (o *User) GetMemberOfOk() (*string, bool)` - -GetMemberOfOk returns a tuple with the MemberOf field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMemberOf - -`func (o *User) SetMemberOf(v string)` - -SetMemberOf sets MemberOf field to given value. - -### HasMemberOf - -`func (o *User) HasMemberOf() bool` - -HasMemberOf returns a boolean if a field has been set. - -### GetUserprincipalname - -`func (o *User) GetUserprincipalname() string` - -GetUserprincipalname returns the Userprincipalname field if non-nil, zero value otherwise. - -### GetUserprincipalnameOk - -`func (o *User) GetUserprincipalnameOk() (*string, bool)` - -GetUserprincipalnameOk returns a tuple with the Userprincipalname field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUserprincipalname - -`func (o *User) SetUserprincipalname(v string)` - -SetUserprincipalname sets Userprincipalname field to given value. - -### HasUserprincipalname - -`func (o *User) HasUserprincipalname() bool` - -HasUserprincipalname returns a boolean if a field has been set. - -### GetDistinguishedName - -`func (o *User) GetDistinguishedName() string` - -GetDistinguishedName returns the DistinguishedName field if non-nil, zero value otherwise. - -### GetDistinguishedNameOk - -`func (o *User) GetDistinguishedNameOk() (*string, bool)` - -GetDistinguishedNameOk returns a tuple with the DistinguishedName field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDistinguishedName - -`func (o *User) SetDistinguishedName(v string)` - -SetDistinguishedName sets DistinguishedName field to given value. - -### HasDistinguishedName - -`func (o *User) HasDistinguishedName() bool` - -HasDistinguishedName returns a boolean if a field has been set. - -### GetExternalId - -`func (o *User) GetExternalId() string` - -GetExternalId returns the ExternalId field if non-nil, zero value otherwise. - -### GetExternalIdOk - -`func (o *User) GetExternalIdOk() (*string, bool)` - -GetExternalIdOk returns a tuple with the ExternalId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetExternalId - -`func (o *User) SetExternalId(v string)` - -SetExternalId sets ExternalId field to given value. - -### HasExternalId - -`func (o *User) HasExternalId() bool` - -HasExternalId returns a boolean if a field has been set. - -### GetActivatedAt - -`func (o *User) GetActivatedAt() string` - -GetActivatedAt returns the ActivatedAt field if non-nil, zero value otherwise. - -### GetActivatedAtOk - -`func (o *User) GetActivatedAtOk() (*string, bool)` - -GetActivatedAtOk returns a tuple with the ActivatedAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetActivatedAt - -`func (o *User) SetActivatedAt(v string)` - -SetActivatedAt sets ActivatedAt field to given value. - -### HasActivatedAt - -`func (o *User) HasActivatedAt() bool` - -HasActivatedAt returns a boolean if a field has been set. - -### GetLastLogin - -`func (o *User) GetLastLogin() string` - -GetLastLogin returns the LastLogin field if non-nil, zero value otherwise. - -### GetLastLoginOk - -`func (o *User) GetLastLoginOk() (*string, 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 *User) SetLastLogin(v string)` - -SetLastLogin sets LastLogin field to given value. - -### HasLastLogin - -`func (o *User) HasLastLogin() bool` - -HasLastLogin returns a boolean if a field has been set. - -### GetInvitationSentAt - -`func (o *User) GetInvitationSentAt() string` - -GetInvitationSentAt returns the InvitationSentAt field if non-nil, zero value otherwise. - -### GetInvitationSentAtOk - -`func (o *User) GetInvitationSentAtOk() (*string, bool)` - -GetInvitationSentAtOk returns a tuple with the InvitationSentAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetInvitationSentAt - -`func (o *User) SetInvitationSentAt(v string)` - -SetInvitationSentAt sets InvitationSentAt field to given value. - -### HasInvitationSentAt - -`func (o *User) HasInvitationSentAt() bool` - -HasInvitationSentAt returns a boolean if a field has been set. - -### GetUpdatedAt - -`func (o *User) GetUpdatedAt() string` - -GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. - -### GetUpdatedAtOk - -`func (o *User) GetUpdatedAtOk() (*string, bool)` - -GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUpdatedAt - -`func (o *User) SetUpdatedAt(v string)` - -SetUpdatedAt sets UpdatedAt field to given value. - -### HasUpdatedAt - -`func (o *User) HasUpdatedAt() bool` - -HasUpdatedAt returns a boolean if a field has been set. - -### GetPreferredLocaleCode - -`func (o *User) GetPreferredLocaleCode() string` - -GetPreferredLocaleCode returns the PreferredLocaleCode field if non-nil, zero value otherwise. - -### GetPreferredLocaleCodeOk - -`func (o *User) GetPreferredLocaleCodeOk() (*string, bool)` - -GetPreferredLocaleCodeOk returns a tuple with the PreferredLocaleCode field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPreferredLocaleCode - -`func (o *User) SetPreferredLocaleCode(v string)` - -SetPreferredLocaleCode sets PreferredLocaleCode field to given value. - -### HasPreferredLocaleCode - -`func (o *User) HasPreferredLocaleCode() bool` - -HasPreferredLocaleCode returns a boolean if a field has been set. - -### GetCreatedAt - -`func (o *User) GetCreatedAt() string` - -GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. - -### GetCreatedAtOk - -`func (o *User) GetCreatedAtOk() (*string, bool)` - -GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCreatedAt - -`func (o *User) SetCreatedAt(v string)` - -SetCreatedAt sets CreatedAt field to given value. - -### HasCreatedAt - -`func (o *User) HasCreatedAt() bool` - -HasCreatedAt returns a boolean if a field has been set. - -### GetInvalidLoginAttempts - -`func (o *User) GetInvalidLoginAttempts() int32` - -GetInvalidLoginAttempts returns the InvalidLoginAttempts field if non-nil, zero value otherwise. - -### GetInvalidLoginAttemptsOk - -`func (o *User) GetInvalidLoginAttemptsOk() (*int32, bool)` - -GetInvalidLoginAttemptsOk returns a tuple with the InvalidLoginAttempts field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetInvalidLoginAttempts - -`func (o *User) SetInvalidLoginAttempts(v int32)` - -SetInvalidLoginAttempts sets InvalidLoginAttempts field to given value. - -### HasInvalidLoginAttempts - -`func (o *User) HasInvalidLoginAttempts() bool` - -HasInvalidLoginAttempts returns a boolean if a field has been set. - -### GetLockedUntil - -`func (o *User) GetLockedUntil() string` - -GetLockedUntil returns the LockedUntil field if non-nil, zero value otherwise. - -### GetLockedUntilOk - -`func (o *User) GetLockedUntilOk() (*string, bool)` - -GetLockedUntilOk returns a tuple with the LockedUntil field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLockedUntil - -`func (o *User) SetLockedUntil(v string)` - -SetLockedUntil sets LockedUntil field to given value. - -### HasLockedUntil - -`func (o *User) HasLockedUntil() bool` - -HasLockedUntil returns a boolean if a field has been set. - -### GetPasswordChangedAt - -`func (o *User) GetPasswordChangedAt() string` - -GetPasswordChangedAt returns the PasswordChangedAt field if non-nil, zero value otherwise. - -### GetPasswordChangedAtOk - -`func (o *User) GetPasswordChangedAtOk() (*string, bool)` - -GetPasswordChangedAtOk returns a tuple with the PasswordChangedAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPasswordChangedAt - -`func (o *User) SetPasswordChangedAt(v string)` - -SetPasswordChangedAt sets PasswordChangedAt field to given value. - -### HasPasswordChangedAt - -`func (o *User) HasPasswordChangedAt() bool` - -HasPasswordChangedAt returns a boolean if a field has been set. - -### GetPassword - -`func (o *User) GetPassword() string` - -GetPassword returns the Password field if non-nil, zero value otherwise. - -### GetPasswordOk - -`func (o *User) GetPasswordOk() (*string, bool)` - -GetPasswordOk returns a tuple with the Password field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPassword - -`func (o *User) SetPassword(v string)` - -SetPassword sets Password field to given value. - -### HasPassword - -`func (o *User) HasPassword() bool` - -HasPassword returns a boolean if a field has been set. - -### GetPasswordConfirmation - -`func (o *User) GetPasswordConfirmation() string` - -GetPasswordConfirmation returns the PasswordConfirmation field if non-nil, zero value otherwise. - -### GetPasswordConfirmationOk - -`func (o *User) GetPasswordConfirmationOk() (*string, bool)` - -GetPasswordConfirmationOk returns a tuple with the PasswordConfirmation field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPasswordConfirmation - -`func (o *User) SetPasswordConfirmation(v string)` - -SetPasswordConfirmation sets PasswordConfirmation field to given value. - -### HasPasswordConfirmation - -`func (o *User) HasPasswordConfirmation() bool` - -HasPasswordConfirmation returns a boolean if a field has been set. - -### GetPasswordAlgorithm - -`func (o *User) GetPasswordAlgorithm() string` - -GetPasswordAlgorithm returns the PasswordAlgorithm field if non-nil, zero value otherwise. - -### GetPasswordAlgorithmOk - -`func (o *User) GetPasswordAlgorithmOk() (*string, bool)` - -GetPasswordAlgorithmOk returns a tuple with the PasswordAlgorithm field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPasswordAlgorithm - -`func (o *User) SetPasswordAlgorithm(v string)` - -SetPasswordAlgorithm sets PasswordAlgorithm field to given value. - -### HasPasswordAlgorithm - -`func (o *User) HasPasswordAlgorithm() bool` - -HasPasswordAlgorithm returns a boolean if a field has been set. - -### GetSalt - -`func (o *User) GetSalt() string` - -GetSalt returns the Salt field if non-nil, zero value otherwise. - -### GetSaltOk - -`func (o *User) GetSaltOk() (*string, bool)` - -GetSaltOk returns a tuple with the Salt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSalt - -`func (o *User) SetSalt(v string)` - -SetSalt sets Salt field to given value. - -### HasSalt - -`func (o *User) HasSalt() bool` - -HasSalt 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/UserMappingsApi.md b/docs/UserMappingsApi.md deleted file mode 100644 index d69c138..0000000 --- a/docs/UserMappingsApi.md +++ /dev/null @@ -1,771 +0,0 @@ -# \UserMappingsApi - -All URIs are relative to *https://your-api-subdomain.onelogin.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateMapping**](UserMappingsApi.md#CreateMapping) | **Post** /api/2/mappings | Create Mapping -[**DeleteMapping**](UserMappingsApi.md#DeleteMapping) | **Delete** /api/2/mappings/{mapping_id} | Delete Mapping -[**GetMapping**](UserMappingsApi.md#GetMapping) | **Get** /api/2/mappings/{mapping_id} | Get Mapping -[**ListMappingActionValues**](UserMappingsApi.md#ListMappingActionValues) | **Get** /api/2/mappings/actions/{mapping_action_value}/values | List Actions Values -[**ListMappingConditions**](UserMappingsApi.md#ListMappingConditions) | **Get** /api/2/mappings/conditions | List Conditions -[**ListMappingConditionsOperators**](UserMappingsApi.md#ListMappingConditionsOperators) | **Get** /api/2/mappings/conditions/{mapping_condition_value}/operators | List Conditions Operators -[**ListMappingContionValues**](UserMappingsApi.md#ListMappingContionValues) | **Get** /api/2/mappings/conditions/{mapping_condition_value}/values | List Conditions Values -[**ListMappings**](UserMappingsApi.md#ListMappings) | **Get** /api/2/mappings | List Mappings -[**ListMappingsActions**](UserMappingsApi.md#ListMappingsActions) | **Get** /api/2/mappings/actions | List Actions -[**SortMappings**](UserMappingsApi.md#SortMappings) | **Put** /api/2/mappings/sort | Bulk Sort -[**UpdateMapping**](UserMappingsApi.md#UpdateMapping) | **Put** /api/2/mappings/{mapping_id} | Update Mapping - - - -## CreateMapping - -> []Mapping CreateMapping(ctx).ContentType(contentType).Mapping(mapping).Execute() - -Create Mapping - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - contentType := "application/json" // string | (optional) (default to "application/json") - mapping := *openapiclient.NewMapping("Name_example", false, "Match_example", int32(123), []openapiclient.Condition{*openapiclient.NewCondition()}, []openapiclient.ActionObj{*openapiclient.NewActionObj()}) // Mapping | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.UserMappingsApi.CreateMapping(context.Background()).ContentType(contentType).Mapping(mapping).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UserMappingsApi.CreateMapping``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `CreateMapping`: []Mapping - fmt.Fprintf(os.Stdout, "Response from `UserMappingsApi.CreateMapping`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiCreateMappingRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **contentType** | **string** | | [default to "application/json"] - **mapping** | [**Mapping**](Mapping.md) | | - -### Return type - -[**[]Mapping**](Mapping.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## DeleteMapping - -> DeleteMapping(ctx, mappingId).Execute() - -Delete Mapping - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - mappingId := int32(56) // int32 | The id of the user mapping to locate. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.UserMappingsApi.DeleteMapping(context.Background(), mappingId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UserMappingsApi.DeleteMapping``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**mappingId** | **int32** | The id of the user mapping to locate. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiDeleteMappingRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - - (empty response body) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetMapping - -> Mapping GetMapping(ctx, mappingId).Execute() - -Get Mapping - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - mappingId := int32(56) // int32 | The id of the user mapping to locate. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.UserMappingsApi.GetMapping(context.Background(), mappingId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UserMappingsApi.GetMapping``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetMapping`: Mapping - fmt.Fprintf(os.Stdout, "Response from `UserMappingsApi.GetMapping`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**mappingId** | **int32** | The id of the user mapping to locate. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetMappingRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**Mapping**](Mapping.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## ListMappingActionValues - -> []ListMappingActionValues200ResponseInner ListMappingActionValues(ctx, mappingActionValue).Execute() - -List Actions Values - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - mappingActionValue := "mappingActionValue_example" // string | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.UserMappingsApi.ListMappingActionValues(context.Background(), mappingActionValue).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UserMappingsApi.ListMappingActionValues``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ListMappingActionValues`: []ListMappingActionValues200ResponseInner - fmt.Fprintf(os.Stdout, "Response from `UserMappingsApi.ListMappingActionValues`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**mappingActionValue** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiListMappingActionValuesRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**[]ListMappingActionValues200ResponseInner**](ListMappingActionValues200ResponseInner.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## ListMappingConditions - -> ListMappingConditions200Response ListMappingConditions(ctx).Execute() - -List Conditions - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.UserMappingsApi.ListMappingConditions(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UserMappingsApi.ListMappingConditions``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ListMappingConditions`: ListMappingConditions200Response - fmt.Fprintf(os.Stdout, "Response from `UserMappingsApi.ListMappingConditions`: %v\n", resp) -} -``` - -### Path Parameters - -This endpoint does not need any parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a apiListMappingConditionsRequest struct via the builder pattern - - -### Return type - -[**ListMappingConditions200Response**](ListMappingConditions200Response.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## ListMappingConditionsOperators - -> []ListMappingConditionsOperators200ResponseInner ListMappingConditionsOperators(ctx, mappingConditionValue).Execute() - -List Conditions Operators - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - mappingConditionValue := "mappingConditionValue_example" // string | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.UserMappingsApi.ListMappingConditionsOperators(context.Background(), mappingConditionValue).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UserMappingsApi.ListMappingConditionsOperators``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ListMappingConditionsOperators`: []ListMappingConditionsOperators200ResponseInner - fmt.Fprintf(os.Stdout, "Response from `UserMappingsApi.ListMappingConditionsOperators`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**mappingConditionValue** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiListMappingConditionsOperatorsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**[]ListMappingConditionsOperators200ResponseInner**](ListMappingConditionsOperators200ResponseInner.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## ListMappingContionValues - -> []ListMappingContionValues200ResponseInner ListMappingContionValues(ctx, mappingConditionValue).Execute() - -List Conditions Values - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - mappingConditionValue := "mappingConditionValue_example" // string | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.UserMappingsApi.ListMappingContionValues(context.Background(), mappingConditionValue).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UserMappingsApi.ListMappingContionValues``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ListMappingContionValues`: []ListMappingContionValues200ResponseInner - fmt.Fprintf(os.Stdout, "Response from `UserMappingsApi.ListMappingContionValues`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**mappingConditionValue** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiListMappingContionValuesRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**[]ListMappingContionValues200ResponseInner**](ListMappingContionValues200ResponseInner.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## ListMappings - -> []Mapping ListMappings(ctx).Enabled(enabled).HasCondition(hasCondition).HasConditionType(hasConditionType).HasAction(hasAction).HasActionType(hasActionType).Execute() - -List Mappings - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - enabled := true // bool | Defaults to true. When set to `false` will return all disabled mappings. (optional) (default to true) - hasCondition := "has_condition=has_role:123456" // string | Filters Rules based on their Conditions. Values formatted as :, where name is the Condition to look for, and value is the value to find. Multiple filters can be declared by using a comma delimited list. Wildcards are supported in both the name and value fields. For example: Single filter. has_condition=has_role:123456 Multiple filters. has_condition=has_role:123456,status:1 Wildcard for conditions. has_condition=*:123456 Wildcard for condition values. has_condition=has_role:* (optional) - hasConditionType := "hasConditionType_example" // string | Filters Rules based on their Conditions. Values formatted as :, where name is the Condition to look for, and value is the value to find. Multiple filters can be declared by using a comma delimited list. Wildcards are supported in both the name and value fields. For example: Single filter. has_condition=has_role:123456 Multiple filters. has_condition=has_role:123456,status:1 Wildcard for conditions. has_condition=*:123456 Wildcard for condition values. has_condition=has_role:* (optional) - hasAction := "has_action=set_groups:123456,set_usertype:*" // string | Filters Rules based on their Actions. Values formatted as :, where name is the Action to look for, and value is the value to find. Multiple filters can be declared by using a comma delimited list. Wildcards are supported in both the name and value fields. For example: Single filter. has_action=set_licenses:123456 Multiple filters. has_action=set_groups:123456,set_usertype:* Wildcard for actions. has_action=*:123456 Wildcard for action values. has_action=set_userprincipalname:* (optional) - hasActionType := "hasActionType_example" // string | Filters Rules based on their action types. Allowed values are: builtin - actions that involve standard attributes custom - actions that involve custom attributes none - no actions are defined For example: Find Rules with no actions has_action_type=none (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.UserMappingsApi.ListMappings(context.Background()).Enabled(enabled).HasCondition(hasCondition).HasConditionType(hasConditionType).HasAction(hasAction).HasActionType(hasActionType).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UserMappingsApi.ListMappings``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ListMappings`: []Mapping - fmt.Fprintf(os.Stdout, "Response from `UserMappingsApi.ListMappings`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiListMappingsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **enabled** | **bool** | Defaults to true. When set to `false` will return all disabled mappings. | [default to true] - **hasCondition** | **string** | Filters Rules based on their Conditions. Values formatted as :, where name is the Condition to look for, and value is the value to find. Multiple filters can be declared by using a comma delimited list. Wildcards are supported in both the name and value fields. For example: Single filter. has_condition=has_role:123456 Multiple filters. has_condition=has_role:123456,status:1 Wildcard for conditions. has_condition=*:123456 Wildcard for condition values. has_condition=has_role:* | - **hasConditionType** | **string** | Filters Rules based on their Conditions. Values formatted as :, where name is the Condition to look for, and value is the value to find. Multiple filters can be declared by using a comma delimited list. Wildcards are supported in both the name and value fields. For example: Single filter. has_condition=has_role:123456 Multiple filters. has_condition=has_role:123456,status:1 Wildcard for conditions. has_condition=*:123456 Wildcard for condition values. has_condition=has_role:* | - **hasAction** | **string** | Filters Rules based on their Actions. Values formatted as :, where name is the Action to look for, and value is the value to find. Multiple filters can be declared by using a comma delimited list. Wildcards are supported in both the name and value fields. For example: Single filter. has_action=set_licenses:123456 Multiple filters. has_action=set_groups:123456,set_usertype:* Wildcard for actions. has_action=*:123456 Wildcard for action values. has_action=set_userprincipalname:* | - **hasActionType** | **string** | Filters Rules based on their action types. Allowed values are: builtin - actions that involve standard attributes custom - actions that involve custom attributes none - no actions are defined For example: Find Rules with no actions has_action_type=none | - -### Return type - -[**[]Mapping**](Mapping.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## ListMappingsActions - -> []ListMappingsActions200ResponseInner ListMappingsActions(ctx).Execute() - -List Actions - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.UserMappingsApi.ListMappingsActions(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UserMappingsApi.ListMappingsActions``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ListMappingsActions`: []ListMappingsActions200ResponseInner - fmt.Fprintf(os.Stdout, "Response from `UserMappingsApi.ListMappingsActions`: %v\n", resp) -} -``` - -### Path Parameters - -This endpoint does not need any parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a apiListMappingsActionsRequest struct via the builder pattern - - -### Return type - -[**[]ListMappingsActions200ResponseInner**](ListMappingsActions200ResponseInner.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## SortMappings - -> []int32 SortMappings(ctx).RequestBody(requestBody).Execute() - -Bulk Sort - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - requestBody := []int32{int32(123)} // []int32 | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.UserMappingsApi.SortMappings(context.Background()).RequestBody(requestBody).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UserMappingsApi.SortMappings``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `SortMappings`: []int32 - fmt.Fprintf(os.Stdout, "Response from `UserMappingsApi.SortMappings`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiSortMappingsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **requestBody** | **[]int32** | | - -### Return type - -**[]int32** - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## UpdateMapping - -> int32 UpdateMapping(ctx, mappingId).ContentType(contentType).Body(body).Execute() - -Update Mapping - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - mappingId := int32(56) // int32 | The id of the user mapping to locate. - contentType := "application/json" // string | (optional) (default to "application/json") - body := map[string]interface{}{ ... } // map[string]interface{} | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.UserMappingsApi.UpdateMapping(context.Background(), mappingId).ContentType(contentType).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UserMappingsApi.UpdateMapping``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `UpdateMapping`: int32 - fmt.Fprintf(os.Stdout, "Response from `UserMappingsApi.UpdateMapping`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**mappingId** | **int32** | The id of the user mapping to locate. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiUpdateMappingRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **contentType** | **string** | | [default to "application/json"] - **body** | **map[string]interface{}** | | - -### Return type - -**int32** - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/docs/UsersV1Api.md b/docs/UsersV1Api.md deleted file mode 100644 index 301c39e..0000000 --- a/docs/UsersV1Api.md +++ /dev/null @@ -1,1116 +0,0 @@ -# \UsersV1Api - -All URIs are relative to *https://your-api-subdomain.onelogin.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**AddRolesToUser**](UsersV1Api.md#AddRolesToUser) | **Put** /api/1/users/{user_id}/add_roles | Add Roles for a User -[**CreateUser**](UsersV1Api.md#CreateUser) | **Post** /api/1/users | Create a User -[**DeleteUser**](UsersV1Api.md#DeleteUser) | **Delete** /api/1/users/{user_id} | Delete a User -[**GetCustomAttributes**](UsersV1Api.md#GetCustomAttributes) | **Get** /api/1/users/custom_attributes | Get Custom Attributes -[**GetUserApps**](UsersV1Api.md#GetUserApps) | **Get** /api/1/users/{user_id}/apps | Get Apps for a User -[**GetUserById**](UsersV1Api.md#GetUserById) | **Get** /api/1/users/{user_id} | Get User by ID -[**GetUserRoles**](UsersV1Api.md#GetUserRoles) | **Get** /api/1/users/{user_id}/roles | Get Roles for a User -[**ListUsers**](UsersV1Api.md#ListUsers) | **Get** /api/1/users | List Users -[**LockAccountUser**](UsersV1Api.md#LockAccountUser) | **Put** /api/1/users/{user_id}/lock_user | Lock User Account -[**LogOutUser**](UsersV1Api.md#LogOutUser) | **Put** /api/1/users/{user_id}/logout | Log User Out -[**RemoveUserRole**](UsersV1Api.md#RemoveUserRole) | **Put** /api/1/users/{user_id}/remove_roles | Remove Roles for a User -[**SetUserState**](UsersV1Api.md#SetUserState) | **Put** /api/1/users/{user_id}/set_state | Set User State -[**UpdatePasswordInsecure**](UsersV1Api.md#UpdatePasswordInsecure) | **Put** /api/1/users/set_password_clear_text/{user_id} | Set Password Using ID in Cleartext -[**UpdatePasswordSecure**](UsersV1Api.md#UpdatePasswordSecure) | **Put** /api/1/users/set_password_using_salt/{user_id} | Set Password Using ID and SHA-256 and Salt -[**UpdateUser**](UsersV1Api.md#UpdateUser) | **Put** /api/1/users/{user_id} | Update a User - - - -## AddRolesToUser - -> Error AddRolesToUser(ctx, userId).AddRolesToUserRequest(addRolesToUserRequest).Execute() - -Add Roles for a User - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - userId := int32(56) // int32 | Set to the id of the user that you want to return. - addRolesToUserRequest := *openapiclient.NewAddRolesToUserRequest([]int32{int32(123)}) // AddRolesToUserRequest | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.UsersV1Api.AddRolesToUser(context.Background(), userId).AddRolesToUserRequest(addRolesToUserRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UsersV1Api.AddRolesToUser``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AddRolesToUser`: Error - fmt.Fprintf(os.Stdout, "Response from `UsersV1Api.AddRolesToUser`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**userId** | **int32** | Set to the id of the user that you want to return. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiAddRolesToUserRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **addRolesToUserRequest** | [**AddRolesToUserRequest**](AddRolesToUserRequest.md) | | - -### Return type - -[**Error**](Error.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## CreateUser - -> User CreateUser(ctx).Mappings(mappings).ValidatePolicy(validatePolicy).User(user).Execute() - -Create a User - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - mappings := "mappings_example" // string | Controls how mappings will be applied to the user on creation. Defaults to async. (optional) - validatePolicy := true // bool | Will passwords validate against the User Policy? Defaults to true. (optional) - user := *openapiclient.NewUser() // User | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.UsersV1Api.CreateUser(context.Background()).Mappings(mappings).ValidatePolicy(validatePolicy).User(user).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UsersV1Api.CreateUser``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `CreateUser`: User - fmt.Fprintf(os.Stdout, "Response from `UsersV1Api.CreateUser`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiCreateUserRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **mappings** | **string** | Controls how mappings will be applied to the user on creation. Defaults to async. | - **validatePolicy** | **bool** | Will passwords validate against the User Policy? Defaults to true. | - **user** | [**User**](User.md) | | - -### Return type - -[**User**](User.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## DeleteUser - -> DeleteUser(ctx, userId).Execute() - -Delete a User - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - userId := int32(56) // int32 | Set to the id of the user that you want to return. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.UsersV1Api.DeleteUser(context.Background(), userId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UsersV1Api.DeleteUser``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**userId** | **int32** | Set to the id of the user that you want to return. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiDeleteUserRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - - (empty response body) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetCustomAttributes - -> GetCustomAttributes200Response GetCustomAttributes(ctx).Execute() - -Get Custom Attributes - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.UsersV1Api.GetCustomAttributes(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UsersV1Api.GetCustomAttributes``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetCustomAttributes`: GetCustomAttributes200Response - fmt.Fprintf(os.Stdout, "Response from `UsersV1Api.GetCustomAttributes`: %v\n", resp) -} -``` - -### Path Parameters - -This endpoint does not need any parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetCustomAttributesRequest struct via the builder pattern - - -### Return type - -[**GetCustomAttributes200Response**](GetCustomAttributes200Response.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetUserApps - -> []GetUserApps200ResponseInner GetUserApps(ctx, userId).IgnoreVisibility(ignoreVisibility).Execute() - -Get Apps for a User - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - userId := int32(56) // int32 | Set to the id of the user that you want to return. - ignoreVisibility := true // bool | Defaults to `false`. When `true` will show all apps that are assigned to a user regardless of their portal visibility setting. (optional) (default to false) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.UsersV1Api.GetUserApps(context.Background(), userId).IgnoreVisibility(ignoreVisibility).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UsersV1Api.GetUserApps``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetUserApps`: []GetUserApps200ResponseInner - fmt.Fprintf(os.Stdout, "Response from `UsersV1Api.GetUserApps`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**userId** | **int32** | Set to the id of the user that you want to return. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetUserAppsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **ignoreVisibility** | **bool** | Defaults to `false`. When `true` will show all apps that are assigned to a user regardless of their portal visibility setting. | [default to false] - -### Return type - -[**[]GetUserApps200ResponseInner**](GetUserApps200ResponseInner.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetUserById - -> User GetUserById(ctx, userId).Execute() - -Get User by ID - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - userId := int32(56) // int32 | Set to the id of the user that you want to return. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.UsersV1Api.GetUserById(context.Background(), userId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UsersV1Api.GetUserById``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetUserById`: User - fmt.Fprintf(os.Stdout, "Response from `UsersV1Api.GetUserById`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**userId** | **int32** | Set to the id of the user that you want to return. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetUserByIdRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**User**](User.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetUserRoles - -> GetUserRoles200Response GetUserRoles(ctx, userId).Execute() - -Get Roles for a User - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - userId := int32(56) // int32 | Set to the id of the user that you want to return. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.UsersV1Api.GetUserRoles(context.Background(), userId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UsersV1Api.GetUserRoles``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetUserRoles`: GetUserRoles200Response - fmt.Fprintf(os.Stdout, "Response from `UsersV1Api.GetUserRoles`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**userId** | **int32** | Set to the id of the user that you want to return. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetUserRolesRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**GetUserRoles200Response**](GetUserRoles200Response.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## ListUsers - -> []User ListUsers(ctx).Limit(limit).Page(page).Cursor(cursor).CreatedSince(createdSince).CreatedUntil(createdUntil).UpdatedSince(updatedSince).UpdatedUntil(updatedUntil).LastLoginSince(lastLoginSince).LastLoginUntil(lastLoginUntil).Firstname(firstname).Lastname(lastname).Email(email).Username(username).Samaccountname(samaccountname).DirectoryId(directoryId).ExternalId(externalId).UserIds(userIds).CustomAttributesAttributeName(customAttributesAttributeName).Fields(fields).Execute() - -List Users - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - limit := int32(56) // int32 | How many items to return at one time (max 100) (optional) - page := int32(56) // int32 | The page number of results to return. (optional) - cursor := "cursor_example" // string | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. (optional) - createdSince := "createdSince_example" // string | An ISO8601 timestamp value that returns all users created after a given date & time. (optional) - createdUntil := "createdUntil_example" // string | An ISO8601 timestamp value that returns all users created before a given date & time. (optional) - updatedSince := "updatedSince_example" // string | An ISO8601 timestamp value that returns all users updated after a given date & time. (optional) - updatedUntil := "updatedUntil_example" // string | An ISO8601 timestamp value that returns all users updated before a given date & time. (optional) - lastLoginSince := "lastLoginSince_example" // string | An ISO8601 timestamp value that returns all users that logged in after a given date & time. (optional) - lastLoginUntil := "lastLoginUntil_example" // string | An ISO8601 timestamp value that returns all users that logged in before a given date & time. (optional) - firstname := "firstname_example" // string | The first name of the user (optional) - lastname := "lastname_example" // string | The last name of the user (optional) - email := "email_example" // string | The email address of the user (optional) - username := "username_example" // string | The username for the user (optional) - samaccountname := "samaccountname_example" // string | The AD login name for the user (optional) - directoryId := int32(56) // int32 | (optional) - externalId := "externalId_example" // string | An external identifier that has been set on the user (optional) - userIds := "userIds_example" // string | A comma separated list of OneLogin User IDs (optional) - customAttributesAttributeName := "customAttributesAttributeName_example" // string | The short name of a custom attribute. Note that the attribute name is prefixed with custom_attributes. (optional) - fields := "fields_example" // string | Optional. Comma delimited list of fields to return. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.UsersV1Api.ListUsers(context.Background()).Limit(limit).Page(page).Cursor(cursor).CreatedSince(createdSince).CreatedUntil(createdUntil).UpdatedSince(updatedSince).UpdatedUntil(updatedUntil).LastLoginSince(lastLoginSince).LastLoginUntil(lastLoginUntil).Firstname(firstname).Lastname(lastname).Email(email).Username(username).Samaccountname(samaccountname).DirectoryId(directoryId).ExternalId(externalId).UserIds(userIds).CustomAttributesAttributeName(customAttributesAttributeName).Fields(fields).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UsersV1Api.ListUsers``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ListUsers`: []User - fmt.Fprintf(os.Stdout, "Response from `UsersV1Api.ListUsers`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiListUsersRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **limit** | **int32** | How many items to return at one time (max 100) | - **page** | **int32** | The page number of results to return. | - **cursor** | **string** | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. | - **createdSince** | **string** | An ISO8601 timestamp value that returns all users created after a given date & time. | - **createdUntil** | **string** | An ISO8601 timestamp value that returns all users created before a given date & time. | - **updatedSince** | **string** | An ISO8601 timestamp value that returns all users updated after a given date & time. | - **updatedUntil** | **string** | An ISO8601 timestamp value that returns all users updated before a given date & time. | - **lastLoginSince** | **string** | An ISO8601 timestamp value that returns all users that logged in after a given date & time. | - **lastLoginUntil** | **string** | An ISO8601 timestamp value that returns all users that logged in before a given date & time. | - **firstname** | **string** | The first name of the user | - **lastname** | **string** | The last name of the user | - **email** | **string** | The email address of the user | - **username** | **string** | The username for the user | - **samaccountname** | **string** | The AD login name for the user | - **directoryId** | **int32** | | - **externalId** | **string** | An external identifier that has been set on the user | - **userIds** | **string** | A comma separated list of OneLogin User IDs | - **customAttributesAttributeName** | **string** | The short name of a custom attribute. Note that the attribute name is prefixed with custom_attributes. | - **fields** | **string** | Optional. Comma delimited list of fields to return. | - -### Return type - -[**[]User**](User.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## LockAccountUser - -> Error LockAccountUser(ctx, userId).LockAccountUserRequest(lockAccountUserRequest).Execute() - -Lock User Account - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - userId := int32(56) // int32 | Set to the id of the user that you want to return. - lockAccountUserRequest := *openapiclient.NewLockAccountUserRequest(int32(15)) // LockAccountUserRequest | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.UsersV1Api.LockAccountUser(context.Background(), userId).LockAccountUserRequest(lockAccountUserRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UsersV1Api.LockAccountUser``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `LockAccountUser`: Error - fmt.Fprintf(os.Stdout, "Response from `UsersV1Api.LockAccountUser`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**userId** | **int32** | Set to the id of the user that you want to return. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiLockAccountUserRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **lockAccountUserRequest** | [**LockAccountUserRequest**](LockAccountUserRequest.md) | | - -### Return type - -[**Error**](Error.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## LogOutUser - -> Error LogOutUser(ctx, userId).Body(body).Execute() - -Log User Out - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - userId := int32(56) // int32 | Set to the id of the user that you want to return. - body := map[string]interface{}{ ... } // map[string]interface{} | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.UsersV1Api.LogOutUser(context.Background(), userId).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UsersV1Api.LogOutUser``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `LogOutUser`: Error - fmt.Fprintf(os.Stdout, "Response from `UsersV1Api.LogOutUser`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**userId** | **int32** | Set to the id of the user that you want to return. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiLogOutUserRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **body** | **map[string]interface{}** | | - -### Return type - -[**Error**](Error.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## RemoveUserRole - -> Error RemoveUserRole(ctx, userId).RemoveUserRoleRequest(removeUserRoleRequest).Execute() - -Remove Roles for a User - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - userId := int32(56) // int32 | Set to the id of the user that you want to return. - removeUserRoleRequest := *openapiclient.NewRemoveUserRoleRequest([]openapiclient.RemoveUserRoleRequestRoleIdArrayInner{*openapiclient.NewRemoveUserRoleRequestRoleIdArrayInner()}) // RemoveUserRoleRequest | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.UsersV1Api.RemoveUserRole(context.Background(), userId).RemoveUserRoleRequest(removeUserRoleRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UsersV1Api.RemoveUserRole``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `RemoveUserRole`: Error - fmt.Fprintf(os.Stdout, "Response from `UsersV1Api.RemoveUserRole`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**userId** | **int32** | Set to the id of the user that you want to return. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiRemoveUserRoleRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **removeUserRoleRequest** | [**RemoveUserRoleRequest**](RemoveUserRoleRequest.md) | | - -### Return type - -[**Error**](Error.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## SetUserState - -> Error SetUserState(ctx, userId).SetUserStateRequest(setUserStateRequest).Execute() - -Set User State - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - userId := int32(56) // int32 | Set to the id of the user that you want to return. - setUserStateRequest := *openapiclient.NewSetUserStateRequest(int32(1)) // SetUserStateRequest | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.UsersV1Api.SetUserState(context.Background(), userId).SetUserStateRequest(setUserStateRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UsersV1Api.SetUserState``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `SetUserState`: Error - fmt.Fprintf(os.Stdout, "Response from `UsersV1Api.SetUserState`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**userId** | **int32** | Set to the id of the user that you want to return. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiSetUserStateRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **setUserStateRequest** | [**SetUserStateRequest**](SetUserStateRequest.md) | | - -### Return type - -[**Error**](Error.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## UpdatePasswordInsecure - -> Error UpdatePasswordInsecure(ctx, userId).UpdatePasswordInsecureRequest(updatePasswordInsecureRequest).Execute() - -Set Password Using ID in Cleartext - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - userId := int32(56) // int32 | Set to the id of the user that you want to return. - updatePasswordInsecureRequest := *openapiclient.NewUpdatePasswordInsecureRequest("", "") // UpdatePasswordInsecureRequest | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.UsersV1Api.UpdatePasswordInsecure(context.Background(), userId).UpdatePasswordInsecureRequest(updatePasswordInsecureRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UsersV1Api.UpdatePasswordInsecure``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `UpdatePasswordInsecure`: Error - fmt.Fprintf(os.Stdout, "Response from `UsersV1Api.UpdatePasswordInsecure`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**userId** | **int32** | Set to the id of the user that you want to return. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiUpdatePasswordInsecureRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **updatePasswordInsecureRequest** | [**UpdatePasswordInsecureRequest**](UpdatePasswordInsecureRequest.md) | | - -### Return type - -[**Error**](Error.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## UpdatePasswordSecure - -> Error UpdatePasswordSecure(ctx, userId).UpdatePasswordSecureRequest(updatePasswordSecureRequest).Execute() - -Set Password Using ID and SHA-256 and Salt - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - userId := int32(56) // int32 | Set to the id of the user that you want to return. - updatePasswordSecureRequest := *openapiclient.NewUpdatePasswordSecureRequest("xxxxx637aead4030a653f29dae62f1542d67484342c00627a65066e05c5f0", "xxxxx637aead4030a653f29dae62f1542d67484342c00627a65066e05c5f0", "salt+sha256") // UpdatePasswordSecureRequest | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.UsersV1Api.UpdatePasswordSecure(context.Background(), userId).UpdatePasswordSecureRequest(updatePasswordSecureRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UsersV1Api.UpdatePasswordSecure``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `UpdatePasswordSecure`: Error - fmt.Fprintf(os.Stdout, "Response from `UsersV1Api.UpdatePasswordSecure`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**userId** | **int32** | Set to the id of the user that you want to return. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiUpdatePasswordSecureRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **updatePasswordSecureRequest** | [**UpdatePasswordSecureRequest**](UpdatePasswordSecureRequest.md) | | - -### Return type - -[**Error**](Error.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## UpdateUser - -> User UpdateUser(ctx, userId).Mappings(mappings).ValidatePolicy(validatePolicy).User(user).Execute() - -Update a User - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - userId := int32(56) // int32 | Set to the id of the user that you want to return. - mappings := "mappings_example" // string | Controls how mappings will be applied to the user on creation. Defaults to async. (optional) - validatePolicy := true // bool | Will passwords validate against the User Policy? Defaults to true. (optional) - user := *openapiclient.NewUser() // User | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.UsersV1Api.UpdateUser(context.Background(), userId).Mappings(mappings).ValidatePolicy(validatePolicy).User(user).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UsersV1Api.UpdateUser``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `UpdateUser`: User - fmt.Fprintf(os.Stdout, "Response from `UsersV1Api.UpdateUser`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**userId** | **int32** | Set to the id of the user that you want to return. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiUpdateUserRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **mappings** | **string** | Controls how mappings will be applied to the user on creation. Defaults to async. | - **validatePolicy** | **bool** | Will passwords validate against the User Policy? Defaults to true. | - **user** | [**User**](User.md) | | - -### Return type - -[**User**](User.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/docs/UsersV2Api.md b/docs/UsersV2Api.md deleted file mode 100644 index acab05d..0000000 --- a/docs/UsersV2Api.md +++ /dev/null @@ -1,472 +0,0 @@ -# \UsersV2Api - -All URIs are relative to *https://your-api-subdomain.onelogin.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateUser2**](UsersV2Api.md#CreateUser2) | **Post** /api/2/users | Create User -[**DeleteUser2**](UsersV2Api.md#DeleteUser2) | **Delete** /api/2/users/{user_id} | Delete User -[**GetUser2**](UsersV2Api.md#GetUser2) | **Get** /api/2/users/{user_id} | Get User -[**GetUserApps2**](UsersV2Api.md#GetUserApps2) | **Get** /api/2/users/{user_id}/apps | Get User Apps -[**ListUsers2**](UsersV2Api.md#ListUsers2) | **Get** /api/2/users | List Users -[**UpdateUser2**](UsersV2Api.md#UpdateUser2) | **Put** /api/2/users/{user_id} | Update User - - - -## CreateUser2 - -> User CreateUser2(ctx).Mappings(mappings).ValidatePolicy(validatePolicy).User(user).Execute() - -Create User - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - mappings := "mappings_example" // string | Controls how mappings will be applied to the user on creation. Defaults to async. (optional) - validatePolicy := true // bool | Will passwords validate against the User Policy? Defaults to true. (optional) - user := *openapiclient.NewUser() // User | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.UsersV2Api.CreateUser2(context.Background()).Mappings(mappings).ValidatePolicy(validatePolicy).User(user).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UsersV2Api.CreateUser2``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `CreateUser2`: User - fmt.Fprintf(os.Stdout, "Response from `UsersV2Api.CreateUser2`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiCreateUser2Request struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **mappings** | **string** | Controls how mappings will be applied to the user on creation. Defaults to async. | - **validatePolicy** | **bool** | Will passwords validate against the User Policy? Defaults to true. | - **user** | [**User**](User.md) | | - -### Return type - -[**User**](User.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## DeleteUser2 - -> DeleteUser2(ctx, userId).Execute() - -Delete User - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - userId := int32(56) // int32 | Set to the id of the user that you want to return. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.UsersV2Api.DeleteUser2(context.Background(), userId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UsersV2Api.DeleteUser2``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**userId** | **int32** | Set to the id of the user that you want to return. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiDeleteUser2Request struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - - (empty response body) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetUser2 - -> User GetUser2(ctx, userId).Execute() - -Get User - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - userId := int32(56) // int32 | Set to the id of the user that you want to return. - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.UsersV2Api.GetUser2(context.Background(), userId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UsersV2Api.GetUser2``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetUser2`: User - fmt.Fprintf(os.Stdout, "Response from `UsersV2Api.GetUser2`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**userId** | **int32** | Set to the id of the user that you want to return. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetUser2Request struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**User**](User.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetUserApps2 - -> []GetUserApps200ResponseInner GetUserApps2(ctx, userId).IgnoreVisibility(ignoreVisibility).Execute() - -Get User Apps - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - userId := int32(56) // int32 | Set to the id of the user that you want to return. - ignoreVisibility := true // bool | Defaults to `false`. When `true` will show all apps that are assigned to a user regardless of their portal visibility setting. (optional) (default to false) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.UsersV2Api.GetUserApps2(context.Background(), userId).IgnoreVisibility(ignoreVisibility).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UsersV2Api.GetUserApps2``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetUserApps2`: []GetUserApps200ResponseInner - fmt.Fprintf(os.Stdout, "Response from `UsersV2Api.GetUserApps2`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**userId** | **int32** | Set to the id of the user that you want to return. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetUserApps2Request struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **ignoreVisibility** | **bool** | Defaults to `false`. When `true` will show all apps that are assigned to a user regardless of their portal visibility setting. | [default to false] - -### Return type - -[**[]GetUserApps200ResponseInner**](GetUserApps200ResponseInner.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## ListUsers2 - -> []User ListUsers2(ctx).Limit(limit).Page(page).Cursor(cursor).CreatedSince(createdSince).CreatedUntil(createdUntil).UpdatedSince(updatedSince).UpdatedUntil(updatedUntil).LastLoginSince(lastLoginSince).LastLoginUntil(lastLoginUntil).Firstname(firstname).Lastname(lastname).Email(email).Username(username).Samaccountname(samaccountname).DirectoryId(directoryId).ExternalId(externalId).UserIds(userIds).CustomAttributesAttributeName(customAttributesAttributeName).Fields(fields).Execute() - -List Users - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - limit := int32(56) // int32 | How many items to return at one time (max 100) (optional) - page := int32(56) // int32 | The page number of results to return. (optional) - cursor := "cursor_example" // string | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. (optional) - createdSince := "createdSince_example" // string | An ISO8601 timestamp value that returns all users created after a given date & time. (optional) - createdUntil := "createdUntil_example" // string | An ISO8601 timestamp value that returns all users created before a given date & time. (optional) - updatedSince := "updatedSince_example" // string | An ISO8601 timestamp value that returns all users updated after a given date & time. (optional) - updatedUntil := "updatedUntil_example" // string | An ISO8601 timestamp value that returns all users updated before a given date & time. (optional) - lastLoginSince := "lastLoginSince_example" // string | An ISO8601 timestamp value that returns all users that logged in after a given date & time. (optional) - lastLoginUntil := "lastLoginUntil_example" // string | An ISO8601 timestamp value that returns all users that logged in before a given date & time. (optional) - firstname := "firstname_example" // string | The first name of the user (optional) - lastname := "lastname_example" // string | The last name of the user (optional) - email := "email_example" // string | The email address of the user (optional) - username := "username_example" // string | The username for the user (optional) - samaccountname := "samaccountname_example" // string | The AD login name for the user (optional) - directoryId := int32(56) // int32 | (optional) - externalId := "externalId_example" // string | An external identifier that has been set on the user (optional) - userIds := "userIds_example" // string | A comma separated list of OneLogin User IDs (optional) - customAttributesAttributeName := "customAttributesAttributeName_example" // string | The short name of a custom attribute. Note that the attribute name is prefixed with custom_attributes. (optional) - fields := "fields_example" // string | Optional. Comma delimited list of fields to return. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.UsersV2Api.ListUsers2(context.Background()).Limit(limit).Page(page).Cursor(cursor).CreatedSince(createdSince).CreatedUntil(createdUntil).UpdatedSince(updatedSince).UpdatedUntil(updatedUntil).LastLoginSince(lastLoginSince).LastLoginUntil(lastLoginUntil).Firstname(firstname).Lastname(lastname).Email(email).Username(username).Samaccountname(samaccountname).DirectoryId(directoryId).ExternalId(externalId).UserIds(userIds).CustomAttributesAttributeName(customAttributesAttributeName).Fields(fields).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UsersV2Api.ListUsers2``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ListUsers2`: []User - fmt.Fprintf(os.Stdout, "Response from `UsersV2Api.ListUsers2`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiListUsers2Request struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **limit** | **int32** | How many items to return at one time (max 100) | - **page** | **int32** | The page number of results to return. | - **cursor** | **string** | Set to the value extracted from Before-Cursor or After-Cursor headers to return the previous or next page. | - **createdSince** | **string** | An ISO8601 timestamp value that returns all users created after a given date & time. | - **createdUntil** | **string** | An ISO8601 timestamp value that returns all users created before a given date & time. | - **updatedSince** | **string** | An ISO8601 timestamp value that returns all users updated after a given date & time. | - **updatedUntil** | **string** | An ISO8601 timestamp value that returns all users updated before a given date & time. | - **lastLoginSince** | **string** | An ISO8601 timestamp value that returns all users that logged in after a given date & time. | - **lastLoginUntil** | **string** | An ISO8601 timestamp value that returns all users that logged in before a given date & time. | - **firstname** | **string** | The first name of the user | - **lastname** | **string** | The last name of the user | - **email** | **string** | The email address of the user | - **username** | **string** | The username for the user | - **samaccountname** | **string** | The AD login name for the user | - **directoryId** | **int32** | | - **externalId** | **string** | An external identifier that has been set on the user | - **userIds** | **string** | A comma separated list of OneLogin User IDs | - **customAttributesAttributeName** | **string** | The short name of a custom attribute. Note that the attribute name is prefixed with custom_attributes. | - **fields** | **string** | Optional. Comma delimited list of fields to return. | - -### Return type - -[**[]User**](User.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## UpdateUser2 - -> User UpdateUser2(ctx, userId).Mappings(mappings).ValidatePolicy(validatePolicy).User(user).Execute() - -Update User - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - userId := int32(56) // int32 | Set to the id of the user that you want to return. - mappings := "mappings_example" // string | Controls how mappings will be applied to the user on creation. Defaults to async. (optional) - validatePolicy := true // bool | Will passwords validate against the User Policy? Defaults to true. (optional) - user := *openapiclient.NewUser() // User | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.UsersV2Api.UpdateUser2(context.Background(), userId).Mappings(mappings).ValidatePolicy(validatePolicy).User(user).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UsersV2Api.UpdateUser2``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `UpdateUser2`: User - fmt.Fprintf(os.Stdout, "Response from `UsersV2Api.UpdateUser2`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**userId** | **int32** | Set to the id of the user that you want to return. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiUpdateUser2Request struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **mappings** | **string** | Controls how mappings will be applied to the user on creation. Defaults to async. | - **validatePolicy** | **bool** | Will passwords validate against the User Policy? Defaults to true. | - **user** | [**User**](User.md) | | - -### Return type - -[**User**](User.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/docs/VerFactorSaml200Response.md b/docs/VerFactorSaml200Response.md deleted file mode 100644 index ce605e8..0000000 --- a/docs/VerFactorSaml200Response.md +++ /dev/null @@ -1,82 +0,0 @@ -# VerFactorSaml200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Data** | Pointer to **string** | Provides the SAML assertion. | [optional] -**Message** | Pointer to **string** | Plain text description describing the outcome of the response. | [optional] - -## Methods - -### NewVerFactorSaml200Response - -`func NewVerFactorSaml200Response() *VerFactorSaml200Response` - -NewVerFactorSaml200Response instantiates a new VerFactorSaml200Response 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 - -### NewVerFactorSaml200ResponseWithDefaults - -`func NewVerFactorSaml200ResponseWithDefaults() *VerFactorSaml200Response` - -NewVerFactorSaml200ResponseWithDefaults instantiates a new VerFactorSaml200Response 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 - -### GetData - -`func (o *VerFactorSaml200Response) GetData() string` - -GetData returns the Data field if non-nil, zero value otherwise. - -### GetDataOk - -`func (o *VerFactorSaml200Response) GetDataOk() (*string, bool)` - -GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetData - -`func (o *VerFactorSaml200Response) SetData(v string)` - -SetData sets Data field to given value. - -### HasData - -`func (o *VerFactorSaml200Response) HasData() bool` - -HasData returns a boolean if a field has been set. - -### GetMessage - -`func (o *VerFactorSaml200Response) GetMessage() string` - -GetMessage returns the Message field if non-nil, zero value otherwise. - -### GetMessageOk - -`func (o *VerFactorSaml200Response) GetMessageOk() (*string, bool)` - -GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMessage - -`func (o *VerFactorSaml200Response) SetMessage(v string)` - -SetMessage sets Message field to given value. - -### HasMessage - -`func (o *VerFactorSaml200Response) HasMessage() bool` - -HasMessage 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/Verb.md b/docs/Verb.md deleted file mode 100644 index 8870a7e..0000000 --- a/docs/Verb.md +++ /dev/null @@ -1,21 +0,0 @@ -# Verb - -## Enum - - -* `LOG_IN` (value: `"log-in"`) - -* `LOG_OUT` (value: `"log-out"`) - -* `LOG_IN_DENIED` (value: `"log-in-denied"`) - -* `AUTHENTICATION_CHALLENGE` (value: `"authentication-challenge"`) - -* `AUTHENTICATION_CHALLENGE_PASS` (value: `"authentication-challenge-pass"`) - -* `AUTHENTICATION_CHALLENGE_FAIL` (value: `"authentication-challenge-fail"`) - - -[[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/VerifyMfaFactorRequest.md b/docs/VerifyMfaFactorRequest.md deleted file mode 100644 index d7e67c7..0000000 --- a/docs/VerifyMfaFactorRequest.md +++ /dev/null @@ -1,82 +0,0 @@ -# VerifyMfaFactorRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**StateToken** | Pointer to **string** | The state_token is returned after a successful request to Enroll a Factor or Activate a Factor. The state_token MUST be provided if the needs_trigger attribute from the proceeding calls is set to true. Note that the state_token expires 120 seconds after creation. If the token is expired you will need to Activate the Factor again. | [optional] -**OtpToken** | Pointer to **string** | OTP code provided by the device or SMS message sent to user. When a device like OneLogin Protect that supports Push has been used you do not need to provide the otp_token and can keep polling this endpoint until the state_token expires. | [optional] - -## Methods - -### NewVerifyMfaFactorRequest - -`func NewVerifyMfaFactorRequest() *VerifyMfaFactorRequest` - -NewVerifyMfaFactorRequest instantiates a new VerifyMfaFactorRequest 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 - -### NewVerifyMfaFactorRequestWithDefaults - -`func NewVerifyMfaFactorRequestWithDefaults() *VerifyMfaFactorRequest` - -NewVerifyMfaFactorRequestWithDefaults instantiates a new VerifyMfaFactorRequest 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 - -### GetStateToken - -`func (o *VerifyMfaFactorRequest) GetStateToken() string` - -GetStateToken returns the StateToken field if non-nil, zero value otherwise. - -### GetStateTokenOk - -`func (o *VerifyMfaFactorRequest) GetStateTokenOk() (*string, bool)` - -GetStateTokenOk returns a tuple with the StateToken field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStateToken - -`func (o *VerifyMfaFactorRequest) SetStateToken(v string)` - -SetStateToken sets StateToken field to given value. - -### HasStateToken - -`func (o *VerifyMfaFactorRequest) HasStateToken() bool` - -HasStateToken returns a boolean if a field has been set. - -### GetOtpToken - -`func (o *VerifyMfaFactorRequest) GetOtpToken() string` - -GetOtpToken returns the OtpToken field if non-nil, zero value otherwise. - -### GetOtpTokenOk - -`func (o *VerifyMfaFactorRequest) GetOtpTokenOk() (*string, bool)` - -GetOtpTokenOk returns a tuple with the OtpToken field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetOtpToken - -`func (o *VerifyMfaFactorRequest) SetOtpToken(v string)` - -SetOtpToken sets OtpToken field to given value. - -### HasOtpToken - -`func (o *VerifyMfaFactorRequest) HasOtpToken() bool` - -HasOtpToken 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/VerifyUserRegistration200Response.md b/docs/VerifyUserRegistration200Response.md deleted file mode 100644 index 725489b..0000000 --- a/docs/VerifyUserRegistration200Response.md +++ /dev/null @@ -1,108 +0,0 @@ -# VerifyUserRegistration200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | Pointer to **string** | Registration identifier. | [optional] -**Status** | Pointer to **string** | pending registration has not been completed successfully. accepted registration has successfully completed. | [optional] -**DeviceId** | Pointer to **string** | Device id to be used with Verify the Factor. | [optional] - -## Methods - -### NewVerifyUserRegistration200Response - -`func NewVerifyUserRegistration200Response() *VerifyUserRegistration200Response` - -NewVerifyUserRegistration200Response instantiates a new VerifyUserRegistration200Response 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 - -### NewVerifyUserRegistration200ResponseWithDefaults - -`func NewVerifyUserRegistration200ResponseWithDefaults() *VerifyUserRegistration200Response` - -NewVerifyUserRegistration200ResponseWithDefaults instantiates a new VerifyUserRegistration200Response 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 - -### GetId - -`func (o *VerifyUserRegistration200Response) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *VerifyUserRegistration200Response) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *VerifyUserRegistration200Response) SetId(v string)` - -SetId sets Id field to given value. - -### HasId - -`func (o *VerifyUserRegistration200Response) HasId() bool` - -HasId returns a boolean if a field has been set. - -### GetStatus - -`func (o *VerifyUserRegistration200Response) GetStatus() string` - -GetStatus returns the Status field if non-nil, zero value otherwise. - -### GetStatusOk - -`func (o *VerifyUserRegistration200Response) GetStatusOk() (*string, bool)` - -GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStatus - -`func (o *VerifyUserRegistration200Response) SetStatus(v string)` - -SetStatus sets Status field to given value. - -### HasStatus - -`func (o *VerifyUserRegistration200Response) HasStatus() bool` - -HasStatus returns a boolean if a field has been set. - -### GetDeviceId - -`func (o *VerifyUserRegistration200Response) GetDeviceId() string` - -GetDeviceId returns the DeviceId field if non-nil, zero value otherwise. - -### GetDeviceIdOk - -`func (o *VerifyUserRegistration200Response) GetDeviceIdOk() (*string, bool)` - -GetDeviceIdOk returns a tuple with the DeviceId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDeviceId - -`func (o *VerifyUserRegistration200Response) SetDeviceId(v string)` - -SetDeviceId sets DeviceId field to given value. - -### HasDeviceId - -`func (o *VerifyUserRegistration200Response) HasDeviceId() bool` - -HasDeviceId 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/VerifyUserRegistrationRequest.md b/docs/VerifyUserRegistrationRequest.md deleted file mode 100644 index 6d4f702..0000000 --- a/docs/VerifyUserRegistrationRequest.md +++ /dev/null @@ -1,56 +0,0 @@ -# VerifyUserRegistrationRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Otp** | Pointer to **int32** | One-Time-Password (OTP) that was sent to the user based on the chosen factor. OneLogin SMS and OneLogin Email support this OTP code. | [optional] - -## Methods - -### NewVerifyUserRegistrationRequest - -`func NewVerifyUserRegistrationRequest() *VerifyUserRegistrationRequest` - -NewVerifyUserRegistrationRequest instantiates a new VerifyUserRegistrationRequest 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 - -### NewVerifyUserRegistrationRequestWithDefaults - -`func NewVerifyUserRegistrationRequestWithDefaults() *VerifyUserRegistrationRequest` - -NewVerifyUserRegistrationRequestWithDefaults instantiates a new VerifyUserRegistrationRequest 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 - -### GetOtp - -`func (o *VerifyUserRegistrationRequest) GetOtp() int32` - -GetOtp returns the Otp field if non-nil, zero value otherwise. - -### GetOtpOk - -`func (o *VerifyUserRegistrationRequest) GetOtpOk() (*int32, bool)` - -GetOtpOk returns a tuple with the Otp field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetOtp - -`func (o *VerifyUserRegistrationRequest) SetOtp(v int32)` - -SetOtp sets Otp field to given value. - -### HasOtp - -`func (o *VerifyUserRegistrationRequest) HasOtp() bool` - -HasOtp 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/VerifyUserVerificationRequest.md b/docs/VerifyUserVerificationRequest.md deleted file mode 100644 index a72775c..0000000 --- a/docs/VerifyUserVerificationRequest.md +++ /dev/null @@ -1,82 +0,0 @@ -# VerifyUserVerificationRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Otp** | Pointer to **string** | OTP code provided by the device or SMS message sent to user. | [optional] -**DeviceId** | Pointer to **int32** | ID of the specified device which has been registerd for the given user. Available on Get Devices API call. | [optional] - -## Methods - -### NewVerifyUserVerificationRequest - -`func NewVerifyUserVerificationRequest() *VerifyUserVerificationRequest` - -NewVerifyUserVerificationRequest instantiates a new VerifyUserVerificationRequest 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 - -### NewVerifyUserVerificationRequestWithDefaults - -`func NewVerifyUserVerificationRequestWithDefaults() *VerifyUserVerificationRequest` - -NewVerifyUserVerificationRequestWithDefaults instantiates a new VerifyUserVerificationRequest 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 - -### GetOtp - -`func (o *VerifyUserVerificationRequest) GetOtp() string` - -GetOtp returns the Otp field if non-nil, zero value otherwise. - -### GetOtpOk - -`func (o *VerifyUserVerificationRequest) GetOtpOk() (*string, bool)` - -GetOtpOk returns a tuple with the Otp field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetOtp - -`func (o *VerifyUserVerificationRequest) SetOtp(v string)` - -SetOtp sets Otp field to given value. - -### HasOtp - -`func (o *VerifyUserVerificationRequest) HasOtp() bool` - -HasOtp returns a boolean if a field has been set. - -### GetDeviceId - -`func (o *VerifyUserVerificationRequest) GetDeviceId() int32` - -GetDeviceId returns the DeviceId field if non-nil, zero value otherwise. - -### GetDeviceIdOk - -`func (o *VerifyUserVerificationRequest) GetDeviceIdOk() (*int32, bool)` - -GetDeviceIdOk returns a tuple with the DeviceId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDeviceId - -`func (o *VerifyUserVerificationRequest) SetDeviceId(v int32)` - -SetDeviceId sets DeviceId field to given value. - -### HasDeviceId - -`func (o *VerifyUserVerificationRequest) HasDeviceId() bool` - -HasDeviceId 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/VigilanceAIApi.md b/docs/VigilanceAIApi.md deleted file mode 100644 index 7b41bb0..0000000 --- a/docs/VigilanceAIApi.md +++ /dev/null @@ -1,548 +0,0 @@ -# \VigilanceAIApi - -All URIs are relative to *https://your-api-subdomain.onelogin.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateRiskRule**](VigilanceAIApi.md#CreateRiskRule) | **Post** /api/2/risk/rules | Create Rule -[**DeleteRiskRule**](VigilanceAIApi.md#DeleteRiskRule) | **Delete** /api/2/risk/rules/{rule_id} | Delete Rule -[**GetRiskRule**](VigilanceAIApi.md#GetRiskRule) | **Get** /api/2/risk/rules/{rule_id} | get Risk Rule -[**GetRiskScore**](VigilanceAIApi.md#GetRiskScore) | **Post** /api/2/risk/verify | Get a Risk Score -[**GetRiskScores**](VigilanceAIApi.md#GetRiskScores) | **Get** /api/2/risk/scores | Get Score Summary -[**ListRiskRules**](VigilanceAIApi.md#ListRiskRules) | **Get** /api/2/risk/rules | List Rules -[**TrackRiskEvent**](VigilanceAIApi.md#TrackRiskEvent) | **Post** /api/2/risk/events | Track an Event -[**UpdateRiskRule**](VigilanceAIApi.md#UpdateRiskRule) | **Put** /api/2/risk/rules/{rule_id} | Update Rule - - - -## CreateRiskRule - -> RiskRule CreateRiskRule(ctx).RiskRule(riskRule).Execute() - -Create Rule - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - riskRule := *openapiclient.NewRiskRule() // RiskRule | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.VigilanceAIApi.CreateRiskRule(context.Background()).RiskRule(riskRule).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `VigilanceAIApi.CreateRiskRule``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `CreateRiskRule`: RiskRule - fmt.Fprintf(os.Stdout, "Response from `VigilanceAIApi.CreateRiskRule`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiCreateRiskRuleRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **riskRule** | [**RiskRule**](RiskRule.md) | | - -### Return type - -[**RiskRule**](RiskRule.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## DeleteRiskRule - -> DeleteRiskRule(ctx, ruleId).Execute() - -Delete Rule - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - ruleId := "ruleId_example" // string | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.VigilanceAIApi.DeleteRiskRule(context.Background(), ruleId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `VigilanceAIApi.DeleteRiskRule``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**ruleId** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiDeleteRiskRuleRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - - (empty response body) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetRiskRule - -> RiskRule GetRiskRule(ctx, ruleId).Execute() - -get Risk Rule - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - ruleId := "ruleId_example" // string | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.VigilanceAIApi.GetRiskRule(context.Background(), ruleId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `VigilanceAIApi.GetRiskRule``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetRiskRule`: RiskRule - fmt.Fprintf(os.Stdout, "Response from `VigilanceAIApi.GetRiskRule`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**ruleId** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetRiskRuleRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**RiskRule**](RiskRule.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetRiskScore - -> GetRiskScore200Response GetRiskScore(ctx).GetRiskScoreRequest(getRiskScoreRequest).Before(before).After(after).Execute() - -Get a Risk Score - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - getRiskScoreRequest := *openapiclient.NewGetRiskScoreRequest("Ip_example", "UserAgent_example", *openapiclient.NewRiskUser("Id_example")) // GetRiskScoreRequest | - before := "before_example" // string | Optional ISO8601 formatted date string. Defaults to current date. Maximum date is 90 days ago. (optional) - after := "after_example" // string | Optional ISO8601 formatted date string. Defaults to 30 days ago. Maximum date is 90 days ago. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.VigilanceAIApi.GetRiskScore(context.Background()).GetRiskScoreRequest(getRiskScoreRequest).Before(before).After(after).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `VigilanceAIApi.GetRiskScore``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetRiskScore`: GetRiskScore200Response - fmt.Fprintf(os.Stdout, "Response from `VigilanceAIApi.GetRiskScore`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetRiskScoreRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **getRiskScoreRequest** | [**GetRiskScoreRequest**](GetRiskScoreRequest.md) | | - **before** | **string** | Optional ISO8601 formatted date string. Defaults to current date. Maximum date is 90 days ago. | - **after** | **string** | Optional ISO8601 formatted date string. Defaults to 30 days ago. Maximum date is 90 days ago. | - -### Return type - -[**GetRiskScore200Response**](GetRiskScore200Response.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetRiskScores - -> GetRiskScores200Response GetRiskScores(ctx).Execute() - -Get Score Summary - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.VigilanceAIApi.GetRiskScores(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `VigilanceAIApi.GetRiskScores``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetRiskScores`: GetRiskScores200Response - fmt.Fprintf(os.Stdout, "Response from `VigilanceAIApi.GetRiskScores`: %v\n", resp) -} -``` - -### Path Parameters - -This endpoint does not need any parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetRiskScoresRequest struct via the builder pattern - - -### Return type - -[**GetRiskScores200Response**](GetRiskScores200Response.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## ListRiskRules - -> []RiskRule ListRiskRules(ctx).Execute() - -List Rules - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.VigilanceAIApi.ListRiskRules(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `VigilanceAIApi.ListRiskRules``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ListRiskRules`: []RiskRule - fmt.Fprintf(os.Stdout, "Response from `VigilanceAIApi.ListRiskRules`: %v\n", resp) -} -``` - -### Path Parameters - -This endpoint does not need any parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a apiListRiskRulesRequest struct via the builder pattern - - -### Return type - -[**[]RiskRule**](RiskRule.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## TrackRiskEvent - -> TrackRiskEvent(ctx).TrackRiskEventRequest(trackRiskEventRequest).Execute() - -Track an Event - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - trackRiskEventRequest := *openapiclient.NewTrackRiskEventRequest("Verb_example", "Ip_example", "UserAgent_example", *openapiclient.NewRiskUser("Id_example")) // TrackRiskEventRequest | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.VigilanceAIApi.TrackRiskEvent(context.Background()).TrackRiskEventRequest(trackRiskEventRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `VigilanceAIApi.TrackRiskEvent``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiTrackRiskEventRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **trackRiskEventRequest** | [**TrackRiskEventRequest**](TrackRiskEventRequest.md) | | - -### Return type - - (empty response body) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## UpdateRiskRule - -> RiskRule UpdateRiskRule(ctx, ruleId).UpdateRiskRuleRequest(updateRiskRuleRequest).Execute() - -Update Rule - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - ruleId := "ruleId_example" // string | - updateRiskRuleRequest := *openapiclient.NewUpdateRiskRuleRequest() // UpdateRiskRuleRequest | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.VigilanceAIApi.UpdateRiskRule(context.Background(), ruleId).UpdateRiskRuleRequest(updateRiskRuleRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `VigilanceAIApi.UpdateRiskRule``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `UpdateRiskRule`: RiskRule - fmt.Fprintf(os.Stdout, "Response from `VigilanceAIApi.UpdateRiskRule`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**ruleId** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiUpdateRiskRuleRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **updateRiskRuleRequest** | [**UpdateRiskRuleRequest**](UpdateRiskRuleRequest.md) | | - -### Return type - -[**RiskRule**](RiskRule.md) - -### Authorization - -[OAuth2](../README.md#OAuth2) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/docs/api.md b/docs/api.md new file mode 100644 index 0000000..4cdc8ca --- /dev/null +++ b/docs/api.md @@ -0,0 +1,38 @@ +# API Module Documentation + +The API module is a crucial part of the OneLogin Go SDK. It is responsible for constructing and sending HTTP requests to the OneLogin API, and processing the responses. This document will explain the main components of the API module and their role in the SDK. + +## Client + +The `Client` struct is the primary interface for interacting with the OneLogin API. It uses an `HttpClient` to make HTTP requests, an `Auth` object to handle authentication, and the `OLdomain` (OneLogin domain) for routing the requests. + +### `NewClient` Function + +The `NewClient` function creates a new `Client` and initializes it with the `http.DefaultClient` as the `HttpClient`, a new `Authenticator` for `Auth`, and sets the `OLdomain` from the `ONELOGIN_SUBDOMAIN` environment variable. This function is typically called at the start of the program to instantiate the client, which is then used to make API calls. + +### `newRequest` Function + +This function creates a new HTTP request with the specified method, path, query parameters, and request body. It is a helper function, used by the HTTP methods (Get, Post, Delete, Put) of the `Client` to construct a new request. The function takes the method type (GET, POST, etc.), the API path, an object for query parameters, and a body for the request, and returns an HTTP request that is ready to be sent. + +### `sendRequest` Function + +This function sends an HTTP request and returns the HTTP response. It is used by the HTTP methods (Get, Post, Delete, Put) of the `Client` to send requests. This function also checks the response status code, and if it detects a `http.StatusUnauthorized` (HTTP 401), it attempts to refresh the token and retry the request. + +## HTTP Methods + +The `Client` struct provides the following methods for making HTTP requests: + +- `Get`: Makes a GET request to the specified path with optional query parameters. It is used to retrieve information from the OneLogin API. +- `Post`: Makes a POST request to the specified path. It sends data to the OneLogin API to create a new resource. +- `Delete`: Makes a DELETE request to the specified path. It is used to delete a resource from the OneLogin API. +- `Put`: Makes a PUT request to the specified path. It is used to update a resource in the OneLogin API. + +Each of these methods uses the `newRequest` function to create the HTTP request, and the `sendRequest` function to send the request and retrieve the response. These methods make the process of interacting with the OneLogin API simpler and more intuitive. + +## Authenticator + +The `Authenticator` interface is used for handling authentication. It uses the `GetToken` method for retrieving authentication tokens. The tokens are needed for authenticating requests to the OneLogin API. + +The `Authenticator` is initialized with the `NewAuthenticator` function and the token is generated with the `GenerateToken` method within the `NewClient` function. If a request is unauthorized (HTTP 401), the token is refreshed using the `GenerateToken` method in the `sendRequest` function. + +In summary, the API module simplifies the process of interacting with the OneLogin API by encapsulating the details of creating, sending, and processing HTTP requests. It uses environment variables for the API credentials and handles error scenarios such as unauthorized requests and token refresh. It forms the backbone of the OneLogin Go SDK, providing a streamlined interface for making API calls. \ No newline at end of file diff --git a/docs/authentication.md b/docs/authentication.md new file mode 100644 index 0000000..0f8acfe --- /dev/null +++ b/docs/authentication.md @@ -0,0 +1,54 @@ +# Authentication Module Documentation + +The Authentication module provides functionalities to handle the authentication process with the OneLogin API in the Go SDK. This process includes generating and revoking access tokens, which are necessary for making authenticated requests to the API. The module is implemented in the `authentication.go` file in the `authentication` package. + +## Authenticator Struct + +The `Authenticator` struct represents an authenticator object that can handle authentication processes. It holds the `accessToken` as a field. The `accessToken` field stores the generated access token used for making authenticated API calls. + +```go +type Authenticator struct { + accessToken string +} +``` + +## NewAuthenticator Function + +The `NewAuthenticator` function is used to create a new `Authenticator` instance. It does not require any arguments and it initializes a new Authenticator with an empty `accessToken`. + +```go +func NewAuthenticator() *Authenticator { + return &Authenticator{} +} +``` + +## GenerateToken Function + +The `GenerateToken` function is used to generate a new access token. It reads the `ONELOGIN_CLIENT_ID` and `ONELOGIN_CLIENT_SECRET` environment variables, creates an authentication request, sends it, and handles the response. The newly generated access token is stored in the `Authenticator` instance. + +```go +func (a *Authenticator) GenerateToken() error { + // implementation details +} +``` + +## RevokeToken Function + +The `RevokeToken` function is used to revoke an existing access token. It reads the `ONELOGIN_CLIENT_ID` and `ONELOGIN_CLIENT_SECRET` environment variables, creates a revocation request, sends it, and handles the response. If the revocation is successful, a confirmation message is printed. + +```go +func (a *Authenticator) RevokeToken(token, domain *string) error { + // implementation details +} +``` + +## GetToken Function + +The `GetToken` function is used to retrieve the current access token from the `Authenticator` instance. It returns the `accessToken` field of the `Authenticator` struct. + +```go +func (a *Authenticator) GetToken() (string, error) { + return a.accessToken, nil +} +``` + diff --git a/docs/error_handling.md b/docs/error_handling.md new file mode 100644 index 0000000..bea523b --- /dev/null +++ b/docs/error_handling.md @@ -0,0 +1,33 @@ +# Error Handling + +1. AuthenticationError: + - Purpose: Represents an error related to authentication. + - Fields: + - Message: Provides additional information about the error. + +2. APIError: + - Purpose: Represents an error related to API calls. + - Fields: + - Message: Provides additional information about the error. + - Code: Specifies the error code associated with the API error. + +3. SerializationError: + - Purpose: Represents an error related to serialization. + - Fields: + - Message: Provides additional information about the error. + +4. SDKError: + - Purpose: Represents a general SDK error. + - Fields: + - Message: Provides additional information about the error. + +5. RequestError: + - Purpose: Represents an error related to making an authentication request. + - Fields: + - Message: Provides additional information about the error. + +Each error type has an associated Error() method that returns a formatted error message based on the error type and the provided error message. Additionally, there are corresponding New functions that create and return an error instance with the specified error message. + +To use these error types, you can import the `error` package and utilize the respective New functions to create specific error instances when necessary. + +Please note that it's important to handle and propagate errors appropriately in your code to ensure proper error handling and debugging. \ No newline at end of file diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..a65b572 --- /dev/null +++ b/docs/index.md @@ -0,0 +1,32 @@ +# Onelogin Go SDK Documentation + +This documentation provides detailed information on how to use the SDK to interact with the OneLogin platform. + +## Table of Contents + +- [API Reference](api.md): Learn about the available API endpoints and how to make requests using the SDK. +- [Authentication](authentication.md): Understand the authentication mechanisms supported by the SDK and how to authenticate your requests. +- [Error Handling](error_handling.md): Explore the different types of errors that can occur during SDK usage and how to handle them properly. +- [SDK Models](models.md): Get familiar with the models used by the SDK to represent data and interact with the API. +- [Usage Examples](usage_examples.md): Find example code snippets and scenarios to help you understand how to use the SDK effectively. + +## Additional Resources + +- [Design](Design.md): Dive into the design considerations and architecture of the SDK. +- [License](../LICENSE): View the license agreement for the SDK. +- [README](../README.md): Read the SDK's introductory information, installation instructions, and basic usage guidelines. + +## Code Structure + +The SDK follows a modular structure with the following key components: + +- `internal/api`: Contains the implementation of the API client, request handling, and response parsing. +- `internal/authentication`: Provides authentication mechanisms and related functionality. +- `internal/error`: Defines various error types used by the SDK. +- `internal/models`: Contains the model definitions used to represent data exchanged with the API. +- `internal/utilities`: Includes utility functions and helper methods. +- `pkg/onelogin`: Contains the main implementation of the OneLogin SDK. + +## Getting Started + +To get started with the SDK, follow the installation instructions outlined in the [README](../README.md) file. Once the SDK is installed, refer to the usage examples in [Usage Examples](usage_examples.md) to understand how to use the SDK to perform various operations. diff --git a/docs/models.md b/docs/models.md new file mode 100644 index 0000000..df362af --- /dev/null +++ b/docs/models.md @@ -0,0 +1,128 @@ +# SDK Models + +The SDK provides several models that define the structure of data used for data representation and interaction with the OneLogin API. These models are utilized in the SDK's client implementation to handle requests to the OneLogin API. The `Client` struct provides methods such as `Get`, `Delete`,`Post`, and `Put` that internally use the specified models to serialize data into JSON and send HTTP requests to the API. These methods handle authentication, path construction, query parameters, and request body serialization based on the provided models. + +The following is a list of models available in the SDK: + +## [App](../internal/models/app.go) + +The `App` model represents an application within the OneLogin platform. It contains information such as the application's name, description, icon URL, and other relevant details. + +```go +type App struct { + ID int64 `json:"id,omitempty"` + Name string `json:"name"` + Description string `json:"description,omitempty"` + // ... +} +``` + +## [AppRule](../internal/models/app_rule.go) + +The `AppRule` model represents a rule associated with an application. It defines conditions and actions that determine how the application behaves in specific scenarios. The model includes properties such as rule name, match attribute, value, and actions to be performed. + +```go +type AppRule struct { + AppID int64 `json:"id"` + Name string `json:"name"` + Match string `json:"match"` + Actions []string `json:"actions"` + // ... +} +``` + +## [AuthServer](../internal/models/auth_server.go) + +The `AuthServer` model represents an authentication server used for Single Sign-On (SSO) integration. It includes properties such as the server's name, issuer URL, token endpoint URL, and other relevant information. + +```go +type AuthServer struct { + ID int64 `json:"id"` + Name string `json:"name"` + // ... +} +``` + +## [Group](../internal/models/group.go) + +The `Group` model represents a user group within the OneLogin platform. It contains information about the group, such as the group name, description, and any associated custom attributes. + +```go +type Group struct { + ID int `json:"id"` + Name string `json:"name"` + Reference *string `json:"reference"` +} +``` + +## [Privilege](../internal/models/privilege.go) + +The `Privilege` model represents a privilege assigned to a user or a group within the OneLogin platform. It includes properties such as privilege name, description, and associated roles. + +```go +type Privilege struct { + ID int64 `json:"id"` + Name string `json:"name"` + Description string `json:"description"` + RoleIDs []string `json:"role_ids"` + // ... +} +``` + +## [Role](../internal/models/role.go) + +The `Role` model represents a role within the OneLogin platform. It contains information such as the role's name, description, and any associated privileges. + +```go +type Role struct { + ID int64 `json:"id"` + Name string `json:"name"` + // ... +} +``` + +## [SmartHooks](../internal/models/smart_hooks.go) + +The `SmartHooks` model represents a set of smart hooks associated with an application. It includes properties such as hook type, script, and configuration details. + +```go +type SmartHooks struct { + ID *string `json:"id,omitempty"` + Type *string `json:"type,omitempty"` + Disabled *bool `json:"disabled,omitempty"` + // ... +} +``` + +## [User](../internal/models/user.go) + +The `User` model represents a user within the OneLogin platform. It contains information such as the user's email, username, first name, last name, and other relevant details. + +```go + + +type User struct { + Firstname *string `json:"firstname,omitempty"` + Lastname *string `json:"lastname,omitempty"` + Username *string `json:"username,omitempty"` + Email *string `json:"email,omitempty"` + // ... +} +``` + +## [UserMapping](../internal/models/user_mapping.go) + +The `UserMapping` model represents a mapping between a user in the OneLogin platform and an external system. + +```go +type UserMapping struct { + ID *int32 `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Match *string `json:"match,omitempty"` + // ... +} +``` + +These models provide a convenient way to work with data when interacting with the OneLogin API using the SDK. You can use them to create, retrieve, update, or delete various resources within the OneLogin platform. + +Feel free to explore the specific model files linked above to view the complete code and additional information. diff --git a/docs/usage_examples.md b/docs/usage_examples.md new file mode 100644 index 0000000..edddc1b --- /dev/null +++ b/docs/usage_examples.md @@ -0,0 +1,52 @@ +```go +package main + +import ( + "fmt" + + "github.com/onelogin/onelogin-go-sdk/internal/models" + "github.com/onelogin/onelogin-go-sdk/pkg/onelogin" +) + +func main() { + var testSSO = models.SSOOpenId{ClientID: "1234567890"} + var testConfig = models.ConfigurationOpenId{ + RedirectURI: "https://example.com", + LoginURL: "https://example.com/login", + OidcApplicationType: 1, + TokenEndpointAuthMethod: 1, + AccessTokenExpirationMinutes: 60, + RefreshTokenExpirationMinutes: 60, + } + + var ( + connetorid int32 = 108419 + name string = "Bow wow wow yippy yo yippy yay" + descr string = "Dog app" + ) + + client, err := onelogin.NewOneloginSDK() + if err != nil { + fmt.Println(err) + } + appQ := models.AppQuery{} + applist, err := client.GetApps(&appQ) + if err != nil { + fmt.Println(err) + } + fmt.Printf("%+v\n", applist) + + appT, err := client.CreateApp(models.App{ + ConnectorID: &connetorid, + Name: &name, + Description: &descr, + SSO: testSSO, + Configuration: testConfig, + }) + if err != nil { + fmt.Println(err) + } + fmt.Printf("%+v\n", appT) +} + +``` \ No newline at end of file diff --git a/git_push.sh b/git_push.sh deleted file mode 100644 index f53a75d..0000000 --- a/git_push.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 -git_host=$4 - -if [ "$git_host" = "" ]; then - git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" -fi - -if [ "$git_user_id" = "" ]; then - git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' diff --git a/go.mod b/go.mod index 25754c9..f28dc8b 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,3 @@ module github.com/onelogin/onelogin-go-sdk -go 1.13 - -require ( - github.com/stretchr/testify v1.4.0 - golang.org/x/oauth2 v0.0.0-20210323180902-22b0adad7558 -) +go 1.18 diff --git a/go.sum b/go.sum index 0d63dca..e69de29 100644 --- a/go.sum +++ b/go.sum @@ -1,369 +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/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 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= -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/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/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 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= -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 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -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 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= -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= -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/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/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/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-20210323180902-22b0adad7558 h1:D7nTwh4J0i+5mW4Zjzn5omvlr6YBcWywE6KOcatyNxY= -golang.org/x/oauth2 v0.0.0-20210323180902-22b0adad7558/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -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/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/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/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/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/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= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= -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 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= -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/internal/api/client.go b/internal/api/client.go new file mode 100644 index 0000000..4efc595 --- /dev/null +++ b/internal/api/client.go @@ -0,0 +1,180 @@ +package api + +import ( + "bytes" + "encoding/json" + "fmt" + "io" + "log" + "net/http" + "net/url" + "os" + + "github.com/onelogin/onelogin-go-sdk/internal/authentication" + olerror "github.com/onelogin/onelogin-go-sdk/internal/error" + mod "github.com/onelogin/onelogin-go-sdk/internal/models" + utl "github.com/onelogin/onelogin-go-sdk/internal/utilities" +) + +// Client represents the API client. +type Client struct { + HttpClient HTTPClient // HTTPClient interface for making HTTP requests + Auth *authentication.Authenticator // Authenticator for managing authentication + OLdomain string // OneLogin domain +} + +// HTTPClient is an interface that defines the Do method for making HTTP requests. +type HTTPClient interface { + Do(req *http.Request) (*http.Response, error) +} + +// Authenticator is an interface that defines the GetToken method for retrieving authentication tokens. +type Authenticator interface { + GetToken() (string, error) + NewAuthenticator() *authentication.Authenticator +} + +// NewClient creates a new instance of the API client. +func NewClient() (*Client, error) { + subdomain := os.Getenv("ONELOGIN_SUBDOMAIN") + old := fmt.Sprintf("https://%s.onelogin.com", subdomain) + authenticator := authentication.NewAuthenticator() + err := authenticator.GenerateToken() + if err != nil { + return nil, err + } + + return &Client{ + HttpClient: http.DefaultClient, + Auth: authenticator, + OLdomain: old, + }, nil +} + +// newRequest creates a new HTTP request with the specified method, path, query parameters, and request body. +func (c *Client) newRequest(method string, path *string, queryParams mod.Queryable, body io.Reader) (*http.Request, error) { + + p, err := utl.AddQueryToPath(*path, queryParams) + if err != nil { + return nil, err + } + log.Println("Path:", p) + // Parse the OneLogin domain and path + u, err := url.Parse(c.OLdomain + p) + if err != nil { + return nil, err + } + + // Create a new HTTP request + req, err := http.NewRequest(method, u.String(), body) + if err != nil { + return nil, err + } + + // Get authentication token + log.Println("Getting authentication token...") + tk, err := c.Auth.GetToken() + if err != nil { + log.Println("Error getting authentication token:", err) + return nil, olerror.NewAuthenticationError("Access Token Retrieval Error") + } + log.Println("Authentication token retrieved successfully.") + + // Set request headers + req.Header.Set("Authorization", fmt.Sprintf("Bearer %s", tk)) + req.Header.Set("Content-Type", "application/json") + + return req, nil +} + +// Get sends a GET request to the specified path with the given query parameters. +func (c *Client) Get(path *string, queryParams mod.Queryable) (*http.Response, error) { + req, err := c.newRequest(http.MethodGet, path, queryParams, http.NoBody) + if err != nil { + return nil, err + } + + return c.sendRequest(req) +} + +// Delete sends a DELETE request to the specified path with the given query parameters. +func (c *Client) Delete(path *string) (*http.Response, error) { + req, err := c.newRequest(http.MethodDelete, path, nil, http.NoBody) + if err != nil { + return nil, err + } + + return c.sendRequest(req) +} + +// Delete sends a DELETE request to the specified path with the given query parameters and request body. +func (c *Client) DeleteWithBody(path *string, body interface{}) (*http.Response, error) { + // Convert request body to JSON + jsonBody, err := json.Marshal(body) + if err != nil { + return nil, err + } + req, err := c.newRequest(http.MethodDelete, path, nil, bytes.NewReader(jsonBody)) + if err != nil { + return nil, err + } + + return c.sendRequest(req) +} + +// Post sends a POST request to the specified path with the given query parameters and request body. +func (c *Client) Post(path *string, body interface{}) (*http.Response, error) { + // Convert request body to JSON + jsonBody, err := json.Marshal(body) + if err != nil { + return nil, err + } + + req, err := c.newRequest(http.MethodPost, path, nil, bytes.NewReader(jsonBody)) + if err != nil { + return nil, err + } + + return c.sendRequest(req) +} + +// Put sends a PUT request to the specified path with the given query parameters and request body. +func (c *Client) Put(path *string, body interface{}) (*http.Response, error) { + // Convert request body to JSON + jsonBody, err := json.Marshal(body) + if err != nil { + return nil, err + } + + req, err := c.newRequest(http.MethodPut, path, nil, bytes.NewReader(jsonBody)) + if err != nil { + return nil, err + } + + return c.sendRequest(req) +} + +// sendRequest sends the specified HTTP request and returns the HTTP response. +func (c *Client) sendRequest(req *http.Request) (*http.Response, error) { + resp, err := c.HttpClient.Do(req) + if err != nil { + return nil, err + } + + // Check for API errors + if resp.StatusCode == http.StatusUnauthorized { + // Regenerate the token and reattempt the request + err := c.Auth.GenerateToken() + if err != nil { + return nil, olerror.NewAuthenticationError("Failed to refresh access token") + } + + // Retry the request + resp, err = c.HttpClient.Do(req) + if err != nil { + return nil, err + } + } + + return resp, nil +} diff --git a/internal/authentication/authenticator.go b/internal/authentication/authenticator.go new file mode 100644 index 0000000..daaca15 --- /dev/null +++ b/internal/authentication/authenticator.go @@ -0,0 +1,152 @@ +package authentication + +import ( + "encoding/base64" + "encoding/json" + "errors" + "fmt" + "net/http" + "os" + "strings" + + olError "github.com/onelogin/onelogin-go-sdk/internal/error" +) + +const ( + TkPath string = "/auth/oauth2/v2/token" + RevokePath string = "/auth/oauth2/revoke" +) + +type Authenticator struct { + accessToken string +} + +func NewAuthenticator() *Authenticator { + return &Authenticator{} +} + +func (a *Authenticator) GenerateToken() error { + // Read & Check environment variables + clientID := os.Getenv("ONELOGIN_CLIENT_ID") + if len(clientID) == 0 { + return olError.NewAuthenticationError("Missing ONELOGIN_CLIENT_ID Env Variable") + } + //fmt.Println("clientID", clientID) + clientSecret := os.Getenv("ONELOGIN_CLIENT_SECRET") + if len(clientSecret) == 0 { + return olError.NewAuthenticationError("Missing ONELOGIN_CLIENT_SECRET Env Variable") + } + + // Construct the authentication URL + authURL := fmt.Sprintf("https://api.onelogin.com%s", TkPath) + + // Create authentication request payload + data := map[string]string{ + "grant_type": "client_credentials", + } + + // Convert payload to JSON + jsonData, err := json.Marshal(data) + if err != nil { + return olError.NewSerializationError("Unable to convert payload to JSON") + } + + // Create HTTP request + req, err := http.NewRequest(http.MethodPost, authURL, strings.NewReader(string(jsonData))) + if err != nil { + return olError.NewRequestError("Failed to create authentication request") + } + + // Add authorization header with base64-encoded credentials + encodedCredentials := base64.StdEncoding.EncodeToString([]byte(fmt.Sprintf("%s:%s", clientID, clientSecret))) + req.Header.Add("Authorization", fmt.Sprintf("Basic %s", encodedCredentials)) + req.Header.Add("Content-Type", "application/json") + + // Send the HTTP request + client := &http.Client{} + resp, err := client.Do(req) + if err != nil { + return olError.NewRequestError("Failed to send authentication request") + } + + // Parse the authentication response + var result map[string]interface{} + err = json.NewDecoder(resp.Body).Decode(&result) + if err != nil { + return olError.NewSerializationError("Failed to read authentication response") + } + + // Check if authentication failed + if resp.StatusCode != http.StatusOK { + return olError.NewAuthenticationError("Authentication failed") + } + + // Extract access token from the response + accessToken, ok := result["access_token"].(string) + if !ok { + return olError.NewAuthenticationError("Authentication Failed at Endpoint") + } + // Store access token + a.accessToken = accessToken + + return nil +} + +func (a *Authenticator) RevokeToken(token, domain *string) error { + // Read environment variables + clientID := os.Getenv("ONELOGIN_CLIENT_ID") + clientSecret := os.Getenv("ONELOGIN_CLIENT_SECRET") + + // Check if required environment variables are missing + if clientID == "" || clientSecret == "" { + return errors.New("missing client ID, client secret, or subdomain") + } + + // Construct the revoke URL + revokeURL := fmt.Sprintf("api.onelogin.com%s", RevokePath) + + // Create revoke request payload + data := struct { + AccessToken string `json:"access_token"` + }{ + AccessToken: *token, + } + + // Convert payload to JSON + jsonData, err := json.Marshal(data) + if err != nil { + return fmt.Errorf("failed to create revocation request: %w", err) + } + + // Create HTTP request + req, err := http.NewRequest("POST", revokeURL, strings.NewReader(string(jsonData))) + if err != nil { + return fmt.Errorf("failed to create revocation request: %w", err) + } + + // Add authorization header with base64-encoded credentials + encodedCredentials := base64.StdEncoding.EncodeToString([]byte(fmt.Sprintf("%s:%s", clientID, clientSecret))) + req.Header.Add("Authorization", fmt.Sprintf("Basic %s", encodedCredentials)) + req.Header.Add("Content-Type", "application/json") + + // Send the HTTP request + client := &http.Client{} + resp, err := client.Do(req) + if err != nil { + return fmt.Errorf("failed to revoke: %w", err) + } + + // Check if revocation failed + if resp.StatusCode != http.StatusOK { + return olError.NewAuthenticationError("Revocation failed") + } + + // Success condition feedback + fmt.Println("Revocation successful") + + return nil +} + +func (a *Authenticator) GetToken() (string, error) { + return a.accessToken, nil +} diff --git a/internal/error/api_error.go b/internal/error/api_error.go new file mode 100644 index 0000000..bd77edb --- /dev/null +++ b/internal/error/api_error.go @@ -0,0 +1,19 @@ +package error + +import "fmt" + +type APIError struct { + Message string + Code int +} + +func (e *APIError) Error() string { + return fmt.Sprintf("API error: %s", e.Message) +} + +func NewAPIError(message string, code int) *APIError { + return &APIError{ + Message: message, + Code: code, + } +} diff --git a/internal/error/authentication_error.go b/internal/error/authentication_error.go new file mode 100644 index 0000000..12ad5fe --- /dev/null +++ b/internal/error/authentication_error.go @@ -0,0 +1,19 @@ +package error + +import ( + "fmt" +) + +type AuthenticationError struct { + Message string +} + +func (e *AuthenticationError) Error() string { + return fmt.Sprintf("Authentication error: %s", e.Message) +} + +func NewAuthenticationError(message string) *AuthenticationError { + return &AuthenticationError{ + Message: message, + } +} diff --git a/internal/error/request_error.go b/internal/error/request_error.go new file mode 100644 index 0000000..aa6f783 --- /dev/null +++ b/internal/error/request_error.go @@ -0,0 +1,19 @@ +package error + +import ( + "fmt" +) + +type RequestError struct { + Message string +} + +func (e RequestError) Error() string { + return fmt.Sprintf("Request error: %s", e.Message) +} + +func NewRequestError(message string) *RequestError { + return &RequestError{ + Message: message, + } +} diff --git a/internal/error/sdk_error.go b/internal/error/sdk_error.go new file mode 100644 index 0000000..1e4510d --- /dev/null +++ b/internal/error/sdk_error.go @@ -0,0 +1,17 @@ +package error + +import "fmt" + +type SDKError struct { + Message string +} + +func (e SDKError) Error() string { + return fmt.Sprintf("SDK error: %s", e.Message) +} + +func NewSDKError(message string) error { + return SDKError{ + Message: message, + } +} diff --git a/internal/error/serialization_error.go b/internal/error/serialization_error.go new file mode 100644 index 0000000..5c8320b --- /dev/null +++ b/internal/error/serialization_error.go @@ -0,0 +1,19 @@ +package error + +import ( + "fmt" +) + +type SerializationError struct { + Message string +} + +func (e SerializationError) Error() string { + return fmt.Sprintf("Serialization error: %s", e.Message) +} + +func NewSerializationError(message string) error { + return SerializationError{ + Message: message, + } +} diff --git a/internal/models/app.go b/internal/models/app.go new file mode 100644 index 0000000..1cf01c0 --- /dev/null +++ b/internal/models/app.go @@ -0,0 +1,139 @@ +package models + +type App struct { + ID *int32 `json:"id,omitempty"` + ConnectorID *int32 `json:"connector_id"` + Name *string `json:"name"` + Description *string `json:"description,omitempty"` + Notes *string `json:"notes,omitempty"` + PolicyID *int `json:"policy_id,omitempty"` + BrandID *int `json:"brand_id,omitempty"` + IconURL *string `json:"icon_url,omitempty"` + Visible *bool `json:"visible,omitempty"` + AuthMethod *int `json:"auth_method,omitempty"` + TabID *int `json:"tab_id,omitempty"` + CreatedAt *string `json:"created_at,omitempty"` + UpdatedAt *string `json:"updated_at,omitempty"` + RoleIDs *[]int `json:"role_ids,omitempty"` + AllowAssumedSignin *bool `json:"allow_assumed_signin,omitempty"` + Provisioning *Provisioning `json:"provisioning,omitempty"` + SSO interface{} `json:"sso,omitempty"` + Configuration interface{} `json:"configuration,omitempty"` + Parameters *map[string]Parameter `json:"parameters,omitempty"` + EnforcementPoint *EnforcementPoint `json:"enforcement_point,omitempty"` +} + +type Provisioning struct { + Enabled bool `json:"enabled"` +} + +type SSO interface { + ValidateSSO() error +} + +type SSOOpenId struct { + ClientID string `json:"client_id"` +} + +type SSOSAML struct { + MetadataURL string `json:"metadata_url"` + AcsURL string `json:"acs_url"` + SlsURL string `json:"sls_url"` + Issuer string `json:"issuer"` + Certificate Certificate `json:"certificate"` +} + +type Certificate struct { + ID int `json:"id"` + Name string `json:"name"` + Value string `json:"value"` +} + +type ConfigurationOpenId struct { + RedirectURI string `json:"redirect_uri"` + LoginURL string `json:"login_url"` + OidcApplicationType int `json:"oidc_application_type"` + TokenEndpointAuthMethod int `json:"token_endpoint_auth_method"` + AccessTokenExpirationMinutes int `json:"access_token_expiration_minutes"` + RefreshTokenExpirationMinutes int `json:"refresh_token_expiration_minutes"` +} + +type ConfigurationSAML struct { + ProviderArn interface{} `json:"provider_arn"` + SignatureAlgorithm string `json:"signature_algorithm"` + CertificateID int `json:"certificate_id"` +} + +type Parameter struct { + Values interface{} `json:"values"` + UserAttributeMappings interface{} `json:"user_attribute_mappings"` + ProvisionedEntitlements bool `json:"provisioned_entitlements"` + SkipIfBlank bool `json:"skip_if_blank"` + ID int `json:"id"` + DefaultValues interface{} `json:"default_values"` + AttributesTransformations interface{} `json:"attributes_transformations"` + Label string `json:"label"` + UserAttributeMacros interface{} `json:"user_attribute_macros"` + IncludeInSamlAssertion bool `json:"include_in_saml_assertion"` +} + +type EnforcementPoint struct { + RequireSitewideAuthentication bool `json:"require_sitewide_authentication"` + Conditions *Conditions `json:"conditions,omitempty"` + SessionExpiryFixed Duration `json:"session_expiry_fixed"` + SessionExpiryInactivity Duration `json:"session_expiry_inactivity"` + Permissions string `json:"permissions"` + Token string `json:"token,omitempty"` + Target string `json:"target"` + Resources []Resource `json:"resources"` + ContextRoot string `json:"context_root"` + UseTargetHostHeader bool `json:"use_target_host_header"` + Vhost string `json:"vhost"` + LandingPage string `json:"landing_page"` + CaseSensitive bool `json:"case_sensitive"` +} + +type Conditions struct { + Type string `json:"type"` + Roles []string `json:"roles"` +} + +type Duration struct { + Value int `json:"value"` + Unit int `json:"unit"` +} + +type Resource struct { + Path string `json:"path"` + RequireAuth string `json:"require_authentication"` + Permissions string `json:"permissions"` + Conditions *string `json:"conditions,omitempty"` + IsPathRegex *bool `json:"is_path_regex,omitempty"` + ResourceID int `json:"resource_id,omitempty"` +} + +const ( + UnitSeconds = 0 + UnitMinutes = 1 + UnitHours = 2 +) + +type AppQuery struct { + Limit string `json:"limit,omitempty"` + Page string `json:"page,omitempty"` + Cursor string `json:"cursor,omitempty"` + Name *string `json:"name,omitempty"` + ConnectorID *int `json:"connector_id,omitempty"` + AuthMethod *int `json:"auth_method,omitempty"` +} + +func (q *AppQuery) GetKeyValidators() map[string]func(interface{}) bool { + return map[string]func(interface{}) bool{ + "limit": validateString, + "page": validateString, + "cursor": validateString, + "name": validateString, + "connector_id": validateInt, + "auth_method": validateInt, + } +} diff --git a/internal/models/app_rule.go b/internal/models/app_rule.go new file mode 100644 index 0000000..9ab8e41 --- /dev/null +++ b/internal/models/app_rule.go @@ -0,0 +1,49 @@ +package models + +type Condition struct { + Source string `json:"source"` + Operator string `json:"operator"` + Value string `json:"value"` +} + +type Action struct { + Action string `json:"action"` + Value []string `json:"value,omitempty"` + Expression string `json:"expression,omitempty"` + Scriplet string `json:"scriplet,omitempty"` + Macro string `json:"macro,omitempty"` +} + +type AppRule struct { + AppID int `json:"app_id"` + Name string `json:"name"` + Enabled bool `json:"enabled"` + Match string `json:"match"` + Position int `json:"position,omitempty"` + Conditions []Condition `json:"conditions"` + Actions []Action `json:"actions"` +} + +type AppRuleQuery struct { + Limit string `json:"limit,omitempty"` + Page string `json:"page,omitempty"` + Cursor string `json:"cursor,omitempty"` + Enabled bool `json:"enabled,omitempty"` + HasCondition *string `json:"has_condition,omitempty"` + HasConditionType *string `json:"has_condition_type,omitempty"` + HasAction *string `json:"has_action,omitempty"` + HasActionType *string `json:"has_action_type,omitempty"` +} + +func (q *AppRuleQuery) GetKeyValidators() map[string]func(interface{}) bool { + return map[string]func(interface{}) bool{ + "limit": validateString, + "page": validateString, + "cursor": validateString, + "enabled": validateBool, + "has_condition": validateString, + "has_condition_type": validateString, + "has_action": validateString, + "has_action_type": validateString, + } +} diff --git a/internal/models/auth_server.go b/internal/models/auth_server.go new file mode 100644 index 0000000..c4eede6 --- /dev/null +++ b/internal/models/auth_server.go @@ -0,0 +1,90 @@ +package models + +type AuthServerQuery struct { + Name string `json:"name,omitempty"` + Limit string `json:"limit,omitempty"` + Page string `json:"page,omitempty"` + Cursor string `json:"cursor,omitempty"` +} + +type AuthServer struct { + ID *int32 `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Configuration *AuthServerConfiguration `json:"configuration,omitempty"` +} + +type AuthServerConfiguration struct { + ResourceIdentifier *string `json:"resource_identifier,omitempty"` + Audiences []string `json:"audiences,omitempty"` + AccessTokenExpirationMinutes *int32 `json:"access_token_expiration_minutes,omitempty"` + RefreshTokenExpirationMinutes *int32 `json:"refresh_token_expiration_minutes,omitempty"` +} + +type ClientAppsQuery struct { + ID int `json:"id,omitempty"` +} + +type ClientApp struct { + ID *int32 `json:"app_id,omitempty"` + AuthServerID *int32 `json:"auth_server_id,omitempty"` + APIAuthID *int32 `json:"api_auth_id,omitempty"` + Name *string `json:"name,omitempty"` + Scopes []Scope `json:"scopes,omitempty"` + ScopeIDs []int32 `json:"scope_ids,omitempty"` +} + +type ScopesQuery struct { + ID int `json:"id,omitempty"` +} + +type Scope struct { + ID *int32 `json:"id,omitempty"` + AuthServerID *int32 `json:"auth_server_id,omitempty"` + Value *string `json:"value,omitempty"` + Description *string `json:"description,omitempty"` +} + +type AccessTokenClaimsQuery struct { + ID int `json:"id,omitempty"` +} + +type AccessTokenClaim struct { + ID *int32 `json:"id,omitempty"` + AuthServerID *int32 `json:"auth_server_id,omitempty"` + Label *string `json:"label,omitempty"` + UserAttributeMappings *string `json:"user_attribute_mappings,omitempty"` + UserAttributeMacros *string `json:"user_attribute_macros,omitempty"` + AttributeTransformations *string `json:"attribute_transformations,omitempty"` + SkipIfBlank *bool `json:"skip_if_blank,omitempty"` + Values []string `json:"values,omitempty"` + DefaultValues *string `json:"default_values,omitempty"` + ProvisionedEntitlements *bool `json:"provisioned_entitlements,omitempty"` +} + +func (q *AuthServerQuery) GetKeyValidators() map[string]func(interface{}) bool { + return map[string]func(interface{}) bool{ + "name": validateString, + "limit": validateString, + "page": validateString, + "cursor": validateString, + } +} + +func (q *ClientAppsQuery) GetKeyValidators() map[string]func(interface{}) bool { + return map[string]func(interface{}) bool{ + "auth_server_id": validateString, + } +} + +func (q *ScopesQuery) GetKeyValidators() map[string]func(interface{}) bool { + return map[string]func(interface{}) bool{ + "auth_server_id": validateString, + } +} + +func (q *AccessTokenClaimsQuery) GetKeyValidators() map[string]func(interface{}) bool { + return map[string]func(interface{}) bool{ + "auth_server_id": validateString, + } +} diff --git a/internal/models/group.go b/internal/models/group.go new file mode 100644 index 0000000..2c43c17 --- /dev/null +++ b/internal/models/group.go @@ -0,0 +1,7 @@ +package models + +type Group struct { + ID int `json:"id"` + Name string `json:"name"` + Reference *string `json:"reference"` +} diff --git a/internal/models/mfa.go b/internal/models/mfa.go new file mode 100644 index 0000000..c6c2e43 --- /dev/null +++ b/internal/models/mfa.go @@ -0,0 +1,37 @@ +package models + +type GenerateSAMLTokenRequest struct { + UsernameOrEmail string `json:"username_or_email"` + Password string `json:"password"` + AppID string `json:"app_id"` + Subdomain string `json:"subdomain"` + IPAddress string `json:"ip_address,omitempty"` +} + +type VerifyMFATokenRequest struct { + AppID string `json:"app_id"` + DeviceID string `json:"device_id"` + StateToken string `json:"state_token"` + OTPToken string `json:"otp_token,omitempty"` + DoNotNotify bool `json:"do_not_notify,omitempty"` +} + +type EnrollFactorRequest struct { + FactorID int `json:"factor_id"` + DisplayName string `json:"display_name"` + ExpiresIn string `json:"expires_in,omitempty"` + Verified bool `json:"verified,omitempty"` + RedirectTo string `json:"redirect_to,omitempty"` + CustomMessage string `json:"custom_message,omitempty"` +} +type ActivateFactorRequest struct { + DeviceID string `json:"device_id"` + ExpiresIn string `json:"expires_in,omitempty"` + RedirectTo string `json:"redirect_to,omitempty"` + CustomMessage string `json:"custom_message,omitempty"` +} + +type GenerateMFATokenRequest struct { + ExpiresIn string `json:"expires_in,omitempty"` + Reusable bool `json:"reusable,omitempty"` +} diff --git a/internal/models/privilege.go b/internal/models/privilege.go new file mode 100644 index 0000000..a6960b7 --- /dev/null +++ b/internal/models/privilege.go @@ -0,0 +1,39 @@ +package models + +// PrivilegeQuery represents available query parameters +type PrivilegeQuery struct { + Limit string `json:"limit,omitempty"` + Page string `json:"page,omitempty"` + Cursor string `json:"cursor,omitempty"` +} + +// Privilege represents the Role resource in OneLogin +type Privilege struct { + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Privilege *PrivilegeData `json:"privilege,omitempty"` + UserIDs []int `json:"user_ids,omitempty"` + RoleIDs []int `json:"role_ids,omitempty"` +} + +// PrivilegeData represents the group of statements and statement versions pertinent to a privilege +type PrivilegeData struct { + Version *string `json:"version,omitempty"` + Statement []StatementData `json:"Statement"` +} + +// StatementData represents the actions and scope of a given privilege +type StatementData struct { + Effect *string `json:"Effect,omitempty"` + Action []string `json:"Action"` + Scope []string `json:"Scope"` +} + +func (p *Privilege) GetKeyValidators() map[string]func(interface{}) bool { + return map[string]func(interface{}) bool{ + "limit": validateString, + "page": validateString, + "cursor": validateString, + } +} diff --git a/internal/models/role.go b/internal/models/role.go new file mode 100644 index 0000000..533faaa --- /dev/null +++ b/internal/models/role.go @@ -0,0 +1,25 @@ +package models + +// RoleQuery represents available query parameters +type RoleQuery struct { + Limit string `json:"limit,omitempty"` + Page string `json:"page,omitempty"` + Cursor string `json:"cursor,omitempty"` +} + +// Role represents the Role resource in OneLogin +type Role struct { + ID *int32 `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Admins []int32 `json:"admins,omitempty"` + Apps []int32 `json:"apps,omitempty"` + Users []int32 `json:"users,omitempty"` +} + +func (r *Role) GetKeyValidators() map[string]func(interface{}) bool { + return map[string]func(interface{}) bool{ + "limit": validateString, + "page": validateString, + "cursor": validateString, + } +} diff --git a/internal/models/smart_hook.go b/internal/models/smart_hook.go new file mode 100644 index 0000000..6f04246 --- /dev/null +++ b/internal/models/smart_hook.go @@ -0,0 +1,87 @@ +package models + +import ( + "time" +) + +const ( + TypePreAuthentication string = "pre-authentication" + TypeUserMigration string = "user-migration" +) + +const ( + ContextPreAuthentication1_0_0 string = "1.0.0" + ContextPreAuthentication1_1_0 string = "1.1.0" + + ContextUserMigration1_0_0 string = "1.0.0" +) + +const ( + StatusReady string = "ready" + StatusCreateQueued string = "create-queued" + StatusCreateRunning string = "create-running" + StatusCreateFailed string = "create-failed" + StatusUpdateQueued string = "update-queued" + StatusUpdateRunning string = "update-running" + StatusUpdateFailed string = "update-failed" +) + +// SmartHookQuery represents available query parameters +type SmartHookQuery struct { + Limit string `json:"limit,omitempty"` + Page string `json:"page,omitempty"` + Cursor string `json:"cursor,omitempty"` + Type string `json:"type,omitempty"` +} + +// SmartHook represents a OneLogin SmartHook with associated resource data +type SmartHook struct { + ID *string `json:"id,omitempty"` + Type *string `json:"type,omitempty"` + Disabled *bool `json:"disabled,omitempty"` + Timeout *int32 `json:"timeout,omitempty"` + EnvVars []EnvVar `json:"env_vars"` + Runtime *string `json:"runtime,omitempty"` + ContextVersion *string `json:"context_version,omitempty"` + Retries *int32 `json:"retries,omitempty"` + Options *Options `json:"options,omitempty"` + Packages map[string]string `json:"packages"` + Function *string `json:"function,omitempty"` + Status *string `json:"status,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` + UpdatedAt *time.Time `json:"updated_at,omitempty"` + Conditions []Condition `json:"conditions,omitempty"` +} + +// SmartHookOptions represents the options to be associated with a SmartHook +type Options struct { + RiskEnabled *bool `json:"risk_enabled,omitempty"` + MFADeviceInfoEnabled *bool `json:"mfa_device_info_enabled,omitempty"` + LocationEnabled *bool `json:"location_enabled,omitempty"` +} + +// SmartHookEnvVarQuery represents available query parameters +type SmartHookEnvVarQuery struct { + Limit string `json:"limit,omitempty"` + Page string `json:"page,omitempty"` + Cursor string `json:"cursor,omitempty"` + Type string `json:"type,omitempty"` +} + +// EnvVar represents an Environment Variable to be associated with a SmartHook +type EnvVar struct { + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Value *string `json:"value,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` + UpdatedAt *time.Time `json:"updated_at,omitempty"` +} + +func (s *SmartHook) GetKeyValidators() map[string]func(interface{}) bool { + return map[string]func(interface{}) bool{ + "limit": validateString, + "page": validateString, + "cursor": validateString, + "type": validateString, + } +} diff --git a/internal/models/user.go b/internal/models/user.go new file mode 100644 index 0000000..587a49e --- /dev/null +++ b/internal/models/user.go @@ -0,0 +1,118 @@ +package models + +import "time" + +const ( + StateUnapproved int32 = iota + StateApproved + StateRejected + StateUnlicensed +) + +const ( + StatusUnActivated int32 = iota + StatusActive // Only users assigned this status can log in to OneLogin. + StatusSuspended + StatusLocked + StatusPasswordExpired + StatusAwaitingPasswordReset // The user is required to reset their password. + statusUnused6 // There is not user status with a value of 6. + StatusPasswordPending // The user has not yet set their password. + StatusSecurityQuestionsRequired // The user has not yet set their security questions. +) + +// UserQuery represents available query parameters +type UserQuery struct { + Limit string `json:"limit,omitempty"` + Page string `json:"page,omitempty"` + Cursor string `json:"cursor,omitempty"` + CreatedSince *time.Time `json:"created_since,omitempty"` + CreatedUntil *time.Time `json:"created_until,omitempty"` + UpdatedSince *time.Time `json:"updated_since,omitempty"` + UpdatedUntil *time.Time `json:"updated_until,omitempty"` + LastLoginSince *time.Time `json:"last_login_since,omitempty"` + LastLoginUntil *time.Time `json:"last_login_until,omitempty"` + Firstname *string `json:"firstname,omitempty"` + Lastname *string `json:"lastname,omitempty"` + Email *string `json:"email,omitempty"` + Username *string `json:"username,omitempty"` + Samaccountname *string `json:"samaccountname,omitempty"` + DirectoryID *string `json:"directory_id,omitempty"` + ExternalID *string `json:"external_id,omitempty"` + AppID *string `json:"app_id,omitempty"` + UserIDs *string `json:"user_ids,omitempty"` + Fields *string `json:"fields,omitempty"` +} + +// User represents a OneLogin User +type User struct { + Firstname *string `json:"firstname,omitempty"` + Lastname *string `json:"lastname,omitempty"` + Username *string `json:"username,omitempty"` + Email *string `json:"email,omitempty"` + DistinguishedName *string `json:"distinguished_name,omitempty"` + Samaccountname *string `json:"samaccountname,omitempty"` + UserPrincipalName *string `json:"userprincipalname,omitempty"` + MemberOf *string `json:"member_of,omitempty"` + Phone *string `json:"phone,omitempty"` + Password *string `json:"password,omitempty"` + PasswordConfirmation *string `json:"password_confirmation,omitempty"` + PasswordAlgorithm *string `json:"password_algorithm,omitempty"` + Salt *string `json:"salt,omitempty"` + Title *string `json:"title,omitempty"` + Company *string `json:"company,omitempty"` + Department *string `json:"department,omitempty"` + Comment *string `json:"comment,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` + UpdatedAt *time.Time `json:"updated_at,omitempty"` + ActivatedAt *time.Time `json:"activated_at,omitempty"` + LastLogin *time.Time `json:"last_login,omitempty"` + PasswordChangedAt *time.Time `json:"password_changed_at,omitempty"` + LockedUntil *time.Time `json:"locked_until,omitempty"` + InvitationSentAt *time.Time `json:"invitation_sent_at,omitempty"` + State *int32 `json:"state,omitempty"` + Status *int32 `json:"status,omitempty"` + InvalidLoginAttempts *int32 `json:"invalid_login_attempts,omitempty"` + GroupID *int32 `json:"group_id,omitempty"` + DirectoryID *int32 `json:"directory_id,omitempty"` + TrustedIDPID *int32 `json:"trusted_idp_id,omitempty"` + ManagerADID *int32 `json:"manager_ad_id,omitempty"` + ManagerUserID *int32 `json:"manager_user_id,omitempty"` + ExternalID *int32 `json:"external_id,omitempty"` + ID *int32 `json:"id,omitempty"` + CustomAttributes map[string]interface{} `json:"custom_attributes,omitempty"` +} + +func (q *UserQuery) GetKeyValidators() map[string]func(interface{}) bool { + return map[string]func(interface{}) bool{ + "limit": validateString, + "page": validateString, + "cursor": validateString, + "createdSince": validateTime, + "createdUntil": validateTime, + "updatedSince": validateTime, + "updatedUntil": validateTime, + "lastLoginSince": validateTime, + "lastLoginUntil": validateTime, + "firstname": validateString, + "lastname": validateString, + "email": validateString, + "username": validateString, + "samaccountname": validateString, + "directoryID": validateString, + "externalID": validateString, + "appID": validateString, + "userIDs": validateString, + "fields": validateString, + } +} + +// UserApp is the contract for a users app. +type UserApp struct { + ID *int32 `json:"id,omitempty"` + IconURL *string `json:"icon_url,omitempty"` + LoginID *int32 `json:"login_id,omitempty"` + ProvisioningStatus *string `json:"provisioning_status,omitempty"` + ProvisioningState *string `json:"provisioning_state,omitempty"` + ProvisioningEnabled *bool `json:"provisioning_enabled,omitempty"` +} diff --git a/internal/models/user_mapping.go b/internal/models/user_mapping.go new file mode 100644 index 0000000..7df23c3 --- /dev/null +++ b/internal/models/user_mapping.go @@ -0,0 +1,50 @@ +package models + +// UserMappingsQuery represents available query parameters for mappings +type UserMappingsQuery struct { + Limit string `json:"limit,omitempty"` + Page string `json:"page,omitempty"` + Cursor string `json:"cursor,omitempty"` + HasCondition string `json:"has_condition,omitempty"` + HasConditionType string `json:"has_condition_type,omitempty"` + HasAction string `json:"has_action,omitempty"` + HasActionType string `json:"has_action_type,omitempty"` + Enabled string `json:"enabled,omitempty"` +} + +// UserMapping is the contract for User Mappings. +type UserMapping struct { + ID *int32 `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Match *string `json:"match,omitempty"` + Enabled *bool `json:"enabled,omitempty"` + Position *int32 `json:"position,omitempty"` + Conditions []UserMappingConditions `json:"conditions"` + Actions []UserMappingActions `json:"actions"` +} + +// UserMappingConditions is the contract for User Mapping Conditions. +type UserMappingConditions struct { + Source *string `json:"source,omitempty"` + Operator *string `json:"operator,omitempty"` + Value *string `json:"value,omitempty"` +} + +// UserMappingActions is the contract for User Mapping Actions. +type UserMappingActions struct { + Action *string `json:"action,omitempty"` + Value []string `json:"value,omitempty"` +} + +func (u *UserMapping) GetKeyValidators() map[string]func(interface{}) bool { + return map[string]func(interface{}) bool{ + "limit": validateString, + "page": validateString, + "cursor": validateString, + "has_condition": validateString, + "has_condition_id": validateString, + "has_action": validateString, + "has_action_id": validateString, + "enabled": validateBool, + } +} diff --git a/internal/models/validation.go b/internal/models/validation.go new file mode 100644 index 0000000..c8358eb --- /dev/null +++ b/internal/models/validation.go @@ -0,0 +1,33 @@ +package models + +import ( + "time" +) + +type Queryable interface { + GetKeyValidators() map[string]func(interface{}) bool +} + +// validateString checks if the provided value is a string. +func validateString(val interface{}) bool { + _, ok := val.(string) + return ok +} + +// validateTime checks if the provided value is a time.Time. +func validateTime(val interface{}) bool { + _, ok := val.(*time.Time) + return ok +} + +// validateInt checks if the provided value is an int. +func validateInt(val interface{}) bool { + _, ok := val.(int) + return ok +} + +// validateBool checks if the provided value is a bool. +func validateBool(val interface{}) bool { + _, ok := val.(bool) + return ok +} diff --git a/internal/utilities/validPaths.go b/internal/utilities/validPaths.go new file mode 100644 index 0000000..236eced --- /dev/null +++ b/internal/utilities/validPaths.go @@ -0,0 +1,107 @@ +package utilities + +// A list of regex patterns for valid paths +var validPaths = []string{ + "^/api/2/api_authorizations$", + "^/api/2/api_authorizations/[0-9]+$", + "^/api/2/api_authorizations/[0-9]+/scopes$", + "^/api/2/api_authorizations/[0-9]+/scopes/[0-9]+$", + "^/api/2/api_authorizations/[0-9]+/claims$", + "^/api/2/api_authorizations/[0-9]+/claims/[0-9]+$", + "^/api/2/api_authorizations/[0-9]+/clients$", + "^/api/2/api_authorizations/[0-9]+/clients/[0-9]+$", + "^/api/1/events$", + "^/api/1/events/[0-9]+$", + "^/api/1/events/types$", + "^/api/1/groups$", + "^/api/1/groups/[0-9]+$", + "^/api/1/invites/get_invite_link$", + "^/api/1/invites/send_invite_link$", + "^/api/1/users$", + "^/api/1/users/[0-9]+$", + "^/api/1/users/[0-9]+/apps$", + "^/api/1/users/[0-9]+/roles$", + "^/api/1/users/set_password_clear_text/[0-9]+$", + "^/api/1/users/set_password_using_salt/[0-9]+$", + "^/api/1/users/custom_attributes$", + "^/api/1/users/[0-9]+/set_custom_attributes$", + "^/api/1/users/[0-9]+/auth_factor$", + "^/api/1/users/[0-9]+/logout$", + "^/api/1/users/[0-9]+/lock_user$", + "^/api/1/users/[0-9]+/otp_devices$", + "^/api/1/users/[0-9]+/mfa_token$", + "^/api/1/users/[0-9]+/add_roles$", + "^/api/1/users/[0-9]+/set_state$", + "^/api/1/users/[0-9]+/remove_roles$", + "^/api/1/users/[0-9]+/otp_devices/[0-9]+$", + "^/api/1/users/[0-9]+/otp_devices/[0-9]+/verify$", + "^/api/1/users/[0-9]+/otp_devices/[0-9]+/trigger$", + "^/api/1/privileges$", + "^/api/1/privileges/[0-9]+$", + "^/api/1/privileges/[0-9]+/roles$", + "^/api/1/privileges/[0-9]+/roles/[0-9]+$", + "^/api/1/privileges/[0-9]+/users$", + "^/api/1/privileges/[0-9]+/users/[0-9]+$", + "^/api/1/roles$", + "^/api/1/roles/[0-9]+$", + "^/api/1/saml_assertion$", + "^/api/1/saml_assertion/verify_factor$", + "^/api/2/saml_assertion$", + "^/api/2/saml_assertion/verify_factor$", + "^/api/2/mappings$", + "^/api/2/mappings/[0-9]+$", + "^/api/2/mappings/conditions$", + "^/api/2/mappings/conditions/[a-zA-Z0-9]+/operators$", + "^/api/2/mappings/conditions/[a-zA-Z0-9]+/values$", + "^/api/2/mappings/actions$", + "^/api/2/mappings/actions/[a-zA-Z0-9]+/values$", + "^/api/2/mappings/sort$", + "^/api/2/apps$", + "^/api/2/apps/[0-9]+$", + "^/api/2/apps/[0-9]+/parameters/[a-zA-Z0-9]+$", + "^/api/2/apps/[0-9]+/users$", + "^/api/2/apps/[0-9]+/rules$", + "^/api/2/apps/[0-9]+/rules/[a-zA-Z0-9]+$", + "^/api/2/apps/[0-9]+/rules/conditions$", + "^/api/2/apps/[0-9]+/rules/conditions/[a-zA-Z0-9]+/operators$", + "^/api/2/apps/[0-9]+/rules/conditions/[a-zA-Z0-9]+/values$", + "^/api/2/apps/[0-9]+/rules/actions$", + "^/api/2/apps/[0-9]+/rules/actions/[a-zA-Z0-9]+/values$", + "^/api/2/apps/[0-9]+/rules/sort$", + "^/api/2/connectors$", + "^/api/2/risk/rules$", + "^/api/2/risk/rules/[0-9]+$", + "^/api/2/risk/events$", + "^/api/2/risk/scores$", + "^/api/2/risk/verify$", + "^/api/2/mfa/users/[0-9]+/registrations/[0-9]+$", + "^/api/2/mfa/users/[0-9]+/registrations$", + "^/api/2/mfa/users/[0-9]+/devices$", + "^/api/2/mfa/users/[0-9]+/devices/[a-zA-Z0-9]+$", + "^/api/2/mfa/users/[0-9]+/verifications/[a-zA-Z0-9]+$", + "^/api/2/mfa/users/[0-9]+/verifications$", + "^/api/2/mfa/users/[0-9]+/factors$", + "^/api/2/mfa/users/[0-9]+/mfa_token$", + "^/api/2/roles$", + "^/api/2/roles/[0-9]+$", + "^/api/2/roles/[0-9]+/apps$", + "^/api/2/roles/[0-9]+/users$", + "^/api/2/roles/[0-9]+/admins$", + "^/api/2/hooks$", + "^/api/2/hooks/[0-9]+$", + "^/api/2/hooks/[0-9]+/logs$", + "^/api/2/hooks/envs$", + "^/api/2/hooks/envs/[a-zA-Z0-9]+$", + "^/api/2/users$", + "^/api/2/users/[0-9]+$", + "^/api/2/users/[0-9]+/apps$", + "^/api/2/branding/brands$", + "^/api/2/branding/brands/[0-9]+$", + "^/api/2/branding/brands/[0-9]+/templates$", + "^/api/2/branding/brands/[0-9]+/templates/[0-9]+$", + "^/api/2/branding/brands/[0-9]+/apps$", + "^/api/2/branding/email_settings$", + "^/api/2/branding/email_settings/test$", + "^/api/2/branding/brands/[0-9]+/templates/[a-zA-Z]+/[a-zA-Z]+$", + "^/api/2/branding/brands/master/templates/[a-zA-Z]+$", +} diff --git a/internal/utilities/validators.go b/internal/utilities/validators.go new file mode 100644 index 0000000..6a90db8 --- /dev/null +++ b/internal/utilities/validators.go @@ -0,0 +1,53 @@ +package utilities + +import ( + "reflect" + "regexp" + "strings" +) + +// ValidateQueryParams validates the query parameters based on the provided validators. +func ValidateQueryParams(query interface{}, validators map[string]func(interface{}) bool) bool { + queryValue := reflect.ValueOf(query) + if queryValue.Kind() == reflect.Ptr { + queryValue = queryValue.Elem() + } + queryType := queryValue.Type() + + for i := 0; i < queryValue.NumField(); i++ { + fieldValue := queryValue.Field(i) + fieldType := queryType.Field(i) + + // Skip non-pointer fields + if fieldValue.Kind() != reflect.Ptr { + continue + } + + // Skip nil fields + if fieldValue.IsNil() { + continue + } + + fieldName := strings.Split(fieldType.Tag.Get("json"), ",")[0] + + validator, exists := validators[fieldName] + if exists { + if !validator(fieldValue.Interface()) { + return false + } + } + } + + return true +} + +// Check if the constructed path matches any of the allowed path patterns +func IsPathValid(path string) bool { + for _, pattern := range validPaths { + match, _ := regexp.MatchString(pattern, path) + if match { + return true + } + } + return false +} diff --git a/internal/utilities/web.go b/internal/utilities/web.go new file mode 100644 index 0000000..a736687 --- /dev/null +++ b/internal/utilities/web.go @@ -0,0 +1,118 @@ +package utilities + +import ( + "encoding/json" + "fmt" + "io/ioutil" + "net/http" + "net/url" + "strings" + + olerror "github.com/onelogin/onelogin-go-sdk/internal/error" +) + +// receive http response, check error code status, if good return json of resp.Body +// else return error +func CheckHTTPResponse(resp *http.Response) (interface{}, error) { + // Check if the request was successful + if resp.StatusCode != http.StatusOK && resp.StatusCode != http.StatusCreated { + return nil, fmt.Errorf("request failed with status: %d", resp.StatusCode) + } + + // Read the response body + body, err := ioutil.ReadAll(resp.Body) + if err != nil { + return nil, fmt.Errorf("failed to read response body: %w", err) + } + + // Close the response body + err = resp.Body.Close() + if err != nil { + return nil, fmt.Errorf("failed to close response body: %w", err) + } + + // Try to unmarshal the response body into a map[string]interface{} or []interface{} + var data interface{} + bodyStr := string(body) + //log.Printf("Response body: %s\n", bodyStr) + if strings.HasPrefix(bodyStr, "[") { + var slice []interface{} + err = json.Unmarshal(body, &slice) + if err != nil { + return nil, fmt.Errorf("failed to unmarshal response body into []interface{}: %w", err) + } + data = slice + } else if strings.HasPrefix(bodyStr, "{") { + var dict map[string]interface{} + err = json.Unmarshal(body, &dict) + if err != nil { + return nil, fmt.Errorf("failed to unmarshal response body into map[string]interface{}: %w", err) + } + data = dict + } else { + data = bodyStr + } + + //log.Printf("Response body unmarshaled successfully: %v\n", data) + return data, nil +} + +func BuildAPIPath(parts ...interface{}) (string, error) { + var path string + for _, part := range parts { + switch p := part.(type) { + case string: + path += "/" + p + case int: + path += fmt.Sprintf("/%d", p) + default: + // Handle other types if needed + return path, olerror.NewSDKError("Unsupported path type") + } + } + + // Check if the path is valid + if !IsPathValid(path) { + return path, olerror.NewSDKError("Invalid path") + } + + return path, nil +} + +// AddQueryToPath adds the model as a JSON-encoded query parameter to the path and returns the new path. +func AddQueryToPath(path string, query interface{}) (string, error) { + if query == nil { + return path, nil + } + + // Convert query parameters to URL-encoded string + values, err := queryToValues(query) + if err != nil { + return "", err + } + + // Append query parameters to path + if values.Encode() != "" { + path += "?" + values.Encode() + } + + return path, nil +} + +func queryToValues(query interface{}) (url.Values, error) { + values := url.Values{} + + // Convert query parameters to URL-encoded string + if query != nil { + queryBytes, err := json.Marshal(query) + if err != nil { + return nil, err + } + err = json.Unmarshal(queryBytes, &values) + if err != nil { + return nil, err + } + } + + return values, nil +} diff --git a/model_action_obj.go b/model_action_obj.go deleted file mode 100644 index 8cabca9..0000000 --- a/model_action_obj.go +++ /dev/null @@ -1,164 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the ActionObj type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ActionObj{} - -// ActionObj struct for ActionObj -type ActionObj struct { - // The action to apply - Action *string `json:"action,omitempty"` - // Only applicable to provisioned and set_* actions. Items in the array will be a plain text string or valid value for the selected action. - Value []string `json:"value,omitempty"` -} - -// NewActionObj instantiates a new ActionObj 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 NewActionObj() *ActionObj { - this := ActionObj{} - return &this -} - -// NewActionObjWithDefaults instantiates a new ActionObj 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 NewActionObjWithDefaults() *ActionObj { - this := ActionObj{} - return &this -} - -// GetAction returns the Action field value if set, zero value otherwise. -func (o *ActionObj) GetAction() string { - if o == nil || isNil(o.Action) { - var ret string - return ret - } - 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. -func (o *ActionObj) GetActionOk() (*string, bool) { - if o == nil || isNil(o.Action) { - return nil, false - } - return o.Action, true -} - -// HasAction returns a boolean if a field has been set. -func (o *ActionObj) HasAction() bool { - if o != nil && !isNil(o.Action) { - return true - } - - return false -} - -// SetAction gets a reference to the given string and assigns it to the Action field. -func (o *ActionObj) SetAction(v string) { - o.Action = &v -} - -// GetValue returns the Value field value if set, zero value otherwise. -func (o *ActionObj) GetValue() []string { - if o == nil || isNil(o.Value) { - var ret []string - return ret - } - return o.Value -} - -// GetValueOk returns a tuple with the Value field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ActionObj) GetValueOk() ([]string, bool) { - if o == nil || isNil(o.Value) { - return nil, false - } - return o.Value, true -} - -// HasValue returns a boolean if a field has been set. -func (o *ActionObj) HasValue() bool { - if o != nil && !isNil(o.Value) { - return true - } - - return false -} - -// SetValue gets a reference to the given []string and assigns it to the Value field. -func (o *ActionObj) SetValue(v []string) { - o.Value = v -} - -func (o ActionObj) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ActionObj) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Action) { - toSerialize["action"] = o.Action - } - if !isNil(o.Value) { - toSerialize["value"] = o.Value - } - return toSerialize, nil -} - -type NullableActionObj struct { - value *ActionObj - isSet bool -} - -func (v NullableActionObj) Get() *ActionObj { - return v.value -} - -func (v *NullableActionObj) Set(val *ActionObj) { - v.value = val - v.isSet = true -} - -func (v NullableActionObj) IsSet() bool { - return v.isSet -} - -func (v *NullableActionObj) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableActionObj(val *ActionObj) *NullableActionObj { - return &NullableActionObj{value: val, isSet: true} -} - -func (v NullableActionObj) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableActionObj) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_activate_mfa_factors_request.go b/model_activate_mfa_factors_request.go deleted file mode 100644 index 2b404dc..0000000 --- a/model_activate_mfa_factors_request.go +++ /dev/null @@ -1,201 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the ActivateMfaFactorsRequest type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ActivateMfaFactorsRequest{} - -// ActivateMfaFactorsRequest struct for ActivateMfaFactorsRequest -type ActivateMfaFactorsRequest struct { - // Optional. Sets the window of time in seconds that the factor must be verified within. Defaults to 120 seconds (2 minutes). Max 900 seconds (15 minutes). - StateTokenExpiresIn *int32 `json:"state_token_expires_in,omitempty"` - // Optional. Defaults to false. Only applies to SMS factor. When set to `true` a 6 digit numeric code will be sent to the user instead of the standard code which is alphanumeric. - NumericSmsOtp *bool `json:"numeric_sms_otp,omitempty"` - // Optional. Only applies to SMS factor. A message template that will be sent via SMS. Max length of the message after template items are inserted is 160 characters. The following template variables can be included in the message. - {{otp_code}} - The security code. - {{expiration}} - The number of minutes until the one time code expires. - SmsMessage *string `json:"sms_message,omitempty"` -} - -// NewActivateMfaFactorsRequest instantiates a new ActivateMfaFactorsRequest 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 NewActivateMfaFactorsRequest() *ActivateMfaFactorsRequest { - this := ActivateMfaFactorsRequest{} - return &this -} - -// NewActivateMfaFactorsRequestWithDefaults instantiates a new ActivateMfaFactorsRequest 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 NewActivateMfaFactorsRequestWithDefaults() *ActivateMfaFactorsRequest { - this := ActivateMfaFactorsRequest{} - return &this -} - -// GetStateTokenExpiresIn returns the StateTokenExpiresIn field value if set, zero value otherwise. -func (o *ActivateMfaFactorsRequest) GetStateTokenExpiresIn() int32 { - if o == nil || isNil(o.StateTokenExpiresIn) { - var ret int32 - return ret - } - return *o.StateTokenExpiresIn -} - -// GetStateTokenExpiresInOk returns a tuple with the StateTokenExpiresIn field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ActivateMfaFactorsRequest) GetStateTokenExpiresInOk() (*int32, bool) { - if o == nil || isNil(o.StateTokenExpiresIn) { - return nil, false - } - return o.StateTokenExpiresIn, true -} - -// HasStateTokenExpiresIn returns a boolean if a field has been set. -func (o *ActivateMfaFactorsRequest) HasStateTokenExpiresIn() bool { - if o != nil && !isNil(o.StateTokenExpiresIn) { - return true - } - - return false -} - -// SetStateTokenExpiresIn gets a reference to the given int32 and assigns it to the StateTokenExpiresIn field. -func (o *ActivateMfaFactorsRequest) SetStateTokenExpiresIn(v int32) { - o.StateTokenExpiresIn = &v -} - -// GetNumericSmsOtp returns the NumericSmsOtp field value if set, zero value otherwise. -func (o *ActivateMfaFactorsRequest) GetNumericSmsOtp() bool { - if o == nil || isNil(o.NumericSmsOtp) { - var ret bool - return ret - } - return *o.NumericSmsOtp -} - -// GetNumericSmsOtpOk returns a tuple with the NumericSmsOtp field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ActivateMfaFactorsRequest) GetNumericSmsOtpOk() (*bool, bool) { - if o == nil || isNil(o.NumericSmsOtp) { - return nil, false - } - return o.NumericSmsOtp, true -} - -// HasNumericSmsOtp returns a boolean if a field has been set. -func (o *ActivateMfaFactorsRequest) HasNumericSmsOtp() bool { - if o != nil && !isNil(o.NumericSmsOtp) { - return true - } - - return false -} - -// SetNumericSmsOtp gets a reference to the given bool and assigns it to the NumericSmsOtp field. -func (o *ActivateMfaFactorsRequest) SetNumericSmsOtp(v bool) { - o.NumericSmsOtp = &v -} - -// GetSmsMessage returns the SmsMessage field value if set, zero value otherwise. -func (o *ActivateMfaFactorsRequest) GetSmsMessage() string { - if o == nil || isNil(o.SmsMessage) { - var ret string - return ret - } - return *o.SmsMessage -} - -// GetSmsMessageOk returns a tuple with the SmsMessage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ActivateMfaFactorsRequest) GetSmsMessageOk() (*string, bool) { - if o == nil || isNil(o.SmsMessage) { - return nil, false - } - return o.SmsMessage, true -} - -// HasSmsMessage returns a boolean if a field has been set. -func (o *ActivateMfaFactorsRequest) HasSmsMessage() bool { - if o != nil && !isNil(o.SmsMessage) { - return true - } - - return false -} - -// SetSmsMessage gets a reference to the given string and assigns it to the SmsMessage field. -func (o *ActivateMfaFactorsRequest) SetSmsMessage(v string) { - o.SmsMessage = &v -} - -func (o ActivateMfaFactorsRequest) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ActivateMfaFactorsRequest) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.StateTokenExpiresIn) { - toSerialize["state_token_expires_in"] = o.StateTokenExpiresIn - } - if !isNil(o.NumericSmsOtp) { - toSerialize["numeric_sms_otp"] = o.NumericSmsOtp - } - if !isNil(o.SmsMessage) { - toSerialize["sms_message"] = o.SmsMessage - } - return toSerialize, nil -} - -type NullableActivateMfaFactorsRequest struct { - value *ActivateMfaFactorsRequest - isSet bool -} - -func (v NullableActivateMfaFactorsRequest) Get() *ActivateMfaFactorsRequest { - return v.value -} - -func (v *NullableActivateMfaFactorsRequest) Set(val *ActivateMfaFactorsRequest) { - v.value = val - v.isSet = true -} - -func (v NullableActivateMfaFactorsRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableActivateMfaFactorsRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableActivateMfaFactorsRequest(val *ActivateMfaFactorsRequest) *NullableActivateMfaFactorsRequest { - return &NullableActivateMfaFactorsRequest{value: val, isSet: true} -} - -func (v NullableActivateMfaFactorsRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableActivateMfaFactorsRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_add_client_app_201_response.go b/model_add_client_app_201_response.go deleted file mode 100644 index 835328e..0000000 --- a/model_add_client_app_201_response.go +++ /dev/null @@ -1,162 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the AddClientApp201Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &AddClientApp201Response{} - -// AddClientApp201Response struct for AddClientApp201Response -type AddClientApp201Response struct { - AppId *int32 `json:"app_id,omitempty"` - ApiAuthId *int32 `json:"api_auth_id,omitempty"` -} - -// NewAddClientApp201Response instantiates a new AddClientApp201Response 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 NewAddClientApp201Response() *AddClientApp201Response { - this := AddClientApp201Response{} - return &this -} - -// NewAddClientApp201ResponseWithDefaults instantiates a new AddClientApp201Response 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 NewAddClientApp201ResponseWithDefaults() *AddClientApp201Response { - this := AddClientApp201Response{} - return &this -} - -// GetAppId returns the AppId field value if set, zero value otherwise. -func (o *AddClientApp201Response) GetAppId() int32 { - if o == nil || isNil(o.AppId) { - var ret int32 - return ret - } - return *o.AppId -} - -// GetAppIdOk returns a tuple with the AppId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AddClientApp201Response) GetAppIdOk() (*int32, bool) { - if o == nil || isNil(o.AppId) { - return nil, false - } - return o.AppId, true -} - -// HasAppId returns a boolean if a field has been set. -func (o *AddClientApp201Response) HasAppId() bool { - if o != nil && !isNil(o.AppId) { - return true - } - - return false -} - -// SetAppId gets a reference to the given int32 and assigns it to the AppId field. -func (o *AddClientApp201Response) SetAppId(v int32) { - o.AppId = &v -} - -// GetApiAuthId returns the ApiAuthId field value if set, zero value otherwise. -func (o *AddClientApp201Response) GetApiAuthId() int32 { - if o == nil || isNil(o.ApiAuthId) { - var ret int32 - return ret - } - return *o.ApiAuthId -} - -// GetApiAuthIdOk returns a tuple with the ApiAuthId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AddClientApp201Response) GetApiAuthIdOk() (*int32, bool) { - if o == nil || isNil(o.ApiAuthId) { - return nil, false - } - return o.ApiAuthId, true -} - -// HasApiAuthId returns a boolean if a field has been set. -func (o *AddClientApp201Response) HasApiAuthId() bool { - if o != nil && !isNil(o.ApiAuthId) { - return true - } - - return false -} - -// SetApiAuthId gets a reference to the given int32 and assigns it to the ApiAuthId field. -func (o *AddClientApp201Response) SetApiAuthId(v int32) { - o.ApiAuthId = &v -} - -func (o AddClientApp201Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o AddClientApp201Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.AppId) { - toSerialize["app_id"] = o.AppId - } - if !isNil(o.ApiAuthId) { - toSerialize["api_auth_id"] = o.ApiAuthId - } - return toSerialize, nil -} - -type NullableAddClientApp201Response struct { - value *AddClientApp201Response - isSet bool -} - -func (v NullableAddClientApp201Response) Get() *AddClientApp201Response { - return v.value -} - -func (v *NullableAddClientApp201Response) Set(val *AddClientApp201Response) { - v.value = val - v.isSet = true -} - -func (v NullableAddClientApp201Response) IsSet() bool { - return v.isSet -} - -func (v *NullableAddClientApp201Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableAddClientApp201Response(val *AddClientApp201Response) *NullableAddClientApp201Response { - return &NullableAddClientApp201Response{value: val, isSet: true} -} - -func (v NullableAddClientApp201Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableAddClientApp201Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_add_client_app_request.go b/model_add_client_app_request.go deleted file mode 100644 index 8f5599a..0000000 --- a/model_add_client_app_request.go +++ /dev/null @@ -1,164 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the AddClientAppRequest type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &AddClientAppRequest{} - -// AddClientAppRequest struct for AddClientAppRequest -type AddClientAppRequest struct { - // The ID of the OpenId Connect app to allow access through. - AppId *int32 `json:"app_id,omitempty"` - // An array of Scope IDs that represent scopes the app can request - Scopes []int32 `json:"scopes,omitempty"` -} - -// NewAddClientAppRequest instantiates a new AddClientAppRequest 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 NewAddClientAppRequest() *AddClientAppRequest { - this := AddClientAppRequest{} - return &this -} - -// NewAddClientAppRequestWithDefaults instantiates a new AddClientAppRequest 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 NewAddClientAppRequestWithDefaults() *AddClientAppRequest { - this := AddClientAppRequest{} - return &this -} - -// GetAppId returns the AppId field value if set, zero value otherwise. -func (o *AddClientAppRequest) GetAppId() int32 { - if o == nil || isNil(o.AppId) { - var ret int32 - return ret - } - return *o.AppId -} - -// GetAppIdOk returns a tuple with the AppId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AddClientAppRequest) GetAppIdOk() (*int32, bool) { - if o == nil || isNil(o.AppId) { - return nil, false - } - return o.AppId, true -} - -// HasAppId returns a boolean if a field has been set. -func (o *AddClientAppRequest) HasAppId() bool { - if o != nil && !isNil(o.AppId) { - return true - } - - return false -} - -// SetAppId gets a reference to the given int32 and assigns it to the AppId field. -func (o *AddClientAppRequest) SetAppId(v int32) { - o.AppId = &v -} - -// GetScopes returns the Scopes field value if set, zero value otherwise. -func (o *AddClientAppRequest) GetScopes() []int32 { - if o == nil || isNil(o.Scopes) { - var ret []int32 - return ret - } - return o.Scopes -} - -// GetScopesOk returns a tuple with the Scopes field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AddClientAppRequest) GetScopesOk() ([]int32, bool) { - if o == nil || isNil(o.Scopes) { - return nil, false - } - return o.Scopes, true -} - -// HasScopes returns a boolean if a field has been set. -func (o *AddClientAppRequest) HasScopes() bool { - if o != nil && !isNil(o.Scopes) { - return true - } - - return false -} - -// SetScopes gets a reference to the given []int32 and assigns it to the Scopes field. -func (o *AddClientAppRequest) SetScopes(v []int32) { - o.Scopes = v -} - -func (o AddClientAppRequest) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o AddClientAppRequest) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.AppId) { - toSerialize["app_id"] = o.AppId - } - if !isNil(o.Scopes) { - toSerialize["scopes"] = o.Scopes - } - return toSerialize, nil -} - -type NullableAddClientAppRequest struct { - value *AddClientAppRequest - isSet bool -} - -func (v NullableAddClientAppRequest) Get() *AddClientAppRequest { - return v.value -} - -func (v *NullableAddClientAppRequest) Set(val *AddClientAppRequest) { - v.value = val - v.isSet = true -} - -func (v NullableAddClientAppRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableAddClientAppRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableAddClientAppRequest(val *AddClientAppRequest) *NullableAddClientAppRequest { - return &NullableAddClientAppRequest{value: val, isSet: true} -} - -func (v NullableAddClientAppRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableAddClientAppRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_add_privilege_to_role_201_response.go b/model_add_privilege_to_role_201_response.go deleted file mode 100644 index 0bd7ed5..0000000 --- a/model_add_privilege_to_role_201_response.go +++ /dev/null @@ -1,126 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the AddPrivilegeToRole201Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &AddPrivilegeToRole201Response{} - -// AddPrivilegeToRole201Response struct for AddPrivilegeToRole201Response -type AddPrivilegeToRole201Response struct { - Success *bool `json:"success,omitempty"` -} - -// NewAddPrivilegeToRole201Response instantiates a new AddPrivilegeToRole201Response 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 NewAddPrivilegeToRole201Response() *AddPrivilegeToRole201Response { - this := AddPrivilegeToRole201Response{} - return &this -} - -// NewAddPrivilegeToRole201ResponseWithDefaults instantiates a new AddPrivilegeToRole201Response 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 NewAddPrivilegeToRole201ResponseWithDefaults() *AddPrivilegeToRole201Response { - this := AddPrivilegeToRole201Response{} - return &this -} - -// GetSuccess returns the Success field value if set, zero value otherwise. -func (o *AddPrivilegeToRole201Response) GetSuccess() bool { - if o == nil || isNil(o.Success) { - var ret bool - return ret - } - return *o.Success -} - -// GetSuccessOk returns a tuple with the Success field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AddPrivilegeToRole201Response) GetSuccessOk() (*bool, bool) { - if o == nil || isNil(o.Success) { - return nil, false - } - return o.Success, true -} - -// HasSuccess returns a boolean if a field has been set. -func (o *AddPrivilegeToRole201Response) HasSuccess() bool { - if o != nil && !isNil(o.Success) { - return true - } - - return false -} - -// SetSuccess gets a reference to the given bool and assigns it to the Success field. -func (o *AddPrivilegeToRole201Response) SetSuccess(v bool) { - o.Success = &v -} - -func (o AddPrivilegeToRole201Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o AddPrivilegeToRole201Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Success) { - toSerialize["success"] = o.Success - } - return toSerialize, nil -} - -type NullableAddPrivilegeToRole201Response struct { - value *AddPrivilegeToRole201Response - isSet bool -} - -func (v NullableAddPrivilegeToRole201Response) Get() *AddPrivilegeToRole201Response { - return v.value -} - -func (v *NullableAddPrivilegeToRole201Response) Set(val *AddPrivilegeToRole201Response) { - v.value = val - v.isSet = true -} - -func (v NullableAddPrivilegeToRole201Response) IsSet() bool { - return v.isSet -} - -func (v *NullableAddPrivilegeToRole201Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableAddPrivilegeToRole201Response(val *AddPrivilegeToRole201Response) *NullableAddPrivilegeToRole201Response { - return &NullableAddPrivilegeToRole201Response{value: val, isSet: true} -} - -func (v NullableAddPrivilegeToRole201Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableAddPrivilegeToRole201Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_add_privilege_to_role_request.go b/model_add_privilege_to_role_request.go deleted file mode 100644 index 5a194dc..0000000 --- a/model_add_privilege_to_role_request.go +++ /dev/null @@ -1,126 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the AddPrivilegeToRoleRequest type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &AddPrivilegeToRoleRequest{} - -// AddPrivilegeToRoleRequest struct for AddPrivilegeToRoleRequest -type AddPrivilegeToRoleRequest struct { - Roles []int32 `json:"roles,omitempty"` -} - -// NewAddPrivilegeToRoleRequest instantiates a new AddPrivilegeToRoleRequest 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 NewAddPrivilegeToRoleRequest() *AddPrivilegeToRoleRequest { - this := AddPrivilegeToRoleRequest{} - return &this -} - -// NewAddPrivilegeToRoleRequestWithDefaults instantiates a new AddPrivilegeToRoleRequest 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 NewAddPrivilegeToRoleRequestWithDefaults() *AddPrivilegeToRoleRequest { - this := AddPrivilegeToRoleRequest{} - return &this -} - -// GetRoles returns the Roles field value if set, zero value otherwise. -func (o *AddPrivilegeToRoleRequest) GetRoles() []int32 { - if o == nil || isNil(o.Roles) { - var ret []int32 - return ret - } - return o.Roles -} - -// GetRolesOk returns a tuple with the Roles field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AddPrivilegeToRoleRequest) GetRolesOk() ([]int32, bool) { - if o == nil || isNil(o.Roles) { - return nil, false - } - return o.Roles, true -} - -// HasRoles returns a boolean if a field has been set. -func (o *AddPrivilegeToRoleRequest) HasRoles() bool { - if o != nil && !isNil(o.Roles) { - return true - } - - return false -} - -// SetRoles gets a reference to the given []int32 and assigns it to the Roles field. -func (o *AddPrivilegeToRoleRequest) SetRoles(v []int32) { - o.Roles = v -} - -func (o AddPrivilegeToRoleRequest) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o AddPrivilegeToRoleRequest) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Roles) { - toSerialize["roles"] = o.Roles - } - return toSerialize, nil -} - -type NullableAddPrivilegeToRoleRequest struct { - value *AddPrivilegeToRoleRequest - isSet bool -} - -func (v NullableAddPrivilegeToRoleRequest) Get() *AddPrivilegeToRoleRequest { - return v.value -} - -func (v *NullableAddPrivilegeToRoleRequest) Set(val *AddPrivilegeToRoleRequest) { - v.value = val - v.isSet = true -} - -func (v NullableAddPrivilegeToRoleRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableAddPrivilegeToRoleRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableAddPrivilegeToRoleRequest(val *AddPrivilegeToRoleRequest) *NullableAddPrivilegeToRoleRequest { - return &NullableAddPrivilegeToRoleRequest{value: val, isSet: true} -} - -func (v NullableAddPrivilegeToRoleRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableAddPrivilegeToRoleRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_add_roles_to_user_request.go b/model_add_roles_to_user_request.go deleted file mode 100644 index e7b96b9..0000000 --- a/model_add_roles_to_user_request.go +++ /dev/null @@ -1,118 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the AddRolesToUserRequest type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &AddRolesToUserRequest{} - -// AddRolesToUserRequest struct for AddRolesToUserRequest -type AddRolesToUserRequest struct { - // Set to an array of one or more role IDs. The IDs must be positive integers. - RoleIdArray []int32 `json:"role_id_array"` -} - -// NewAddRolesToUserRequest instantiates a new AddRolesToUserRequest 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 NewAddRolesToUserRequest(roleIdArray []int32) *AddRolesToUserRequest { - this := AddRolesToUserRequest{} - this.RoleIdArray = roleIdArray - return &this -} - -// NewAddRolesToUserRequestWithDefaults instantiates a new AddRolesToUserRequest 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 NewAddRolesToUserRequestWithDefaults() *AddRolesToUserRequest { - this := AddRolesToUserRequest{} - return &this -} - -// GetRoleIdArray returns the RoleIdArray field value -func (o *AddRolesToUserRequest) GetRoleIdArray() []int32 { - if o == nil { - var ret []int32 - return ret - } - - return o.RoleIdArray -} - -// GetRoleIdArrayOk returns a tuple with the RoleIdArray field value -// and a boolean to check if the value has been set. -func (o *AddRolesToUserRequest) GetRoleIdArrayOk() ([]int32, bool) { - if o == nil { - return nil, false - } - return o.RoleIdArray, true -} - -// SetRoleIdArray sets field value -func (o *AddRolesToUserRequest) SetRoleIdArray(v []int32) { - o.RoleIdArray = v -} - -func (o AddRolesToUserRequest) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o AddRolesToUserRequest) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["role_id_array"] = o.RoleIdArray - return toSerialize, nil -} - -type NullableAddRolesToUserRequest struct { - value *AddRolesToUserRequest - isSet bool -} - -func (v NullableAddRolesToUserRequest) Get() *AddRolesToUserRequest { - return v.value -} - -func (v *NullableAddRolesToUserRequest) Set(val *AddRolesToUserRequest) { - v.value = val - v.isSet = true -} - -func (v NullableAddRolesToUserRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableAddRolesToUserRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableAddRolesToUserRequest(val *AddRolesToUserRequest) *NullableAddRolesToUserRequest { - return &NullableAddRolesToUserRequest{value: val, isSet: true} -} - -func (v NullableAddRolesToUserRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableAddRolesToUserRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_alt_err.go b/model_alt_err.go deleted file mode 100644 index 8faa2ef..0000000 --- a/model_alt_err.go +++ /dev/null @@ -1,201 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the AltErr type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &AltErr{} - -// AltErr struct for AltErr -type AltErr struct { - // HTTP error code https://developer.mozilla.org/en-US/docs/Web/HTTP/Status - StatusCode *int32 `json:"statusCode,omitempty"` - // Error Code Name - Name *string `json:"name,omitempty"` - // Description of Error - Message *string `json:"message,omitempty"` -} - -// NewAltErr instantiates a new AltErr 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 NewAltErr() *AltErr { - this := AltErr{} - return &this -} - -// NewAltErrWithDefaults instantiates a new AltErr 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 NewAltErrWithDefaults() *AltErr { - this := AltErr{} - return &this -} - -// GetStatusCode returns the StatusCode field value if set, zero value otherwise. -func (o *AltErr) GetStatusCode() int32 { - if o == nil || isNil(o.StatusCode) { - var ret int32 - return ret - } - return *o.StatusCode -} - -// GetStatusCodeOk returns a tuple with the StatusCode field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AltErr) GetStatusCodeOk() (*int32, bool) { - if o == nil || isNil(o.StatusCode) { - return nil, false - } - return o.StatusCode, true -} - -// HasStatusCode returns a boolean if a field has been set. -func (o *AltErr) HasStatusCode() bool { - if o != nil && !isNil(o.StatusCode) { - return true - } - - return false -} - -// SetStatusCode gets a reference to the given int32 and assigns it to the StatusCode field. -func (o *AltErr) SetStatusCode(v int32) { - o.StatusCode = &v -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *AltErr) GetName() string { - if o == nil || isNil(o.Name) { - var ret string - return ret - } - return *o.Name -} - -// 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 *AltErr) GetNameOk() (*string, bool) { - if o == nil || isNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *AltErr) HasName() bool { - if o != nil && !isNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *AltErr) SetName(v string) { - o.Name = &v -} - -// GetMessage returns the Message field value if set, zero value otherwise. -func (o *AltErr) GetMessage() string { - if o == nil || isNil(o.Message) { - var ret string - return ret - } - return *o.Message -} - -// GetMessageOk returns a tuple with the Message field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AltErr) GetMessageOk() (*string, bool) { - if o == nil || isNil(o.Message) { - return nil, false - } - return o.Message, true -} - -// HasMessage returns a boolean if a field has been set. -func (o *AltErr) HasMessage() bool { - if o != nil && !isNil(o.Message) { - return true - } - - return false -} - -// SetMessage gets a reference to the given string and assigns it to the Message field. -func (o *AltErr) SetMessage(v string) { - o.Message = &v -} - -func (o AltErr) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o AltErr) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.StatusCode) { - toSerialize["statusCode"] = o.StatusCode - } - if !isNil(o.Name) { - toSerialize["name"] = o.Name - } - if !isNil(o.Message) { - toSerialize["message"] = o.Message - } - return toSerialize, nil -} - -type NullableAltErr struct { - value *AltErr - isSet bool -} - -func (v NullableAltErr) Get() *AltErr { - return v.value -} - -func (v *NullableAltErr) Set(val *AltErr) { - v.value = val - v.isSet = true -} - -func (v NullableAltErr) IsSet() bool { - return v.isSet -} - -func (v *NullableAltErr) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableAltErr(val *AltErr) *NullableAltErr { - return &NullableAltErr{value: val, isSet: true} -} - -func (v NullableAltErr) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableAltErr) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_app_parameters.go b/model_app_parameters.go deleted file mode 100644 index 1b8c225..0000000 --- a/model_app_parameters.go +++ /dev/null @@ -1,266 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the AppParameters type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &AppParameters{} - -// AppParameters The parameters section contains parameterized attributes that have defined at the connector level as well as custom attributes that have been defined specifically for this app. Regardless of how they are defined, all parameters have the following attributes. Each parameter is an object with the key for the object being set as the parameters short name. -type AppParameters struct { - // A user attribute to map values from For custom attributes prefix the name of the attribute with `custom_attribute_`. e.g. To get the value for custom attribute `employee_id` use `custom_attribute_employee_id`. - UserAttributeMappings *string `json:"user_attribute_mappings,omitempty"` - // When `user_attribute_mappings` is set to `_macro_` this macro will be used to assign the parameter value. - UserAttributeMacros *string `json:"user_attribute_macros,omitempty"` - // The can only be set when creating a new parameter. It can not be updated. - Label *string `json:"label,omitempty"` - // When true, this parameter will be included in a SAML assertion payload. - IncludeInSamlAssertion *bool `json:"include_in_saml_assertion,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _AppParameters AppParameters - -// NewAppParameters instantiates a new AppParameters 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 NewAppParameters() *AppParameters { - this := AppParameters{} - return &this -} - -// NewAppParametersWithDefaults instantiates a new AppParameters 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 NewAppParametersWithDefaults() *AppParameters { - this := AppParameters{} - return &this -} - -// GetUserAttributeMappings returns the UserAttributeMappings field value if set, zero value otherwise. -func (o *AppParameters) GetUserAttributeMappings() string { - if o == nil || isNil(o.UserAttributeMappings) { - var ret string - return ret - } - return *o.UserAttributeMappings -} - -// GetUserAttributeMappingsOk returns a tuple with the UserAttributeMappings field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AppParameters) GetUserAttributeMappingsOk() (*string, bool) { - if o == nil || isNil(o.UserAttributeMappings) { - return nil, false - } - return o.UserAttributeMappings, true -} - -// HasUserAttributeMappings returns a boolean if a field has been set. -func (o *AppParameters) HasUserAttributeMappings() bool { - if o != nil && !isNil(o.UserAttributeMappings) { - return true - } - - return false -} - -// SetUserAttributeMappings gets a reference to the given string and assigns it to the UserAttributeMappings field. -func (o *AppParameters) SetUserAttributeMappings(v string) { - o.UserAttributeMappings = &v -} - -// GetUserAttributeMacros returns the UserAttributeMacros field value if set, zero value otherwise. -func (o *AppParameters) GetUserAttributeMacros() string { - if o == nil || isNil(o.UserAttributeMacros) { - var ret string - return ret - } - return *o.UserAttributeMacros -} - -// GetUserAttributeMacrosOk returns a tuple with the UserAttributeMacros field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AppParameters) GetUserAttributeMacrosOk() (*string, bool) { - if o == nil || isNil(o.UserAttributeMacros) { - return nil, false - } - return o.UserAttributeMacros, true -} - -// HasUserAttributeMacros returns a boolean if a field has been set. -func (o *AppParameters) HasUserAttributeMacros() bool { - if o != nil && !isNil(o.UserAttributeMacros) { - return true - } - - return false -} - -// SetUserAttributeMacros gets a reference to the given string and assigns it to the UserAttributeMacros field. -func (o *AppParameters) SetUserAttributeMacros(v string) { - o.UserAttributeMacros = &v -} - -// GetLabel returns the Label field value if set, zero value otherwise. -func (o *AppParameters) GetLabel() string { - if o == nil || isNil(o.Label) { - var ret string - return ret - } - return *o.Label -} - -// 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 *AppParameters) GetLabelOk() (*string, bool) { - if o == nil || isNil(o.Label) { - return nil, false - } - return o.Label, true -} - -// HasLabel returns a boolean if a field has been set. -func (o *AppParameters) HasLabel() bool { - if o != nil && !isNil(o.Label) { - return true - } - - return false -} - -// SetLabel gets a reference to the given string and assigns it to the Label field. -func (o *AppParameters) SetLabel(v string) { - o.Label = &v -} - -// GetIncludeInSamlAssertion returns the IncludeInSamlAssertion field value if set, zero value otherwise. -func (o *AppParameters) GetIncludeInSamlAssertion() bool { - if o == nil || isNil(o.IncludeInSamlAssertion) { - var ret bool - return ret - } - return *o.IncludeInSamlAssertion -} - -// GetIncludeInSamlAssertionOk returns a tuple with the IncludeInSamlAssertion field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AppParameters) GetIncludeInSamlAssertionOk() (*bool, bool) { - if o == nil || isNil(o.IncludeInSamlAssertion) { - return nil, false - } - return o.IncludeInSamlAssertion, true -} - -// HasIncludeInSamlAssertion returns a boolean if a field has been set. -func (o *AppParameters) HasIncludeInSamlAssertion() bool { - if o != nil && !isNil(o.IncludeInSamlAssertion) { - return true - } - - return false -} - -// SetIncludeInSamlAssertion gets a reference to the given bool and assigns it to the IncludeInSamlAssertion field. -func (o *AppParameters) SetIncludeInSamlAssertion(v bool) { - o.IncludeInSamlAssertion = &v -} - -func (o AppParameters) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o AppParameters) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.UserAttributeMappings) { - toSerialize["user_attribute_mappings"] = o.UserAttributeMappings - } - if !isNil(o.UserAttributeMacros) { - toSerialize["user_attribute_macros"] = o.UserAttributeMacros - } - if !isNil(o.Label) { - toSerialize["label"] = o.Label - } - if !isNil(o.IncludeInSamlAssertion) { - toSerialize["include_in_saml_assertion"] = o.IncludeInSamlAssertion - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *AppParameters) UnmarshalJSON(bytes []byte) (err error) { - varAppParameters := _AppParameters{} - - if err = json.Unmarshal(bytes, &varAppParameters); err == nil { - *o = AppParameters(varAppParameters) - } - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - delete(additionalProperties, "user_attribute_mappings") - delete(additionalProperties, "user_attribute_macros") - delete(additionalProperties, "label") - delete(additionalProperties, "include_in_saml_assertion") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableAppParameters struct { - value *AppParameters - isSet bool -} - -func (v NullableAppParameters) Get() *AppParameters { - return v.value -} - -func (v *NullableAppParameters) Set(val *AppParameters) { - v.value = val - v.isSet = true -} - -func (v NullableAppParameters) IsSet() bool { - return v.isSet -} - -func (v *NullableAppParameters) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableAppParameters(val *AppParameters) *NullableAppParameters { - return &NullableAppParameters{value: val, isSet: true} -} - -func (v NullableAppParameters) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableAppParameters) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_app_rule.go b/model_app_rule.go deleted file mode 100644 index 820c64b..0000000 --- a/model_app_rule.go +++ /dev/null @@ -1,348 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the AppRule type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &AppRule{} - -// AppRule struct for AppRule -type AppRule struct { - // App Rule ID - Id *int32 `json:"id,omitempty"` - // Rule Name - Name *string `json:"name,omitempty"` - // Indicates how conditions should be matched. - Match *string `json:"match,omitempty"` - // Indicates if the rule is enabled or not. - Enabled *bool `json:"enabled,omitempty"` - // Indicates the order of the rule. When `null` this will default to last position. - Position *int32 `json:"position,omitempty"` - // An array of conditions that the user must meet in order for the rule to be applied. - Conditions []Condition `json:"conditions,omitempty"` - Actions []ActionObj `json:"actions,omitempty"` -} - -// NewAppRule instantiates a new AppRule 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 NewAppRule() *AppRule { - this := AppRule{} - return &this -} - -// NewAppRuleWithDefaults instantiates a new AppRule 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 NewAppRuleWithDefaults() *AppRule { - this := AppRule{} - return &this -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *AppRule) GetId() int32 { - if o == nil || isNil(o.Id) { - var ret int32 - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AppRule) GetIdOk() (*int32, bool) { - if o == nil || isNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *AppRule) HasId() bool { - if o != nil && !isNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given int32 and assigns it to the Id field. -func (o *AppRule) SetId(v int32) { - o.Id = &v -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *AppRule) GetName() string { - if o == nil || isNil(o.Name) { - var ret string - return ret - } - return *o.Name -} - -// 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 *AppRule) GetNameOk() (*string, bool) { - if o == nil || isNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *AppRule) HasName() bool { - if o != nil && !isNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *AppRule) SetName(v string) { - o.Name = &v -} - -// GetMatch returns the Match field value if set, zero value otherwise. -func (o *AppRule) GetMatch() string { - if o == nil || isNil(o.Match) { - var ret string - return ret - } - return *o.Match -} - -// GetMatchOk returns a tuple with the Match field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AppRule) GetMatchOk() (*string, bool) { - if o == nil || isNil(o.Match) { - return nil, false - } - return o.Match, true -} - -// HasMatch returns a boolean if a field has been set. -func (o *AppRule) HasMatch() bool { - if o != nil && !isNil(o.Match) { - return true - } - - return false -} - -// SetMatch gets a reference to the given string and assigns it to the Match field. -func (o *AppRule) SetMatch(v string) { - o.Match = &v -} - -// GetEnabled returns the Enabled field value if set, zero value otherwise. -func (o *AppRule) GetEnabled() bool { - if o == nil || isNil(o.Enabled) { - 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 *AppRule) GetEnabledOk() (*bool, bool) { - if o == nil || isNil(o.Enabled) { - return nil, false - } - return o.Enabled, true -} - -// HasEnabled returns a boolean if a field has been set. -func (o *AppRule) HasEnabled() bool { - if o != nil && !isNil(o.Enabled) { - return true - } - - return false -} - -// SetEnabled gets a reference to the given bool and assigns it to the Enabled field. -func (o *AppRule) SetEnabled(v bool) { - o.Enabled = &v -} - -// GetPosition returns the Position field value if set, zero value otherwise. -func (o *AppRule) GetPosition() int32 { - if o == nil || isNil(o.Position) { - var ret int32 - return ret - } - return *o.Position -} - -// GetPositionOk returns a tuple with the Position field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AppRule) GetPositionOk() (*int32, bool) { - if o == nil || isNil(o.Position) { - return nil, false - } - return o.Position, true -} - -// HasPosition returns a boolean if a field has been set. -func (o *AppRule) HasPosition() bool { - if o != nil && !isNil(o.Position) { - return true - } - - return false -} - -// SetPosition gets a reference to the given int32 and assigns it to the Position field. -func (o *AppRule) SetPosition(v int32) { - o.Position = &v -} - -// GetConditions returns the Conditions field value if set, zero value otherwise. -func (o *AppRule) GetConditions() []Condition { - if o == nil || isNil(o.Conditions) { - var ret []Condition - return ret - } - return o.Conditions -} - -// GetConditionsOk returns a tuple with the Conditions field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AppRule) GetConditionsOk() ([]Condition, bool) { - if o == nil || isNil(o.Conditions) { - return nil, false - } - return o.Conditions, true -} - -// HasConditions returns a boolean if a field has been set. -func (o *AppRule) HasConditions() bool { - if o != nil && !isNil(o.Conditions) { - return true - } - - return false -} - -// SetConditions gets a reference to the given []Condition and assigns it to the Conditions field. -func (o *AppRule) SetConditions(v []Condition) { - o.Conditions = v -} - -// GetActions returns the Actions field value if set, zero value otherwise. -func (o *AppRule) GetActions() []ActionObj { - if o == nil || isNil(o.Actions) { - var ret []ActionObj - return ret - } - return o.Actions -} - -// GetActionsOk returns a tuple with the Actions field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AppRule) GetActionsOk() ([]ActionObj, bool) { - if o == nil || isNil(o.Actions) { - return nil, false - } - return o.Actions, true -} - -// HasActions returns a boolean if a field has been set. -func (o *AppRule) HasActions() bool { - if o != nil && !isNil(o.Actions) { - return true - } - - return false -} - -// SetActions gets a reference to the given []ActionObj and assigns it to the Actions field. -func (o *AppRule) SetActions(v []ActionObj) { - o.Actions = v -} - -func (o AppRule) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o AppRule) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Id) { - toSerialize["id"] = o.Id - } - if !isNil(o.Name) { - toSerialize["name"] = o.Name - } - if !isNil(o.Match) { - toSerialize["match"] = o.Match - } - if !isNil(o.Enabled) { - toSerialize["enabled"] = o.Enabled - } - if !isNil(o.Position) { - toSerialize["position"] = o.Position - } - if !isNil(o.Conditions) { - toSerialize["conditions"] = o.Conditions - } - if !isNil(o.Actions) { - toSerialize["actions"] = o.Actions - } - return toSerialize, nil -} - -type NullableAppRule struct { - value *AppRule - isSet bool -} - -func (v NullableAppRule) Get() *AppRule { - return v.value -} - -func (v *NullableAppRule) Set(val *AppRule) { - v.value = val - v.isSet = true -} - -func (v NullableAppRule) IsSet() bool { - return v.isSet -} - -func (v *NullableAppRule) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableAppRule(val *AppRule) *NullableAppRule { - return &NullableAppRule{value: val, isSet: true} -} - -func (v NullableAppRule) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableAppRule) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_assign_users_to_privilege_request.go b/model_assign_users_to_privilege_request.go deleted file mode 100644 index 006914e..0000000 --- a/model_assign_users_to_privilege_request.go +++ /dev/null @@ -1,126 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the AssignUsersToPrivilegeRequest type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &AssignUsersToPrivilegeRequest{} - -// AssignUsersToPrivilegeRequest struct for AssignUsersToPrivilegeRequest -type AssignUsersToPrivilegeRequest struct { - Users []int32 `json:"users,omitempty"` -} - -// NewAssignUsersToPrivilegeRequest instantiates a new AssignUsersToPrivilegeRequest 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 NewAssignUsersToPrivilegeRequest() *AssignUsersToPrivilegeRequest { - this := AssignUsersToPrivilegeRequest{} - return &this -} - -// NewAssignUsersToPrivilegeRequestWithDefaults instantiates a new AssignUsersToPrivilegeRequest 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 NewAssignUsersToPrivilegeRequestWithDefaults() *AssignUsersToPrivilegeRequest { - this := AssignUsersToPrivilegeRequest{} - return &this -} - -// GetUsers returns the Users field value if set, zero value otherwise. -func (o *AssignUsersToPrivilegeRequest) GetUsers() []int32 { - if o == nil || isNil(o.Users) { - 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 *AssignUsersToPrivilegeRequest) GetUsersOk() ([]int32, bool) { - if o == nil || isNil(o.Users) { - return nil, false - } - return o.Users, true -} - -// HasUsers returns a boolean if a field has been set. -func (o *AssignUsersToPrivilegeRequest) HasUsers() bool { - if o != nil && !isNil(o.Users) { - return true - } - - return false -} - -// SetUsers gets a reference to the given []int32 and assigns it to the Users field. -func (o *AssignUsersToPrivilegeRequest) SetUsers(v []int32) { - o.Users = v -} - -func (o AssignUsersToPrivilegeRequest) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o AssignUsersToPrivilegeRequest) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Users) { - toSerialize["users"] = o.Users - } - return toSerialize, nil -} - -type NullableAssignUsersToPrivilegeRequest struct { - value *AssignUsersToPrivilegeRequest - isSet bool -} - -func (v NullableAssignUsersToPrivilegeRequest) Get() *AssignUsersToPrivilegeRequest { - return v.value -} - -func (v *NullableAssignUsersToPrivilegeRequest) Set(val *AssignUsersToPrivilegeRequest) { - v.value = val - v.isSet = true -} - -func (v NullableAssignUsersToPrivilegeRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableAssignUsersToPrivilegeRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableAssignUsersToPrivilegeRequest(val *AssignUsersToPrivilegeRequest) *NullableAssignUsersToPrivilegeRequest { - return &NullableAssignUsersToPrivilegeRequest{value: val, isSet: true} -} - -func (v NullableAssignUsersToPrivilegeRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableAssignUsersToPrivilegeRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_auth_claim.go b/model_auth_claim.go deleted file mode 100644 index 91af8ac..0000000 --- a/model_auth_claim.go +++ /dev/null @@ -1,192 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the AuthClaim type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &AuthClaim{} - -// AuthClaim struct for AuthClaim -type AuthClaim struct { - // The attribute name for the claim when its returned in an Access Token - Name string `json:"name"` - // A user attribute to map values from For custom attributes prefix the name of the attribute with `custom_attribute_`. e.g. To get the value for custom attribute `employee_id` use `custom_attribute_employee_id`. - UserAttributeMappings *string `json:"user_attribute_mappings,omitempty"` - // When `user_attribute_mappings` is set to `_macro_` this macro will be used to assign the parameter value. - UserAttributeMacros *string `json:"user_attribute_macros,omitempty"` -} - -// NewAuthClaim instantiates a new AuthClaim 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 NewAuthClaim(name string) *AuthClaim { - this := AuthClaim{} - this.Name = name - return &this -} - -// NewAuthClaimWithDefaults instantiates a new AuthClaim 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 NewAuthClaimWithDefaults() *AuthClaim { - this := AuthClaim{} - return &this -} - -// GetName returns the Name field value -func (o *AuthClaim) 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 *AuthClaim) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *AuthClaim) SetName(v string) { - o.Name = v -} - -// GetUserAttributeMappings returns the UserAttributeMappings field value if set, zero value otherwise. -func (o *AuthClaim) GetUserAttributeMappings() string { - if o == nil || isNil(o.UserAttributeMappings) { - var ret string - return ret - } - return *o.UserAttributeMappings -} - -// GetUserAttributeMappingsOk returns a tuple with the UserAttributeMappings field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AuthClaim) GetUserAttributeMappingsOk() (*string, bool) { - if o == nil || isNil(o.UserAttributeMappings) { - return nil, false - } - return o.UserAttributeMappings, true -} - -// HasUserAttributeMappings returns a boolean if a field has been set. -func (o *AuthClaim) HasUserAttributeMappings() bool { - if o != nil && !isNil(o.UserAttributeMappings) { - return true - } - - return false -} - -// SetUserAttributeMappings gets a reference to the given string and assigns it to the UserAttributeMappings field. -func (o *AuthClaim) SetUserAttributeMappings(v string) { - o.UserAttributeMappings = &v -} - -// GetUserAttributeMacros returns the UserAttributeMacros field value if set, zero value otherwise. -func (o *AuthClaim) GetUserAttributeMacros() string { - if o == nil || isNil(o.UserAttributeMacros) { - var ret string - return ret - } - return *o.UserAttributeMacros -} - -// GetUserAttributeMacrosOk returns a tuple with the UserAttributeMacros field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AuthClaim) GetUserAttributeMacrosOk() (*string, bool) { - if o == nil || isNil(o.UserAttributeMacros) { - return nil, false - } - return o.UserAttributeMacros, true -} - -// HasUserAttributeMacros returns a boolean if a field has been set. -func (o *AuthClaim) HasUserAttributeMacros() bool { - if o != nil && !isNil(o.UserAttributeMacros) { - return true - } - - return false -} - -// SetUserAttributeMacros gets a reference to the given string and assigns it to the UserAttributeMacros field. -func (o *AuthClaim) SetUserAttributeMacros(v string) { - o.UserAttributeMacros = &v -} - -func (o AuthClaim) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o AuthClaim) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["name"] = o.Name - if !isNil(o.UserAttributeMappings) { - toSerialize["user_attribute_mappings"] = o.UserAttributeMappings - } - if !isNil(o.UserAttributeMacros) { - toSerialize["user_attribute_macros"] = o.UserAttributeMacros - } - return toSerialize, nil -} - -type NullableAuthClaim struct { - value *AuthClaim - isSet bool -} - -func (v NullableAuthClaim) Get() *AuthClaim { - return v.value -} - -func (v *NullableAuthClaim) Set(val *AuthClaim) { - v.value = val - v.isSet = true -} - -func (v NullableAuthClaim) IsSet() bool { - return v.isSet -} - -func (v *NullableAuthClaim) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableAuthClaim(val *AuthClaim) *NullableAuthClaim { - return &NullableAuthClaim{value: val, isSet: true} -} - -func (v NullableAuthClaim) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableAuthClaim) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_auth_id.go b/model_auth_id.go deleted file mode 100644 index e84190a..0000000 --- a/model_auth_id.go +++ /dev/null @@ -1,127 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the AuthId type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &AuthId{} - -// AuthId struct for AuthId -type AuthId struct { - // Unique ID for the Scope - Id *int32 `json:"id,omitempty"` -} - -// NewAuthId instantiates a new AuthId 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 NewAuthId() *AuthId { - this := AuthId{} - return &this -} - -// NewAuthIdWithDefaults instantiates a new AuthId 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 NewAuthIdWithDefaults() *AuthId { - this := AuthId{} - return &this -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *AuthId) GetId() int32 { - if o == nil || isNil(o.Id) { - var ret int32 - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AuthId) GetIdOk() (*int32, bool) { - if o == nil || isNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *AuthId) HasId() bool { - if o != nil && !isNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given int32 and assigns it to the Id field. -func (o *AuthId) SetId(v int32) { - o.Id = &v -} - -func (o AuthId) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o AuthId) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Id) { - toSerialize["id"] = o.Id - } - return toSerialize, nil -} - -type NullableAuthId struct { - value *AuthId - isSet bool -} - -func (v NullableAuthId) Get() *AuthId { - return v.value -} - -func (v *NullableAuthId) Set(val *AuthId) { - v.value = val - v.isSet = true -} - -func (v NullableAuthId) IsSet() bool { - return v.isSet -} - -func (v *NullableAuthId) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableAuthId(val *AuthId) *NullableAuthId { - return &NullableAuthId{value: val, isSet: true} -} - -func (v NullableAuthId) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableAuthId) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_auth_method.go b/model_auth_method.go deleted file mode 100644 index 5643ade..0000000 --- a/model_auth_method.go +++ /dev/null @@ -1,125 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" - "fmt" -) - -// AuthMethod An ID indicating the type of app: - 0: Password - 1: OpenId - 2: SAML - 3: API - 4: Google - 6: Forms Based App - 7: WSFED - 8: OpenId Connect -type AuthMethod int32 - -// List of auth_method -const ( - _0 AuthMethod = 0 - _1 AuthMethod = 1 - _2 AuthMethod = 2 - _3 AuthMethod = 3 - _4 AuthMethod = 4 - _5 AuthMethod = 5 - _6 AuthMethod = 6 - _7 AuthMethod = 7 - _8 AuthMethod = 8 -) - -// All allowed values of AuthMethod enum -var AllowedAuthMethodEnumValues = []AuthMethod{ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, -} - -func (v *AuthMethod) UnmarshalJSON(src []byte) error { - var value int32 - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - enumTypeValue := AuthMethod(value) - for _, existing := range AllowedAuthMethodEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid AuthMethod", value) -} - -// NewAuthMethodFromValue returns a pointer to a valid AuthMethod -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewAuthMethodFromValue(v int32) (*AuthMethod, error) { - ev := AuthMethod(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for AuthMethod: valid values are %v", v, AllowedAuthMethodEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v AuthMethod) IsValid() bool { - for _, existing := range AllowedAuthMethodEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to auth_method value -func (v AuthMethod) Ptr() *AuthMethod { - return &v -} - -type NullableAuthMethod struct { - value *AuthMethod - isSet bool -} - -func (v NullableAuthMethod) Get() *AuthMethod { - return v.value -} - -func (v *NullableAuthMethod) Set(val *AuthMethod) { - v.value = val - v.isSet = true -} - -func (v NullableAuthMethod) IsSet() bool { - return v.isSet -} - -func (v *NullableAuthMethod) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableAuthMethod(val *AuthMethod) *NullableAuthMethod { - return &NullableAuthMethod{value: val, isSet: true} -} - -func (v NullableAuthMethod) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableAuthMethod) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - diff --git a/model_auth_scope.go b/model_auth_scope.go deleted file mode 100644 index 3c0b4b5..0000000 --- a/model_auth_scope.go +++ /dev/null @@ -1,199 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the AuthScope type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &AuthScope{} - -// AuthScope struct for AuthScope -type AuthScope struct { - // Unique ID for the Scope - Id *int32 `json:"id,omitempty"` - // A value representing the api scope that with be authorized - Value *string `json:"value,omitempty"` - // A description of what access the scope enables - Description *string `json:"description,omitempty"` -} - -// NewAuthScope instantiates a new AuthScope 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 NewAuthScope() *AuthScope { - this := AuthScope{} - return &this -} - -// NewAuthScopeWithDefaults instantiates a new AuthScope 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 NewAuthScopeWithDefaults() *AuthScope { - this := AuthScope{} - return &this -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *AuthScope) GetId() int32 { - if o == nil || isNil(o.Id) { - var ret int32 - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AuthScope) GetIdOk() (*int32, bool) { - if o == nil || isNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *AuthScope) HasId() bool { - if o != nil && !isNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given int32 and assigns it to the Id field. -func (o *AuthScope) SetId(v int32) { - o.Id = &v -} - -// GetValue returns the Value field value if set, zero value otherwise. -func (o *AuthScope) GetValue() string { - if o == nil || isNil(o.Value) { - var ret string - return ret - } - return *o.Value -} - -// GetValueOk returns a tuple with the Value field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AuthScope) GetValueOk() (*string, bool) { - if o == nil || isNil(o.Value) { - return nil, false - } - return o.Value, true -} - -// HasValue returns a boolean if a field has been set. -func (o *AuthScope) HasValue() bool { - if o != nil && !isNil(o.Value) { - return true - } - - return false -} - -// SetValue gets a reference to the given string and assigns it to the Value field. -func (o *AuthScope) SetValue(v string) { - o.Value = &v -} - -// GetDescription returns the Description field value if set, zero value otherwise. -func (o *AuthScope) GetDescription() string { - if o == nil || isNil(o.Description) { - var ret string - return ret - } - return *o.Description -} - -// 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 *AuthScope) GetDescriptionOk() (*string, bool) { - if o == nil || isNil(o.Description) { - return nil, false - } - return o.Description, true -} - -// HasDescription returns a boolean if a field has been set. -func (o *AuthScope) HasDescription() bool { - if o != nil && !isNil(o.Description) { - return true - } - - return false -} - -// SetDescription gets a reference to the given string and assigns it to the Description field. -func (o *AuthScope) SetDescription(v string) { - o.Description = &v -} - -func (o AuthScope) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o AuthScope) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - // skip: id is readOnly - if !isNil(o.Value) { - toSerialize["value"] = o.Value - } - if !isNil(o.Description) { - toSerialize["description"] = o.Description - } - return toSerialize, nil -} - -type NullableAuthScope struct { - value *AuthScope - isSet bool -} - -func (v NullableAuthScope) Get() *AuthScope { - return v.value -} - -func (v *NullableAuthScope) Set(val *AuthScope) { - v.value = val - v.isSet = true -} - -func (v NullableAuthScope) IsSet() bool { - return v.isSet -} - -func (v *NullableAuthScope) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableAuthScope(val *AuthScope) *NullableAuthScope { - return &NullableAuthScope{value: val, isSet: true} -} - -func (v NullableAuthScope) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableAuthScope) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_auth_server.go b/model_auth_server.go deleted file mode 100644 index 50e896a..0000000 --- a/model_auth_server.go +++ /dev/null @@ -1,208 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the AuthServer type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &AuthServer{} - -// AuthServer base resource for configuring api authorization in OneLogin -type AuthServer struct { - // Auth server unique ID in Onelogin - Id *int32 `json:"id,omitempty"` - // Name of the API. - Name string `json:"name"` - // Description of what the API does. - Description string `json:"description"` - Configuration AuthServerConfiguration `json:"configuration"` -} - -// NewAuthServer instantiates a new AuthServer 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 NewAuthServer(name string, description string, configuration AuthServerConfiguration) *AuthServer { - this := AuthServer{} - this.Name = name - this.Description = description - this.Configuration = configuration - return &this -} - -// NewAuthServerWithDefaults instantiates a new AuthServer 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 NewAuthServerWithDefaults() *AuthServer { - this := AuthServer{} - return &this -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *AuthServer) GetId() int32 { - if o == nil || isNil(o.Id) { - var ret int32 - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AuthServer) GetIdOk() (*int32, bool) { - if o == nil || isNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *AuthServer) HasId() bool { - if o != nil && !isNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given int32 and assigns it to the Id field. -func (o *AuthServer) SetId(v int32) { - o.Id = &v -} - -// GetName returns the Name field value -func (o *AuthServer) 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 *AuthServer) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *AuthServer) SetName(v string) { - o.Name = v -} - -// GetDescription returns the Description field value -func (o *AuthServer) GetDescription() string { - if o == nil { - var ret string - return ret - } - - return o.Description -} - -// GetDescriptionOk returns a tuple with the Description field value -// and a boolean to check if the value has been set. -func (o *AuthServer) GetDescriptionOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Description, true -} - -// SetDescription sets field value -func (o *AuthServer) SetDescription(v string) { - o.Description = v -} - -// GetConfiguration returns the Configuration field value -func (o *AuthServer) GetConfiguration() AuthServerConfiguration { - if o == nil { - var ret AuthServerConfiguration - return ret - } - - return o.Configuration -} - -// GetConfigurationOk returns a tuple with the Configuration field value -// and a boolean to check if the value has been set. -func (o *AuthServer) GetConfigurationOk() (*AuthServerConfiguration, bool) { - if o == nil { - return nil, false - } - return &o.Configuration, true -} - -// SetConfiguration sets field value -func (o *AuthServer) SetConfiguration(v AuthServerConfiguration) { - o.Configuration = v -} - -func (o AuthServer) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o AuthServer) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - // skip: id is readOnly - toSerialize["name"] = o.Name - toSerialize["description"] = o.Description - toSerialize["configuration"] = o.Configuration - return toSerialize, nil -} - -type NullableAuthServer struct { - value *AuthServer - isSet bool -} - -func (v NullableAuthServer) Get() *AuthServer { - return v.value -} - -func (v *NullableAuthServer) Set(val *AuthServer) { - v.value = val - v.isSet = true -} - -func (v NullableAuthServer) IsSet() bool { - return v.isSet -} - -func (v *NullableAuthServer) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableAuthServer(val *AuthServer) *NullableAuthServer { - return &NullableAuthServer{value: val, isSet: true} -} - -func (v NullableAuthServer) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableAuthServer) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_auth_server_configuration.go b/model_auth_server_configuration.go deleted file mode 100644 index 24cee4f..0000000 --- a/model_auth_server_configuration.go +++ /dev/null @@ -1,220 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the AuthServerConfiguration type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &AuthServerConfiguration{} - -// AuthServerConfiguration Authorization server configuration -type AuthServerConfiguration struct { - // List of API endpoints that will be returned in Access Tokens. - Audiences []string `json:"audiences"` - // The number of minutes until refresh token expires. There is no maximum expiry limit. - RefreshTokenExpirationMinutes *int32 `json:"refresh_token_expiration_minutes,omitempty"` - // Unique identifier for the API that the Authorization Server will issue Access Tokens for. - ResourceIdentifier string `json:"resource_identifier"` - // The number of minutes until access token expires. There is no maximum expiry limit. - AccessTokenExpirationMinutes *int32 `json:"access_token_expiration_minutes,omitempty"` -} - -// NewAuthServerConfiguration instantiates a new AuthServerConfiguration 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 NewAuthServerConfiguration(audiences []string, resourceIdentifier string) *AuthServerConfiguration { - this := AuthServerConfiguration{} - this.Audiences = audiences - this.ResourceIdentifier = resourceIdentifier - return &this -} - -// NewAuthServerConfigurationWithDefaults instantiates a new AuthServerConfiguration 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 NewAuthServerConfigurationWithDefaults() *AuthServerConfiguration { - this := AuthServerConfiguration{} - return &this -} - -// GetAudiences returns the Audiences field value -func (o *AuthServerConfiguration) GetAudiences() []string { - if o == nil { - var ret []string - return ret - } - - return o.Audiences -} - -// GetAudiencesOk returns a tuple with the Audiences field value -// and a boolean to check if the value has been set. -func (o *AuthServerConfiguration) GetAudiencesOk() ([]string, bool) { - if o == nil { - return nil, false - } - return o.Audiences, true -} - -// SetAudiences sets field value -func (o *AuthServerConfiguration) SetAudiences(v []string) { - o.Audiences = v -} - -// GetRefreshTokenExpirationMinutes returns the RefreshTokenExpirationMinutes field value if set, zero value otherwise. -func (o *AuthServerConfiguration) GetRefreshTokenExpirationMinutes() int32 { - if o == nil || isNil(o.RefreshTokenExpirationMinutes) { - var ret int32 - return ret - } - return *o.RefreshTokenExpirationMinutes -} - -// GetRefreshTokenExpirationMinutesOk returns a tuple with the RefreshTokenExpirationMinutes field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AuthServerConfiguration) GetRefreshTokenExpirationMinutesOk() (*int32, bool) { - if o == nil || isNil(o.RefreshTokenExpirationMinutes) { - return nil, false - } - return o.RefreshTokenExpirationMinutes, true -} - -// HasRefreshTokenExpirationMinutes returns a boolean if a field has been set. -func (o *AuthServerConfiguration) HasRefreshTokenExpirationMinutes() bool { - if o != nil && !isNil(o.RefreshTokenExpirationMinutes) { - return true - } - - return false -} - -// SetRefreshTokenExpirationMinutes gets a reference to the given int32 and assigns it to the RefreshTokenExpirationMinutes field. -func (o *AuthServerConfiguration) SetRefreshTokenExpirationMinutes(v int32) { - o.RefreshTokenExpirationMinutes = &v -} - -// GetResourceIdentifier returns the ResourceIdentifier field value -func (o *AuthServerConfiguration) GetResourceIdentifier() string { - if o == nil { - var ret string - return ret - } - - return o.ResourceIdentifier -} - -// GetResourceIdentifierOk returns a tuple with the ResourceIdentifier field value -// and a boolean to check if the value has been set. -func (o *AuthServerConfiguration) GetResourceIdentifierOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ResourceIdentifier, true -} - -// SetResourceIdentifier sets field value -func (o *AuthServerConfiguration) SetResourceIdentifier(v string) { - o.ResourceIdentifier = v -} - -// GetAccessTokenExpirationMinutes returns the AccessTokenExpirationMinutes field value if set, zero value otherwise. -func (o *AuthServerConfiguration) GetAccessTokenExpirationMinutes() int32 { - if o == nil || isNil(o.AccessTokenExpirationMinutes) { - var ret int32 - return ret - } - return *o.AccessTokenExpirationMinutes -} - -// GetAccessTokenExpirationMinutesOk returns a tuple with the AccessTokenExpirationMinutes field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *AuthServerConfiguration) GetAccessTokenExpirationMinutesOk() (*int32, bool) { - if o == nil || isNil(o.AccessTokenExpirationMinutes) { - return nil, false - } - return o.AccessTokenExpirationMinutes, true -} - -// HasAccessTokenExpirationMinutes returns a boolean if a field has been set. -func (o *AuthServerConfiguration) HasAccessTokenExpirationMinutes() bool { - if o != nil && !isNil(o.AccessTokenExpirationMinutes) { - return true - } - - return false -} - -// SetAccessTokenExpirationMinutes gets a reference to the given int32 and assigns it to the AccessTokenExpirationMinutes field. -func (o *AuthServerConfiguration) SetAccessTokenExpirationMinutes(v int32) { - o.AccessTokenExpirationMinutes = &v -} - -func (o AuthServerConfiguration) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o AuthServerConfiguration) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["audiences"] = o.Audiences - if !isNil(o.RefreshTokenExpirationMinutes) { - toSerialize["refresh_token_expiration_minutes"] = o.RefreshTokenExpirationMinutes - } - toSerialize["resource_identifier"] = o.ResourceIdentifier - if !isNil(o.AccessTokenExpirationMinutes) { - toSerialize["access_token_expiration_minutes"] = o.AccessTokenExpirationMinutes - } - return toSerialize, nil -} - -type NullableAuthServerConfiguration struct { - value *AuthServerConfiguration - isSet bool -} - -func (v NullableAuthServerConfiguration) Get() *AuthServerConfiguration { - return v.value -} - -func (v *NullableAuthServerConfiguration) Set(val *AuthServerConfiguration) { - v.value = val - v.isSet = true -} - -func (v NullableAuthServerConfiguration) IsSet() bool { - return v.isSet -} - -func (v *NullableAuthServerConfiguration) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableAuthServerConfiguration(val *AuthServerConfiguration) *NullableAuthServerConfiguration { - return &NullableAuthServerConfiguration{value: val, isSet: true} -} - -func (v NullableAuthServerConfiguration) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableAuthServerConfiguration) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_brand.go b/model_brand.go deleted file mode 100644 index 93b0ade..0000000 --- a/model_brand.go +++ /dev/null @@ -1,509 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the Brand type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Brand{} - -// Brand struct for Brand -type Brand struct { - Id int32 `json:"id"` - // Indicates if the brand is enabled or not - Enabled bool `json:"enabled"` - // Indicates if the custom support is enabled. If enabled, the login page includes the ability to submit a support request. - CustomSupportEnabled bool `json:"custom_support_enabled"` - // Primary brand color - CustomColor string `json:"custom_color"` - // Secondary brand color - CustomAccentColor string `json:"custom_accent_color"` - // Color for the masking layer above the background image of the branded login screen. - CustomMaskingColor string `json:"custom_masking_color"` - // Opacity for the custom_masking_color. - CustomMaskingOpacity int32 `json:"custom_masking_opacity"` - // Text that replaces the default text displayed on the initial screen of the MFA Registration. - MfaEnrollmentMessage string `json:"mfa_enrollment_message"` - // Indicates if the custom Username/Email field label is enabled or not - EnableCustomLabelForLoginScreen bool `json:"enable_custom_label_for_login_screen"` - // Custom label for the Username/Email field on the login screen. See example here. - CustomLabelTextForLoginScreen string `json:"custom_label_text_for_login_screen"` - // Text for the login instruction screen, styled in Markdown. - LoginInstruction string `json:"login_instruction"` - // Link text to show login instruction screen. - LoginInstructionTitle string `json:"login_instruction_title"` - // Indicates if the OneLogin footer will appear at the bottom of the login page. - HideOneloginFooter bool `json:"hide_onelogin_footer"` - Background BrandBackground `json:"background"` - Logo BrandLogo `json:"logo"` -} - -// NewBrand instantiates a new Brand 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 NewBrand(id int32, enabled bool, customSupportEnabled bool, customColor string, customAccentColor string, customMaskingColor string, customMaskingOpacity int32, mfaEnrollmentMessage string, enableCustomLabelForLoginScreen bool, customLabelTextForLoginScreen string, loginInstruction string, loginInstructionTitle string, hideOneloginFooter bool, background BrandBackground, logo BrandLogo) *Brand { - this := Brand{} - this.Id = id - this.Enabled = enabled - this.CustomSupportEnabled = customSupportEnabled - this.CustomColor = customColor - this.CustomAccentColor = customAccentColor - this.CustomMaskingColor = customMaskingColor - this.CustomMaskingOpacity = customMaskingOpacity - this.MfaEnrollmentMessage = mfaEnrollmentMessage - this.EnableCustomLabelForLoginScreen = enableCustomLabelForLoginScreen - this.CustomLabelTextForLoginScreen = customLabelTextForLoginScreen - this.LoginInstruction = loginInstruction - this.LoginInstructionTitle = loginInstructionTitle - this.HideOneloginFooter = hideOneloginFooter - this.Background = background - this.Logo = logo - return &this -} - -// NewBrandWithDefaults instantiates a new Brand 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 NewBrandWithDefaults() *Brand { - this := Brand{} - var enabled bool = false - this.Enabled = enabled - return &this -} - -// GetId returns the Id field value -func (o *Brand) GetId() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *Brand) GetIdOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.Id, true -} - -// SetId sets field value -func (o *Brand) SetId(v int32) { - o.Id = v -} - -// GetEnabled returns the Enabled field value -func (o *Brand) GetEnabled() bool { - if o == nil { - var ret bool - return ret - } - - return o.Enabled -} - -// GetEnabledOk returns a tuple with the Enabled field value -// and a boolean to check if the value has been set. -func (o *Brand) GetEnabledOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.Enabled, true -} - -// SetEnabled sets field value -func (o *Brand) SetEnabled(v bool) { - o.Enabled = v -} - -// GetCustomSupportEnabled returns the CustomSupportEnabled field value -func (o *Brand) GetCustomSupportEnabled() bool { - if o == nil { - var ret bool - return ret - } - - return o.CustomSupportEnabled -} - -// GetCustomSupportEnabledOk returns a tuple with the CustomSupportEnabled field value -// and a boolean to check if the value has been set. -func (o *Brand) GetCustomSupportEnabledOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.CustomSupportEnabled, true -} - -// SetCustomSupportEnabled sets field value -func (o *Brand) SetCustomSupportEnabled(v bool) { - o.CustomSupportEnabled = v -} - -// GetCustomColor returns the CustomColor field value -func (o *Brand) GetCustomColor() string { - if o == nil { - var ret string - return ret - } - - return o.CustomColor -} - -// GetCustomColorOk returns a tuple with the CustomColor field value -// and a boolean to check if the value has been set. -func (o *Brand) GetCustomColorOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.CustomColor, true -} - -// SetCustomColor sets field value -func (o *Brand) SetCustomColor(v string) { - o.CustomColor = v -} - -// GetCustomAccentColor returns the CustomAccentColor field value -func (o *Brand) GetCustomAccentColor() string { - if o == nil { - var ret string - return ret - } - - return o.CustomAccentColor -} - -// GetCustomAccentColorOk returns a tuple with the CustomAccentColor field value -// and a boolean to check if the value has been set. -func (o *Brand) GetCustomAccentColorOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.CustomAccentColor, true -} - -// SetCustomAccentColor sets field value -func (o *Brand) SetCustomAccentColor(v string) { - o.CustomAccentColor = v -} - -// GetCustomMaskingColor returns the CustomMaskingColor field value -func (o *Brand) GetCustomMaskingColor() string { - if o == nil { - var ret string - return ret - } - - return o.CustomMaskingColor -} - -// GetCustomMaskingColorOk returns a tuple with the CustomMaskingColor field value -// and a boolean to check if the value has been set. -func (o *Brand) GetCustomMaskingColorOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.CustomMaskingColor, true -} - -// SetCustomMaskingColor sets field value -func (o *Brand) SetCustomMaskingColor(v string) { - o.CustomMaskingColor = v -} - -// GetCustomMaskingOpacity returns the CustomMaskingOpacity field value -func (o *Brand) GetCustomMaskingOpacity() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.CustomMaskingOpacity -} - -// GetCustomMaskingOpacityOk returns a tuple with the CustomMaskingOpacity field value -// and a boolean to check if the value has been set. -func (o *Brand) GetCustomMaskingOpacityOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.CustomMaskingOpacity, true -} - -// SetCustomMaskingOpacity sets field value -func (o *Brand) SetCustomMaskingOpacity(v int32) { - o.CustomMaskingOpacity = v -} - -// GetMfaEnrollmentMessage returns the MfaEnrollmentMessage field value -func (o *Brand) GetMfaEnrollmentMessage() string { - if o == nil { - var ret string - return ret - } - - return o.MfaEnrollmentMessage -} - -// GetMfaEnrollmentMessageOk returns a tuple with the MfaEnrollmentMessage field value -// and a boolean to check if the value has been set. -func (o *Brand) GetMfaEnrollmentMessageOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.MfaEnrollmentMessage, true -} - -// SetMfaEnrollmentMessage sets field value -func (o *Brand) SetMfaEnrollmentMessage(v string) { - o.MfaEnrollmentMessage = v -} - -// GetEnableCustomLabelForLoginScreen returns the EnableCustomLabelForLoginScreen field value -func (o *Brand) GetEnableCustomLabelForLoginScreen() bool { - if o == nil { - var ret bool - return ret - } - - return o.EnableCustomLabelForLoginScreen -} - -// GetEnableCustomLabelForLoginScreenOk returns a tuple with the EnableCustomLabelForLoginScreen field value -// and a boolean to check if the value has been set. -func (o *Brand) GetEnableCustomLabelForLoginScreenOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.EnableCustomLabelForLoginScreen, true -} - -// SetEnableCustomLabelForLoginScreen sets field value -func (o *Brand) SetEnableCustomLabelForLoginScreen(v bool) { - o.EnableCustomLabelForLoginScreen = v -} - -// GetCustomLabelTextForLoginScreen returns the CustomLabelTextForLoginScreen field value -func (o *Brand) GetCustomLabelTextForLoginScreen() string { - if o == nil { - var ret string - return ret - } - - return o.CustomLabelTextForLoginScreen -} - -// GetCustomLabelTextForLoginScreenOk returns a tuple with the CustomLabelTextForLoginScreen field value -// and a boolean to check if the value has been set. -func (o *Brand) GetCustomLabelTextForLoginScreenOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.CustomLabelTextForLoginScreen, true -} - -// SetCustomLabelTextForLoginScreen sets field value -func (o *Brand) SetCustomLabelTextForLoginScreen(v string) { - o.CustomLabelTextForLoginScreen = v -} - -// GetLoginInstruction returns the LoginInstruction field value -func (o *Brand) GetLoginInstruction() string { - if o == nil { - var ret string - return ret - } - - return o.LoginInstruction -} - -// GetLoginInstructionOk returns a tuple with the LoginInstruction field value -// and a boolean to check if the value has been set. -func (o *Brand) GetLoginInstructionOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.LoginInstruction, true -} - -// SetLoginInstruction sets field value -func (o *Brand) SetLoginInstruction(v string) { - o.LoginInstruction = v -} - -// GetLoginInstructionTitle returns the LoginInstructionTitle field value -func (o *Brand) GetLoginInstructionTitle() string { - if o == nil { - var ret string - return ret - } - - return o.LoginInstructionTitle -} - -// GetLoginInstructionTitleOk returns a tuple with the LoginInstructionTitle field value -// and a boolean to check if the value has been set. -func (o *Brand) GetLoginInstructionTitleOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.LoginInstructionTitle, true -} - -// SetLoginInstructionTitle sets field value -func (o *Brand) SetLoginInstructionTitle(v string) { - o.LoginInstructionTitle = v -} - -// GetHideOneloginFooter returns the HideOneloginFooter field value -func (o *Brand) GetHideOneloginFooter() bool { - if o == nil { - var ret bool - return ret - } - - return o.HideOneloginFooter -} - -// GetHideOneloginFooterOk returns a tuple with the HideOneloginFooter field value -// and a boolean to check if the value has been set. -func (o *Brand) GetHideOneloginFooterOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.HideOneloginFooter, true -} - -// SetHideOneloginFooter sets field value -func (o *Brand) SetHideOneloginFooter(v bool) { - o.HideOneloginFooter = v -} - -// GetBackground returns the Background field value -func (o *Brand) GetBackground() BrandBackground { - if o == nil { - var ret BrandBackground - 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 *Brand) GetBackgroundOk() (*BrandBackground, bool) { - if o == nil { - return nil, false - } - return &o.Background, true -} - -// SetBackground sets field value -func (o *Brand) SetBackground(v BrandBackground) { - o.Background = v -} - -// GetLogo returns the Logo field value -func (o *Brand) GetLogo() BrandLogo { - if o == nil { - var ret BrandLogo - return ret - } - - return o.Logo -} - -// GetLogoOk returns a tuple with the Logo field value -// and a boolean to check if the value has been set. -func (o *Brand) GetLogoOk() (*BrandLogo, bool) { - if o == nil { - return nil, false - } - return &o.Logo, true -} - -// SetLogo sets field value -func (o *Brand) SetLogo(v BrandLogo) { - o.Logo = v -} - -func (o Brand) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Brand) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["id"] = o.Id - toSerialize["enabled"] = o.Enabled - toSerialize["custom_support_enabled"] = o.CustomSupportEnabled - toSerialize["custom_color"] = o.CustomColor - toSerialize["custom_accent_color"] = o.CustomAccentColor - toSerialize["custom_masking_color"] = o.CustomMaskingColor - toSerialize["custom_masking_opacity"] = o.CustomMaskingOpacity - toSerialize["mfa_enrollment_message"] = o.MfaEnrollmentMessage - toSerialize["enable_custom_label_for_login_screen"] = o.EnableCustomLabelForLoginScreen - toSerialize["custom_label_text_for_login_screen"] = o.CustomLabelTextForLoginScreen - toSerialize["login_instruction"] = o.LoginInstruction - toSerialize["login_instruction_title"] = o.LoginInstructionTitle - toSerialize["hide_onelogin_footer"] = o.HideOneloginFooter - toSerialize["background"] = o.Background - toSerialize["logo"] = o.Logo - return toSerialize, nil -} - -type NullableBrand struct { - value *Brand - isSet bool -} - -func (v NullableBrand) Get() *Brand { - return v.value -} - -func (v *NullableBrand) Set(val *Brand) { - v.value = val - v.isSet = true -} - -func (v NullableBrand) IsSet() bool { - return v.isSet -} - -func (v *NullableBrand) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableBrand(val *Brand) *NullableBrand { - return &NullableBrand{value: val, isSet: true} -} - -func (v NullableBrand) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableBrand) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_brand_app.go b/model_brand_app.go deleted file mode 100644 index b0eb5dd..0000000 --- a/model_brand_app.go +++ /dev/null @@ -1,333 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the BrandApp type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &BrandApp{} - -// BrandApp struct for BrandApp -type BrandApp struct { - Id int32 `json:"id"` - UpdatedAt string `json:"updated_at"` - Name string `json:"name"` - ConnectorId int32 `json:"connector_id"` - AuthMethodDescription string `json:"auth_method_description"` - Description string `json:"description"` - AuthMethod int32 `json:"auth_method"` - CreatedAt string `json:"created_at"` - Visible bool `json:"visible"` -} - -// NewBrandApp instantiates a new BrandApp 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 NewBrandApp(id int32, updatedAt string, name string, connectorId int32, authMethodDescription string, description string, authMethod int32, createdAt string, visible bool) *BrandApp { - this := BrandApp{} - this.Id = id - this.UpdatedAt = updatedAt - this.Name = name - this.ConnectorId = connectorId - this.AuthMethodDescription = authMethodDescription - this.Description = description - this.AuthMethod = authMethod - this.CreatedAt = createdAt - this.Visible = visible - return &this -} - -// NewBrandAppWithDefaults instantiates a new BrandApp 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 NewBrandAppWithDefaults() *BrandApp { - this := BrandApp{} - return &this -} - -// GetId returns the Id field value -func (o *BrandApp) GetId() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *BrandApp) GetIdOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.Id, true -} - -// SetId sets field value -func (o *BrandApp) SetId(v int32) { - o.Id = v -} - -// GetUpdatedAt returns the UpdatedAt field value -func (o *BrandApp) GetUpdatedAt() string { - if o == nil { - var ret string - return ret - } - - return o.UpdatedAt -} - -// GetUpdatedAtOk returns a tuple with the UpdatedAt field value -// and a boolean to check if the value has been set. -func (o *BrandApp) GetUpdatedAtOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.UpdatedAt, true -} - -// SetUpdatedAt sets field value -func (o *BrandApp) SetUpdatedAt(v string) { - o.UpdatedAt = v -} - -// GetName returns the Name field value -func (o *BrandApp) 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 *BrandApp) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *BrandApp) SetName(v string) { - o.Name = v -} - -// GetConnectorId returns the ConnectorId field value -func (o *BrandApp) GetConnectorId() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.ConnectorId -} - -// GetConnectorIdOk returns a tuple with the ConnectorId field value -// and a boolean to check if the value has been set. -func (o *BrandApp) GetConnectorIdOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.ConnectorId, true -} - -// SetConnectorId sets field value -func (o *BrandApp) SetConnectorId(v int32) { - o.ConnectorId = v -} - -// GetAuthMethodDescription returns the AuthMethodDescription field value -func (o *BrandApp) GetAuthMethodDescription() string { - if o == nil { - var ret string - return ret - } - - return o.AuthMethodDescription -} - -// GetAuthMethodDescriptionOk returns a tuple with the AuthMethodDescription field value -// and a boolean to check if the value has been set. -func (o *BrandApp) GetAuthMethodDescriptionOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.AuthMethodDescription, true -} - -// SetAuthMethodDescription sets field value -func (o *BrandApp) SetAuthMethodDescription(v string) { - o.AuthMethodDescription = v -} - -// GetDescription returns the Description field value -func (o *BrandApp) GetDescription() string { - if o == nil { - var ret string - return ret - } - - return o.Description -} - -// GetDescriptionOk returns a tuple with the Description field value -// and a boolean to check if the value has been set. -func (o *BrandApp) GetDescriptionOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Description, true -} - -// SetDescription sets field value -func (o *BrandApp) SetDescription(v string) { - o.Description = v -} - -// GetAuthMethod returns the AuthMethod field value -func (o *BrandApp) GetAuthMethod() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.AuthMethod -} - -// GetAuthMethodOk returns a tuple with the AuthMethod field value -// and a boolean to check if the value has been set. -func (o *BrandApp) GetAuthMethodOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.AuthMethod, true -} - -// SetAuthMethod sets field value -func (o *BrandApp) SetAuthMethod(v int32) { - o.AuthMethod = v -} - -// GetCreatedAt returns the CreatedAt field value -func (o *BrandApp) GetCreatedAt() string { - if o == nil { - var ret string - return ret - } - - return o.CreatedAt -} - -// GetCreatedAtOk returns a tuple with the CreatedAt field value -// and a boolean to check if the value has been set. -func (o *BrandApp) GetCreatedAtOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.CreatedAt, true -} - -// SetCreatedAt sets field value -func (o *BrandApp) SetCreatedAt(v string) { - o.CreatedAt = v -} - -// GetVisible returns the Visible field value -func (o *BrandApp) GetVisible() bool { - if o == nil { - var ret bool - return ret - } - - return o.Visible -} - -// GetVisibleOk returns a tuple with the Visible field value -// and a boolean to check if the value has been set. -func (o *BrandApp) GetVisibleOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.Visible, true -} - -// SetVisible sets field value -func (o *BrandApp) SetVisible(v bool) { - o.Visible = v -} - -func (o BrandApp) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o BrandApp) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["id"] = o.Id - toSerialize["updated_at"] = o.UpdatedAt - toSerialize["name"] = o.Name - toSerialize["connector_id"] = o.ConnectorId - toSerialize["auth_method_description"] = o.AuthMethodDescription - toSerialize["description"] = o.Description - toSerialize["auth_method"] = o.AuthMethod - toSerialize["created_at"] = o.CreatedAt - toSerialize["visible"] = o.Visible - return toSerialize, nil -} - -type NullableBrandApp struct { - value *BrandApp - isSet bool -} - -func (v NullableBrandApp) Get() *BrandApp { - return v.value -} - -func (v *NullableBrandApp) Set(val *BrandApp) { - v.value = val - v.isSet = true -} - -func (v NullableBrandApp) IsSet() bool { - return v.isSet -} - -func (v *NullableBrandApp) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableBrandApp(val *BrandApp) *NullableBrandApp { - return &NullableBrandApp{value: val, isSet: true} -} - -func (v NullableBrandApp) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableBrandApp) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_brand_background.go b/model_brand_background.go deleted file mode 100644 index 0dca0a6..0000000 --- a/model_brand_background.go +++ /dev/null @@ -1,198 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the BrandBackground type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &BrandBackground{} - -// BrandBackground struct for BrandBackground -type BrandBackground struct { - Urls BrandBackgroundUrls `json:"urls"` - FileSize int32 `json:"file_size"` - UpdatedAt string `json:"updated_at"` - ContentType string `json:"content_type"` -} - -// NewBrandBackground instantiates a new BrandBackground 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 NewBrandBackground(urls BrandBackgroundUrls, fileSize int32, updatedAt string, contentType string) *BrandBackground { - this := BrandBackground{} - this.Urls = urls - this.FileSize = fileSize - this.UpdatedAt = updatedAt - this.ContentType = contentType - return &this -} - -// NewBrandBackgroundWithDefaults instantiates a new BrandBackground 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 NewBrandBackgroundWithDefaults() *BrandBackground { - this := BrandBackground{} - return &this -} - -// GetUrls returns the Urls field value -func (o *BrandBackground) GetUrls() BrandBackgroundUrls { - if o == nil { - var ret BrandBackgroundUrls - return ret - } - - return o.Urls -} - -// GetUrlsOk returns a tuple with the Urls field value -// and a boolean to check if the value has been set. -func (o *BrandBackground) GetUrlsOk() (*BrandBackgroundUrls, bool) { - if o == nil { - return nil, false - } - return &o.Urls, true -} - -// SetUrls sets field value -func (o *BrandBackground) SetUrls(v BrandBackgroundUrls) { - o.Urls = v -} - -// GetFileSize returns the FileSize field value -func (o *BrandBackground) GetFileSize() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.FileSize -} - -// GetFileSizeOk returns a tuple with the FileSize field value -// and a boolean to check if the value has been set. -func (o *BrandBackground) GetFileSizeOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.FileSize, true -} - -// SetFileSize sets field value -func (o *BrandBackground) SetFileSize(v int32) { - o.FileSize = v -} - -// GetUpdatedAt returns the UpdatedAt field value -func (o *BrandBackground) GetUpdatedAt() string { - if o == nil { - var ret string - return ret - } - - return o.UpdatedAt -} - -// GetUpdatedAtOk returns a tuple with the UpdatedAt field value -// and a boolean to check if the value has been set. -func (o *BrandBackground) GetUpdatedAtOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.UpdatedAt, true -} - -// SetUpdatedAt sets field value -func (o *BrandBackground) SetUpdatedAt(v string) { - o.UpdatedAt = v -} - -// GetContentType returns the ContentType field value -func (o *BrandBackground) GetContentType() string { - if o == nil { - var ret string - return ret - } - - return o.ContentType -} - -// GetContentTypeOk returns a tuple with the ContentType field value -// and a boolean to check if the value has been set. -func (o *BrandBackground) GetContentTypeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ContentType, true -} - -// SetContentType sets field value -func (o *BrandBackground) SetContentType(v string) { - o.ContentType = v -} - -func (o BrandBackground) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o BrandBackground) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["urls"] = o.Urls - toSerialize["file_size"] = o.FileSize - toSerialize["updated_at"] = o.UpdatedAt - toSerialize["content_type"] = o.ContentType - return toSerialize, nil -} - -type NullableBrandBackground struct { - value *BrandBackground - isSet bool -} - -func (v NullableBrandBackground) Get() *BrandBackground { - return v.value -} - -func (v *NullableBrandBackground) Set(val *BrandBackground) { - v.value = val - v.isSet = true -} - -func (v NullableBrandBackground) IsSet() bool { - return v.isSet -} - -func (v *NullableBrandBackground) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableBrandBackground(val *BrandBackground) *NullableBrandBackground { - return &NullableBrandBackground{value: val, isSet: true} -} - -func (v NullableBrandBackground) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableBrandBackground) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_brand_background_urls.go b/model_brand_background_urls.go deleted file mode 100644 index bd667cb..0000000 --- a/model_brand_background_urls.go +++ /dev/null @@ -1,171 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the BrandBackgroundUrls type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &BrandBackgroundUrls{} - -// BrandBackgroundUrls struct for BrandBackgroundUrls -type BrandBackgroundUrls struct { - Original string `json:"original"` - Login string `json:"login"` - Branding string `json:"branding"` -} - -// NewBrandBackgroundUrls instantiates a new BrandBackgroundUrls 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 NewBrandBackgroundUrls(original string, login string, branding string) *BrandBackgroundUrls { - this := BrandBackgroundUrls{} - this.Original = original - this.Login = login - this.Branding = branding - return &this -} - -// NewBrandBackgroundUrlsWithDefaults instantiates a new BrandBackgroundUrls 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 NewBrandBackgroundUrlsWithDefaults() *BrandBackgroundUrls { - this := BrandBackgroundUrls{} - return &this -} - -// GetOriginal returns the Original field value -func (o *BrandBackgroundUrls) GetOriginal() string { - if o == nil { - var ret string - return ret - } - - return o.Original -} - -// GetOriginalOk returns a tuple with the Original field value -// and a boolean to check if the value has been set. -func (o *BrandBackgroundUrls) GetOriginalOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Original, true -} - -// SetOriginal sets field value -func (o *BrandBackgroundUrls) SetOriginal(v string) { - o.Original = v -} - -// GetLogin returns the Login field value -func (o *BrandBackgroundUrls) GetLogin() string { - if o == nil { - var ret string - return ret - } - - return o.Login -} - -// GetLoginOk returns a tuple with the Login field value -// and a boolean to check if the value has been set. -func (o *BrandBackgroundUrls) GetLoginOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Login, true -} - -// SetLogin sets field value -func (o *BrandBackgroundUrls) SetLogin(v string) { - o.Login = v -} - -// GetBranding returns the Branding field value -func (o *BrandBackgroundUrls) GetBranding() string { - if o == nil { - var ret string - return ret - } - - return o.Branding -} - -// GetBrandingOk returns a tuple with the Branding field value -// and a boolean to check if the value has been set. -func (o *BrandBackgroundUrls) GetBrandingOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Branding, true -} - -// SetBranding sets field value -func (o *BrandBackgroundUrls) SetBranding(v string) { - o.Branding = v -} - -func (o BrandBackgroundUrls) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o BrandBackgroundUrls) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["original"] = o.Original - toSerialize["login"] = o.Login - toSerialize["branding"] = o.Branding - return toSerialize, nil -} - -type NullableBrandBackgroundUrls struct { - value *BrandBackgroundUrls - isSet bool -} - -func (v NullableBrandBackgroundUrls) Get() *BrandBackgroundUrls { - return v.value -} - -func (v *NullableBrandBackgroundUrls) Set(val *BrandBackgroundUrls) { - v.value = val - v.isSet = true -} - -func (v NullableBrandBackgroundUrls) IsSet() bool { - return v.isSet -} - -func (v *NullableBrandBackgroundUrls) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableBrandBackgroundUrls(val *BrandBackgroundUrls) *NullableBrandBackgroundUrls { - return &NullableBrandBackgroundUrls{value: val, isSet: true} -} - -func (v NullableBrandBackgroundUrls) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableBrandBackgroundUrls) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_brand_logo.go b/model_brand_logo.go deleted file mode 100644 index 97ddf2c..0000000 --- a/model_brand_logo.go +++ /dev/null @@ -1,198 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the BrandLogo type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &BrandLogo{} - -// BrandLogo struct for BrandLogo -type BrandLogo struct { - Urls BrandLogoUrls `json:"urls"` - FileSize int32 `json:"file_size"` - UpdatedAt string `json:"updated_at"` - ContentType string `json:"content_type"` -} - -// NewBrandLogo instantiates a new BrandLogo 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 NewBrandLogo(urls BrandLogoUrls, fileSize int32, updatedAt string, contentType string) *BrandLogo { - this := BrandLogo{} - this.Urls = urls - this.FileSize = fileSize - this.UpdatedAt = updatedAt - this.ContentType = contentType - return &this -} - -// NewBrandLogoWithDefaults instantiates a new BrandLogo 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 NewBrandLogoWithDefaults() *BrandLogo { - this := BrandLogo{} - return &this -} - -// GetUrls returns the Urls field value -func (o *BrandLogo) GetUrls() BrandLogoUrls { - if o == nil { - var ret BrandLogoUrls - return ret - } - - return o.Urls -} - -// GetUrlsOk returns a tuple with the Urls field value -// and a boolean to check if the value has been set. -func (o *BrandLogo) GetUrlsOk() (*BrandLogoUrls, bool) { - if o == nil { - return nil, false - } - return &o.Urls, true -} - -// SetUrls sets field value -func (o *BrandLogo) SetUrls(v BrandLogoUrls) { - o.Urls = v -} - -// GetFileSize returns the FileSize field value -func (o *BrandLogo) GetFileSize() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.FileSize -} - -// GetFileSizeOk returns a tuple with the FileSize field value -// and a boolean to check if the value has been set. -func (o *BrandLogo) GetFileSizeOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.FileSize, true -} - -// SetFileSize sets field value -func (o *BrandLogo) SetFileSize(v int32) { - o.FileSize = v -} - -// GetUpdatedAt returns the UpdatedAt field value -func (o *BrandLogo) GetUpdatedAt() string { - if o == nil { - var ret string - return ret - } - - return o.UpdatedAt -} - -// GetUpdatedAtOk returns a tuple with the UpdatedAt field value -// and a boolean to check if the value has been set. -func (o *BrandLogo) GetUpdatedAtOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.UpdatedAt, true -} - -// SetUpdatedAt sets field value -func (o *BrandLogo) SetUpdatedAt(v string) { - o.UpdatedAt = v -} - -// GetContentType returns the ContentType field value -func (o *BrandLogo) GetContentType() string { - if o == nil { - var ret string - return ret - } - - return o.ContentType -} - -// GetContentTypeOk returns a tuple with the ContentType field value -// and a boolean to check if the value has been set. -func (o *BrandLogo) GetContentTypeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ContentType, true -} - -// SetContentType sets field value -func (o *BrandLogo) SetContentType(v string) { - o.ContentType = v -} - -func (o BrandLogo) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o BrandLogo) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["urls"] = o.Urls - toSerialize["file_size"] = o.FileSize - toSerialize["updated_at"] = o.UpdatedAt - toSerialize["content_type"] = o.ContentType - return toSerialize, nil -} - -type NullableBrandLogo struct { - value *BrandLogo - isSet bool -} - -func (v NullableBrandLogo) Get() *BrandLogo { - return v.value -} - -func (v *NullableBrandLogo) Set(val *BrandLogo) { - v.value = val - v.isSet = true -} - -func (v NullableBrandLogo) IsSet() bool { - return v.isSet -} - -func (v *NullableBrandLogo) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableBrandLogo(val *BrandLogo) *NullableBrandLogo { - return &NullableBrandLogo{value: val, isSet: true} -} - -func (v NullableBrandLogo) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableBrandLogo) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_brand_logo_urls.go b/model_brand_logo_urls.go deleted file mode 100644 index 012e4da..0000000 --- a/model_brand_logo_urls.go +++ /dev/null @@ -1,171 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the BrandLogoUrls type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &BrandLogoUrls{} - -// BrandLogoUrls struct for BrandLogoUrls -type BrandLogoUrls struct { - Original string `json:"original"` - Login string `json:"login"` - Navigation string `json:"navigation"` -} - -// NewBrandLogoUrls instantiates a new BrandLogoUrls 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 NewBrandLogoUrls(original string, login string, navigation string) *BrandLogoUrls { - this := BrandLogoUrls{} - this.Original = original - this.Login = login - this.Navigation = navigation - return &this -} - -// NewBrandLogoUrlsWithDefaults instantiates a new BrandLogoUrls 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 NewBrandLogoUrlsWithDefaults() *BrandLogoUrls { - this := BrandLogoUrls{} - return &this -} - -// GetOriginal returns the Original field value -func (o *BrandLogoUrls) GetOriginal() string { - if o == nil { - var ret string - return ret - } - - return o.Original -} - -// GetOriginalOk returns a tuple with the Original field value -// and a boolean to check if the value has been set. -func (o *BrandLogoUrls) GetOriginalOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Original, true -} - -// SetOriginal sets field value -func (o *BrandLogoUrls) SetOriginal(v string) { - o.Original = v -} - -// GetLogin returns the Login field value -func (o *BrandLogoUrls) GetLogin() string { - if o == nil { - var ret string - return ret - } - - return o.Login -} - -// GetLoginOk returns a tuple with the Login field value -// and a boolean to check if the value has been set. -func (o *BrandLogoUrls) GetLoginOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Login, true -} - -// SetLogin sets field value -func (o *BrandLogoUrls) SetLogin(v string) { - o.Login = v -} - -// GetNavigation returns the Navigation field value -func (o *BrandLogoUrls) GetNavigation() string { - if o == nil { - var ret string - return ret - } - - return o.Navigation -} - -// GetNavigationOk returns a tuple with the Navigation field value -// and a boolean to check if the value has been set. -func (o *BrandLogoUrls) GetNavigationOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Navigation, true -} - -// SetNavigation sets field value -func (o *BrandLogoUrls) SetNavigation(v string) { - o.Navigation = v -} - -func (o BrandLogoUrls) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o BrandLogoUrls) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["original"] = o.Original - toSerialize["login"] = o.Login - toSerialize["navigation"] = o.Navigation - return toSerialize, nil -} - -type NullableBrandLogoUrls struct { - value *BrandLogoUrls - isSet bool -} - -func (v NullableBrandLogoUrls) Get() *BrandLogoUrls { - return v.value -} - -func (v *NullableBrandLogoUrls) Set(val *BrandLogoUrls) { - v.value = val - v.isSet = true -} - -func (v NullableBrandLogoUrls) IsSet() bool { - return v.isSet -} - -func (v *NullableBrandLogoUrls) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableBrandLogoUrls(val *BrandLogoUrls) *NullableBrandLogoUrls { - return &NullableBrandLogoUrls{value: val, isSet: true} -} - -func (v NullableBrandLogoUrls) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableBrandLogoUrls) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_brand_req.go b/model_brand_req.go deleted file mode 100644 index 6621843..0000000 --- a/model_brand_req.go +++ /dev/null @@ -1,201 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the BrandReq type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &BrandReq{} - -// BrandReq struct for BrandReq -type BrandReq struct { - // Brand’s unique ID in OneLogin. - Id *int32 `json:"id,omitempty"` - // Indicates if the brand is enabled or not. - Enabled *bool `json:"enabled,omitempty"` - // Brand name for humans. This isn’t related to subdomains. - Name *string `json:"name,omitempty"` -} - -// NewBrandReq instantiates a new BrandReq 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 NewBrandReq() *BrandReq { - this := BrandReq{} - return &this -} - -// NewBrandReqWithDefaults instantiates a new BrandReq 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 NewBrandReqWithDefaults() *BrandReq { - this := BrandReq{} - return &this -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *BrandReq) GetId() int32 { - if o == nil || isNil(o.Id) { - var ret int32 - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BrandReq) GetIdOk() (*int32, bool) { - if o == nil || isNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *BrandReq) HasId() bool { - if o != nil && !isNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given int32 and assigns it to the Id field. -func (o *BrandReq) SetId(v int32) { - o.Id = &v -} - -// GetEnabled returns the Enabled field value if set, zero value otherwise. -func (o *BrandReq) GetEnabled() bool { - if o == nil || isNil(o.Enabled) { - 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 *BrandReq) GetEnabledOk() (*bool, bool) { - if o == nil || isNil(o.Enabled) { - return nil, false - } - return o.Enabled, true -} - -// HasEnabled returns a boolean if a field has been set. -func (o *BrandReq) HasEnabled() bool { - if o != nil && !isNil(o.Enabled) { - return true - } - - return false -} - -// SetEnabled gets a reference to the given bool and assigns it to the Enabled field. -func (o *BrandReq) SetEnabled(v bool) { - o.Enabled = &v -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *BrandReq) GetName() string { - if o == nil || isNil(o.Name) { - var ret string - return ret - } - return *o.Name -} - -// 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 *BrandReq) GetNameOk() (*string, bool) { - if o == nil || isNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *BrandReq) HasName() bool { - if o != nil && !isNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *BrandReq) SetName(v string) { - o.Name = &v -} - -func (o BrandReq) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o BrandReq) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Id) { - toSerialize["id"] = o.Id - } - if !isNil(o.Enabled) { - toSerialize["enabled"] = o.Enabled - } - if !isNil(o.Name) { - toSerialize["name"] = o.Name - } - return toSerialize, nil -} - -type NullableBrandReq struct { - value *BrandReq - isSet bool -} - -func (v NullableBrandReq) Get() *BrandReq { - return v.value -} - -func (v *NullableBrandReq) Set(val *BrandReq) { - v.value = val - v.isSet = true -} - -func (v NullableBrandReq) IsSet() bool { - return v.isSet -} - -func (v *NullableBrandReq) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableBrandReq(val *BrandReq) *NullableBrandReq { - return &NullableBrandReq{value: val, isSet: true} -} - -func (v NullableBrandReq) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableBrandReq) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_client_app_full.go b/model_client_app_full.go deleted file mode 100644 index 755e71c..0000000 --- a/model_client_app_full.go +++ /dev/null @@ -1,237 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the ClientAppFull type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ClientAppFull{} - -// ClientAppFull struct for ClientAppFull -type ClientAppFull struct { - // List of All Scopes assigned to a client app - Scopes []Scope `json:"scopes,omitempty"` - // Unique Client App ID - AppId *int32 `json:"app_id,omitempty"` - // Name of client app - Name *string `json:"name,omitempty"` - ApiAuthId *int32 `json:"api_auth_id,omitempty"` -} - -// NewClientAppFull instantiates a new ClientAppFull 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 NewClientAppFull() *ClientAppFull { - this := ClientAppFull{} - return &this -} - -// NewClientAppFullWithDefaults instantiates a new ClientAppFull 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 NewClientAppFullWithDefaults() *ClientAppFull { - this := ClientAppFull{} - return &this -} - -// GetScopes returns the Scopes field value if set, zero value otherwise. -func (o *ClientAppFull) GetScopes() []Scope { - if o == nil || isNil(o.Scopes) { - var ret []Scope - return ret - } - return o.Scopes -} - -// GetScopesOk returns a tuple with the Scopes field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ClientAppFull) GetScopesOk() ([]Scope, bool) { - if o == nil || isNil(o.Scopes) { - return nil, false - } - return o.Scopes, true -} - -// HasScopes returns a boolean if a field has been set. -func (o *ClientAppFull) HasScopes() bool { - if o != nil && !isNil(o.Scopes) { - return true - } - - return false -} - -// SetScopes gets a reference to the given []Scope and assigns it to the Scopes field. -func (o *ClientAppFull) SetScopes(v []Scope) { - o.Scopes = v -} - -// GetAppId returns the AppId field value if set, zero value otherwise. -func (o *ClientAppFull) GetAppId() int32 { - if o == nil || isNil(o.AppId) { - var ret int32 - return ret - } - return *o.AppId -} - -// GetAppIdOk returns a tuple with the AppId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ClientAppFull) GetAppIdOk() (*int32, bool) { - if o == nil || isNil(o.AppId) { - return nil, false - } - return o.AppId, true -} - -// HasAppId returns a boolean if a field has been set. -func (o *ClientAppFull) HasAppId() bool { - if o != nil && !isNil(o.AppId) { - return true - } - - return false -} - -// SetAppId gets a reference to the given int32 and assigns it to the AppId field. -func (o *ClientAppFull) SetAppId(v int32) { - o.AppId = &v -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *ClientAppFull) GetName() string { - if o == nil || isNil(o.Name) { - var ret string - return ret - } - return *o.Name -} - -// 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 *ClientAppFull) GetNameOk() (*string, bool) { - if o == nil || isNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *ClientAppFull) HasName() bool { - if o != nil && !isNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *ClientAppFull) SetName(v string) { - o.Name = &v -} - -// GetApiAuthId returns the ApiAuthId field value if set, zero value otherwise. -func (o *ClientAppFull) GetApiAuthId() int32 { - if o == nil || isNil(o.ApiAuthId) { - var ret int32 - return ret - } - return *o.ApiAuthId -} - -// GetApiAuthIdOk returns a tuple with the ApiAuthId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ClientAppFull) GetApiAuthIdOk() (*int32, bool) { - if o == nil || isNil(o.ApiAuthId) { - return nil, false - } - return o.ApiAuthId, true -} - -// HasApiAuthId returns a boolean if a field has been set. -func (o *ClientAppFull) HasApiAuthId() bool { - if o != nil && !isNil(o.ApiAuthId) { - return true - } - - return false -} - -// SetApiAuthId gets a reference to the given int32 and assigns it to the ApiAuthId field. -func (o *ClientAppFull) SetApiAuthId(v int32) { - o.ApiAuthId = &v -} - -func (o ClientAppFull) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ClientAppFull) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Scopes) { - toSerialize["scopes"] = o.Scopes - } - if !isNil(o.AppId) { - toSerialize["app_id"] = o.AppId - } - if !isNil(o.Name) { - toSerialize["name"] = o.Name - } - if !isNil(o.ApiAuthId) { - toSerialize["api_auth_id"] = o.ApiAuthId - } - return toSerialize, nil -} - -type NullableClientAppFull struct { - value *ClientAppFull - isSet bool -} - -func (v NullableClientAppFull) Get() *ClientAppFull { - return v.value -} - -func (v *NullableClientAppFull) Set(val *ClientAppFull) { - v.value = val - v.isSet = true -} - -func (v NullableClientAppFull) IsSet() bool { - return v.isSet -} - -func (v *NullableClientAppFull) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableClientAppFull(val *ClientAppFull) *NullableClientAppFull { - return &NullableClientAppFull{value: val, isSet: true} -} - -func (v NullableClientAppFull) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableClientAppFull) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_clock_counter.go b/model_clock_counter.go deleted file mode 100644 index 449d708..0000000 --- a/model_clock_counter.go +++ /dev/null @@ -1,162 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the ClockCounter type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ClockCounter{} - -// ClockCounter unit: - 0 = Seconds - 1 = Minutes - 2 = Hours value: - When Unit = 0 or 1 value must be 0-60 - When Unit = 2 value must be 0-24 -type ClockCounter struct { - Value *int32 `json:"value,omitempty"` - Unit *int32 `json:"unit,omitempty"` -} - -// NewClockCounter instantiates a new ClockCounter 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 NewClockCounter() *ClockCounter { - this := ClockCounter{} - return &this -} - -// NewClockCounterWithDefaults instantiates a new ClockCounter 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 NewClockCounterWithDefaults() *ClockCounter { - this := ClockCounter{} - return &this -} - -// GetValue returns the Value field value if set, zero value otherwise. -func (o *ClockCounter) GetValue() int32 { - if o == nil || isNil(o.Value) { - var ret int32 - return ret - } - return *o.Value -} - -// GetValueOk returns a tuple with the Value field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ClockCounter) GetValueOk() (*int32, bool) { - if o == nil || isNil(o.Value) { - return nil, false - } - return o.Value, true -} - -// HasValue returns a boolean if a field has been set. -func (o *ClockCounter) HasValue() bool { - if o != nil && !isNil(o.Value) { - return true - } - - return false -} - -// SetValue gets a reference to the given int32 and assigns it to the Value field. -func (o *ClockCounter) SetValue(v int32) { - o.Value = &v -} - -// GetUnit returns the Unit field value if set, zero value otherwise. -func (o *ClockCounter) GetUnit() int32 { - if o == nil || isNil(o.Unit) { - var ret int32 - return ret - } - return *o.Unit -} - -// GetUnitOk returns a tuple with the Unit field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ClockCounter) GetUnitOk() (*int32, bool) { - if o == nil || isNil(o.Unit) { - return nil, false - } - return o.Unit, true -} - -// HasUnit returns a boolean if a field has been set. -func (o *ClockCounter) HasUnit() bool { - if o != nil && !isNil(o.Unit) { - return true - } - - return false -} - -// SetUnit gets a reference to the given int32 and assigns it to the Unit field. -func (o *ClockCounter) SetUnit(v int32) { - o.Unit = &v -} - -func (o ClockCounter) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ClockCounter) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Value) { - toSerialize["value"] = o.Value - } - if !isNil(o.Unit) { - toSerialize["unit"] = o.Unit - } - return toSerialize, nil -} - -type NullableClockCounter struct { - value *ClockCounter - isSet bool -} - -func (v NullableClockCounter) Get() *ClockCounter { - return v.value -} - -func (v *NullableClockCounter) Set(val *ClockCounter) { - v.value = val - v.isSet = true -} - -func (v NullableClockCounter) IsSet() bool { - return v.isSet -} - -func (v *NullableClockCounter) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableClockCounter(val *ClockCounter) *NullableClockCounter { - return &NullableClockCounter{value: val, isSet: true} -} - -func (v NullableClockCounter) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableClockCounter) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_condition.go b/model_condition.go deleted file mode 100644 index a4d248f..0000000 --- a/model_condition.go +++ /dev/null @@ -1,201 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the Condition type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Condition{} - -// Condition Conditions in which mappings are applied -type Condition struct { - // source field to check. - Source *string `json:"source,omitempty"` - // A valid operator for the selected condition source - Operator *string `json:"operator,omitempty"` - // A plain text string or valid value for the selected condition source - Value *string `json:"value,omitempty"` -} - -// NewCondition instantiates a new Condition 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 NewCondition() *Condition { - this := Condition{} - return &this -} - -// NewConditionWithDefaults instantiates a new Condition 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 NewConditionWithDefaults() *Condition { - this := Condition{} - return &this -} - -// GetSource returns the Source field value if set, zero value otherwise. -func (o *Condition) GetSource() string { - if o == nil || isNil(o.Source) { - var ret string - return ret - } - return *o.Source -} - -// GetSourceOk returns a tuple with the Source field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Condition) GetSourceOk() (*string, bool) { - if o == nil || isNil(o.Source) { - return nil, false - } - return o.Source, true -} - -// HasSource returns a boolean if a field has been set. -func (o *Condition) HasSource() bool { - if o != nil && !isNil(o.Source) { - return true - } - - return false -} - -// SetSource gets a reference to the given string and assigns it to the Source field. -func (o *Condition) SetSource(v string) { - o.Source = &v -} - -// GetOperator returns the Operator field value if set, zero value otherwise. -func (o *Condition) GetOperator() string { - if o == nil || isNil(o.Operator) { - var ret string - return ret - } - return *o.Operator -} - -// GetOperatorOk returns a tuple with the Operator field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Condition) GetOperatorOk() (*string, bool) { - if o == nil || isNil(o.Operator) { - return nil, false - } - return o.Operator, true -} - -// HasOperator returns a boolean if a field has been set. -func (o *Condition) HasOperator() bool { - if o != nil && !isNil(o.Operator) { - return true - } - - return false -} - -// SetOperator gets a reference to the given string and assigns it to the Operator field. -func (o *Condition) SetOperator(v string) { - o.Operator = &v -} - -// GetValue returns the Value field value if set, zero value otherwise. -func (o *Condition) GetValue() string { - if o == nil || isNil(o.Value) { - var ret string - return ret - } - return *o.Value -} - -// GetValueOk returns a tuple with the Value field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Condition) GetValueOk() (*string, bool) { - if o == nil || isNil(o.Value) { - return nil, false - } - return o.Value, true -} - -// HasValue returns a boolean if a field has been set. -func (o *Condition) HasValue() bool { - if o != nil && !isNil(o.Value) { - return true - } - - return false -} - -// SetValue gets a reference to the given string and assigns it to the Value field. -func (o *Condition) SetValue(v string) { - o.Value = &v -} - -func (o Condition) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Condition) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Source) { - toSerialize["source"] = o.Source - } - if !isNil(o.Operator) { - toSerialize["operator"] = o.Operator - } - if !isNil(o.Value) { - toSerialize["value"] = o.Value - } - return toSerialize, nil -} - -type NullableCondition struct { - value *Condition - isSet bool -} - -func (v NullableCondition) Get() *Condition { - return v.value -} - -func (v *NullableCondition) Set(val *Condition) { - v.value = val - v.isSet = true -} - -func (v NullableCondition) IsSet() bool { - return v.isSet -} - -func (v *NullableCondition) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCondition(val *Condition) *NullableCondition { - return &NullableCondition{value: val, isSet: true} -} - -func (v NullableCondition) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCondition) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_configuration_oidc.go b/model_configuration_oidc.go deleted file mode 100644 index 72ff735..0000000 --- a/model_configuration_oidc.go +++ /dev/null @@ -1,258 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the ConfigurationOidc type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ConfigurationOidc{} - -// ConfigurationOidc struct for ConfigurationOidc -type ConfigurationOidc struct { - // The OpenId Connect Client Id. Note that client_secret is only returned after Creating an App. - LoginUrl string `json:"login_url"` - // Comma or newline separated list of valid redirect uris for the OpenId Connect Authorization Code flow. - RedirectUri string `json:"redirect_uri"` - // Number of minutes the refresh token will be valid for. - AccessTokenExpirationMinutes int32 `json:"access_token_expiration_minutes"` - // Number of minutes the refresh token will be valid for. - RefreshTokenExpirationMinutes int32 `json:"refresh_token_expiration_minutes"` - // - 0: Basic - 1: POST - 2: None / PKCE - TokenEndpointAuthMethod int32 `json:"token_endpoint_auth_method"` - // - 0 : Web - 1 : Native / Mobile - OidcApplicationType int32 `json:"oidc_application_type"` -} - -// NewConfigurationOidc instantiates a new ConfigurationOidc 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 NewConfigurationOidc(loginUrl string, redirectUri string, accessTokenExpirationMinutes int32, refreshTokenExpirationMinutes int32, tokenEndpointAuthMethod int32, oidcApplicationType int32) *ConfigurationOidc { - this := ConfigurationOidc{} - this.LoginUrl = loginUrl - this.RedirectUri = redirectUri - this.AccessTokenExpirationMinutes = accessTokenExpirationMinutes - this.RefreshTokenExpirationMinutes = refreshTokenExpirationMinutes - this.TokenEndpointAuthMethod = tokenEndpointAuthMethod - this.OidcApplicationType = oidcApplicationType - return &this -} - -// NewConfigurationOidcWithDefaults instantiates a new ConfigurationOidc 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 NewConfigurationOidcWithDefaults() *ConfigurationOidc { - this := ConfigurationOidc{} - return &this -} - -// GetLoginUrl returns the LoginUrl field value -func (o *ConfigurationOidc) GetLoginUrl() string { - if o == nil { - var ret string - return ret - } - - return o.LoginUrl -} - -// GetLoginUrlOk returns a tuple with the LoginUrl field value -// and a boolean to check if the value has been set. -func (o *ConfigurationOidc) GetLoginUrlOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.LoginUrl, true -} - -// SetLoginUrl sets field value -func (o *ConfigurationOidc) SetLoginUrl(v string) { - o.LoginUrl = v -} - -// GetRedirectUri returns the RedirectUri field value -func (o *ConfigurationOidc) GetRedirectUri() string { - if o == nil { - var ret string - return ret - } - - return o.RedirectUri -} - -// GetRedirectUriOk returns a tuple with the RedirectUri field value -// and a boolean to check if the value has been set. -func (o *ConfigurationOidc) GetRedirectUriOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.RedirectUri, true -} - -// SetRedirectUri sets field value -func (o *ConfigurationOidc) SetRedirectUri(v string) { - o.RedirectUri = v -} - -// GetAccessTokenExpirationMinutes returns the AccessTokenExpirationMinutes field value -func (o *ConfigurationOidc) GetAccessTokenExpirationMinutes() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.AccessTokenExpirationMinutes -} - -// GetAccessTokenExpirationMinutesOk returns a tuple with the AccessTokenExpirationMinutes field value -// and a boolean to check if the value has been set. -func (o *ConfigurationOidc) GetAccessTokenExpirationMinutesOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.AccessTokenExpirationMinutes, true -} - -// SetAccessTokenExpirationMinutes sets field value -func (o *ConfigurationOidc) SetAccessTokenExpirationMinutes(v int32) { - o.AccessTokenExpirationMinutes = v -} - -// GetRefreshTokenExpirationMinutes returns the RefreshTokenExpirationMinutes field value -func (o *ConfigurationOidc) GetRefreshTokenExpirationMinutes() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.RefreshTokenExpirationMinutes -} - -// GetRefreshTokenExpirationMinutesOk returns a tuple with the RefreshTokenExpirationMinutes field value -// and a boolean to check if the value has been set. -func (o *ConfigurationOidc) GetRefreshTokenExpirationMinutesOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.RefreshTokenExpirationMinutes, true -} - -// SetRefreshTokenExpirationMinutes sets field value -func (o *ConfigurationOidc) SetRefreshTokenExpirationMinutes(v int32) { - o.RefreshTokenExpirationMinutes = v -} - -// GetTokenEndpointAuthMethod returns the TokenEndpointAuthMethod field value -func (o *ConfigurationOidc) GetTokenEndpointAuthMethod() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.TokenEndpointAuthMethod -} - -// GetTokenEndpointAuthMethodOk returns a tuple with the TokenEndpointAuthMethod field value -// and a boolean to check if the value has been set. -func (o *ConfigurationOidc) GetTokenEndpointAuthMethodOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.TokenEndpointAuthMethod, true -} - -// SetTokenEndpointAuthMethod sets field value -func (o *ConfigurationOidc) SetTokenEndpointAuthMethod(v int32) { - o.TokenEndpointAuthMethod = v -} - -// GetOidcApplicationType returns the OidcApplicationType field value -func (o *ConfigurationOidc) GetOidcApplicationType() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.OidcApplicationType -} - -// GetOidcApplicationTypeOk returns a tuple with the OidcApplicationType field value -// and a boolean to check if the value has been set. -func (o *ConfigurationOidc) GetOidcApplicationTypeOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.OidcApplicationType, true -} - -// SetOidcApplicationType sets field value -func (o *ConfigurationOidc) SetOidcApplicationType(v int32) { - o.OidcApplicationType = v -} - -func (o ConfigurationOidc) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ConfigurationOidc) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["login_url"] = o.LoginUrl - toSerialize["redirect_uri"] = o.RedirectUri - toSerialize["access_token_expiration_minutes"] = o.AccessTokenExpirationMinutes - toSerialize["refresh_token_expiration_minutes"] = o.RefreshTokenExpirationMinutes - toSerialize["token_endpoint_auth_method"] = o.TokenEndpointAuthMethod - toSerialize["oidc_application_type"] = o.OidcApplicationType - return toSerialize, nil -} - -type NullableConfigurationOidc struct { - value *ConfigurationOidc - isSet bool -} - -func (v NullableConfigurationOidc) Get() *ConfigurationOidc { - return v.value -} - -func (v *NullableConfigurationOidc) Set(val *ConfigurationOidc) { - v.value = val - v.isSet = true -} - -func (v NullableConfigurationOidc) IsSet() bool { - return v.isSet -} - -func (v *NullableConfigurationOidc) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableConfigurationOidc(val *ConfigurationOidc) *NullableConfigurationOidc { - return &NullableConfigurationOidc{value: val, isSet: true} -} - -func (v NullableConfigurationOidc) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableConfigurationOidc) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_configuration_saml.go b/model_configuration_saml.go deleted file mode 100644 index 4241f3d..0000000 --- a/model_configuration_saml.go +++ /dev/null @@ -1,146 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the ConfigurationSaml type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ConfigurationSaml{} - -// ConfigurationSaml struct for ConfigurationSaml -type ConfigurationSaml struct { - // One of the following: - SHA-1 - SHA-256 - SHA-348 - SHA-512 - SignatureAlgorithm string `json:"signature_algorithm"` - // When creating apps the default certificate will be used unless the `certificate_id` attribute is applied in the `configuration` object. - CertificateId int32 `json:"certificate_id"` -} - -// NewConfigurationSaml instantiates a new ConfigurationSaml 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 NewConfigurationSaml(signatureAlgorithm string, certificateId int32) *ConfigurationSaml { - this := ConfigurationSaml{} - this.SignatureAlgorithm = signatureAlgorithm - this.CertificateId = certificateId - return &this -} - -// NewConfigurationSamlWithDefaults instantiates a new ConfigurationSaml 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 NewConfigurationSamlWithDefaults() *ConfigurationSaml { - this := ConfigurationSaml{} - return &this -} - -// GetSignatureAlgorithm returns the SignatureAlgorithm field value -func (o *ConfigurationSaml) GetSignatureAlgorithm() string { - if o == nil { - var ret string - return ret - } - - return o.SignatureAlgorithm -} - -// GetSignatureAlgorithmOk returns a tuple with the SignatureAlgorithm field value -// and a boolean to check if the value has been set. -func (o *ConfigurationSaml) GetSignatureAlgorithmOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.SignatureAlgorithm, true -} - -// SetSignatureAlgorithm sets field value -func (o *ConfigurationSaml) SetSignatureAlgorithm(v string) { - o.SignatureAlgorithm = v -} - -// GetCertificateId returns the CertificateId field value -func (o *ConfigurationSaml) GetCertificateId() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.CertificateId -} - -// GetCertificateIdOk returns a tuple with the CertificateId field value -// and a boolean to check if the value has been set. -func (o *ConfigurationSaml) GetCertificateIdOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.CertificateId, true -} - -// SetCertificateId sets field value -func (o *ConfigurationSaml) SetCertificateId(v int32) { - o.CertificateId = v -} - -func (o ConfigurationSaml) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ConfigurationSaml) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["signature_algorithm"] = o.SignatureAlgorithm - toSerialize["certificate_id"] = o.CertificateId - return toSerialize, nil -} - -type NullableConfigurationSaml struct { - value *ConfigurationSaml - isSet bool -} - -func (v NullableConfigurationSaml) Get() *ConfigurationSaml { - return v.value -} - -func (v *NullableConfigurationSaml) Set(val *ConfigurationSaml) { - v.value = val - v.isSet = true -} - -func (v NullableConfigurationSaml) IsSet() bool { - return v.isSet -} - -func (v *NullableConfigurationSaml) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableConfigurationSaml(val *ConfigurationSaml) *NullableConfigurationSaml { - return &NullableConfigurationSaml{value: val, isSet: true} -} - -func (v NullableConfigurationSaml) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableConfigurationSaml) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_connector.go b/model_connector.go deleted file mode 100644 index ce6f8fb..0000000 --- a/model_connector.go +++ /dev/null @@ -1,274 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the Connector type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Connector{} - -// Connector struct for Connector -type Connector struct { - // Connectors unique ID in OneLogin. - Id *int32 `json:"id,omitempty"` - // Name of Connector - Name *string `json:"name,omitempty"` - // A link to the icon's url. - IconUrl *string `json:"icon_url,omitempty"` - AuthMethod *AuthMethod `json:"auth_method,omitempty"` - // Indicates if apps created using this connector will be allowed to create custom parameters. - AllowsNewParameters *bool `json:"allows_new_parameters,omitempty"` -} - -// NewConnector instantiates a new Connector 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 NewConnector() *Connector { - this := Connector{} - return &this -} - -// NewConnectorWithDefaults instantiates a new Connector 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 NewConnectorWithDefaults() *Connector { - this := Connector{} - return &this -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *Connector) GetId() int32 { - if o == nil || isNil(o.Id) { - var ret int32 - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Connector) GetIdOk() (*int32, bool) { - if o == nil || isNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *Connector) HasId() bool { - if o != nil && !isNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given int32 and assigns it to the Id field. -func (o *Connector) SetId(v int32) { - o.Id = &v -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *Connector) GetName() string { - if o == nil || isNil(o.Name) { - var ret string - return ret - } - return *o.Name -} - -// 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 *Connector) GetNameOk() (*string, bool) { - if o == nil || isNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *Connector) HasName() bool { - if o != nil && !isNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *Connector) SetName(v string) { - o.Name = &v -} - -// GetIconUrl returns the IconUrl field value if set, zero value otherwise. -func (o *Connector) GetIconUrl() string { - if o == nil || isNil(o.IconUrl) { - var ret string - return ret - } - return *o.IconUrl -} - -// 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 *Connector) GetIconUrlOk() (*string, bool) { - if o == nil || isNil(o.IconUrl) { - return nil, false - } - return o.IconUrl, true -} - -// HasIconUrl returns a boolean if a field has been set. -func (o *Connector) HasIconUrl() bool { - if o != nil && !isNil(o.IconUrl) { - return true - } - - return false -} - -// SetIconUrl gets a reference to the given string and assigns it to the IconUrl field. -func (o *Connector) SetIconUrl(v string) { - o.IconUrl = &v -} - -// GetAuthMethod returns the AuthMethod field value if set, zero value otherwise. -func (o *Connector) GetAuthMethod() AuthMethod { - if o == nil || isNil(o.AuthMethod) { - var ret AuthMethod - return ret - } - return *o.AuthMethod -} - -// GetAuthMethodOk returns a tuple with the AuthMethod field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Connector) GetAuthMethodOk() (*AuthMethod, bool) { - if o == nil || isNil(o.AuthMethod) { - return nil, false - } - return o.AuthMethod, true -} - -// HasAuthMethod returns a boolean if a field has been set. -func (o *Connector) HasAuthMethod() bool { - if o != nil && !isNil(o.AuthMethod) { - return true - } - - return false -} - -// SetAuthMethod gets a reference to the given AuthMethod and assigns it to the AuthMethod field. -func (o *Connector) SetAuthMethod(v AuthMethod) { - o.AuthMethod = &v -} - -// GetAllowsNewParameters returns the AllowsNewParameters field value if set, zero value otherwise. -func (o *Connector) GetAllowsNewParameters() bool { - if o == nil || isNil(o.AllowsNewParameters) { - var ret bool - return ret - } - return *o.AllowsNewParameters -} - -// GetAllowsNewParametersOk returns a tuple with the AllowsNewParameters field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Connector) GetAllowsNewParametersOk() (*bool, bool) { - if o == nil || isNil(o.AllowsNewParameters) { - return nil, false - } - return o.AllowsNewParameters, true -} - -// HasAllowsNewParameters returns a boolean if a field has been set. -func (o *Connector) HasAllowsNewParameters() bool { - if o != nil && !isNil(o.AllowsNewParameters) { - return true - } - - return false -} - -// SetAllowsNewParameters gets a reference to the given bool and assigns it to the AllowsNewParameters field. -func (o *Connector) SetAllowsNewParameters(v bool) { - o.AllowsNewParameters = &v -} - -func (o Connector) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Connector) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Id) { - toSerialize["id"] = o.Id - } - if !isNil(o.Name) { - toSerialize["name"] = o.Name - } - if !isNil(o.IconUrl) { - toSerialize["icon_url"] = o.IconUrl - } - if !isNil(o.AuthMethod) { - toSerialize["auth_method"] = o.AuthMethod - } - if !isNil(o.AllowsNewParameters) { - toSerialize["allows_new_parameters"] = o.AllowsNewParameters - } - return toSerialize, nil -} - -type NullableConnector struct { - value *Connector - isSet bool -} - -func (v NullableConnector) Get() *Connector { - return v.value -} - -func (v *NullableConnector) Set(val *Connector) { - v.value = val - v.isSet = true -} - -func (v NullableConnector) IsSet() bool { - return v.isSet -} - -func (v *NullableConnector) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableConnector(val *Connector) *NullableConnector { - return &NullableConnector{value: val, isSet: true} -} - -func (v NullableConnector) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableConnector) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_create_app_200_response.go b/model_create_app_200_response.go deleted file mode 100644 index f0c1cc6..0000000 --- a/model_create_app_200_response.go +++ /dev/null @@ -1,178 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" - "fmt" -) - -// CreateApp200Response - struct for CreateApp200Response -type CreateApp200Response struct { - GenericApp *GenericApp - OidcApp *OidcApp - SamlApp *SamlApp -} - -// GenericAppAsCreateApp200Response is a convenience function that returns GenericApp wrapped in CreateApp200Response -func GenericAppAsCreateApp200Response(v *GenericApp) CreateApp200Response { - return CreateApp200Response{ - GenericApp: v, - } -} - -// OidcAppAsCreateApp200Response is a convenience function that returns OidcApp wrapped in CreateApp200Response -func OidcAppAsCreateApp200Response(v *OidcApp) CreateApp200Response { - return CreateApp200Response{ - OidcApp: v, - } -} - -// SamlAppAsCreateApp200Response is a convenience function that returns SamlApp wrapped in CreateApp200Response -func SamlAppAsCreateApp200Response(v *SamlApp) CreateApp200Response { - return CreateApp200Response{ - SamlApp: v, - } -} - - -// Unmarshal JSON data into one of the pointers in the struct -func (dst *CreateApp200Response) UnmarshalJSON(data []byte) error { - var err error - match := 0 - // try to unmarshal data into GenericApp - err = newStrictDecoder(data).Decode(&dst.GenericApp) - if err == nil { - jsonGenericApp, _ := json.Marshal(dst.GenericApp) - if string(jsonGenericApp) == "{}" { // empty struct - dst.GenericApp = nil - } else { - match++ - } - } else { - dst.GenericApp = nil - } - - // try to unmarshal data into OidcApp - err = newStrictDecoder(data).Decode(&dst.OidcApp) - if err == nil { - jsonOidcApp, _ := json.Marshal(dst.OidcApp) - if string(jsonOidcApp) == "{}" { // empty struct - dst.OidcApp = nil - } else { - match++ - } - } else { - dst.OidcApp = nil - } - - // try to unmarshal data into SamlApp - err = newStrictDecoder(data).Decode(&dst.SamlApp) - if err == nil { - jsonSamlApp, _ := json.Marshal(dst.SamlApp) - if string(jsonSamlApp) == "{}" { // empty struct - dst.SamlApp = nil - } else { - match++ - } - } else { - dst.SamlApp = nil - } - - if match > 1 { // more than 1 match - // reset to nil - dst.GenericApp = nil - dst.OidcApp = nil - dst.SamlApp = nil - - return fmt.Errorf("data matches more than one schema in oneOf(CreateApp200Response)") - } else if match == 1 { - return nil // exactly one match - } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf(CreateApp200Response)") - } -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src CreateApp200Response) MarshalJSON() ([]byte, error) { - if src.GenericApp != nil { - return json.Marshal(&src.GenericApp) - } - - if src.OidcApp != nil { - return json.Marshal(&src.OidcApp) - } - - if src.SamlApp != nil { - return json.Marshal(&src.SamlApp) - } - - return nil, nil // no data in oneOf schemas -} - -// Get the actual instance -func (obj *CreateApp200Response) GetActualInstance() (interface{}) { - if obj == nil { - return nil - } - if obj.GenericApp != nil { - return obj.GenericApp - } - - if obj.OidcApp != nil { - return obj.OidcApp - } - - if obj.SamlApp != nil { - return obj.SamlApp - } - - // all schemas are nil - return nil -} - -type NullableCreateApp200Response struct { - value *CreateApp200Response - isSet bool -} - -func (v NullableCreateApp200Response) Get() *CreateApp200Response { - return v.value -} - -func (v *NullableCreateApp200Response) Set(val *CreateApp200Response) { - v.value = val - v.isSet = true -} - -func (v NullableCreateApp200Response) IsSet() bool { - return v.isSet -} - -func (v *NullableCreateApp200Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCreateApp200Response(val *CreateApp200Response) *NullableCreateApp200Response { - return &NullableCreateApp200Response{value: val, isSet: true} -} - -func (v NullableCreateApp200Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCreateApp200Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_create_app_request.go b/model_create_app_request.go deleted file mode 100644 index c8cd922..0000000 --- a/model_create_app_request.go +++ /dev/null @@ -1,178 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" - "fmt" -) - -// CreateAppRequest - struct for CreateAppRequest -type CreateAppRequest struct { - GenericApp *GenericApp - OidcApp *OidcApp - SamlApp *SamlApp -} - -// GenericAppAsCreateAppRequest is a convenience function that returns GenericApp wrapped in CreateAppRequest -func GenericAppAsCreateAppRequest(v *GenericApp) CreateAppRequest { - return CreateAppRequest{ - GenericApp: v, - } -} - -// OidcAppAsCreateAppRequest is a convenience function that returns OidcApp wrapped in CreateAppRequest -func OidcAppAsCreateAppRequest(v *OidcApp) CreateAppRequest { - return CreateAppRequest{ - OidcApp: v, - } -} - -// SamlAppAsCreateAppRequest is a convenience function that returns SamlApp wrapped in CreateAppRequest -func SamlAppAsCreateAppRequest(v *SamlApp) CreateAppRequest { - return CreateAppRequest{ - SamlApp: v, - } -} - - -// Unmarshal JSON data into one of the pointers in the struct -func (dst *CreateAppRequest) UnmarshalJSON(data []byte) error { - var err error - match := 0 - // try to unmarshal data into GenericApp - err = newStrictDecoder(data).Decode(&dst.GenericApp) - if err == nil { - jsonGenericApp, _ := json.Marshal(dst.GenericApp) - if string(jsonGenericApp) == "{}" { // empty struct - dst.GenericApp = nil - } else { - match++ - } - } else { - dst.GenericApp = nil - } - - // try to unmarshal data into OidcApp - err = newStrictDecoder(data).Decode(&dst.OidcApp) - if err == nil { - jsonOidcApp, _ := json.Marshal(dst.OidcApp) - if string(jsonOidcApp) == "{}" { // empty struct - dst.OidcApp = nil - } else { - match++ - } - } else { - dst.OidcApp = nil - } - - // try to unmarshal data into SamlApp - err = newStrictDecoder(data).Decode(&dst.SamlApp) - if err == nil { - jsonSamlApp, _ := json.Marshal(dst.SamlApp) - if string(jsonSamlApp) == "{}" { // empty struct - dst.SamlApp = nil - } else { - match++ - } - } else { - dst.SamlApp = nil - } - - if match > 1 { // more than 1 match - // reset to nil - dst.GenericApp = nil - dst.OidcApp = nil - dst.SamlApp = nil - - return fmt.Errorf("data matches more than one schema in oneOf(CreateAppRequest)") - } else if match == 1 { - return nil // exactly one match - } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf(CreateAppRequest)") - } -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src CreateAppRequest) MarshalJSON() ([]byte, error) { - if src.GenericApp != nil { - return json.Marshal(&src.GenericApp) - } - - if src.OidcApp != nil { - return json.Marshal(&src.OidcApp) - } - - if src.SamlApp != nil { - return json.Marshal(&src.SamlApp) - } - - return nil, nil // no data in oneOf schemas -} - -// Get the actual instance -func (obj *CreateAppRequest) GetActualInstance() (interface{}) { - if obj == nil { - return nil - } - if obj.GenericApp != nil { - return obj.GenericApp - } - - if obj.OidcApp != nil { - return obj.OidcApp - } - - if obj.SamlApp != nil { - return obj.SamlApp - } - - // all schemas are nil - return nil -} - -type NullableCreateAppRequest struct { - value *CreateAppRequest - isSet bool -} - -func (v NullableCreateAppRequest) Get() *CreateAppRequest { - return v.value -} - -func (v *NullableCreateAppRequest) Set(val *CreateAppRequest) { - v.value = val - v.isSet = true -} - -func (v NullableCreateAppRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableCreateAppRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCreateAppRequest(val *CreateAppRequest) *NullableCreateAppRequest { - return &NullableCreateAppRequest{value: val, isSet: true} -} - -func (v NullableCreateAppRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCreateAppRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_create_device_verification_201_response.go b/model_create_device_verification_201_response.go deleted file mode 100644 index ca406fc..0000000 --- a/model_create_device_verification_201_response.go +++ /dev/null @@ -1,386 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the CreateDeviceVerification201Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateDeviceVerification201Response{} - -// CreateDeviceVerification201Response struct for CreateDeviceVerification201Response -type CreateDeviceVerification201Response struct { - // Specifies the factor to be verified. - DeviceId *int32 `json:"device_id,omitempty"` - // A name for the users device - DisplayName *string `json:"display_name,omitempty"` - // A short lived token that is required to Verify the Factor. This token expires based on the expires_in parameter passed in. - ExpiresAt *string `json:"expires_at,omitempty"` - // Only applies to Email MagicLink factor. Redirects MagicLink success page to specified URL after 2 seconds. Email must already be configured by the user. - RedirectTo *string `json:"redirect_to,omitempty"` - // Authentication factor display name assigned by users when they register the device. - UserDisplayName *string `json:"user_display_name,omitempty"` - // Registration identifier. - Id *string `json:"id,omitempty"` - // Authentication factor display name as it appears to users upon initial registration, as defined by admins at Settings > Authentication Factors. - TypeDisplayName *string `json:"type_display_name,omitempty"` - // Authentication factor name, as it appears to administrators in OneLogin. - AuthFactorName *string `json:"auth_factor_name,omitempty"` -} - -// NewCreateDeviceVerification201Response instantiates a new CreateDeviceVerification201Response 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 NewCreateDeviceVerification201Response() *CreateDeviceVerification201Response { - this := CreateDeviceVerification201Response{} - return &this -} - -// NewCreateDeviceVerification201ResponseWithDefaults instantiates a new CreateDeviceVerification201Response 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 NewCreateDeviceVerification201ResponseWithDefaults() *CreateDeviceVerification201Response { - this := CreateDeviceVerification201Response{} - return &this -} - -// GetDeviceId returns the DeviceId field value if set, zero value otherwise. -func (o *CreateDeviceVerification201Response) GetDeviceId() int32 { - if o == nil || isNil(o.DeviceId) { - var ret int32 - return ret - } - return *o.DeviceId -} - -// GetDeviceIdOk returns a tuple with the DeviceId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateDeviceVerification201Response) GetDeviceIdOk() (*int32, bool) { - if o == nil || isNil(o.DeviceId) { - return nil, false - } - return o.DeviceId, true -} - -// HasDeviceId returns a boolean if a field has been set. -func (o *CreateDeviceVerification201Response) HasDeviceId() bool { - if o != nil && !isNil(o.DeviceId) { - return true - } - - return false -} - -// SetDeviceId gets a reference to the given int32 and assigns it to the DeviceId field. -func (o *CreateDeviceVerification201Response) SetDeviceId(v int32) { - o.DeviceId = &v -} - -// GetDisplayName returns the DisplayName field value if set, zero value otherwise. -func (o *CreateDeviceVerification201Response) GetDisplayName() string { - if o == nil || isNil(o.DisplayName) { - var ret string - return ret - } - return *o.DisplayName -} - -// GetDisplayNameOk returns a tuple with the DisplayName field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateDeviceVerification201Response) GetDisplayNameOk() (*string, bool) { - if o == nil || isNil(o.DisplayName) { - return nil, false - } - return o.DisplayName, true -} - -// HasDisplayName returns a boolean if a field has been set. -func (o *CreateDeviceVerification201Response) HasDisplayName() bool { - if o != nil && !isNil(o.DisplayName) { - return true - } - - return false -} - -// SetDisplayName gets a reference to the given string and assigns it to the DisplayName field. -func (o *CreateDeviceVerification201Response) SetDisplayName(v string) { - o.DisplayName = &v -} - -// GetExpiresAt returns the ExpiresAt field value if set, zero value otherwise. -func (o *CreateDeviceVerification201Response) GetExpiresAt() string { - if o == nil || isNil(o.ExpiresAt) { - var ret string - return ret - } - return *o.ExpiresAt -} - -// GetExpiresAtOk returns a tuple with the ExpiresAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateDeviceVerification201Response) GetExpiresAtOk() (*string, bool) { - if o == nil || isNil(o.ExpiresAt) { - return nil, false - } - return o.ExpiresAt, true -} - -// HasExpiresAt returns a boolean if a field has been set. -func (o *CreateDeviceVerification201Response) HasExpiresAt() bool { - if o != nil && !isNil(o.ExpiresAt) { - return true - } - - return false -} - -// SetExpiresAt gets a reference to the given string and assigns it to the ExpiresAt field. -func (o *CreateDeviceVerification201Response) SetExpiresAt(v string) { - o.ExpiresAt = &v -} - -// GetRedirectTo returns the RedirectTo field value if set, zero value otherwise. -func (o *CreateDeviceVerification201Response) GetRedirectTo() string { - if o == nil || isNil(o.RedirectTo) { - var ret string - return ret - } - return *o.RedirectTo -} - -// GetRedirectToOk returns a tuple with the RedirectTo field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateDeviceVerification201Response) GetRedirectToOk() (*string, bool) { - if o == nil || isNil(o.RedirectTo) { - return nil, false - } - return o.RedirectTo, true -} - -// HasRedirectTo returns a boolean if a field has been set. -func (o *CreateDeviceVerification201Response) HasRedirectTo() bool { - if o != nil && !isNil(o.RedirectTo) { - return true - } - - return false -} - -// SetRedirectTo gets a reference to the given string and assigns it to the RedirectTo field. -func (o *CreateDeviceVerification201Response) SetRedirectTo(v string) { - o.RedirectTo = &v -} - -// GetUserDisplayName returns the UserDisplayName field value if set, zero value otherwise. -func (o *CreateDeviceVerification201Response) GetUserDisplayName() string { - if o == nil || isNil(o.UserDisplayName) { - var ret string - return ret - } - return *o.UserDisplayName -} - -// GetUserDisplayNameOk returns a tuple with the UserDisplayName field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateDeviceVerification201Response) GetUserDisplayNameOk() (*string, bool) { - if o == nil || isNil(o.UserDisplayName) { - return nil, false - } - return o.UserDisplayName, true -} - -// HasUserDisplayName returns a boolean if a field has been set. -func (o *CreateDeviceVerification201Response) HasUserDisplayName() bool { - if o != nil && !isNil(o.UserDisplayName) { - return true - } - - return false -} - -// SetUserDisplayName gets a reference to the given string and assigns it to the UserDisplayName field. -func (o *CreateDeviceVerification201Response) SetUserDisplayName(v string) { - o.UserDisplayName = &v -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *CreateDeviceVerification201Response) GetId() string { - if o == nil || isNil(o.Id) { - var ret string - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateDeviceVerification201Response) GetIdOk() (*string, bool) { - if o == nil || isNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *CreateDeviceVerification201Response) HasId() bool { - if o != nil && !isNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given string and assigns it to the Id field. -func (o *CreateDeviceVerification201Response) SetId(v string) { - o.Id = &v -} - -// GetTypeDisplayName returns the TypeDisplayName field value if set, zero value otherwise. -func (o *CreateDeviceVerification201Response) GetTypeDisplayName() string { - if o == nil || isNil(o.TypeDisplayName) { - var ret string - return ret - } - return *o.TypeDisplayName -} - -// GetTypeDisplayNameOk returns a tuple with the TypeDisplayName field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateDeviceVerification201Response) GetTypeDisplayNameOk() (*string, bool) { - if o == nil || isNil(o.TypeDisplayName) { - return nil, false - } - return o.TypeDisplayName, true -} - -// HasTypeDisplayName returns a boolean if a field has been set. -func (o *CreateDeviceVerification201Response) HasTypeDisplayName() bool { - if o != nil && !isNil(o.TypeDisplayName) { - return true - } - - return false -} - -// SetTypeDisplayName gets a reference to the given string and assigns it to the TypeDisplayName field. -func (o *CreateDeviceVerification201Response) SetTypeDisplayName(v string) { - o.TypeDisplayName = &v -} - -// GetAuthFactorName returns the AuthFactorName field value if set, zero value otherwise. -func (o *CreateDeviceVerification201Response) GetAuthFactorName() string { - if o == nil || isNil(o.AuthFactorName) { - var ret string - return ret - } - return *o.AuthFactorName -} - -// GetAuthFactorNameOk returns a tuple with the AuthFactorName field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateDeviceVerification201Response) GetAuthFactorNameOk() (*string, bool) { - if o == nil || isNil(o.AuthFactorName) { - return nil, false - } - return o.AuthFactorName, true -} - -// HasAuthFactorName returns a boolean if a field has been set. -func (o *CreateDeviceVerification201Response) HasAuthFactorName() bool { - if o != nil && !isNil(o.AuthFactorName) { - return true - } - - return false -} - -// SetAuthFactorName gets a reference to the given string and assigns it to the AuthFactorName field. -func (o *CreateDeviceVerification201Response) SetAuthFactorName(v string) { - o.AuthFactorName = &v -} - -func (o CreateDeviceVerification201Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CreateDeviceVerification201Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.DeviceId) { - toSerialize["device_id"] = o.DeviceId - } - if !isNil(o.DisplayName) { - toSerialize["display_name"] = o.DisplayName - } - if !isNil(o.ExpiresAt) { - toSerialize["expires_at"] = o.ExpiresAt - } - if !isNil(o.RedirectTo) { - toSerialize["redirect_to"] = o.RedirectTo - } - if !isNil(o.UserDisplayName) { - toSerialize["user_display_name"] = o.UserDisplayName - } - if !isNil(o.Id) { - toSerialize["id"] = o.Id - } - if !isNil(o.TypeDisplayName) { - toSerialize["type_display_name"] = o.TypeDisplayName - } - if !isNil(o.AuthFactorName) { - toSerialize["auth_factor_name"] = o.AuthFactorName - } - return toSerialize, nil -} - -type NullableCreateDeviceVerification201Response struct { - value *CreateDeviceVerification201Response - isSet bool -} - -func (v NullableCreateDeviceVerification201Response) Get() *CreateDeviceVerification201Response { - return v.value -} - -func (v *NullableCreateDeviceVerification201Response) Set(val *CreateDeviceVerification201Response) { - v.value = val - v.isSet = true -} - -func (v NullableCreateDeviceVerification201Response) IsSet() bool { - return v.isSet -} - -func (v *NullableCreateDeviceVerification201Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCreateDeviceVerification201Response(val *CreateDeviceVerification201Response) *NullableCreateDeviceVerification201Response { - return &NullableCreateDeviceVerification201Response{value: val, isSet: true} -} - -func (v NullableCreateDeviceVerification201Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCreateDeviceVerification201Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_create_device_verification_request.go b/model_create_device_verification_request.go deleted file mode 100644 index a065268..0000000 --- a/model_create_device_verification_request.go +++ /dev/null @@ -1,266 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the CreateDeviceVerificationRequest type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateDeviceVerificationRequest{} - -// CreateDeviceVerificationRequest struct for CreateDeviceVerificationRequest -type CreateDeviceVerificationRequest struct { - // Specifies the factor to be verified. - DeviceId int32 `json:"device_id"` - // A name for the users device - DisplayName *string `json:"display_name,omitempty"` - // Defaults to 120. Valid values are: 120-900 seconds. - ExpiresIn *string `json:"expires_in,omitempty"` - // Only applies to Email MagicLink factor. Redirects MagicLink success page to specified URL after 2 seconds. Email must already be configured by the user. - RedirectTo *string `json:"redirect_to,omitempty"` - // Only applies to SMS factor. A message template that will be sent via SMS. Max length of the message after template items are inserted is 160 characters including the OTP code. SMS must already be configured by the user. The following template variables can be included in the message. - {{otp_code}} - The security code. - {{otp_expiry}} - The number of minutes until the one time code expires. - CustomMessage *string `json:"custom_message,omitempty"` -} - -// NewCreateDeviceVerificationRequest instantiates a new CreateDeviceVerificationRequest 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 NewCreateDeviceVerificationRequest(deviceId int32) *CreateDeviceVerificationRequest { - this := CreateDeviceVerificationRequest{} - this.DeviceId = deviceId - return &this -} - -// NewCreateDeviceVerificationRequestWithDefaults instantiates a new CreateDeviceVerificationRequest 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 NewCreateDeviceVerificationRequestWithDefaults() *CreateDeviceVerificationRequest { - this := CreateDeviceVerificationRequest{} - return &this -} - -// GetDeviceId returns the DeviceId field value -func (o *CreateDeviceVerificationRequest) GetDeviceId() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.DeviceId -} - -// GetDeviceIdOk returns a tuple with the DeviceId field value -// and a boolean to check if the value has been set. -func (o *CreateDeviceVerificationRequest) GetDeviceIdOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.DeviceId, true -} - -// SetDeviceId sets field value -func (o *CreateDeviceVerificationRequest) SetDeviceId(v int32) { - o.DeviceId = v -} - -// GetDisplayName returns the DisplayName field value if set, zero value otherwise. -func (o *CreateDeviceVerificationRequest) GetDisplayName() string { - if o == nil || isNil(o.DisplayName) { - var ret string - return ret - } - return *o.DisplayName -} - -// GetDisplayNameOk returns a tuple with the DisplayName field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateDeviceVerificationRequest) GetDisplayNameOk() (*string, bool) { - if o == nil || isNil(o.DisplayName) { - return nil, false - } - return o.DisplayName, true -} - -// HasDisplayName returns a boolean if a field has been set. -func (o *CreateDeviceVerificationRequest) HasDisplayName() bool { - if o != nil && !isNil(o.DisplayName) { - return true - } - - return false -} - -// SetDisplayName gets a reference to the given string and assigns it to the DisplayName field. -func (o *CreateDeviceVerificationRequest) SetDisplayName(v string) { - o.DisplayName = &v -} - -// GetExpiresIn returns the ExpiresIn field value if set, zero value otherwise. -func (o *CreateDeviceVerificationRequest) GetExpiresIn() string { - if o == nil || isNil(o.ExpiresIn) { - var ret string - return ret - } - return *o.ExpiresIn -} - -// GetExpiresInOk returns a tuple with the ExpiresIn field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateDeviceVerificationRequest) GetExpiresInOk() (*string, bool) { - if o == nil || isNil(o.ExpiresIn) { - return nil, false - } - return o.ExpiresIn, true -} - -// HasExpiresIn returns a boolean if a field has been set. -func (o *CreateDeviceVerificationRequest) HasExpiresIn() bool { - if o != nil && !isNil(o.ExpiresIn) { - return true - } - - return false -} - -// SetExpiresIn gets a reference to the given string and assigns it to the ExpiresIn field. -func (o *CreateDeviceVerificationRequest) SetExpiresIn(v string) { - o.ExpiresIn = &v -} - -// GetRedirectTo returns the RedirectTo field value if set, zero value otherwise. -func (o *CreateDeviceVerificationRequest) GetRedirectTo() string { - if o == nil || isNil(o.RedirectTo) { - var ret string - return ret - } - return *o.RedirectTo -} - -// GetRedirectToOk returns a tuple with the RedirectTo field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateDeviceVerificationRequest) GetRedirectToOk() (*string, bool) { - if o == nil || isNil(o.RedirectTo) { - return nil, false - } - return o.RedirectTo, true -} - -// HasRedirectTo returns a boolean if a field has been set. -func (o *CreateDeviceVerificationRequest) HasRedirectTo() bool { - if o != nil && !isNil(o.RedirectTo) { - return true - } - - return false -} - -// SetRedirectTo gets a reference to the given string and assigns it to the RedirectTo field. -func (o *CreateDeviceVerificationRequest) SetRedirectTo(v string) { - o.RedirectTo = &v -} - -// GetCustomMessage returns the CustomMessage field value if set, zero value otherwise. -func (o *CreateDeviceVerificationRequest) GetCustomMessage() string { - if o == nil || isNil(o.CustomMessage) { - var ret string - return ret - } - return *o.CustomMessage -} - -// GetCustomMessageOk returns a tuple with the CustomMessage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateDeviceVerificationRequest) GetCustomMessageOk() (*string, bool) { - if o == nil || isNil(o.CustomMessage) { - return nil, false - } - return o.CustomMessage, true -} - -// HasCustomMessage returns a boolean if a field has been set. -func (o *CreateDeviceVerificationRequest) HasCustomMessage() bool { - if o != nil && !isNil(o.CustomMessage) { - return true - } - - return false -} - -// SetCustomMessage gets a reference to the given string and assigns it to the CustomMessage field. -func (o *CreateDeviceVerificationRequest) SetCustomMessage(v string) { - o.CustomMessage = &v -} - -func (o CreateDeviceVerificationRequest) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CreateDeviceVerificationRequest) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["device_id"] = o.DeviceId - if !isNil(o.DisplayName) { - toSerialize["display_name"] = o.DisplayName - } - if !isNil(o.ExpiresIn) { - toSerialize["expires_in"] = o.ExpiresIn - } - if !isNil(o.RedirectTo) { - toSerialize["redirect_to"] = o.RedirectTo - } - if !isNil(o.CustomMessage) { - toSerialize["custom_message"] = o.CustomMessage - } - return toSerialize, nil -} - -type NullableCreateDeviceVerificationRequest struct { - value *CreateDeviceVerificationRequest - isSet bool -} - -func (v NullableCreateDeviceVerificationRequest) Get() *CreateDeviceVerificationRequest { - return v.value -} - -func (v *NullableCreateDeviceVerificationRequest) Set(val *CreateDeviceVerificationRequest) { - v.value = val - v.isSet = true -} - -func (v NullableCreateDeviceVerificationRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableCreateDeviceVerificationRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCreateDeviceVerificationRequest(val *CreateDeviceVerificationRequest) *NullableCreateDeviceVerificationRequest { - return &NullableCreateDeviceVerificationRequest{value: val, isSet: true} -} - -func (v NullableCreateDeviceVerificationRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCreateDeviceVerificationRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_create_factor_registration_201_response.go b/model_create_factor_registration_201_response.go deleted file mode 100644 index 8bfe379..0000000 --- a/model_create_factor_registration_201_response.go +++ /dev/null @@ -1,312 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the CreateFactorRegistration201Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateFactorRegistration201Response{} - -// CreateFactorRegistration201Response struct for CreateFactorRegistration201Response -type CreateFactorRegistration201Response struct { - // MFA device identifier. - DeviceId *string `json:"device_id,omitempty"` - // Authentication factor display name assigned by users when they register the device. - UserDisplayName *string `json:"user_display_name,omitempty"` - // Authentication factor display name as it appears to users upon initial registration, as defined by admins at Settings > Authentication Factors. - TypeDisplayName *string `json:"type_display_name,omitempty"` - // Authentication factor name, as it appears to administrators in OneLogin. - AuthFactorName *string `json:"auth_factor_name,omitempty"` - // Verification identifier used in subsequent verification step. - Id *string `json:"id,omitempty"` - // User identifier - UserId *string `json:"user_id,omitempty"` -} - -// NewCreateFactorRegistration201Response instantiates a new CreateFactorRegistration201Response 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 NewCreateFactorRegistration201Response() *CreateFactorRegistration201Response { - this := CreateFactorRegistration201Response{} - return &this -} - -// NewCreateFactorRegistration201ResponseWithDefaults instantiates a new CreateFactorRegistration201Response 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 NewCreateFactorRegistration201ResponseWithDefaults() *CreateFactorRegistration201Response { - this := CreateFactorRegistration201Response{} - return &this -} - -// GetDeviceId returns the DeviceId field value if set, zero value otherwise. -func (o *CreateFactorRegistration201Response) GetDeviceId() string { - if o == nil || isNil(o.DeviceId) { - var ret string - return ret - } - return *o.DeviceId -} - -// GetDeviceIdOk returns a tuple with the DeviceId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateFactorRegistration201Response) GetDeviceIdOk() (*string, bool) { - if o == nil || isNil(o.DeviceId) { - return nil, false - } - return o.DeviceId, true -} - -// HasDeviceId returns a boolean if a field has been set. -func (o *CreateFactorRegistration201Response) HasDeviceId() bool { - if o != nil && !isNil(o.DeviceId) { - return true - } - - return false -} - -// SetDeviceId gets a reference to the given string and assigns it to the DeviceId field. -func (o *CreateFactorRegistration201Response) SetDeviceId(v string) { - o.DeviceId = &v -} - -// GetUserDisplayName returns the UserDisplayName field value if set, zero value otherwise. -func (o *CreateFactorRegistration201Response) GetUserDisplayName() string { - if o == nil || isNil(o.UserDisplayName) { - var ret string - return ret - } - return *o.UserDisplayName -} - -// GetUserDisplayNameOk returns a tuple with the UserDisplayName field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateFactorRegistration201Response) GetUserDisplayNameOk() (*string, bool) { - if o == nil || isNil(o.UserDisplayName) { - return nil, false - } - return o.UserDisplayName, true -} - -// HasUserDisplayName returns a boolean if a field has been set. -func (o *CreateFactorRegistration201Response) HasUserDisplayName() bool { - if o != nil && !isNil(o.UserDisplayName) { - return true - } - - return false -} - -// SetUserDisplayName gets a reference to the given string and assigns it to the UserDisplayName field. -func (o *CreateFactorRegistration201Response) SetUserDisplayName(v string) { - o.UserDisplayName = &v -} - -// GetTypeDisplayName returns the TypeDisplayName field value if set, zero value otherwise. -func (o *CreateFactorRegistration201Response) GetTypeDisplayName() string { - if o == nil || isNil(o.TypeDisplayName) { - var ret string - return ret - } - return *o.TypeDisplayName -} - -// GetTypeDisplayNameOk returns a tuple with the TypeDisplayName field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateFactorRegistration201Response) GetTypeDisplayNameOk() (*string, bool) { - if o == nil || isNil(o.TypeDisplayName) { - return nil, false - } - return o.TypeDisplayName, true -} - -// HasTypeDisplayName returns a boolean if a field has been set. -func (o *CreateFactorRegistration201Response) HasTypeDisplayName() bool { - if o != nil && !isNil(o.TypeDisplayName) { - return true - } - - return false -} - -// SetTypeDisplayName gets a reference to the given string and assigns it to the TypeDisplayName field. -func (o *CreateFactorRegistration201Response) SetTypeDisplayName(v string) { - o.TypeDisplayName = &v -} - -// GetAuthFactorName returns the AuthFactorName field value if set, zero value otherwise. -func (o *CreateFactorRegistration201Response) GetAuthFactorName() string { - if o == nil || isNil(o.AuthFactorName) { - var ret string - return ret - } - return *o.AuthFactorName -} - -// GetAuthFactorNameOk returns a tuple with the AuthFactorName field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateFactorRegistration201Response) GetAuthFactorNameOk() (*string, bool) { - if o == nil || isNil(o.AuthFactorName) { - return nil, false - } - return o.AuthFactorName, true -} - -// HasAuthFactorName returns a boolean if a field has been set. -func (o *CreateFactorRegistration201Response) HasAuthFactorName() bool { - if o != nil && !isNil(o.AuthFactorName) { - return true - } - - return false -} - -// SetAuthFactorName gets a reference to the given string and assigns it to the AuthFactorName field. -func (o *CreateFactorRegistration201Response) SetAuthFactorName(v string) { - o.AuthFactorName = &v -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *CreateFactorRegistration201Response) GetId() string { - if o == nil || isNil(o.Id) { - var ret string - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateFactorRegistration201Response) GetIdOk() (*string, bool) { - if o == nil || isNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *CreateFactorRegistration201Response) HasId() bool { - if o != nil && !isNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given string and assigns it to the Id field. -func (o *CreateFactorRegistration201Response) SetId(v string) { - o.Id = &v -} - -// GetUserId returns the UserId field value if set, zero value otherwise. -func (o *CreateFactorRegistration201Response) GetUserId() string { - if o == nil || isNil(o.UserId) { - var ret string - return ret - } - return *o.UserId -} - -// GetUserIdOk returns a tuple with the UserId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateFactorRegistration201Response) GetUserIdOk() (*string, bool) { - if o == nil || isNil(o.UserId) { - return nil, false - } - return o.UserId, true -} - -// HasUserId returns a boolean if a field has been set. -func (o *CreateFactorRegistration201Response) HasUserId() bool { - if o != nil && !isNil(o.UserId) { - return true - } - - return false -} - -// SetUserId gets a reference to the given string and assigns it to the UserId field. -func (o *CreateFactorRegistration201Response) SetUserId(v string) { - o.UserId = &v -} - -func (o CreateFactorRegistration201Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CreateFactorRegistration201Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.DeviceId) { - toSerialize["device_id"] = o.DeviceId - } - if !isNil(o.UserDisplayName) { - toSerialize["user_display_name"] = o.UserDisplayName - } - if !isNil(o.TypeDisplayName) { - toSerialize["type_display_name"] = o.TypeDisplayName - } - if !isNil(o.AuthFactorName) { - toSerialize["auth_factor_name"] = o.AuthFactorName - } - if !isNil(o.Id) { - toSerialize["id"] = o.Id - } - if !isNil(o.UserId) { - toSerialize["user_id"] = o.UserId - } - return toSerialize, nil -} - -type NullableCreateFactorRegistration201Response struct { - value *CreateFactorRegistration201Response - isSet bool -} - -func (v NullableCreateFactorRegistration201Response) Get() *CreateFactorRegistration201Response { - return v.value -} - -func (v *NullableCreateFactorRegistration201Response) Set(val *CreateFactorRegistration201Response) { - v.value = val - v.isSet = true -} - -func (v NullableCreateFactorRegistration201Response) IsSet() bool { - return v.isSet -} - -func (v *NullableCreateFactorRegistration201Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCreateFactorRegistration201Response(val *CreateFactorRegistration201Response) *NullableCreateFactorRegistration201Response { - return &NullableCreateFactorRegistration201Response{value: val, isSet: true} -} - -func (v NullableCreateFactorRegistration201Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCreateFactorRegistration201Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_create_factor_registration_request.go b/model_create_factor_registration_request.go deleted file mode 100644 index 6993aac..0000000 --- a/model_create_factor_registration_request.go +++ /dev/null @@ -1,294 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the CreateFactorRegistrationRequest type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateFactorRegistrationRequest{} - -// CreateFactorRegistrationRequest struct for CreateFactorRegistrationRequest -type CreateFactorRegistrationRequest struct { - // The identifier of the factor to enroll the user with. See Get Available Factors for a list of possible id values. - FactorId int32 `json:"factor_id"` - // A name for the users device - DisplayName string `json:"display_name"` - // Defaults to 120. Valid values are: 120-900 seconds. - ExpiresIn *string `json:"expires_in,omitempty"` - // Defaults to false. The following factors support verified = true as part of the initial registration request: OneLogin SMS, OneLogin Voice, OneLogin Email. When using verified = true it is critical that the supported factors have pre-verified values, most likely imported from an existing directory or by the users themselvdes. Factors such as Authenticator and OneLogin Protect do not support verification = true as the user interaction is required to verify the factor. - Verified *bool `json:"verified,omitempty"` - // Only applies to Email MagicLink factor. Redirects MagicLink success page to specified URL after 2 seconds. Email must already be configured by the user. - RedirectTo *string `json:"redirect_to,omitempty"` - // Only applies to SMS factor. A message template that will be sent via SMS. Max length of the message after template items are inserted is 160 characters including the OTP code. SMS must already be configured by the user. The following template variables can be included in the message. - {{otp_code}} - The security code. - {{otp_expiry}} - The number of minutes until the one time code expires. - CustomMessage *string `json:"custom_message,omitempty"` -} - -// NewCreateFactorRegistrationRequest instantiates a new CreateFactorRegistrationRequest 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 NewCreateFactorRegistrationRequest(factorId int32, displayName string) *CreateFactorRegistrationRequest { - this := CreateFactorRegistrationRequest{} - this.FactorId = factorId - this.DisplayName = displayName - return &this -} - -// NewCreateFactorRegistrationRequestWithDefaults instantiates a new CreateFactorRegistrationRequest 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 NewCreateFactorRegistrationRequestWithDefaults() *CreateFactorRegistrationRequest { - this := CreateFactorRegistrationRequest{} - return &this -} - -// GetFactorId returns the FactorId field value -func (o *CreateFactorRegistrationRequest) GetFactorId() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.FactorId -} - -// GetFactorIdOk returns a tuple with the FactorId field value -// and a boolean to check if the value has been set. -func (o *CreateFactorRegistrationRequest) GetFactorIdOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.FactorId, true -} - -// SetFactorId sets field value -func (o *CreateFactorRegistrationRequest) SetFactorId(v int32) { - o.FactorId = v -} - -// GetDisplayName returns the DisplayName field value -func (o *CreateFactorRegistrationRequest) GetDisplayName() string { - if o == nil { - var ret string - return ret - } - - return o.DisplayName -} - -// GetDisplayNameOk returns a tuple with the DisplayName field value -// and a boolean to check if the value has been set. -func (o *CreateFactorRegistrationRequest) GetDisplayNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.DisplayName, true -} - -// SetDisplayName sets field value -func (o *CreateFactorRegistrationRequest) SetDisplayName(v string) { - o.DisplayName = v -} - -// GetExpiresIn returns the ExpiresIn field value if set, zero value otherwise. -func (o *CreateFactorRegistrationRequest) GetExpiresIn() string { - if o == nil || isNil(o.ExpiresIn) { - var ret string - return ret - } - return *o.ExpiresIn -} - -// GetExpiresInOk returns a tuple with the ExpiresIn field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateFactorRegistrationRequest) GetExpiresInOk() (*string, bool) { - if o == nil || isNil(o.ExpiresIn) { - return nil, false - } - return o.ExpiresIn, true -} - -// HasExpiresIn returns a boolean if a field has been set. -func (o *CreateFactorRegistrationRequest) HasExpiresIn() bool { - if o != nil && !isNil(o.ExpiresIn) { - return true - } - - return false -} - -// SetExpiresIn gets a reference to the given string and assigns it to the ExpiresIn field. -func (o *CreateFactorRegistrationRequest) SetExpiresIn(v string) { - o.ExpiresIn = &v -} - -// GetVerified returns the Verified field value if set, zero value otherwise. -func (o *CreateFactorRegistrationRequest) GetVerified() bool { - if o == nil || isNil(o.Verified) { - var ret bool - return ret - } - return *o.Verified -} - -// GetVerifiedOk returns a tuple with the Verified field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateFactorRegistrationRequest) GetVerifiedOk() (*bool, bool) { - if o == nil || isNil(o.Verified) { - return nil, false - } - return o.Verified, true -} - -// HasVerified returns a boolean if a field has been set. -func (o *CreateFactorRegistrationRequest) HasVerified() bool { - if o != nil && !isNil(o.Verified) { - return true - } - - return false -} - -// SetVerified gets a reference to the given bool and assigns it to the Verified field. -func (o *CreateFactorRegistrationRequest) SetVerified(v bool) { - o.Verified = &v -} - -// GetRedirectTo returns the RedirectTo field value if set, zero value otherwise. -func (o *CreateFactorRegistrationRequest) GetRedirectTo() string { - if o == nil || isNil(o.RedirectTo) { - var ret string - return ret - } - return *o.RedirectTo -} - -// GetRedirectToOk returns a tuple with the RedirectTo field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateFactorRegistrationRequest) GetRedirectToOk() (*string, bool) { - if o == nil || isNil(o.RedirectTo) { - return nil, false - } - return o.RedirectTo, true -} - -// HasRedirectTo returns a boolean if a field has been set. -func (o *CreateFactorRegistrationRequest) HasRedirectTo() bool { - if o != nil && !isNil(o.RedirectTo) { - return true - } - - return false -} - -// SetRedirectTo gets a reference to the given string and assigns it to the RedirectTo field. -func (o *CreateFactorRegistrationRequest) SetRedirectTo(v string) { - o.RedirectTo = &v -} - -// GetCustomMessage returns the CustomMessage field value if set, zero value otherwise. -func (o *CreateFactorRegistrationRequest) GetCustomMessage() string { - if o == nil || isNil(o.CustomMessage) { - var ret string - return ret - } - return *o.CustomMessage -} - -// GetCustomMessageOk returns a tuple with the CustomMessage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateFactorRegistrationRequest) GetCustomMessageOk() (*string, bool) { - if o == nil || isNil(o.CustomMessage) { - return nil, false - } - return o.CustomMessage, true -} - -// HasCustomMessage returns a boolean if a field has been set. -func (o *CreateFactorRegistrationRequest) HasCustomMessage() bool { - if o != nil && !isNil(o.CustomMessage) { - return true - } - - return false -} - -// SetCustomMessage gets a reference to the given string and assigns it to the CustomMessage field. -func (o *CreateFactorRegistrationRequest) SetCustomMessage(v string) { - o.CustomMessage = &v -} - -func (o CreateFactorRegistrationRequest) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CreateFactorRegistrationRequest) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["factor_id"] = o.FactorId - toSerialize["display_name"] = o.DisplayName - if !isNil(o.ExpiresIn) { - toSerialize["expires_in"] = o.ExpiresIn - } - if !isNil(o.Verified) { - toSerialize["verified"] = o.Verified - } - if !isNil(o.RedirectTo) { - toSerialize["redirect_to"] = o.RedirectTo - } - if !isNil(o.CustomMessage) { - toSerialize["custom_message"] = o.CustomMessage - } - return toSerialize, nil -} - -type NullableCreateFactorRegistrationRequest struct { - value *CreateFactorRegistrationRequest - isSet bool -} - -func (v NullableCreateFactorRegistrationRequest) Get() *CreateFactorRegistrationRequest { - return v.value -} - -func (v *NullableCreateFactorRegistrationRequest) Set(val *CreateFactorRegistrationRequest) { - v.value = val - v.isSet = true -} - -func (v NullableCreateFactorRegistrationRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableCreateFactorRegistrationRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCreateFactorRegistrationRequest(val *CreateFactorRegistrationRequest) *NullableCreateFactorRegistrationRequest { - return &NullableCreateFactorRegistrationRequest{value: val, isSet: true} -} - -func (v NullableCreateFactorRegistrationRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCreateFactorRegistrationRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_create_privilege_200_response.go b/model_create_privilege_200_response.go deleted file mode 100644 index 76e6432..0000000 --- a/model_create_privilege_200_response.go +++ /dev/null @@ -1,127 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the CreatePrivilege200Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreatePrivilege200Response{} - -// CreatePrivilege200Response struct for CreatePrivilege200Response -type CreatePrivilege200Response struct { - // Privilege Id - Id *string `json:"id,omitempty"` -} - -// NewCreatePrivilege200Response instantiates a new CreatePrivilege200Response 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 NewCreatePrivilege200Response() *CreatePrivilege200Response { - this := CreatePrivilege200Response{} - return &this -} - -// NewCreatePrivilege200ResponseWithDefaults instantiates a new CreatePrivilege200Response 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 NewCreatePrivilege200ResponseWithDefaults() *CreatePrivilege200Response { - this := CreatePrivilege200Response{} - return &this -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *CreatePrivilege200Response) GetId() string { - if o == nil || isNil(o.Id) { - var ret string - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreatePrivilege200Response) GetIdOk() (*string, bool) { - if o == nil || isNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *CreatePrivilege200Response) HasId() bool { - if o != nil && !isNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given string and assigns it to the Id field. -func (o *CreatePrivilege200Response) SetId(v string) { - o.Id = &v -} - -func (o CreatePrivilege200Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CreatePrivilege200Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Id) { - toSerialize["id"] = o.Id - } - return toSerialize, nil -} - -type NullableCreatePrivilege200Response struct { - value *CreatePrivilege200Response - isSet bool -} - -func (v NullableCreatePrivilege200Response) Get() *CreatePrivilege200Response { - return v.value -} - -func (v *NullableCreatePrivilege200Response) Set(val *CreatePrivilege200Response) { - v.value = val - v.isSet = true -} - -func (v NullableCreatePrivilege200Response) IsSet() bool { - return v.isSet -} - -func (v *NullableCreatePrivilege200Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCreatePrivilege200Response(val *CreatePrivilege200Response) *NullableCreatePrivilege200Response { - return &NullableCreatePrivilege200Response{value: val, isSet: true} -} - -func (v NullableCreatePrivilege200Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCreatePrivilege200Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_create_role_201_response_inner.go b/model_create_role_201_response_inner.go deleted file mode 100644 index 1c54c96..0000000 --- a/model_create_role_201_response_inner.go +++ /dev/null @@ -1,126 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the CreateRole201ResponseInner type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateRole201ResponseInner{} - -// CreateRole201ResponseInner struct for CreateRole201ResponseInner -type CreateRole201ResponseInner struct { - Id *int32 `json:"id,omitempty"` -} - -// NewCreateRole201ResponseInner instantiates a new CreateRole201ResponseInner 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 NewCreateRole201ResponseInner() *CreateRole201ResponseInner { - this := CreateRole201ResponseInner{} - return &this -} - -// NewCreateRole201ResponseInnerWithDefaults instantiates a new CreateRole201ResponseInner 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 NewCreateRole201ResponseInnerWithDefaults() *CreateRole201ResponseInner { - this := CreateRole201ResponseInner{} - return &this -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *CreateRole201ResponseInner) GetId() int32 { - if o == nil || isNil(o.Id) { - var ret int32 - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateRole201ResponseInner) GetIdOk() (*int32, bool) { - if o == nil || isNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *CreateRole201ResponseInner) HasId() bool { - if o != nil && !isNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given int32 and assigns it to the Id field. -func (o *CreateRole201ResponseInner) SetId(v int32) { - o.Id = &v -} - -func (o CreateRole201ResponseInner) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CreateRole201ResponseInner) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Id) { - toSerialize["id"] = o.Id - } - return toSerialize, nil -} - -type NullableCreateRole201ResponseInner struct { - value *CreateRole201ResponseInner - isSet bool -} - -func (v NullableCreateRole201ResponseInner) Get() *CreateRole201ResponseInner { - return v.value -} - -func (v *NullableCreateRole201ResponseInner) Set(val *CreateRole201ResponseInner) { - v.value = val - v.isSet = true -} - -func (v NullableCreateRole201ResponseInner) IsSet() bool { - return v.isSet -} - -func (v *NullableCreateRole201ResponseInner) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCreateRole201ResponseInner(val *CreateRole201ResponseInner) *NullableCreateRole201ResponseInner { - return &NullableCreateRole201ResponseInner{value: val, isSet: true} -} - -func (v NullableCreateRole201ResponseInner) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCreateRole201ResponseInner) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_device.go b/model_device.go deleted file mode 100644 index 65a6428..0000000 --- a/model_device.go +++ /dev/null @@ -1,164 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the Device type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Device{} - -// Device struct for Device -type Device struct { - // an ID for the device type that must be submitted with the Verify Factor API call. - DeviceId *int32 `json:"device_id,omitempty"` - // Lists an available MFA device type, such as OneLogin OTP SMS or Google Authenticator. - DeviceType *string `json:"device_type,omitempty"` -} - -// NewDevice instantiates a new Device 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 NewDevice() *Device { - this := Device{} - return &this -} - -// NewDeviceWithDefaults instantiates a new Device 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 NewDeviceWithDefaults() *Device { - this := Device{} - return &this -} - -// GetDeviceId returns the DeviceId field value if set, zero value otherwise. -func (o *Device) GetDeviceId() int32 { - if o == nil || isNil(o.DeviceId) { - var ret int32 - return ret - } - return *o.DeviceId -} - -// GetDeviceIdOk returns a tuple with the DeviceId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Device) GetDeviceIdOk() (*int32, bool) { - if o == nil || isNil(o.DeviceId) { - return nil, false - } - return o.DeviceId, true -} - -// HasDeviceId returns a boolean if a field has been set. -func (o *Device) HasDeviceId() bool { - if o != nil && !isNil(o.DeviceId) { - return true - } - - return false -} - -// SetDeviceId gets a reference to the given int32 and assigns it to the DeviceId field. -func (o *Device) SetDeviceId(v int32) { - o.DeviceId = &v -} - -// GetDeviceType returns the DeviceType field value if set, zero value otherwise. -func (o *Device) GetDeviceType() string { - if o == nil || isNil(o.DeviceType) { - var ret string - return ret - } - return *o.DeviceType -} - -// GetDeviceTypeOk returns a tuple with the DeviceType field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Device) GetDeviceTypeOk() (*string, bool) { - if o == nil || isNil(o.DeviceType) { - return nil, false - } - return o.DeviceType, true -} - -// HasDeviceType returns a boolean if a field has been set. -func (o *Device) HasDeviceType() bool { - if o != nil && !isNil(o.DeviceType) { - return true - } - - return false -} - -// SetDeviceType gets a reference to the given string and assigns it to the DeviceType field. -func (o *Device) SetDeviceType(v string) { - o.DeviceType = &v -} - -func (o Device) MarshalJSON() ([]byte, error) { - 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{}{} - if !isNil(o.DeviceId) { - toSerialize["device_id"] = o.DeviceId - } - if !isNil(o.DeviceType) { - toSerialize["device_type"] = o.DeviceType - } - return toSerialize, nil -} - -type NullableDevice struct { - value *Device - isSet bool -} - -func (v NullableDevice) Get() *Device { - return v.value -} - -func (v *NullableDevice) Set(val *Device) { - v.value = val - v.isSet = true -} - -func (v NullableDevice) IsSet() bool { - return v.isSet -} - -func (v *NullableDevice) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableDevice(val *Device) *NullableDevice { - return &NullableDevice{value: val, isSet: true} -} - -func (v NullableDevice) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableDevice) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_email_config.go b/model_email_config.go deleted file mode 100644 index 781acc7..0000000 --- a/model_email_config.go +++ /dev/null @@ -1,330 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the EmailConfig type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &EmailConfig{} - -// EmailConfig struct for EmailConfig -type EmailConfig struct { - // Email Settings server address - Address string `json:"address"` - // Use TLS - UseTls *bool `json:"use_tls,omitempty"` - // The From email address in the message. - From string `json:"from"` - // Domain of the From address. - Domain string `json:"domain"` - // The user name of the account to authenticate with the Email Settings server. - UserName *string `json:"user_name,omitempty"` - // The password of the account to authenticate with the Email Settings server. - Password *string `json:"password,omitempty"` - // Defaults to 25. - Port *int32 `json:"port,omitempty"` -} - -// NewEmailConfig instantiates a new EmailConfig 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 NewEmailConfig(address string, from string, domain string) *EmailConfig { - this := EmailConfig{} - this.Address = address - var useTls bool = true - this.UseTls = &useTls - this.From = from - this.Domain = domain - var port int32 = 25 - this.Port = &port - return &this -} - -// NewEmailConfigWithDefaults instantiates a new EmailConfig 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 NewEmailConfigWithDefaults() *EmailConfig { - this := EmailConfig{} - var useTls bool = true - this.UseTls = &useTls - var port int32 = 25 - this.Port = &port - return &this -} - -// GetAddress returns the Address field value -func (o *EmailConfig) GetAddress() string { - if o == nil { - var ret string - return ret - } - - return o.Address -} - -// GetAddressOk returns a tuple with the Address field value -// and a boolean to check if the value has been set. -func (o *EmailConfig) GetAddressOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Address, true -} - -// SetAddress sets field value -func (o *EmailConfig) SetAddress(v string) { - o.Address = v -} - -// GetUseTls returns the UseTls field value if set, zero value otherwise. -func (o *EmailConfig) GetUseTls() bool { - if o == nil || isNil(o.UseTls) { - var ret bool - return ret - } - return *o.UseTls -} - -// 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 *EmailConfig) GetUseTlsOk() (*bool, bool) { - if o == nil || isNil(o.UseTls) { - return nil, false - } - return o.UseTls, true -} - -// HasUseTls returns a boolean if a field has been set. -func (o *EmailConfig) HasUseTls() bool { - if o != nil && !isNil(o.UseTls) { - return true - } - - return false -} - -// SetUseTls gets a reference to the given bool and assigns it to the UseTls field. -func (o *EmailConfig) SetUseTls(v bool) { - o.UseTls = &v -} - -// GetFrom returns the From field value -func (o *EmailConfig) GetFrom() string { - if o == nil { - var ret string - return ret - } - - return o.From -} - -// GetFromOk returns a tuple with the From field value -// and a boolean to check if the value has been set. -func (o *EmailConfig) GetFromOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.From, true -} - -// SetFrom sets field value -func (o *EmailConfig) SetFrom(v string) { - o.From = v -} - -// GetDomain returns the Domain field value -func (o *EmailConfig) GetDomain() string { - if o == nil { - var ret string - return ret - } - - return o.Domain -} - -// GetDomainOk returns a tuple with the Domain field value -// and a boolean to check if the value has been set. -func (o *EmailConfig) GetDomainOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Domain, true -} - -// SetDomain sets field value -func (o *EmailConfig) SetDomain(v string) { - o.Domain = v -} - -// GetUserName returns the UserName field value if set, zero value otherwise. -func (o *EmailConfig) GetUserName() string { - if o == nil || isNil(o.UserName) { - var ret string - return ret - } - return *o.UserName -} - -// 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 *EmailConfig) GetUserNameOk() (*string, bool) { - if o == nil || isNil(o.UserName) { - return nil, false - } - return o.UserName, true -} - -// HasUserName returns a boolean if a field has been set. -func (o *EmailConfig) HasUserName() bool { - if o != nil && !isNil(o.UserName) { - return true - } - - return false -} - -// SetUserName gets a reference to the given string and assigns it to the UserName field. -func (o *EmailConfig) SetUserName(v string) { - o.UserName = &v -} - -// GetPassword returns the Password field value if set, zero value otherwise. -func (o *EmailConfig) GetPassword() string { - if o == nil || isNil(o.Password) { - var ret string - return ret - } - return *o.Password -} - -// 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 *EmailConfig) GetPasswordOk() (*string, bool) { - if o == nil || isNil(o.Password) { - return nil, false - } - return o.Password, true -} - -// HasPassword returns a boolean if a field has been set. -func (o *EmailConfig) HasPassword() bool { - if o != nil && !isNil(o.Password) { - return true - } - - return false -} - -// SetPassword gets a reference to the given string and assigns it to the Password field. -func (o *EmailConfig) SetPassword(v string) { - o.Password = &v -} - -// GetPort returns the Port field value if set, zero value otherwise. -func (o *EmailConfig) GetPort() int32 { - if o == nil || isNil(o.Port) { - var ret int32 - return ret - } - return *o.Port -} - -// 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 *EmailConfig) GetPortOk() (*int32, bool) { - if o == nil || isNil(o.Port) { - return nil, false - } - return o.Port, true -} - -// HasPort returns a boolean if a field has been set. -func (o *EmailConfig) HasPort() bool { - if o != nil && !isNil(o.Port) { - return true - } - - return false -} - -// SetPort gets a reference to the given int32 and assigns it to the Port field. -func (o *EmailConfig) SetPort(v int32) { - o.Port = &v -} - -func (o EmailConfig) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o EmailConfig) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["address"] = o.Address - if !isNil(o.UseTls) { - toSerialize["use_tls"] = o.UseTls - } - toSerialize["from"] = o.From - toSerialize["domain"] = o.Domain - if !isNil(o.UserName) { - toSerialize["user_name"] = o.UserName - } - if !isNil(o.Password) { - toSerialize["password"] = o.Password - } - if !isNil(o.Port) { - toSerialize["port"] = o.Port - } - return toSerialize, nil -} - -type NullableEmailConfig struct { - value *EmailConfig - isSet bool -} - -func (v NullableEmailConfig) Get() *EmailConfig { - return v.value -} - -func (v *NullableEmailConfig) Set(val *EmailConfig) { - v.value = val - v.isSet = true -} - -func (v NullableEmailConfig) IsSet() bool { - return v.isSet -} - -func (v *NullableEmailConfig) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableEmailConfig(val *EmailConfig) *NullableEmailConfig { - return &NullableEmailConfig{value: val, isSet: true} -} - -func (v NullableEmailConfig) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableEmailConfig) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_enforcement_point.go b/model_enforcement_point.go deleted file mode 100644 index 0dce001..0000000 --- a/model_enforcement_point.go +++ /dev/null @@ -1,597 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the EnforcementPoint type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &EnforcementPoint{} - -// EnforcementPoint For apps that connect to a OneLogin Access Enforcement Point the following enforcement_point object will be included with the app payload. -type EnforcementPoint struct { - // Require user authentication to access any resource protected by this enforcement point. - RequireSitewideAuthentication *bool `json:"require_sitewide_authentication,omitempty"` - // If access is conditional, the conditions that must evaluate to true to allow access to a resource. For example, to require the user must be authenticated and have either the role Admin or User - Conditions *string `json:"conditions,omitempty"` - SessionExpiryFixed *ClockCounter `json:"session_expiry_fixed,omitempty"` - SessionExpiryInactivity *ClockCounter `json:"session_expiry_inactivity,omitempty"` - // Specify to always `allow`, `deny` access to resources, of if access is `conditional`. - Permissions *string `json:"permissions,omitempty"` - // Can only be set on create. Access Gateway Token. - Token *string `json:"token,omitempty"` - // A fully-qualified URL to the internal application including scheme, authority and path. The target host authority must be an IP address, not a hostname. - Target NullableString `json:"target,omitempty"` - // Array of resource objects - Resources []EnforcementPointResourcesInner `json:"resources,omitempty"` - // The root path to the application, often the name of the application. Can be any name, path or just a slash (“/”). The context root uniquely identifies the application within the enforcement point. - ContextRoot *string `json:"context_root,omitempty"` - // Use the target host header as opposed to the original gateway or upstream host header. - UseTargetHostHeader *bool `json:"use_target_host_header,omitempty"` - // A comma-delimited list of one or more virtual hosts that map to applications assigned to the enforcement point. A VHOST may be a host name or an IP address. VHOST distinguish between applications that are at the same context root. - Vhost NullableString `json:"vhost,omitempty"` - // The location within the context root to which the browser will be redirected for IdP-initiated single sign-on. For example, the landing page might be an index page in the context root such as index.html or default.aspx. The landing page cannot begin with a slash and must use valid URL characters. - LandingPage NullableString `json:"landing_page,omitempty"` - // The URL path evaluation is case insensitive by default. Resources hosted on web servers such as Apache, NGINX and Java EE are case sensitive paths. Web servers such as Microsoft IIS are not case-sensitive. - CaseSensitive *bool `json:"case_sensitive,omitempty"` -} - -// NewEnforcementPoint instantiates a new EnforcementPoint 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 NewEnforcementPoint() *EnforcementPoint { - this := EnforcementPoint{} - return &this -} - -// NewEnforcementPointWithDefaults instantiates a new EnforcementPoint 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 NewEnforcementPointWithDefaults() *EnforcementPoint { - this := EnforcementPoint{} - return &this -} - -// GetRequireSitewideAuthentication returns the RequireSitewideAuthentication field value if set, zero value otherwise. -func (o *EnforcementPoint) GetRequireSitewideAuthentication() bool { - if o == nil || isNil(o.RequireSitewideAuthentication) { - var ret bool - return ret - } - return *o.RequireSitewideAuthentication -} - -// GetRequireSitewideAuthenticationOk returns a tuple with the RequireSitewideAuthentication field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *EnforcementPoint) GetRequireSitewideAuthenticationOk() (*bool, bool) { - if o == nil || isNil(o.RequireSitewideAuthentication) { - return nil, false - } - return o.RequireSitewideAuthentication, true -} - -// HasRequireSitewideAuthentication returns a boolean if a field has been set. -func (o *EnforcementPoint) HasRequireSitewideAuthentication() bool { - if o != nil && !isNil(o.RequireSitewideAuthentication) { - return true - } - - return false -} - -// SetRequireSitewideAuthentication gets a reference to the given bool and assigns it to the RequireSitewideAuthentication field. -func (o *EnforcementPoint) SetRequireSitewideAuthentication(v bool) { - o.RequireSitewideAuthentication = &v -} - -// GetConditions returns the Conditions field value if set, zero value otherwise. -func (o *EnforcementPoint) GetConditions() string { - if o == nil || isNil(o.Conditions) { - var ret string - return ret - } - return *o.Conditions -} - -// GetConditionsOk returns a tuple with the Conditions field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *EnforcementPoint) GetConditionsOk() (*string, bool) { - if o == nil || isNil(o.Conditions) { - return nil, false - } - return o.Conditions, true -} - -// HasConditions returns a boolean if a field has been set. -func (o *EnforcementPoint) HasConditions() bool { - if o != nil && !isNil(o.Conditions) { - return true - } - - return false -} - -// SetConditions gets a reference to the given string and assigns it to the Conditions field. -func (o *EnforcementPoint) SetConditions(v string) { - o.Conditions = &v -} - -// GetSessionExpiryFixed returns the SessionExpiryFixed field value if set, zero value otherwise. -func (o *EnforcementPoint) GetSessionExpiryFixed() ClockCounter { - if o == nil || isNil(o.SessionExpiryFixed) { - var ret ClockCounter - return ret - } - return *o.SessionExpiryFixed -} - -// GetSessionExpiryFixedOk returns a tuple with the SessionExpiryFixed field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *EnforcementPoint) GetSessionExpiryFixedOk() (*ClockCounter, bool) { - if o == nil || isNil(o.SessionExpiryFixed) { - return nil, false - } - return o.SessionExpiryFixed, true -} - -// HasSessionExpiryFixed returns a boolean if a field has been set. -func (o *EnforcementPoint) HasSessionExpiryFixed() bool { - if o != nil && !isNil(o.SessionExpiryFixed) { - return true - } - - return false -} - -// SetSessionExpiryFixed gets a reference to the given ClockCounter and assigns it to the SessionExpiryFixed field. -func (o *EnforcementPoint) SetSessionExpiryFixed(v ClockCounter) { - o.SessionExpiryFixed = &v -} - -// GetSessionExpiryInactivity returns the SessionExpiryInactivity field value if set, zero value otherwise. -func (o *EnforcementPoint) GetSessionExpiryInactivity() ClockCounter { - if o == nil || isNil(o.SessionExpiryInactivity) { - var ret ClockCounter - return ret - } - return *o.SessionExpiryInactivity -} - -// GetSessionExpiryInactivityOk returns a tuple with the SessionExpiryInactivity field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *EnforcementPoint) GetSessionExpiryInactivityOk() (*ClockCounter, bool) { - if o == nil || isNil(o.SessionExpiryInactivity) { - return nil, false - } - return o.SessionExpiryInactivity, true -} - -// HasSessionExpiryInactivity returns a boolean if a field has been set. -func (o *EnforcementPoint) HasSessionExpiryInactivity() bool { - if o != nil && !isNil(o.SessionExpiryInactivity) { - return true - } - - return false -} - -// SetSessionExpiryInactivity gets a reference to the given ClockCounter and assigns it to the SessionExpiryInactivity field. -func (o *EnforcementPoint) SetSessionExpiryInactivity(v ClockCounter) { - o.SessionExpiryInactivity = &v -} - -// GetPermissions returns the Permissions field value if set, zero value otherwise. -func (o *EnforcementPoint) GetPermissions() string { - if o == nil || isNil(o.Permissions) { - var ret string - return ret - } - return *o.Permissions -} - -// 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 *EnforcementPoint) GetPermissionsOk() (*string, bool) { - if o == nil || isNil(o.Permissions) { - return nil, false - } - return o.Permissions, true -} - -// HasPermissions returns a boolean if a field has been set. -func (o *EnforcementPoint) HasPermissions() bool { - if o != nil && !isNil(o.Permissions) { - return true - } - - return false -} - -// SetPermissions gets a reference to the given string and assigns it to the Permissions field. -func (o *EnforcementPoint) SetPermissions(v string) { - o.Permissions = &v -} - -// GetToken returns the Token field value if set, zero value otherwise. -func (o *EnforcementPoint) GetToken() string { - if o == nil || isNil(o.Token) { - var ret string - return ret - } - return *o.Token -} - -// 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 *EnforcementPoint) GetTokenOk() (*string, bool) { - if o == nil || isNil(o.Token) { - return nil, false - } - return o.Token, true -} - -// HasToken returns a boolean if a field has been set. -func (o *EnforcementPoint) HasToken() bool { - if o != nil && !isNil(o.Token) { - return true - } - - return false -} - -// SetToken gets a reference to the given string and assigns it to the Token field. -func (o *EnforcementPoint) SetToken(v string) { - o.Token = &v -} - -// GetTarget returns the Target field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *EnforcementPoint) GetTarget() string { - if o == nil || isNil(o.Target.Get()) { - var ret string - return ret - } - return *o.Target.Get() -} - -// GetTargetOk returns a tuple with the Target 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 *EnforcementPoint) GetTargetOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Target.Get(), o.Target.IsSet() -} - -// HasTarget returns a boolean if a field has been set. -func (o *EnforcementPoint) HasTarget() bool { - if o != nil && o.Target.IsSet() { - return true - } - - return false -} - -// SetTarget gets a reference to the given NullableString and assigns it to the Target field. -func (o *EnforcementPoint) SetTarget(v string) { - o.Target.Set(&v) -} -// SetTargetNil sets the value for Target to be an explicit nil -func (o *EnforcementPoint) SetTargetNil() { - o.Target.Set(nil) -} - -// UnsetTarget ensures that no value is present for Target, not even an explicit nil -func (o *EnforcementPoint) UnsetTarget() { - o.Target.Unset() -} - -// GetResources returns the Resources field value if set, zero value otherwise. -func (o *EnforcementPoint) GetResources() []EnforcementPointResourcesInner { - if o == nil || isNil(o.Resources) { - var ret []EnforcementPointResourcesInner - return ret - } - return o.Resources -} - -// GetResourcesOk returns a tuple with the Resources field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *EnforcementPoint) GetResourcesOk() ([]EnforcementPointResourcesInner, bool) { - if o == nil || isNil(o.Resources) { - return nil, false - } - return o.Resources, true -} - -// HasResources returns a boolean if a field has been set. -func (o *EnforcementPoint) HasResources() bool { - if o != nil && !isNil(o.Resources) { - return true - } - - return false -} - -// SetResources gets a reference to the given []EnforcementPointResourcesInner and assigns it to the Resources field. -func (o *EnforcementPoint) SetResources(v []EnforcementPointResourcesInner) { - o.Resources = v -} - -// GetContextRoot returns the ContextRoot field value if set, zero value otherwise. -func (o *EnforcementPoint) GetContextRoot() string { - if o == nil || isNil(o.ContextRoot) { - var ret string - return ret - } - return *o.ContextRoot -} - -// GetContextRootOk returns a tuple with the ContextRoot field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *EnforcementPoint) GetContextRootOk() (*string, bool) { - if o == nil || isNil(o.ContextRoot) { - return nil, false - } - return o.ContextRoot, true -} - -// HasContextRoot returns a boolean if a field has been set. -func (o *EnforcementPoint) HasContextRoot() bool { - if o != nil && !isNil(o.ContextRoot) { - return true - } - - return false -} - -// SetContextRoot gets a reference to the given string and assigns it to the ContextRoot field. -func (o *EnforcementPoint) SetContextRoot(v string) { - o.ContextRoot = &v -} - -// GetUseTargetHostHeader returns the UseTargetHostHeader field value if set, zero value otherwise. -func (o *EnforcementPoint) GetUseTargetHostHeader() bool { - if o == nil || isNil(o.UseTargetHostHeader) { - var ret bool - return ret - } - return *o.UseTargetHostHeader -} - -// GetUseTargetHostHeaderOk returns a tuple with the UseTargetHostHeader field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *EnforcementPoint) GetUseTargetHostHeaderOk() (*bool, bool) { - if o == nil || isNil(o.UseTargetHostHeader) { - return nil, false - } - return o.UseTargetHostHeader, true -} - -// HasUseTargetHostHeader returns a boolean if a field has been set. -func (o *EnforcementPoint) HasUseTargetHostHeader() bool { - if o != nil && !isNil(o.UseTargetHostHeader) { - return true - } - - return false -} - -// SetUseTargetHostHeader gets a reference to the given bool and assigns it to the UseTargetHostHeader field. -func (o *EnforcementPoint) SetUseTargetHostHeader(v bool) { - o.UseTargetHostHeader = &v -} - -// GetVhost returns the Vhost field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *EnforcementPoint) GetVhost() string { - if o == nil || isNil(o.Vhost.Get()) { - var ret string - return ret - } - return *o.Vhost.Get() -} - -// GetVhostOk returns a tuple with the Vhost 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 *EnforcementPoint) GetVhostOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Vhost.Get(), o.Vhost.IsSet() -} - -// HasVhost returns a boolean if a field has been set. -func (o *EnforcementPoint) HasVhost() bool { - if o != nil && o.Vhost.IsSet() { - return true - } - - return false -} - -// SetVhost gets a reference to the given NullableString and assigns it to the Vhost field. -func (o *EnforcementPoint) SetVhost(v string) { - o.Vhost.Set(&v) -} -// SetVhostNil sets the value for Vhost to be an explicit nil -func (o *EnforcementPoint) SetVhostNil() { - o.Vhost.Set(nil) -} - -// UnsetVhost ensures that no value is present for Vhost, not even an explicit nil -func (o *EnforcementPoint) UnsetVhost() { - o.Vhost.Unset() -} - -// GetLandingPage returns the LandingPage field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *EnforcementPoint) GetLandingPage() string { - if o == nil || isNil(o.LandingPage.Get()) { - var ret string - return ret - } - return *o.LandingPage.Get() -} - -// GetLandingPageOk returns a tuple with the LandingPage 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 *EnforcementPoint) GetLandingPageOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.LandingPage.Get(), o.LandingPage.IsSet() -} - -// HasLandingPage returns a boolean if a field has been set. -func (o *EnforcementPoint) HasLandingPage() bool { - if o != nil && o.LandingPage.IsSet() { - return true - } - - return false -} - -// SetLandingPage gets a reference to the given NullableString and assigns it to the LandingPage field. -func (o *EnforcementPoint) SetLandingPage(v string) { - o.LandingPage.Set(&v) -} -// SetLandingPageNil sets the value for LandingPage to be an explicit nil -func (o *EnforcementPoint) SetLandingPageNil() { - o.LandingPage.Set(nil) -} - -// UnsetLandingPage ensures that no value is present for LandingPage, not even an explicit nil -func (o *EnforcementPoint) UnsetLandingPage() { - o.LandingPage.Unset() -} - -// GetCaseSensitive returns the CaseSensitive field value if set, zero value otherwise. -func (o *EnforcementPoint) GetCaseSensitive() bool { - if o == nil || isNil(o.CaseSensitive) { - var ret bool - return ret - } - return *o.CaseSensitive -} - -// GetCaseSensitiveOk returns a tuple with the CaseSensitive field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *EnforcementPoint) GetCaseSensitiveOk() (*bool, bool) { - if o == nil || isNil(o.CaseSensitive) { - return nil, false - } - return o.CaseSensitive, true -} - -// HasCaseSensitive returns a boolean if a field has been set. -func (o *EnforcementPoint) HasCaseSensitive() bool { - if o != nil && !isNil(o.CaseSensitive) { - return true - } - - return false -} - -// SetCaseSensitive gets a reference to the given bool and assigns it to the CaseSensitive field. -func (o *EnforcementPoint) SetCaseSensitive(v bool) { - o.CaseSensitive = &v -} - -func (o EnforcementPoint) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o EnforcementPoint) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.RequireSitewideAuthentication) { - toSerialize["require_sitewide_authentication"] = o.RequireSitewideAuthentication - } - if !isNil(o.Conditions) { - toSerialize["conditions"] = o.Conditions - } - if !isNil(o.SessionExpiryFixed) { - toSerialize["session_expiry_fixed"] = o.SessionExpiryFixed - } - if !isNil(o.SessionExpiryInactivity) { - toSerialize["session_expiry_inactivity"] = o.SessionExpiryInactivity - } - if !isNil(o.Permissions) { - toSerialize["permissions"] = o.Permissions - } - // skip: token is readOnly - if o.Target.IsSet() { - toSerialize["target"] = o.Target.Get() - } - if !isNil(o.Resources) { - toSerialize["resources"] = o.Resources - } - if !isNil(o.ContextRoot) { - toSerialize["context_root"] = o.ContextRoot - } - if !isNil(o.UseTargetHostHeader) { - toSerialize["use_target_host_header"] = o.UseTargetHostHeader - } - if o.Vhost.IsSet() { - toSerialize["vhost"] = o.Vhost.Get() - } - if o.LandingPage.IsSet() { - toSerialize["landing_page"] = o.LandingPage.Get() - } - if !isNil(o.CaseSensitive) { - toSerialize["case_sensitive"] = o.CaseSensitive - } - return toSerialize, nil -} - -type NullableEnforcementPoint struct { - value *EnforcementPoint - isSet bool -} - -func (v NullableEnforcementPoint) Get() *EnforcementPoint { - return v.value -} - -func (v *NullableEnforcementPoint) Set(val *EnforcementPoint) { - v.value = val - v.isSet = true -} - -func (v NullableEnforcementPoint) IsSet() bool { - return v.isSet -} - -func (v *NullableEnforcementPoint) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableEnforcementPoint(val *EnforcementPoint) *NullableEnforcementPoint { - return &NullableEnforcementPoint{value: val, isSet: true} -} - -func (v NullableEnforcementPoint) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableEnforcementPoint) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_enforcement_point_resources_inner.go b/model_enforcement_point_resources_inner.go deleted file mode 100644 index 8610b29..0000000 --- a/model_enforcement_point_resources_inner.go +++ /dev/null @@ -1,281 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the EnforcementPointResourcesInner type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &EnforcementPointResourcesInner{} - -// EnforcementPointResourcesInner struct for EnforcementPointResourcesInner -type EnforcementPointResourcesInner struct { - Path *string `json:"path,omitempty"` - IsPathRegex NullableBool `json:"is_path_regex,omitempty"` - RequireAuth *bool `json:"require_auth,omitempty"` - Permission *string `json:"permission,omitempty"` - // required if permission == \"conditions\" - Conditions *string `json:"conditions,omitempty"` -} - -// NewEnforcementPointResourcesInner instantiates a new EnforcementPointResourcesInner 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 NewEnforcementPointResourcesInner() *EnforcementPointResourcesInner { - this := EnforcementPointResourcesInner{} - return &this -} - -// NewEnforcementPointResourcesInnerWithDefaults instantiates a new EnforcementPointResourcesInner 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 NewEnforcementPointResourcesInnerWithDefaults() *EnforcementPointResourcesInner { - this := EnforcementPointResourcesInner{} - return &this -} - -// GetPath returns the Path field value if set, zero value otherwise. -func (o *EnforcementPointResourcesInner) GetPath() string { - if o == nil || isNil(o.Path) { - 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 *EnforcementPointResourcesInner) GetPathOk() (*string, bool) { - if o == nil || isNil(o.Path) { - return nil, false - } - return o.Path, true -} - -// HasPath returns a boolean if a field has been set. -func (o *EnforcementPointResourcesInner) HasPath() bool { - if o != nil && !isNil(o.Path) { - return true - } - - return false -} - -// SetPath gets a reference to the given string and assigns it to the Path field. -func (o *EnforcementPointResourcesInner) SetPath(v string) { - o.Path = &v -} - -// GetIsPathRegex returns the IsPathRegex field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *EnforcementPointResourcesInner) GetIsPathRegex() bool { - if o == nil || isNil(o.IsPathRegex.Get()) { - var ret bool - return ret - } - return *o.IsPathRegex.Get() -} - -// GetIsPathRegexOk returns a tuple with the IsPathRegex 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 *EnforcementPointResourcesInner) GetIsPathRegexOk() (*bool, bool) { - if o == nil { - return nil, false - } - return o.IsPathRegex.Get(), o.IsPathRegex.IsSet() -} - -// HasIsPathRegex returns a boolean if a field has been set. -func (o *EnforcementPointResourcesInner) HasIsPathRegex() bool { - if o != nil && o.IsPathRegex.IsSet() { - return true - } - - return false -} - -// SetIsPathRegex gets a reference to the given NullableBool and assigns it to the IsPathRegex field. -func (o *EnforcementPointResourcesInner) SetIsPathRegex(v bool) { - o.IsPathRegex.Set(&v) -} -// SetIsPathRegexNil sets the value for IsPathRegex to be an explicit nil -func (o *EnforcementPointResourcesInner) SetIsPathRegexNil() { - o.IsPathRegex.Set(nil) -} - -// UnsetIsPathRegex ensures that no value is present for IsPathRegex, not even an explicit nil -func (o *EnforcementPointResourcesInner) UnsetIsPathRegex() { - o.IsPathRegex.Unset() -} - -// GetRequireAuth returns the RequireAuth field value if set, zero value otherwise. -func (o *EnforcementPointResourcesInner) GetRequireAuth() bool { - if o == nil || isNil(o.RequireAuth) { - var ret bool - return ret - } - return *o.RequireAuth -} - -// GetRequireAuthOk returns a tuple with the RequireAuth field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *EnforcementPointResourcesInner) GetRequireAuthOk() (*bool, bool) { - if o == nil || isNil(o.RequireAuth) { - return nil, false - } - return o.RequireAuth, true -} - -// HasRequireAuth returns a boolean if a field has been set. -func (o *EnforcementPointResourcesInner) HasRequireAuth() bool { - if o != nil && !isNil(o.RequireAuth) { - return true - } - - return false -} - -// SetRequireAuth gets a reference to the given bool and assigns it to the RequireAuth field. -func (o *EnforcementPointResourcesInner) SetRequireAuth(v bool) { - o.RequireAuth = &v -} - -// GetPermission returns the Permission field value if set, zero value otherwise. -func (o *EnforcementPointResourcesInner) GetPermission() string { - if o == nil || isNil(o.Permission) { - var ret string - return ret - } - return *o.Permission -} - -// GetPermissionOk returns a tuple with the Permission field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *EnforcementPointResourcesInner) GetPermissionOk() (*string, bool) { - if o == nil || isNil(o.Permission) { - return nil, false - } - return o.Permission, true -} - -// HasPermission returns a boolean if a field has been set. -func (o *EnforcementPointResourcesInner) HasPermission() bool { - if o != nil && !isNil(o.Permission) { - return true - } - - return false -} - -// SetPermission gets a reference to the given string and assigns it to the Permission field. -func (o *EnforcementPointResourcesInner) SetPermission(v string) { - o.Permission = &v -} - -// GetConditions returns the Conditions field value if set, zero value otherwise. -func (o *EnforcementPointResourcesInner) GetConditions() string { - if o == nil || isNil(o.Conditions) { - var ret string - return ret - } - return *o.Conditions -} - -// GetConditionsOk returns a tuple with the Conditions field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *EnforcementPointResourcesInner) GetConditionsOk() (*string, bool) { - if o == nil || isNil(o.Conditions) { - return nil, false - } - return o.Conditions, true -} - -// HasConditions returns a boolean if a field has been set. -func (o *EnforcementPointResourcesInner) HasConditions() bool { - if o != nil && !isNil(o.Conditions) { - return true - } - - return false -} - -// SetConditions gets a reference to the given string and assigns it to the Conditions field. -func (o *EnforcementPointResourcesInner) SetConditions(v string) { - o.Conditions = &v -} - -func (o EnforcementPointResourcesInner) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o EnforcementPointResourcesInner) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Path) { - toSerialize["path"] = o.Path - } - if o.IsPathRegex.IsSet() { - toSerialize["is_path_regex"] = o.IsPathRegex.Get() - } - if !isNil(o.RequireAuth) { - toSerialize["require_auth"] = o.RequireAuth - } - if !isNil(o.Permission) { - toSerialize["permission"] = o.Permission - } - if !isNil(o.Conditions) { - toSerialize["conditions"] = o.Conditions - } - return toSerialize, nil -} - -type NullableEnforcementPointResourcesInner struct { - value *EnforcementPointResourcesInner - isSet bool -} - -func (v NullableEnforcementPointResourcesInner) Get() *EnforcementPointResourcesInner { - return v.value -} - -func (v *NullableEnforcementPointResourcesInner) Set(val *EnforcementPointResourcesInner) { - v.value = val - v.isSet = true -} - -func (v NullableEnforcementPointResourcesInner) IsSet() bool { - return v.isSet -} - -func (v *NullableEnforcementPointResourcesInner) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableEnforcementPointResourcesInner(val *EnforcementPointResourcesInner) *NullableEnforcementPointResourcesInner { - return &NullableEnforcementPointResourcesInner{value: val, isSet: true} -} - -func (v NullableEnforcementPointResourcesInner) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableEnforcementPointResourcesInner) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_enroll_mfa_factor_200_response.go b/model_enroll_mfa_factor_200_response.go deleted file mode 100644 index 56a7773..0000000 --- a/model_enroll_mfa_factor_200_response.go +++ /dev/null @@ -1,162 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the EnrollMfaFactor200Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &EnrollMfaFactor200Response{} - -// EnrollMfaFactor200Response struct for EnrollMfaFactor200Response -type EnrollMfaFactor200Response struct { - Status *Error `json:"status,omitempty"` - Data []GetEnrolledFactors200ResponseDataOtpDevicesInner `json:"data,omitempty"` -} - -// NewEnrollMfaFactor200Response instantiates a new EnrollMfaFactor200Response 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 NewEnrollMfaFactor200Response() *EnrollMfaFactor200Response { - this := EnrollMfaFactor200Response{} - return &this -} - -// NewEnrollMfaFactor200ResponseWithDefaults instantiates a new EnrollMfaFactor200Response 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 NewEnrollMfaFactor200ResponseWithDefaults() *EnrollMfaFactor200Response { - this := EnrollMfaFactor200Response{} - return &this -} - -// GetStatus returns the Status field value if set, zero value otherwise. -func (o *EnrollMfaFactor200Response) GetStatus() Error { - if o == nil || isNil(o.Status) { - var ret Error - return ret - } - return *o.Status -} - -// GetStatusOk returns a tuple with the Status field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *EnrollMfaFactor200Response) GetStatusOk() (*Error, bool) { - if o == nil || isNil(o.Status) { - return nil, false - } - return o.Status, true -} - -// HasStatus returns a boolean if a field has been set. -func (o *EnrollMfaFactor200Response) HasStatus() bool { - if o != nil && !isNil(o.Status) { - return true - } - - return false -} - -// SetStatus gets a reference to the given Error and assigns it to the Status field. -func (o *EnrollMfaFactor200Response) SetStatus(v Error) { - o.Status = &v -} - -// GetData returns the Data field value if set, zero value otherwise. -func (o *EnrollMfaFactor200Response) GetData() []GetEnrolledFactors200ResponseDataOtpDevicesInner { - if o == nil || isNil(o.Data) { - var ret []GetEnrolledFactors200ResponseDataOtpDevicesInner - return ret - } - return o.Data -} - -// GetDataOk returns a tuple with the Data field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *EnrollMfaFactor200Response) GetDataOk() ([]GetEnrolledFactors200ResponseDataOtpDevicesInner, bool) { - if o == nil || isNil(o.Data) { - return nil, false - } - return o.Data, true -} - -// HasData returns a boolean if a field has been set. -func (o *EnrollMfaFactor200Response) HasData() bool { - if o != nil && !isNil(o.Data) { - return true - } - - return false -} - -// SetData gets a reference to the given []GetEnrolledFactors200ResponseDataOtpDevicesInner and assigns it to the Data field. -func (o *EnrollMfaFactor200Response) SetData(v []GetEnrolledFactors200ResponseDataOtpDevicesInner) { - o.Data = v -} - -func (o EnrollMfaFactor200Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o EnrollMfaFactor200Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Status) { - toSerialize["status"] = o.Status - } - if !isNil(o.Data) { - toSerialize["data"] = o.Data - } - return toSerialize, nil -} - -type NullableEnrollMfaFactor200Response struct { - value *EnrollMfaFactor200Response - isSet bool -} - -func (v NullableEnrollMfaFactor200Response) Get() *EnrollMfaFactor200Response { - return v.value -} - -func (v *NullableEnrollMfaFactor200Response) Set(val *EnrollMfaFactor200Response) { - v.value = val - v.isSet = true -} - -func (v NullableEnrollMfaFactor200Response) IsSet() bool { - return v.isSet -} - -func (v *NullableEnrollMfaFactor200Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableEnrollMfaFactor200Response(val *EnrollMfaFactor200Response) *NullableEnrollMfaFactor200Response { - return &NullableEnrollMfaFactor200Response{value: val, isSet: true} -} - -func (v NullableEnrollMfaFactor200Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableEnrollMfaFactor200Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_error.go b/model_error.go deleted file mode 100644 index dd4e9a2..0000000 --- a/model_error.go +++ /dev/null @@ -1,216 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the Error type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Error{} - -// Error struct for Error -type Error struct { - Error *bool `json:"error,omitempty"` - Code int32 `json:"code"` - Type *string `json:"type,omitempty"` - Message string `json:"message"` -} - -// NewError instantiates a new Error 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 NewError(code int32, message string) *Error { - this := Error{} - this.Code = code - this.Message = message - return &this -} - -// NewErrorWithDefaults instantiates a new Error 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 NewErrorWithDefaults() *Error { - this := Error{} - return &this -} - -// GetError returns the Error field value if set, zero value otherwise. -func (o *Error) GetError() bool { - if o == nil || isNil(o.Error) { - var ret bool - return ret - } - return *o.Error -} - -// 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 *Error) GetErrorOk() (*bool, bool) { - if o == nil || isNil(o.Error) { - return nil, false - } - return o.Error, true -} - -// HasError returns a boolean if a field has been set. -func (o *Error) HasError() bool { - if o != nil && !isNil(o.Error) { - return true - } - - return false -} - -// SetError gets a reference to the given bool and assigns it to the Error field. -func (o *Error) SetError(v bool) { - o.Error = &v -} - -// GetCode returns the Code field value -func (o *Error) GetCode() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.Code -} - -// GetCodeOk returns a tuple with the Code field value -// and a boolean to check if the value has been set. -func (o *Error) GetCodeOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.Code, true -} - -// SetCode sets field value -func (o *Error) SetCode(v int32) { - o.Code = v -} - -// GetType returns the Type field value if set, zero value otherwise. -func (o *Error) GetType() string { - if o == nil || isNil(o.Type) { - var ret string - return ret - } - return *o.Type -} - -// 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 *Error) GetTypeOk() (*string, bool) { - if o == nil || isNil(o.Type) { - return nil, false - } - return o.Type, true -} - -// HasType returns a boolean if a field has been set. -func (o *Error) HasType() bool { - if o != nil && !isNil(o.Type) { - return true - } - - return false -} - -// SetType gets a reference to the given string and assigns it to the Type field. -func (o *Error) SetType(v string) { - o.Type = &v -} - -// GetMessage returns the Message field value -func (o *Error) GetMessage() string { - if o == nil { - var ret string - return ret - } - - return o.Message -} - -// GetMessageOk returns a tuple with the Message field value -// and a boolean to check if the value has been set. -func (o *Error) GetMessageOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Message, true -} - -// SetMessage sets field value -func (o *Error) SetMessage(v string) { - o.Message = v -} - -func (o Error) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Error) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Error) { - toSerialize["error"] = o.Error - } - toSerialize["code"] = o.Code - if !isNil(o.Type) { - toSerialize["type"] = o.Type - } - toSerialize["message"] = o.Message - return toSerialize, nil -} - -type NullableError struct { - value *Error - isSet bool -} - -func (v NullableError) Get() *Error { - return v.value -} - -func (v *NullableError) Set(val *Error) { - v.value = val - v.isSet = true -} - -func (v NullableError) IsSet() bool { - return v.isSet -} - -func (v *NullableError) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableError(val *Error) *NullableError { - return &NullableError{value: val, isSet: true} -} - -func (v NullableError) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableError) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_event.go b/model_event.go deleted file mode 100644 index 4a58249..0000000 --- a/model_event.go +++ /dev/null @@ -1,1738 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the Event type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Event{} - -// Event struct for Event -type Event struct { - // Account that triggered the event. - AccountId *int32 `json:"account_id,omitempty"` - // Acting system that triggered the event when the actor is not a user. - ActorSystem *string `json:"actor_system,omitempty"` - // ID of the user whose action triggered the event. - ActorUserId *int32 `json:"actor_user_id,omitempty"` - // First and last name of the user whose action triggered the event. - ActorUserName *string `json:"actor_user_name,omitempty"` - AdcId *int32 `json:"adc_id,omitempty"` - // Name of the app involved in the event, if applicable. - AppName *string `json:"app-name,omitempty"` - // ID of the app involved in the event, if applicable. - AppId *int32 `json:"app_id,omitempty"` - AssumedBySuperadminOrReseller *int32 `json:"assumed_by_superadmin_or_reseller,omitempty"` - // ID of the user who assumed the role of the acting user to trigger the event, if applicable. - AssumingActingUserId *int32 `json:"assuming_acting_user_id,omitempty"` - CertificateId *int32 `json:"certificate_id,omitempty"` - // Client ID used to generate the access token that made the API call that generated the event. - ClientId *string `json:"client_id,omitempty"` - // ISO8601 Time and date at which the event was created. This value is autogenerated by OneLogin. - CreatedAt *string `json:"created_at,omitempty"` - // More details about the event. - CustomMessage *string `json:"custom_message,omitempty"` - // Directory sync run ID. - DirectorySyncRunId *int32 `json:"directory_sync_run_id,omitempty"` - // Provisioning error details, if applicable. - ErrorDescription *string `json:"error_description,omitempty"` - // Type of event triggered. - EventTypeId *int32 `json:"event_type_id,omitempty"` - // Name of a group involved in the event. - GroupName *string `json:"group-name,omitempty"` - // ID of a group involved in the event. - GroupId *int32 `json:"group_id,omitempty"` - // Event's unique ID in OneLogin. Autogenerated by OneLogin. - Id *int32 `json:"id,omitempty"` - // IP address of the machine used to trigger the event. - Ipaddr *string `json:"ipaddr,omitempty"` - MappingId *int32 `json:"mapping_id,omitempty"` - // More details about the event. - Notes *string `json:"notes,omitempty"` - ObjectId *int32 `json:"object_id,omitempty"` - // ID of a device involved in the event. - OtpDeviceId *int32 `json:"otp_device_id,omitempty"` - // Name of a device involved in the event. - OtpDeviceName *string `json:"otp_device_name,omitempty"` - Param *string `json:"param,omitempty"` - // ID of the policy involved in the event. - PolicyId *int32 `json:"policy_id,omitempty"` - // Name of the policy involved in the event. - PolicyName *string `json:"policy_name,omitempty"` - PolicyType *string `json:"policy_type,omitempty"` - PrivilegeId *int32 `json:"privilege_id,omitempty"` - ProxyIp *string `json:"proxy_ip,omitempty"` - RadiusConfigId *int32 `json:"radius_config_id,omitempty"` - ResolvedAt *string `json:"resolved_at,omitempty"` - // ID of the resource (user, role, group, and so forth) associated with the event. - ResourceTypeId *int32 `json:"resource_type_id,omitempty"` - // Identifier for risk cookie - RiskCookieId *string `json:"risk_cookie_id,omitempty"` - RiskReasons *string `json:"risk_reasons,omitempty"` - RiskScore *int32 `json:"risk_score,omitempty"` - // ID of a role involved in the event. - RoleId *int32 `json:"role_id,omitempty"` - // Name of a role involved in the event. - RoleName *string `json:"role_name,omitempty"` - ServiceDirectoryId *int32 `json:"service_directory_id,omitempty"` - Solved *bool `json:"solved,omitempty"` - TrustedIdpId *int32 `json:"trusted_idp_id,omitempty"` - UserFieldId *int32 `json:"user_field_id,omitempty"` - // ID of the user that was acted upon to trigger the event. - UserId *int32 `json:"user_id,omitempty"` - // Name of the user that was acted upon to trigger the event. - UserName *string `json:"user_name,omitempty"` -} - -// NewEvent instantiates a new Event 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 NewEvent() *Event { - this := Event{} - return &this -} - -// NewEventWithDefaults instantiates a new Event 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 NewEventWithDefaults() *Event { - this := Event{} - return &this -} - -// GetAccountId returns the AccountId field value if set, zero value otherwise. -func (o *Event) GetAccountId() int32 { - if o == nil || isNil(o.AccountId) { - var ret int32 - return ret - } - return *o.AccountId -} - -// GetAccountIdOk returns a tuple with the AccountId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Event) GetAccountIdOk() (*int32, bool) { - if o == nil || isNil(o.AccountId) { - return nil, false - } - return o.AccountId, true -} - -// HasAccountId returns a boolean if a field has been set. -func (o *Event) HasAccountId() bool { - if o != nil && !isNil(o.AccountId) { - return true - } - - return false -} - -// SetAccountId gets a reference to the given int32 and assigns it to the AccountId field. -func (o *Event) SetAccountId(v int32) { - o.AccountId = &v -} - -// GetActorSystem returns the ActorSystem field value if set, zero value otherwise. -func (o *Event) GetActorSystem() string { - if o == nil || isNil(o.ActorSystem) { - var ret string - return ret - } - return *o.ActorSystem -} - -// GetActorSystemOk returns a tuple with the ActorSystem field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Event) GetActorSystemOk() (*string, bool) { - if o == nil || isNil(o.ActorSystem) { - return nil, false - } - return o.ActorSystem, true -} - -// HasActorSystem returns a boolean if a field has been set. -func (o *Event) HasActorSystem() bool { - if o != nil && !isNil(o.ActorSystem) { - return true - } - - return false -} - -// SetActorSystem gets a reference to the given string and assigns it to the ActorSystem field. -func (o *Event) SetActorSystem(v string) { - o.ActorSystem = &v -} - -// GetActorUserId returns the ActorUserId field value if set, zero value otherwise. -func (o *Event) GetActorUserId() int32 { - if o == nil || isNil(o.ActorUserId) { - var ret int32 - return ret - } - return *o.ActorUserId -} - -// GetActorUserIdOk returns a tuple with the ActorUserId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Event) GetActorUserIdOk() (*int32, bool) { - if o == nil || isNil(o.ActorUserId) { - return nil, false - } - return o.ActorUserId, true -} - -// HasActorUserId returns a boolean if a field has been set. -func (o *Event) HasActorUserId() bool { - if o != nil && !isNil(o.ActorUserId) { - return true - } - - return false -} - -// SetActorUserId gets a reference to the given int32 and assigns it to the ActorUserId field. -func (o *Event) SetActorUserId(v int32) { - o.ActorUserId = &v -} - -// GetActorUserName returns the ActorUserName field value if set, zero value otherwise. -func (o *Event) GetActorUserName() string { - if o == nil || isNil(o.ActorUserName) { - var ret string - return ret - } - return *o.ActorUserName -} - -// GetActorUserNameOk returns a tuple with the ActorUserName field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Event) GetActorUserNameOk() (*string, bool) { - if o == nil || isNil(o.ActorUserName) { - return nil, false - } - return o.ActorUserName, true -} - -// HasActorUserName returns a boolean if a field has been set. -func (o *Event) HasActorUserName() bool { - if o != nil && !isNil(o.ActorUserName) { - return true - } - - return false -} - -// SetActorUserName gets a reference to the given string and assigns it to the ActorUserName field. -func (o *Event) SetActorUserName(v string) { - o.ActorUserName = &v -} - -// GetAdcId returns the AdcId field value if set, zero value otherwise. -func (o *Event) GetAdcId() int32 { - if o == nil || isNil(o.AdcId) { - var ret int32 - return ret - } - return *o.AdcId -} - -// GetAdcIdOk returns a tuple with the AdcId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Event) GetAdcIdOk() (*int32, bool) { - if o == nil || isNil(o.AdcId) { - return nil, false - } - return o.AdcId, true -} - -// HasAdcId returns a boolean if a field has been set. -func (o *Event) HasAdcId() bool { - if o != nil && !isNil(o.AdcId) { - return true - } - - return false -} - -// SetAdcId gets a reference to the given int32 and assigns it to the AdcId field. -func (o *Event) SetAdcId(v int32) { - o.AdcId = &v -} - -// GetAppName returns the AppName field value if set, zero value otherwise. -func (o *Event) GetAppName() string { - if o == nil || isNil(o.AppName) { - var ret string - return ret - } - return *o.AppName -} - -// GetAppNameOk returns a tuple with the AppName field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Event) GetAppNameOk() (*string, bool) { - if o == nil || isNil(o.AppName) { - return nil, false - } - return o.AppName, true -} - -// HasAppName returns a boolean if a field has been set. -func (o *Event) HasAppName() bool { - if o != nil && !isNil(o.AppName) { - return true - } - - return false -} - -// SetAppName gets a reference to the given string and assigns it to the AppName field. -func (o *Event) SetAppName(v string) { - o.AppName = &v -} - -// GetAppId returns the AppId field value if set, zero value otherwise. -func (o *Event) GetAppId() int32 { - if o == nil || isNil(o.AppId) { - var ret int32 - return ret - } - return *o.AppId -} - -// GetAppIdOk returns a tuple with the AppId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Event) GetAppIdOk() (*int32, bool) { - if o == nil || isNil(o.AppId) { - return nil, false - } - return o.AppId, true -} - -// HasAppId returns a boolean if a field has been set. -func (o *Event) HasAppId() bool { - if o != nil && !isNil(o.AppId) { - return true - } - - return false -} - -// SetAppId gets a reference to the given int32 and assigns it to the AppId field. -func (o *Event) SetAppId(v int32) { - o.AppId = &v -} - -// GetAssumedBySuperadminOrReseller returns the AssumedBySuperadminOrReseller field value if set, zero value otherwise. -func (o *Event) GetAssumedBySuperadminOrReseller() int32 { - if o == nil || isNil(o.AssumedBySuperadminOrReseller) { - var ret int32 - return ret - } - return *o.AssumedBySuperadminOrReseller -} - -// GetAssumedBySuperadminOrResellerOk returns a tuple with the AssumedBySuperadminOrReseller field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Event) GetAssumedBySuperadminOrResellerOk() (*int32, bool) { - if o == nil || isNil(o.AssumedBySuperadminOrReseller) { - return nil, false - } - return o.AssumedBySuperadminOrReseller, true -} - -// HasAssumedBySuperadminOrReseller returns a boolean if a field has been set. -func (o *Event) HasAssumedBySuperadminOrReseller() bool { - if o != nil && !isNil(o.AssumedBySuperadminOrReseller) { - return true - } - - return false -} - -// SetAssumedBySuperadminOrReseller gets a reference to the given int32 and assigns it to the AssumedBySuperadminOrReseller field. -func (o *Event) SetAssumedBySuperadminOrReseller(v int32) { - o.AssumedBySuperadminOrReseller = &v -} - -// GetAssumingActingUserId returns the AssumingActingUserId field value if set, zero value otherwise. -func (o *Event) GetAssumingActingUserId() int32 { - if o == nil || isNil(o.AssumingActingUserId) { - var ret int32 - return ret - } - return *o.AssumingActingUserId -} - -// GetAssumingActingUserIdOk returns a tuple with the AssumingActingUserId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Event) GetAssumingActingUserIdOk() (*int32, bool) { - if o == nil || isNil(o.AssumingActingUserId) { - return nil, false - } - return o.AssumingActingUserId, true -} - -// HasAssumingActingUserId returns a boolean if a field has been set. -func (o *Event) HasAssumingActingUserId() bool { - if o != nil && !isNil(o.AssumingActingUserId) { - return true - } - - return false -} - -// SetAssumingActingUserId gets a reference to the given int32 and assigns it to the AssumingActingUserId field. -func (o *Event) SetAssumingActingUserId(v int32) { - o.AssumingActingUserId = &v -} - -// GetCertificateId returns the CertificateId field value if set, zero value otherwise. -func (o *Event) GetCertificateId() int32 { - if o == nil || isNil(o.CertificateId) { - var ret int32 - return ret - } - return *o.CertificateId -} - -// GetCertificateIdOk returns a tuple with the CertificateId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Event) GetCertificateIdOk() (*int32, bool) { - if o == nil || isNil(o.CertificateId) { - return nil, false - } - return o.CertificateId, true -} - -// HasCertificateId returns a boolean if a field has been set. -func (o *Event) HasCertificateId() bool { - if o != nil && !isNil(o.CertificateId) { - return true - } - - return false -} - -// SetCertificateId gets a reference to the given int32 and assigns it to the CertificateId field. -func (o *Event) SetCertificateId(v int32) { - o.CertificateId = &v -} - -// GetClientId returns the ClientId field value if set, zero value otherwise. -func (o *Event) GetClientId() string { - if o == nil || isNil(o.ClientId) { - var ret string - return ret - } - return *o.ClientId -} - -// 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 *Event) GetClientIdOk() (*string, bool) { - if o == nil || isNil(o.ClientId) { - return nil, false - } - return o.ClientId, true -} - -// HasClientId returns a boolean if a field has been set. -func (o *Event) HasClientId() bool { - if o != nil && !isNil(o.ClientId) { - return true - } - - return false -} - -// SetClientId gets a reference to the given string and assigns it to the ClientId field. -func (o *Event) SetClientId(v string) { - o.ClientId = &v -} - -// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. -func (o *Event) GetCreatedAt() string { - if o == nil || isNil(o.CreatedAt) { - var ret string - return ret - } - return *o.CreatedAt -} - -// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Event) GetCreatedAtOk() (*string, bool) { - if o == nil || isNil(o.CreatedAt) { - return nil, false - } - return o.CreatedAt, true -} - -// HasCreatedAt returns a boolean if a field has been set. -func (o *Event) HasCreatedAt() bool { - if o != nil && !isNil(o.CreatedAt) { - return true - } - - return false -} - -// SetCreatedAt gets a reference to the given string and assigns it to the CreatedAt field. -func (o *Event) SetCreatedAt(v string) { - o.CreatedAt = &v -} - -// GetCustomMessage returns the CustomMessage field value if set, zero value otherwise. -func (o *Event) GetCustomMessage() string { - if o == nil || isNil(o.CustomMessage) { - var ret string - return ret - } - return *o.CustomMessage -} - -// GetCustomMessageOk returns a tuple with the CustomMessage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Event) GetCustomMessageOk() (*string, bool) { - if o == nil || isNil(o.CustomMessage) { - return nil, false - } - return o.CustomMessage, true -} - -// HasCustomMessage returns a boolean if a field has been set. -func (o *Event) HasCustomMessage() bool { - if o != nil && !isNil(o.CustomMessage) { - return true - } - - return false -} - -// SetCustomMessage gets a reference to the given string and assigns it to the CustomMessage field. -func (o *Event) SetCustomMessage(v string) { - o.CustomMessage = &v -} - -// GetDirectorySyncRunId returns the DirectorySyncRunId field value if set, zero value otherwise. -func (o *Event) GetDirectorySyncRunId() int32 { - if o == nil || isNil(o.DirectorySyncRunId) { - var ret int32 - return ret - } - return *o.DirectorySyncRunId -} - -// GetDirectorySyncRunIdOk returns a tuple with the DirectorySyncRunId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Event) GetDirectorySyncRunIdOk() (*int32, bool) { - if o == nil || isNil(o.DirectorySyncRunId) { - return nil, false - } - return o.DirectorySyncRunId, true -} - -// HasDirectorySyncRunId returns a boolean if a field has been set. -func (o *Event) HasDirectorySyncRunId() bool { - if o != nil && !isNil(o.DirectorySyncRunId) { - return true - } - - return false -} - -// SetDirectorySyncRunId gets a reference to the given int32 and assigns it to the DirectorySyncRunId field. -func (o *Event) SetDirectorySyncRunId(v int32) { - o.DirectorySyncRunId = &v -} - -// GetErrorDescription returns the ErrorDescription field value if set, zero value otherwise. -func (o *Event) GetErrorDescription() string { - if o == nil || isNil(o.ErrorDescription) { - var ret string - return ret - } - return *o.ErrorDescription -} - -// GetErrorDescriptionOk returns a tuple with the ErrorDescription field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Event) GetErrorDescriptionOk() (*string, bool) { - if o == nil || isNil(o.ErrorDescription) { - return nil, false - } - return o.ErrorDescription, true -} - -// HasErrorDescription returns a boolean if a field has been set. -func (o *Event) HasErrorDescription() bool { - if o != nil && !isNil(o.ErrorDescription) { - return true - } - - return false -} - -// SetErrorDescription gets a reference to the given string and assigns it to the ErrorDescription field. -func (o *Event) SetErrorDescription(v string) { - o.ErrorDescription = &v -} - -// GetEventTypeId returns the EventTypeId field value if set, zero value otherwise. -func (o *Event) GetEventTypeId() int32 { - if o == nil || isNil(o.EventTypeId) { - var ret int32 - return ret - } - return *o.EventTypeId -} - -// GetEventTypeIdOk returns a tuple with the EventTypeId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Event) GetEventTypeIdOk() (*int32, bool) { - if o == nil || isNil(o.EventTypeId) { - return nil, false - } - return o.EventTypeId, true -} - -// HasEventTypeId returns a boolean if a field has been set. -func (o *Event) HasEventTypeId() bool { - if o != nil && !isNil(o.EventTypeId) { - return true - } - - return false -} - -// SetEventTypeId gets a reference to the given int32 and assigns it to the EventTypeId field. -func (o *Event) SetEventTypeId(v int32) { - o.EventTypeId = &v -} - -// GetGroupName returns the GroupName field value if set, zero value otherwise. -func (o *Event) GetGroupName() string { - if o == nil || isNil(o.GroupName) { - var ret string - return ret - } - return *o.GroupName -} - -// GetGroupNameOk returns a tuple with the GroupName field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Event) GetGroupNameOk() (*string, bool) { - if o == nil || isNil(o.GroupName) { - return nil, false - } - return o.GroupName, true -} - -// HasGroupName returns a boolean if a field has been set. -func (o *Event) HasGroupName() bool { - if o != nil && !isNil(o.GroupName) { - return true - } - - return false -} - -// SetGroupName gets a reference to the given string and assigns it to the GroupName field. -func (o *Event) SetGroupName(v string) { - o.GroupName = &v -} - -// GetGroupId returns the GroupId field value if set, zero value otherwise. -func (o *Event) GetGroupId() int32 { - if o == nil || isNil(o.GroupId) { - var ret int32 - return ret - } - return *o.GroupId -} - -// GetGroupIdOk returns a tuple with the GroupId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Event) GetGroupIdOk() (*int32, bool) { - if o == nil || isNil(o.GroupId) { - return nil, false - } - return o.GroupId, true -} - -// HasGroupId returns a boolean if a field has been set. -func (o *Event) HasGroupId() bool { - if o != nil && !isNil(o.GroupId) { - return true - } - - return false -} - -// SetGroupId gets a reference to the given int32 and assigns it to the GroupId field. -func (o *Event) SetGroupId(v int32) { - o.GroupId = &v -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *Event) GetId() int32 { - if o == nil || isNil(o.Id) { - var ret int32 - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Event) GetIdOk() (*int32, bool) { - if o == nil || isNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *Event) HasId() bool { - if o != nil && !isNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given int32 and assigns it to the Id field. -func (o *Event) SetId(v int32) { - o.Id = &v -} - -// GetIpaddr returns the Ipaddr field value if set, zero value otherwise. -func (o *Event) GetIpaddr() string { - if o == nil || isNil(o.Ipaddr) { - var ret string - return ret - } - return *o.Ipaddr -} - -// GetIpaddrOk returns a tuple with the Ipaddr field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Event) GetIpaddrOk() (*string, bool) { - if o == nil || isNil(o.Ipaddr) { - return nil, false - } - return o.Ipaddr, true -} - -// HasIpaddr returns a boolean if a field has been set. -func (o *Event) HasIpaddr() bool { - if o != nil && !isNil(o.Ipaddr) { - return true - } - - return false -} - -// SetIpaddr gets a reference to the given string and assigns it to the Ipaddr field. -func (o *Event) SetIpaddr(v string) { - o.Ipaddr = &v -} - -// GetMappingId returns the MappingId field value if set, zero value otherwise. -func (o *Event) GetMappingId() int32 { - if o == nil || isNil(o.MappingId) { - var ret int32 - return ret - } - return *o.MappingId -} - -// GetMappingIdOk returns a tuple with the MappingId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Event) GetMappingIdOk() (*int32, bool) { - if o == nil || isNil(o.MappingId) { - return nil, false - } - return o.MappingId, true -} - -// HasMappingId returns a boolean if a field has been set. -func (o *Event) HasMappingId() bool { - if o != nil && !isNil(o.MappingId) { - return true - } - - return false -} - -// SetMappingId gets a reference to the given int32 and assigns it to the MappingId field. -func (o *Event) SetMappingId(v int32) { - o.MappingId = &v -} - -// GetNotes returns the Notes field value if set, zero value otherwise. -func (o *Event) GetNotes() string { - if o == nil || isNil(o.Notes) { - var ret string - return ret - } - return *o.Notes -} - -// GetNotesOk returns a tuple with the Notes field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Event) GetNotesOk() (*string, bool) { - if o == nil || isNil(o.Notes) { - return nil, false - } - return o.Notes, true -} - -// HasNotes returns a boolean if a field has been set. -func (o *Event) HasNotes() bool { - if o != nil && !isNil(o.Notes) { - return true - } - - return false -} - -// SetNotes gets a reference to the given string and assigns it to the Notes field. -func (o *Event) SetNotes(v string) { - o.Notes = &v -} - -// GetObjectId returns the ObjectId field value if set, zero value otherwise. -func (o *Event) GetObjectId() int32 { - if o == nil || isNil(o.ObjectId) { - var ret int32 - return ret - } - return *o.ObjectId -} - -// GetObjectIdOk returns a tuple with the ObjectId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Event) GetObjectIdOk() (*int32, bool) { - if o == nil || isNil(o.ObjectId) { - return nil, false - } - return o.ObjectId, true -} - -// HasObjectId returns a boolean if a field has been set. -func (o *Event) HasObjectId() bool { - if o != nil && !isNil(o.ObjectId) { - return true - } - - return false -} - -// SetObjectId gets a reference to the given int32 and assigns it to the ObjectId field. -func (o *Event) SetObjectId(v int32) { - o.ObjectId = &v -} - -// GetOtpDeviceId returns the OtpDeviceId field value if set, zero value otherwise. -func (o *Event) GetOtpDeviceId() int32 { - if o == nil || isNil(o.OtpDeviceId) { - var ret int32 - return ret - } - return *o.OtpDeviceId -} - -// GetOtpDeviceIdOk returns a tuple with the OtpDeviceId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Event) GetOtpDeviceIdOk() (*int32, bool) { - if o == nil || isNil(o.OtpDeviceId) { - return nil, false - } - return o.OtpDeviceId, true -} - -// HasOtpDeviceId returns a boolean if a field has been set. -func (o *Event) HasOtpDeviceId() bool { - if o != nil && !isNil(o.OtpDeviceId) { - return true - } - - return false -} - -// SetOtpDeviceId gets a reference to the given int32 and assigns it to the OtpDeviceId field. -func (o *Event) SetOtpDeviceId(v int32) { - o.OtpDeviceId = &v -} - -// GetOtpDeviceName returns the OtpDeviceName field value if set, zero value otherwise. -func (o *Event) GetOtpDeviceName() string { - if o == nil || isNil(o.OtpDeviceName) { - var ret string - return ret - } - return *o.OtpDeviceName -} - -// GetOtpDeviceNameOk returns a tuple with the OtpDeviceName field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Event) GetOtpDeviceNameOk() (*string, bool) { - if o == nil || isNil(o.OtpDeviceName) { - return nil, false - } - return o.OtpDeviceName, true -} - -// HasOtpDeviceName returns a boolean if a field has been set. -func (o *Event) HasOtpDeviceName() bool { - if o != nil && !isNil(o.OtpDeviceName) { - return true - } - - return false -} - -// SetOtpDeviceName gets a reference to the given string and assigns it to the OtpDeviceName field. -func (o *Event) SetOtpDeviceName(v string) { - o.OtpDeviceName = &v -} - -// GetParam returns the Param field value if set, zero value otherwise. -func (o *Event) GetParam() string { - if o == nil || isNil(o.Param) { - var ret string - return ret - } - return *o.Param -} - -// GetParamOk returns a tuple with the Param field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Event) GetParamOk() (*string, bool) { - if o == nil || isNil(o.Param) { - return nil, false - } - return o.Param, true -} - -// HasParam returns a boolean if a field has been set. -func (o *Event) HasParam() bool { - if o != nil && !isNil(o.Param) { - return true - } - - return false -} - -// SetParam gets a reference to the given string and assigns it to the Param field. -func (o *Event) SetParam(v string) { - o.Param = &v -} - -// GetPolicyId returns the PolicyId field value if set, zero value otherwise. -func (o *Event) GetPolicyId() int32 { - if o == nil || isNil(o.PolicyId) { - var ret int32 - return ret - } - return *o.PolicyId -} - -// GetPolicyIdOk returns a tuple with the PolicyId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Event) GetPolicyIdOk() (*int32, bool) { - if o == nil || isNil(o.PolicyId) { - return nil, false - } - return o.PolicyId, true -} - -// HasPolicyId returns a boolean if a field has been set. -func (o *Event) HasPolicyId() bool { - if o != nil && !isNil(o.PolicyId) { - return true - } - - return false -} - -// SetPolicyId gets a reference to the given int32 and assigns it to the PolicyId field. -func (o *Event) SetPolicyId(v int32) { - o.PolicyId = &v -} - -// GetPolicyName returns the PolicyName field value if set, zero value otherwise. -func (o *Event) GetPolicyName() string { - if o == nil || isNil(o.PolicyName) { - var ret string - return ret - } - return *o.PolicyName -} - -// GetPolicyNameOk returns a tuple with the PolicyName field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Event) GetPolicyNameOk() (*string, bool) { - if o == nil || isNil(o.PolicyName) { - return nil, false - } - return o.PolicyName, true -} - -// HasPolicyName returns a boolean if a field has been set. -func (o *Event) HasPolicyName() bool { - if o != nil && !isNil(o.PolicyName) { - return true - } - - return false -} - -// SetPolicyName gets a reference to the given string and assigns it to the PolicyName field. -func (o *Event) SetPolicyName(v string) { - o.PolicyName = &v -} - -// GetPolicyType returns the PolicyType field value if set, zero value otherwise. -func (o *Event) GetPolicyType() string { - if o == nil || isNil(o.PolicyType) { - var ret string - return ret - } - return *o.PolicyType -} - -// GetPolicyTypeOk returns a tuple with the PolicyType field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Event) GetPolicyTypeOk() (*string, bool) { - if o == nil || isNil(o.PolicyType) { - return nil, false - } - return o.PolicyType, true -} - -// HasPolicyType returns a boolean if a field has been set. -func (o *Event) HasPolicyType() bool { - if o != nil && !isNil(o.PolicyType) { - return true - } - - return false -} - -// SetPolicyType gets a reference to the given string and assigns it to the PolicyType field. -func (o *Event) SetPolicyType(v string) { - o.PolicyType = &v -} - -// GetPrivilegeId returns the PrivilegeId field value if set, zero value otherwise. -func (o *Event) GetPrivilegeId() int32 { - if o == nil || isNil(o.PrivilegeId) { - var ret int32 - return ret - } - return *o.PrivilegeId -} - -// GetPrivilegeIdOk returns a tuple with the PrivilegeId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Event) GetPrivilegeIdOk() (*int32, bool) { - if o == nil || isNil(o.PrivilegeId) { - return nil, false - } - return o.PrivilegeId, true -} - -// HasPrivilegeId returns a boolean if a field has been set. -func (o *Event) HasPrivilegeId() bool { - if o != nil && !isNil(o.PrivilegeId) { - return true - } - - return false -} - -// SetPrivilegeId gets a reference to the given int32 and assigns it to the PrivilegeId field. -func (o *Event) SetPrivilegeId(v int32) { - o.PrivilegeId = &v -} - -// GetProxyIp returns the ProxyIp field value if set, zero value otherwise. -func (o *Event) GetProxyIp() string { - if o == nil || isNil(o.ProxyIp) { - var ret string - return ret - } - return *o.ProxyIp -} - -// GetProxyIpOk returns a tuple with the ProxyIp field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Event) GetProxyIpOk() (*string, bool) { - if o == nil || isNil(o.ProxyIp) { - return nil, false - } - return o.ProxyIp, true -} - -// HasProxyIp returns a boolean if a field has been set. -func (o *Event) HasProxyIp() bool { - if o != nil && !isNil(o.ProxyIp) { - return true - } - - return false -} - -// SetProxyIp gets a reference to the given string and assigns it to the ProxyIp field. -func (o *Event) SetProxyIp(v string) { - o.ProxyIp = &v -} - -// GetRadiusConfigId returns the RadiusConfigId field value if set, zero value otherwise. -func (o *Event) GetRadiusConfigId() int32 { - if o == nil || isNil(o.RadiusConfigId) { - var ret int32 - return ret - } - return *o.RadiusConfigId -} - -// GetRadiusConfigIdOk returns a tuple with the RadiusConfigId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Event) GetRadiusConfigIdOk() (*int32, bool) { - if o == nil || isNil(o.RadiusConfigId) { - return nil, false - } - return o.RadiusConfigId, true -} - -// HasRadiusConfigId returns a boolean if a field has been set. -func (o *Event) HasRadiusConfigId() bool { - if o != nil && !isNil(o.RadiusConfigId) { - return true - } - - return false -} - -// SetRadiusConfigId gets a reference to the given int32 and assigns it to the RadiusConfigId field. -func (o *Event) SetRadiusConfigId(v int32) { - o.RadiusConfigId = &v -} - -// GetResolvedAt returns the ResolvedAt field value if set, zero value otherwise. -func (o *Event) GetResolvedAt() string { - if o == nil || isNil(o.ResolvedAt) { - var ret string - return ret - } - return *o.ResolvedAt -} - -// GetResolvedAtOk returns a tuple with the ResolvedAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Event) GetResolvedAtOk() (*string, bool) { - if o == nil || isNil(o.ResolvedAt) { - return nil, false - } - return o.ResolvedAt, true -} - -// HasResolvedAt returns a boolean if a field has been set. -func (o *Event) HasResolvedAt() bool { - if o != nil && !isNil(o.ResolvedAt) { - return true - } - - return false -} - -// SetResolvedAt gets a reference to the given string and assigns it to the ResolvedAt field. -func (o *Event) SetResolvedAt(v string) { - o.ResolvedAt = &v -} - -// GetResourceTypeId returns the ResourceTypeId field value if set, zero value otherwise. -func (o *Event) GetResourceTypeId() int32 { - if o == nil || isNil(o.ResourceTypeId) { - var ret int32 - return ret - } - return *o.ResourceTypeId -} - -// GetResourceTypeIdOk returns a tuple with the ResourceTypeId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Event) GetResourceTypeIdOk() (*int32, bool) { - if o == nil || isNil(o.ResourceTypeId) { - return nil, false - } - return o.ResourceTypeId, true -} - -// HasResourceTypeId returns a boolean if a field has been set. -func (o *Event) HasResourceTypeId() bool { - if o != nil && !isNil(o.ResourceTypeId) { - return true - } - - return false -} - -// SetResourceTypeId gets a reference to the given int32 and assigns it to the ResourceTypeId field. -func (o *Event) SetResourceTypeId(v int32) { - o.ResourceTypeId = &v -} - -// GetRiskCookieId returns the RiskCookieId field value if set, zero value otherwise. -func (o *Event) GetRiskCookieId() string { - if o == nil || isNil(o.RiskCookieId) { - var ret string - return ret - } - return *o.RiskCookieId -} - -// GetRiskCookieIdOk returns a tuple with the RiskCookieId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Event) GetRiskCookieIdOk() (*string, bool) { - if o == nil || isNil(o.RiskCookieId) { - return nil, false - } - return o.RiskCookieId, true -} - -// HasRiskCookieId returns a boolean if a field has been set. -func (o *Event) HasRiskCookieId() bool { - if o != nil && !isNil(o.RiskCookieId) { - return true - } - - return false -} - -// SetRiskCookieId gets a reference to the given string and assigns it to the RiskCookieId field. -func (o *Event) SetRiskCookieId(v string) { - o.RiskCookieId = &v -} - -// GetRiskReasons returns the RiskReasons field value if set, zero value otherwise. -func (o *Event) GetRiskReasons() string { - if o == nil || isNil(o.RiskReasons) { - var ret string - return ret - } - return *o.RiskReasons -} - -// GetRiskReasonsOk returns a tuple with the RiskReasons field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Event) GetRiskReasonsOk() (*string, bool) { - if o == nil || isNil(o.RiskReasons) { - return nil, false - } - return o.RiskReasons, true -} - -// HasRiskReasons returns a boolean if a field has been set. -func (o *Event) HasRiskReasons() bool { - if o != nil && !isNil(o.RiskReasons) { - return true - } - - return false -} - -// SetRiskReasons gets a reference to the given string and assigns it to the RiskReasons field. -func (o *Event) SetRiskReasons(v string) { - o.RiskReasons = &v -} - -// GetRiskScore returns the RiskScore field value if set, zero value otherwise. -func (o *Event) GetRiskScore() int32 { - if o == nil || isNil(o.RiskScore) { - var ret int32 - return ret - } - return *o.RiskScore -} - -// GetRiskScoreOk returns a tuple with the RiskScore field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Event) GetRiskScoreOk() (*int32, bool) { - if o == nil || isNil(o.RiskScore) { - return nil, false - } - return o.RiskScore, true -} - -// HasRiskScore returns a boolean if a field has been set. -func (o *Event) HasRiskScore() bool { - if o != nil && !isNil(o.RiskScore) { - return true - } - - return false -} - -// SetRiskScore gets a reference to the given int32 and assigns it to the RiskScore field. -func (o *Event) SetRiskScore(v int32) { - o.RiskScore = &v -} - -// GetRoleId returns the RoleId field value if set, zero value otherwise. -func (o *Event) GetRoleId() int32 { - if o == nil || isNil(o.RoleId) { - var ret int32 - return ret - } - return *o.RoleId -} - -// GetRoleIdOk returns a tuple with the RoleId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Event) GetRoleIdOk() (*int32, bool) { - if o == nil || isNil(o.RoleId) { - return nil, false - } - return o.RoleId, true -} - -// HasRoleId returns a boolean if a field has been set. -func (o *Event) HasRoleId() bool { - if o != nil && !isNil(o.RoleId) { - return true - } - - return false -} - -// SetRoleId gets a reference to the given int32 and assigns it to the RoleId field. -func (o *Event) SetRoleId(v int32) { - o.RoleId = &v -} - -// GetRoleName returns the RoleName field value if set, zero value otherwise. -func (o *Event) GetRoleName() string { - if o == nil || isNil(o.RoleName) { - var ret string - return ret - } - return *o.RoleName -} - -// GetRoleNameOk returns a tuple with the RoleName field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Event) GetRoleNameOk() (*string, bool) { - if o == nil || isNil(o.RoleName) { - return nil, false - } - return o.RoleName, true -} - -// HasRoleName returns a boolean if a field has been set. -func (o *Event) HasRoleName() bool { - if o != nil && !isNil(o.RoleName) { - return true - } - - return false -} - -// SetRoleName gets a reference to the given string and assigns it to the RoleName field. -func (o *Event) SetRoleName(v string) { - o.RoleName = &v -} - -// GetServiceDirectoryId returns the ServiceDirectoryId field value if set, zero value otherwise. -func (o *Event) GetServiceDirectoryId() int32 { - if o == nil || isNil(o.ServiceDirectoryId) { - var ret int32 - return ret - } - return *o.ServiceDirectoryId -} - -// GetServiceDirectoryIdOk returns a tuple with the ServiceDirectoryId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Event) GetServiceDirectoryIdOk() (*int32, bool) { - if o == nil || isNil(o.ServiceDirectoryId) { - return nil, false - } - return o.ServiceDirectoryId, true -} - -// HasServiceDirectoryId returns a boolean if a field has been set. -func (o *Event) HasServiceDirectoryId() bool { - if o != nil && !isNil(o.ServiceDirectoryId) { - return true - } - - return false -} - -// SetServiceDirectoryId gets a reference to the given int32 and assigns it to the ServiceDirectoryId field. -func (o *Event) SetServiceDirectoryId(v int32) { - o.ServiceDirectoryId = &v -} - -// GetSolved returns the Solved field value if set, zero value otherwise. -func (o *Event) GetSolved() bool { - if o == nil || isNil(o.Solved) { - var ret bool - return ret - } - return *o.Solved -} - -// GetSolvedOk returns a tuple with the Solved field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Event) GetSolvedOk() (*bool, bool) { - if o == nil || isNil(o.Solved) { - return nil, false - } - return o.Solved, true -} - -// HasSolved returns a boolean if a field has been set. -func (o *Event) HasSolved() bool { - if o != nil && !isNil(o.Solved) { - return true - } - - return false -} - -// SetSolved gets a reference to the given bool and assigns it to the Solved field. -func (o *Event) SetSolved(v bool) { - o.Solved = &v -} - -// GetTrustedIdpId returns the TrustedIdpId field value if set, zero value otherwise. -func (o *Event) GetTrustedIdpId() int32 { - if o == nil || isNil(o.TrustedIdpId) { - var ret int32 - return ret - } - return *o.TrustedIdpId -} - -// GetTrustedIdpIdOk returns a tuple with the TrustedIdpId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Event) GetTrustedIdpIdOk() (*int32, bool) { - if o == nil || isNil(o.TrustedIdpId) { - return nil, false - } - return o.TrustedIdpId, true -} - -// HasTrustedIdpId returns a boolean if a field has been set. -func (o *Event) HasTrustedIdpId() bool { - if o != nil && !isNil(o.TrustedIdpId) { - return true - } - - return false -} - -// SetTrustedIdpId gets a reference to the given int32 and assigns it to the TrustedIdpId field. -func (o *Event) SetTrustedIdpId(v int32) { - o.TrustedIdpId = &v -} - -// GetUserFieldId returns the UserFieldId field value if set, zero value otherwise. -func (o *Event) GetUserFieldId() int32 { - if o == nil || isNil(o.UserFieldId) { - var ret int32 - return ret - } - return *o.UserFieldId -} - -// GetUserFieldIdOk returns a tuple with the UserFieldId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Event) GetUserFieldIdOk() (*int32, bool) { - if o == nil || isNil(o.UserFieldId) { - return nil, false - } - return o.UserFieldId, true -} - -// HasUserFieldId returns a boolean if a field has been set. -func (o *Event) HasUserFieldId() bool { - if o != nil && !isNil(o.UserFieldId) { - return true - } - - return false -} - -// SetUserFieldId gets a reference to the given int32 and assigns it to the UserFieldId field. -func (o *Event) SetUserFieldId(v int32) { - o.UserFieldId = &v -} - -// GetUserId returns the UserId field value if set, zero value otherwise. -func (o *Event) GetUserId() int32 { - if o == nil || isNil(o.UserId) { - var ret int32 - return ret - } - return *o.UserId -} - -// GetUserIdOk returns a tuple with the UserId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Event) GetUserIdOk() (*int32, bool) { - if o == nil || isNil(o.UserId) { - return nil, false - } - return o.UserId, true -} - -// HasUserId returns a boolean if a field has been set. -func (o *Event) HasUserId() bool { - if o != nil && !isNil(o.UserId) { - return true - } - - return false -} - -// SetUserId gets a reference to the given int32 and assigns it to the UserId field. -func (o *Event) SetUserId(v int32) { - o.UserId = &v -} - -// GetUserName returns the UserName field value if set, zero value otherwise. -func (o *Event) GetUserName() string { - if o == nil || isNil(o.UserName) { - var ret string - return ret - } - return *o.UserName -} - -// 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 *Event) GetUserNameOk() (*string, bool) { - if o == nil || isNil(o.UserName) { - return nil, false - } - return o.UserName, true -} - -// HasUserName returns a boolean if a field has been set. -func (o *Event) HasUserName() bool { - if o != nil && !isNil(o.UserName) { - return true - } - - return false -} - -// SetUserName gets a reference to the given string and assigns it to the UserName field. -func (o *Event) SetUserName(v string) { - o.UserName = &v -} - -func (o Event) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Event) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.AccountId) { - toSerialize["account_id"] = o.AccountId - } - if !isNil(o.ActorSystem) { - toSerialize["actor_system"] = o.ActorSystem - } - if !isNil(o.ActorUserId) { - toSerialize["actor_user_id"] = o.ActorUserId - } - if !isNil(o.ActorUserName) { - toSerialize["actor_user_name"] = o.ActorUserName - } - if !isNil(o.AdcId) { - toSerialize["adc_id"] = o.AdcId - } - if !isNil(o.AppName) { - toSerialize["app-name"] = o.AppName - } - if !isNil(o.AppId) { - toSerialize["app_id"] = o.AppId - } - if !isNil(o.AssumedBySuperadminOrReseller) { - toSerialize["assumed_by_superadmin_or_reseller"] = o.AssumedBySuperadminOrReseller - } - if !isNil(o.AssumingActingUserId) { - toSerialize["assuming_acting_user_id"] = o.AssumingActingUserId - } - if !isNil(o.CertificateId) { - toSerialize["certificate_id"] = o.CertificateId - } - if !isNil(o.ClientId) { - toSerialize["client_id"] = o.ClientId - } - if !isNil(o.CreatedAt) { - toSerialize["created_at"] = o.CreatedAt - } - if !isNil(o.CustomMessage) { - toSerialize["custom_message"] = o.CustomMessage - } - if !isNil(o.DirectorySyncRunId) { - toSerialize["directory_sync_run_id"] = o.DirectorySyncRunId - } - if !isNil(o.ErrorDescription) { - toSerialize["error_description"] = o.ErrorDescription - } - if !isNil(o.EventTypeId) { - toSerialize["event_type_id"] = o.EventTypeId - } - if !isNil(o.GroupName) { - toSerialize["group-name"] = o.GroupName - } - if !isNil(o.GroupId) { - toSerialize["group_id"] = o.GroupId - } - if !isNil(o.Id) { - toSerialize["id"] = o.Id - } - if !isNil(o.Ipaddr) { - toSerialize["ipaddr"] = o.Ipaddr - } - if !isNil(o.MappingId) { - toSerialize["mapping_id"] = o.MappingId - } - if !isNil(o.Notes) { - toSerialize["notes"] = o.Notes - } - if !isNil(o.ObjectId) { - toSerialize["object_id"] = o.ObjectId - } - if !isNil(o.OtpDeviceId) { - toSerialize["otp_device_id"] = o.OtpDeviceId - } - if !isNil(o.OtpDeviceName) { - toSerialize["otp_device_name"] = o.OtpDeviceName - } - if !isNil(o.Param) { - toSerialize["param"] = o.Param - } - if !isNil(o.PolicyId) { - toSerialize["policy_id"] = o.PolicyId - } - if !isNil(o.PolicyName) { - toSerialize["policy_name"] = o.PolicyName - } - if !isNil(o.PolicyType) { - toSerialize["policy_type"] = o.PolicyType - } - if !isNil(o.PrivilegeId) { - toSerialize["privilege_id"] = o.PrivilegeId - } - if !isNil(o.ProxyIp) { - toSerialize["proxy_ip"] = o.ProxyIp - } - if !isNil(o.RadiusConfigId) { - toSerialize["radius_config_id"] = o.RadiusConfigId - } - if !isNil(o.ResolvedAt) { - toSerialize["resolved_at"] = o.ResolvedAt - } - if !isNil(o.ResourceTypeId) { - toSerialize["resource_type_id"] = o.ResourceTypeId - } - if !isNil(o.RiskCookieId) { - toSerialize["risk_cookie_id"] = o.RiskCookieId - } - if !isNil(o.RiskReasons) { - toSerialize["risk_reasons"] = o.RiskReasons - } - if !isNil(o.RiskScore) { - toSerialize["risk_score"] = o.RiskScore - } - if !isNil(o.RoleId) { - toSerialize["role_id"] = o.RoleId - } - if !isNil(o.RoleName) { - toSerialize["role_name"] = o.RoleName - } - if !isNil(o.ServiceDirectoryId) { - toSerialize["service_directory_id"] = o.ServiceDirectoryId - } - if !isNil(o.Solved) { - toSerialize["solved"] = o.Solved - } - if !isNil(o.TrustedIdpId) { - toSerialize["trusted_idp_id"] = o.TrustedIdpId - } - if !isNil(o.UserFieldId) { - toSerialize["user_field_id"] = o.UserFieldId - } - if !isNil(o.UserId) { - toSerialize["user_id"] = o.UserId - } - if !isNil(o.UserName) { - toSerialize["user_name"] = o.UserName - } - return toSerialize, nil -} - -type NullableEvent struct { - value *Event - isSet bool -} - -func (v NullableEvent) Get() *Event { - return v.value -} - -func (v *NullableEvent) Set(val *Event) { - v.value = val - v.isSet = true -} - -func (v NullableEvent) IsSet() bool { - return v.isSet -} - -func (v *NullableEvent) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableEvent(val *Event) *NullableEvent { - return &NullableEvent{value: val, isSet: true} -} - -func (v NullableEvent) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableEvent) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_generate_mf_atoken_200_response.go b/model_generate_mf_atoken_200_response.go deleted file mode 100644 index e7a7eec..0000000 --- a/model_generate_mf_atoken_200_response.go +++ /dev/null @@ -1,201 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the GenerateMFAtoken200Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GenerateMFAtoken200Response{} - -// GenerateMFAtoken200Response struct for GenerateMFAtoken200Response -type GenerateMFAtoken200Response struct { - // Token can function as a temporary MFA token. It can be used to authenticate for any app when valid. - MfaToken *string `json:"mfa_token,omitempty"` - // true indcates the token can be used multiple times, until it expires. false indicates the token is invalid after a single use or once it expires. Defaults to false. - Resuable *bool `json:"resuable,omitempty"` - // Defines the expiration time and date for the token. Format is UTC time. - ExpiresAt *string `json:"expires_at,omitempty"` -} - -// NewGenerateMFAtoken200Response instantiates a new GenerateMFAtoken200Response 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 NewGenerateMFAtoken200Response() *GenerateMFAtoken200Response { - this := GenerateMFAtoken200Response{} - return &this -} - -// NewGenerateMFAtoken200ResponseWithDefaults instantiates a new GenerateMFAtoken200Response 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 NewGenerateMFAtoken200ResponseWithDefaults() *GenerateMFAtoken200Response { - this := GenerateMFAtoken200Response{} - return &this -} - -// GetMfaToken returns the MfaToken field value if set, zero value otherwise. -func (o *GenerateMFAtoken200Response) GetMfaToken() string { - if o == nil || isNil(o.MfaToken) { - var ret string - return ret - } - return *o.MfaToken -} - -// GetMfaTokenOk returns a tuple with the MfaToken field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GenerateMFAtoken200Response) GetMfaTokenOk() (*string, bool) { - if o == nil || isNil(o.MfaToken) { - return nil, false - } - return o.MfaToken, true -} - -// HasMfaToken returns a boolean if a field has been set. -func (o *GenerateMFAtoken200Response) HasMfaToken() bool { - if o != nil && !isNil(o.MfaToken) { - return true - } - - return false -} - -// SetMfaToken gets a reference to the given string and assigns it to the MfaToken field. -func (o *GenerateMFAtoken200Response) SetMfaToken(v string) { - o.MfaToken = &v -} - -// GetResuable returns the Resuable field value if set, zero value otherwise. -func (o *GenerateMFAtoken200Response) GetResuable() bool { - if o == nil || isNil(o.Resuable) { - var ret bool - return ret - } - return *o.Resuable -} - -// GetResuableOk returns a tuple with the Resuable field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GenerateMFAtoken200Response) GetResuableOk() (*bool, bool) { - if o == nil || isNil(o.Resuable) { - return nil, false - } - return o.Resuable, true -} - -// HasResuable returns a boolean if a field has been set. -func (o *GenerateMFAtoken200Response) HasResuable() bool { - if o != nil && !isNil(o.Resuable) { - return true - } - - return false -} - -// SetResuable gets a reference to the given bool and assigns it to the Resuable field. -func (o *GenerateMFAtoken200Response) SetResuable(v bool) { - o.Resuable = &v -} - -// GetExpiresAt returns the ExpiresAt field value if set, zero value otherwise. -func (o *GenerateMFAtoken200Response) GetExpiresAt() string { - if o == nil || isNil(o.ExpiresAt) { - var ret string - return ret - } - return *o.ExpiresAt -} - -// GetExpiresAtOk returns a tuple with the ExpiresAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GenerateMFAtoken200Response) GetExpiresAtOk() (*string, bool) { - if o == nil || isNil(o.ExpiresAt) { - return nil, false - } - return o.ExpiresAt, true -} - -// HasExpiresAt returns a boolean if a field has been set. -func (o *GenerateMFAtoken200Response) HasExpiresAt() bool { - if o != nil && !isNil(o.ExpiresAt) { - return true - } - - return false -} - -// SetExpiresAt gets a reference to the given string and assigns it to the ExpiresAt field. -func (o *GenerateMFAtoken200Response) SetExpiresAt(v string) { - o.ExpiresAt = &v -} - -func (o GenerateMFAtoken200Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GenerateMFAtoken200Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.MfaToken) { - toSerialize["mfa_token"] = o.MfaToken - } - if !isNil(o.Resuable) { - toSerialize["resuable"] = o.Resuable - } - if !isNil(o.ExpiresAt) { - toSerialize["expires_at"] = o.ExpiresAt - } - return toSerialize, nil -} - -type NullableGenerateMFAtoken200Response struct { - value *GenerateMFAtoken200Response - isSet bool -} - -func (v NullableGenerateMFAtoken200Response) Get() *GenerateMFAtoken200Response { - return v.value -} - -func (v *NullableGenerateMFAtoken200Response) Set(val *GenerateMFAtoken200Response) { - v.value = val - v.isSet = true -} - -func (v NullableGenerateMFAtoken200Response) IsSet() bool { - return v.isSet -} - -func (v *NullableGenerateMFAtoken200Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGenerateMFAtoken200Response(val *GenerateMFAtoken200Response) *NullableGenerateMFAtoken200Response { - return &NullableGenerateMFAtoken200Response{value: val, isSet: true} -} - -func (v NullableGenerateMFAtoken200Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGenerateMFAtoken200Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_generate_mf_atoken_request.go b/model_generate_mf_atoken_request.go deleted file mode 100644 index 7bf2ea1..0000000 --- a/model_generate_mf_atoken_request.go +++ /dev/null @@ -1,168 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the GenerateMFAtokenRequest type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GenerateMFAtokenRequest{} - -// GenerateMFAtokenRequest struct for GenerateMFAtokenRequest -type GenerateMFAtokenRequest struct { - // Set the duration of the token in seconds. Token expiration defaults to 259200 seconds = 72 hours. 72 hours is the max value. - ExpiresIn *int32 `json:"expires_in,omitempty"` - // Defines if the token is reusable multiple times within the expiry window. Value defaults to false. If set to true, token can be used multiple times, until it expires. - Reusable *bool `json:"reusable,omitempty"` -} - -// NewGenerateMFAtokenRequest instantiates a new GenerateMFAtokenRequest 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 NewGenerateMFAtokenRequest() *GenerateMFAtokenRequest { - this := GenerateMFAtokenRequest{} - var reusable bool = false - this.Reusable = &reusable - return &this -} - -// NewGenerateMFAtokenRequestWithDefaults instantiates a new GenerateMFAtokenRequest 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 NewGenerateMFAtokenRequestWithDefaults() *GenerateMFAtokenRequest { - this := GenerateMFAtokenRequest{} - var reusable bool = false - this.Reusable = &reusable - return &this -} - -// GetExpiresIn returns the ExpiresIn field value if set, zero value otherwise. -func (o *GenerateMFAtokenRequest) GetExpiresIn() int32 { - if o == nil || isNil(o.ExpiresIn) { - var ret int32 - return ret - } - return *o.ExpiresIn -} - -// GetExpiresInOk returns a tuple with the ExpiresIn field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GenerateMFAtokenRequest) GetExpiresInOk() (*int32, bool) { - if o == nil || isNil(o.ExpiresIn) { - return nil, false - } - return o.ExpiresIn, true -} - -// HasExpiresIn returns a boolean if a field has been set. -func (o *GenerateMFAtokenRequest) HasExpiresIn() bool { - if o != nil && !isNil(o.ExpiresIn) { - return true - } - - return false -} - -// SetExpiresIn gets a reference to the given int32 and assigns it to the ExpiresIn field. -func (o *GenerateMFAtokenRequest) SetExpiresIn(v int32) { - o.ExpiresIn = &v -} - -// GetReusable returns the Reusable field value if set, zero value otherwise. -func (o *GenerateMFAtokenRequest) GetReusable() bool { - if o == nil || isNil(o.Reusable) { - var ret bool - return ret - } - return *o.Reusable -} - -// GetReusableOk returns a tuple with the Reusable field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GenerateMFAtokenRequest) GetReusableOk() (*bool, bool) { - if o == nil || isNil(o.Reusable) { - return nil, false - } - return o.Reusable, true -} - -// HasReusable returns a boolean if a field has been set. -func (o *GenerateMFAtokenRequest) HasReusable() bool { - if o != nil && !isNil(o.Reusable) { - return true - } - - return false -} - -// SetReusable gets a reference to the given bool and assigns it to the Reusable field. -func (o *GenerateMFAtokenRequest) SetReusable(v bool) { - o.Reusable = &v -} - -func (o GenerateMFAtokenRequest) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GenerateMFAtokenRequest) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.ExpiresIn) { - toSerialize["expires_in"] = o.ExpiresIn - } - if !isNil(o.Reusable) { - toSerialize["reusable"] = o.Reusable - } - return toSerialize, nil -} - -type NullableGenerateMFAtokenRequest struct { - value *GenerateMFAtokenRequest - isSet bool -} - -func (v NullableGenerateMFAtokenRequest) Get() *GenerateMFAtokenRequest { - return v.value -} - -func (v *NullableGenerateMFAtokenRequest) Set(val *GenerateMFAtokenRequest) { - v.value = val - v.isSet = true -} - -func (v NullableGenerateMFAtokenRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableGenerateMFAtokenRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGenerateMFAtokenRequest(val *GenerateMFAtokenRequest) *NullableGenerateMFAtokenRequest { - return &NullableGenerateMFAtokenRequest{value: val, isSet: true} -} - -func (v NullableGenerateMFAtokenRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGenerateMFAtokenRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_generate_otp_201_response.go b/model_generate_otp_201_response.go deleted file mode 100644 index ea0873b..0000000 --- a/model_generate_otp_201_response.go +++ /dev/null @@ -1,242 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the GenerateOTP201Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GenerateOTP201Response{} - -// GenerateOTP201Response struct for GenerateOTP201Response -type GenerateOTP201Response struct { - // Token can function as a temporary MFA token. It can be used to authenticate for any app when valid. - MfaToken *string `json:"mfa_token,omitempty"` - // true indcates the token can be used multiple times, until it expires. false indicates the token is invalid after a single use or once it expires. Defaults to false. - Reusable *bool `json:"reusable,omitempty"` - // Defines the expiration time and date for the token. Format is UTC time. - ExpiresAt *string `json:"expires_at,omitempty"` - // A unique identifier for the temp otp device that has been created for this token. - DeviceId *string `json:"device_id,omitempty"` -} - -// NewGenerateOTP201Response instantiates a new GenerateOTP201Response 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 NewGenerateOTP201Response() *GenerateOTP201Response { - this := GenerateOTP201Response{} - var reusable bool = false - this.Reusable = &reusable - return &this -} - -// NewGenerateOTP201ResponseWithDefaults instantiates a new GenerateOTP201Response 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 NewGenerateOTP201ResponseWithDefaults() *GenerateOTP201Response { - this := GenerateOTP201Response{} - var reusable bool = false - this.Reusable = &reusable - return &this -} - -// GetMfaToken returns the MfaToken field value if set, zero value otherwise. -func (o *GenerateOTP201Response) GetMfaToken() string { - if o == nil || isNil(o.MfaToken) { - var ret string - return ret - } - return *o.MfaToken -} - -// GetMfaTokenOk returns a tuple with the MfaToken field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GenerateOTP201Response) GetMfaTokenOk() (*string, bool) { - if o == nil || isNil(o.MfaToken) { - return nil, false - } - return o.MfaToken, true -} - -// HasMfaToken returns a boolean if a field has been set. -func (o *GenerateOTP201Response) HasMfaToken() bool { - if o != nil && !isNil(o.MfaToken) { - return true - } - - return false -} - -// SetMfaToken gets a reference to the given string and assigns it to the MfaToken field. -func (o *GenerateOTP201Response) SetMfaToken(v string) { - o.MfaToken = &v -} - -// GetReusable returns the Reusable field value if set, zero value otherwise. -func (o *GenerateOTP201Response) GetReusable() bool { - if o == nil || isNil(o.Reusable) { - var ret bool - return ret - } - return *o.Reusable -} - -// GetReusableOk returns a tuple with the Reusable field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GenerateOTP201Response) GetReusableOk() (*bool, bool) { - if o == nil || isNil(o.Reusable) { - return nil, false - } - return o.Reusable, true -} - -// HasReusable returns a boolean if a field has been set. -func (o *GenerateOTP201Response) HasReusable() bool { - if o != nil && !isNil(o.Reusable) { - return true - } - - return false -} - -// SetReusable gets a reference to the given bool and assigns it to the Reusable field. -func (o *GenerateOTP201Response) SetReusable(v bool) { - o.Reusable = &v -} - -// GetExpiresAt returns the ExpiresAt field value if set, zero value otherwise. -func (o *GenerateOTP201Response) GetExpiresAt() string { - if o == nil || isNil(o.ExpiresAt) { - var ret string - return ret - } - return *o.ExpiresAt -} - -// GetExpiresAtOk returns a tuple with the ExpiresAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GenerateOTP201Response) GetExpiresAtOk() (*string, bool) { - if o == nil || isNil(o.ExpiresAt) { - return nil, false - } - return o.ExpiresAt, true -} - -// HasExpiresAt returns a boolean if a field has been set. -func (o *GenerateOTP201Response) HasExpiresAt() bool { - if o != nil && !isNil(o.ExpiresAt) { - return true - } - - return false -} - -// SetExpiresAt gets a reference to the given string and assigns it to the ExpiresAt field. -func (o *GenerateOTP201Response) SetExpiresAt(v string) { - o.ExpiresAt = &v -} - -// GetDeviceId returns the DeviceId field value if set, zero value otherwise. -func (o *GenerateOTP201Response) GetDeviceId() string { - if o == nil || isNil(o.DeviceId) { - var ret string - return ret - } - return *o.DeviceId -} - -// GetDeviceIdOk returns a tuple with the DeviceId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GenerateOTP201Response) GetDeviceIdOk() (*string, bool) { - if o == nil || isNil(o.DeviceId) { - return nil, false - } - return o.DeviceId, true -} - -// HasDeviceId returns a boolean if a field has been set. -func (o *GenerateOTP201Response) HasDeviceId() bool { - if o != nil && !isNil(o.DeviceId) { - return true - } - - return false -} - -// SetDeviceId gets a reference to the given string and assigns it to the DeviceId field. -func (o *GenerateOTP201Response) SetDeviceId(v string) { - o.DeviceId = &v -} - -func (o GenerateOTP201Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GenerateOTP201Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.MfaToken) { - toSerialize["mfa_token"] = o.MfaToken - } - if !isNil(o.Reusable) { - toSerialize["reusable"] = o.Reusable - } - if !isNil(o.ExpiresAt) { - toSerialize["expires_at"] = o.ExpiresAt - } - if !isNil(o.DeviceId) { - toSerialize["device_id"] = o.DeviceId - } - return toSerialize, nil -} - -type NullableGenerateOTP201Response struct { - value *GenerateOTP201Response - isSet bool -} - -func (v NullableGenerateOTP201Response) Get() *GenerateOTP201Response { - return v.value -} - -func (v *NullableGenerateOTP201Response) Set(val *GenerateOTP201Response) { - v.value = val - v.isSet = true -} - -func (v NullableGenerateOTP201Response) IsSet() bool { - return v.isSet -} - -func (v *NullableGenerateOTP201Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGenerateOTP201Response(val *GenerateOTP201Response) *NullableGenerateOTP201Response { - return &NullableGenerateOTP201Response{value: val, isSet: true} -} - -func (v NullableGenerateOTP201Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGenerateOTP201Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_generate_otp_request.go b/model_generate_otp_request.go deleted file mode 100644 index bdef0a8..0000000 --- a/model_generate_otp_request.go +++ /dev/null @@ -1,168 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the GenerateOTPRequest type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GenerateOTPRequest{} - -// GenerateOTPRequest struct for GenerateOTPRequest -type GenerateOTPRequest struct { - // Set the duration of the token in seconds. Token expiration defaults to 259200 seconds = 72 hours. 72 hours is the max value. - ExpiresIn *int32 `json:"expires_in,omitempty"` - // Defines if the token is reusable multiple times within the expiry window. Value defaults to false. If set to true, token can be used multiple times, until it expires. - Reusable *bool `json:"reusable,omitempty"` -} - -// NewGenerateOTPRequest instantiates a new GenerateOTPRequest 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 NewGenerateOTPRequest() *GenerateOTPRequest { - this := GenerateOTPRequest{} - var reusable bool = false - this.Reusable = &reusable - return &this -} - -// NewGenerateOTPRequestWithDefaults instantiates a new GenerateOTPRequest 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 NewGenerateOTPRequestWithDefaults() *GenerateOTPRequest { - this := GenerateOTPRequest{} - var reusable bool = false - this.Reusable = &reusable - return &this -} - -// GetExpiresIn returns the ExpiresIn field value if set, zero value otherwise. -func (o *GenerateOTPRequest) GetExpiresIn() int32 { - if o == nil || isNil(o.ExpiresIn) { - var ret int32 - return ret - } - return *o.ExpiresIn -} - -// GetExpiresInOk returns a tuple with the ExpiresIn field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GenerateOTPRequest) GetExpiresInOk() (*int32, bool) { - if o == nil || isNil(o.ExpiresIn) { - return nil, false - } - return o.ExpiresIn, true -} - -// HasExpiresIn returns a boolean if a field has been set. -func (o *GenerateOTPRequest) HasExpiresIn() bool { - if o != nil && !isNil(o.ExpiresIn) { - return true - } - - return false -} - -// SetExpiresIn gets a reference to the given int32 and assigns it to the ExpiresIn field. -func (o *GenerateOTPRequest) SetExpiresIn(v int32) { - o.ExpiresIn = &v -} - -// GetReusable returns the Reusable field value if set, zero value otherwise. -func (o *GenerateOTPRequest) GetReusable() bool { - if o == nil || isNil(o.Reusable) { - var ret bool - return ret - } - return *o.Reusable -} - -// GetReusableOk returns a tuple with the Reusable field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GenerateOTPRequest) GetReusableOk() (*bool, bool) { - if o == nil || isNil(o.Reusable) { - return nil, false - } - return o.Reusable, true -} - -// HasReusable returns a boolean if a field has been set. -func (o *GenerateOTPRequest) HasReusable() bool { - if o != nil && !isNil(o.Reusable) { - return true - } - - return false -} - -// SetReusable gets a reference to the given bool and assigns it to the Reusable field. -func (o *GenerateOTPRequest) SetReusable(v bool) { - o.Reusable = &v -} - -func (o GenerateOTPRequest) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GenerateOTPRequest) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.ExpiresIn) { - toSerialize["expires_in"] = o.ExpiresIn - } - if !isNil(o.Reusable) { - toSerialize["reusable"] = o.Reusable - } - return toSerialize, nil -} - -type NullableGenerateOTPRequest struct { - value *GenerateOTPRequest - isSet bool -} - -func (v NullableGenerateOTPRequest) Get() *GenerateOTPRequest { - return v.value -} - -func (v *NullableGenerateOTPRequest) Set(val *GenerateOTPRequest) { - v.value = val - v.isSet = true -} - -func (v NullableGenerateOTPRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableGenerateOTPRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGenerateOTPRequest(val *GenerateOTPRequest) *NullableGenerateOTPRequest { - return &NullableGenerateOTPRequest{value: val, isSet: true} -} - -func (v NullableGenerateOTPRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGenerateOTPRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_generate_saml_assert_200_response.go b/model_generate_saml_assert_200_response.go deleted file mode 100644 index 30930d5..0000000 --- a/model_generate_saml_assert_200_response.go +++ /dev/null @@ -1,162 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the GenerateSamlAssert200Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GenerateSamlAssert200Response{} - -// GenerateSamlAssert200Response struct for GenerateSamlAssert200Response -type GenerateSamlAssert200Response struct { - Status *Error `json:"status,omitempty"` - Data []map[string]interface{} `json:"data,omitempty"` -} - -// NewGenerateSamlAssert200Response instantiates a new GenerateSamlAssert200Response 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 NewGenerateSamlAssert200Response() *GenerateSamlAssert200Response { - this := GenerateSamlAssert200Response{} - return &this -} - -// NewGenerateSamlAssert200ResponseWithDefaults instantiates a new GenerateSamlAssert200Response 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 NewGenerateSamlAssert200ResponseWithDefaults() *GenerateSamlAssert200Response { - this := GenerateSamlAssert200Response{} - return &this -} - -// GetStatus returns the Status field value if set, zero value otherwise. -func (o *GenerateSamlAssert200Response) GetStatus() Error { - if o == nil || isNil(o.Status) { - var ret Error - return ret - } - return *o.Status -} - -// GetStatusOk returns a tuple with the Status field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GenerateSamlAssert200Response) GetStatusOk() (*Error, bool) { - if o == nil || isNil(o.Status) { - return nil, false - } - return o.Status, true -} - -// HasStatus returns a boolean if a field has been set. -func (o *GenerateSamlAssert200Response) HasStatus() bool { - if o != nil && !isNil(o.Status) { - return true - } - - return false -} - -// SetStatus gets a reference to the given Error and assigns it to the Status field. -func (o *GenerateSamlAssert200Response) SetStatus(v Error) { - o.Status = &v -} - -// GetData returns the Data field value if set, zero value otherwise. -func (o *GenerateSamlAssert200Response) GetData() []map[string]interface{} { - if o == nil || isNil(o.Data) { - var ret []map[string]interface{} - return ret - } - return o.Data -} - -// GetDataOk returns a tuple with the Data field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GenerateSamlAssert200Response) GetDataOk() ([]map[string]interface{}, bool) { - if o == nil || isNil(o.Data) { - return nil, false - } - return o.Data, true -} - -// HasData returns a boolean if a field has been set. -func (o *GenerateSamlAssert200Response) HasData() bool { - if o != nil && !isNil(o.Data) { - return true - } - - return false -} - -// SetData gets a reference to the given []map[string]interface{} and assigns it to the Data field. -func (o *GenerateSamlAssert200Response) SetData(v []map[string]interface{}) { - o.Data = v -} - -func (o GenerateSamlAssert200Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GenerateSamlAssert200Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Status) { - toSerialize["status"] = o.Status - } - if !isNil(o.Data) { - toSerialize["data"] = o.Data - } - return toSerialize, nil -} - -type NullableGenerateSamlAssert200Response struct { - value *GenerateSamlAssert200Response - isSet bool -} - -func (v NullableGenerateSamlAssert200Response) Get() *GenerateSamlAssert200Response { - return v.value -} - -func (v *NullableGenerateSamlAssert200Response) Set(val *GenerateSamlAssert200Response) { - v.value = val - v.isSet = true -} - -func (v NullableGenerateSamlAssert200Response) IsSet() bool { - return v.isSet -} - -func (v *NullableGenerateSamlAssert200Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGenerateSamlAssert200Response(val *GenerateSamlAssert200Response) *NullableGenerateSamlAssert200Response { - return &NullableGenerateSamlAssert200Response{value: val, isSet: true} -} - -func (v NullableGenerateSamlAssert200Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGenerateSamlAssert200Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_generate_token_request.go b/model_generate_token_request.go deleted file mode 100644 index e7e84c7..0000000 --- a/model_generate_token_request.go +++ /dev/null @@ -1,120 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the GenerateTokenRequest type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GenerateTokenRequest{} - -// GenerateTokenRequest struct for GenerateTokenRequest -type GenerateTokenRequest struct { - // Set to client_credentials. - GrantType string `json:"grant_type"` -} - -// NewGenerateTokenRequest instantiates a new GenerateTokenRequest 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 NewGenerateTokenRequest(grantType string) *GenerateTokenRequest { - this := GenerateTokenRequest{} - this.GrantType = grantType - return &this -} - -// NewGenerateTokenRequestWithDefaults instantiates a new GenerateTokenRequest 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 NewGenerateTokenRequestWithDefaults() *GenerateTokenRequest { - this := GenerateTokenRequest{} - var grantType string = "client_credentials" - this.GrantType = grantType - return &this -} - -// GetGrantType returns the GrantType field value -func (o *GenerateTokenRequest) GetGrantType() string { - if o == nil { - var ret string - return ret - } - - return o.GrantType -} - -// GetGrantTypeOk returns a tuple with the GrantType field value -// and a boolean to check if the value has been set. -func (o *GenerateTokenRequest) GetGrantTypeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.GrantType, true -} - -// SetGrantType sets field value -func (o *GenerateTokenRequest) SetGrantType(v string) { - o.GrantType = v -} - -func (o GenerateTokenRequest) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GenerateTokenRequest) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["grant_type"] = o.GrantType - return toSerialize, nil -} - -type NullableGenerateTokenRequest struct { - value *GenerateTokenRequest - isSet bool -} - -func (v NullableGenerateTokenRequest) Get() *GenerateTokenRequest { - return v.value -} - -func (v *NullableGenerateTokenRequest) Set(val *GenerateTokenRequest) { - v.value = val - v.isSet = true -} - -func (v NullableGenerateTokenRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableGenerateTokenRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGenerateTokenRequest(val *GenerateTokenRequest) *NullableGenerateTokenRequest { - return &NullableGenerateTokenRequest{value: val, isSet: true} -} - -func (v NullableGenerateTokenRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGenerateTokenRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_generic_app.go b/model_generic_app.go deleted file mode 100644 index 1735c99..0000000 --- a/model_generic_app.go +++ /dev/null @@ -1,754 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the GenericApp type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GenericApp{} - -// GenericApp struct for GenericApp -type GenericApp struct { - // Apps unique ID in OneLogin. - Id *int32 `json:"id,omitempty"` - // The name of the app. - Name *string `json:"name,omitempty"` - // Indicates if the app is visible in the OneLogin portal. - Visible *bool `json:"visible,omitempty"` - // Freeform description of the app. - Description *string `json:"description,omitempty"` - // Freeform notes about the app. - Notes *string `json:"notes,omitempty"` - // A link to the apps icon url - IconUrl *string `json:"icon_url,omitempty"` - AuthMethod *AuthMethod `json:"auth_method,omitempty"` - // The security policy assigned to the app. - PolicyId *int32 `json:"policy_id,omitempty"` - // Indicates whether or not administrators can access the app as a user that they have assumed control over. - AllowAssumedSignin *bool `json:"allow_assumed_signin,omitempty"` - // ID of the OneLogin portal tab that the app is assigned to. - TabId *int32 `json:"tab_id,omitempty"` - // ID of the connector to base the app from. - ConnectorId *int32 `json:"connector_id,omitempty"` - // the date the app was created - CreatedAt *string `json:"created_at,omitempty"` - // the date the app was last updated - UpdatedAt *string `json:"updated_at,omitempty"` - // List of Role IDs that are assigned to the app. On App Create or Update the entire array is replaced with the values provided. - RoleIds []int32 `json:"role_ids,omitempty"` - Provisioning *GenericAppProvisioning `json:"provisioning,omitempty"` - Parameters *AppParameters `json:"parameters,omitempty"` - EnforcementPoint *EnforcementPoint `json:"enforcement_point,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _GenericApp GenericApp - -// NewGenericApp instantiates a new GenericApp 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 NewGenericApp() *GenericApp { - this := GenericApp{} - return &this -} - -// NewGenericAppWithDefaults instantiates a new GenericApp 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 NewGenericAppWithDefaults() *GenericApp { - this := GenericApp{} - return &this -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *GenericApp) GetId() int32 { - if o == nil || isNil(o.Id) { - var ret int32 - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GenericApp) GetIdOk() (*int32, bool) { - if o == nil || isNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *GenericApp) HasId() bool { - if o != nil && !isNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given int32 and assigns it to the Id field. -func (o *GenericApp) SetId(v int32) { - o.Id = &v -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *GenericApp) GetName() string { - if o == nil || isNil(o.Name) { - var ret string - return ret - } - return *o.Name -} - -// 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 *GenericApp) GetNameOk() (*string, bool) { - if o == nil || isNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *GenericApp) HasName() bool { - if o != nil && !isNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *GenericApp) SetName(v string) { - o.Name = &v -} - -// GetVisible returns the Visible field value if set, zero value otherwise. -func (o *GenericApp) GetVisible() bool { - if o == nil || isNil(o.Visible) { - var ret bool - return ret - } - return *o.Visible -} - -// GetVisibleOk returns a tuple with the Visible field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GenericApp) GetVisibleOk() (*bool, bool) { - if o == nil || isNil(o.Visible) { - return nil, false - } - return o.Visible, true -} - -// HasVisible returns a boolean if a field has been set. -func (o *GenericApp) HasVisible() bool { - if o != nil && !isNil(o.Visible) { - return true - } - - return false -} - -// SetVisible gets a reference to the given bool and assigns it to the Visible field. -func (o *GenericApp) SetVisible(v bool) { - o.Visible = &v -} - -// GetDescription returns the Description field value if set, zero value otherwise. -func (o *GenericApp) GetDescription() string { - if o == nil || isNil(o.Description) { - var ret string - return ret - } - return *o.Description -} - -// 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 *GenericApp) GetDescriptionOk() (*string, bool) { - if o == nil || isNil(o.Description) { - return nil, false - } - return o.Description, true -} - -// HasDescription returns a boolean if a field has been set. -func (o *GenericApp) HasDescription() bool { - if o != nil && !isNil(o.Description) { - return true - } - - return false -} - -// SetDescription gets a reference to the given string and assigns it to the Description field. -func (o *GenericApp) SetDescription(v string) { - o.Description = &v -} - -// GetNotes returns the Notes field value if set, zero value otherwise. -func (o *GenericApp) GetNotes() string { - if o == nil || isNil(o.Notes) { - var ret string - return ret - } - return *o.Notes -} - -// GetNotesOk returns a tuple with the Notes field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GenericApp) GetNotesOk() (*string, bool) { - if o == nil || isNil(o.Notes) { - return nil, false - } - return o.Notes, true -} - -// HasNotes returns a boolean if a field has been set. -func (o *GenericApp) HasNotes() bool { - if o != nil && !isNil(o.Notes) { - return true - } - - return false -} - -// SetNotes gets a reference to the given string and assigns it to the Notes field. -func (o *GenericApp) SetNotes(v string) { - o.Notes = &v -} - -// GetIconUrl returns the IconUrl field value if set, zero value otherwise. -func (o *GenericApp) GetIconUrl() string { - if o == nil || isNil(o.IconUrl) { - var ret string - return ret - } - return *o.IconUrl -} - -// 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 *GenericApp) GetIconUrlOk() (*string, bool) { - if o == nil || isNil(o.IconUrl) { - return nil, false - } - return o.IconUrl, true -} - -// HasIconUrl returns a boolean if a field has been set. -func (o *GenericApp) HasIconUrl() bool { - if o != nil && !isNil(o.IconUrl) { - return true - } - - return false -} - -// SetIconUrl gets a reference to the given string and assigns it to the IconUrl field. -func (o *GenericApp) SetIconUrl(v string) { - o.IconUrl = &v -} - -// GetAuthMethod returns the AuthMethod field value if set, zero value otherwise. -func (o *GenericApp) GetAuthMethod() AuthMethod { - if o == nil || isNil(o.AuthMethod) { - var ret AuthMethod - return ret - } - return *o.AuthMethod -} - -// GetAuthMethodOk returns a tuple with the AuthMethod field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GenericApp) GetAuthMethodOk() (*AuthMethod, bool) { - if o == nil || isNil(o.AuthMethod) { - return nil, false - } - return o.AuthMethod, true -} - -// HasAuthMethod returns a boolean if a field has been set. -func (o *GenericApp) HasAuthMethod() bool { - if o != nil && !isNil(o.AuthMethod) { - return true - } - - return false -} - -// SetAuthMethod gets a reference to the given AuthMethod and assigns it to the AuthMethod field. -func (o *GenericApp) SetAuthMethod(v AuthMethod) { - o.AuthMethod = &v -} - -// GetPolicyId returns the PolicyId field value if set, zero value otherwise. -func (o *GenericApp) GetPolicyId() int32 { - if o == nil || isNil(o.PolicyId) { - var ret int32 - return ret - } - return *o.PolicyId -} - -// GetPolicyIdOk returns a tuple with the PolicyId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GenericApp) GetPolicyIdOk() (*int32, bool) { - if o == nil || isNil(o.PolicyId) { - return nil, false - } - return o.PolicyId, true -} - -// HasPolicyId returns a boolean if a field has been set. -func (o *GenericApp) HasPolicyId() bool { - if o != nil && !isNil(o.PolicyId) { - return true - } - - return false -} - -// SetPolicyId gets a reference to the given int32 and assigns it to the PolicyId field. -func (o *GenericApp) SetPolicyId(v int32) { - o.PolicyId = &v -} - -// GetAllowAssumedSignin returns the AllowAssumedSignin field value if set, zero value otherwise. -func (o *GenericApp) GetAllowAssumedSignin() bool { - if o == nil || isNil(o.AllowAssumedSignin) { - var ret bool - return ret - } - return *o.AllowAssumedSignin -} - -// GetAllowAssumedSigninOk returns a tuple with the AllowAssumedSignin field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GenericApp) GetAllowAssumedSigninOk() (*bool, bool) { - if o == nil || isNil(o.AllowAssumedSignin) { - return nil, false - } - return o.AllowAssumedSignin, true -} - -// HasAllowAssumedSignin returns a boolean if a field has been set. -func (o *GenericApp) HasAllowAssumedSignin() bool { - if o != nil && !isNil(o.AllowAssumedSignin) { - return true - } - - return false -} - -// SetAllowAssumedSignin gets a reference to the given bool and assigns it to the AllowAssumedSignin field. -func (o *GenericApp) SetAllowAssumedSignin(v bool) { - o.AllowAssumedSignin = &v -} - -// GetTabId returns the TabId field value if set, zero value otherwise. -func (o *GenericApp) GetTabId() int32 { - if o == nil || isNil(o.TabId) { - var ret int32 - return ret - } - return *o.TabId -} - -// GetTabIdOk returns a tuple with the TabId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GenericApp) GetTabIdOk() (*int32, bool) { - if o == nil || isNil(o.TabId) { - return nil, false - } - return o.TabId, true -} - -// HasTabId returns a boolean if a field has been set. -func (o *GenericApp) HasTabId() bool { - if o != nil && !isNil(o.TabId) { - return true - } - - return false -} - -// SetTabId gets a reference to the given int32 and assigns it to the TabId field. -func (o *GenericApp) SetTabId(v int32) { - o.TabId = &v -} - -// GetConnectorId returns the ConnectorId field value if set, zero value otherwise. -func (o *GenericApp) GetConnectorId() int32 { - if o == nil || isNil(o.ConnectorId) { - var ret int32 - return ret - } - return *o.ConnectorId -} - -// GetConnectorIdOk returns a tuple with the ConnectorId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GenericApp) GetConnectorIdOk() (*int32, bool) { - if o == nil || isNil(o.ConnectorId) { - return nil, false - } - return o.ConnectorId, true -} - -// HasConnectorId returns a boolean if a field has been set. -func (o *GenericApp) HasConnectorId() bool { - if o != nil && !isNil(o.ConnectorId) { - return true - } - - return false -} - -// SetConnectorId gets a reference to the given int32 and assigns it to the ConnectorId field. -func (o *GenericApp) SetConnectorId(v int32) { - o.ConnectorId = &v -} - -// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. -func (o *GenericApp) GetCreatedAt() string { - if o == nil || isNil(o.CreatedAt) { - var ret string - return ret - } - return *o.CreatedAt -} - -// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GenericApp) GetCreatedAtOk() (*string, bool) { - if o == nil || isNil(o.CreatedAt) { - return nil, false - } - return o.CreatedAt, true -} - -// HasCreatedAt returns a boolean if a field has been set. -func (o *GenericApp) HasCreatedAt() bool { - if o != nil && !isNil(o.CreatedAt) { - return true - } - - return false -} - -// SetCreatedAt gets a reference to the given string and assigns it to the CreatedAt field. -func (o *GenericApp) SetCreatedAt(v string) { - o.CreatedAt = &v -} - -// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. -func (o *GenericApp) GetUpdatedAt() string { - if o == nil || isNil(o.UpdatedAt) { - var ret string - return ret - } - return *o.UpdatedAt -} - -// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GenericApp) GetUpdatedAtOk() (*string, bool) { - if o == nil || isNil(o.UpdatedAt) { - return nil, false - } - return o.UpdatedAt, true -} - -// HasUpdatedAt returns a boolean if a field has been set. -func (o *GenericApp) HasUpdatedAt() bool { - if o != nil && !isNil(o.UpdatedAt) { - return true - } - - return false -} - -// SetUpdatedAt gets a reference to the given string and assigns it to the UpdatedAt field. -func (o *GenericApp) SetUpdatedAt(v string) { - o.UpdatedAt = &v -} - -// GetRoleIds returns the RoleIds field value if set, zero value otherwise. -func (o *GenericApp) GetRoleIds() []int32 { - if o == nil || isNil(o.RoleIds) { - var ret []int32 - return ret - } - return o.RoleIds -} - -// GetRoleIdsOk returns a tuple with the RoleIds field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GenericApp) GetRoleIdsOk() ([]int32, bool) { - if o == nil || isNil(o.RoleIds) { - return nil, false - } - return o.RoleIds, true -} - -// HasRoleIds returns a boolean if a field has been set. -func (o *GenericApp) HasRoleIds() bool { - if o != nil && !isNil(o.RoleIds) { - return true - } - - return false -} - -// SetRoleIds gets a reference to the given []int32 and assigns it to the RoleIds field. -func (o *GenericApp) SetRoleIds(v []int32) { - o.RoleIds = v -} - -// GetProvisioning returns the Provisioning field value if set, zero value otherwise. -func (o *GenericApp) GetProvisioning() GenericAppProvisioning { - if o == nil || isNil(o.Provisioning) { - var ret GenericAppProvisioning - return ret - } - return *o.Provisioning -} - -// GetProvisioningOk returns a tuple with the Provisioning field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GenericApp) GetProvisioningOk() (*GenericAppProvisioning, bool) { - if o == nil || isNil(o.Provisioning) { - return nil, false - } - return o.Provisioning, true -} - -// HasProvisioning returns a boolean if a field has been set. -func (o *GenericApp) HasProvisioning() bool { - if o != nil && !isNil(o.Provisioning) { - return true - } - - return false -} - -// SetProvisioning gets a reference to the given GenericAppProvisioning and assigns it to the Provisioning field. -func (o *GenericApp) SetProvisioning(v GenericAppProvisioning) { - o.Provisioning = &v -} - -// GetParameters returns the Parameters field value if set, zero value otherwise. -func (o *GenericApp) GetParameters() AppParameters { - if o == nil || isNil(o.Parameters) { - var ret AppParameters - return ret - } - return *o.Parameters -} - -// GetParametersOk returns a tuple with the Parameters field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GenericApp) GetParametersOk() (*AppParameters, bool) { - if o == nil || isNil(o.Parameters) { - return nil, false - } - return o.Parameters, true -} - -// HasParameters returns a boolean if a field has been set. -func (o *GenericApp) HasParameters() bool { - if o != nil && !isNil(o.Parameters) { - return true - } - - return false -} - -// SetParameters gets a reference to the given AppParameters and assigns it to the Parameters field. -func (o *GenericApp) SetParameters(v AppParameters) { - o.Parameters = &v -} - -// GetEnforcementPoint returns the EnforcementPoint field value if set, zero value otherwise. -func (o *GenericApp) GetEnforcementPoint() EnforcementPoint { - if o == nil || isNil(o.EnforcementPoint) { - var ret EnforcementPoint - return ret - } - return *o.EnforcementPoint -} - -// GetEnforcementPointOk returns a tuple with the EnforcementPoint field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GenericApp) GetEnforcementPointOk() (*EnforcementPoint, bool) { - if o == nil || isNil(o.EnforcementPoint) { - return nil, false - } - return o.EnforcementPoint, true -} - -// HasEnforcementPoint returns a boolean if a field has been set. -func (o *GenericApp) HasEnforcementPoint() bool { - if o != nil && !isNil(o.EnforcementPoint) { - return true - } - - return false -} - -// SetEnforcementPoint gets a reference to the given EnforcementPoint and assigns it to the EnforcementPoint field. -func (o *GenericApp) SetEnforcementPoint(v EnforcementPoint) { - o.EnforcementPoint = &v -} - -func (o GenericApp) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GenericApp) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - // skip: id is readOnly - if !isNil(o.Name) { - toSerialize["name"] = o.Name - } - if !isNil(o.Visible) { - toSerialize["visible"] = o.Visible - } - if !isNil(o.Description) { - toSerialize["description"] = o.Description - } - if !isNil(o.Notes) { - toSerialize["notes"] = o.Notes - } - if !isNil(o.IconUrl) { - toSerialize["icon_url"] = o.IconUrl - } - if !isNil(o.AuthMethod) { - toSerialize["auth_method"] = o.AuthMethod - } - if !isNil(o.PolicyId) { - toSerialize["policy_id"] = o.PolicyId - } - if !isNil(o.AllowAssumedSignin) { - toSerialize["allow_assumed_signin"] = o.AllowAssumedSignin - } - if !isNil(o.TabId) { - toSerialize["tab_id"] = o.TabId - } - if !isNil(o.ConnectorId) { - toSerialize["connector_id"] = o.ConnectorId - } - if !isNil(o.CreatedAt) { - toSerialize["created_at"] = o.CreatedAt - } - if !isNil(o.UpdatedAt) { - toSerialize["updated_at"] = o.UpdatedAt - } - if !isNil(o.RoleIds) { - toSerialize["role_ids"] = o.RoleIds - } - if !isNil(o.Provisioning) { - toSerialize["provisioning"] = o.Provisioning - } - if !isNil(o.Parameters) { - toSerialize["parameters"] = o.Parameters - } - if !isNil(o.EnforcementPoint) { - toSerialize["enforcement_point"] = o.EnforcementPoint - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *GenericApp) UnmarshalJSON(bytes []byte) (err error) { - varGenericApp := _GenericApp{} - - if err = json.Unmarshal(bytes, &varGenericApp); err == nil { - *o = GenericApp(varGenericApp) - } - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(bytes, &additionalProperties); err == nil { - delete(additionalProperties, "id") - delete(additionalProperties, "name") - delete(additionalProperties, "visible") - delete(additionalProperties, "description") - delete(additionalProperties, "notes") - delete(additionalProperties, "icon_url") - delete(additionalProperties, "auth_method") - delete(additionalProperties, "policy_id") - delete(additionalProperties, "allow_assumed_signin") - delete(additionalProperties, "tab_id") - delete(additionalProperties, "connector_id") - delete(additionalProperties, "created_at") - delete(additionalProperties, "updated_at") - delete(additionalProperties, "role_ids") - delete(additionalProperties, "provisioning") - delete(additionalProperties, "parameters") - delete(additionalProperties, "enforcement_point") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableGenericApp struct { - value *GenericApp - isSet bool -} - -func (v NullableGenericApp) Get() *GenericApp { - return v.value -} - -func (v *NullableGenericApp) Set(val *GenericApp) { - v.value = val - v.isSet = true -} - -func (v NullableGenericApp) IsSet() bool { - return v.isSet -} - -func (v *NullableGenericApp) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGenericApp(val *GenericApp) *NullableGenericApp { - return &NullableGenericApp{value: val, isSet: true} -} - -func (v NullableGenericApp) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGenericApp) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_generic_app_provisioning.go b/model_generic_app_provisioning.go deleted file mode 100644 index daa86a0..0000000 --- a/model_generic_app_provisioning.go +++ /dev/null @@ -1,126 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the GenericAppProvisioning type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GenericAppProvisioning{} - -// GenericAppProvisioning Indicates if provisioning is enabled for this app. -type GenericAppProvisioning struct { - Enabled *bool `json:"enabled,omitempty"` -} - -// NewGenericAppProvisioning instantiates a new GenericAppProvisioning 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 NewGenericAppProvisioning() *GenericAppProvisioning { - this := GenericAppProvisioning{} - return &this -} - -// NewGenericAppProvisioningWithDefaults instantiates a new GenericAppProvisioning 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 NewGenericAppProvisioningWithDefaults() *GenericAppProvisioning { - this := GenericAppProvisioning{} - return &this -} - -// GetEnabled returns the Enabled field value if set, zero value otherwise. -func (o *GenericAppProvisioning) GetEnabled() bool { - if o == nil || isNil(o.Enabled) { - 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 *GenericAppProvisioning) GetEnabledOk() (*bool, bool) { - if o == nil || isNil(o.Enabled) { - return nil, false - } - return o.Enabled, true -} - -// HasEnabled returns a boolean if a field has been set. -func (o *GenericAppProvisioning) HasEnabled() bool { - if o != nil && !isNil(o.Enabled) { - return true - } - - return false -} - -// SetEnabled gets a reference to the given bool and assigns it to the Enabled field. -func (o *GenericAppProvisioning) SetEnabled(v bool) { - o.Enabled = &v -} - -func (o GenericAppProvisioning) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GenericAppProvisioning) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Enabled) { - toSerialize["enabled"] = o.Enabled - } - return toSerialize, nil -} - -type NullableGenericAppProvisioning struct { - value *GenericAppProvisioning - isSet bool -} - -func (v NullableGenericAppProvisioning) Get() *GenericAppProvisioning { - return v.value -} - -func (v *NullableGenericAppProvisioning) Set(val *GenericAppProvisioning) { - v.value = val - v.isSet = true -} - -func (v NullableGenericAppProvisioning) IsSet() bool { - return v.isSet -} - -func (v *NullableGenericAppProvisioning) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGenericAppProvisioning(val *GenericAppProvisioning) *NullableGenericAppProvisioning { - return &NullableGenericAppProvisioning{value: val, isSet: true} -} - -func (v NullableGenericAppProvisioning) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGenericAppProvisioning) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_get_assigned_user_200_response.go b/model_get_assigned_user_200_response.go deleted file mode 100644 index 365655e..0000000 --- a/model_get_assigned_user_200_response.go +++ /dev/null @@ -1,346 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the GetAssignedUser200Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetAssignedUser200Response{} - -// GetAssignedUser200Response struct for GetAssignedUser200Response -type GetAssignedUser200Response struct { - Total *int32 `json:"total,omitempty"` - Users []int32 `json:"users,omitempty"` - BeforeCursor NullableInt32 `json:"beforeCursor,omitempty"` - PreviousLink NullableString `json:"previousLink,omitempty"` - AfterCursor NullableInt32 `json:"afterCursor,omitempty"` - NextLink NullableString `json:"nextLink,omitempty"` -} - -// NewGetAssignedUser200Response instantiates a new GetAssignedUser200Response 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 NewGetAssignedUser200Response() *GetAssignedUser200Response { - this := GetAssignedUser200Response{} - return &this -} - -// NewGetAssignedUser200ResponseWithDefaults instantiates a new GetAssignedUser200Response 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 NewGetAssignedUser200ResponseWithDefaults() *GetAssignedUser200Response { - this := GetAssignedUser200Response{} - return &this -} - -// GetTotal returns the Total field value if set, zero value otherwise. -func (o *GetAssignedUser200Response) GetTotal() int32 { - if o == nil || isNil(o.Total) { - var ret int32 - return ret - } - return *o.Total -} - -// GetTotalOk returns a tuple with the Total field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetAssignedUser200Response) GetTotalOk() (*int32, bool) { - if o == nil || isNil(o.Total) { - return nil, false - } - return o.Total, true -} - -// HasTotal returns a boolean if a field has been set. -func (o *GetAssignedUser200Response) HasTotal() bool { - if o != nil && !isNil(o.Total) { - return true - } - - return false -} - -// SetTotal gets a reference to the given int32 and assigns it to the Total field. -func (o *GetAssignedUser200Response) SetTotal(v int32) { - o.Total = &v -} - -// GetUsers returns the Users field value if set, zero value otherwise. -func (o *GetAssignedUser200Response) GetUsers() []int32 { - if o == nil || isNil(o.Users) { - 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 *GetAssignedUser200Response) GetUsersOk() ([]int32, bool) { - if o == nil || isNil(o.Users) { - return nil, false - } - return o.Users, true -} - -// HasUsers returns a boolean if a field has been set. -func (o *GetAssignedUser200Response) HasUsers() bool { - if o != nil && !isNil(o.Users) { - return true - } - - return false -} - -// SetUsers gets a reference to the given []int32 and assigns it to the Users field. -func (o *GetAssignedUser200Response) SetUsers(v []int32) { - o.Users = v -} - -// GetBeforeCursor returns the BeforeCursor field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetAssignedUser200Response) GetBeforeCursor() int32 { - if o == nil || isNil(o.BeforeCursor.Get()) { - var ret int32 - return ret - } - return *o.BeforeCursor.Get() -} - -// GetBeforeCursorOk returns a tuple with the BeforeCursor 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 *GetAssignedUser200Response) GetBeforeCursorOk() (*int32, bool) { - if o == nil { - return nil, false - } - return o.BeforeCursor.Get(), o.BeforeCursor.IsSet() -} - -// HasBeforeCursor returns a boolean if a field has been set. -func (o *GetAssignedUser200Response) HasBeforeCursor() bool { - if o != nil && o.BeforeCursor.IsSet() { - return true - } - - return false -} - -// SetBeforeCursor gets a reference to the given NullableInt32 and assigns it to the BeforeCursor field. -func (o *GetAssignedUser200Response) SetBeforeCursor(v int32) { - o.BeforeCursor.Set(&v) -} -// SetBeforeCursorNil sets the value for BeforeCursor to be an explicit nil -func (o *GetAssignedUser200Response) SetBeforeCursorNil() { - o.BeforeCursor.Set(nil) -} - -// UnsetBeforeCursor ensures that no value is present for BeforeCursor, not even an explicit nil -func (o *GetAssignedUser200Response) UnsetBeforeCursor() { - o.BeforeCursor.Unset() -} - -// GetPreviousLink returns the PreviousLink field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetAssignedUser200Response) GetPreviousLink() string { - if o == nil || isNil(o.PreviousLink.Get()) { - var ret string - return ret - } - return *o.PreviousLink.Get() -} - -// GetPreviousLinkOk returns a tuple with the PreviousLink 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 *GetAssignedUser200Response) GetPreviousLinkOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.PreviousLink.Get(), o.PreviousLink.IsSet() -} - -// HasPreviousLink returns a boolean if a field has been set. -func (o *GetAssignedUser200Response) HasPreviousLink() bool { - if o != nil && o.PreviousLink.IsSet() { - return true - } - - return false -} - -// SetPreviousLink gets a reference to the given NullableString and assigns it to the PreviousLink field. -func (o *GetAssignedUser200Response) SetPreviousLink(v string) { - o.PreviousLink.Set(&v) -} -// SetPreviousLinkNil sets the value for PreviousLink to be an explicit nil -func (o *GetAssignedUser200Response) SetPreviousLinkNil() { - o.PreviousLink.Set(nil) -} - -// UnsetPreviousLink ensures that no value is present for PreviousLink, not even an explicit nil -func (o *GetAssignedUser200Response) UnsetPreviousLink() { - o.PreviousLink.Unset() -} - -// GetAfterCursor returns the AfterCursor field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetAssignedUser200Response) GetAfterCursor() int32 { - if o == nil || isNil(o.AfterCursor.Get()) { - var ret int32 - return ret - } - return *o.AfterCursor.Get() -} - -// GetAfterCursorOk returns a tuple with the AfterCursor 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 *GetAssignedUser200Response) GetAfterCursorOk() (*int32, bool) { - if o == nil { - return nil, false - } - return o.AfterCursor.Get(), o.AfterCursor.IsSet() -} - -// HasAfterCursor returns a boolean if a field has been set. -func (o *GetAssignedUser200Response) HasAfterCursor() bool { - if o != nil && o.AfterCursor.IsSet() { - return true - } - - return false -} - -// SetAfterCursor gets a reference to the given NullableInt32 and assigns it to the AfterCursor field. -func (o *GetAssignedUser200Response) SetAfterCursor(v int32) { - o.AfterCursor.Set(&v) -} -// SetAfterCursorNil sets the value for AfterCursor to be an explicit nil -func (o *GetAssignedUser200Response) SetAfterCursorNil() { - o.AfterCursor.Set(nil) -} - -// UnsetAfterCursor ensures that no value is present for AfterCursor, not even an explicit nil -func (o *GetAssignedUser200Response) UnsetAfterCursor() { - o.AfterCursor.Unset() -} - -// GetNextLink returns the NextLink field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GetAssignedUser200Response) GetNextLink() string { - if o == nil || isNil(o.NextLink.Get()) { - var ret string - return ret - } - return *o.NextLink.Get() -} - -// GetNextLinkOk returns a tuple with the NextLink 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 *GetAssignedUser200Response) GetNextLinkOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.NextLink.Get(), o.NextLink.IsSet() -} - -// HasNextLink returns a boolean if a field has been set. -func (o *GetAssignedUser200Response) HasNextLink() bool { - if o != nil && o.NextLink.IsSet() { - return true - } - - return false -} - -// SetNextLink gets a reference to the given NullableString and assigns it to the NextLink field. -func (o *GetAssignedUser200Response) SetNextLink(v string) { - o.NextLink.Set(&v) -} -// SetNextLinkNil sets the value for NextLink to be an explicit nil -func (o *GetAssignedUser200Response) SetNextLinkNil() { - o.NextLink.Set(nil) -} - -// UnsetNextLink ensures that no value is present for NextLink, not even an explicit nil -func (o *GetAssignedUser200Response) UnsetNextLink() { - o.NextLink.Unset() -} - -func (o GetAssignedUser200Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetAssignedUser200Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Total) { - toSerialize["total"] = o.Total - } - if !isNil(o.Users) { - toSerialize["users"] = o.Users - } - if o.BeforeCursor.IsSet() { - toSerialize["beforeCursor"] = o.BeforeCursor.Get() - } - if o.PreviousLink.IsSet() { - toSerialize["previousLink"] = o.PreviousLink.Get() - } - if o.AfterCursor.IsSet() { - toSerialize["afterCursor"] = o.AfterCursor.Get() - } - if o.NextLink.IsSet() { - toSerialize["nextLink"] = o.NextLink.Get() - } - return toSerialize, nil -} - -type NullableGetAssignedUser200Response struct { - value *GetAssignedUser200Response - isSet bool -} - -func (v NullableGetAssignedUser200Response) Get() *GetAssignedUser200Response { - return v.value -} - -func (v *NullableGetAssignedUser200Response) Set(val *GetAssignedUser200Response) { - v.value = val - v.isSet = true -} - -func (v NullableGetAssignedUser200Response) IsSet() bool { - return v.isSet -} - -func (v *NullableGetAssignedUser200Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetAssignedUser200Response(val *GetAssignedUser200Response) *NullableGetAssignedUser200Response { - return &NullableGetAssignedUser200Response{value: val, isSet: true} -} - -func (v NullableGetAssignedUser200Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetAssignedUser200Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_get_auth_factors_200_response.go b/model_get_auth_factors_200_response.go deleted file mode 100644 index ecd508b..0000000 --- a/model_get_auth_factors_200_response.go +++ /dev/null @@ -1,201 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the GetAuthFactors200Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetAuthFactors200Response{} - -// GetAuthFactors200Response struct for GetAuthFactors200Response -type GetAuthFactors200Response struct { - // Identifier for the factor which will be used for user enrollment - FactorId *int32 `json:"factor_id,omitempty"` - // Authentication factor name, as it appears to administrators in OneLogin. - Name *string `json:"name,omitempty"` - // Internal use only - AuthFactorName *string `json:"auth_factor_name,omitempty"` -} - -// NewGetAuthFactors200Response instantiates a new GetAuthFactors200Response 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 NewGetAuthFactors200Response() *GetAuthFactors200Response { - this := GetAuthFactors200Response{} - return &this -} - -// NewGetAuthFactors200ResponseWithDefaults instantiates a new GetAuthFactors200Response 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 NewGetAuthFactors200ResponseWithDefaults() *GetAuthFactors200Response { - this := GetAuthFactors200Response{} - return &this -} - -// GetFactorId returns the FactorId field value if set, zero value otherwise. -func (o *GetAuthFactors200Response) GetFactorId() int32 { - if o == nil || isNil(o.FactorId) { - var ret int32 - return ret - } - return *o.FactorId -} - -// GetFactorIdOk returns a tuple with the FactorId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetAuthFactors200Response) GetFactorIdOk() (*int32, bool) { - if o == nil || isNil(o.FactorId) { - return nil, false - } - return o.FactorId, true -} - -// HasFactorId returns a boolean if a field has been set. -func (o *GetAuthFactors200Response) HasFactorId() bool { - if o != nil && !isNil(o.FactorId) { - return true - } - - return false -} - -// SetFactorId gets a reference to the given int32 and assigns it to the FactorId field. -func (o *GetAuthFactors200Response) SetFactorId(v int32) { - o.FactorId = &v -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *GetAuthFactors200Response) GetName() string { - if o == nil || isNil(o.Name) { - var ret string - return ret - } - return *o.Name -} - -// 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 *GetAuthFactors200Response) GetNameOk() (*string, bool) { - if o == nil || isNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *GetAuthFactors200Response) HasName() bool { - if o != nil && !isNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *GetAuthFactors200Response) SetName(v string) { - o.Name = &v -} - -// GetAuthFactorName returns the AuthFactorName field value if set, zero value otherwise. -func (o *GetAuthFactors200Response) GetAuthFactorName() string { - if o == nil || isNil(o.AuthFactorName) { - var ret string - return ret - } - return *o.AuthFactorName -} - -// GetAuthFactorNameOk returns a tuple with the AuthFactorName field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetAuthFactors200Response) GetAuthFactorNameOk() (*string, bool) { - if o == nil || isNil(o.AuthFactorName) { - return nil, false - } - return o.AuthFactorName, true -} - -// HasAuthFactorName returns a boolean if a field has been set. -func (o *GetAuthFactors200Response) HasAuthFactorName() bool { - if o != nil && !isNil(o.AuthFactorName) { - return true - } - - return false -} - -// SetAuthFactorName gets a reference to the given string and assigns it to the AuthFactorName field. -func (o *GetAuthFactors200Response) SetAuthFactorName(v string) { - o.AuthFactorName = &v -} - -func (o GetAuthFactors200Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetAuthFactors200Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.FactorId) { - toSerialize["factor_id"] = o.FactorId - } - if !isNil(o.Name) { - toSerialize["name"] = o.Name - } - if !isNil(o.AuthFactorName) { - toSerialize["auth_factor_name"] = o.AuthFactorName - } - return toSerialize, nil -} - -type NullableGetAuthFactors200Response struct { - value *GetAuthFactors200Response - isSet bool -} - -func (v NullableGetAuthFactors200Response) Get() *GetAuthFactors200Response { - return v.value -} - -func (v *NullableGetAuthFactors200Response) Set(val *GetAuthFactors200Response) { - v.value = val - v.isSet = true -} - -func (v NullableGetAuthFactors200Response) IsSet() bool { - return v.isSet -} - -func (v *NullableGetAuthFactors200Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetAuthFactors200Response(val *GetAuthFactors200Response) *NullableGetAuthFactors200Response { - return &NullableGetAuthFactors200Response{value: val, isSet: true} -} - -func (v NullableGetAuthFactors200Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetAuthFactors200Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_get_authentication_devices_200_response_inner.go b/model_get_authentication_devices_200_response_inner.go deleted file mode 100644 index 011c338..0000000 --- a/model_get_authentication_devices_200_response_inner.go +++ /dev/null @@ -1,279 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the GetAuthenticationDevices200ResponseInner type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetAuthenticationDevices200ResponseInner{} - -// GetAuthenticationDevices200ResponseInner struct for GetAuthenticationDevices200ResponseInner -type GetAuthenticationDevices200ResponseInner struct { - // MFA device identifier. - DeviceId *string `json:"device_id,omitempty"` - // Authentication factor display name assigned by users when they register the device. - UserDisplayName *string `json:"user_display_name,omitempty"` - // Authentication factor display name as it appears to users upon initial registration, as defined by admins at Settings > Authentication Factors. - TypeDisplayName *string `json:"type_display_name,omitempty"` - // Authentication factor name, as it appears to administrators in OneLogin. - AuthFactorName *string `json:"auth_factor_name,omitempty"` - // true = is user’s default MFA device for OneLogin. - Default *bool `json:"default,omitempty"` -} - -// NewGetAuthenticationDevices200ResponseInner instantiates a new GetAuthenticationDevices200ResponseInner 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 NewGetAuthenticationDevices200ResponseInner() *GetAuthenticationDevices200ResponseInner { - this := GetAuthenticationDevices200ResponseInner{} - var default_ bool = false - this.Default = &default_ - return &this -} - -// NewGetAuthenticationDevices200ResponseInnerWithDefaults instantiates a new GetAuthenticationDevices200ResponseInner 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 NewGetAuthenticationDevices200ResponseInnerWithDefaults() *GetAuthenticationDevices200ResponseInner { - this := GetAuthenticationDevices200ResponseInner{} - var default_ bool = false - this.Default = &default_ - return &this -} - -// GetDeviceId returns the DeviceId field value if set, zero value otherwise. -func (o *GetAuthenticationDevices200ResponseInner) GetDeviceId() string { - if o == nil || isNil(o.DeviceId) { - var ret string - return ret - } - return *o.DeviceId -} - -// GetDeviceIdOk returns a tuple with the DeviceId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetAuthenticationDevices200ResponseInner) GetDeviceIdOk() (*string, bool) { - if o == nil || isNil(o.DeviceId) { - return nil, false - } - return o.DeviceId, true -} - -// HasDeviceId returns a boolean if a field has been set. -func (o *GetAuthenticationDevices200ResponseInner) HasDeviceId() bool { - if o != nil && !isNil(o.DeviceId) { - return true - } - - return false -} - -// SetDeviceId gets a reference to the given string and assigns it to the DeviceId field. -func (o *GetAuthenticationDevices200ResponseInner) SetDeviceId(v string) { - o.DeviceId = &v -} - -// GetUserDisplayName returns the UserDisplayName field value if set, zero value otherwise. -func (o *GetAuthenticationDevices200ResponseInner) GetUserDisplayName() string { - if o == nil || isNil(o.UserDisplayName) { - var ret string - return ret - } - return *o.UserDisplayName -} - -// GetUserDisplayNameOk returns a tuple with the UserDisplayName field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetAuthenticationDevices200ResponseInner) GetUserDisplayNameOk() (*string, bool) { - if o == nil || isNil(o.UserDisplayName) { - return nil, false - } - return o.UserDisplayName, true -} - -// HasUserDisplayName returns a boolean if a field has been set. -func (o *GetAuthenticationDevices200ResponseInner) HasUserDisplayName() bool { - if o != nil && !isNil(o.UserDisplayName) { - return true - } - - return false -} - -// SetUserDisplayName gets a reference to the given string and assigns it to the UserDisplayName field. -func (o *GetAuthenticationDevices200ResponseInner) SetUserDisplayName(v string) { - o.UserDisplayName = &v -} - -// GetTypeDisplayName returns the TypeDisplayName field value if set, zero value otherwise. -func (o *GetAuthenticationDevices200ResponseInner) GetTypeDisplayName() string { - if o == nil || isNil(o.TypeDisplayName) { - var ret string - return ret - } - return *o.TypeDisplayName -} - -// GetTypeDisplayNameOk returns a tuple with the TypeDisplayName field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetAuthenticationDevices200ResponseInner) GetTypeDisplayNameOk() (*string, bool) { - if o == nil || isNil(o.TypeDisplayName) { - return nil, false - } - return o.TypeDisplayName, true -} - -// HasTypeDisplayName returns a boolean if a field has been set. -func (o *GetAuthenticationDevices200ResponseInner) HasTypeDisplayName() bool { - if o != nil && !isNil(o.TypeDisplayName) { - return true - } - - return false -} - -// SetTypeDisplayName gets a reference to the given string and assigns it to the TypeDisplayName field. -func (o *GetAuthenticationDevices200ResponseInner) SetTypeDisplayName(v string) { - o.TypeDisplayName = &v -} - -// GetAuthFactorName returns the AuthFactorName field value if set, zero value otherwise. -func (o *GetAuthenticationDevices200ResponseInner) GetAuthFactorName() string { - if o == nil || isNil(o.AuthFactorName) { - var ret string - return ret - } - return *o.AuthFactorName -} - -// GetAuthFactorNameOk returns a tuple with the AuthFactorName field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetAuthenticationDevices200ResponseInner) GetAuthFactorNameOk() (*string, bool) { - if o == nil || isNil(o.AuthFactorName) { - return nil, false - } - return o.AuthFactorName, true -} - -// HasAuthFactorName returns a boolean if a field has been set. -func (o *GetAuthenticationDevices200ResponseInner) HasAuthFactorName() bool { - if o != nil && !isNil(o.AuthFactorName) { - return true - } - - return false -} - -// SetAuthFactorName gets a reference to the given string and assigns it to the AuthFactorName field. -func (o *GetAuthenticationDevices200ResponseInner) SetAuthFactorName(v string) { - o.AuthFactorName = &v -} - -// GetDefault returns the Default field value if set, zero value otherwise. -func (o *GetAuthenticationDevices200ResponseInner) GetDefault() bool { - if o == nil || isNil(o.Default) { - var ret bool - return ret - } - return *o.Default -} - -// 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 *GetAuthenticationDevices200ResponseInner) GetDefaultOk() (*bool, bool) { - if o == nil || isNil(o.Default) { - return nil, false - } - return o.Default, true -} - -// HasDefault returns a boolean if a field has been set. -func (o *GetAuthenticationDevices200ResponseInner) HasDefault() bool { - if o != nil && !isNil(o.Default) { - return true - } - - return false -} - -// SetDefault gets a reference to the given bool and assigns it to the Default field. -func (o *GetAuthenticationDevices200ResponseInner) SetDefault(v bool) { - o.Default = &v -} - -func (o GetAuthenticationDevices200ResponseInner) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetAuthenticationDevices200ResponseInner) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.DeviceId) { - toSerialize["device_id"] = o.DeviceId - } - if !isNil(o.UserDisplayName) { - toSerialize["user_display_name"] = o.UserDisplayName - } - if !isNil(o.TypeDisplayName) { - toSerialize["type_display_name"] = o.TypeDisplayName - } - if !isNil(o.AuthFactorName) { - toSerialize["auth_factor_name"] = o.AuthFactorName - } - if !isNil(o.Default) { - toSerialize["default"] = o.Default - } - return toSerialize, nil -} - -type NullableGetAuthenticationDevices200ResponseInner struct { - value *GetAuthenticationDevices200ResponseInner - isSet bool -} - -func (v NullableGetAuthenticationDevices200ResponseInner) Get() *GetAuthenticationDevices200ResponseInner { - return v.value -} - -func (v *NullableGetAuthenticationDevices200ResponseInner) Set(val *GetAuthenticationDevices200ResponseInner) { - v.value = val - v.isSet = true -} - -func (v NullableGetAuthenticationDevices200ResponseInner) IsSet() bool { - return v.isSet -} - -func (v *NullableGetAuthenticationDevices200ResponseInner) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetAuthenticationDevices200ResponseInner(val *GetAuthenticationDevices200ResponseInner) *NullableGetAuthenticationDevices200ResponseInner { - return &NullableGetAuthenticationDevices200ResponseInner{value: val, isSet: true} -} - -func (v NullableGetAuthenticationDevices200ResponseInner) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetAuthenticationDevices200ResponseInner) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_get_custom_attributes_200_response.go b/model_get_custom_attributes_200_response.go deleted file mode 100644 index abbde4d..0000000 --- a/model_get_custom_attributes_200_response.go +++ /dev/null @@ -1,163 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the GetCustomAttributes200Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetCustomAttributes200Response{} - -// GetCustomAttributes200Response struct for GetCustomAttributes200Response -type GetCustomAttributes200Response struct { - Status *Error `json:"status,omitempty"` - // Provides a list of custom attribute fields (also known as custom user fields) that are available for your account. The values returned correspond to the values you provided in the Shortname field when you defined the custom user field. For details about defining custom user fields, see Custom User Fields. - Data [][]string `json:"data,omitempty"` -} - -// NewGetCustomAttributes200Response instantiates a new GetCustomAttributes200Response 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 NewGetCustomAttributes200Response() *GetCustomAttributes200Response { - this := GetCustomAttributes200Response{} - return &this -} - -// NewGetCustomAttributes200ResponseWithDefaults instantiates a new GetCustomAttributes200Response 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 NewGetCustomAttributes200ResponseWithDefaults() *GetCustomAttributes200Response { - this := GetCustomAttributes200Response{} - return &this -} - -// GetStatus returns the Status field value if set, zero value otherwise. -func (o *GetCustomAttributes200Response) GetStatus() Error { - if o == nil || isNil(o.Status) { - var ret Error - return ret - } - return *o.Status -} - -// GetStatusOk returns a tuple with the Status field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetCustomAttributes200Response) GetStatusOk() (*Error, bool) { - if o == nil || isNil(o.Status) { - return nil, false - } - return o.Status, true -} - -// HasStatus returns a boolean if a field has been set. -func (o *GetCustomAttributes200Response) HasStatus() bool { - if o != nil && !isNil(o.Status) { - return true - } - - return false -} - -// SetStatus gets a reference to the given Error and assigns it to the Status field. -func (o *GetCustomAttributes200Response) SetStatus(v Error) { - o.Status = &v -} - -// GetData returns the Data field value if set, zero value otherwise. -func (o *GetCustomAttributes200Response) GetData() [][]string { - if o == nil || isNil(o.Data) { - var ret [][]string - return ret - } - return o.Data -} - -// GetDataOk returns a tuple with the Data field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetCustomAttributes200Response) GetDataOk() ([][]string, bool) { - if o == nil || isNil(o.Data) { - return nil, false - } - return o.Data, true -} - -// HasData returns a boolean if a field has been set. -func (o *GetCustomAttributes200Response) HasData() bool { - if o != nil && !isNil(o.Data) { - return true - } - - return false -} - -// SetData gets a reference to the given [][]string and assigns it to the Data field. -func (o *GetCustomAttributes200Response) SetData(v [][]string) { - o.Data = v -} - -func (o GetCustomAttributes200Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetCustomAttributes200Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Status) { - toSerialize["status"] = o.Status - } - if !isNil(o.Data) { - toSerialize["data"] = o.Data - } - return toSerialize, nil -} - -type NullableGetCustomAttributes200Response struct { - value *GetCustomAttributes200Response - isSet bool -} - -func (v NullableGetCustomAttributes200Response) Get() *GetCustomAttributes200Response { - return v.value -} - -func (v *NullableGetCustomAttributes200Response) Set(val *GetCustomAttributes200Response) { - v.value = val - v.isSet = true -} - -func (v NullableGetCustomAttributes200Response) IsSet() bool { - return v.isSet -} - -func (v *NullableGetCustomAttributes200Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetCustomAttributes200Response(val *GetCustomAttributes200Response) *NullableGetCustomAttributes200Response { - return &NullableGetCustomAttributes200Response{value: val, isSet: true} -} - -func (v NullableGetCustomAttributes200Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetCustomAttributes200Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_get_email_settings_200_response.go b/model_get_email_settings_200_response.go deleted file mode 100644 index 93b2767..0000000 --- a/model_get_email_settings_200_response.go +++ /dev/null @@ -1,148 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" - "fmt" -) - -// GetEmailSettings200Response - struct for GetEmailSettings200Response -type GetEmailSettings200Response struct { - EmailConfig *EmailConfig - GetEmailSettings200ResponseOneOf *GetEmailSettings200ResponseOneOf -} - -// EmailConfigAsGetEmailSettings200Response is a convenience function that returns EmailConfig wrapped in GetEmailSettings200Response -func EmailConfigAsGetEmailSettings200Response(v *EmailConfig) GetEmailSettings200Response { - return GetEmailSettings200Response{ - EmailConfig: v, - } -} - -// GetEmailSettings200ResponseOneOfAsGetEmailSettings200Response is a convenience function that returns GetEmailSettings200ResponseOneOf wrapped in GetEmailSettings200Response -func GetEmailSettings200ResponseOneOfAsGetEmailSettings200Response(v *GetEmailSettings200ResponseOneOf) GetEmailSettings200Response { - return GetEmailSettings200Response{ - GetEmailSettings200ResponseOneOf: v, - } -} - - -// Unmarshal JSON data into one of the pointers in the struct -func (dst *GetEmailSettings200Response) UnmarshalJSON(data []byte) error { - var err error - match := 0 - // try to unmarshal data into EmailConfig - err = newStrictDecoder(data).Decode(&dst.EmailConfig) - if err == nil { - jsonEmailConfig, _ := json.Marshal(dst.EmailConfig) - if string(jsonEmailConfig) == "{}" { // empty struct - dst.EmailConfig = nil - } else { - match++ - } - } else { - dst.EmailConfig = nil - } - - // try to unmarshal data into GetEmailSettings200ResponseOneOf - err = newStrictDecoder(data).Decode(&dst.GetEmailSettings200ResponseOneOf) - if err == nil { - jsonGetEmailSettings200ResponseOneOf, _ := json.Marshal(dst.GetEmailSettings200ResponseOneOf) - if string(jsonGetEmailSettings200ResponseOneOf) == "{}" { // empty struct - dst.GetEmailSettings200ResponseOneOf = nil - } else { - match++ - } - } else { - dst.GetEmailSettings200ResponseOneOf = nil - } - - if match > 1 { // more than 1 match - // reset to nil - dst.EmailConfig = nil - dst.GetEmailSettings200ResponseOneOf = nil - - return fmt.Errorf("data matches more than one schema in oneOf(GetEmailSettings200Response)") - } else if match == 1 { - return nil // exactly one match - } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf(GetEmailSettings200Response)") - } -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src GetEmailSettings200Response) MarshalJSON() ([]byte, error) { - if src.EmailConfig != nil { - return json.Marshal(&src.EmailConfig) - } - - if src.GetEmailSettings200ResponseOneOf != nil { - return json.Marshal(&src.GetEmailSettings200ResponseOneOf) - } - - return nil, nil // no data in oneOf schemas -} - -// Get the actual instance -func (obj *GetEmailSettings200Response) GetActualInstance() (interface{}) { - if obj == nil { - return nil - } - if obj.EmailConfig != nil { - return obj.EmailConfig - } - - if obj.GetEmailSettings200ResponseOneOf != nil { - return obj.GetEmailSettings200ResponseOneOf - } - - // all schemas are nil - return nil -} - -type NullableGetEmailSettings200Response struct { - value *GetEmailSettings200Response - isSet bool -} - -func (v NullableGetEmailSettings200Response) Get() *GetEmailSettings200Response { - return v.value -} - -func (v *NullableGetEmailSettings200Response) Set(val *GetEmailSettings200Response) { - v.value = val - v.isSet = true -} - -func (v NullableGetEmailSettings200Response) IsSet() bool { - return v.isSet -} - -func (v *NullableGetEmailSettings200Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetEmailSettings200Response(val *GetEmailSettings200Response) *NullableGetEmailSettings200Response { - return &NullableGetEmailSettings200Response{value: val, isSet: true} -} - -func (v NullableGetEmailSettings200Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetEmailSettings200Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_get_email_settings_200_response_one_of.go b/model_get_email_settings_200_response_one_of.go deleted file mode 100644 index e31245d..0000000 --- a/model_get_email_settings_200_response_one_of.go +++ /dev/null @@ -1,126 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the GetEmailSettings200ResponseOneOf type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetEmailSettings200ResponseOneOf{} - -// GetEmailSettings200ResponseOneOf struct for GetEmailSettings200ResponseOneOf -type GetEmailSettings200ResponseOneOf struct { - Mode *string `json:"mode,omitempty"` -} - -// NewGetEmailSettings200ResponseOneOf instantiates a new GetEmailSettings200ResponseOneOf 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 NewGetEmailSettings200ResponseOneOf() *GetEmailSettings200ResponseOneOf { - this := GetEmailSettings200ResponseOneOf{} - return &this -} - -// NewGetEmailSettings200ResponseOneOfWithDefaults instantiates a new GetEmailSettings200ResponseOneOf 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 NewGetEmailSettings200ResponseOneOfWithDefaults() *GetEmailSettings200ResponseOneOf { - this := GetEmailSettings200ResponseOneOf{} - return &this -} - -// GetMode returns the Mode field value if set, zero value otherwise. -func (o *GetEmailSettings200ResponseOneOf) GetMode() string { - if o == nil || isNil(o.Mode) { - var ret string - return ret - } - 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. -func (o *GetEmailSettings200ResponseOneOf) GetModeOk() (*string, bool) { - if o == nil || isNil(o.Mode) { - return nil, false - } - return o.Mode, true -} - -// HasMode returns a boolean if a field has been set. -func (o *GetEmailSettings200ResponseOneOf) HasMode() bool { - if o != nil && !isNil(o.Mode) { - return true - } - - return false -} - -// SetMode gets a reference to the given string and assigns it to the Mode field. -func (o *GetEmailSettings200ResponseOneOf) SetMode(v string) { - o.Mode = &v -} - -func (o GetEmailSettings200ResponseOneOf) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetEmailSettings200ResponseOneOf) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Mode) { - toSerialize["mode"] = o.Mode - } - return toSerialize, nil -} - -type NullableGetEmailSettings200ResponseOneOf struct { - value *GetEmailSettings200ResponseOneOf - isSet bool -} - -func (v NullableGetEmailSettings200ResponseOneOf) Get() *GetEmailSettings200ResponseOneOf { - return v.value -} - -func (v *NullableGetEmailSettings200ResponseOneOf) Set(val *GetEmailSettings200ResponseOneOf) { - v.value = val - v.isSet = true -} - -func (v NullableGetEmailSettings200ResponseOneOf) IsSet() bool { - return v.isSet -} - -func (v *NullableGetEmailSettings200ResponseOneOf) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetEmailSettings200ResponseOneOf(val *GetEmailSettings200ResponseOneOf) *NullableGetEmailSettings200ResponseOneOf { - return &NullableGetEmailSettings200ResponseOneOf{value: val, isSet: true} -} - -func (v NullableGetEmailSettings200ResponseOneOf) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetEmailSettings200ResponseOneOf) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_get_enrolled_factors_200_response.go b/model_get_enrolled_factors_200_response.go deleted file mode 100644 index 04c78e4..0000000 --- a/model_get_enrolled_factors_200_response.go +++ /dev/null @@ -1,162 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the GetEnrolledFactors200Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetEnrolledFactors200Response{} - -// GetEnrolledFactors200Response struct for GetEnrolledFactors200Response -type GetEnrolledFactors200Response struct { - Status *Error `json:"status,omitempty"` - Data *GetEnrolledFactors200ResponseData `json:"data,omitempty"` -} - -// NewGetEnrolledFactors200Response instantiates a new GetEnrolledFactors200Response 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 NewGetEnrolledFactors200Response() *GetEnrolledFactors200Response { - this := GetEnrolledFactors200Response{} - return &this -} - -// NewGetEnrolledFactors200ResponseWithDefaults instantiates a new GetEnrolledFactors200Response 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 NewGetEnrolledFactors200ResponseWithDefaults() *GetEnrolledFactors200Response { - this := GetEnrolledFactors200Response{} - return &this -} - -// GetStatus returns the Status field value if set, zero value otherwise. -func (o *GetEnrolledFactors200Response) GetStatus() Error { - if o == nil || isNil(o.Status) { - var ret Error - return ret - } - return *o.Status -} - -// GetStatusOk returns a tuple with the Status field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetEnrolledFactors200Response) GetStatusOk() (*Error, bool) { - if o == nil || isNil(o.Status) { - return nil, false - } - return o.Status, true -} - -// HasStatus returns a boolean if a field has been set. -func (o *GetEnrolledFactors200Response) HasStatus() bool { - if o != nil && !isNil(o.Status) { - return true - } - - return false -} - -// SetStatus gets a reference to the given Error and assigns it to the Status field. -func (o *GetEnrolledFactors200Response) SetStatus(v Error) { - o.Status = &v -} - -// GetData returns the Data field value if set, zero value otherwise. -func (o *GetEnrolledFactors200Response) GetData() GetEnrolledFactors200ResponseData { - if o == nil || isNil(o.Data) { - var ret GetEnrolledFactors200ResponseData - return ret - } - return *o.Data -} - -// GetDataOk returns a tuple with the Data field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetEnrolledFactors200Response) GetDataOk() (*GetEnrolledFactors200ResponseData, bool) { - if o == nil || isNil(o.Data) { - return nil, false - } - return o.Data, true -} - -// HasData returns a boolean if a field has been set. -func (o *GetEnrolledFactors200Response) HasData() bool { - if o != nil && !isNil(o.Data) { - return true - } - - return false -} - -// SetData gets a reference to the given GetEnrolledFactors200ResponseData and assigns it to the Data field. -func (o *GetEnrolledFactors200Response) SetData(v GetEnrolledFactors200ResponseData) { - o.Data = &v -} - -func (o GetEnrolledFactors200Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetEnrolledFactors200Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Status) { - toSerialize["status"] = o.Status - } - if !isNil(o.Data) { - toSerialize["data"] = o.Data - } - return toSerialize, nil -} - -type NullableGetEnrolledFactors200Response struct { - value *GetEnrolledFactors200Response - isSet bool -} - -func (v NullableGetEnrolledFactors200Response) Get() *GetEnrolledFactors200Response { - return v.value -} - -func (v *NullableGetEnrolledFactors200Response) Set(val *GetEnrolledFactors200Response) { - v.value = val - v.isSet = true -} - -func (v NullableGetEnrolledFactors200Response) IsSet() bool { - return v.isSet -} - -func (v *NullableGetEnrolledFactors200Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetEnrolledFactors200Response(val *GetEnrolledFactors200Response) *NullableGetEnrolledFactors200Response { - return &NullableGetEnrolledFactors200Response{value: val, isSet: true} -} - -func (v NullableGetEnrolledFactors200Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetEnrolledFactors200Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_get_enrolled_factors_200_response_data.go b/model_get_enrolled_factors_200_response_data.go deleted file mode 100644 index 44e2409..0000000 --- a/model_get_enrolled_factors_200_response_data.go +++ /dev/null @@ -1,126 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the GetEnrolledFactors200ResponseData type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetEnrolledFactors200ResponseData{} - -// GetEnrolledFactors200ResponseData struct for GetEnrolledFactors200ResponseData -type GetEnrolledFactors200ResponseData struct { - OtpDevices []GetEnrolledFactors200ResponseDataOtpDevicesInner `json:"otp_devices,omitempty"` -} - -// NewGetEnrolledFactors200ResponseData instantiates a new GetEnrolledFactors200ResponseData 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 NewGetEnrolledFactors200ResponseData() *GetEnrolledFactors200ResponseData { - this := GetEnrolledFactors200ResponseData{} - return &this -} - -// NewGetEnrolledFactors200ResponseDataWithDefaults instantiates a new GetEnrolledFactors200ResponseData 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 NewGetEnrolledFactors200ResponseDataWithDefaults() *GetEnrolledFactors200ResponseData { - this := GetEnrolledFactors200ResponseData{} - return &this -} - -// GetOtpDevices returns the OtpDevices field value if set, zero value otherwise. -func (o *GetEnrolledFactors200ResponseData) GetOtpDevices() []GetEnrolledFactors200ResponseDataOtpDevicesInner { - if o == nil || isNil(o.OtpDevices) { - var ret []GetEnrolledFactors200ResponseDataOtpDevicesInner - return ret - } - return o.OtpDevices -} - -// GetOtpDevicesOk returns a tuple with the OtpDevices field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetEnrolledFactors200ResponseData) GetOtpDevicesOk() ([]GetEnrolledFactors200ResponseDataOtpDevicesInner, bool) { - if o == nil || isNil(o.OtpDevices) { - return nil, false - } - return o.OtpDevices, true -} - -// HasOtpDevices returns a boolean if a field has been set. -func (o *GetEnrolledFactors200ResponseData) HasOtpDevices() bool { - if o != nil && !isNil(o.OtpDevices) { - return true - } - - return false -} - -// SetOtpDevices gets a reference to the given []GetEnrolledFactors200ResponseDataOtpDevicesInner and assigns it to the OtpDevices field. -func (o *GetEnrolledFactors200ResponseData) SetOtpDevices(v []GetEnrolledFactors200ResponseDataOtpDevicesInner) { - o.OtpDevices = v -} - -func (o GetEnrolledFactors200ResponseData) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetEnrolledFactors200ResponseData) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.OtpDevices) { - toSerialize["otp_devices"] = o.OtpDevices - } - return toSerialize, nil -} - -type NullableGetEnrolledFactors200ResponseData struct { - value *GetEnrolledFactors200ResponseData - isSet bool -} - -func (v NullableGetEnrolledFactors200ResponseData) Get() *GetEnrolledFactors200ResponseData { - return v.value -} - -func (v *NullableGetEnrolledFactors200ResponseData) Set(val *GetEnrolledFactors200ResponseData) { - v.value = val - v.isSet = true -} - -func (v NullableGetEnrolledFactors200ResponseData) IsSet() bool { - return v.isSet -} - -func (v *NullableGetEnrolledFactors200ResponseData) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetEnrolledFactors200ResponseData(val *GetEnrolledFactors200ResponseData) *NullableGetEnrolledFactors200ResponseData { - return &NullableGetEnrolledFactors200ResponseData{value: val, isSet: true} -} - -func (v NullableGetEnrolledFactors200ResponseData) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetEnrolledFactors200ResponseData) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_get_enrolled_factors_200_response_data_otp_devices_inner.go b/model_get_enrolled_factors_200_response_data_otp_devices_inner.go deleted file mode 100644 index a3266c5..0000000 --- a/model_get_enrolled_factors_200_response_data_otp_devices_inner.go +++ /dev/null @@ -1,423 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the GetEnrolledFactors200ResponseDataOtpDevicesInner type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetEnrolledFactors200ResponseDataOtpDevicesInner{} - -// GetEnrolledFactors200ResponseDataOtpDevicesInner struct for GetEnrolledFactors200ResponseDataOtpDevicesInner -type GetEnrolledFactors200ResponseDataOtpDevicesInner struct { - // True = enabled (used successfully for authentication at least once). False = pending (registered but never used). - Active *bool `json:"active,omitempty"` - // True = is user’s default MFA device for OneLogin. - Default *bool `json:"default,omitempty"` - // A short lived token that is required to Verify the Factor. This token expires in 120 seconds. - StateToken *string `json:"state_token,omitempty"` - // \"Official\" authentication factor name, as it appears to administrators in OneLogin. - AuthFactorName *string `json:"auth_factor_name,omitempty"` - // For OTP codes sent via SMS, the phone number receiving the SMS message. - PhoneNumber *string `json:"phone_number,omitempty"` - // Authentication factor display name as it appears to users upon initial registration, as defined by admins at Settings > Authentication Factors. - TypeDisplayName *string `json:"type_display_name,omitempty"` - // true: You MUST Activate this Factor to trigger an SMS or Push notification before Verifying the OTP code. false: No Activation required. You can Verify the OTP immediately. MFA factors that provide both push notifications (user accepts notification) and pull code submission (user initiates code submission from device or enters it manually) should appear twice; once with needs_trigger: true and once with needs_trigger: false. - NeedsTrigger *bool `json:"needs_trigger,omitempty"` - // Authentication factor display name assigned by users when they enroll the device. - UserDisplayName *string `json:"user_display_name,omitempty"` - // MFA device identifier. - Id *int32 `json:"id,omitempty"` -} - -// NewGetEnrolledFactors200ResponseDataOtpDevicesInner instantiates a new GetEnrolledFactors200ResponseDataOtpDevicesInner 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 NewGetEnrolledFactors200ResponseDataOtpDevicesInner() *GetEnrolledFactors200ResponseDataOtpDevicesInner { - this := GetEnrolledFactors200ResponseDataOtpDevicesInner{} - return &this -} - -// NewGetEnrolledFactors200ResponseDataOtpDevicesInnerWithDefaults instantiates a new GetEnrolledFactors200ResponseDataOtpDevicesInner 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 NewGetEnrolledFactors200ResponseDataOtpDevicesInnerWithDefaults() *GetEnrolledFactors200ResponseDataOtpDevicesInner { - this := GetEnrolledFactors200ResponseDataOtpDevicesInner{} - return &this -} - -// GetActive returns the Active field value if set, zero value otherwise. -func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) GetActive() bool { - if o == nil || isNil(o.Active) { - var ret bool - return ret - } - return *o.Active -} - -// GetActiveOk returns a tuple with the Active field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) GetActiveOk() (*bool, bool) { - if o == nil || isNil(o.Active) { - return nil, false - } - return o.Active, true -} - -// HasActive returns a boolean if a field has been set. -func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) HasActive() bool { - if o != nil && !isNil(o.Active) { - return true - } - - return false -} - -// SetActive gets a reference to the given bool and assigns it to the Active field. -func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) SetActive(v bool) { - o.Active = &v -} - -// GetDefault returns the Default field value if set, zero value otherwise. -func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) GetDefault() bool { - if o == nil || isNil(o.Default) { - var ret bool - return ret - } - return *o.Default -} - -// 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 *GetEnrolledFactors200ResponseDataOtpDevicesInner) GetDefaultOk() (*bool, bool) { - if o == nil || isNil(o.Default) { - return nil, false - } - return o.Default, true -} - -// HasDefault returns a boolean if a field has been set. -func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) HasDefault() bool { - if o != nil && !isNil(o.Default) { - return true - } - - return false -} - -// SetDefault gets a reference to the given bool and assigns it to the Default field. -func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) SetDefault(v bool) { - o.Default = &v -} - -// GetStateToken returns the StateToken field value if set, zero value otherwise. -func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) GetStateToken() string { - if o == nil || isNil(o.StateToken) { - var ret string - return ret - } - return *o.StateToken -} - -// GetStateTokenOk returns a tuple with the StateToken field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) GetStateTokenOk() (*string, bool) { - if o == nil || isNil(o.StateToken) { - return nil, false - } - return o.StateToken, true -} - -// HasStateToken returns a boolean if a field has been set. -func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) HasStateToken() bool { - if o != nil && !isNil(o.StateToken) { - return true - } - - return false -} - -// SetStateToken gets a reference to the given string and assigns it to the StateToken field. -func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) SetStateToken(v string) { - o.StateToken = &v -} - -// GetAuthFactorName returns the AuthFactorName field value if set, zero value otherwise. -func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) GetAuthFactorName() string { - if o == nil || isNil(o.AuthFactorName) { - var ret string - return ret - } - return *o.AuthFactorName -} - -// GetAuthFactorNameOk returns a tuple with the AuthFactorName field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) GetAuthFactorNameOk() (*string, bool) { - if o == nil || isNil(o.AuthFactorName) { - return nil, false - } - return o.AuthFactorName, true -} - -// HasAuthFactorName returns a boolean if a field has been set. -func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) HasAuthFactorName() bool { - if o != nil && !isNil(o.AuthFactorName) { - return true - } - - return false -} - -// SetAuthFactorName gets a reference to the given string and assigns it to the AuthFactorName field. -func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) SetAuthFactorName(v string) { - o.AuthFactorName = &v -} - -// GetPhoneNumber returns the PhoneNumber field value if set, zero value otherwise. -func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) GetPhoneNumber() string { - if o == nil || isNil(o.PhoneNumber) { - var ret string - return ret - } - return *o.PhoneNumber -} - -// 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 *GetEnrolledFactors200ResponseDataOtpDevicesInner) GetPhoneNumberOk() (*string, bool) { - if o == nil || isNil(o.PhoneNumber) { - return nil, false - } - return o.PhoneNumber, true -} - -// HasPhoneNumber returns a boolean if a field has been set. -func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) HasPhoneNumber() bool { - if o != nil && !isNil(o.PhoneNumber) { - return true - } - - return false -} - -// SetPhoneNumber gets a reference to the given string and assigns it to the PhoneNumber field. -func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) SetPhoneNumber(v string) { - o.PhoneNumber = &v -} - -// GetTypeDisplayName returns the TypeDisplayName field value if set, zero value otherwise. -func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) GetTypeDisplayName() string { - if o == nil || isNil(o.TypeDisplayName) { - var ret string - return ret - } - return *o.TypeDisplayName -} - -// GetTypeDisplayNameOk returns a tuple with the TypeDisplayName field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) GetTypeDisplayNameOk() (*string, bool) { - if o == nil || isNil(o.TypeDisplayName) { - return nil, false - } - return o.TypeDisplayName, true -} - -// HasTypeDisplayName returns a boolean if a field has been set. -func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) HasTypeDisplayName() bool { - if o != nil && !isNil(o.TypeDisplayName) { - return true - } - - return false -} - -// SetTypeDisplayName gets a reference to the given string and assigns it to the TypeDisplayName field. -func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) SetTypeDisplayName(v string) { - o.TypeDisplayName = &v -} - -// GetNeedsTrigger returns the NeedsTrigger field value if set, zero value otherwise. -func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) GetNeedsTrigger() bool { - if o == nil || isNil(o.NeedsTrigger) { - var ret bool - return ret - } - return *o.NeedsTrigger -} - -// GetNeedsTriggerOk returns a tuple with the NeedsTrigger field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) GetNeedsTriggerOk() (*bool, bool) { - if o == nil || isNil(o.NeedsTrigger) { - return nil, false - } - return o.NeedsTrigger, true -} - -// HasNeedsTrigger returns a boolean if a field has been set. -func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) HasNeedsTrigger() bool { - if o != nil && !isNil(o.NeedsTrigger) { - return true - } - - return false -} - -// SetNeedsTrigger gets a reference to the given bool and assigns it to the NeedsTrigger field. -func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) SetNeedsTrigger(v bool) { - o.NeedsTrigger = &v -} - -// GetUserDisplayName returns the UserDisplayName field value if set, zero value otherwise. -func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) GetUserDisplayName() string { - if o == nil || isNil(o.UserDisplayName) { - var ret string - return ret - } - return *o.UserDisplayName -} - -// GetUserDisplayNameOk returns a tuple with the UserDisplayName field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) GetUserDisplayNameOk() (*string, bool) { - if o == nil || isNil(o.UserDisplayName) { - return nil, false - } - return o.UserDisplayName, true -} - -// HasUserDisplayName returns a boolean if a field has been set. -func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) HasUserDisplayName() bool { - if o != nil && !isNil(o.UserDisplayName) { - return true - } - - return false -} - -// SetUserDisplayName gets a reference to the given string and assigns it to the UserDisplayName field. -func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) SetUserDisplayName(v string) { - o.UserDisplayName = &v -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) GetId() int32 { - if o == nil || isNil(o.Id) { - var ret int32 - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) GetIdOk() (*int32, bool) { - if o == nil || isNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) HasId() bool { - if o != nil && !isNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given int32 and assigns it to the Id field. -func (o *GetEnrolledFactors200ResponseDataOtpDevicesInner) SetId(v int32) { - o.Id = &v -} - -func (o GetEnrolledFactors200ResponseDataOtpDevicesInner) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetEnrolledFactors200ResponseDataOtpDevicesInner) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Active) { - toSerialize["active"] = o.Active - } - if !isNil(o.Default) { - toSerialize["default"] = o.Default - } - if !isNil(o.StateToken) { - toSerialize["state_token"] = o.StateToken - } - if !isNil(o.AuthFactorName) { - toSerialize["auth_factor_name"] = o.AuthFactorName - } - if !isNil(o.PhoneNumber) { - toSerialize["phone_number"] = o.PhoneNumber - } - if !isNil(o.TypeDisplayName) { - toSerialize["type_display_name"] = o.TypeDisplayName - } - if !isNil(o.NeedsTrigger) { - toSerialize["needs_trigger"] = o.NeedsTrigger - } - if !isNil(o.UserDisplayName) { - toSerialize["user_display_name"] = o.UserDisplayName - } - if !isNil(o.Id) { - toSerialize["id"] = o.Id - } - return toSerialize, nil -} - -type NullableGetEnrolledFactors200ResponseDataOtpDevicesInner struct { - value *GetEnrolledFactors200ResponseDataOtpDevicesInner - isSet bool -} - -func (v NullableGetEnrolledFactors200ResponseDataOtpDevicesInner) Get() *GetEnrolledFactors200ResponseDataOtpDevicesInner { - return v.value -} - -func (v *NullableGetEnrolledFactors200ResponseDataOtpDevicesInner) Set(val *GetEnrolledFactors200ResponseDataOtpDevicesInner) { - v.value = val - v.isSet = true -} - -func (v NullableGetEnrolledFactors200ResponseDataOtpDevicesInner) IsSet() bool { - return v.isSet -} - -func (v *NullableGetEnrolledFactors200ResponseDataOtpDevicesInner) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetEnrolledFactors200ResponseDataOtpDevicesInner(val *GetEnrolledFactors200ResponseDataOtpDevicesInner) *NullableGetEnrolledFactors200ResponseDataOtpDevicesInner { - return &NullableGetEnrolledFactors200ResponseDataOtpDevicesInner{value: val, isSet: true} -} - -func (v NullableGetEnrolledFactors200ResponseDataOtpDevicesInner) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetEnrolledFactors200ResponseDataOtpDevicesInner) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_get_event_by_id_200_response.go b/model_get_event_by_id_200_response.go deleted file mode 100644 index c2eeee2..0000000 --- a/model_get_event_by_id_200_response.go +++ /dev/null @@ -1,162 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the GetEventById200Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetEventById200Response{} - -// GetEventById200Response struct for GetEventById200Response -type GetEventById200Response struct { - Status *Error `json:"status,omitempty"` - Data *Event `json:"data,omitempty"` -} - -// NewGetEventById200Response instantiates a new GetEventById200Response 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 NewGetEventById200Response() *GetEventById200Response { - this := GetEventById200Response{} - return &this -} - -// NewGetEventById200ResponseWithDefaults instantiates a new GetEventById200Response 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 NewGetEventById200ResponseWithDefaults() *GetEventById200Response { - this := GetEventById200Response{} - return &this -} - -// GetStatus returns the Status field value if set, zero value otherwise. -func (o *GetEventById200Response) GetStatus() Error { - if o == nil || isNil(o.Status) { - var ret Error - return ret - } - return *o.Status -} - -// GetStatusOk returns a tuple with the Status field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetEventById200Response) GetStatusOk() (*Error, bool) { - if o == nil || isNil(o.Status) { - return nil, false - } - return o.Status, true -} - -// HasStatus returns a boolean if a field has been set. -func (o *GetEventById200Response) HasStatus() bool { - if o != nil && !isNil(o.Status) { - return true - } - - return false -} - -// SetStatus gets a reference to the given Error and assigns it to the Status field. -func (o *GetEventById200Response) SetStatus(v Error) { - o.Status = &v -} - -// GetData returns the Data field value if set, zero value otherwise. -func (o *GetEventById200Response) GetData() Event { - if o == nil || isNil(o.Data) { - var ret Event - return ret - } - return *o.Data -} - -// GetDataOk returns a tuple with the Data field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetEventById200Response) GetDataOk() (*Event, bool) { - if o == nil || isNil(o.Data) { - return nil, false - } - return o.Data, true -} - -// HasData returns a boolean if a field has been set. -func (o *GetEventById200Response) HasData() bool { - if o != nil && !isNil(o.Data) { - return true - } - - return false -} - -// SetData gets a reference to the given Event and assigns it to the Data field. -func (o *GetEventById200Response) SetData(v Event) { - o.Data = &v -} - -func (o GetEventById200Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetEventById200Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Status) { - toSerialize["status"] = o.Status - } - if !isNil(o.Data) { - toSerialize["data"] = o.Data - } - return toSerialize, nil -} - -type NullableGetEventById200Response struct { - value *GetEventById200Response - isSet bool -} - -func (v NullableGetEventById200Response) Get() *GetEventById200Response { - return v.value -} - -func (v *NullableGetEventById200Response) Set(val *GetEventById200Response) { - v.value = val - v.isSet = true -} - -func (v NullableGetEventById200Response) IsSet() bool { - return v.isSet -} - -func (v *NullableGetEventById200Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetEventById200Response(val *GetEventById200Response) *NullableGetEventById200Response { - return &NullableGetEventById200Response{value: val, isSet: true} -} - -func (v NullableGetEventById200Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetEventById200Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_get_event_types_200_response.go b/model_get_event_types_200_response.go deleted file mode 100644 index 4e6ad74..0000000 --- a/model_get_event_types_200_response.go +++ /dev/null @@ -1,162 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the GetEventTypes200Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetEventTypes200Response{} - -// GetEventTypes200Response struct for GetEventTypes200Response -type GetEventTypes200Response struct { - Status *Error `json:"status,omitempty"` - Data []GetEventTypes200ResponseDataInner `json:"data,omitempty"` -} - -// NewGetEventTypes200Response instantiates a new GetEventTypes200Response 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 NewGetEventTypes200Response() *GetEventTypes200Response { - this := GetEventTypes200Response{} - return &this -} - -// NewGetEventTypes200ResponseWithDefaults instantiates a new GetEventTypes200Response 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 NewGetEventTypes200ResponseWithDefaults() *GetEventTypes200Response { - this := GetEventTypes200Response{} - return &this -} - -// GetStatus returns the Status field value if set, zero value otherwise. -func (o *GetEventTypes200Response) GetStatus() Error { - if o == nil || isNil(o.Status) { - var ret Error - return ret - } - return *o.Status -} - -// GetStatusOk returns a tuple with the Status field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetEventTypes200Response) GetStatusOk() (*Error, bool) { - if o == nil || isNil(o.Status) { - return nil, false - } - return o.Status, true -} - -// HasStatus returns a boolean if a field has been set. -func (o *GetEventTypes200Response) HasStatus() bool { - if o != nil && !isNil(o.Status) { - return true - } - - return false -} - -// SetStatus gets a reference to the given Error and assigns it to the Status field. -func (o *GetEventTypes200Response) SetStatus(v Error) { - o.Status = &v -} - -// GetData returns the Data field value if set, zero value otherwise. -func (o *GetEventTypes200Response) GetData() []GetEventTypes200ResponseDataInner { - if o == nil || isNil(o.Data) { - var ret []GetEventTypes200ResponseDataInner - return ret - } - return o.Data -} - -// GetDataOk returns a tuple with the Data field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetEventTypes200Response) GetDataOk() ([]GetEventTypes200ResponseDataInner, bool) { - if o == nil || isNil(o.Data) { - return nil, false - } - return o.Data, true -} - -// HasData returns a boolean if a field has been set. -func (o *GetEventTypes200Response) HasData() bool { - if o != nil && !isNil(o.Data) { - return true - } - - return false -} - -// SetData gets a reference to the given []GetEventTypes200ResponseDataInner and assigns it to the Data field. -func (o *GetEventTypes200Response) SetData(v []GetEventTypes200ResponseDataInner) { - o.Data = v -} - -func (o GetEventTypes200Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetEventTypes200Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Status) { - toSerialize["status"] = o.Status - } - if !isNil(o.Data) { - toSerialize["data"] = o.Data - } - return toSerialize, nil -} - -type NullableGetEventTypes200Response struct { - value *GetEventTypes200Response - isSet bool -} - -func (v NullableGetEventTypes200Response) Get() *GetEventTypes200Response { - return v.value -} - -func (v *NullableGetEventTypes200Response) Set(val *GetEventTypes200Response) { - v.value = val - v.isSet = true -} - -func (v NullableGetEventTypes200Response) IsSet() bool { - return v.isSet -} - -func (v *NullableGetEventTypes200Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetEventTypes200Response(val *GetEventTypes200Response) *NullableGetEventTypes200Response { - return &NullableGetEventTypes200Response{value: val, isSet: true} -} - -func (v NullableGetEventTypes200Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetEventTypes200Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_get_event_types_200_response_data_inner.go b/model_get_event_types_200_response_data_inner.go deleted file mode 100644 index b8f9d4f..0000000 --- a/model_get_event_types_200_response_data_inner.go +++ /dev/null @@ -1,198 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the GetEventTypes200ResponseDataInner type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetEventTypes200ResponseDataInner{} - -// GetEventTypes200ResponseDataInner struct for GetEventTypes200ResponseDataInner -type GetEventTypes200ResponseDataInner struct { - Name *string `json:"name,omitempty"` - Description *string `json:"description,omitempty"` - Id *int32 `json:"id,omitempty"` -} - -// NewGetEventTypes200ResponseDataInner instantiates a new GetEventTypes200ResponseDataInner 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 NewGetEventTypes200ResponseDataInner() *GetEventTypes200ResponseDataInner { - this := GetEventTypes200ResponseDataInner{} - return &this -} - -// NewGetEventTypes200ResponseDataInnerWithDefaults instantiates a new GetEventTypes200ResponseDataInner 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 NewGetEventTypes200ResponseDataInnerWithDefaults() *GetEventTypes200ResponseDataInner { - this := GetEventTypes200ResponseDataInner{} - return &this -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *GetEventTypes200ResponseDataInner) GetName() string { - if o == nil || isNil(o.Name) { - var ret string - return ret - } - return *o.Name -} - -// 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 *GetEventTypes200ResponseDataInner) GetNameOk() (*string, bool) { - if o == nil || isNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *GetEventTypes200ResponseDataInner) HasName() bool { - if o != nil && !isNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *GetEventTypes200ResponseDataInner) SetName(v string) { - o.Name = &v -} - -// GetDescription returns the Description field value if set, zero value otherwise. -func (o *GetEventTypes200ResponseDataInner) GetDescription() string { - if o == nil || isNil(o.Description) { - var ret string - return ret - } - return *o.Description -} - -// 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 *GetEventTypes200ResponseDataInner) GetDescriptionOk() (*string, bool) { - if o == nil || isNil(o.Description) { - return nil, false - } - return o.Description, true -} - -// HasDescription returns a boolean if a field has been set. -func (o *GetEventTypes200ResponseDataInner) HasDescription() bool { - if o != nil && !isNil(o.Description) { - return true - } - - return false -} - -// SetDescription gets a reference to the given string and assigns it to the Description field. -func (o *GetEventTypes200ResponseDataInner) SetDescription(v string) { - o.Description = &v -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *GetEventTypes200ResponseDataInner) GetId() int32 { - if o == nil || isNil(o.Id) { - var ret int32 - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetEventTypes200ResponseDataInner) GetIdOk() (*int32, bool) { - if o == nil || isNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *GetEventTypes200ResponseDataInner) HasId() bool { - if o != nil && !isNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given int32 and assigns it to the Id field. -func (o *GetEventTypes200ResponseDataInner) SetId(v int32) { - o.Id = &v -} - -func (o GetEventTypes200ResponseDataInner) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetEventTypes200ResponseDataInner) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Name) { - toSerialize["name"] = o.Name - } - if !isNil(o.Description) { - toSerialize["description"] = o.Description - } - if !isNil(o.Id) { - toSerialize["id"] = o.Id - } - return toSerialize, nil -} - -type NullableGetEventTypes200ResponseDataInner struct { - value *GetEventTypes200ResponseDataInner - isSet bool -} - -func (v NullableGetEventTypes200ResponseDataInner) Get() *GetEventTypes200ResponseDataInner { - return v.value -} - -func (v *NullableGetEventTypes200ResponseDataInner) Set(val *GetEventTypes200ResponseDataInner) { - v.value = val - v.isSet = true -} - -func (v NullableGetEventTypes200ResponseDataInner) IsSet() bool { - return v.isSet -} - -func (v *NullableGetEventTypes200ResponseDataInner) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetEventTypes200ResponseDataInner(val *GetEventTypes200ResponseDataInner) *NullableGetEventTypes200ResponseDataInner { - return &NullableGetEventTypes200ResponseDataInner{value: val, isSet: true} -} - -func (v NullableGetEventTypes200ResponseDataInner) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetEventTypes200ResponseDataInner) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_get_events_200_response.go b/model_get_events_200_response.go deleted file mode 100644 index 2173fe7..0000000 --- a/model_get_events_200_response.go +++ /dev/null @@ -1,198 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the GetEvents200Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetEvents200Response{} - -// GetEvents200Response struct for GetEvents200Response -type GetEvents200Response struct { - Status *Error `json:"status,omitempty"` - Pagination *GetEvents200ResponsePagination `json:"pagination,omitempty"` - Data []Event `json:"data,omitempty"` -} - -// NewGetEvents200Response instantiates a new GetEvents200Response 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 NewGetEvents200Response() *GetEvents200Response { - this := GetEvents200Response{} - return &this -} - -// NewGetEvents200ResponseWithDefaults instantiates a new GetEvents200Response 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 NewGetEvents200ResponseWithDefaults() *GetEvents200Response { - this := GetEvents200Response{} - return &this -} - -// GetStatus returns the Status field value if set, zero value otherwise. -func (o *GetEvents200Response) GetStatus() Error { - if o == nil || isNil(o.Status) { - var ret Error - return ret - } - return *o.Status -} - -// GetStatusOk returns a tuple with the Status field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetEvents200Response) GetStatusOk() (*Error, bool) { - if o == nil || isNil(o.Status) { - return nil, false - } - return o.Status, true -} - -// HasStatus returns a boolean if a field has been set. -func (o *GetEvents200Response) HasStatus() bool { - if o != nil && !isNil(o.Status) { - return true - } - - return false -} - -// SetStatus gets a reference to the given Error and assigns it to the Status field. -func (o *GetEvents200Response) SetStatus(v Error) { - o.Status = &v -} - -// GetPagination returns the Pagination field value if set, zero value otherwise. -func (o *GetEvents200Response) GetPagination() GetEvents200ResponsePagination { - if o == nil || isNil(o.Pagination) { - var ret GetEvents200ResponsePagination - return ret - } - return *o.Pagination -} - -// GetPaginationOk returns a tuple with the Pagination field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetEvents200Response) GetPaginationOk() (*GetEvents200ResponsePagination, bool) { - if o == nil || isNil(o.Pagination) { - return nil, false - } - return o.Pagination, true -} - -// HasPagination returns a boolean if a field has been set. -func (o *GetEvents200Response) HasPagination() bool { - if o != nil && !isNil(o.Pagination) { - return true - } - - return false -} - -// SetPagination gets a reference to the given GetEvents200ResponsePagination and assigns it to the Pagination field. -func (o *GetEvents200Response) SetPagination(v GetEvents200ResponsePagination) { - o.Pagination = &v -} - -// GetData returns the Data field value if set, zero value otherwise. -func (o *GetEvents200Response) GetData() []Event { - if o == nil || isNil(o.Data) { - var ret []Event - return ret - } - return o.Data -} - -// GetDataOk returns a tuple with the Data field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetEvents200Response) GetDataOk() ([]Event, bool) { - if o == nil || isNil(o.Data) { - return nil, false - } - return o.Data, true -} - -// HasData returns a boolean if a field has been set. -func (o *GetEvents200Response) HasData() bool { - if o != nil && !isNil(o.Data) { - return true - } - - return false -} - -// SetData gets a reference to the given []Event and assigns it to the Data field. -func (o *GetEvents200Response) SetData(v []Event) { - o.Data = v -} - -func (o GetEvents200Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetEvents200Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Status) { - toSerialize["status"] = o.Status - } - if !isNil(o.Pagination) { - toSerialize["pagination"] = o.Pagination - } - if !isNil(o.Data) { - toSerialize["data"] = o.Data - } - return toSerialize, nil -} - -type NullableGetEvents200Response struct { - value *GetEvents200Response - isSet bool -} - -func (v NullableGetEvents200Response) Get() *GetEvents200Response { - return v.value -} - -func (v *NullableGetEvents200Response) Set(val *GetEvents200Response) { - v.value = val - v.isSet = true -} - -func (v NullableGetEvents200Response) IsSet() bool { - return v.isSet -} - -func (v *NullableGetEvents200Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetEvents200Response(val *GetEvents200Response) *NullableGetEvents200Response { - return &NullableGetEvents200Response{value: val, isSet: true} -} - -func (v NullableGetEvents200Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetEvents200Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_get_events_200_response_pagination.go b/model_get_events_200_response_pagination.go deleted file mode 100644 index 313c584..0000000 --- a/model_get_events_200_response_pagination.go +++ /dev/null @@ -1,234 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the GetEvents200ResponsePagination type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetEvents200ResponsePagination{} - -// GetEvents200ResponsePagination struct for GetEvents200ResponsePagination -type GetEvents200ResponsePagination struct { - BeforeCursor *string `json:"before_cursor,omitempty"` - AfterCursor *string `json:"after_cursor,omitempty"` - PreviousLink *string `json:"previous_link,omitempty"` - NextLink *string `json:"next_link,omitempty"` -} - -// NewGetEvents200ResponsePagination instantiates a new GetEvents200ResponsePagination 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 NewGetEvents200ResponsePagination() *GetEvents200ResponsePagination { - this := GetEvents200ResponsePagination{} - return &this -} - -// NewGetEvents200ResponsePaginationWithDefaults instantiates a new GetEvents200ResponsePagination 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 NewGetEvents200ResponsePaginationWithDefaults() *GetEvents200ResponsePagination { - this := GetEvents200ResponsePagination{} - return &this -} - -// GetBeforeCursor returns the BeforeCursor field value if set, zero value otherwise. -func (o *GetEvents200ResponsePagination) GetBeforeCursor() string { - if o == nil || isNil(o.BeforeCursor) { - var ret string - return ret - } - return *o.BeforeCursor -} - -// GetBeforeCursorOk returns a tuple with the BeforeCursor field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetEvents200ResponsePagination) GetBeforeCursorOk() (*string, bool) { - if o == nil || isNil(o.BeforeCursor) { - return nil, false - } - return o.BeforeCursor, true -} - -// HasBeforeCursor returns a boolean if a field has been set. -func (o *GetEvents200ResponsePagination) HasBeforeCursor() bool { - if o != nil && !isNil(o.BeforeCursor) { - return true - } - - return false -} - -// SetBeforeCursor gets a reference to the given string and assigns it to the BeforeCursor field. -func (o *GetEvents200ResponsePagination) SetBeforeCursor(v string) { - o.BeforeCursor = &v -} - -// GetAfterCursor returns the AfterCursor field value if set, zero value otherwise. -func (o *GetEvents200ResponsePagination) GetAfterCursor() string { - if o == nil || isNil(o.AfterCursor) { - var ret string - return ret - } - return *o.AfterCursor -} - -// GetAfterCursorOk returns a tuple with the AfterCursor field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetEvents200ResponsePagination) GetAfterCursorOk() (*string, bool) { - if o == nil || isNil(o.AfterCursor) { - return nil, false - } - return o.AfterCursor, true -} - -// HasAfterCursor returns a boolean if a field has been set. -func (o *GetEvents200ResponsePagination) HasAfterCursor() bool { - if o != nil && !isNil(o.AfterCursor) { - return true - } - - return false -} - -// SetAfterCursor gets a reference to the given string and assigns it to the AfterCursor field. -func (o *GetEvents200ResponsePagination) SetAfterCursor(v string) { - o.AfterCursor = &v -} - -// GetPreviousLink returns the PreviousLink field value if set, zero value otherwise. -func (o *GetEvents200ResponsePagination) GetPreviousLink() string { - if o == nil || isNil(o.PreviousLink) { - var ret string - return ret - } - return *o.PreviousLink -} - -// GetPreviousLinkOk returns a tuple with the PreviousLink field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetEvents200ResponsePagination) GetPreviousLinkOk() (*string, bool) { - if o == nil || isNil(o.PreviousLink) { - return nil, false - } - return o.PreviousLink, true -} - -// HasPreviousLink returns a boolean if a field has been set. -func (o *GetEvents200ResponsePagination) HasPreviousLink() bool { - if o != nil && !isNil(o.PreviousLink) { - return true - } - - return false -} - -// SetPreviousLink gets a reference to the given string and assigns it to the PreviousLink field. -func (o *GetEvents200ResponsePagination) SetPreviousLink(v string) { - o.PreviousLink = &v -} - -// GetNextLink returns the NextLink field value if set, zero value otherwise. -func (o *GetEvents200ResponsePagination) GetNextLink() string { - if o == nil || isNil(o.NextLink) { - var ret string - return ret - } - return *o.NextLink -} - -// GetNextLinkOk returns a tuple with the NextLink field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetEvents200ResponsePagination) GetNextLinkOk() (*string, bool) { - if o == nil || isNil(o.NextLink) { - return nil, false - } - return o.NextLink, true -} - -// HasNextLink returns a boolean if a field has been set. -func (o *GetEvents200ResponsePagination) HasNextLink() bool { - if o != nil && !isNil(o.NextLink) { - return true - } - - return false -} - -// SetNextLink gets a reference to the given string and assigns it to the NextLink field. -func (o *GetEvents200ResponsePagination) SetNextLink(v string) { - o.NextLink = &v -} - -func (o GetEvents200ResponsePagination) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetEvents200ResponsePagination) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.BeforeCursor) { - toSerialize["before_cursor"] = o.BeforeCursor - } - if !isNil(o.AfterCursor) { - toSerialize["after_cursor"] = o.AfterCursor - } - if !isNil(o.PreviousLink) { - toSerialize["previous_link"] = o.PreviousLink - } - if !isNil(o.NextLink) { - toSerialize["next_link"] = o.NextLink - } - return toSerialize, nil -} - -type NullableGetEvents200ResponsePagination struct { - value *GetEvents200ResponsePagination - isSet bool -} - -func (v NullableGetEvents200ResponsePagination) Get() *GetEvents200ResponsePagination { - return v.value -} - -func (v *NullableGetEvents200ResponsePagination) Set(val *GetEvents200ResponsePagination) { - v.value = val - v.isSet = true -} - -func (v NullableGetEvents200ResponsePagination) IsSet() bool { - return v.isSet -} - -func (v *NullableGetEvents200ResponsePagination) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetEvents200ResponsePagination(val *GetEvents200ResponsePagination) *NullableGetEvents200ResponsePagination { - return &NullableGetEvents200ResponsePagination{value: val, isSet: true} -} - -func (v NullableGetEvents200ResponsePagination) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetEvents200ResponsePagination) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_get_groups_200_response.go b/model_get_groups_200_response.go deleted file mode 100644 index 724cb64..0000000 --- a/model_get_groups_200_response.go +++ /dev/null @@ -1,162 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the GetGroups200Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetGroups200Response{} - -// GetGroups200Response struct for GetGroups200Response -type GetGroups200Response struct { - Status *Error `json:"status,omitempty"` - Data []Group `json:"data,omitempty"` -} - -// NewGetGroups200Response instantiates a new GetGroups200Response 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 NewGetGroups200Response() *GetGroups200Response { - this := GetGroups200Response{} - return &this -} - -// NewGetGroups200ResponseWithDefaults instantiates a new GetGroups200Response 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 NewGetGroups200ResponseWithDefaults() *GetGroups200Response { - this := GetGroups200Response{} - return &this -} - -// GetStatus returns the Status field value if set, zero value otherwise. -func (o *GetGroups200Response) GetStatus() Error { - if o == nil || isNil(o.Status) { - var ret Error - return ret - } - return *o.Status -} - -// GetStatusOk returns a tuple with the Status field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetGroups200Response) GetStatusOk() (*Error, bool) { - if o == nil || isNil(o.Status) { - return nil, false - } - return o.Status, true -} - -// HasStatus returns a boolean if a field has been set. -func (o *GetGroups200Response) HasStatus() bool { - if o != nil && !isNil(o.Status) { - return true - } - - return false -} - -// SetStatus gets a reference to the given Error and assigns it to the Status field. -func (o *GetGroups200Response) SetStatus(v Error) { - o.Status = &v -} - -// GetData returns the Data field value if set, zero value otherwise. -func (o *GetGroups200Response) GetData() []Group { - if o == nil || isNil(o.Data) { - var ret []Group - return ret - } - return o.Data -} - -// GetDataOk returns a tuple with the Data field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetGroups200Response) GetDataOk() ([]Group, bool) { - if o == nil || isNil(o.Data) { - return nil, false - } - return o.Data, true -} - -// HasData returns a boolean if a field has been set. -func (o *GetGroups200Response) HasData() bool { - if o != nil && !isNil(o.Data) { - return true - } - - return false -} - -// SetData gets a reference to the given []Group and assigns it to the Data field. -func (o *GetGroups200Response) SetData(v []Group) { - o.Data = v -} - -func (o GetGroups200Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetGroups200Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Status) { - toSerialize["status"] = o.Status - } - if !isNil(o.Data) { - toSerialize["data"] = o.Data - } - return toSerialize, nil -} - -type NullableGetGroups200Response struct { - value *GetGroups200Response - isSet bool -} - -func (v NullableGetGroups200Response) Get() *GetGroups200Response { - return v.value -} - -func (v *NullableGetGroups200Response) Set(val *GetGroups200Response) { - v.value = val - v.isSet = true -} - -func (v NullableGetGroups200Response) IsSet() bool { - return v.isSet -} - -func (v *NullableGetGroups200Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetGroups200Response(val *GetGroups200Response) *NullableGetGroups200Response { - return &NullableGetGroups200Response{value: val, isSet: true} -} - -func (v NullableGetGroups200Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetGroups200Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_get_invite_link_200_response.go b/model_get_invite_link_200_response.go deleted file mode 100644 index c9757aa..0000000 --- a/model_get_invite_link_200_response.go +++ /dev/null @@ -1,163 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the GetInviteLink200Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetInviteLink200Response{} - -// GetInviteLink200Response struct for GetInviteLink200Response -type GetInviteLink200Response struct { - Status *Error `json:"status,omitempty"` - // Provides reset password link - Data []string `json:"data,omitempty"` -} - -// NewGetInviteLink200Response instantiates a new GetInviteLink200Response 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 NewGetInviteLink200Response() *GetInviteLink200Response { - this := GetInviteLink200Response{} - return &this -} - -// NewGetInviteLink200ResponseWithDefaults instantiates a new GetInviteLink200Response 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 NewGetInviteLink200ResponseWithDefaults() *GetInviteLink200Response { - this := GetInviteLink200Response{} - return &this -} - -// GetStatus returns the Status field value if set, zero value otherwise. -func (o *GetInviteLink200Response) GetStatus() Error { - if o == nil || isNil(o.Status) { - var ret Error - return ret - } - return *o.Status -} - -// GetStatusOk returns a tuple with the Status field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetInviteLink200Response) GetStatusOk() (*Error, bool) { - if o == nil || isNil(o.Status) { - return nil, false - } - return o.Status, true -} - -// HasStatus returns a boolean if a field has been set. -func (o *GetInviteLink200Response) HasStatus() bool { - if o != nil && !isNil(o.Status) { - return true - } - - return false -} - -// SetStatus gets a reference to the given Error and assigns it to the Status field. -func (o *GetInviteLink200Response) SetStatus(v Error) { - o.Status = &v -} - -// GetData returns the Data field value if set, zero value otherwise. -func (o *GetInviteLink200Response) GetData() []string { - if o == nil || isNil(o.Data) { - var ret []string - return ret - } - return o.Data -} - -// GetDataOk returns a tuple with the Data field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetInviteLink200Response) GetDataOk() ([]string, bool) { - if o == nil || isNil(o.Data) { - return nil, false - } - return o.Data, true -} - -// HasData returns a boolean if a field has been set. -func (o *GetInviteLink200Response) HasData() bool { - if o != nil && !isNil(o.Data) { - return true - } - - return false -} - -// SetData gets a reference to the given []string and assigns it to the Data field. -func (o *GetInviteLink200Response) SetData(v []string) { - o.Data = v -} - -func (o GetInviteLink200Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetInviteLink200Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Status) { - toSerialize["status"] = o.Status - } - if !isNil(o.Data) { - toSerialize["data"] = o.Data - } - return toSerialize, nil -} - -type NullableGetInviteLink200Response struct { - value *GetInviteLink200Response - isSet bool -} - -func (v NullableGetInviteLink200Response) Get() *GetInviteLink200Response { - return v.value -} - -func (v *NullableGetInviteLink200Response) Set(val *GetInviteLink200Response) { - v.value = val - v.isSet = true -} - -func (v NullableGetInviteLink200Response) IsSet() bool { - return v.isSet -} - -func (v *NullableGetInviteLink200Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetInviteLink200Response(val *GetInviteLink200Response) *NullableGetInviteLink200Response { - return &NullableGetInviteLink200Response{value: val, isSet: true} -} - -func (v NullableGetInviteLink200Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetInviteLink200Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_get_invite_link_request.go b/model_get_invite_link_request.go deleted file mode 100644 index 09ff7c3..0000000 --- a/model_get_invite_link_request.go +++ /dev/null @@ -1,127 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the GetInviteLinkRequest type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetInviteLinkRequest{} - -// GetInviteLinkRequest struct for GetInviteLinkRequest -type GetInviteLinkRequest struct { - // Set to the user email address to generate an invite link. The value is case sensitive. - Email *string `json:"email,omitempty"` -} - -// NewGetInviteLinkRequest instantiates a new GetInviteLinkRequest 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 NewGetInviteLinkRequest() *GetInviteLinkRequest { - this := GetInviteLinkRequest{} - return &this -} - -// NewGetInviteLinkRequestWithDefaults instantiates a new GetInviteLinkRequest 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 NewGetInviteLinkRequestWithDefaults() *GetInviteLinkRequest { - this := GetInviteLinkRequest{} - return &this -} - -// GetEmail returns the Email field value if set, zero value otherwise. -func (o *GetInviteLinkRequest) GetEmail() string { - if o == nil || isNil(o.Email) { - 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 *GetInviteLinkRequest) GetEmailOk() (*string, bool) { - if o == nil || isNil(o.Email) { - return nil, false - } - return o.Email, true -} - -// HasEmail returns a boolean if a field has been set. -func (o *GetInviteLinkRequest) HasEmail() bool { - if o != nil && !isNil(o.Email) { - return true - } - - return false -} - -// SetEmail gets a reference to the given string and assigns it to the Email field. -func (o *GetInviteLinkRequest) SetEmail(v string) { - o.Email = &v -} - -func (o GetInviteLinkRequest) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetInviteLinkRequest) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Email) { - toSerialize["email"] = o.Email - } - return toSerialize, nil -} - -type NullableGetInviteLinkRequest struct { - value *GetInviteLinkRequest - isSet bool -} - -func (v NullableGetInviteLinkRequest) Get() *GetInviteLinkRequest { - return v.value -} - -func (v *NullableGetInviteLinkRequest) Set(val *GetInviteLinkRequest) { - v.value = val - v.isSet = true -} - -func (v NullableGetInviteLinkRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableGetInviteLinkRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetInviteLinkRequest(val *GetInviteLinkRequest) *NullableGetInviteLinkRequest { - return &NullableGetInviteLinkRequest{value: val, isSet: true} -} - -func (v NullableGetInviteLinkRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetInviteLinkRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_get_mfa_factors_200_response.go b/model_get_mfa_factors_200_response.go deleted file mode 100644 index cdc4c02..0000000 --- a/model_get_mfa_factors_200_response.go +++ /dev/null @@ -1,162 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the GetMFAFactors200Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetMFAFactors200Response{} - -// GetMFAFactors200Response struct for GetMFAFactors200Response -type GetMFAFactors200Response struct { - Status *Error `json:"status,omitempty"` - Data *GetMFAFactors200ResponseData `json:"data,omitempty"` -} - -// NewGetMFAFactors200Response instantiates a new GetMFAFactors200Response 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 NewGetMFAFactors200Response() *GetMFAFactors200Response { - this := GetMFAFactors200Response{} - return &this -} - -// NewGetMFAFactors200ResponseWithDefaults instantiates a new GetMFAFactors200Response 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 NewGetMFAFactors200ResponseWithDefaults() *GetMFAFactors200Response { - this := GetMFAFactors200Response{} - return &this -} - -// GetStatus returns the Status field value if set, zero value otherwise. -func (o *GetMFAFactors200Response) GetStatus() Error { - if o == nil || isNil(o.Status) { - var ret Error - return ret - } - return *o.Status -} - -// GetStatusOk returns a tuple with the Status field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetMFAFactors200Response) GetStatusOk() (*Error, bool) { - if o == nil || isNil(o.Status) { - return nil, false - } - return o.Status, true -} - -// HasStatus returns a boolean if a field has been set. -func (o *GetMFAFactors200Response) HasStatus() bool { - if o != nil && !isNil(o.Status) { - return true - } - - return false -} - -// SetStatus gets a reference to the given Error and assigns it to the Status field. -func (o *GetMFAFactors200Response) SetStatus(v Error) { - o.Status = &v -} - -// GetData returns the Data field value if set, zero value otherwise. -func (o *GetMFAFactors200Response) GetData() GetMFAFactors200ResponseData { - if o == nil || isNil(o.Data) { - var ret GetMFAFactors200ResponseData - return ret - } - return *o.Data -} - -// GetDataOk returns a tuple with the Data field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetMFAFactors200Response) GetDataOk() (*GetMFAFactors200ResponseData, bool) { - if o == nil || isNil(o.Data) { - return nil, false - } - return o.Data, true -} - -// HasData returns a boolean if a field has been set. -func (o *GetMFAFactors200Response) HasData() bool { - if o != nil && !isNil(o.Data) { - return true - } - - return false -} - -// SetData gets a reference to the given GetMFAFactors200ResponseData and assigns it to the Data field. -func (o *GetMFAFactors200Response) SetData(v GetMFAFactors200ResponseData) { - o.Data = &v -} - -func (o GetMFAFactors200Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetMFAFactors200Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Status) { - toSerialize["status"] = o.Status - } - if !isNil(o.Data) { - toSerialize["data"] = o.Data - } - return toSerialize, nil -} - -type NullableGetMFAFactors200Response struct { - value *GetMFAFactors200Response - isSet bool -} - -func (v NullableGetMFAFactors200Response) Get() *GetMFAFactors200Response { - return v.value -} - -func (v *NullableGetMFAFactors200Response) Set(val *GetMFAFactors200Response) { - v.value = val - v.isSet = true -} - -func (v NullableGetMFAFactors200Response) IsSet() bool { - return v.isSet -} - -func (v *NullableGetMFAFactors200Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetMFAFactors200Response(val *GetMFAFactors200Response) *NullableGetMFAFactors200Response { - return &NullableGetMFAFactors200Response{value: val, isSet: true} -} - -func (v NullableGetMFAFactors200Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetMFAFactors200Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_get_mfa_factors_200_response_data.go b/model_get_mfa_factors_200_response_data.go deleted file mode 100644 index fb495dd..0000000 --- a/model_get_mfa_factors_200_response_data.go +++ /dev/null @@ -1,126 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the GetMFAFactors200ResponseData type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetMFAFactors200ResponseData{} - -// GetMFAFactors200ResponseData struct for GetMFAFactors200ResponseData -type GetMFAFactors200ResponseData struct { - AuthFactors []GetMFAFactors200ResponseDataAuthFactorsInner `json:"auth_factors,omitempty"` -} - -// NewGetMFAFactors200ResponseData instantiates a new GetMFAFactors200ResponseData 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 NewGetMFAFactors200ResponseData() *GetMFAFactors200ResponseData { - this := GetMFAFactors200ResponseData{} - return &this -} - -// NewGetMFAFactors200ResponseDataWithDefaults instantiates a new GetMFAFactors200ResponseData 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 NewGetMFAFactors200ResponseDataWithDefaults() *GetMFAFactors200ResponseData { - this := GetMFAFactors200ResponseData{} - return &this -} - -// GetAuthFactors returns the AuthFactors field value if set, zero value otherwise. -func (o *GetMFAFactors200ResponseData) GetAuthFactors() []GetMFAFactors200ResponseDataAuthFactorsInner { - if o == nil || isNil(o.AuthFactors) { - var ret []GetMFAFactors200ResponseDataAuthFactorsInner - return ret - } - return o.AuthFactors -} - -// GetAuthFactorsOk returns a tuple with the AuthFactors field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetMFAFactors200ResponseData) GetAuthFactorsOk() ([]GetMFAFactors200ResponseDataAuthFactorsInner, bool) { - if o == nil || isNil(o.AuthFactors) { - return nil, false - } - return o.AuthFactors, true -} - -// HasAuthFactors returns a boolean if a field has been set. -func (o *GetMFAFactors200ResponseData) HasAuthFactors() bool { - if o != nil && !isNil(o.AuthFactors) { - return true - } - - return false -} - -// SetAuthFactors gets a reference to the given []GetMFAFactors200ResponseDataAuthFactorsInner and assigns it to the AuthFactors field. -func (o *GetMFAFactors200ResponseData) SetAuthFactors(v []GetMFAFactors200ResponseDataAuthFactorsInner) { - o.AuthFactors = v -} - -func (o GetMFAFactors200ResponseData) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetMFAFactors200ResponseData) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.AuthFactors) { - toSerialize["auth_factors"] = o.AuthFactors - } - return toSerialize, nil -} - -type NullableGetMFAFactors200ResponseData struct { - value *GetMFAFactors200ResponseData - isSet bool -} - -func (v NullableGetMFAFactors200ResponseData) Get() *GetMFAFactors200ResponseData { - return v.value -} - -func (v *NullableGetMFAFactors200ResponseData) Set(val *GetMFAFactors200ResponseData) { - v.value = val - v.isSet = true -} - -func (v NullableGetMFAFactors200ResponseData) IsSet() bool { - return v.isSet -} - -func (v *NullableGetMFAFactors200ResponseData) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetMFAFactors200ResponseData(val *GetMFAFactors200ResponseData) *NullableGetMFAFactors200ResponseData { - return &NullableGetMFAFactors200ResponseData{value: val, isSet: true} -} - -func (v NullableGetMFAFactors200ResponseData) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetMFAFactors200ResponseData) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_get_mfa_factors_200_response_data_auth_factors_inner.go b/model_get_mfa_factors_200_response_data_auth_factors_inner.go deleted file mode 100644 index b7a1e36..0000000 --- a/model_get_mfa_factors_200_response_data_auth_factors_inner.go +++ /dev/null @@ -1,164 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the GetMFAFactors200ResponseDataAuthFactorsInner type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetMFAFactors200ResponseDataAuthFactorsInner{} - -// GetMFAFactors200ResponseDataAuthFactorsInner struct for GetMFAFactors200ResponseDataAuthFactorsInner -type GetMFAFactors200ResponseDataAuthFactorsInner struct { - // Official authentication factor name, as it appears to administrators in OneLogin. - Name *string `json:"name,omitempty"` - // Identifier for the factor which will be used for user enrollment - FactorId *int32 `json:"factor_id,omitempty"` -} - -// NewGetMFAFactors200ResponseDataAuthFactorsInner instantiates a new GetMFAFactors200ResponseDataAuthFactorsInner 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 NewGetMFAFactors200ResponseDataAuthFactorsInner() *GetMFAFactors200ResponseDataAuthFactorsInner { - this := GetMFAFactors200ResponseDataAuthFactorsInner{} - return &this -} - -// NewGetMFAFactors200ResponseDataAuthFactorsInnerWithDefaults instantiates a new GetMFAFactors200ResponseDataAuthFactorsInner 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 NewGetMFAFactors200ResponseDataAuthFactorsInnerWithDefaults() *GetMFAFactors200ResponseDataAuthFactorsInner { - this := GetMFAFactors200ResponseDataAuthFactorsInner{} - return &this -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *GetMFAFactors200ResponseDataAuthFactorsInner) GetName() string { - if o == nil || isNil(o.Name) { - var ret string - return ret - } - return *o.Name -} - -// 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 *GetMFAFactors200ResponseDataAuthFactorsInner) GetNameOk() (*string, bool) { - if o == nil || isNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *GetMFAFactors200ResponseDataAuthFactorsInner) HasName() bool { - if o != nil && !isNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *GetMFAFactors200ResponseDataAuthFactorsInner) SetName(v string) { - o.Name = &v -} - -// GetFactorId returns the FactorId field value if set, zero value otherwise. -func (o *GetMFAFactors200ResponseDataAuthFactorsInner) GetFactorId() int32 { - if o == nil || isNil(o.FactorId) { - var ret int32 - return ret - } - return *o.FactorId -} - -// GetFactorIdOk returns a tuple with the FactorId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetMFAFactors200ResponseDataAuthFactorsInner) GetFactorIdOk() (*int32, bool) { - if o == nil || isNil(o.FactorId) { - return nil, false - } - return o.FactorId, true -} - -// HasFactorId returns a boolean if a field has been set. -func (o *GetMFAFactors200ResponseDataAuthFactorsInner) HasFactorId() bool { - if o != nil && !isNil(o.FactorId) { - return true - } - - return false -} - -// SetFactorId gets a reference to the given int32 and assigns it to the FactorId field. -func (o *GetMFAFactors200ResponseDataAuthFactorsInner) SetFactorId(v int32) { - o.FactorId = &v -} - -func (o GetMFAFactors200ResponseDataAuthFactorsInner) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetMFAFactors200ResponseDataAuthFactorsInner) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Name) { - toSerialize["name"] = o.Name - } - if !isNil(o.FactorId) { - toSerialize["factor_id"] = o.FactorId - } - return toSerialize, nil -} - -type NullableGetMFAFactors200ResponseDataAuthFactorsInner struct { - value *GetMFAFactors200ResponseDataAuthFactorsInner - isSet bool -} - -func (v NullableGetMFAFactors200ResponseDataAuthFactorsInner) Get() *GetMFAFactors200ResponseDataAuthFactorsInner { - return v.value -} - -func (v *NullableGetMFAFactors200ResponseDataAuthFactorsInner) Set(val *GetMFAFactors200ResponseDataAuthFactorsInner) { - v.value = val - v.isSet = true -} - -func (v NullableGetMFAFactors200ResponseDataAuthFactorsInner) IsSet() bool { - return v.isSet -} - -func (v *NullableGetMFAFactors200ResponseDataAuthFactorsInner) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetMFAFactors200ResponseDataAuthFactorsInner(val *GetMFAFactors200ResponseDataAuthFactorsInner) *NullableGetMFAFactors200ResponseDataAuthFactorsInner { - return &NullableGetMFAFactors200ResponseDataAuthFactorsInner{value: val, isSet: true} -} - -func (v NullableGetMFAFactors200ResponseDataAuthFactorsInner) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetMFAFactors200ResponseDataAuthFactorsInner) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_get_rate_limit_200_response.go b/model_get_rate_limit_200_response.go deleted file mode 100644 index 469bdeb..0000000 --- a/model_get_rate_limit_200_response.go +++ /dev/null @@ -1,162 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the GetRateLimit200Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetRateLimit200Response{} - -// GetRateLimit200Response struct for GetRateLimit200Response -type GetRateLimit200Response struct { - Status *Error `json:"status,omitempty"` - Data *RateLimit `json:"data,omitempty"` -} - -// NewGetRateLimit200Response instantiates a new GetRateLimit200Response 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 NewGetRateLimit200Response() *GetRateLimit200Response { - this := GetRateLimit200Response{} - return &this -} - -// NewGetRateLimit200ResponseWithDefaults instantiates a new GetRateLimit200Response 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 NewGetRateLimit200ResponseWithDefaults() *GetRateLimit200Response { - this := GetRateLimit200Response{} - return &this -} - -// GetStatus returns the Status field value if set, zero value otherwise. -func (o *GetRateLimit200Response) GetStatus() Error { - if o == nil || isNil(o.Status) { - var ret Error - return ret - } - return *o.Status -} - -// GetStatusOk returns a tuple with the Status field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRateLimit200Response) GetStatusOk() (*Error, bool) { - if o == nil || isNil(o.Status) { - return nil, false - } - return o.Status, true -} - -// HasStatus returns a boolean if a field has been set. -func (o *GetRateLimit200Response) HasStatus() bool { - if o != nil && !isNil(o.Status) { - return true - } - - return false -} - -// SetStatus gets a reference to the given Error and assigns it to the Status field. -func (o *GetRateLimit200Response) SetStatus(v Error) { - o.Status = &v -} - -// GetData returns the Data field value if set, zero value otherwise. -func (o *GetRateLimit200Response) GetData() RateLimit { - if o == nil || isNil(o.Data) { - var ret RateLimit - return ret - } - return *o.Data -} - -// GetDataOk returns a tuple with the Data field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRateLimit200Response) GetDataOk() (*RateLimit, bool) { - if o == nil || isNil(o.Data) { - return nil, false - } - return o.Data, true -} - -// HasData returns a boolean if a field has been set. -func (o *GetRateLimit200Response) HasData() bool { - if o != nil && !isNil(o.Data) { - return true - } - - return false -} - -// SetData gets a reference to the given RateLimit and assigns it to the Data field. -func (o *GetRateLimit200Response) SetData(v RateLimit) { - o.Data = &v -} - -func (o GetRateLimit200Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetRateLimit200Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Status) { - toSerialize["status"] = o.Status - } - if !isNil(o.Data) { - toSerialize["data"] = o.Data - } - return toSerialize, nil -} - -type NullableGetRateLimit200Response struct { - value *GetRateLimit200Response - isSet bool -} - -func (v NullableGetRateLimit200Response) Get() *GetRateLimit200Response { - return v.value -} - -func (v *NullableGetRateLimit200Response) Set(val *GetRateLimit200Response) { - v.value = val - v.isSet = true -} - -func (v NullableGetRateLimit200Response) IsSet() bool { - return v.isSet -} - -func (v *NullableGetRateLimit200Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetRateLimit200Response(val *GetRateLimit200Response) *NullableGetRateLimit200Response { - return &NullableGetRateLimit200Response{value: val, isSet: true} -} - -func (v NullableGetRateLimit200Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetRateLimit200Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_get_risk_score_200_response.go b/model_get_risk_score_200_response.go deleted file mode 100644 index f7ca01d..0000000 --- a/model_get_risk_score_200_response.go +++ /dev/null @@ -1,164 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the GetRiskScore200Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetRiskScore200Response{} - -// GetRiskScore200Response struct for GetRiskScore200Response -type GetRiskScore200Response struct { - // A risk score 0 is low risk and 100 is the highest risk level possible. - Score *float32 `json:"score,omitempty"` - // Triggers are indicators of some of the key items that influenced the risk score. - Triggers []string `json:"triggers,omitempty"` -} - -// NewGetRiskScore200Response instantiates a new GetRiskScore200Response 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 NewGetRiskScore200Response() *GetRiskScore200Response { - this := GetRiskScore200Response{} - return &this -} - -// NewGetRiskScore200ResponseWithDefaults instantiates a new GetRiskScore200Response 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 NewGetRiskScore200ResponseWithDefaults() *GetRiskScore200Response { - this := GetRiskScore200Response{} - return &this -} - -// GetScore returns the Score field value if set, zero value otherwise. -func (o *GetRiskScore200Response) GetScore() float32 { - if o == nil || isNil(o.Score) { - var ret float32 - return ret - } - return *o.Score -} - -// 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 *GetRiskScore200Response) GetScoreOk() (*float32, bool) { - if o == nil || isNil(o.Score) { - return nil, false - } - return o.Score, true -} - -// HasScore returns a boolean if a field has been set. -func (o *GetRiskScore200Response) HasScore() bool { - if o != nil && !isNil(o.Score) { - return true - } - - return false -} - -// SetScore gets a reference to the given float32 and assigns it to the Score field. -func (o *GetRiskScore200Response) SetScore(v float32) { - o.Score = &v -} - -// GetTriggers returns the Triggers field value if set, zero value otherwise. -func (o *GetRiskScore200Response) GetTriggers() []string { - if o == nil || isNil(o.Triggers) { - var ret []string - return ret - } - return o.Triggers -} - -// GetTriggersOk returns a tuple with the Triggers field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRiskScore200Response) GetTriggersOk() ([]string, bool) { - if o == nil || isNil(o.Triggers) { - return nil, false - } - return o.Triggers, true -} - -// HasTriggers returns a boolean if a field has been set. -func (o *GetRiskScore200Response) HasTriggers() bool { - if o != nil && !isNil(o.Triggers) { - return true - } - - return false -} - -// SetTriggers gets a reference to the given []string and assigns it to the Triggers field. -func (o *GetRiskScore200Response) SetTriggers(v []string) { - o.Triggers = v -} - -func (o GetRiskScore200Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetRiskScore200Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Score) { - toSerialize["score"] = o.Score - } - if !isNil(o.Triggers) { - toSerialize["triggers"] = o.Triggers - } - return toSerialize, nil -} - -type NullableGetRiskScore200Response struct { - value *GetRiskScore200Response - isSet bool -} - -func (v NullableGetRiskScore200Response) Get() *GetRiskScore200Response { - return v.value -} - -func (v *NullableGetRiskScore200Response) Set(val *GetRiskScore200Response) { - v.value = val - v.isSet = true -} - -func (v NullableGetRiskScore200Response) IsSet() bool { - return v.isSet -} - -func (v *NullableGetRiskScore200Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetRiskScore200Response(val *GetRiskScore200Response) *NullableGetRiskScore200Response { - return &NullableGetRiskScore200Response{value: val, isSet: true} -} - -func (v NullableGetRiskScore200Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetRiskScore200Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_get_risk_score_request.go b/model_get_risk_score_request.go deleted file mode 100644 index c6d8a1c..0000000 --- a/model_get_risk_score_request.go +++ /dev/null @@ -1,318 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the GetRiskScoreRequest type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetRiskScoreRequest{} - -// GetRiskScoreRequest struct for GetRiskScoreRequest -type GetRiskScoreRequest struct { - // The IP address of the User's request. - Ip string `json:"ip"` - // The user agent of the User's request. - UserAgent string `json:"user_agent"` - User RiskUser `json:"user"` - Source *Source `json:"source,omitempty"` - Session *Session `json:"session,omitempty"` - Device *RiskDevice `json:"device,omitempty"` - // Set to the value of the __tdli_fp cookie. - Fp *string `json:"fp,omitempty"` -} - -// NewGetRiskScoreRequest instantiates a new GetRiskScoreRequest 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 NewGetRiskScoreRequest(ip string, userAgent string, user RiskUser) *GetRiskScoreRequest { - this := GetRiskScoreRequest{} - this.Ip = ip - this.UserAgent = userAgent - this.User = user - return &this -} - -// NewGetRiskScoreRequestWithDefaults instantiates a new GetRiskScoreRequest 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 NewGetRiskScoreRequestWithDefaults() *GetRiskScoreRequest { - this := GetRiskScoreRequest{} - return &this -} - -// GetIp returns the Ip field value -func (o *GetRiskScoreRequest) GetIp() string { - if o == nil { - var ret string - return ret - } - - return o.Ip -} - -// GetIpOk returns a tuple with the Ip field value -// and a boolean to check if the value has been set. -func (o *GetRiskScoreRequest) GetIpOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Ip, true -} - -// SetIp sets field value -func (o *GetRiskScoreRequest) SetIp(v string) { - o.Ip = v -} - -// GetUserAgent returns the UserAgent field value -func (o *GetRiskScoreRequest) GetUserAgent() string { - if o == nil { - var ret string - return ret - } - - return o.UserAgent -} - -// GetUserAgentOk returns a tuple with the UserAgent field value -// and a boolean to check if the value has been set. -func (o *GetRiskScoreRequest) GetUserAgentOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.UserAgent, true -} - -// SetUserAgent sets field value -func (o *GetRiskScoreRequest) SetUserAgent(v string) { - o.UserAgent = v -} - -// GetUser returns the User field value -func (o *GetRiskScoreRequest) GetUser() RiskUser { - if o == nil { - var ret RiskUser - return ret - } - - return o.User -} - -// GetUserOk returns a tuple with the User field value -// and a boolean to check if the value has been set. -func (o *GetRiskScoreRequest) GetUserOk() (*RiskUser, bool) { - if o == nil { - return nil, false - } - return &o.User, true -} - -// SetUser sets field value -func (o *GetRiskScoreRequest) SetUser(v RiskUser) { - o.User = v -} - -// GetSource returns the Source field value if set, zero value otherwise. -func (o *GetRiskScoreRequest) GetSource() Source { - if o == nil || isNil(o.Source) { - var ret Source - return ret - } - return *o.Source -} - -// GetSourceOk returns a tuple with the Source field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRiskScoreRequest) GetSourceOk() (*Source, bool) { - if o == nil || isNil(o.Source) { - return nil, false - } - return o.Source, true -} - -// HasSource returns a boolean if a field has been set. -func (o *GetRiskScoreRequest) HasSource() bool { - if o != nil && !isNil(o.Source) { - return true - } - - return false -} - -// SetSource gets a reference to the given Source and assigns it to the Source field. -func (o *GetRiskScoreRequest) SetSource(v Source) { - o.Source = &v -} - -// GetSession returns the Session field value if set, zero value otherwise. -func (o *GetRiskScoreRequest) GetSession() Session { - if o == nil || isNil(o.Session) { - var ret Session - return ret - } - return *o.Session -} - -// GetSessionOk returns a tuple with the Session field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRiskScoreRequest) GetSessionOk() (*Session, bool) { - if o == nil || isNil(o.Session) { - return nil, false - } - return o.Session, true -} - -// HasSession returns a boolean if a field has been set. -func (o *GetRiskScoreRequest) HasSession() bool { - if o != nil && !isNil(o.Session) { - return true - } - - return false -} - -// SetSession gets a reference to the given Session and assigns it to the Session field. -func (o *GetRiskScoreRequest) SetSession(v Session) { - o.Session = &v -} - -// GetDevice returns the Device field value if set, zero value otherwise. -func (o *GetRiskScoreRequest) GetDevice() RiskDevice { - if o == nil || isNil(o.Device) { - var ret RiskDevice - return ret - } - return *o.Device -} - -// GetDeviceOk returns a tuple with the Device field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRiskScoreRequest) GetDeviceOk() (*RiskDevice, bool) { - if o == nil || isNil(o.Device) { - return nil, false - } - return o.Device, true -} - -// HasDevice returns a boolean if a field has been set. -func (o *GetRiskScoreRequest) HasDevice() bool { - if o != nil && !isNil(o.Device) { - return true - } - - return false -} - -// SetDevice gets a reference to the given RiskDevice and assigns it to the Device field. -func (o *GetRiskScoreRequest) SetDevice(v RiskDevice) { - o.Device = &v -} - -// GetFp returns the Fp field value if set, zero value otherwise. -func (o *GetRiskScoreRequest) GetFp() string { - if o == nil || isNil(o.Fp) { - var ret string - return ret - } - return *o.Fp -} - -// GetFpOk returns a tuple with the Fp field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRiskScoreRequest) GetFpOk() (*string, bool) { - if o == nil || isNil(o.Fp) { - return nil, false - } - return o.Fp, true -} - -// HasFp returns a boolean if a field has been set. -func (o *GetRiskScoreRequest) HasFp() bool { - if o != nil && !isNil(o.Fp) { - return true - } - - return false -} - -// SetFp gets a reference to the given string and assigns it to the Fp field. -func (o *GetRiskScoreRequest) SetFp(v string) { - o.Fp = &v -} - -func (o GetRiskScoreRequest) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetRiskScoreRequest) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["ip"] = o.Ip - toSerialize["user_agent"] = o.UserAgent - toSerialize["user"] = o.User - if !isNil(o.Source) { - toSerialize["source"] = o.Source - } - if !isNil(o.Session) { - toSerialize["session"] = o.Session - } - if !isNil(o.Device) { - toSerialize["device"] = o.Device - } - if !isNil(o.Fp) { - toSerialize["fp"] = o.Fp - } - return toSerialize, nil -} - -type NullableGetRiskScoreRequest struct { - value *GetRiskScoreRequest - isSet bool -} - -func (v NullableGetRiskScoreRequest) Get() *GetRiskScoreRequest { - return v.value -} - -func (v *NullableGetRiskScoreRequest) Set(val *GetRiskScoreRequest) { - v.value = val - v.isSet = true -} - -func (v NullableGetRiskScoreRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableGetRiskScoreRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetRiskScoreRequest(val *GetRiskScoreRequest) *NullableGetRiskScoreRequest { - return &NullableGetRiskScoreRequest{value: val, isSet: true} -} - -func (v NullableGetRiskScoreRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetRiskScoreRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_get_risk_scores_200_response.go b/model_get_risk_scores_200_response.go deleted file mode 100644 index 82f45ce..0000000 --- a/model_get_risk_scores_200_response.go +++ /dev/null @@ -1,162 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the GetRiskScores200Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetRiskScores200Response{} - -// GetRiskScores200Response struct for GetRiskScores200Response -type GetRiskScores200Response struct { - Scores *GetRiskScores200ResponseScores `json:"scores,omitempty"` - Total *int32 `json:"total,omitempty"` -} - -// NewGetRiskScores200Response instantiates a new GetRiskScores200Response 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 NewGetRiskScores200Response() *GetRiskScores200Response { - this := GetRiskScores200Response{} - return &this -} - -// NewGetRiskScores200ResponseWithDefaults instantiates a new GetRiskScores200Response 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 NewGetRiskScores200ResponseWithDefaults() *GetRiskScores200Response { - this := GetRiskScores200Response{} - return &this -} - -// GetScores returns the Scores field value if set, zero value otherwise. -func (o *GetRiskScores200Response) GetScores() GetRiskScores200ResponseScores { - if o == nil || isNil(o.Scores) { - var ret GetRiskScores200ResponseScores - return ret - } - return *o.Scores -} - -// GetScoresOk returns a tuple with the Scores field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRiskScores200Response) GetScoresOk() (*GetRiskScores200ResponseScores, bool) { - if o == nil || isNil(o.Scores) { - return nil, false - } - return o.Scores, true -} - -// HasScores returns a boolean if a field has been set. -func (o *GetRiskScores200Response) HasScores() bool { - if o != nil && !isNil(o.Scores) { - return true - } - - return false -} - -// SetScores gets a reference to the given GetRiskScores200ResponseScores and assigns it to the Scores field. -func (o *GetRiskScores200Response) SetScores(v GetRiskScores200ResponseScores) { - o.Scores = &v -} - -// GetTotal returns the Total field value if set, zero value otherwise. -func (o *GetRiskScores200Response) GetTotal() int32 { - if o == nil || isNil(o.Total) { - var ret int32 - return ret - } - return *o.Total -} - -// GetTotalOk returns a tuple with the Total field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRiskScores200Response) GetTotalOk() (*int32, bool) { - if o == nil || isNil(o.Total) { - return nil, false - } - return o.Total, true -} - -// HasTotal returns a boolean if a field has been set. -func (o *GetRiskScores200Response) HasTotal() bool { - if o != nil && !isNil(o.Total) { - return true - } - - return false -} - -// SetTotal gets a reference to the given int32 and assigns it to the Total field. -func (o *GetRiskScores200Response) SetTotal(v int32) { - o.Total = &v -} - -func (o GetRiskScores200Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetRiskScores200Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Scores) { - toSerialize["scores"] = o.Scores - } - if !isNil(o.Total) { - toSerialize["total"] = o.Total - } - return toSerialize, nil -} - -type NullableGetRiskScores200Response struct { - value *GetRiskScores200Response - isSet bool -} - -func (v NullableGetRiskScores200Response) Get() *GetRiskScores200Response { - return v.value -} - -func (v *NullableGetRiskScores200Response) Set(val *GetRiskScores200Response) { - v.value = val - v.isSet = true -} - -func (v NullableGetRiskScores200Response) IsSet() bool { - return v.isSet -} - -func (v *NullableGetRiskScores200Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetRiskScores200Response(val *GetRiskScores200Response) *NullableGetRiskScores200Response { - return &NullableGetRiskScores200Response{value: val, isSet: true} -} - -func (v NullableGetRiskScores200Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetRiskScores200Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_get_risk_scores_200_response_scores.go b/model_get_risk_scores_200_response_scores.go deleted file mode 100644 index c7be6a0..0000000 --- a/model_get_risk_scores_200_response_scores.go +++ /dev/null @@ -1,270 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the GetRiskScores200ResponseScores type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetRiskScores200ResponseScores{} - -// GetRiskScores200ResponseScores struct for GetRiskScores200ResponseScores -type GetRiskScores200ResponseScores struct { - Minimal *int32 `json:"minimal,omitempty"` - Low *int32 `json:"low,omitempty"` - Medium *int32 `json:"medium,omitempty"` - High *int32 `json:"high,omitempty"` - VeryHigh *int32 `json:"very_high,omitempty"` -} - -// NewGetRiskScores200ResponseScores instantiates a new GetRiskScores200ResponseScores 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 NewGetRiskScores200ResponseScores() *GetRiskScores200ResponseScores { - this := GetRiskScores200ResponseScores{} - return &this -} - -// NewGetRiskScores200ResponseScoresWithDefaults instantiates a new GetRiskScores200ResponseScores 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 NewGetRiskScores200ResponseScoresWithDefaults() *GetRiskScores200ResponseScores { - this := GetRiskScores200ResponseScores{} - return &this -} - -// GetMinimal returns the Minimal field value if set, zero value otherwise. -func (o *GetRiskScores200ResponseScores) GetMinimal() int32 { - if o == nil || isNil(o.Minimal) { - var ret int32 - return ret - } - return *o.Minimal -} - -// GetMinimalOk returns a tuple with the Minimal field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRiskScores200ResponseScores) GetMinimalOk() (*int32, bool) { - if o == nil || isNil(o.Minimal) { - return nil, false - } - return o.Minimal, true -} - -// HasMinimal returns a boolean if a field has been set. -func (o *GetRiskScores200ResponseScores) HasMinimal() bool { - if o != nil && !isNil(o.Minimal) { - return true - } - - return false -} - -// SetMinimal gets a reference to the given int32 and assigns it to the Minimal field. -func (o *GetRiskScores200ResponseScores) SetMinimal(v int32) { - o.Minimal = &v -} - -// GetLow returns the Low field value if set, zero value otherwise. -func (o *GetRiskScores200ResponseScores) GetLow() int32 { - if o == nil || isNil(o.Low) { - var ret int32 - return ret - } - return *o.Low -} - -// GetLowOk returns a tuple with the Low field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRiskScores200ResponseScores) GetLowOk() (*int32, bool) { - if o == nil || isNil(o.Low) { - return nil, false - } - return o.Low, true -} - -// HasLow returns a boolean if a field has been set. -func (o *GetRiskScores200ResponseScores) HasLow() bool { - if o != nil && !isNil(o.Low) { - return true - } - - return false -} - -// SetLow gets a reference to the given int32 and assigns it to the Low field. -func (o *GetRiskScores200ResponseScores) SetLow(v int32) { - o.Low = &v -} - -// GetMedium returns the Medium field value if set, zero value otherwise. -func (o *GetRiskScores200ResponseScores) GetMedium() int32 { - if o == nil || isNil(o.Medium) { - var ret int32 - return ret - } - return *o.Medium -} - -// GetMediumOk returns a tuple with the Medium field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRiskScores200ResponseScores) GetMediumOk() (*int32, bool) { - if o == nil || isNil(o.Medium) { - return nil, false - } - return o.Medium, true -} - -// HasMedium returns a boolean if a field has been set. -func (o *GetRiskScores200ResponseScores) HasMedium() bool { - if o != nil && !isNil(o.Medium) { - return true - } - - return false -} - -// SetMedium gets a reference to the given int32 and assigns it to the Medium field. -func (o *GetRiskScores200ResponseScores) SetMedium(v int32) { - o.Medium = &v -} - -// GetHigh returns the High field value if set, zero value otherwise. -func (o *GetRiskScores200ResponseScores) GetHigh() int32 { - if o == nil || isNil(o.High) { - var ret int32 - return ret - } - return *o.High -} - -// GetHighOk returns a tuple with the High field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRiskScores200ResponseScores) GetHighOk() (*int32, bool) { - if o == nil || isNil(o.High) { - return nil, false - } - return o.High, true -} - -// HasHigh returns a boolean if a field has been set. -func (o *GetRiskScores200ResponseScores) HasHigh() bool { - if o != nil && !isNil(o.High) { - return true - } - - return false -} - -// SetHigh gets a reference to the given int32 and assigns it to the High field. -func (o *GetRiskScores200ResponseScores) SetHigh(v int32) { - o.High = &v -} - -// GetVeryHigh returns the VeryHigh field value if set, zero value otherwise. -func (o *GetRiskScores200ResponseScores) GetVeryHigh() int32 { - if o == nil || isNil(o.VeryHigh) { - var ret int32 - return ret - } - return *o.VeryHigh -} - -// GetVeryHighOk returns a tuple with the VeryHigh field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRiskScores200ResponseScores) GetVeryHighOk() (*int32, bool) { - if o == nil || isNil(o.VeryHigh) { - return nil, false - } - return o.VeryHigh, true -} - -// HasVeryHigh returns a boolean if a field has been set. -func (o *GetRiskScores200ResponseScores) HasVeryHigh() bool { - if o != nil && !isNil(o.VeryHigh) { - return true - } - - return false -} - -// SetVeryHigh gets a reference to the given int32 and assigns it to the VeryHigh field. -func (o *GetRiskScores200ResponseScores) SetVeryHigh(v int32) { - o.VeryHigh = &v -} - -func (o GetRiskScores200ResponseScores) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetRiskScores200ResponseScores) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Minimal) { - toSerialize["minimal"] = o.Minimal - } - if !isNil(o.Low) { - toSerialize["low"] = o.Low - } - if !isNil(o.Medium) { - toSerialize["medium"] = o.Medium - } - if !isNil(o.High) { - toSerialize["high"] = o.High - } - if !isNil(o.VeryHigh) { - toSerialize["very_high"] = o.VeryHigh - } - return toSerialize, nil -} - -type NullableGetRiskScores200ResponseScores struct { - value *GetRiskScores200ResponseScores - isSet bool -} - -func (v NullableGetRiskScores200ResponseScores) Get() *GetRiskScores200ResponseScores { - return v.value -} - -func (v *NullableGetRiskScores200ResponseScores) Set(val *GetRiskScores200ResponseScores) { - v.value = val - v.isSet = true -} - -func (v NullableGetRiskScores200ResponseScores) IsSet() bool { - return v.isSet -} - -func (v *NullableGetRiskScores200ResponseScores) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetRiskScores200ResponseScores(val *GetRiskScores200ResponseScores) *NullableGetRiskScores200ResponseScores { - return &NullableGetRiskScores200ResponseScores{value: val, isSet: true} -} - -func (v NullableGetRiskScores200ResponseScores) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetRiskScores200ResponseScores) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_get_role_apps_200_response_inner.go b/model_get_role_apps_200_response_inner.go deleted file mode 100644 index 264da47..0000000 --- a/model_get_role_apps_200_response_inner.go +++ /dev/null @@ -1,201 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the GetRoleApps200ResponseInner type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetRoleApps200ResponseInner{} - -// GetRoleApps200ResponseInner struct for GetRoleApps200ResponseInner -type GetRoleApps200ResponseInner struct { - // app id - Id *int32 `json:"id,omitempty"` - // app name - Name *string `json:"name,omitempty"` - // url of Icon - IconUrl *string `json:"icon_url,omitempty"` -} - -// NewGetRoleApps200ResponseInner instantiates a new GetRoleApps200ResponseInner 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 NewGetRoleApps200ResponseInner() *GetRoleApps200ResponseInner { - this := GetRoleApps200ResponseInner{} - return &this -} - -// NewGetRoleApps200ResponseInnerWithDefaults instantiates a new GetRoleApps200ResponseInner 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 NewGetRoleApps200ResponseInnerWithDefaults() *GetRoleApps200ResponseInner { - this := GetRoleApps200ResponseInner{} - return &this -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *GetRoleApps200ResponseInner) GetId() int32 { - if o == nil || isNil(o.Id) { - var ret int32 - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRoleApps200ResponseInner) GetIdOk() (*int32, bool) { - if o == nil || isNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *GetRoleApps200ResponseInner) HasId() bool { - if o != nil && !isNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given int32 and assigns it to the Id field. -func (o *GetRoleApps200ResponseInner) SetId(v int32) { - o.Id = &v -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *GetRoleApps200ResponseInner) GetName() string { - if o == nil || isNil(o.Name) { - var ret string - return ret - } - return *o.Name -} - -// 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 *GetRoleApps200ResponseInner) GetNameOk() (*string, bool) { - if o == nil || isNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *GetRoleApps200ResponseInner) HasName() bool { - if o != nil && !isNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *GetRoleApps200ResponseInner) SetName(v string) { - o.Name = &v -} - -// GetIconUrl returns the IconUrl field value if set, zero value otherwise. -func (o *GetRoleApps200ResponseInner) GetIconUrl() string { - if o == nil || isNil(o.IconUrl) { - var ret string - return ret - } - return *o.IconUrl -} - -// 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 *GetRoleApps200ResponseInner) GetIconUrlOk() (*string, bool) { - if o == nil || isNil(o.IconUrl) { - return nil, false - } - return o.IconUrl, true -} - -// HasIconUrl returns a boolean if a field has been set. -func (o *GetRoleApps200ResponseInner) HasIconUrl() bool { - if o != nil && !isNil(o.IconUrl) { - return true - } - - return false -} - -// SetIconUrl gets a reference to the given string and assigns it to the IconUrl field. -func (o *GetRoleApps200ResponseInner) SetIconUrl(v string) { - o.IconUrl = &v -} - -func (o GetRoleApps200ResponseInner) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetRoleApps200ResponseInner) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Id) { - toSerialize["id"] = o.Id - } - if !isNil(o.Name) { - toSerialize["name"] = o.Name - } - if !isNil(o.IconUrl) { - toSerialize["icon_url"] = o.IconUrl - } - return toSerialize, nil -} - -type NullableGetRoleApps200ResponseInner struct { - value *GetRoleApps200ResponseInner - isSet bool -} - -func (v NullableGetRoleApps200ResponseInner) Get() *GetRoleApps200ResponseInner { - return v.value -} - -func (v *NullableGetRoleApps200ResponseInner) Set(val *GetRoleApps200ResponseInner) { - v.value = val - v.isSet = true -} - -func (v NullableGetRoleApps200ResponseInner) IsSet() bool { - return v.isSet -} - -func (v *NullableGetRoleApps200ResponseInner) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetRoleApps200ResponseInner(val *GetRoleApps200ResponseInner) *NullableGetRoleApps200ResponseInner { - return &NullableGetRoleApps200ResponseInner{value: val, isSet: true} -} - -func (v NullableGetRoleApps200ResponseInner) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetRoleApps200ResponseInner) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_get_role_by_id_200_response.go b/model_get_role_by_id_200_response.go deleted file mode 100644 index 9d67307..0000000 --- a/model_get_role_by_id_200_response.go +++ /dev/null @@ -1,162 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the GetRoleById200Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetRoleById200Response{} - -// GetRoleById200Response struct for GetRoleById200Response -type GetRoleById200Response struct { - Status *Error `json:"status,omitempty"` - Data []GetRoleById200ResponseDataInner `json:"data,omitempty"` -} - -// NewGetRoleById200Response instantiates a new GetRoleById200Response 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 NewGetRoleById200Response() *GetRoleById200Response { - this := GetRoleById200Response{} - return &this -} - -// NewGetRoleById200ResponseWithDefaults instantiates a new GetRoleById200Response 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 NewGetRoleById200ResponseWithDefaults() *GetRoleById200Response { - this := GetRoleById200Response{} - return &this -} - -// GetStatus returns the Status field value if set, zero value otherwise. -func (o *GetRoleById200Response) GetStatus() Error { - if o == nil || isNil(o.Status) { - var ret Error - return ret - } - return *o.Status -} - -// GetStatusOk returns a tuple with the Status field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRoleById200Response) GetStatusOk() (*Error, bool) { - if o == nil || isNil(o.Status) { - return nil, false - } - return o.Status, true -} - -// HasStatus returns a boolean if a field has been set. -func (o *GetRoleById200Response) HasStatus() bool { - if o != nil && !isNil(o.Status) { - return true - } - - return false -} - -// SetStatus gets a reference to the given Error and assigns it to the Status field. -func (o *GetRoleById200Response) SetStatus(v Error) { - o.Status = &v -} - -// GetData returns the Data field value if set, zero value otherwise. -func (o *GetRoleById200Response) GetData() []GetRoleById200ResponseDataInner { - if o == nil || isNil(o.Data) { - var ret []GetRoleById200ResponseDataInner - return ret - } - return o.Data -} - -// GetDataOk returns a tuple with the Data field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRoleById200Response) GetDataOk() ([]GetRoleById200ResponseDataInner, bool) { - if o == nil || isNil(o.Data) { - return nil, false - } - return o.Data, true -} - -// HasData returns a boolean if a field has been set. -func (o *GetRoleById200Response) HasData() bool { - if o != nil && !isNil(o.Data) { - return true - } - - return false -} - -// SetData gets a reference to the given []GetRoleById200ResponseDataInner and assigns it to the Data field. -func (o *GetRoleById200Response) SetData(v []GetRoleById200ResponseDataInner) { - o.Data = v -} - -func (o GetRoleById200Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetRoleById200Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Status) { - toSerialize["status"] = o.Status - } - if !isNil(o.Data) { - toSerialize["data"] = o.Data - } - return toSerialize, nil -} - -type NullableGetRoleById200Response struct { - value *GetRoleById200Response - isSet bool -} - -func (v NullableGetRoleById200Response) Get() *GetRoleById200Response { - return v.value -} - -func (v *NullableGetRoleById200Response) Set(val *GetRoleById200Response) { - v.value = val - v.isSet = true -} - -func (v NullableGetRoleById200Response) IsSet() bool { - return v.isSet -} - -func (v *NullableGetRoleById200Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetRoleById200Response(val *GetRoleById200Response) *NullableGetRoleById200Response { - return &NullableGetRoleById200Response{value: val, isSet: true} -} - -func (v NullableGetRoleById200Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetRoleById200Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_get_role_by_id_200_response_data_inner.go b/model_get_role_by_id_200_response_data_inner.go deleted file mode 100644 index f977ed3..0000000 --- a/model_get_role_by_id_200_response_data_inner.go +++ /dev/null @@ -1,164 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the GetRoleById200ResponseDataInner type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetRoleById200ResponseDataInner{} - -// GetRoleById200ResponseDataInner struct for GetRoleById200ResponseDataInner -type GetRoleById200ResponseDataInner struct { - // role's unique ID in Onelogin - Id *int32 `json:"id,omitempty"` - // Role name - Name *string `json:"name,omitempty"` -} - -// NewGetRoleById200ResponseDataInner instantiates a new GetRoleById200ResponseDataInner 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 NewGetRoleById200ResponseDataInner() *GetRoleById200ResponseDataInner { - this := GetRoleById200ResponseDataInner{} - return &this -} - -// NewGetRoleById200ResponseDataInnerWithDefaults instantiates a new GetRoleById200ResponseDataInner 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 NewGetRoleById200ResponseDataInnerWithDefaults() *GetRoleById200ResponseDataInner { - this := GetRoleById200ResponseDataInner{} - return &this -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *GetRoleById200ResponseDataInner) GetId() int32 { - if o == nil || isNil(o.Id) { - var ret int32 - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRoleById200ResponseDataInner) GetIdOk() (*int32, bool) { - if o == nil || isNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *GetRoleById200ResponseDataInner) HasId() bool { - if o != nil && !isNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given int32 and assigns it to the Id field. -func (o *GetRoleById200ResponseDataInner) SetId(v int32) { - o.Id = &v -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *GetRoleById200ResponseDataInner) GetName() string { - if o == nil || isNil(o.Name) { - var ret string - return ret - } - return *o.Name -} - -// 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 *GetRoleById200ResponseDataInner) GetNameOk() (*string, bool) { - if o == nil || isNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *GetRoleById200ResponseDataInner) HasName() bool { - if o != nil && !isNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *GetRoleById200ResponseDataInner) SetName(v string) { - o.Name = &v -} - -func (o GetRoleById200ResponseDataInner) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetRoleById200ResponseDataInner) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Id) { - toSerialize["id"] = o.Id - } - if !isNil(o.Name) { - toSerialize["name"] = o.Name - } - return toSerialize, nil -} - -type NullableGetRoleById200ResponseDataInner struct { - value *GetRoleById200ResponseDataInner - isSet bool -} - -func (v NullableGetRoleById200ResponseDataInner) Get() *GetRoleById200ResponseDataInner { - return v.value -} - -func (v *NullableGetRoleById200ResponseDataInner) Set(val *GetRoleById200ResponseDataInner) { - v.value = val - v.isSet = true -} - -func (v NullableGetRoleById200ResponseDataInner) IsSet() bool { - return v.isSet -} - -func (v *NullableGetRoleById200ResponseDataInner) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetRoleById200ResponseDataInner(val *GetRoleById200ResponseDataInner) *NullableGetRoleById200ResponseDataInner { - return &NullableGetRoleById200ResponseDataInner{value: val, isSet: true} -} - -func (v NullableGetRoleById200ResponseDataInner) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetRoleById200ResponseDataInner) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_get_role_by_name_200_response.go b/model_get_role_by_name_200_response.go deleted file mode 100644 index 5828542..0000000 --- a/model_get_role_by_name_200_response.go +++ /dev/null @@ -1,198 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the GetRoleByName200Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetRoleByName200Response{} - -// GetRoleByName200Response struct for GetRoleByName200Response -type GetRoleByName200Response struct { - Status *Error `json:"status,omitempty"` - Pagination *GetRoleByName200ResponsePagination `json:"pagination,omitempty"` - Data []GetRoleByName200ResponseDataInner `json:"data,omitempty"` -} - -// NewGetRoleByName200Response instantiates a new GetRoleByName200Response 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 NewGetRoleByName200Response() *GetRoleByName200Response { - this := GetRoleByName200Response{} - return &this -} - -// NewGetRoleByName200ResponseWithDefaults instantiates a new GetRoleByName200Response 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 NewGetRoleByName200ResponseWithDefaults() *GetRoleByName200Response { - this := GetRoleByName200Response{} - return &this -} - -// GetStatus returns the Status field value if set, zero value otherwise. -func (o *GetRoleByName200Response) GetStatus() Error { - if o == nil || isNil(o.Status) { - var ret Error - return ret - } - return *o.Status -} - -// GetStatusOk returns a tuple with the Status field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRoleByName200Response) GetStatusOk() (*Error, bool) { - if o == nil || isNil(o.Status) { - return nil, false - } - return o.Status, true -} - -// HasStatus returns a boolean if a field has been set. -func (o *GetRoleByName200Response) HasStatus() bool { - if o != nil && !isNil(o.Status) { - return true - } - - return false -} - -// SetStatus gets a reference to the given Error and assigns it to the Status field. -func (o *GetRoleByName200Response) SetStatus(v Error) { - o.Status = &v -} - -// GetPagination returns the Pagination field value if set, zero value otherwise. -func (o *GetRoleByName200Response) GetPagination() GetRoleByName200ResponsePagination { - if o == nil || isNil(o.Pagination) { - var ret GetRoleByName200ResponsePagination - return ret - } - return *o.Pagination -} - -// GetPaginationOk returns a tuple with the Pagination field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRoleByName200Response) GetPaginationOk() (*GetRoleByName200ResponsePagination, bool) { - if o == nil || isNil(o.Pagination) { - return nil, false - } - return o.Pagination, true -} - -// HasPagination returns a boolean if a field has been set. -func (o *GetRoleByName200Response) HasPagination() bool { - if o != nil && !isNil(o.Pagination) { - return true - } - - return false -} - -// SetPagination gets a reference to the given GetRoleByName200ResponsePagination and assigns it to the Pagination field. -func (o *GetRoleByName200Response) SetPagination(v GetRoleByName200ResponsePagination) { - o.Pagination = &v -} - -// GetData returns the Data field value if set, zero value otherwise. -func (o *GetRoleByName200Response) GetData() []GetRoleByName200ResponseDataInner { - if o == nil || isNil(o.Data) { - var ret []GetRoleByName200ResponseDataInner - return ret - } - return o.Data -} - -// GetDataOk returns a tuple with the Data field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRoleByName200Response) GetDataOk() ([]GetRoleByName200ResponseDataInner, bool) { - if o == nil || isNil(o.Data) { - return nil, false - } - return o.Data, true -} - -// HasData returns a boolean if a field has been set. -func (o *GetRoleByName200Response) HasData() bool { - if o != nil && !isNil(o.Data) { - return true - } - - return false -} - -// SetData gets a reference to the given []GetRoleByName200ResponseDataInner and assigns it to the Data field. -func (o *GetRoleByName200Response) SetData(v []GetRoleByName200ResponseDataInner) { - o.Data = v -} - -func (o GetRoleByName200Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetRoleByName200Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Status) { - toSerialize["status"] = o.Status - } - if !isNil(o.Pagination) { - toSerialize["pagination"] = o.Pagination - } - if !isNil(o.Data) { - toSerialize["data"] = o.Data - } - return toSerialize, nil -} - -type NullableGetRoleByName200Response struct { - value *GetRoleByName200Response - isSet bool -} - -func (v NullableGetRoleByName200Response) Get() *GetRoleByName200Response { - return v.value -} - -func (v *NullableGetRoleByName200Response) Set(val *GetRoleByName200Response) { - v.value = val - v.isSet = true -} - -func (v NullableGetRoleByName200Response) IsSet() bool { - return v.isSet -} - -func (v *NullableGetRoleByName200Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetRoleByName200Response(val *GetRoleByName200Response) *NullableGetRoleByName200Response { - return &NullableGetRoleByName200Response{value: val, isSet: true} -} - -func (v NullableGetRoleByName200Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetRoleByName200Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_get_role_by_name_200_response_data_inner.go b/model_get_role_by_name_200_response_data_inner.go deleted file mode 100644 index 037f047..0000000 --- a/model_get_role_by_name_200_response_data_inner.go +++ /dev/null @@ -1,164 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the GetRoleByName200ResponseDataInner type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetRoleByName200ResponseDataInner{} - -// GetRoleByName200ResponseDataInner struct for GetRoleByName200ResponseDataInner -type GetRoleByName200ResponseDataInner struct { - // Role ID - Id *int32 `json:"id,omitempty"` - // Role Name - Name *string `json:"name,omitempty"` -} - -// NewGetRoleByName200ResponseDataInner instantiates a new GetRoleByName200ResponseDataInner 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 NewGetRoleByName200ResponseDataInner() *GetRoleByName200ResponseDataInner { - this := GetRoleByName200ResponseDataInner{} - return &this -} - -// NewGetRoleByName200ResponseDataInnerWithDefaults instantiates a new GetRoleByName200ResponseDataInner 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 NewGetRoleByName200ResponseDataInnerWithDefaults() *GetRoleByName200ResponseDataInner { - this := GetRoleByName200ResponseDataInner{} - return &this -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *GetRoleByName200ResponseDataInner) GetId() int32 { - if o == nil || isNil(o.Id) { - var ret int32 - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRoleByName200ResponseDataInner) GetIdOk() (*int32, bool) { - if o == nil || isNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *GetRoleByName200ResponseDataInner) HasId() bool { - if o != nil && !isNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given int32 and assigns it to the Id field. -func (o *GetRoleByName200ResponseDataInner) SetId(v int32) { - o.Id = &v -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *GetRoleByName200ResponseDataInner) GetName() string { - if o == nil || isNil(o.Name) { - var ret string - return ret - } - return *o.Name -} - -// 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 *GetRoleByName200ResponseDataInner) GetNameOk() (*string, bool) { - if o == nil || isNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *GetRoleByName200ResponseDataInner) HasName() bool { - if o != nil && !isNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *GetRoleByName200ResponseDataInner) SetName(v string) { - o.Name = &v -} - -func (o GetRoleByName200ResponseDataInner) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetRoleByName200ResponseDataInner) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Id) { - toSerialize["id"] = o.Id - } - if !isNil(o.Name) { - toSerialize["name"] = o.Name - } - return toSerialize, nil -} - -type NullableGetRoleByName200ResponseDataInner struct { - value *GetRoleByName200ResponseDataInner - isSet bool -} - -func (v NullableGetRoleByName200ResponseDataInner) Get() *GetRoleByName200ResponseDataInner { - return v.value -} - -func (v *NullableGetRoleByName200ResponseDataInner) Set(val *GetRoleByName200ResponseDataInner) { - v.value = val - v.isSet = true -} - -func (v NullableGetRoleByName200ResponseDataInner) IsSet() bool { - return v.isSet -} - -func (v *NullableGetRoleByName200ResponseDataInner) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetRoleByName200ResponseDataInner(val *GetRoleByName200ResponseDataInner) *NullableGetRoleByName200ResponseDataInner { - return &NullableGetRoleByName200ResponseDataInner{value: val, isSet: true} -} - -func (v NullableGetRoleByName200ResponseDataInner) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetRoleByName200ResponseDataInner) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_get_role_by_name_200_response_pagination.go b/model_get_role_by_name_200_response_pagination.go deleted file mode 100644 index df044a9..0000000 --- a/model_get_role_by_name_200_response_pagination.go +++ /dev/null @@ -1,234 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the GetRoleByName200ResponsePagination type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetRoleByName200ResponsePagination{} - -// GetRoleByName200ResponsePagination struct for GetRoleByName200ResponsePagination -type GetRoleByName200ResponsePagination struct { - AfterCursor *string `json:"after_cursor,omitempty"` - BeforeCursor *string `json:"before_cursor,omitempty"` - NextLink *string `json:"next_link,omitempty"` - PreviousLink *string `json:"previous_link,omitempty"` -} - -// NewGetRoleByName200ResponsePagination instantiates a new GetRoleByName200ResponsePagination 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 NewGetRoleByName200ResponsePagination() *GetRoleByName200ResponsePagination { - this := GetRoleByName200ResponsePagination{} - return &this -} - -// NewGetRoleByName200ResponsePaginationWithDefaults instantiates a new GetRoleByName200ResponsePagination 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 NewGetRoleByName200ResponsePaginationWithDefaults() *GetRoleByName200ResponsePagination { - this := GetRoleByName200ResponsePagination{} - return &this -} - -// GetAfterCursor returns the AfterCursor field value if set, zero value otherwise. -func (o *GetRoleByName200ResponsePagination) GetAfterCursor() string { - if o == nil || isNil(o.AfterCursor) { - var ret string - return ret - } - return *o.AfterCursor -} - -// GetAfterCursorOk returns a tuple with the AfterCursor field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRoleByName200ResponsePagination) GetAfterCursorOk() (*string, bool) { - if o == nil || isNil(o.AfterCursor) { - return nil, false - } - return o.AfterCursor, true -} - -// HasAfterCursor returns a boolean if a field has been set. -func (o *GetRoleByName200ResponsePagination) HasAfterCursor() bool { - if o != nil && !isNil(o.AfterCursor) { - return true - } - - return false -} - -// SetAfterCursor gets a reference to the given string and assigns it to the AfterCursor field. -func (o *GetRoleByName200ResponsePagination) SetAfterCursor(v string) { - o.AfterCursor = &v -} - -// GetBeforeCursor returns the BeforeCursor field value if set, zero value otherwise. -func (o *GetRoleByName200ResponsePagination) GetBeforeCursor() string { - if o == nil || isNil(o.BeforeCursor) { - var ret string - return ret - } - return *o.BeforeCursor -} - -// GetBeforeCursorOk returns a tuple with the BeforeCursor field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRoleByName200ResponsePagination) GetBeforeCursorOk() (*string, bool) { - if o == nil || isNil(o.BeforeCursor) { - return nil, false - } - return o.BeforeCursor, true -} - -// HasBeforeCursor returns a boolean if a field has been set. -func (o *GetRoleByName200ResponsePagination) HasBeforeCursor() bool { - if o != nil && !isNil(o.BeforeCursor) { - return true - } - - return false -} - -// SetBeforeCursor gets a reference to the given string and assigns it to the BeforeCursor field. -func (o *GetRoleByName200ResponsePagination) SetBeforeCursor(v string) { - o.BeforeCursor = &v -} - -// GetNextLink returns the NextLink field value if set, zero value otherwise. -func (o *GetRoleByName200ResponsePagination) GetNextLink() string { - if o == nil || isNil(o.NextLink) { - var ret string - return ret - } - return *o.NextLink -} - -// GetNextLinkOk returns a tuple with the NextLink field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRoleByName200ResponsePagination) GetNextLinkOk() (*string, bool) { - if o == nil || isNil(o.NextLink) { - return nil, false - } - return o.NextLink, true -} - -// HasNextLink returns a boolean if a field has been set. -func (o *GetRoleByName200ResponsePagination) HasNextLink() bool { - if o != nil && !isNil(o.NextLink) { - return true - } - - return false -} - -// SetNextLink gets a reference to the given string and assigns it to the NextLink field. -func (o *GetRoleByName200ResponsePagination) SetNextLink(v string) { - o.NextLink = &v -} - -// GetPreviousLink returns the PreviousLink field value if set, zero value otherwise. -func (o *GetRoleByName200ResponsePagination) GetPreviousLink() string { - if o == nil || isNil(o.PreviousLink) { - var ret string - return ret - } - return *o.PreviousLink -} - -// GetPreviousLinkOk returns a tuple with the PreviousLink field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetRoleByName200ResponsePagination) GetPreviousLinkOk() (*string, bool) { - if o == nil || isNil(o.PreviousLink) { - return nil, false - } - return o.PreviousLink, true -} - -// HasPreviousLink returns a boolean if a field has been set. -func (o *GetRoleByName200ResponsePagination) HasPreviousLink() bool { - if o != nil && !isNil(o.PreviousLink) { - return true - } - - return false -} - -// SetPreviousLink gets a reference to the given string and assigns it to the PreviousLink field. -func (o *GetRoleByName200ResponsePagination) SetPreviousLink(v string) { - o.PreviousLink = &v -} - -func (o GetRoleByName200ResponsePagination) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetRoleByName200ResponsePagination) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.AfterCursor) { - toSerialize["after_cursor"] = o.AfterCursor - } - if !isNil(o.BeforeCursor) { - toSerialize["before_cursor"] = o.BeforeCursor - } - if !isNil(o.NextLink) { - toSerialize["next_link"] = o.NextLink - } - if !isNil(o.PreviousLink) { - toSerialize["previous_link"] = o.PreviousLink - } - return toSerialize, nil -} - -type NullableGetRoleByName200ResponsePagination struct { - value *GetRoleByName200ResponsePagination - isSet bool -} - -func (v NullableGetRoleByName200ResponsePagination) Get() *GetRoleByName200ResponsePagination { - return v.value -} - -func (v *NullableGetRoleByName200ResponsePagination) Set(val *GetRoleByName200ResponsePagination) { - v.value = val - v.isSet = true -} - -func (v NullableGetRoleByName200ResponsePagination) IsSet() bool { - return v.isSet -} - -func (v *NullableGetRoleByName200ResponsePagination) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetRoleByName200ResponsePagination(val *GetRoleByName200ResponsePagination) *NullableGetRoleByName200ResponsePagination { - return &NullableGetRoleByName200ResponsePagination{value: val, isSet: true} -} - -func (v NullableGetRoleByName200ResponsePagination) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetRoleByName200ResponsePagination) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_get_user_apps_200_response_inner.go b/model_get_user_apps_200_response_inner.go deleted file mode 100644 index 03a111c..0000000 --- a/model_get_user_apps_200_response_inner.go +++ /dev/null @@ -1,385 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the GetUserApps200ResponseInner type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetUserApps200ResponseInner{} - -// GetUserApps200ResponseInner struct for GetUserApps200ResponseInner -type GetUserApps200ResponseInner struct { - // The App ID - Id *int32 `json:"id,omitempty"` - // A url for the icon that represents the app in the OneLogin portal - IconUrl *string `json:"icon_url,omitempty"` - // Boolean that indicates if the OneLogin browser extension is required to launch this app. - Extension *bool `json:"extension,omitempty"` - // Unqiue identifier for this user and app combination. - LoginId *int32 `json:"login_id,omitempty"` - // The name of the app. - Name *string `json:"name,omitempty"` - ProvisioningStatus *string `json:"provisioning_status,omitempty"` - // If provisioning is enabled this indicates the state of provisioning for the given user. - ProvisioningState *string `json:"provisioning_state,omitempty"` - // Indicates if provisioning is enabled for this app. - ProvisioningEnabled *bool `json:"provisioning_enabled,omitempty"` -} - -// NewGetUserApps200ResponseInner instantiates a new GetUserApps200ResponseInner 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 NewGetUserApps200ResponseInner() *GetUserApps200ResponseInner { - this := GetUserApps200ResponseInner{} - return &this -} - -// NewGetUserApps200ResponseInnerWithDefaults instantiates a new GetUserApps200ResponseInner 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 NewGetUserApps200ResponseInnerWithDefaults() *GetUserApps200ResponseInner { - this := GetUserApps200ResponseInner{} - return &this -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *GetUserApps200ResponseInner) GetId() int32 { - if o == nil || isNil(o.Id) { - var ret int32 - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetUserApps200ResponseInner) GetIdOk() (*int32, bool) { - if o == nil || isNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *GetUserApps200ResponseInner) HasId() bool { - if o != nil && !isNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given int32 and assigns it to the Id field. -func (o *GetUserApps200ResponseInner) SetId(v int32) { - o.Id = &v -} - -// GetIconUrl returns the IconUrl field value if set, zero value otherwise. -func (o *GetUserApps200ResponseInner) GetIconUrl() string { - if o == nil || isNil(o.IconUrl) { - var ret string - return ret - } - return *o.IconUrl -} - -// 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 *GetUserApps200ResponseInner) GetIconUrlOk() (*string, bool) { - if o == nil || isNil(o.IconUrl) { - return nil, false - } - return o.IconUrl, true -} - -// HasIconUrl returns a boolean if a field has been set. -func (o *GetUserApps200ResponseInner) HasIconUrl() bool { - if o != nil && !isNil(o.IconUrl) { - return true - } - - return false -} - -// SetIconUrl gets a reference to the given string and assigns it to the IconUrl field. -func (o *GetUserApps200ResponseInner) SetIconUrl(v string) { - o.IconUrl = &v -} - -// GetExtension returns the Extension field value if set, zero value otherwise. -func (o *GetUserApps200ResponseInner) GetExtension() bool { - if o == nil || isNil(o.Extension) { - var ret bool - return ret - } - return *o.Extension -} - -// GetExtensionOk returns a tuple with the Extension field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetUserApps200ResponseInner) GetExtensionOk() (*bool, bool) { - if o == nil || isNil(o.Extension) { - return nil, false - } - return o.Extension, true -} - -// HasExtension returns a boolean if a field has been set. -func (o *GetUserApps200ResponseInner) HasExtension() bool { - if o != nil && !isNil(o.Extension) { - return true - } - - return false -} - -// SetExtension gets a reference to the given bool and assigns it to the Extension field. -func (o *GetUserApps200ResponseInner) SetExtension(v bool) { - o.Extension = &v -} - -// GetLoginId returns the LoginId field value if set, zero value otherwise. -func (o *GetUserApps200ResponseInner) GetLoginId() int32 { - if o == nil || isNil(o.LoginId) { - var ret int32 - return ret - } - return *o.LoginId -} - -// GetLoginIdOk returns a tuple with the LoginId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetUserApps200ResponseInner) GetLoginIdOk() (*int32, bool) { - if o == nil || isNil(o.LoginId) { - return nil, false - } - return o.LoginId, true -} - -// HasLoginId returns a boolean if a field has been set. -func (o *GetUserApps200ResponseInner) HasLoginId() bool { - if o != nil && !isNil(o.LoginId) { - return true - } - - return false -} - -// SetLoginId gets a reference to the given int32 and assigns it to the LoginId field. -func (o *GetUserApps200ResponseInner) SetLoginId(v int32) { - o.LoginId = &v -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *GetUserApps200ResponseInner) GetName() string { - if o == nil || isNil(o.Name) { - var ret string - return ret - } - return *o.Name -} - -// 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 *GetUserApps200ResponseInner) GetNameOk() (*string, bool) { - if o == nil || isNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *GetUserApps200ResponseInner) HasName() bool { - if o != nil && !isNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *GetUserApps200ResponseInner) SetName(v string) { - o.Name = &v -} - -// GetProvisioningStatus returns the ProvisioningStatus field value if set, zero value otherwise. -func (o *GetUserApps200ResponseInner) GetProvisioningStatus() string { - if o == nil || isNil(o.ProvisioningStatus) { - var ret string - return ret - } - return *o.ProvisioningStatus -} - -// GetProvisioningStatusOk returns a tuple with the ProvisioningStatus field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetUserApps200ResponseInner) GetProvisioningStatusOk() (*string, bool) { - if o == nil || isNil(o.ProvisioningStatus) { - return nil, false - } - return o.ProvisioningStatus, true -} - -// HasProvisioningStatus returns a boolean if a field has been set. -func (o *GetUserApps200ResponseInner) HasProvisioningStatus() bool { - if o != nil && !isNil(o.ProvisioningStatus) { - return true - } - - return false -} - -// SetProvisioningStatus gets a reference to the given string and assigns it to the ProvisioningStatus field. -func (o *GetUserApps200ResponseInner) SetProvisioningStatus(v string) { - o.ProvisioningStatus = &v -} - -// GetProvisioningState returns the ProvisioningState field value if set, zero value otherwise. -func (o *GetUserApps200ResponseInner) GetProvisioningState() string { - if o == nil || isNil(o.ProvisioningState) { - var ret string - return ret - } - return *o.ProvisioningState -} - -// GetProvisioningStateOk returns a tuple with the ProvisioningState field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetUserApps200ResponseInner) GetProvisioningStateOk() (*string, bool) { - if o == nil || isNil(o.ProvisioningState) { - return nil, false - } - return o.ProvisioningState, true -} - -// HasProvisioningState returns a boolean if a field has been set. -func (o *GetUserApps200ResponseInner) HasProvisioningState() bool { - if o != nil && !isNil(o.ProvisioningState) { - return true - } - - return false -} - -// SetProvisioningState gets a reference to the given string and assigns it to the ProvisioningState field. -func (o *GetUserApps200ResponseInner) SetProvisioningState(v string) { - o.ProvisioningState = &v -} - -// GetProvisioningEnabled returns the ProvisioningEnabled field value if set, zero value otherwise. -func (o *GetUserApps200ResponseInner) GetProvisioningEnabled() bool { - if o == nil || isNil(o.ProvisioningEnabled) { - var ret bool - return ret - } - return *o.ProvisioningEnabled -} - -// GetProvisioningEnabledOk returns a tuple with the ProvisioningEnabled field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetUserApps200ResponseInner) GetProvisioningEnabledOk() (*bool, bool) { - if o == nil || isNil(o.ProvisioningEnabled) { - return nil, false - } - return o.ProvisioningEnabled, true -} - -// HasProvisioningEnabled returns a boolean if a field has been set. -func (o *GetUserApps200ResponseInner) HasProvisioningEnabled() bool { - if o != nil && !isNil(o.ProvisioningEnabled) { - return true - } - - return false -} - -// SetProvisioningEnabled gets a reference to the given bool and assigns it to the ProvisioningEnabled field. -func (o *GetUserApps200ResponseInner) SetProvisioningEnabled(v bool) { - o.ProvisioningEnabled = &v -} - -func (o GetUserApps200ResponseInner) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetUserApps200ResponseInner) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Id) { - toSerialize["id"] = o.Id - } - if !isNil(o.IconUrl) { - toSerialize["icon_url"] = o.IconUrl - } - if !isNil(o.Extension) { - toSerialize["extension"] = o.Extension - } - if !isNil(o.LoginId) { - toSerialize["login_id"] = o.LoginId - } - if !isNil(o.Name) { - toSerialize["name"] = o.Name - } - if !isNil(o.ProvisioningStatus) { - toSerialize["provisioning_status"] = o.ProvisioningStatus - } - if !isNil(o.ProvisioningState) { - toSerialize["provisioning_state"] = o.ProvisioningState - } - if !isNil(o.ProvisioningEnabled) { - toSerialize["provisioning_enabled"] = o.ProvisioningEnabled - } - return toSerialize, nil -} - -type NullableGetUserApps200ResponseInner struct { - value *GetUserApps200ResponseInner - isSet bool -} - -func (v NullableGetUserApps200ResponseInner) Get() *GetUserApps200ResponseInner { - return v.value -} - -func (v *NullableGetUserApps200ResponseInner) Set(val *GetUserApps200ResponseInner) { - v.value = val - v.isSet = true -} - -func (v NullableGetUserApps200ResponseInner) IsSet() bool { - return v.isSet -} - -func (v *NullableGetUserApps200ResponseInner) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetUserApps200ResponseInner(val *GetUserApps200ResponseInner) *NullableGetUserApps200ResponseInner { - return &NullableGetUserApps200ResponseInner{value: val, isSet: true} -} - -func (v NullableGetUserApps200ResponseInner) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetUserApps200ResponseInner) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_get_user_roles_200_response.go b/model_get_user_roles_200_response.go deleted file mode 100644 index c3ae05d..0000000 --- a/model_get_user_roles_200_response.go +++ /dev/null @@ -1,163 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the GetUserRoles200Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetUserRoles200Response{} - -// GetUserRoles200Response struct for GetUserRoles200Response -type GetUserRoles200Response struct { - Status *Error `json:"status,omitempty"` - // List of Role IDs that are assigned to the User - Data []int32 `json:"data,omitempty"` -} - -// NewGetUserRoles200Response instantiates a new GetUserRoles200Response 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 NewGetUserRoles200Response() *GetUserRoles200Response { - this := GetUserRoles200Response{} - return &this -} - -// NewGetUserRoles200ResponseWithDefaults instantiates a new GetUserRoles200Response 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 NewGetUserRoles200ResponseWithDefaults() *GetUserRoles200Response { - this := GetUserRoles200Response{} - return &this -} - -// GetStatus returns the Status field value if set, zero value otherwise. -func (o *GetUserRoles200Response) GetStatus() Error { - if o == nil || isNil(o.Status) { - var ret Error - return ret - } - return *o.Status -} - -// GetStatusOk returns a tuple with the Status field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetUserRoles200Response) GetStatusOk() (*Error, bool) { - if o == nil || isNil(o.Status) { - return nil, false - } - return o.Status, true -} - -// HasStatus returns a boolean if a field has been set. -func (o *GetUserRoles200Response) HasStatus() bool { - if o != nil && !isNil(o.Status) { - return true - } - - return false -} - -// SetStatus gets a reference to the given Error and assigns it to the Status field. -func (o *GetUserRoles200Response) SetStatus(v Error) { - o.Status = &v -} - -// GetData returns the Data field value if set, zero value otherwise. -func (o *GetUserRoles200Response) GetData() []int32 { - if o == nil || isNil(o.Data) { - var ret []int32 - return ret - } - return o.Data -} - -// GetDataOk returns a tuple with the Data field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetUserRoles200Response) GetDataOk() ([]int32, bool) { - if o == nil || isNil(o.Data) { - return nil, false - } - return o.Data, true -} - -// HasData returns a boolean if a field has been set. -func (o *GetUserRoles200Response) HasData() bool { - if o != nil && !isNil(o.Data) { - return true - } - - return false -} - -// SetData gets a reference to the given []int32 and assigns it to the Data field. -func (o *GetUserRoles200Response) SetData(v []int32) { - o.Data = v -} - -func (o GetUserRoles200Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetUserRoles200Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Status) { - toSerialize["status"] = o.Status - } - if !isNil(o.Data) { - toSerialize["data"] = o.Data - } - return toSerialize, nil -} - -type NullableGetUserRoles200Response struct { - value *GetUserRoles200Response - isSet bool -} - -func (v NullableGetUserRoles200Response) Get() *GetUserRoles200Response { - return v.value -} - -func (v *NullableGetUserRoles200Response) Set(val *GetUserRoles200Response) { - v.value = val - v.isSet = true -} - -func (v NullableGetUserRoles200Response) IsSet() bool { - return v.isSet -} - -func (v *NullableGetUserRoles200Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetUserRoles200Response(val *GetUserRoles200Response) *NullableGetUserRoles200Response { - return &NullableGetUserRoles200Response{value: val, isSet: true} -} - -func (v NullableGetUserRoles200Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetUserRoles200Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_get_user_verification_200_response.go b/model_get_user_verification_200_response.go deleted file mode 100644 index a29d7bf..0000000 --- a/model_get_user_verification_200_response.go +++ /dev/null @@ -1,201 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the GetUserVerification200Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetUserVerification200Response{} - -// GetUserVerification200Response struct for GetUserVerification200Response -type GetUserVerification200Response struct { - // registration identifier - Id *string `json:"id,omitempty"` - // pending = has not been completed. accepted registration has successfully completed, rejected user has denied the MFA attempt or incorrectly provided the OneLogin Voice OTP code. - Status *string `json:"status,omitempty"` - // Device Id to be used with verify factor - DeviceId *string `json:"device_id,omitempty"` -} - -// NewGetUserVerification200Response instantiates a new GetUserVerification200Response 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 NewGetUserVerification200Response() *GetUserVerification200Response { - this := GetUserVerification200Response{} - return &this -} - -// NewGetUserVerification200ResponseWithDefaults instantiates a new GetUserVerification200Response 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 NewGetUserVerification200ResponseWithDefaults() *GetUserVerification200Response { - this := GetUserVerification200Response{} - return &this -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *GetUserVerification200Response) GetId() string { - if o == nil || isNil(o.Id) { - var ret string - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetUserVerification200Response) GetIdOk() (*string, bool) { - if o == nil || isNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *GetUserVerification200Response) HasId() bool { - if o != nil && !isNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given string and assigns it to the Id field. -func (o *GetUserVerification200Response) SetId(v string) { - o.Id = &v -} - -// GetStatus returns the Status field value if set, zero value otherwise. -func (o *GetUserVerification200Response) GetStatus() string { - if o == nil || isNil(o.Status) { - var ret string - return ret - } - return *o.Status -} - -// GetStatusOk returns a tuple with the Status field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetUserVerification200Response) GetStatusOk() (*string, bool) { - if o == nil || isNil(o.Status) { - return nil, false - } - return o.Status, true -} - -// HasStatus returns a boolean if a field has been set. -func (o *GetUserVerification200Response) HasStatus() bool { - if o != nil && !isNil(o.Status) { - return true - } - - return false -} - -// SetStatus gets a reference to the given string and assigns it to the Status field. -func (o *GetUserVerification200Response) SetStatus(v string) { - o.Status = &v -} - -// GetDeviceId returns the DeviceId field value if set, zero value otherwise. -func (o *GetUserVerification200Response) GetDeviceId() string { - if o == nil || isNil(o.DeviceId) { - var ret string - return ret - } - return *o.DeviceId -} - -// GetDeviceIdOk returns a tuple with the DeviceId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetUserVerification200Response) GetDeviceIdOk() (*string, bool) { - if o == nil || isNil(o.DeviceId) { - return nil, false - } - return o.DeviceId, true -} - -// HasDeviceId returns a boolean if a field has been set. -func (o *GetUserVerification200Response) HasDeviceId() bool { - if o != nil && !isNil(o.DeviceId) { - return true - } - - return false -} - -// SetDeviceId gets a reference to the given string and assigns it to the DeviceId field. -func (o *GetUserVerification200Response) SetDeviceId(v string) { - o.DeviceId = &v -} - -func (o GetUserVerification200Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GetUserVerification200Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Id) { - toSerialize["id"] = o.Id - } - if !isNil(o.Status) { - toSerialize["status"] = o.Status - } - if !isNil(o.DeviceId) { - toSerialize["device_id"] = o.DeviceId - } - return toSerialize, nil -} - -type NullableGetUserVerification200Response struct { - value *GetUserVerification200Response - isSet bool -} - -func (v NullableGetUserVerification200Response) Get() *GetUserVerification200Response { - return v.value -} - -func (v *NullableGetUserVerification200Response) Set(val *GetUserVerification200Response) { - v.value = val - v.isSet = true -} - -func (v NullableGetUserVerification200Response) IsSet() bool { - return v.isSet -} - -func (v *NullableGetUserVerification200Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetUserVerification200Response(val *GetUserVerification200Response) *NullableGetUserVerification200Response { - return &NullableGetUserVerification200Response{value: val, isSet: true} -} - -func (v NullableGetUserVerification200Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetUserVerification200Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_group.go b/model_group.go deleted file mode 100644 index 87ce04f..0000000 --- a/model_group.go +++ /dev/null @@ -1,201 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the Group type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Group{} - -// Group struct for Group -type Group struct { - // Group's unique Onelogin ID - Id *int32 `json:"id,omitempty"` - // Group name - Name *string `json:"name,omitempty"` - // Deprecated. Will always show the attribute nil=\"true\". - Reference *string `json:"reference,omitempty"` -} - -// NewGroup instantiates a new Group 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 NewGroup() *Group { - this := Group{} - return &this -} - -// NewGroupWithDefaults instantiates a new Group 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 NewGroupWithDefaults() *Group { - this := Group{} - return &this -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *Group) GetId() int32 { - if o == nil || isNil(o.Id) { - var ret int32 - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Group) GetIdOk() (*int32, bool) { - if o == nil || isNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *Group) HasId() bool { - if o != nil && !isNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given int32 and assigns it to the Id field. -func (o *Group) SetId(v int32) { - o.Id = &v -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *Group) GetName() string { - if o == nil || isNil(o.Name) { - var ret string - return ret - } - return *o.Name -} - -// 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 *Group) GetNameOk() (*string, bool) { - if o == nil || isNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *Group) HasName() bool { - if o != nil && !isNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *Group) SetName(v string) { - o.Name = &v -} - -// GetReference returns the Reference field value if set, zero value otherwise. -func (o *Group) GetReference() string { - if o == nil || isNil(o.Reference) { - var ret string - return ret - } - return *o.Reference -} - -// GetReferenceOk returns a tuple with the Reference field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Group) GetReferenceOk() (*string, bool) { - if o == nil || isNil(o.Reference) { - return nil, false - } - return o.Reference, true -} - -// HasReference returns a boolean if a field has been set. -func (o *Group) HasReference() bool { - if o != nil && !isNil(o.Reference) { - return true - } - - return false -} - -// SetReference gets a reference to the given string and assigns it to the Reference field. -func (o *Group) SetReference(v string) { - o.Reference = &v -} - -func (o Group) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Group) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Id) { - toSerialize["id"] = o.Id - } - if !isNil(o.Name) { - toSerialize["name"] = o.Name - } - if !isNil(o.Reference) { - toSerialize["reference"] = o.Reference - } - return toSerialize, nil -} - -type NullableGroup struct { - value *Group - isSet bool -} - -func (v NullableGroup) Get() *Group { - return v.value -} - -func (v *NullableGroup) Set(val *Group) { - v.value = val - v.isSet = true -} - -func (v NullableGroup) IsSet() bool { - return v.isSet -} - -func (v *NullableGroup) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGroup(val *Group) *NullableGroup { - return &NullableGroup{value: val, isSet: true} -} - -func (v NullableGroup) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGroup) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_hook.go b/model_hook.go deleted file mode 100644 index 56d1dec..0000000 --- a/model_hook.go +++ /dev/null @@ -1,578 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the Hook type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Hook{} - -// Hook struct for Hook -type Hook struct { - // The Hook unique ID in OneLogin. - Id *string `json:"id,omitempty"` - // A string describing the type of hook. e.g. `pre-authentication` - Type string `json:"type"` - // Boolean to enable or disable the hook. Disabled hooks will not run. - Disabled bool `json:"disabled"` - // The number of seconds to allow the hook function to run before before timing out. Maximum timeout varies based on the type of hook. - Timeout int32 `json:"timeout"` - // Environment Variable objects that will be available via process.env.ENV_VAR_NAME in the hook code. - EnvVars []string `json:"env_vars"` - // The Smart Hooks supported Node.js version to execute this hook with. - Runtime string `json:"runtime"` - // Number of retries if execution fails. - Retries int32 `json:"retries"` - // An object containing NPM packages that are bundled with the hook function. - Packages map[string]string `json:"packages"` - // A base64 encoded string containing the javascript function code. - Function string `json:"function"` - // The semantic version of the content that will be injected into this hook. - ContextVersion *string `json:"context_version,omitempty"` - // String describing the state of the hook function. When a hook is ready and disabled is false it will be executed. - Status *string `json:"status,omitempty"` - Options *HookOptions `json:"options,omitempty"` - // An array of objects that let you limit the execution of a hook to users in specific roles. - Conditions []Condition `json:"conditions,omitempty"` - // ISO8601 format date that they hook function was created. - CreatedAt *string `json:"created_at,omitempty"` - // ISO8601 format date that they hook function was last updated. - UpdatedAt *string `json:"updated_at,omitempty"` -} - -// NewHook instantiates a new Hook 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 NewHook(type_ string, disabled bool, timeout int32, envVars []string, runtime string, retries int32, packages map[string]string, function string) *Hook { - this := Hook{} - this.Type = type_ - this.Disabled = disabled - this.Timeout = timeout - this.EnvVars = envVars - this.Runtime = runtime - this.Retries = retries - this.Packages = packages - this.Function = function - return &this -} - -// NewHookWithDefaults instantiates a new Hook 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 NewHookWithDefaults() *Hook { - this := Hook{} - var disabled bool = true - this.Disabled = disabled - var timeout int32 = 1 - this.Timeout = timeout - var retries int32 = 0 - this.Retries = retries - return &this -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *Hook) GetId() string { - if o == nil || isNil(o.Id) { - var ret string - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Hook) GetIdOk() (*string, bool) { - if o == nil || isNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *Hook) HasId() bool { - if o != nil && !isNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given string and assigns it to the Id field. -func (o *Hook) SetId(v string) { - o.Id = &v -} - -// GetType returns the Type field value -func (o *Hook) GetType() string { - if o == nil { - var ret string - return ret - } - - return o.Type -} - -// GetTypeOk returns a tuple with the Type field value -// and a boolean to check if the value has been set. -func (o *Hook) GetTypeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Type, true -} - -// SetType sets field value -func (o *Hook) SetType(v string) { - o.Type = v -} - -// GetDisabled returns the Disabled field value -func (o *Hook) GetDisabled() bool { - if o == nil { - var ret bool - return ret - } - - return o.Disabled -} - -// GetDisabledOk returns a tuple with the Disabled field value -// and a boolean to check if the value has been set. -func (o *Hook) GetDisabledOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.Disabled, true -} - -// SetDisabled sets field value -func (o *Hook) SetDisabled(v bool) { - o.Disabled = v -} - -// GetTimeout returns the Timeout field value -func (o *Hook) GetTimeout() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.Timeout -} - -// GetTimeoutOk returns a tuple with the Timeout field value -// and a boolean to check if the value has been set. -func (o *Hook) GetTimeoutOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.Timeout, true -} - -// SetTimeout sets field value -func (o *Hook) SetTimeout(v int32) { - o.Timeout = v -} - -// GetEnvVars returns the EnvVars field value -func (o *Hook) GetEnvVars() []string { - if o == nil { - var ret []string - return ret - } - - return o.EnvVars -} - -// GetEnvVarsOk returns a tuple with the EnvVars field value -// and a boolean to check if the value has been set. -func (o *Hook) GetEnvVarsOk() ([]string, bool) { - if o == nil { - return nil, false - } - return o.EnvVars, true -} - -// SetEnvVars sets field value -func (o *Hook) SetEnvVars(v []string) { - o.EnvVars = v -} - -// GetRuntime returns the Runtime field value -func (o *Hook) GetRuntime() string { - if o == nil { - var ret string - return ret - } - - return o.Runtime -} - -// GetRuntimeOk returns a tuple with the Runtime field value -// and a boolean to check if the value has been set. -func (o *Hook) GetRuntimeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Runtime, true -} - -// SetRuntime sets field value -func (o *Hook) SetRuntime(v string) { - o.Runtime = v -} - -// GetRetries returns the Retries field value -func (o *Hook) GetRetries() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.Retries -} - -// GetRetriesOk returns a tuple with the Retries field value -// and a boolean to check if the value has been set. -func (o *Hook) GetRetriesOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.Retries, true -} - -// SetRetries sets field value -func (o *Hook) SetRetries(v int32) { - o.Retries = v -} - -// GetPackages returns the Packages field value -func (o *Hook) GetPackages() map[string]string { - if o == nil { - var ret map[string]string - return ret - } - - return o.Packages -} - -// GetPackagesOk returns a tuple with the Packages field value -// and a boolean to check if the value has been set. -func (o *Hook) GetPackagesOk() (*map[string]string, bool) { - if o == nil { - return nil, false - } - return &o.Packages, true -} - -// SetPackages sets field value -func (o *Hook) SetPackages(v map[string]string) { - o.Packages = v -} - -// GetFunction returns the Function field value -func (o *Hook) GetFunction() string { - if o == nil { - var ret string - return ret - } - - return o.Function -} - -// GetFunctionOk returns a tuple with the Function field value -// and a boolean to check if the value has been set. -func (o *Hook) GetFunctionOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Function, true -} - -// SetFunction sets field value -func (o *Hook) SetFunction(v string) { - o.Function = v -} - -// GetContextVersion returns the ContextVersion field value if set, zero value otherwise. -func (o *Hook) GetContextVersion() string { - if o == nil || isNil(o.ContextVersion) { - var ret string - return ret - } - return *o.ContextVersion -} - -// GetContextVersionOk returns a tuple with the ContextVersion field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Hook) GetContextVersionOk() (*string, bool) { - if o == nil || isNil(o.ContextVersion) { - return nil, false - } - return o.ContextVersion, true -} - -// HasContextVersion returns a boolean if a field has been set. -func (o *Hook) HasContextVersion() bool { - if o != nil && !isNil(o.ContextVersion) { - return true - } - - return false -} - -// SetContextVersion gets a reference to the given string and assigns it to the ContextVersion field. -func (o *Hook) SetContextVersion(v string) { - o.ContextVersion = &v -} - -// GetStatus returns the Status field value if set, zero value otherwise. -func (o *Hook) GetStatus() string { - if o == nil || isNil(o.Status) { - var ret string - return ret - } - return *o.Status -} - -// GetStatusOk returns a tuple with the Status field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Hook) GetStatusOk() (*string, bool) { - if o == nil || isNil(o.Status) { - return nil, false - } - return o.Status, true -} - -// HasStatus returns a boolean if a field has been set. -func (o *Hook) HasStatus() bool { - if o != nil && !isNil(o.Status) { - return true - } - - return false -} - -// SetStatus gets a reference to the given string and assigns it to the Status field. -func (o *Hook) SetStatus(v string) { - o.Status = &v -} - -// GetOptions returns the Options field value if set, zero value otherwise. -func (o *Hook) GetOptions() HookOptions { - if o == nil || isNil(o.Options) { - var ret HookOptions - return ret - } - return *o.Options -} - -// GetOptionsOk returns a tuple with the Options field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Hook) GetOptionsOk() (*HookOptions, bool) { - if o == nil || isNil(o.Options) { - return nil, false - } - return o.Options, true -} - -// HasOptions returns a boolean if a field has been set. -func (o *Hook) HasOptions() bool { - if o != nil && !isNil(o.Options) { - return true - } - - return false -} - -// SetOptions gets a reference to the given HookOptions and assigns it to the Options field. -func (o *Hook) SetOptions(v HookOptions) { - o.Options = &v -} - -// GetConditions returns the Conditions field value if set, zero value otherwise. -func (o *Hook) GetConditions() []Condition { - if o == nil || isNil(o.Conditions) { - var ret []Condition - return ret - } - return o.Conditions -} - -// GetConditionsOk returns a tuple with the Conditions field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Hook) GetConditionsOk() ([]Condition, bool) { - if o == nil || isNil(o.Conditions) { - return nil, false - } - return o.Conditions, true -} - -// HasConditions returns a boolean if a field has been set. -func (o *Hook) HasConditions() bool { - if o != nil && !isNil(o.Conditions) { - return true - } - - return false -} - -// SetConditions gets a reference to the given []Condition and assigns it to the Conditions field. -func (o *Hook) SetConditions(v []Condition) { - o.Conditions = v -} - -// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. -func (o *Hook) GetCreatedAt() string { - if o == nil || isNil(o.CreatedAt) { - var ret string - return ret - } - return *o.CreatedAt -} - -// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Hook) GetCreatedAtOk() (*string, bool) { - if o == nil || isNil(o.CreatedAt) { - return nil, false - } - return o.CreatedAt, true -} - -// HasCreatedAt returns a boolean if a field has been set. -func (o *Hook) HasCreatedAt() bool { - if o != nil && !isNil(o.CreatedAt) { - return true - } - - return false -} - -// SetCreatedAt gets a reference to the given string and assigns it to the CreatedAt field. -func (o *Hook) SetCreatedAt(v string) { - o.CreatedAt = &v -} - -// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. -func (o *Hook) GetUpdatedAt() string { - if o == nil || isNil(o.UpdatedAt) { - var ret string - return ret - } - return *o.UpdatedAt -} - -// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Hook) GetUpdatedAtOk() (*string, bool) { - if o == nil || isNil(o.UpdatedAt) { - return nil, false - } - return o.UpdatedAt, true -} - -// HasUpdatedAt returns a boolean if a field has been set. -func (o *Hook) HasUpdatedAt() bool { - if o != nil && !isNil(o.UpdatedAt) { - return true - } - - return false -} - -// SetUpdatedAt gets a reference to the given string and assigns it to the UpdatedAt field. -func (o *Hook) SetUpdatedAt(v string) { - o.UpdatedAt = &v -} - -func (o Hook) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Hook) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Id) { - toSerialize["id"] = o.Id - } - toSerialize["type"] = o.Type - toSerialize["disabled"] = o.Disabled - toSerialize["timeout"] = o.Timeout - toSerialize["env_vars"] = o.EnvVars - toSerialize["runtime"] = o.Runtime - toSerialize["retries"] = o.Retries - toSerialize["packages"] = o.Packages - toSerialize["function"] = o.Function - if !isNil(o.ContextVersion) { - toSerialize["context_version"] = o.ContextVersion - } - if !isNil(o.Status) { - toSerialize["status"] = o.Status - } - if !isNil(o.Options) { - toSerialize["options"] = o.Options - } - if !isNil(o.Conditions) { - toSerialize["conditions"] = o.Conditions - } - if !isNil(o.CreatedAt) { - toSerialize["created_at"] = o.CreatedAt - } - if !isNil(o.UpdatedAt) { - toSerialize["updated_at"] = o.UpdatedAt - } - return toSerialize, nil -} - -type NullableHook struct { - value *Hook - isSet bool -} - -func (v NullableHook) Get() *Hook { - return v.value -} - -func (v *NullableHook) Set(val *Hook) { - v.value = val - v.isSet = true -} - -func (v NullableHook) IsSet() bool { - return v.isSet -} - -func (v *NullableHook) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableHook(val *Hook) *NullableHook { - return &NullableHook{value: val, isSet: true} -} - -func (v NullableHook) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableHook) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_hook_envvar.go b/model_hook_envvar.go deleted file mode 100644 index 84d2edd..0000000 --- a/model_hook_envvar.go +++ /dev/null @@ -1,255 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the HookEnvvar type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &HookEnvvar{} - -// HookEnvvar struct for HookEnvvar -type HookEnvvar struct { - // A unique identifier for the Hook Environment Variable - Id *string `json:"id,omitempty"` - // The name of the environment variable. - Name string `json:"name"` - // The ISO8601 formatted date that the environment variable was created. - CreatedAt *string `json:"created_at,omitempty"` - // The ISO8601 formatted date that the environment variable was last updated. - UpdatedAt *string `json:"updated_at,omitempty"` - // The secret value that will be encrypted at rest and injected in applicable hook functions at run time. - Value string `json:"value"` -} - -// NewHookEnvvar instantiates a new HookEnvvar 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 NewHookEnvvar(name string, value string) *HookEnvvar { - this := HookEnvvar{} - this.Name = name - this.Value = value - return &this -} - -// NewHookEnvvarWithDefaults instantiates a new HookEnvvar 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 NewHookEnvvarWithDefaults() *HookEnvvar { - this := HookEnvvar{} - return &this -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *HookEnvvar) GetId() string { - if o == nil || isNil(o.Id) { - var ret string - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *HookEnvvar) GetIdOk() (*string, bool) { - if o == nil || isNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *HookEnvvar) HasId() bool { - if o != nil && !isNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given string and assigns it to the Id field. -func (o *HookEnvvar) SetId(v string) { - o.Id = &v -} - -// GetName returns the Name field value -func (o *HookEnvvar) 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 *HookEnvvar) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *HookEnvvar) SetName(v string) { - o.Name = v -} - -// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. -func (o *HookEnvvar) GetCreatedAt() string { - if o == nil || isNil(o.CreatedAt) { - var ret string - return ret - } - return *o.CreatedAt -} - -// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *HookEnvvar) GetCreatedAtOk() (*string, bool) { - if o == nil || isNil(o.CreatedAt) { - return nil, false - } - return o.CreatedAt, true -} - -// HasCreatedAt returns a boolean if a field has been set. -func (o *HookEnvvar) HasCreatedAt() bool { - if o != nil && !isNil(o.CreatedAt) { - return true - } - - return false -} - -// SetCreatedAt gets a reference to the given string and assigns it to the CreatedAt field. -func (o *HookEnvvar) SetCreatedAt(v string) { - o.CreatedAt = &v -} - -// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. -func (o *HookEnvvar) GetUpdatedAt() string { - if o == nil || isNil(o.UpdatedAt) { - var ret string - return ret - } - return *o.UpdatedAt -} - -// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *HookEnvvar) GetUpdatedAtOk() (*string, bool) { - if o == nil || isNil(o.UpdatedAt) { - return nil, false - } - return o.UpdatedAt, true -} - -// HasUpdatedAt returns a boolean if a field has been set. -func (o *HookEnvvar) HasUpdatedAt() bool { - if o != nil && !isNil(o.UpdatedAt) { - return true - } - - return false -} - -// SetUpdatedAt gets a reference to the given string and assigns it to the UpdatedAt field. -func (o *HookEnvvar) SetUpdatedAt(v string) { - o.UpdatedAt = &v -} - -// GetValue returns the Value field value -func (o *HookEnvvar) GetValue() string { - if o == nil { - var ret string - return ret - } - - return o.Value -} - -// GetValueOk returns a tuple with the Value field value -// and a boolean to check if the value has been set. -func (o *HookEnvvar) GetValueOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Value, true -} - -// SetValue sets field value -func (o *HookEnvvar) SetValue(v string) { - o.Value = v -} - -func (o HookEnvvar) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o HookEnvvar) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - // skip: id is readOnly - toSerialize["name"] = o.Name - if !isNil(o.CreatedAt) { - toSerialize["created_at"] = o.CreatedAt - } - if !isNil(o.UpdatedAt) { - toSerialize["updated_at"] = o.UpdatedAt - } - toSerialize["value"] = o.Value - return toSerialize, nil -} - -type NullableHookEnvvar struct { - value *HookEnvvar - isSet bool -} - -func (v NullableHookEnvvar) Get() *HookEnvvar { - return v.value -} - -func (v *NullableHookEnvvar) Set(val *HookEnvvar) { - v.value = val - v.isSet = true -} - -func (v NullableHookEnvvar) IsSet() bool { - return v.isSet -} - -func (v *NullableHookEnvvar) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableHookEnvvar(val *HookEnvvar) *NullableHookEnvvar { - return &NullableHookEnvvar{value: val, isSet: true} -} - -func (v NullableHookEnvvar) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableHookEnvvar) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_hook_log.go b/model_hook_log.go deleted file mode 100644 index b8edfb8..0000000 --- a/model_hook_log.go +++ /dev/null @@ -1,234 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the HookLog type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &HookLog{} - -// HookLog struct for HookLog -type HookLog struct { - RequestId *string `json:"request_id,omitempty"` - CorrelationId *string `json:"correlation_id,omitempty"` - CreatedAt *string `json:"created_at,omitempty"` - Events []string `json:"events,omitempty"` -} - -// NewHookLog instantiates a new HookLog 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 NewHookLog() *HookLog { - this := HookLog{} - return &this -} - -// NewHookLogWithDefaults instantiates a new HookLog 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 NewHookLogWithDefaults() *HookLog { - this := HookLog{} - return &this -} - -// GetRequestId returns the RequestId field value if set, zero value otherwise. -func (o *HookLog) GetRequestId() string { - if o == nil || isNil(o.RequestId) { - var ret string - return ret - } - return *o.RequestId -} - -// GetRequestIdOk returns a tuple with the RequestId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *HookLog) GetRequestIdOk() (*string, bool) { - if o == nil || isNil(o.RequestId) { - return nil, false - } - return o.RequestId, true -} - -// HasRequestId returns a boolean if a field has been set. -func (o *HookLog) HasRequestId() bool { - if o != nil && !isNil(o.RequestId) { - return true - } - - return false -} - -// SetRequestId gets a reference to the given string and assigns it to the RequestId field. -func (o *HookLog) SetRequestId(v string) { - o.RequestId = &v -} - -// GetCorrelationId returns the CorrelationId field value if set, zero value otherwise. -func (o *HookLog) GetCorrelationId() string { - if o == nil || isNil(o.CorrelationId) { - var ret string - return ret - } - return *o.CorrelationId -} - -// GetCorrelationIdOk returns a tuple with the CorrelationId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *HookLog) GetCorrelationIdOk() (*string, bool) { - if o == nil || isNil(o.CorrelationId) { - return nil, false - } - return o.CorrelationId, true -} - -// HasCorrelationId returns a boolean if a field has been set. -func (o *HookLog) HasCorrelationId() bool { - if o != nil && !isNil(o.CorrelationId) { - return true - } - - return false -} - -// SetCorrelationId gets a reference to the given string and assigns it to the CorrelationId field. -func (o *HookLog) SetCorrelationId(v string) { - o.CorrelationId = &v -} - -// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. -func (o *HookLog) GetCreatedAt() string { - if o == nil || isNil(o.CreatedAt) { - var ret string - return ret - } - return *o.CreatedAt -} - -// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *HookLog) GetCreatedAtOk() (*string, bool) { - if o == nil || isNil(o.CreatedAt) { - return nil, false - } - return o.CreatedAt, true -} - -// HasCreatedAt returns a boolean if a field has been set. -func (o *HookLog) HasCreatedAt() bool { - if o != nil && !isNil(o.CreatedAt) { - return true - } - - return false -} - -// SetCreatedAt gets a reference to the given string and assigns it to the CreatedAt field. -func (o *HookLog) SetCreatedAt(v string) { - o.CreatedAt = &v -} - -// GetEvents returns the Events field value if set, zero value otherwise. -func (o *HookLog) GetEvents() []string { - if o == nil || isNil(o.Events) { - var ret []string - return ret - } - return o.Events -} - -// GetEventsOk returns a tuple with the Events field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *HookLog) GetEventsOk() ([]string, bool) { - if o == nil || isNil(o.Events) { - return nil, false - } - return o.Events, true -} - -// HasEvents returns a boolean if a field has been set. -func (o *HookLog) HasEvents() bool { - if o != nil && !isNil(o.Events) { - return true - } - - return false -} - -// SetEvents gets a reference to the given []string and assigns it to the Events field. -func (o *HookLog) SetEvents(v []string) { - o.Events = v -} - -func (o HookLog) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o HookLog) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.RequestId) { - toSerialize["request_id"] = o.RequestId - } - if !isNil(o.CorrelationId) { - toSerialize["correlation_id"] = o.CorrelationId - } - if !isNil(o.CreatedAt) { - toSerialize["created_at"] = o.CreatedAt - } - if !isNil(o.Events) { - toSerialize["events"] = o.Events - } - return toSerialize, nil -} - -type NullableHookLog struct { - value *HookLog - isSet bool -} - -func (v NullableHookLog) Get() *HookLog { - return v.value -} - -func (v *NullableHookLog) Set(val *HookLog) { - v.value = val - v.isSet = true -} - -func (v NullableHookLog) IsSet() bool { - return v.isSet -} - -func (v *NullableHookLog) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableHookLog(val *HookLog) *NullableHookLog { - return &NullableHookLog{value: val, isSet: true} -} - -func (v NullableHookLog) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableHookLog) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_hook_options.go b/model_hook_options.go deleted file mode 100644 index eb12251..0000000 --- a/model_hook_options.go +++ /dev/null @@ -1,198 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the HookOptions type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &HookOptions{} - -// HookOptions A set of attributes allow control over the information that is included in the hook context. -type HookOptions struct { - RiskEnabled *bool `json:"risk_enabled,omitempty"` - LocationEnabled *bool `json:"location_enabled,omitempty"` - MfaDeviceInfoEnabled *bool `json:"mfa_device_info_enabled,omitempty"` -} - -// NewHookOptions instantiates a new HookOptions 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 NewHookOptions() *HookOptions { - this := HookOptions{} - return &this -} - -// NewHookOptionsWithDefaults instantiates a new HookOptions 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 NewHookOptionsWithDefaults() *HookOptions { - this := HookOptions{} - return &this -} - -// GetRiskEnabled returns the RiskEnabled field value if set, zero value otherwise. -func (o *HookOptions) GetRiskEnabled() bool { - if o == nil || isNil(o.RiskEnabled) { - var ret bool - return ret - } - return *o.RiskEnabled -} - -// GetRiskEnabledOk returns a tuple with the RiskEnabled field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *HookOptions) GetRiskEnabledOk() (*bool, bool) { - if o == nil || isNil(o.RiskEnabled) { - return nil, false - } - return o.RiskEnabled, true -} - -// HasRiskEnabled returns a boolean if a field has been set. -func (o *HookOptions) HasRiskEnabled() bool { - if o != nil && !isNil(o.RiskEnabled) { - return true - } - - return false -} - -// SetRiskEnabled gets a reference to the given bool and assigns it to the RiskEnabled field. -func (o *HookOptions) SetRiskEnabled(v bool) { - o.RiskEnabled = &v -} - -// GetLocationEnabled returns the LocationEnabled field value if set, zero value otherwise. -func (o *HookOptions) GetLocationEnabled() bool { - if o == nil || isNil(o.LocationEnabled) { - var ret bool - return ret - } - return *o.LocationEnabled -} - -// GetLocationEnabledOk returns a tuple with the LocationEnabled field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *HookOptions) GetLocationEnabledOk() (*bool, bool) { - if o == nil || isNil(o.LocationEnabled) { - return nil, false - } - return o.LocationEnabled, true -} - -// HasLocationEnabled returns a boolean if a field has been set. -func (o *HookOptions) HasLocationEnabled() bool { - if o != nil && !isNil(o.LocationEnabled) { - return true - } - - return false -} - -// SetLocationEnabled gets a reference to the given bool and assigns it to the LocationEnabled field. -func (o *HookOptions) SetLocationEnabled(v bool) { - o.LocationEnabled = &v -} - -// GetMfaDeviceInfoEnabled returns the MfaDeviceInfoEnabled field value if set, zero value otherwise. -func (o *HookOptions) GetMfaDeviceInfoEnabled() bool { - if o == nil || isNil(o.MfaDeviceInfoEnabled) { - var ret bool - return ret - } - return *o.MfaDeviceInfoEnabled -} - -// GetMfaDeviceInfoEnabledOk returns a tuple with the MfaDeviceInfoEnabled field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *HookOptions) GetMfaDeviceInfoEnabledOk() (*bool, bool) { - if o == nil || isNil(o.MfaDeviceInfoEnabled) { - return nil, false - } - return o.MfaDeviceInfoEnabled, true -} - -// HasMfaDeviceInfoEnabled returns a boolean if a field has been set. -func (o *HookOptions) HasMfaDeviceInfoEnabled() bool { - if o != nil && !isNil(o.MfaDeviceInfoEnabled) { - return true - } - - return false -} - -// SetMfaDeviceInfoEnabled gets a reference to the given bool and assigns it to the MfaDeviceInfoEnabled field. -func (o *HookOptions) SetMfaDeviceInfoEnabled(v bool) { - o.MfaDeviceInfoEnabled = &v -} - -func (o HookOptions) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o HookOptions) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.RiskEnabled) { - toSerialize["risk_enabled"] = o.RiskEnabled - } - if !isNil(o.LocationEnabled) { - toSerialize["location_enabled"] = o.LocationEnabled - } - if !isNil(o.MfaDeviceInfoEnabled) { - toSerialize["mfa_device_info_enabled"] = o.MfaDeviceInfoEnabled - } - return toSerialize, nil -} - -type NullableHookOptions struct { - value *HookOptions - isSet bool -} - -func (v NullableHookOptions) Get() *HookOptions { - return v.value -} - -func (v *NullableHookOptions) Set(val *HookOptions) { - v.value = val - v.isSet = true -} - -func (v NullableHookOptions) IsSet() bool { - return v.isSet -} - -func (v *NullableHookOptions) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableHookOptions(val *HookOptions) *NullableHookOptions { - return &NullableHookOptions{value: val, isSet: true} -} - -func (v NullableHookOptions) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableHookOptions) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_hook_status.go b/model_hook_status.go deleted file mode 100644 index 6f51c3d..0000000 --- a/model_hook_status.go +++ /dev/null @@ -1,164 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the HookStatus type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &HookStatus{} - -// HookStatus struct for HookStatus -type HookStatus struct { - // responses status nam - Name *string `json:"name,omitempty"` - // your operation was successful - Message *string `json:"message,omitempty"` -} - -// NewHookStatus instantiates a new HookStatus 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 NewHookStatus() *HookStatus { - this := HookStatus{} - return &this -} - -// NewHookStatusWithDefaults instantiates a new HookStatus 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 NewHookStatusWithDefaults() *HookStatus { - this := HookStatus{} - return &this -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *HookStatus) GetName() string { - if o == nil || isNil(o.Name) { - var ret string - return ret - } - return *o.Name -} - -// 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 *HookStatus) GetNameOk() (*string, bool) { - if o == nil || isNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *HookStatus) HasName() bool { - if o != nil && !isNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *HookStatus) SetName(v string) { - o.Name = &v -} - -// GetMessage returns the Message field value if set, zero value otherwise. -func (o *HookStatus) GetMessage() string { - if o == nil || isNil(o.Message) { - var ret string - return ret - } - return *o.Message -} - -// GetMessageOk returns a tuple with the Message field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *HookStatus) GetMessageOk() (*string, bool) { - if o == nil || isNil(o.Message) { - return nil, false - } - return o.Message, true -} - -// HasMessage returns a boolean if a field has been set. -func (o *HookStatus) HasMessage() bool { - if o != nil && !isNil(o.Message) { - return true - } - - return false -} - -// SetMessage gets a reference to the given string and assigns it to the Message field. -func (o *HookStatus) SetMessage(v string) { - o.Message = &v -} - -func (o HookStatus) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o HookStatus) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Name) { - toSerialize["name"] = o.Name - } - if !isNil(o.Message) { - toSerialize["message"] = o.Message - } - return toSerialize, nil -} - -type NullableHookStatus struct { - value *HookStatus - isSet bool -} - -func (v NullableHookStatus) Get() *HookStatus { - return v.value -} - -func (v *NullableHookStatus) Set(val *HookStatus) { - v.value = val - v.isSet = true -} - -func (v NullableHookStatus) IsSet() bool { - return v.isSet -} - -func (v *NullableHookStatus) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableHookStatus(val *HookStatus) *NullableHookStatus { - return &NullableHookStatus{value: val, isSet: true} -} - -func (v NullableHookStatus) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableHookStatus) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_list_conditions_200_response_inner.go b/model_list_conditions_200_response_inner.go deleted file mode 100644 index 473233c..0000000 --- a/model_list_conditions_200_response_inner.go +++ /dev/null @@ -1,164 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the ListConditions200ResponseInner type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ListConditions200ResponseInner{} - -// ListConditions200ResponseInner struct for ListConditions200ResponseInner -type ListConditions200ResponseInner struct { - // Name of the rule condition - Name *string `json:"name,omitempty"` - // The unique identifier of the condition. This should be used when defining conditions for a rule. - Value *string `json:"value,omitempty"` -} - -// NewListConditions200ResponseInner instantiates a new ListConditions200ResponseInner 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 NewListConditions200ResponseInner() *ListConditions200ResponseInner { - this := ListConditions200ResponseInner{} - return &this -} - -// NewListConditions200ResponseInnerWithDefaults instantiates a new ListConditions200ResponseInner 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 NewListConditions200ResponseInnerWithDefaults() *ListConditions200ResponseInner { - this := ListConditions200ResponseInner{} - return &this -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *ListConditions200ResponseInner) GetName() string { - if o == nil || isNil(o.Name) { - var ret string - return ret - } - return *o.Name -} - -// 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 *ListConditions200ResponseInner) GetNameOk() (*string, bool) { - if o == nil || isNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *ListConditions200ResponseInner) HasName() bool { - if o != nil && !isNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *ListConditions200ResponseInner) SetName(v string) { - o.Name = &v -} - -// GetValue returns the Value field value if set, zero value otherwise. -func (o *ListConditions200ResponseInner) GetValue() string { - if o == nil || isNil(o.Value) { - var ret string - return ret - } - return *o.Value -} - -// GetValueOk returns a tuple with the Value field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ListConditions200ResponseInner) GetValueOk() (*string, bool) { - if o == nil || isNil(o.Value) { - return nil, false - } - return o.Value, true -} - -// HasValue returns a boolean if a field has been set. -func (o *ListConditions200ResponseInner) HasValue() bool { - if o != nil && !isNil(o.Value) { - return true - } - - return false -} - -// SetValue gets a reference to the given string and assigns it to the Value field. -func (o *ListConditions200ResponseInner) SetValue(v string) { - o.Value = &v -} - -func (o ListConditions200ResponseInner) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ListConditions200ResponseInner) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Name) { - toSerialize["name"] = o.Name - } - if !isNil(o.Value) { - toSerialize["value"] = o.Value - } - return toSerialize, nil -} - -type NullableListConditions200ResponseInner struct { - value *ListConditions200ResponseInner - isSet bool -} - -func (v NullableListConditions200ResponseInner) Get() *ListConditions200ResponseInner { - return v.value -} - -func (v *NullableListConditions200ResponseInner) Set(val *ListConditions200ResponseInner) { - v.value = val - v.isSet = true -} - -func (v NullableListConditions200ResponseInner) IsSet() bool { - return v.isSet -} - -func (v *NullableListConditions200ResponseInner) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableListConditions200ResponseInner(val *ListConditions200ResponseInner) *NullableListConditions200ResponseInner { - return &NullableListConditions200ResponseInner{value: val, isSet: true} -} - -func (v NullableListConditions200ResponseInner) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableListConditions200ResponseInner) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_list_mapping_action_values_200_response_inner.go b/model_list_mapping_action_values_200_response_inner.go deleted file mode 100644 index 5c5e3f1..0000000 --- a/model_list_mapping_action_values_200_response_inner.go +++ /dev/null @@ -1,164 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the ListMappingActionValues200ResponseInner type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ListMappingActionValues200ResponseInner{} - -// ListMappingActionValues200ResponseInner struct for ListMappingActionValues200ResponseInner -type ListMappingActionValues200ResponseInner struct { - // Name or description of operator - Name *string `json:"name,omitempty"` - // The action operator value to use when creating or updating User Mappings. - Value *int32 `json:"value,omitempty"` -} - -// NewListMappingActionValues200ResponseInner instantiates a new ListMappingActionValues200ResponseInner 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 NewListMappingActionValues200ResponseInner() *ListMappingActionValues200ResponseInner { - this := ListMappingActionValues200ResponseInner{} - return &this -} - -// NewListMappingActionValues200ResponseInnerWithDefaults instantiates a new ListMappingActionValues200ResponseInner 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 NewListMappingActionValues200ResponseInnerWithDefaults() *ListMappingActionValues200ResponseInner { - this := ListMappingActionValues200ResponseInner{} - return &this -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *ListMappingActionValues200ResponseInner) GetName() string { - if o == nil || isNil(o.Name) { - var ret string - return ret - } - return *o.Name -} - -// 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 *ListMappingActionValues200ResponseInner) GetNameOk() (*string, bool) { - if o == nil || isNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *ListMappingActionValues200ResponseInner) HasName() bool { - if o != nil && !isNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *ListMappingActionValues200ResponseInner) SetName(v string) { - o.Name = &v -} - -// GetValue returns the Value field value if set, zero value otherwise. -func (o *ListMappingActionValues200ResponseInner) GetValue() int32 { - if o == nil || isNil(o.Value) { - var ret int32 - return ret - } - return *o.Value -} - -// GetValueOk returns a tuple with the Value field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ListMappingActionValues200ResponseInner) GetValueOk() (*int32, bool) { - if o == nil || isNil(o.Value) { - return nil, false - } - return o.Value, true -} - -// HasValue returns a boolean if a field has been set. -func (o *ListMappingActionValues200ResponseInner) HasValue() bool { - if o != nil && !isNil(o.Value) { - return true - } - - return false -} - -// SetValue gets a reference to the given int32 and assigns it to the Value field. -func (o *ListMappingActionValues200ResponseInner) SetValue(v int32) { - o.Value = &v -} - -func (o ListMappingActionValues200ResponseInner) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ListMappingActionValues200ResponseInner) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Name) { - toSerialize["name"] = o.Name - } - if !isNil(o.Value) { - toSerialize["value"] = o.Value - } - return toSerialize, nil -} - -type NullableListMappingActionValues200ResponseInner struct { - value *ListMappingActionValues200ResponseInner - isSet bool -} - -func (v NullableListMappingActionValues200ResponseInner) Get() *ListMappingActionValues200ResponseInner { - return v.value -} - -func (v *NullableListMappingActionValues200ResponseInner) Set(val *ListMappingActionValues200ResponseInner) { - v.value = val - v.isSet = true -} - -func (v NullableListMappingActionValues200ResponseInner) IsSet() bool { - return v.isSet -} - -func (v *NullableListMappingActionValues200ResponseInner) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableListMappingActionValues200ResponseInner(val *ListMappingActionValues200ResponseInner) *NullableListMappingActionValues200ResponseInner { - return &NullableListMappingActionValues200ResponseInner{value: val, isSet: true} -} - -func (v NullableListMappingActionValues200ResponseInner) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableListMappingActionValues200ResponseInner) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_list_mapping_conditions_200_response.go b/model_list_mapping_conditions_200_response.go deleted file mode 100644 index b3b76c6..0000000 --- a/model_list_mapping_conditions_200_response.go +++ /dev/null @@ -1,164 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the ListMappingConditions200Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ListMappingConditions200Response{} - -// ListMappingConditions200Response struct for ListMappingConditions200Response -type ListMappingConditions200Response struct { - // Name of Condition - Name *string `json:"name,omitempty"` - // The unique identifier of the condition. This should be used when defining conditions for a User Mapping - Value *string `json:"value,omitempty"` -} - -// NewListMappingConditions200Response instantiates a new ListMappingConditions200Response 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 NewListMappingConditions200Response() *ListMappingConditions200Response { - this := ListMappingConditions200Response{} - return &this -} - -// NewListMappingConditions200ResponseWithDefaults instantiates a new ListMappingConditions200Response 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 NewListMappingConditions200ResponseWithDefaults() *ListMappingConditions200Response { - this := ListMappingConditions200Response{} - return &this -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *ListMappingConditions200Response) GetName() string { - if o == nil || isNil(o.Name) { - var ret string - return ret - } - return *o.Name -} - -// 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 *ListMappingConditions200Response) GetNameOk() (*string, bool) { - if o == nil || isNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *ListMappingConditions200Response) HasName() bool { - if o != nil && !isNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *ListMappingConditions200Response) SetName(v string) { - o.Name = &v -} - -// GetValue returns the Value field value if set, zero value otherwise. -func (o *ListMappingConditions200Response) GetValue() string { - if o == nil || isNil(o.Value) { - var ret string - return ret - } - return *o.Value -} - -// GetValueOk returns a tuple with the Value field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ListMappingConditions200Response) GetValueOk() (*string, bool) { - if o == nil || isNil(o.Value) { - return nil, false - } - return o.Value, true -} - -// HasValue returns a boolean if a field has been set. -func (o *ListMappingConditions200Response) HasValue() bool { - if o != nil && !isNil(o.Value) { - return true - } - - return false -} - -// SetValue gets a reference to the given string and assigns it to the Value field. -func (o *ListMappingConditions200Response) SetValue(v string) { - o.Value = &v -} - -func (o ListMappingConditions200Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ListMappingConditions200Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Name) { - toSerialize["name"] = o.Name - } - if !isNil(o.Value) { - toSerialize["value"] = o.Value - } - return toSerialize, nil -} - -type NullableListMappingConditions200Response struct { - value *ListMappingConditions200Response - isSet bool -} - -func (v NullableListMappingConditions200Response) Get() *ListMappingConditions200Response { - return v.value -} - -func (v *NullableListMappingConditions200Response) Set(val *ListMappingConditions200Response) { - v.value = val - v.isSet = true -} - -func (v NullableListMappingConditions200Response) IsSet() bool { - return v.isSet -} - -func (v *NullableListMappingConditions200Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableListMappingConditions200Response(val *ListMappingConditions200Response) *NullableListMappingConditions200Response { - return &NullableListMappingConditions200Response{value: val, isSet: true} -} - -func (v NullableListMappingConditions200Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableListMappingConditions200Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_list_mapping_conditions_operators_200_response_inner.go b/model_list_mapping_conditions_operators_200_response_inner.go deleted file mode 100644 index 99f58ba..0000000 --- a/model_list_mapping_conditions_operators_200_response_inner.go +++ /dev/null @@ -1,164 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the ListMappingConditionsOperators200ResponseInner type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ListMappingConditionsOperators200ResponseInner{} - -// ListMappingConditionsOperators200ResponseInner struct for ListMappingConditionsOperators200ResponseInner -type ListMappingConditionsOperators200ResponseInner struct { - // Name or description of operator - Name *string `json:"name,omitempty"` - // The condition operator value to use when creating or updating User Mappings. - Value *string `json:"value,omitempty"` -} - -// NewListMappingConditionsOperators200ResponseInner instantiates a new ListMappingConditionsOperators200ResponseInner 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 NewListMappingConditionsOperators200ResponseInner() *ListMappingConditionsOperators200ResponseInner { - this := ListMappingConditionsOperators200ResponseInner{} - return &this -} - -// NewListMappingConditionsOperators200ResponseInnerWithDefaults instantiates a new ListMappingConditionsOperators200ResponseInner 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 NewListMappingConditionsOperators200ResponseInnerWithDefaults() *ListMappingConditionsOperators200ResponseInner { - this := ListMappingConditionsOperators200ResponseInner{} - return &this -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *ListMappingConditionsOperators200ResponseInner) GetName() string { - if o == nil || isNil(o.Name) { - var ret string - return ret - } - return *o.Name -} - -// 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 *ListMappingConditionsOperators200ResponseInner) GetNameOk() (*string, bool) { - if o == nil || isNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *ListMappingConditionsOperators200ResponseInner) HasName() bool { - if o != nil && !isNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *ListMappingConditionsOperators200ResponseInner) SetName(v string) { - o.Name = &v -} - -// GetValue returns the Value field value if set, zero value otherwise. -func (o *ListMappingConditionsOperators200ResponseInner) GetValue() string { - if o == nil || isNil(o.Value) { - var ret string - return ret - } - return *o.Value -} - -// GetValueOk returns a tuple with the Value field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ListMappingConditionsOperators200ResponseInner) GetValueOk() (*string, bool) { - if o == nil || isNil(o.Value) { - return nil, false - } - return o.Value, true -} - -// HasValue returns a boolean if a field has been set. -func (o *ListMappingConditionsOperators200ResponseInner) HasValue() bool { - if o != nil && !isNil(o.Value) { - return true - } - - return false -} - -// SetValue gets a reference to the given string and assigns it to the Value field. -func (o *ListMappingConditionsOperators200ResponseInner) SetValue(v string) { - o.Value = &v -} - -func (o ListMappingConditionsOperators200ResponseInner) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ListMappingConditionsOperators200ResponseInner) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Name) { - toSerialize["name"] = o.Name - } - if !isNil(o.Value) { - toSerialize["value"] = o.Value - } - return toSerialize, nil -} - -type NullableListMappingConditionsOperators200ResponseInner struct { - value *ListMappingConditionsOperators200ResponseInner - isSet bool -} - -func (v NullableListMappingConditionsOperators200ResponseInner) Get() *ListMappingConditionsOperators200ResponseInner { - return v.value -} - -func (v *NullableListMappingConditionsOperators200ResponseInner) Set(val *ListMappingConditionsOperators200ResponseInner) { - v.value = val - v.isSet = true -} - -func (v NullableListMappingConditionsOperators200ResponseInner) IsSet() bool { - return v.isSet -} - -func (v *NullableListMappingConditionsOperators200ResponseInner) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableListMappingConditionsOperators200ResponseInner(val *ListMappingConditionsOperators200ResponseInner) *NullableListMappingConditionsOperators200ResponseInner { - return &NullableListMappingConditionsOperators200ResponseInner{value: val, isSet: true} -} - -func (v NullableListMappingConditionsOperators200ResponseInner) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableListMappingConditionsOperators200ResponseInner) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_list_mapping_contion_values_200_response_inner.go b/model_list_mapping_contion_values_200_response_inner.go deleted file mode 100644 index 8bd5735..0000000 --- a/model_list_mapping_contion_values_200_response_inner.go +++ /dev/null @@ -1,164 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the ListMappingContionValues200ResponseInner type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ListMappingContionValues200ResponseInner{} - -// ListMappingContionValues200ResponseInner struct for ListMappingContionValues200ResponseInner -type ListMappingContionValues200ResponseInner struct { - // Name or description of operator - Name *string `json:"name,omitempty"` - // The condition operator value to use when creating or updating User Mappings. - Value *int32 `json:"value,omitempty"` -} - -// NewListMappingContionValues200ResponseInner instantiates a new ListMappingContionValues200ResponseInner 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 NewListMappingContionValues200ResponseInner() *ListMappingContionValues200ResponseInner { - this := ListMappingContionValues200ResponseInner{} - return &this -} - -// NewListMappingContionValues200ResponseInnerWithDefaults instantiates a new ListMappingContionValues200ResponseInner 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 NewListMappingContionValues200ResponseInnerWithDefaults() *ListMappingContionValues200ResponseInner { - this := ListMappingContionValues200ResponseInner{} - return &this -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *ListMappingContionValues200ResponseInner) GetName() string { - if o == nil || isNil(o.Name) { - var ret string - return ret - } - return *o.Name -} - -// 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 *ListMappingContionValues200ResponseInner) GetNameOk() (*string, bool) { - if o == nil || isNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *ListMappingContionValues200ResponseInner) HasName() bool { - if o != nil && !isNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *ListMappingContionValues200ResponseInner) SetName(v string) { - o.Name = &v -} - -// GetValue returns the Value field value if set, zero value otherwise. -func (o *ListMappingContionValues200ResponseInner) GetValue() int32 { - if o == nil || isNil(o.Value) { - var ret int32 - return ret - } - return *o.Value -} - -// GetValueOk returns a tuple with the Value field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ListMappingContionValues200ResponseInner) GetValueOk() (*int32, bool) { - if o == nil || isNil(o.Value) { - return nil, false - } - return o.Value, true -} - -// HasValue returns a boolean if a field has been set. -func (o *ListMappingContionValues200ResponseInner) HasValue() bool { - if o != nil && !isNil(o.Value) { - return true - } - - return false -} - -// SetValue gets a reference to the given int32 and assigns it to the Value field. -func (o *ListMappingContionValues200ResponseInner) SetValue(v int32) { - o.Value = &v -} - -func (o ListMappingContionValues200ResponseInner) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ListMappingContionValues200ResponseInner) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Name) { - toSerialize["name"] = o.Name - } - if !isNil(o.Value) { - toSerialize["value"] = o.Value - } - return toSerialize, nil -} - -type NullableListMappingContionValues200ResponseInner struct { - value *ListMappingContionValues200ResponseInner - isSet bool -} - -func (v NullableListMappingContionValues200ResponseInner) Get() *ListMappingContionValues200ResponseInner { - return v.value -} - -func (v *NullableListMappingContionValues200ResponseInner) Set(val *ListMappingContionValues200ResponseInner) { - v.value = val - v.isSet = true -} - -func (v NullableListMappingContionValues200ResponseInner) IsSet() bool { - return v.isSet -} - -func (v *NullableListMappingContionValues200ResponseInner) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableListMappingContionValues200ResponseInner(val *ListMappingContionValues200ResponseInner) *NullableListMappingContionValues200ResponseInner { - return &NullableListMappingContionValues200ResponseInner{value: val, isSet: true} -} - -func (v NullableListMappingContionValues200ResponseInner) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableListMappingContionValues200ResponseInner) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_list_mappings_actions_200_response_inner.go b/model_list_mappings_actions_200_response_inner.go deleted file mode 100644 index fe6ed51..0000000 --- a/model_list_mappings_actions_200_response_inner.go +++ /dev/null @@ -1,164 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the ListMappingsActions200ResponseInner type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ListMappingsActions200ResponseInner{} - -// ListMappingsActions200ResponseInner struct for ListMappingsActions200ResponseInner -type ListMappingsActions200ResponseInner struct { - // Name of the action - Name *string `json:"name,omitempty"` - // The unique identifier of the action. This should be used when defining actions for a User Mapping. - Value *string `json:"value,omitempty"` -} - -// NewListMappingsActions200ResponseInner instantiates a new ListMappingsActions200ResponseInner 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 NewListMappingsActions200ResponseInner() *ListMappingsActions200ResponseInner { - this := ListMappingsActions200ResponseInner{} - return &this -} - -// NewListMappingsActions200ResponseInnerWithDefaults instantiates a new ListMappingsActions200ResponseInner 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 NewListMappingsActions200ResponseInnerWithDefaults() *ListMappingsActions200ResponseInner { - this := ListMappingsActions200ResponseInner{} - return &this -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *ListMappingsActions200ResponseInner) GetName() string { - if o == nil || isNil(o.Name) { - var ret string - return ret - } - return *o.Name -} - -// 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 *ListMappingsActions200ResponseInner) GetNameOk() (*string, bool) { - if o == nil || isNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *ListMappingsActions200ResponseInner) HasName() bool { - if o != nil && !isNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *ListMappingsActions200ResponseInner) SetName(v string) { - o.Name = &v -} - -// GetValue returns the Value field value if set, zero value otherwise. -func (o *ListMappingsActions200ResponseInner) GetValue() string { - if o == nil || isNil(o.Value) { - var ret string - return ret - } - return *o.Value -} - -// GetValueOk returns a tuple with the Value field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ListMappingsActions200ResponseInner) GetValueOk() (*string, bool) { - if o == nil || isNil(o.Value) { - return nil, false - } - return o.Value, true -} - -// HasValue returns a boolean if a field has been set. -func (o *ListMappingsActions200ResponseInner) HasValue() bool { - if o != nil && !isNil(o.Value) { - return true - } - - return false -} - -// SetValue gets a reference to the given string and assigns it to the Value field. -func (o *ListMappingsActions200ResponseInner) SetValue(v string) { - o.Value = &v -} - -func (o ListMappingsActions200ResponseInner) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ListMappingsActions200ResponseInner) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Name) { - toSerialize["name"] = o.Name - } - if !isNil(o.Value) { - toSerialize["value"] = o.Value - } - return toSerialize, nil -} - -type NullableListMappingsActions200ResponseInner struct { - value *ListMappingsActions200ResponseInner - isSet bool -} - -func (v NullableListMappingsActions200ResponseInner) Get() *ListMappingsActions200ResponseInner { - return v.value -} - -func (v *NullableListMappingsActions200ResponseInner) Set(val *ListMappingsActions200ResponseInner) { - v.value = val - v.isSet = true -} - -func (v NullableListMappingsActions200ResponseInner) IsSet() bool { - return v.isSet -} - -func (v *NullableListMappingsActions200ResponseInner) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableListMappingsActions200ResponseInner(val *ListMappingsActions200ResponseInner) *NullableListMappingsActions200ResponseInner { - return &NullableListMappingsActions200ResponseInner{value: val, isSet: true} -} - -func (v NullableListMappingsActions200ResponseInner) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableListMappingsActions200ResponseInner) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_list_message_templates_200_response_inner.go b/model_list_message_templates_200_response_inner.go deleted file mode 100644 index e53de3a..0000000 --- a/model_list_message_templates_200_response_inner.go +++ /dev/null @@ -1,201 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the ListMessageTemplates200ResponseInner type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ListMessageTemplates200ResponseInner{} - -// ListMessageTemplates200ResponseInner struct for ListMessageTemplates200ResponseInner -type ListMessageTemplates200ResponseInner struct { - // template ID - Id *int32 `json:"id,omitempty"` - // indicator if template is enabled - Enabled *bool `json:"enabled,omitempty"` - // name of message template - Name *string `json:"name,omitempty"` -} - -// NewListMessageTemplates200ResponseInner instantiates a new ListMessageTemplates200ResponseInner 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 NewListMessageTemplates200ResponseInner() *ListMessageTemplates200ResponseInner { - this := ListMessageTemplates200ResponseInner{} - return &this -} - -// NewListMessageTemplates200ResponseInnerWithDefaults instantiates a new ListMessageTemplates200ResponseInner 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 NewListMessageTemplates200ResponseInnerWithDefaults() *ListMessageTemplates200ResponseInner { - this := ListMessageTemplates200ResponseInner{} - return &this -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *ListMessageTemplates200ResponseInner) GetId() int32 { - if o == nil || isNil(o.Id) { - var ret int32 - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ListMessageTemplates200ResponseInner) GetIdOk() (*int32, bool) { - if o == nil || isNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *ListMessageTemplates200ResponseInner) HasId() bool { - if o != nil && !isNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given int32 and assigns it to the Id field. -func (o *ListMessageTemplates200ResponseInner) SetId(v int32) { - o.Id = &v -} - -// GetEnabled returns the Enabled field value if set, zero value otherwise. -func (o *ListMessageTemplates200ResponseInner) GetEnabled() bool { - if o == nil || isNil(o.Enabled) { - 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 *ListMessageTemplates200ResponseInner) GetEnabledOk() (*bool, bool) { - if o == nil || isNil(o.Enabled) { - return nil, false - } - return o.Enabled, true -} - -// HasEnabled returns a boolean if a field has been set. -func (o *ListMessageTemplates200ResponseInner) HasEnabled() bool { - if o != nil && !isNil(o.Enabled) { - return true - } - - return false -} - -// SetEnabled gets a reference to the given bool and assigns it to the Enabled field. -func (o *ListMessageTemplates200ResponseInner) SetEnabled(v bool) { - o.Enabled = &v -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *ListMessageTemplates200ResponseInner) GetName() string { - if o == nil || isNil(o.Name) { - var ret string - return ret - } - return *o.Name -} - -// 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 *ListMessageTemplates200ResponseInner) GetNameOk() (*string, bool) { - if o == nil || isNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *ListMessageTemplates200ResponseInner) HasName() bool { - if o != nil && !isNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *ListMessageTemplates200ResponseInner) SetName(v string) { - o.Name = &v -} - -func (o ListMessageTemplates200ResponseInner) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ListMessageTemplates200ResponseInner) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Id) { - toSerialize["id"] = o.Id - } - if !isNil(o.Enabled) { - toSerialize["enabled"] = o.Enabled - } - if !isNil(o.Name) { - toSerialize["name"] = o.Name - } - return toSerialize, nil -} - -type NullableListMessageTemplates200ResponseInner struct { - value *ListMessageTemplates200ResponseInner - isSet bool -} - -func (v NullableListMessageTemplates200ResponseInner) Get() *ListMessageTemplates200ResponseInner { - return v.value -} - -func (v *NullableListMessageTemplates200ResponseInner) Set(val *ListMessageTemplates200ResponseInner) { - v.value = val - v.isSet = true -} - -func (v NullableListMessageTemplates200ResponseInner) IsSet() bool { - return v.isSet -} - -func (v *NullableListMessageTemplates200ResponseInner) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableListMessageTemplates200ResponseInner(val *ListMessageTemplates200ResponseInner) *NullableListMessageTemplates200ResponseInner { - return &NullableListMessageTemplates200ResponseInner{value: val, isSet: true} -} - -func (v NullableListMessageTemplates200ResponseInner) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableListMessageTemplates200ResponseInner) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_list_privelege_roles_200_response.go b/model_list_privelege_roles_200_response.go deleted file mode 100644 index 84d8de1..0000000 --- a/model_list_privelege_roles_200_response.go +++ /dev/null @@ -1,346 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the ListPrivelegeRoles200Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ListPrivelegeRoles200Response{} - -// ListPrivelegeRoles200Response struct for ListPrivelegeRoles200Response -type ListPrivelegeRoles200Response struct { - Total *int32 `json:"total,omitempty"` - Roles []int32 `json:"roles,omitempty"` - BeforeCursor NullableInt32 `json:"beforeCursor,omitempty"` - PreviousLink NullableString `json:"previousLink,omitempty"` - AfterCursor NullableInt32 `json:"afterCursor,omitempty"` - NextLink NullableString `json:"nextLink,omitempty"` -} - -// NewListPrivelegeRoles200Response instantiates a new ListPrivelegeRoles200Response 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 NewListPrivelegeRoles200Response() *ListPrivelegeRoles200Response { - this := ListPrivelegeRoles200Response{} - return &this -} - -// NewListPrivelegeRoles200ResponseWithDefaults instantiates a new ListPrivelegeRoles200Response 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 NewListPrivelegeRoles200ResponseWithDefaults() *ListPrivelegeRoles200Response { - this := ListPrivelegeRoles200Response{} - return &this -} - -// GetTotal returns the Total field value if set, zero value otherwise. -func (o *ListPrivelegeRoles200Response) GetTotal() int32 { - if o == nil || isNil(o.Total) { - var ret int32 - return ret - } - return *o.Total -} - -// GetTotalOk returns a tuple with the Total field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ListPrivelegeRoles200Response) GetTotalOk() (*int32, bool) { - if o == nil || isNil(o.Total) { - return nil, false - } - return o.Total, true -} - -// HasTotal returns a boolean if a field has been set. -func (o *ListPrivelegeRoles200Response) HasTotal() bool { - if o != nil && !isNil(o.Total) { - return true - } - - return false -} - -// SetTotal gets a reference to the given int32 and assigns it to the Total field. -func (o *ListPrivelegeRoles200Response) SetTotal(v int32) { - o.Total = &v -} - -// GetRoles returns the Roles field value if set, zero value otherwise. -func (o *ListPrivelegeRoles200Response) GetRoles() []int32 { - if o == nil || isNil(o.Roles) { - var ret []int32 - return ret - } - return o.Roles -} - -// GetRolesOk returns a tuple with the Roles field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ListPrivelegeRoles200Response) GetRolesOk() ([]int32, bool) { - if o == nil || isNil(o.Roles) { - return nil, false - } - return o.Roles, true -} - -// HasRoles returns a boolean if a field has been set. -func (o *ListPrivelegeRoles200Response) HasRoles() bool { - if o != nil && !isNil(o.Roles) { - return true - } - - return false -} - -// SetRoles gets a reference to the given []int32 and assigns it to the Roles field. -func (o *ListPrivelegeRoles200Response) SetRoles(v []int32) { - o.Roles = v -} - -// GetBeforeCursor returns the BeforeCursor field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *ListPrivelegeRoles200Response) GetBeforeCursor() int32 { - if o == nil || isNil(o.BeforeCursor.Get()) { - var ret int32 - return ret - } - return *o.BeforeCursor.Get() -} - -// GetBeforeCursorOk returns a tuple with the BeforeCursor 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 *ListPrivelegeRoles200Response) GetBeforeCursorOk() (*int32, bool) { - if o == nil { - return nil, false - } - return o.BeforeCursor.Get(), o.BeforeCursor.IsSet() -} - -// HasBeforeCursor returns a boolean if a field has been set. -func (o *ListPrivelegeRoles200Response) HasBeforeCursor() bool { - if o != nil && o.BeforeCursor.IsSet() { - return true - } - - return false -} - -// SetBeforeCursor gets a reference to the given NullableInt32 and assigns it to the BeforeCursor field. -func (o *ListPrivelegeRoles200Response) SetBeforeCursor(v int32) { - o.BeforeCursor.Set(&v) -} -// SetBeforeCursorNil sets the value for BeforeCursor to be an explicit nil -func (o *ListPrivelegeRoles200Response) SetBeforeCursorNil() { - o.BeforeCursor.Set(nil) -} - -// UnsetBeforeCursor ensures that no value is present for BeforeCursor, not even an explicit nil -func (o *ListPrivelegeRoles200Response) UnsetBeforeCursor() { - o.BeforeCursor.Unset() -} - -// GetPreviousLink returns the PreviousLink field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *ListPrivelegeRoles200Response) GetPreviousLink() string { - if o == nil || isNil(o.PreviousLink.Get()) { - var ret string - return ret - } - return *o.PreviousLink.Get() -} - -// GetPreviousLinkOk returns a tuple with the PreviousLink 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 *ListPrivelegeRoles200Response) GetPreviousLinkOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.PreviousLink.Get(), o.PreviousLink.IsSet() -} - -// HasPreviousLink returns a boolean if a field has been set. -func (o *ListPrivelegeRoles200Response) HasPreviousLink() bool { - if o != nil && o.PreviousLink.IsSet() { - return true - } - - return false -} - -// SetPreviousLink gets a reference to the given NullableString and assigns it to the PreviousLink field. -func (o *ListPrivelegeRoles200Response) SetPreviousLink(v string) { - o.PreviousLink.Set(&v) -} -// SetPreviousLinkNil sets the value for PreviousLink to be an explicit nil -func (o *ListPrivelegeRoles200Response) SetPreviousLinkNil() { - o.PreviousLink.Set(nil) -} - -// UnsetPreviousLink ensures that no value is present for PreviousLink, not even an explicit nil -func (o *ListPrivelegeRoles200Response) UnsetPreviousLink() { - o.PreviousLink.Unset() -} - -// GetAfterCursor returns the AfterCursor field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *ListPrivelegeRoles200Response) GetAfterCursor() int32 { - if o == nil || isNil(o.AfterCursor.Get()) { - var ret int32 - return ret - } - return *o.AfterCursor.Get() -} - -// GetAfterCursorOk returns a tuple with the AfterCursor 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 *ListPrivelegeRoles200Response) GetAfterCursorOk() (*int32, bool) { - if o == nil { - return nil, false - } - return o.AfterCursor.Get(), o.AfterCursor.IsSet() -} - -// HasAfterCursor returns a boolean if a field has been set. -func (o *ListPrivelegeRoles200Response) HasAfterCursor() bool { - if o != nil && o.AfterCursor.IsSet() { - return true - } - - return false -} - -// SetAfterCursor gets a reference to the given NullableInt32 and assigns it to the AfterCursor field. -func (o *ListPrivelegeRoles200Response) SetAfterCursor(v int32) { - o.AfterCursor.Set(&v) -} -// SetAfterCursorNil sets the value for AfterCursor to be an explicit nil -func (o *ListPrivelegeRoles200Response) SetAfterCursorNil() { - o.AfterCursor.Set(nil) -} - -// UnsetAfterCursor ensures that no value is present for AfterCursor, not even an explicit nil -func (o *ListPrivelegeRoles200Response) UnsetAfterCursor() { - o.AfterCursor.Unset() -} - -// GetNextLink returns the NextLink field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *ListPrivelegeRoles200Response) GetNextLink() string { - if o == nil || isNil(o.NextLink.Get()) { - var ret string - return ret - } - return *o.NextLink.Get() -} - -// GetNextLinkOk returns a tuple with the NextLink 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 *ListPrivelegeRoles200Response) GetNextLinkOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.NextLink.Get(), o.NextLink.IsSet() -} - -// HasNextLink returns a boolean if a field has been set. -func (o *ListPrivelegeRoles200Response) HasNextLink() bool { - if o != nil && o.NextLink.IsSet() { - return true - } - - return false -} - -// SetNextLink gets a reference to the given NullableString and assigns it to the NextLink field. -func (o *ListPrivelegeRoles200Response) SetNextLink(v string) { - o.NextLink.Set(&v) -} -// SetNextLinkNil sets the value for NextLink to be an explicit nil -func (o *ListPrivelegeRoles200Response) SetNextLinkNil() { - o.NextLink.Set(nil) -} - -// UnsetNextLink ensures that no value is present for NextLink, not even an explicit nil -func (o *ListPrivelegeRoles200Response) UnsetNextLink() { - o.NextLink.Unset() -} - -func (o ListPrivelegeRoles200Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ListPrivelegeRoles200Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Total) { - toSerialize["total"] = o.Total - } - if !isNil(o.Roles) { - toSerialize["roles"] = o.Roles - } - if o.BeforeCursor.IsSet() { - toSerialize["beforeCursor"] = o.BeforeCursor.Get() - } - if o.PreviousLink.IsSet() { - toSerialize["previousLink"] = o.PreviousLink.Get() - } - if o.AfterCursor.IsSet() { - toSerialize["afterCursor"] = o.AfterCursor.Get() - } - if o.NextLink.IsSet() { - toSerialize["nextLink"] = o.NextLink.Get() - } - return toSerialize, nil -} - -type NullableListPrivelegeRoles200Response struct { - value *ListPrivelegeRoles200Response - isSet bool -} - -func (v NullableListPrivelegeRoles200Response) Get() *ListPrivelegeRoles200Response { - return v.value -} - -func (v *NullableListPrivelegeRoles200Response) Set(val *ListPrivelegeRoles200Response) { - v.value = val - v.isSet = true -} - -func (v NullableListPrivelegeRoles200Response) IsSet() bool { - return v.isSet -} - -func (v *NullableListPrivelegeRoles200Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableListPrivelegeRoles200Response(val *ListPrivelegeRoles200Response) *NullableListPrivelegeRoles200Response { - return &NullableListPrivelegeRoles200Response{value: val, isSet: true} -} - -func (v NullableListPrivelegeRoles200Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableListPrivelegeRoles200Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_locale.go b/model_locale.go deleted file mode 100644 index 5f2af70..0000000 --- a/model_locale.go +++ /dev/null @@ -1,164 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the Locale type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Locale{} - -// Locale struct for Locale -type Locale struct { - // locale string - Language *string `json:"language,omitempty"` - // indicator if language is default - IsDefault *bool `json:"is_default,omitempty"` -} - -// NewLocale instantiates a new Locale 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 NewLocale() *Locale { - this := Locale{} - return &this -} - -// NewLocaleWithDefaults instantiates a new Locale 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 NewLocaleWithDefaults() *Locale { - this := Locale{} - return &this -} - -// GetLanguage returns the Language field value if set, zero value otherwise. -func (o *Locale) GetLanguage() string { - if o == nil || isNil(o.Language) { - var ret string - return ret - } - return *o.Language -} - -// GetLanguageOk returns a tuple with the Language field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Locale) GetLanguageOk() (*string, bool) { - if o == nil || isNil(o.Language) { - return nil, false - } - return o.Language, true -} - -// HasLanguage returns a boolean if a field has been set. -func (o *Locale) HasLanguage() bool { - if o != nil && !isNil(o.Language) { - return true - } - - return false -} - -// SetLanguage gets a reference to the given string and assigns it to the Language field. -func (o *Locale) SetLanguage(v string) { - o.Language = &v -} - -// GetIsDefault returns the IsDefault field value if set, zero value otherwise. -func (o *Locale) GetIsDefault() bool { - if o == nil || isNil(o.IsDefault) { - var ret bool - return ret - } - return *o.IsDefault -} - -// GetIsDefaultOk returns a tuple with the IsDefault field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Locale) GetIsDefaultOk() (*bool, bool) { - if o == nil || isNil(o.IsDefault) { - return nil, false - } - return o.IsDefault, true -} - -// HasIsDefault returns a boolean if a field has been set. -func (o *Locale) HasIsDefault() bool { - if o != nil && !isNil(o.IsDefault) { - return true - } - - return false -} - -// SetIsDefault gets a reference to the given bool and assigns it to the IsDefault field. -func (o *Locale) SetIsDefault(v bool) { - o.IsDefault = &v -} - -func (o Locale) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Locale) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Language) { - toSerialize["language"] = o.Language - } - if !isNil(o.IsDefault) { - toSerialize["is_default"] = o.IsDefault - } - return toSerialize, nil -} - -type NullableLocale struct { - value *Locale - isSet bool -} - -func (v NullableLocale) Get() *Locale { - return v.value -} - -func (v *NullableLocale) Set(val *Locale) { - v.value = val - v.isSet = true -} - -func (v NullableLocale) IsSet() bool { - return v.isSet -} - -func (v *NullableLocale) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableLocale(val *Locale) *NullableLocale { - return &NullableLocale{value: val, isSet: true} -} - -func (v NullableLocale) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableLocale) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_lock_account_user_request.go b/model_lock_account_user_request.go deleted file mode 100644 index 508c978..0000000 --- a/model_lock_account_user_request.go +++ /dev/null @@ -1,118 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the LockAccountUserRequest type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &LockAccountUserRequest{} - -// LockAccountUserRequest struct for LockAccountUserRequest -type LockAccountUserRequest struct { - // Set to the number of minutes for which you want to lock the user account. Set to 0 if you want to lock the user account based on the Lock effective period set in the policy assigned to the user. If no policy is assigned to the user, setting this value to 0 will lock the user’s account until you unlock it Note that this value can not be less time that the Lock Effective Period specified on a user policy. - LockedUntil int32 `json:"locked_until"` -} - -// NewLockAccountUserRequest instantiates a new LockAccountUserRequest 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 NewLockAccountUserRequest(lockedUntil int32) *LockAccountUserRequest { - this := LockAccountUserRequest{} - this.LockedUntil = lockedUntil - return &this -} - -// NewLockAccountUserRequestWithDefaults instantiates a new LockAccountUserRequest 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 NewLockAccountUserRequestWithDefaults() *LockAccountUserRequest { - this := LockAccountUserRequest{} - return &this -} - -// GetLockedUntil returns the LockedUntil field value -func (o *LockAccountUserRequest) GetLockedUntil() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.LockedUntil -} - -// GetLockedUntilOk returns a tuple with the LockedUntil field value -// and a boolean to check if the value has been set. -func (o *LockAccountUserRequest) GetLockedUntilOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.LockedUntil, true -} - -// SetLockedUntil sets field value -func (o *LockAccountUserRequest) SetLockedUntil(v int32) { - o.LockedUntil = v -} - -func (o LockAccountUserRequest) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o LockAccountUserRequest) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["locked_until"] = o.LockedUntil - return toSerialize, nil -} - -type NullableLockAccountUserRequest struct { - value *LockAccountUserRequest - isSet bool -} - -func (v NullableLockAccountUserRequest) Get() *LockAccountUserRequest { - return v.value -} - -func (v *NullableLockAccountUserRequest) Set(val *LockAccountUserRequest) { - v.value = val - v.isSet = true -} - -func (v NullableLockAccountUserRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableLockAccountUserRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableLockAccountUserRequest(val *LockAccountUserRequest) *NullableLockAccountUserRequest { - return &NullableLockAccountUserRequest{value: val, isSet: true} -} - -func (v NullableLockAccountUserRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableLockAccountUserRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_mapping.go b/model_mapping.go deleted file mode 100644 index 03d7ef7..0000000 --- a/model_mapping.go +++ /dev/null @@ -1,294 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the Mapping type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Mapping{} - -// Mapping struct for Mapping -type Mapping struct { - Id *int32 `json:"id,omitempty"` - // The name of the mapping. - Name string `json:"name"` - // Indicates if the mapping is enabled or not. - Enabled bool `json:"enabled"` - // Indicates how conditions should be matched. - Match string `json:"match"` - // Indicates the order of the mapping. When `null` this will default to last position. - Position int32 `json:"position"` - // An array of conditions that the user must meet in order for the mapping to be applied. - Conditions []Condition `json:"conditions"` - // An array of actions that will be applied to the users that are matched by the conditions. - Actions []ActionObj `json:"actions"` -} - -// NewMapping instantiates a new Mapping 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 NewMapping(name string, enabled bool, match string, position int32, conditions []Condition, actions []ActionObj) *Mapping { - this := Mapping{} - this.Name = name - this.Enabled = enabled - this.Match = match - this.Position = position - this.Conditions = conditions - this.Actions = actions - return &this -} - -// NewMappingWithDefaults instantiates a new Mapping 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 NewMappingWithDefaults() *Mapping { - this := Mapping{} - return &this -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *Mapping) GetId() int32 { - if o == nil || isNil(o.Id) { - var ret int32 - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Mapping) GetIdOk() (*int32, bool) { - if o == nil || isNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *Mapping) HasId() bool { - if o != nil && !isNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given int32 and assigns it to the Id field. -func (o *Mapping) SetId(v int32) { - o.Id = &v -} - -// GetName returns the Name field value -func (o *Mapping) 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 *Mapping) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *Mapping) SetName(v string) { - o.Name = v -} - -// GetEnabled returns the Enabled field value -func (o *Mapping) GetEnabled() bool { - if o == nil { - var ret bool - return ret - } - - return o.Enabled -} - -// GetEnabledOk returns a tuple with the Enabled field value -// and a boolean to check if the value has been set. -func (o *Mapping) GetEnabledOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.Enabled, true -} - -// SetEnabled sets field value -func (o *Mapping) SetEnabled(v bool) { - o.Enabled = v -} - -// GetMatch returns the Match field value -func (o *Mapping) GetMatch() string { - if o == nil { - var ret string - return ret - } - - return o.Match -} - -// GetMatchOk returns a tuple with the Match field value -// and a boolean to check if the value has been set. -func (o *Mapping) GetMatchOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Match, true -} - -// SetMatch sets field value -func (o *Mapping) SetMatch(v string) { - o.Match = v -} - -// GetPosition returns the Position field value -func (o *Mapping) GetPosition() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.Position -} - -// GetPositionOk returns a tuple with the Position field value -// and a boolean to check if the value has been set. -func (o *Mapping) GetPositionOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.Position, true -} - -// SetPosition sets field value -func (o *Mapping) SetPosition(v int32) { - o.Position = v -} - -// GetConditions returns the Conditions field value -func (o *Mapping) GetConditions() []Condition { - if o == nil { - var ret []Condition - return ret - } - - return o.Conditions -} - -// GetConditionsOk returns a tuple with the Conditions field value -// and a boolean to check if the value has been set. -func (o *Mapping) GetConditionsOk() ([]Condition, bool) { - if o == nil { - return nil, false - } - return o.Conditions, true -} - -// SetConditions sets field value -func (o *Mapping) SetConditions(v []Condition) { - o.Conditions = v -} - -// GetActions returns the Actions field value -func (o *Mapping) GetActions() []ActionObj { - if o == nil { - var ret []ActionObj - return ret - } - - return o.Actions -} - -// GetActionsOk returns a tuple with the Actions field value -// and a boolean to check if the value has been set. -func (o *Mapping) GetActionsOk() ([]ActionObj, bool) { - if o == nil { - return nil, false - } - return o.Actions, true -} - -// SetActions sets field value -func (o *Mapping) SetActions(v []ActionObj) { - o.Actions = v -} - -func (o Mapping) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Mapping) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Id) { - toSerialize["id"] = o.Id - } - toSerialize["name"] = o.Name - toSerialize["enabled"] = o.Enabled - toSerialize["match"] = o.Match - toSerialize["position"] = o.Position - toSerialize["conditions"] = o.Conditions - toSerialize["actions"] = o.Actions - return toSerialize, nil -} - -type NullableMapping struct { - value *Mapping - isSet bool -} - -func (v NullableMapping) Get() *Mapping { - return v.value -} - -func (v *NullableMapping) Set(val *Mapping) { - v.value = val - v.isSet = true -} - -func (v NullableMapping) IsSet() bool { - return v.isSet -} - -func (v *NullableMapping) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableMapping(val *Mapping) *NullableMapping { - return &NullableMapping{value: val, isSet: true} -} - -func (v NullableMapping) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableMapping) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_message_template.go b/model_message_template.go deleted file mode 100644 index 120626b..0000000 --- a/model_message_template.go +++ /dev/null @@ -1,345 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the MessageTemplate type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &MessageTemplate{} - -// MessageTemplate struct for MessageTemplate -type MessageTemplate struct { - Id *int32 `json:"id,omitempty"` - AccountId *int32 `json:"account_id,omitempty"` - // Template type that describes the source (sms, voice, email) and purpose (registration, invite, etc) - Type string `json:"type"` - // The 2 character language locale for the template. e.g. en = English, es = Spanish - Locale string `json:"locale"` - Template MessageTemplateTemplate `json:"template"` - TemplateClass *string `json:"template_class,omitempty"` - // Last time template was updated - UpdatedAt *string `json:"updated_at,omitempty"` - // brand id number - BrandId *int32 `json:"brand_id,omitempty"` -} - -// NewMessageTemplate instantiates a new MessageTemplate 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 NewMessageTemplate(type_ string, locale string, template MessageTemplateTemplate) *MessageTemplate { - this := MessageTemplate{} - this.Type = type_ - this.Locale = locale - this.Template = template - return &this -} - -// NewMessageTemplateWithDefaults instantiates a new MessageTemplate 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 NewMessageTemplateWithDefaults() *MessageTemplate { - this := MessageTemplate{} - return &this -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *MessageTemplate) GetId() int32 { - if o == nil || isNil(o.Id) { - var ret int32 - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *MessageTemplate) GetIdOk() (*int32, bool) { - if o == nil || isNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *MessageTemplate) HasId() bool { - if o != nil && !isNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given int32 and assigns it to the Id field. -func (o *MessageTemplate) SetId(v int32) { - o.Id = &v -} - -// GetAccountId returns the AccountId field value if set, zero value otherwise. -func (o *MessageTemplate) GetAccountId() int32 { - if o == nil || isNil(o.AccountId) { - var ret int32 - return ret - } - return *o.AccountId -} - -// GetAccountIdOk returns a tuple with the AccountId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *MessageTemplate) GetAccountIdOk() (*int32, bool) { - if o == nil || isNil(o.AccountId) { - return nil, false - } - return o.AccountId, true -} - -// HasAccountId returns a boolean if a field has been set. -func (o *MessageTemplate) HasAccountId() bool { - if o != nil && !isNil(o.AccountId) { - return true - } - - return false -} - -// SetAccountId gets a reference to the given int32 and assigns it to the AccountId field. -func (o *MessageTemplate) SetAccountId(v int32) { - o.AccountId = &v -} - -// GetType returns the Type field value -func (o *MessageTemplate) GetType() string { - if o == nil { - var ret string - return ret - } - - return o.Type -} - -// GetTypeOk returns a tuple with the Type field value -// and a boolean to check if the value has been set. -func (o *MessageTemplate) GetTypeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Type, true -} - -// SetType sets field value -func (o *MessageTemplate) SetType(v string) { - o.Type = v -} - -// GetLocale returns the Locale field value -func (o *MessageTemplate) GetLocale() string { - if o == nil { - var ret string - return ret - } - - return o.Locale -} - -// GetLocaleOk returns a tuple with the Locale field value -// and a boolean to check if the value has been set. -func (o *MessageTemplate) GetLocaleOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Locale, true -} - -// SetLocale sets field value -func (o *MessageTemplate) SetLocale(v string) { - o.Locale = v -} - -// GetTemplate returns the Template field value -func (o *MessageTemplate) GetTemplate() MessageTemplateTemplate { - if o == nil { - var ret MessageTemplateTemplate - return ret - } - - return o.Template -} - -// GetTemplateOk returns a tuple with the Template field value -// and a boolean to check if the value has been set. -func (o *MessageTemplate) GetTemplateOk() (*MessageTemplateTemplate, bool) { - if o == nil { - return nil, false - } - return &o.Template, true -} - -// SetTemplate sets field value -func (o *MessageTemplate) SetTemplate(v MessageTemplateTemplate) { - o.Template = v -} - -// GetTemplateClass returns the TemplateClass field value if set, zero value otherwise. -func (o *MessageTemplate) GetTemplateClass() string { - if o == nil || isNil(o.TemplateClass) { - var ret string - return ret - } - return *o.TemplateClass -} - -// GetTemplateClassOk returns a tuple with the TemplateClass field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *MessageTemplate) GetTemplateClassOk() (*string, bool) { - if o == nil || isNil(o.TemplateClass) { - return nil, false - } - return o.TemplateClass, true -} - -// HasTemplateClass returns a boolean if a field has been set. -func (o *MessageTemplate) HasTemplateClass() bool { - if o != nil && !isNil(o.TemplateClass) { - return true - } - - return false -} - -// SetTemplateClass gets a reference to the given string and assigns it to the TemplateClass field. -func (o *MessageTemplate) SetTemplateClass(v string) { - o.TemplateClass = &v -} - -// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. -func (o *MessageTemplate) GetUpdatedAt() string { - if o == nil || isNil(o.UpdatedAt) { - var ret string - return ret - } - return *o.UpdatedAt -} - -// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *MessageTemplate) GetUpdatedAtOk() (*string, bool) { - if o == nil || isNil(o.UpdatedAt) { - return nil, false - } - return o.UpdatedAt, true -} - -// HasUpdatedAt returns a boolean if a field has been set. -func (o *MessageTemplate) HasUpdatedAt() bool { - if o != nil && !isNil(o.UpdatedAt) { - return true - } - - return false -} - -// SetUpdatedAt gets a reference to the given string and assigns it to the UpdatedAt field. -func (o *MessageTemplate) SetUpdatedAt(v string) { - o.UpdatedAt = &v -} - -// GetBrandId returns the BrandId field value if set, zero value otherwise. -func (o *MessageTemplate) GetBrandId() int32 { - if o == nil || isNil(o.BrandId) { - var ret int32 - return ret - } - return *o.BrandId -} - -// GetBrandIdOk returns a tuple with the BrandId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *MessageTemplate) GetBrandIdOk() (*int32, bool) { - if o == nil || isNil(o.BrandId) { - return nil, false - } - return o.BrandId, true -} - -// HasBrandId returns a boolean if a field has been set. -func (o *MessageTemplate) HasBrandId() bool { - if o != nil && !isNil(o.BrandId) { - return true - } - - return false -} - -// SetBrandId gets a reference to the given int32 and assigns it to the BrandId field. -func (o *MessageTemplate) SetBrandId(v int32) { - o.BrandId = &v -} - -func (o MessageTemplate) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o MessageTemplate) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - // skip: id is readOnly - // skip: account_id is readOnly - toSerialize["type"] = o.Type - toSerialize["locale"] = o.Locale - toSerialize["template"] = o.Template - // skip: template_class is readOnly - // skip: updated_at is readOnly - // skip: brand_id is readOnly - return toSerialize, nil -} - -type NullableMessageTemplate struct { - value *MessageTemplate - isSet bool -} - -func (v NullableMessageTemplate) Get() *MessageTemplate { - return v.value -} - -func (v *NullableMessageTemplate) Set(val *MessageTemplate) { - v.value = val - v.isSet = true -} - -func (v NullableMessageTemplate) IsSet() bool { - return v.isSet -} - -func (v *NullableMessageTemplate) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableMessageTemplate(val *MessageTemplate) *NullableMessageTemplate { - return &NullableMessageTemplate{value: val, isSet: true} -} - -func (v NullableMessageTemplate) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableMessageTemplate) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_message_template_template.go b/model_message_template_template.go deleted file mode 100644 index 8ed9aaf..0000000 --- a/model_message_template_template.go +++ /dev/null @@ -1,148 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" - "fmt" -) - -// MessageTemplateTemplate - struct for MessageTemplateTemplate -type MessageTemplateTemplate struct { - MessageTemplateTemplateOneOf *MessageTemplateTemplateOneOf - MessageTemplateTemplateOneOf1 *MessageTemplateTemplateOneOf1 -} - -// MessageTemplateTemplateOneOfAsMessageTemplateTemplate is a convenience function that returns MessageTemplateTemplateOneOf wrapped in MessageTemplateTemplate -func MessageTemplateTemplateOneOfAsMessageTemplateTemplate(v *MessageTemplateTemplateOneOf) MessageTemplateTemplate { - return MessageTemplateTemplate{ - MessageTemplateTemplateOneOf: v, - } -} - -// MessageTemplateTemplateOneOf1AsMessageTemplateTemplate is a convenience function that returns MessageTemplateTemplateOneOf1 wrapped in MessageTemplateTemplate -func MessageTemplateTemplateOneOf1AsMessageTemplateTemplate(v *MessageTemplateTemplateOneOf1) MessageTemplateTemplate { - return MessageTemplateTemplate{ - MessageTemplateTemplateOneOf1: v, - } -} - - -// Unmarshal JSON data into one of the pointers in the struct -func (dst *MessageTemplateTemplate) UnmarshalJSON(data []byte) error { - var err error - match := 0 - // try to unmarshal data into MessageTemplateTemplateOneOf - err = newStrictDecoder(data).Decode(&dst.MessageTemplateTemplateOneOf) - if err == nil { - jsonMessageTemplateTemplateOneOf, _ := json.Marshal(dst.MessageTemplateTemplateOneOf) - if string(jsonMessageTemplateTemplateOneOf) == "{}" { // empty struct - dst.MessageTemplateTemplateOneOf = nil - } else { - match++ - } - } else { - dst.MessageTemplateTemplateOneOf = nil - } - - // try to unmarshal data into MessageTemplateTemplateOneOf1 - err = newStrictDecoder(data).Decode(&dst.MessageTemplateTemplateOneOf1) - if err == nil { - jsonMessageTemplateTemplateOneOf1, _ := json.Marshal(dst.MessageTemplateTemplateOneOf1) - if string(jsonMessageTemplateTemplateOneOf1) == "{}" { // empty struct - dst.MessageTemplateTemplateOneOf1 = nil - } else { - match++ - } - } else { - dst.MessageTemplateTemplateOneOf1 = nil - } - - if match > 1 { // more than 1 match - // reset to nil - dst.MessageTemplateTemplateOneOf = nil - dst.MessageTemplateTemplateOneOf1 = nil - - return fmt.Errorf("data matches more than one schema in oneOf(MessageTemplateTemplate)") - } else if match == 1 { - return nil // exactly one match - } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf(MessageTemplateTemplate)") - } -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src MessageTemplateTemplate) MarshalJSON() ([]byte, error) { - if src.MessageTemplateTemplateOneOf != nil { - return json.Marshal(&src.MessageTemplateTemplateOneOf) - } - - if src.MessageTemplateTemplateOneOf1 != nil { - return json.Marshal(&src.MessageTemplateTemplateOneOf1) - } - - return nil, nil // no data in oneOf schemas -} - -// Get the actual instance -func (obj *MessageTemplateTemplate) GetActualInstance() (interface{}) { - if obj == nil { - return nil - } - if obj.MessageTemplateTemplateOneOf != nil { - return obj.MessageTemplateTemplateOneOf - } - - if obj.MessageTemplateTemplateOneOf1 != nil { - return obj.MessageTemplateTemplateOneOf1 - } - - // all schemas are nil - return nil -} - -type NullableMessageTemplateTemplate struct { - value *MessageTemplateTemplate - isSet bool -} - -func (v NullableMessageTemplateTemplate) Get() *MessageTemplateTemplate { - return v.value -} - -func (v *NullableMessageTemplateTemplate) Set(val *MessageTemplateTemplate) { - v.value = val - v.isSet = true -} - -func (v NullableMessageTemplateTemplate) IsSet() bool { - return v.isSet -} - -func (v *NullableMessageTemplateTemplate) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableMessageTemplateTemplate(val *MessageTemplateTemplate) *NullableMessageTemplateTemplate { - return &NullableMessageTemplateTemplate{value: val, isSet: true} -} - -func (v NullableMessageTemplateTemplate) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableMessageTemplateTemplate) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_message_template_template_one_of.go b/model_message_template_template_one_of.go deleted file mode 100644 index c1857c0..0000000 --- a/model_message_template_template_one_of.go +++ /dev/null @@ -1,174 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the MessageTemplateTemplateOneOf type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &MessageTemplateTemplateOneOf{} - -// MessageTemplateTemplateOneOf struct for MessageTemplateTemplateOneOf -type MessageTemplateTemplateOneOf struct { - // Custom Email Subject - Subject string `json:"subject"` - // The HTML body of the Custom Email - Html string `json:"html"` - // The Plain text body of the email - Plain string `json:"plain"` -} - -// NewMessageTemplateTemplateOneOf instantiates a new MessageTemplateTemplateOneOf 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 NewMessageTemplateTemplateOneOf(subject string, html string, plain string) *MessageTemplateTemplateOneOf { - this := MessageTemplateTemplateOneOf{} - this.Subject = subject - this.Html = html - this.Plain = plain - return &this -} - -// NewMessageTemplateTemplateOneOfWithDefaults instantiates a new MessageTemplateTemplateOneOf 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 NewMessageTemplateTemplateOneOfWithDefaults() *MessageTemplateTemplateOneOf { - this := MessageTemplateTemplateOneOf{} - return &this -} - -// GetSubject returns the Subject field value -func (o *MessageTemplateTemplateOneOf) GetSubject() string { - if o == nil { - var ret string - return ret - } - - return o.Subject -} - -// GetSubjectOk returns a tuple with the Subject field value -// and a boolean to check if the value has been set. -func (o *MessageTemplateTemplateOneOf) GetSubjectOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Subject, true -} - -// SetSubject sets field value -func (o *MessageTemplateTemplateOneOf) SetSubject(v string) { - o.Subject = v -} - -// GetHtml returns the Html field value -func (o *MessageTemplateTemplateOneOf) GetHtml() string { - if o == nil { - var ret string - return ret - } - - return o.Html -} - -// GetHtmlOk returns a tuple with the Html field value -// and a boolean to check if the value has been set. -func (o *MessageTemplateTemplateOneOf) GetHtmlOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Html, true -} - -// SetHtml sets field value -func (o *MessageTemplateTemplateOneOf) SetHtml(v string) { - o.Html = v -} - -// GetPlain returns the Plain field value -func (o *MessageTemplateTemplateOneOf) GetPlain() string { - if o == nil { - var ret string - return ret - } - - return o.Plain -} - -// GetPlainOk returns a tuple with the Plain field value -// and a boolean to check if the value has been set. -func (o *MessageTemplateTemplateOneOf) GetPlainOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Plain, true -} - -// SetPlain sets field value -func (o *MessageTemplateTemplateOneOf) SetPlain(v string) { - o.Plain = v -} - -func (o MessageTemplateTemplateOneOf) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o MessageTemplateTemplateOneOf) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["subject"] = o.Subject - toSerialize["html"] = o.Html - toSerialize["plain"] = o.Plain - return toSerialize, nil -} - -type NullableMessageTemplateTemplateOneOf struct { - value *MessageTemplateTemplateOneOf - isSet bool -} - -func (v NullableMessageTemplateTemplateOneOf) Get() *MessageTemplateTemplateOneOf { - return v.value -} - -func (v *NullableMessageTemplateTemplateOneOf) Set(val *MessageTemplateTemplateOneOf) { - v.value = val - v.isSet = true -} - -func (v NullableMessageTemplateTemplateOneOf) IsSet() bool { - return v.isSet -} - -func (v *NullableMessageTemplateTemplateOneOf) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableMessageTemplateTemplateOneOf(val *MessageTemplateTemplateOneOf) *NullableMessageTemplateTemplateOneOf { - return &NullableMessageTemplateTemplateOneOf{value: val, isSet: true} -} - -func (v NullableMessageTemplateTemplateOneOf) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableMessageTemplateTemplateOneOf) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_message_template_template_one_of_1.go b/model_message_template_template_one_of_1.go deleted file mode 100644 index 247d557..0000000 --- a/model_message_template_template_one_of_1.go +++ /dev/null @@ -1,118 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the MessageTemplateTemplateOneOf1 type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &MessageTemplateTemplateOneOf1{} - -// MessageTemplateTemplateOneOf1 struct for MessageTemplateTemplateOneOf1 -type MessageTemplateTemplateOneOf1 struct { - // The body of the SMS message. Max length 160 characters. - Message string `json:"message"` -} - -// NewMessageTemplateTemplateOneOf1 instantiates a new MessageTemplateTemplateOneOf1 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 NewMessageTemplateTemplateOneOf1(message string) *MessageTemplateTemplateOneOf1 { - this := MessageTemplateTemplateOneOf1{} - this.Message = message - return &this -} - -// NewMessageTemplateTemplateOneOf1WithDefaults instantiates a new MessageTemplateTemplateOneOf1 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 NewMessageTemplateTemplateOneOf1WithDefaults() *MessageTemplateTemplateOneOf1 { - this := MessageTemplateTemplateOneOf1{} - return &this -} - -// GetMessage returns the Message field value -func (o *MessageTemplateTemplateOneOf1) GetMessage() string { - if o == nil { - var ret string - return ret - } - - return o.Message -} - -// GetMessageOk returns a tuple with the Message field value -// and a boolean to check if the value has been set. -func (o *MessageTemplateTemplateOneOf1) GetMessageOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Message, true -} - -// SetMessage sets field value -func (o *MessageTemplateTemplateOneOf1) SetMessage(v string) { - o.Message = v -} - -func (o MessageTemplateTemplateOneOf1) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o MessageTemplateTemplateOneOf1) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["message"] = o.Message - return toSerialize, nil -} - -type NullableMessageTemplateTemplateOneOf1 struct { - value *MessageTemplateTemplateOneOf1 - isSet bool -} - -func (v NullableMessageTemplateTemplateOneOf1) Get() *MessageTemplateTemplateOneOf1 { - return v.value -} - -func (v *NullableMessageTemplateTemplateOneOf1) Set(val *MessageTemplateTemplateOneOf1) { - v.value = val - v.isSet = true -} - -func (v NullableMessageTemplateTemplateOneOf1) IsSet() bool { - return v.isSet -} - -func (v *NullableMessageTemplateTemplateOneOf1) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableMessageTemplateTemplateOneOf1(val *MessageTemplateTemplateOneOf1) *NullableMessageTemplateTemplateOneOf1 { - return &NullableMessageTemplateTemplateOneOf1{value: val, isSet: true} -} - -func (v NullableMessageTemplateTemplateOneOf1) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableMessageTemplateTemplateOneOf1) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_oauth_token.go b/model_oauth_token.go deleted file mode 100644 index 405700c..0000000 --- a/model_oauth_token.go +++ /dev/null @@ -1,312 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the OauthToken type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &OauthToken{} - -// OauthToken struct for OauthToken -type OauthToken struct { - // Provides the requested access token. You can use this token to call our resource APIs. - AccessToken *string `json:"access_token,omitempty"` - // Time at which the access token was generated. - CreatedAt *string `json:"created_at,omitempty"` - // Indicates that the generated access token expires in 36,000 seconds, 600 minutes, or 10 hours. An expired access token cannot be used to make resource API calls, but it can still be used along with its associated refresh token to call the Refresh Tokens v2 API. - ExpiresIn *int32 `json:"expires_in,omitempty"` - // deprecated No longer in use - RefreshToken *string `json:"refresh_token,omitempty"` - // Indicates that the generated access token is a bearer token. - TokenType *string `json:"token_type,omitempty"` - // Account ID associated with the API credentials used to generate the token. - AccountId *int32 `json:"account_id,omitempty"` -} - -// NewOauthToken instantiates a new OauthToken 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 NewOauthToken() *OauthToken { - this := OauthToken{} - return &this -} - -// NewOauthTokenWithDefaults instantiates a new OauthToken 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 NewOauthTokenWithDefaults() *OauthToken { - this := OauthToken{} - return &this -} - -// GetAccessToken returns the AccessToken field value if set, zero value otherwise. -func (o *OauthToken) GetAccessToken() string { - if o == nil || isNil(o.AccessToken) { - var ret string - return ret - } - return *o.AccessToken -} - -// GetAccessTokenOk returns a tuple with the AccessToken field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *OauthToken) GetAccessTokenOk() (*string, bool) { - if o == nil || isNil(o.AccessToken) { - return nil, false - } - return o.AccessToken, true -} - -// HasAccessToken returns a boolean if a field has been set. -func (o *OauthToken) HasAccessToken() bool { - if o != nil && !isNil(o.AccessToken) { - return true - } - - return false -} - -// SetAccessToken gets a reference to the given string and assigns it to the AccessToken field. -func (o *OauthToken) SetAccessToken(v string) { - o.AccessToken = &v -} - -// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. -func (o *OauthToken) GetCreatedAt() string { - if o == nil || isNil(o.CreatedAt) { - var ret string - return ret - } - return *o.CreatedAt -} - -// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *OauthToken) GetCreatedAtOk() (*string, bool) { - if o == nil || isNil(o.CreatedAt) { - return nil, false - } - return o.CreatedAt, true -} - -// HasCreatedAt returns a boolean if a field has been set. -func (o *OauthToken) HasCreatedAt() bool { - if o != nil && !isNil(o.CreatedAt) { - return true - } - - return false -} - -// SetCreatedAt gets a reference to the given string and assigns it to the CreatedAt field. -func (o *OauthToken) SetCreatedAt(v string) { - o.CreatedAt = &v -} - -// GetExpiresIn returns the ExpiresIn field value if set, zero value otherwise. -func (o *OauthToken) GetExpiresIn() int32 { - if o == nil || isNil(o.ExpiresIn) { - var ret int32 - return ret - } - return *o.ExpiresIn -} - -// GetExpiresInOk returns a tuple with the ExpiresIn field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *OauthToken) GetExpiresInOk() (*int32, bool) { - if o == nil || isNil(o.ExpiresIn) { - return nil, false - } - return o.ExpiresIn, true -} - -// HasExpiresIn returns a boolean if a field has been set. -func (o *OauthToken) HasExpiresIn() bool { - if o != nil && !isNil(o.ExpiresIn) { - return true - } - - return false -} - -// SetExpiresIn gets a reference to the given int32 and assigns it to the ExpiresIn field. -func (o *OauthToken) SetExpiresIn(v int32) { - o.ExpiresIn = &v -} - -// GetRefreshToken returns the RefreshToken field value if set, zero value otherwise. -func (o *OauthToken) GetRefreshToken() string { - if o == nil || isNil(o.RefreshToken) { - var ret string - return ret - } - return *o.RefreshToken -} - -// GetRefreshTokenOk returns a tuple with the RefreshToken field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *OauthToken) GetRefreshTokenOk() (*string, bool) { - if o == nil || isNil(o.RefreshToken) { - return nil, false - } - return o.RefreshToken, true -} - -// HasRefreshToken returns a boolean if a field has been set. -func (o *OauthToken) HasRefreshToken() bool { - if o != nil && !isNil(o.RefreshToken) { - return true - } - - return false -} - -// SetRefreshToken gets a reference to the given string and assigns it to the RefreshToken field. -func (o *OauthToken) SetRefreshToken(v string) { - o.RefreshToken = &v -} - -// GetTokenType returns the TokenType field value if set, zero value otherwise. -func (o *OauthToken) GetTokenType() string { - if o == nil || isNil(o.TokenType) { - var ret string - return ret - } - return *o.TokenType -} - -// GetTokenTypeOk returns a tuple with the TokenType field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *OauthToken) GetTokenTypeOk() (*string, bool) { - if o == nil || isNil(o.TokenType) { - return nil, false - } - return o.TokenType, true -} - -// HasTokenType returns a boolean if a field has been set. -func (o *OauthToken) HasTokenType() bool { - if o != nil && !isNil(o.TokenType) { - return true - } - - return false -} - -// SetTokenType gets a reference to the given string and assigns it to the TokenType field. -func (o *OauthToken) SetTokenType(v string) { - o.TokenType = &v -} - -// GetAccountId returns the AccountId field value if set, zero value otherwise. -func (o *OauthToken) GetAccountId() int32 { - if o == nil || isNil(o.AccountId) { - var ret int32 - return ret - } - return *o.AccountId -} - -// GetAccountIdOk returns a tuple with the AccountId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *OauthToken) GetAccountIdOk() (*int32, bool) { - if o == nil || isNil(o.AccountId) { - return nil, false - } - return o.AccountId, true -} - -// HasAccountId returns a boolean if a field has been set. -func (o *OauthToken) HasAccountId() bool { - if o != nil && !isNil(o.AccountId) { - return true - } - - return false -} - -// SetAccountId gets a reference to the given int32 and assigns it to the AccountId field. -func (o *OauthToken) SetAccountId(v int32) { - o.AccountId = &v -} - -func (o OauthToken) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o OauthToken) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.AccessToken) { - toSerialize["access_token"] = o.AccessToken - } - if !isNil(o.CreatedAt) { - toSerialize["created_at"] = o.CreatedAt - } - if !isNil(o.ExpiresIn) { - toSerialize["expires_in"] = o.ExpiresIn - } - if !isNil(o.RefreshToken) { - toSerialize["refresh_token"] = o.RefreshToken - } - if !isNil(o.TokenType) { - toSerialize["token_type"] = o.TokenType - } - if !isNil(o.AccountId) { - toSerialize["account_id"] = o.AccountId - } - return toSerialize, nil -} - -type NullableOauthToken struct { - value *OauthToken - isSet bool -} - -func (v NullableOauthToken) Get() *OauthToken { - return v.value -} - -func (v *NullableOauthToken) Set(val *OauthToken) { - v.value = val - v.isSet = true -} - -func (v NullableOauthToken) IsSet() bool { - return v.isSet -} - -func (v *NullableOauthToken) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableOauthToken(val *OauthToken) *NullableOauthToken { - return &NullableOauthToken{value: val, isSet: true} -} - -func (v NullableOauthToken) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableOauthToken) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_oidc_app.go b/model_oidc_app.go deleted file mode 100644 index 94828a2..0000000 --- a/model_oidc_app.go +++ /dev/null @@ -1,731 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the OidcApp type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &OidcApp{} - -// OidcApp struct for OidcApp -type OidcApp struct { - // Apps unique ID in OneLogin. - Id *int32 `json:"id,omitempty"` - // The name of the app. - Name string `json:"name"` - // Indicates if the app is visible in the OneLogin portal. - Visible bool `json:"visible"` - // Freeform description of the app. - Description string `json:"description"` - // Freeform notes about the app. - Notes *string `json:"notes,omitempty"` - // A link to the apps icon url - IconUrl *string `json:"icon_url,omitempty"` - AuthMethod *AuthMethod `json:"auth_method,omitempty"` - // The security policy assigned to the app. - PolicyId int32 `json:"policy_id"` - // Indicates whether or not administrators can access the app as a user that they have assumed control over. - AllowAssumedSignin *bool `json:"allow_assumed_signin,omitempty"` - // ID of the OneLogin portal tab that the app is assigned to. - TabId *int32 `json:"tab_id,omitempty"` - // ID of the connector to base the app from. - ConnectorId int32 `json:"connector_id"` - // the date the app was created - CreatedAt *string `json:"created_at,omitempty"` - // the date the app was last updated - UpdatedAt *string `json:"updated_at,omitempty"` - // List of Role IDs that are assigned to the app. On App Create or Update the entire array is replaced with the values provided. - RoleIds []int32 `json:"role_ids,omitempty"` - Provisioning *GenericAppProvisioning `json:"provisioning,omitempty"` - Parameters *AppParameters `json:"parameters,omitempty"` - EnforcementPoint *EnforcementPoint `json:"enforcement_point,omitempty"` - Configuration ConfigurationOidc `json:"configuration"` - Sso *SsoOidc `json:"sso,omitempty"` -} - -// NewOidcApp instantiates a new OidcApp 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 NewOidcApp(name string, visible bool, description string, policyId int32, connectorId int32, configuration ConfigurationOidc) *OidcApp { - this := OidcApp{} - this.Name = name - this.Visible = visible - this.Description = description - this.PolicyId = policyId - this.ConnectorId = connectorId - this.Configuration = configuration - return &this -} - -// NewOidcAppWithDefaults instantiates a new OidcApp 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 NewOidcAppWithDefaults() *OidcApp { - this := OidcApp{} - return &this -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *OidcApp) GetId() int32 { - if o == nil || isNil(o.Id) { - var ret int32 - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *OidcApp) GetIdOk() (*int32, bool) { - if o == nil || isNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *OidcApp) HasId() bool { - if o != nil && !isNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given int32 and assigns it to the Id field. -func (o *OidcApp) SetId(v int32) { - o.Id = &v -} - -// GetName returns the Name field value -func (o *OidcApp) 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 *OidcApp) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *OidcApp) SetName(v string) { - o.Name = v -} - -// GetVisible returns the Visible field value -func (o *OidcApp) GetVisible() bool { - if o == nil { - var ret bool - return ret - } - - return o.Visible -} - -// GetVisibleOk returns a tuple with the Visible field value -// and a boolean to check if the value has been set. -func (o *OidcApp) GetVisibleOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.Visible, true -} - -// SetVisible sets field value -func (o *OidcApp) SetVisible(v bool) { - o.Visible = v -} - -// GetDescription returns the Description field value -func (o *OidcApp) GetDescription() string { - if o == nil { - var ret string - return ret - } - - return o.Description -} - -// GetDescriptionOk returns a tuple with the Description field value -// and a boolean to check if the value has been set. -func (o *OidcApp) GetDescriptionOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Description, true -} - -// SetDescription sets field value -func (o *OidcApp) SetDescription(v string) { - o.Description = v -} - -// GetNotes returns the Notes field value if set, zero value otherwise. -func (o *OidcApp) GetNotes() string { - if o == nil || isNil(o.Notes) { - var ret string - return ret - } - return *o.Notes -} - -// GetNotesOk returns a tuple with the Notes field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *OidcApp) GetNotesOk() (*string, bool) { - if o == nil || isNil(o.Notes) { - return nil, false - } - return o.Notes, true -} - -// HasNotes returns a boolean if a field has been set. -func (o *OidcApp) HasNotes() bool { - if o != nil && !isNil(o.Notes) { - return true - } - - return false -} - -// SetNotes gets a reference to the given string and assigns it to the Notes field. -func (o *OidcApp) SetNotes(v string) { - o.Notes = &v -} - -// GetIconUrl returns the IconUrl field value if set, zero value otherwise. -func (o *OidcApp) GetIconUrl() string { - if o == nil || isNil(o.IconUrl) { - var ret string - return ret - } - return *o.IconUrl -} - -// 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 *OidcApp) GetIconUrlOk() (*string, bool) { - if o == nil || isNil(o.IconUrl) { - return nil, false - } - return o.IconUrl, true -} - -// HasIconUrl returns a boolean if a field has been set. -func (o *OidcApp) HasIconUrl() bool { - if o != nil && !isNil(o.IconUrl) { - return true - } - - return false -} - -// SetIconUrl gets a reference to the given string and assigns it to the IconUrl field. -func (o *OidcApp) SetIconUrl(v string) { - o.IconUrl = &v -} - -// GetAuthMethod returns the AuthMethod field value if set, zero value otherwise. -func (o *OidcApp) GetAuthMethod() AuthMethod { - if o == nil || isNil(o.AuthMethod) { - var ret AuthMethod - return ret - } - return *o.AuthMethod -} - -// GetAuthMethodOk returns a tuple with the AuthMethod field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *OidcApp) GetAuthMethodOk() (*AuthMethod, bool) { - if o == nil || isNil(o.AuthMethod) { - return nil, false - } - return o.AuthMethod, true -} - -// HasAuthMethod returns a boolean if a field has been set. -func (o *OidcApp) HasAuthMethod() bool { - if o != nil && !isNil(o.AuthMethod) { - return true - } - - return false -} - -// SetAuthMethod gets a reference to the given AuthMethod and assigns it to the AuthMethod field. -func (o *OidcApp) SetAuthMethod(v AuthMethod) { - o.AuthMethod = &v -} - -// GetPolicyId returns the PolicyId field value -func (o *OidcApp) GetPolicyId() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.PolicyId -} - -// GetPolicyIdOk returns a tuple with the PolicyId field value -// and a boolean to check if the value has been set. -func (o *OidcApp) GetPolicyIdOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.PolicyId, true -} - -// SetPolicyId sets field value -func (o *OidcApp) SetPolicyId(v int32) { - o.PolicyId = v -} - -// GetAllowAssumedSignin returns the AllowAssumedSignin field value if set, zero value otherwise. -func (o *OidcApp) GetAllowAssumedSignin() bool { - if o == nil || isNil(o.AllowAssumedSignin) { - var ret bool - return ret - } - return *o.AllowAssumedSignin -} - -// GetAllowAssumedSigninOk returns a tuple with the AllowAssumedSignin field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *OidcApp) GetAllowAssumedSigninOk() (*bool, bool) { - if o == nil || isNil(o.AllowAssumedSignin) { - return nil, false - } - return o.AllowAssumedSignin, true -} - -// HasAllowAssumedSignin returns a boolean if a field has been set. -func (o *OidcApp) HasAllowAssumedSignin() bool { - if o != nil && !isNil(o.AllowAssumedSignin) { - return true - } - - return false -} - -// SetAllowAssumedSignin gets a reference to the given bool and assigns it to the AllowAssumedSignin field. -func (o *OidcApp) SetAllowAssumedSignin(v bool) { - o.AllowAssumedSignin = &v -} - -// GetTabId returns the TabId field value if set, zero value otherwise. -func (o *OidcApp) GetTabId() int32 { - if o == nil || isNil(o.TabId) { - var ret int32 - return ret - } - return *o.TabId -} - -// GetTabIdOk returns a tuple with the TabId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *OidcApp) GetTabIdOk() (*int32, bool) { - if o == nil || isNil(o.TabId) { - return nil, false - } - return o.TabId, true -} - -// HasTabId returns a boolean if a field has been set. -func (o *OidcApp) HasTabId() bool { - if o != nil && !isNil(o.TabId) { - return true - } - - return false -} - -// SetTabId gets a reference to the given int32 and assigns it to the TabId field. -func (o *OidcApp) SetTabId(v int32) { - o.TabId = &v -} - -// GetConnectorId returns the ConnectorId field value -func (o *OidcApp) GetConnectorId() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.ConnectorId -} - -// GetConnectorIdOk returns a tuple with the ConnectorId field value -// and a boolean to check if the value has been set. -func (o *OidcApp) GetConnectorIdOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.ConnectorId, true -} - -// SetConnectorId sets field value -func (o *OidcApp) SetConnectorId(v int32) { - o.ConnectorId = v -} - -// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. -func (o *OidcApp) GetCreatedAt() string { - if o == nil || isNil(o.CreatedAt) { - var ret string - return ret - } - return *o.CreatedAt -} - -// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *OidcApp) GetCreatedAtOk() (*string, bool) { - if o == nil || isNil(o.CreatedAt) { - return nil, false - } - return o.CreatedAt, true -} - -// HasCreatedAt returns a boolean if a field has been set. -func (o *OidcApp) HasCreatedAt() bool { - if o != nil && !isNil(o.CreatedAt) { - return true - } - - return false -} - -// SetCreatedAt gets a reference to the given string and assigns it to the CreatedAt field. -func (o *OidcApp) SetCreatedAt(v string) { - o.CreatedAt = &v -} - -// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. -func (o *OidcApp) GetUpdatedAt() string { - if o == nil || isNil(o.UpdatedAt) { - var ret string - return ret - } - return *o.UpdatedAt -} - -// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *OidcApp) GetUpdatedAtOk() (*string, bool) { - if o == nil || isNil(o.UpdatedAt) { - return nil, false - } - return o.UpdatedAt, true -} - -// HasUpdatedAt returns a boolean if a field has been set. -func (o *OidcApp) HasUpdatedAt() bool { - if o != nil && !isNil(o.UpdatedAt) { - return true - } - - return false -} - -// SetUpdatedAt gets a reference to the given string and assigns it to the UpdatedAt field. -func (o *OidcApp) SetUpdatedAt(v string) { - o.UpdatedAt = &v -} - -// GetRoleIds returns the RoleIds field value if set, zero value otherwise. -func (o *OidcApp) GetRoleIds() []int32 { - if o == nil || isNil(o.RoleIds) { - var ret []int32 - return ret - } - return o.RoleIds -} - -// GetRoleIdsOk returns a tuple with the RoleIds field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *OidcApp) GetRoleIdsOk() ([]int32, bool) { - if o == nil || isNil(o.RoleIds) { - return nil, false - } - return o.RoleIds, true -} - -// HasRoleIds returns a boolean if a field has been set. -func (o *OidcApp) HasRoleIds() bool { - if o != nil && !isNil(o.RoleIds) { - return true - } - - return false -} - -// SetRoleIds gets a reference to the given []int32 and assigns it to the RoleIds field. -func (o *OidcApp) SetRoleIds(v []int32) { - o.RoleIds = v -} - -// GetProvisioning returns the Provisioning field value if set, zero value otherwise. -func (o *OidcApp) GetProvisioning() GenericAppProvisioning { - if o == nil || isNil(o.Provisioning) { - var ret GenericAppProvisioning - return ret - } - return *o.Provisioning -} - -// GetProvisioningOk returns a tuple with the Provisioning field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *OidcApp) GetProvisioningOk() (*GenericAppProvisioning, bool) { - if o == nil || isNil(o.Provisioning) { - return nil, false - } - return o.Provisioning, true -} - -// HasProvisioning returns a boolean if a field has been set. -func (o *OidcApp) HasProvisioning() bool { - if o != nil && !isNil(o.Provisioning) { - return true - } - - return false -} - -// SetProvisioning gets a reference to the given GenericAppProvisioning and assigns it to the Provisioning field. -func (o *OidcApp) SetProvisioning(v GenericAppProvisioning) { - o.Provisioning = &v -} - -// GetParameters returns the Parameters field value if set, zero value otherwise. -func (o *OidcApp) GetParameters() AppParameters { - if o == nil || isNil(o.Parameters) { - var ret AppParameters - return ret - } - return *o.Parameters -} - -// GetParametersOk returns a tuple with the Parameters field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *OidcApp) GetParametersOk() (*AppParameters, bool) { - if o == nil || isNil(o.Parameters) { - return nil, false - } - return o.Parameters, true -} - -// HasParameters returns a boolean if a field has been set. -func (o *OidcApp) HasParameters() bool { - if o != nil && !isNil(o.Parameters) { - return true - } - - return false -} - -// SetParameters gets a reference to the given AppParameters and assigns it to the Parameters field. -func (o *OidcApp) SetParameters(v AppParameters) { - o.Parameters = &v -} - -// GetEnforcementPoint returns the EnforcementPoint field value if set, zero value otherwise. -func (o *OidcApp) GetEnforcementPoint() EnforcementPoint { - if o == nil || isNil(o.EnforcementPoint) { - var ret EnforcementPoint - return ret - } - return *o.EnforcementPoint -} - -// GetEnforcementPointOk returns a tuple with the EnforcementPoint field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *OidcApp) GetEnforcementPointOk() (*EnforcementPoint, bool) { - if o == nil || isNil(o.EnforcementPoint) { - return nil, false - } - return o.EnforcementPoint, true -} - -// HasEnforcementPoint returns a boolean if a field has been set. -func (o *OidcApp) HasEnforcementPoint() bool { - if o != nil && !isNil(o.EnforcementPoint) { - return true - } - - return false -} - -// SetEnforcementPoint gets a reference to the given EnforcementPoint and assigns it to the EnforcementPoint field. -func (o *OidcApp) SetEnforcementPoint(v EnforcementPoint) { - o.EnforcementPoint = &v -} - -// GetConfiguration returns the Configuration field value -func (o *OidcApp) GetConfiguration() ConfigurationOidc { - if o == nil { - var ret ConfigurationOidc - return ret - } - - return o.Configuration -} - -// GetConfigurationOk returns a tuple with the Configuration field value -// and a boolean to check if the value has been set. -func (o *OidcApp) GetConfigurationOk() (*ConfigurationOidc, bool) { - if o == nil { - return nil, false - } - return &o.Configuration, true -} - -// SetConfiguration sets field value -func (o *OidcApp) SetConfiguration(v ConfigurationOidc) { - o.Configuration = v -} - -// GetSso returns the Sso field value if set, zero value otherwise. -func (o *OidcApp) GetSso() SsoOidc { - if o == nil || isNil(o.Sso) { - var ret SsoOidc - return ret - } - return *o.Sso -} - -// GetSsoOk returns a tuple with the Sso field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *OidcApp) GetSsoOk() (*SsoOidc, bool) { - if o == nil || isNil(o.Sso) { - return nil, false - } - return o.Sso, true -} - -// HasSso returns a boolean if a field has been set. -func (o *OidcApp) HasSso() bool { - if o != nil && !isNil(o.Sso) { - return true - } - - return false -} - -// SetSso gets a reference to the given SsoOidc and assigns it to the Sso field. -func (o *OidcApp) SetSso(v SsoOidc) { - o.Sso = &v -} - -func (o OidcApp) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o OidcApp) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - // skip: id is readOnly - toSerialize["name"] = o.Name - toSerialize["visible"] = o.Visible - toSerialize["description"] = o.Description - if !isNil(o.Notes) { - toSerialize["notes"] = o.Notes - } - if !isNil(o.IconUrl) { - toSerialize["icon_url"] = o.IconUrl - } - if !isNil(o.AuthMethod) { - toSerialize["auth_method"] = o.AuthMethod - } - toSerialize["policy_id"] = o.PolicyId - if !isNil(o.AllowAssumedSignin) { - toSerialize["allow_assumed_signin"] = o.AllowAssumedSignin - } - if !isNil(o.TabId) { - toSerialize["tab_id"] = o.TabId - } - toSerialize["connector_id"] = o.ConnectorId - if !isNil(o.CreatedAt) { - toSerialize["created_at"] = o.CreatedAt - } - if !isNil(o.UpdatedAt) { - toSerialize["updated_at"] = o.UpdatedAt - } - if !isNil(o.RoleIds) { - toSerialize["role_ids"] = o.RoleIds - } - if !isNil(o.Provisioning) { - toSerialize["provisioning"] = o.Provisioning - } - if !isNil(o.Parameters) { - toSerialize["parameters"] = o.Parameters - } - if !isNil(o.EnforcementPoint) { - toSerialize["enforcement_point"] = o.EnforcementPoint - } - toSerialize["configuration"] = o.Configuration - if !isNil(o.Sso) { - toSerialize["sso"] = o.Sso - } - return toSerialize, nil -} - -type NullableOidcApp struct { - value *OidcApp - isSet bool -} - -func (v NullableOidcApp) Get() *OidcApp { - return v.value -} - -func (v *NullableOidcApp) Set(val *OidcApp) { - v.value = val - v.isSet = true -} - -func (v NullableOidcApp) IsSet() bool { - return v.isSet -} - -func (v *NullableOidcApp) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableOidcApp(val *OidcApp) *NullableOidcApp { - return &NullableOidcApp{value: val, isSet: true} -} - -func (v NullableOidcApp) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableOidcApp) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_oidc_app_all_of.go b/model_oidc_app_all_of.go deleted file mode 100644 index ad3795d..0000000 --- a/model_oidc_app_all_of.go +++ /dev/null @@ -1,153 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the OidcAppAllOf type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &OidcAppAllOf{} - -// OidcAppAllOf struct for OidcAppAllOf -type OidcAppAllOf struct { - Configuration ConfigurationOidc `json:"configuration"` - Sso *SsoOidc `json:"sso,omitempty"` -} - -// NewOidcAppAllOf instantiates a new OidcAppAllOf 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 NewOidcAppAllOf(configuration ConfigurationOidc) *OidcAppAllOf { - this := OidcAppAllOf{} - this.Configuration = configuration - return &this -} - -// NewOidcAppAllOfWithDefaults instantiates a new OidcAppAllOf 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 NewOidcAppAllOfWithDefaults() *OidcAppAllOf { - this := OidcAppAllOf{} - return &this -} - -// GetConfiguration returns the Configuration field value -func (o *OidcAppAllOf) GetConfiguration() ConfigurationOidc { - if o == nil { - var ret ConfigurationOidc - return ret - } - - return o.Configuration -} - -// GetConfigurationOk returns a tuple with the Configuration field value -// and a boolean to check if the value has been set. -func (o *OidcAppAllOf) GetConfigurationOk() (*ConfigurationOidc, bool) { - if o == nil { - return nil, false - } - return &o.Configuration, true -} - -// SetConfiguration sets field value -func (o *OidcAppAllOf) SetConfiguration(v ConfigurationOidc) { - o.Configuration = v -} - -// GetSso returns the Sso field value if set, zero value otherwise. -func (o *OidcAppAllOf) GetSso() SsoOidc { - if o == nil || isNil(o.Sso) { - var ret SsoOidc - return ret - } - return *o.Sso -} - -// GetSsoOk returns a tuple with the Sso field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *OidcAppAllOf) GetSsoOk() (*SsoOidc, bool) { - if o == nil || isNil(o.Sso) { - return nil, false - } - return o.Sso, true -} - -// HasSso returns a boolean if a field has been set. -func (o *OidcAppAllOf) HasSso() bool { - if o != nil && !isNil(o.Sso) { - return true - } - - return false -} - -// SetSso gets a reference to the given SsoOidc and assigns it to the Sso field. -func (o *OidcAppAllOf) SetSso(v SsoOidc) { - o.Sso = &v -} - -func (o OidcAppAllOf) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o OidcAppAllOf) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["configuration"] = o.Configuration - if !isNil(o.Sso) { - toSerialize["sso"] = o.Sso - } - return toSerialize, nil -} - -type NullableOidcAppAllOf struct { - value *OidcAppAllOf - isSet bool -} - -func (v NullableOidcAppAllOf) Get() *OidcAppAllOf { - return v.value -} - -func (v *NullableOidcAppAllOf) Set(val *OidcAppAllOf) { - v.value = val - v.isSet = true -} - -func (v NullableOidcAppAllOf) IsSet() bool { - return v.isSet -} - -func (v *NullableOidcAppAllOf) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableOidcAppAllOf(val *OidcAppAllOf) *NullableOidcAppAllOf { - return &NullableOidcAppAllOf{value: val, isSet: true} -} - -func (v NullableOidcAppAllOf) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableOidcAppAllOf) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_otp_device.go b/model_otp_device.go deleted file mode 100644 index dc8cf5a..0000000 --- a/model_otp_device.go +++ /dev/null @@ -1,211 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the OtpDevice type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &OtpDevice{} - -// OtpDevice struct for OtpDevice -type OtpDevice struct { - // The identifier of the factor to enroll the user with. - FactorId int32 `json:"factor_id"` - // A name for the users device - DisplayName string `json:"display_name"` - // The phone number of the user in E.164 format. - Number string `json:"number"` - // Defaults to false. Some factors like SMS or Voice require that a user recieve a token and then that token is supplied to the Verify endpoint before the device is considered active. You can set verfied to `true` which indicates the the users phone number is pre verified and the device can be immediately activated. - Verified *bool `json:"verified,omitempty"` -} - -// NewOtpDevice instantiates a new OtpDevice 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 NewOtpDevice(factorId int32, displayName string, number string) *OtpDevice { - this := OtpDevice{} - this.FactorId = factorId - this.DisplayName = displayName - this.Number = number - return &this -} - -// NewOtpDeviceWithDefaults instantiates a new OtpDevice 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 NewOtpDeviceWithDefaults() *OtpDevice { - this := OtpDevice{} - return &this -} - -// GetFactorId returns the FactorId field value -func (o *OtpDevice) GetFactorId() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.FactorId -} - -// GetFactorIdOk returns a tuple with the FactorId field value -// and a boolean to check if the value has been set. -func (o *OtpDevice) GetFactorIdOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.FactorId, true -} - -// SetFactorId sets field value -func (o *OtpDevice) SetFactorId(v int32) { - o.FactorId = v -} - -// GetDisplayName returns the DisplayName field value -func (o *OtpDevice) GetDisplayName() string { - if o == nil { - var ret string - return ret - } - - return o.DisplayName -} - -// GetDisplayNameOk returns a tuple with the DisplayName field value -// and a boolean to check if the value has been set. -func (o *OtpDevice) GetDisplayNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.DisplayName, true -} - -// SetDisplayName sets field value -func (o *OtpDevice) SetDisplayName(v string) { - o.DisplayName = v -} - -// GetNumber returns the Number field value -func (o *OtpDevice) GetNumber() string { - if o == nil { - var ret string - return ret - } - - return o.Number -} - -// GetNumberOk returns a tuple with the Number field value -// and a boolean to check if the value has been set. -func (o *OtpDevice) GetNumberOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Number, true -} - -// SetNumber sets field value -func (o *OtpDevice) SetNumber(v string) { - o.Number = v -} - -// GetVerified returns the Verified field value if set, zero value otherwise. -func (o *OtpDevice) GetVerified() bool { - if o == nil || isNil(o.Verified) { - var ret bool - return ret - } - return *o.Verified -} - -// GetVerifiedOk returns a tuple with the Verified field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *OtpDevice) GetVerifiedOk() (*bool, bool) { - if o == nil || isNil(o.Verified) { - return nil, false - } - return o.Verified, true -} - -// HasVerified returns a boolean if a field has been set. -func (o *OtpDevice) HasVerified() bool { - if o != nil && !isNil(o.Verified) { - return true - } - - return false -} - -// SetVerified gets a reference to the given bool and assigns it to the Verified field. -func (o *OtpDevice) SetVerified(v bool) { - o.Verified = &v -} - -func (o OtpDevice) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o OtpDevice) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - // skip: factor_id is readOnly - toSerialize["display_name"] = o.DisplayName - toSerialize["number"] = o.Number - if !isNil(o.Verified) { - toSerialize["verified"] = o.Verified - } - return toSerialize, nil -} - -type NullableOtpDevice struct { - value *OtpDevice - isSet bool -} - -func (v NullableOtpDevice) Get() *OtpDevice { - return v.value -} - -func (v *NullableOtpDevice) Set(val *OtpDevice) { - v.value = val - v.isSet = true -} - -func (v NullableOtpDevice) IsSet() bool { - return v.isSet -} - -func (v *NullableOtpDevice) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableOtpDevice(val *OtpDevice) *NullableOtpDevice { - return &NullableOtpDevice{value: val, isSet: true} -} - -func (v NullableOtpDevice) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableOtpDevice) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_privilege.go b/model_privilege.go deleted file mode 100644 index f5707c3..0000000 --- a/model_privilege.go +++ /dev/null @@ -1,216 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the Privilege type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Privilege{} - -// Privilege struct for Privilege -type Privilege struct { - Id *string `json:"id,omitempty"` - Name string `json:"name"` - Description *string `json:"description,omitempty"` - Privilege PrivilegePrivilege `json:"privilege"` -} - -// NewPrivilege instantiates a new Privilege 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 NewPrivilege(name string, privilege PrivilegePrivilege) *Privilege { - this := Privilege{} - this.Name = name - this.Privilege = privilege - return &this -} - -// NewPrivilegeWithDefaults instantiates a new Privilege 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 NewPrivilegeWithDefaults() *Privilege { - this := Privilege{} - return &this -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *Privilege) GetId() string { - if o == nil || isNil(o.Id) { - var ret string - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Privilege) GetIdOk() (*string, bool) { - if o == nil || isNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *Privilege) HasId() bool { - if o != nil && !isNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given string and assigns it to the Id field. -func (o *Privilege) SetId(v string) { - o.Id = &v -} - -// GetName returns the Name field value -func (o *Privilege) 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 *Privilege) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *Privilege) SetName(v string) { - o.Name = v -} - -// GetDescription returns the Description field value if set, zero value otherwise. -func (o *Privilege) GetDescription() string { - if o == nil || isNil(o.Description) { - var ret string - return ret - } - return *o.Description -} - -// 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 *Privilege) GetDescriptionOk() (*string, bool) { - if o == nil || isNil(o.Description) { - return nil, false - } - return o.Description, true -} - -// HasDescription returns a boolean if a field has been set. -func (o *Privilege) HasDescription() bool { - if o != nil && !isNil(o.Description) { - return true - } - - return false -} - -// SetDescription gets a reference to the given string and assigns it to the Description field. -func (o *Privilege) SetDescription(v string) { - o.Description = &v -} - -// GetPrivilege returns the Privilege field value -func (o *Privilege) GetPrivilege() PrivilegePrivilege { - if o == nil { - var ret PrivilegePrivilege - return ret - } - - return o.Privilege -} - -// GetPrivilegeOk returns a tuple with the Privilege field value -// and a boolean to check if the value has been set. -func (o *Privilege) GetPrivilegeOk() (*PrivilegePrivilege, bool) { - if o == nil { - return nil, false - } - return &o.Privilege, true -} - -// SetPrivilege sets field value -func (o *Privilege) SetPrivilege(v PrivilegePrivilege) { - o.Privilege = v -} - -func (o Privilege) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Privilege) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Id) { - toSerialize["id"] = o.Id - } - toSerialize["name"] = o.Name - if !isNil(o.Description) { - toSerialize["description"] = o.Description - } - toSerialize["privilege"] = o.Privilege - return toSerialize, nil -} - -type NullablePrivilege struct { - value *Privilege - isSet bool -} - -func (v NullablePrivilege) Get() *Privilege { - return v.value -} - -func (v *NullablePrivilege) Set(val *Privilege) { - v.value = val - v.isSet = true -} - -func (v NullablePrivilege) IsSet() bool { - return v.isSet -} - -func (v *NullablePrivilege) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullablePrivilege(val *Privilege) *NullablePrivilege { - return &NullablePrivilege{value: val, isSet: true} -} - -func (v NullablePrivilege) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullablePrivilege) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_privilege_privilege.go b/model_privilege_privilege.go deleted file mode 100644 index eaef0ea..0000000 --- a/model_privilege_privilege.go +++ /dev/null @@ -1,162 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the PrivilegePrivilege type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &PrivilegePrivilege{} - -// PrivilegePrivilege struct for PrivilegePrivilege -type PrivilegePrivilege struct { - Version *string `json:"Version,omitempty"` - Statement []PrivilegePrivilegeStatementInner `json:"Statement,omitempty"` -} - -// NewPrivilegePrivilege instantiates a new PrivilegePrivilege 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 NewPrivilegePrivilege() *PrivilegePrivilege { - this := PrivilegePrivilege{} - return &this -} - -// NewPrivilegePrivilegeWithDefaults instantiates a new PrivilegePrivilege 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 NewPrivilegePrivilegeWithDefaults() *PrivilegePrivilege { - this := PrivilegePrivilege{} - return &this -} - -// GetVersion returns the Version field value if set, zero value otherwise. -func (o *PrivilegePrivilege) GetVersion() string { - if o == nil || isNil(o.Version) { - var ret string - return ret - } - return *o.Version -} - -// GetVersionOk returns a tuple with the Version field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PrivilegePrivilege) GetVersionOk() (*string, bool) { - if o == nil || isNil(o.Version) { - return nil, false - } - return o.Version, true -} - -// HasVersion returns a boolean if a field has been set. -func (o *PrivilegePrivilege) HasVersion() bool { - if o != nil && !isNil(o.Version) { - return true - } - - return false -} - -// SetVersion gets a reference to the given string and assigns it to the Version field. -func (o *PrivilegePrivilege) SetVersion(v string) { - o.Version = &v -} - -// GetStatement returns the Statement field value if set, zero value otherwise. -func (o *PrivilegePrivilege) GetStatement() []PrivilegePrivilegeStatementInner { - if o == nil || isNil(o.Statement) { - var ret []PrivilegePrivilegeStatementInner - return ret - } - return o.Statement -} - -// GetStatementOk returns a tuple with the Statement field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PrivilegePrivilege) GetStatementOk() ([]PrivilegePrivilegeStatementInner, bool) { - if o == nil || isNil(o.Statement) { - return nil, false - } - return o.Statement, true -} - -// HasStatement returns a boolean if a field has been set. -func (o *PrivilegePrivilege) HasStatement() bool { - if o != nil && !isNil(o.Statement) { - return true - } - - return false -} - -// SetStatement gets a reference to the given []PrivilegePrivilegeStatementInner and assigns it to the Statement field. -func (o *PrivilegePrivilege) SetStatement(v []PrivilegePrivilegeStatementInner) { - o.Statement = v -} - -func (o PrivilegePrivilege) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o PrivilegePrivilege) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Version) { - toSerialize["Version"] = o.Version - } - if !isNil(o.Statement) { - toSerialize["Statement"] = o.Statement - } - return toSerialize, nil -} - -type NullablePrivilegePrivilege struct { - value *PrivilegePrivilege - isSet bool -} - -func (v NullablePrivilegePrivilege) Get() *PrivilegePrivilege { - return v.value -} - -func (v *NullablePrivilegePrivilege) Set(val *PrivilegePrivilege) { - v.value = val - v.isSet = true -} - -func (v NullablePrivilegePrivilege) IsSet() bool { - return v.isSet -} - -func (v *NullablePrivilegePrivilege) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullablePrivilegePrivilege(val *PrivilegePrivilege) *NullablePrivilegePrivilege { - return &NullablePrivilegePrivilege{value: val, isSet: true} -} - -func (v NullablePrivilegePrivilege) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullablePrivilegePrivilege) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_privilege_privilege_statement_inner.go b/model_privilege_privilege_statement_inner.go deleted file mode 100644 index fc5bdc9..0000000 --- a/model_privilege_privilege_statement_inner.go +++ /dev/null @@ -1,174 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the PrivilegePrivilegeStatementInner type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &PrivilegePrivilegeStatementInner{} - -// PrivilegePrivilegeStatementInner struct for PrivilegePrivilegeStatementInner -type PrivilegePrivilegeStatementInner struct { - // Set to “Allow.” By default, all actions are denied, this Statement allows the listed actions to be executed. - Effect string `json:"Effect"` - // An array of strings that represent actions within OneLogin. Actions are prefixed with the class of object they are related to and followed by a specific action for the given class. e.g. users:List, where the class is users and the specific action is List. Don’t mix classes within an Action array. To create a privilege that includes multiple different classes, create multiple statements. A wildcard * that includes all actions is supported. Use wildcards to create a Super User privilege. - Action []string `json:"Action"` - // Target the privileged action against specific resources with the scope. The scope pattern is the class of object used by the Action, followed by an ID that represents a resource in OneLogin. e.g. apps/1234, where apps is the class and 1234 is the ID of an app. The wildcard * is supported and indicates that all resources of the class type declared, in the Action, are in scope. The Action and Scope classes must match. However, there is an exception, a scope of roles/{role_id} can be combined with Actions on the user or app class. The exception allows you to target groups of users or apps with specific actions. - Scope []string `json:"Scope"` -} - -// NewPrivilegePrivilegeStatementInner instantiates a new PrivilegePrivilegeStatementInner 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 NewPrivilegePrivilegeStatementInner(effect string, action []string, scope []string) *PrivilegePrivilegeStatementInner { - this := PrivilegePrivilegeStatementInner{} - this.Effect = effect - this.Action = action - this.Scope = scope - return &this -} - -// NewPrivilegePrivilegeStatementInnerWithDefaults instantiates a new PrivilegePrivilegeStatementInner 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 NewPrivilegePrivilegeStatementInnerWithDefaults() *PrivilegePrivilegeStatementInner { - this := PrivilegePrivilegeStatementInner{} - return &this -} - -// GetEffect returns the Effect field value -func (o *PrivilegePrivilegeStatementInner) GetEffect() string { - if o == nil { - var ret string - return ret - } - - return o.Effect -} - -// GetEffectOk returns a tuple with the Effect field value -// and a boolean to check if the value has been set. -func (o *PrivilegePrivilegeStatementInner) GetEffectOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Effect, true -} - -// SetEffect sets field value -func (o *PrivilegePrivilegeStatementInner) SetEffect(v string) { - o.Effect = v -} - -// GetAction returns the Action field value -func (o *PrivilegePrivilegeStatementInner) GetAction() []string { - if o == nil { - var ret []string - return ret - } - - return o.Action -} - -// GetActionOk returns a tuple with the Action field value -// and a boolean to check if the value has been set. -func (o *PrivilegePrivilegeStatementInner) GetActionOk() ([]string, bool) { - if o == nil { - return nil, false - } - return o.Action, true -} - -// SetAction sets field value -func (o *PrivilegePrivilegeStatementInner) SetAction(v []string) { - o.Action = v -} - -// GetScope returns the Scope field value -func (o *PrivilegePrivilegeStatementInner) GetScope() []string { - if o == nil { - var ret []string - return ret - } - - return o.Scope -} - -// GetScopeOk returns a tuple with the Scope field value -// and a boolean to check if the value has been set. -func (o *PrivilegePrivilegeStatementInner) GetScopeOk() ([]string, bool) { - if o == nil { - return nil, false - } - return o.Scope, true -} - -// SetScope sets field value -func (o *PrivilegePrivilegeStatementInner) SetScope(v []string) { - o.Scope = v -} - -func (o PrivilegePrivilegeStatementInner) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o PrivilegePrivilegeStatementInner) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["Effect"] = o.Effect - toSerialize["Action"] = o.Action - toSerialize["Scope"] = o.Scope - return toSerialize, nil -} - -type NullablePrivilegePrivilegeStatementInner struct { - value *PrivilegePrivilegeStatementInner - isSet bool -} - -func (v NullablePrivilegePrivilegeStatementInner) Get() *PrivilegePrivilegeStatementInner { - return v.value -} - -func (v *NullablePrivilegePrivilegeStatementInner) Set(val *PrivilegePrivilegeStatementInner) { - v.value = val - v.isSet = true -} - -func (v NullablePrivilegePrivilegeStatementInner) IsSet() bool { - return v.isSet -} - -func (v *NullablePrivilegePrivilegeStatementInner) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullablePrivilegePrivilegeStatementInner(val *PrivilegePrivilegeStatementInner) *NullablePrivilegePrivilegeStatementInner { - return &NullablePrivilegePrivilegeStatementInner{value: val, isSet: true} -} - -func (v NullablePrivilegePrivilegeStatementInner) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullablePrivilegePrivilegeStatementInner) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_rate_limit.go b/model_rate_limit.go deleted file mode 100644 index 3b93acd..0000000 --- a/model_rate_limit.go +++ /dev/null @@ -1,201 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the RateLimit type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RateLimit{} - -// RateLimit struct for RateLimit -type RateLimit struct { - // Rate Limit Limit - XRateLimitLimit *int32 `json:"X-RateLimit-Limit,omitempty"` - // Rate Limit Remaining - XRateLimitRemaining *int32 `json:"X-RateLimit-Remaining,omitempty"` - // Rate Limit Reset - XRateLimitReset *int32 `json:"X-RateLimit-Reset,omitempty"` -} - -// NewRateLimit instantiates a new RateLimit 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 NewRateLimit() *RateLimit { - this := RateLimit{} - return &this -} - -// NewRateLimitWithDefaults instantiates a new RateLimit 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 NewRateLimitWithDefaults() *RateLimit { - this := RateLimit{} - return &this -} - -// GetXRateLimitLimit returns the XRateLimitLimit field value if set, zero value otherwise. -func (o *RateLimit) GetXRateLimitLimit() int32 { - if o == nil || isNil(o.XRateLimitLimit) { - var ret int32 - return ret - } - return *o.XRateLimitLimit -} - -// GetXRateLimitLimitOk returns a tuple with the XRateLimitLimit field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RateLimit) GetXRateLimitLimitOk() (*int32, bool) { - if o == nil || isNil(o.XRateLimitLimit) { - return nil, false - } - return o.XRateLimitLimit, true -} - -// HasXRateLimitLimit returns a boolean if a field has been set. -func (o *RateLimit) HasXRateLimitLimit() bool { - if o != nil && !isNil(o.XRateLimitLimit) { - return true - } - - return false -} - -// SetXRateLimitLimit gets a reference to the given int32 and assigns it to the XRateLimitLimit field. -func (o *RateLimit) SetXRateLimitLimit(v int32) { - o.XRateLimitLimit = &v -} - -// GetXRateLimitRemaining returns the XRateLimitRemaining field value if set, zero value otherwise. -func (o *RateLimit) GetXRateLimitRemaining() int32 { - if o == nil || isNil(o.XRateLimitRemaining) { - var ret int32 - return ret - } - return *o.XRateLimitRemaining -} - -// GetXRateLimitRemainingOk returns a tuple with the XRateLimitRemaining field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RateLimit) GetXRateLimitRemainingOk() (*int32, bool) { - if o == nil || isNil(o.XRateLimitRemaining) { - return nil, false - } - return o.XRateLimitRemaining, true -} - -// HasXRateLimitRemaining returns a boolean if a field has been set. -func (o *RateLimit) HasXRateLimitRemaining() bool { - if o != nil && !isNil(o.XRateLimitRemaining) { - return true - } - - return false -} - -// SetXRateLimitRemaining gets a reference to the given int32 and assigns it to the XRateLimitRemaining field. -func (o *RateLimit) SetXRateLimitRemaining(v int32) { - o.XRateLimitRemaining = &v -} - -// GetXRateLimitReset returns the XRateLimitReset field value if set, zero value otherwise. -func (o *RateLimit) GetXRateLimitReset() int32 { - if o == nil || isNil(o.XRateLimitReset) { - var ret int32 - return ret - } - return *o.XRateLimitReset -} - -// GetXRateLimitResetOk returns a tuple with the XRateLimitReset field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RateLimit) GetXRateLimitResetOk() (*int32, bool) { - if o == nil || isNil(o.XRateLimitReset) { - return nil, false - } - return o.XRateLimitReset, true -} - -// HasXRateLimitReset returns a boolean if a field has been set. -func (o *RateLimit) HasXRateLimitReset() bool { - if o != nil && !isNil(o.XRateLimitReset) { - return true - } - - return false -} - -// SetXRateLimitReset gets a reference to the given int32 and assigns it to the XRateLimitReset field. -func (o *RateLimit) SetXRateLimitReset(v int32) { - o.XRateLimitReset = &v -} - -func (o RateLimit) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RateLimit) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.XRateLimitLimit) { - toSerialize["X-RateLimit-Limit"] = o.XRateLimitLimit - } - if !isNil(o.XRateLimitRemaining) { - toSerialize["X-RateLimit-Remaining"] = o.XRateLimitRemaining - } - if !isNil(o.XRateLimitReset) { - toSerialize["X-RateLimit-Reset"] = o.XRateLimitReset - } - return toSerialize, nil -} - -type NullableRateLimit struct { - value *RateLimit - isSet bool -} - -func (v NullableRateLimit) Get() *RateLimit { - return v.value -} - -func (v *NullableRateLimit) Set(val *RateLimit) { - v.value = val - v.isSet = true -} - -func (v NullableRateLimit) IsSet() bool { - return v.isSet -} - -func (v *NullableRateLimit) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRateLimit(val *RateLimit) *NullableRateLimit { - return &NullableRateLimit{value: val, isSet: true} -} - -func (v NullableRateLimit) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRateLimit) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_remove_role_users_request.go b/model_remove_role_users_request.go deleted file mode 100644 index 47892ec..0000000 --- a/model_remove_role_users_request.go +++ /dev/null @@ -1,126 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the RemoveRoleUsersRequest type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RemoveRoleUsersRequest{} - -// RemoveRoleUsersRequest struct for RemoveRoleUsersRequest -type RemoveRoleUsersRequest struct { - UserId []int32 `json:"user_id,omitempty"` -} - -// NewRemoveRoleUsersRequest instantiates a new RemoveRoleUsersRequest 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 NewRemoveRoleUsersRequest() *RemoveRoleUsersRequest { - this := RemoveRoleUsersRequest{} - return &this -} - -// NewRemoveRoleUsersRequestWithDefaults instantiates a new RemoveRoleUsersRequest 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 NewRemoveRoleUsersRequestWithDefaults() *RemoveRoleUsersRequest { - this := RemoveRoleUsersRequest{} - return &this -} - -// GetUserId returns the UserId field value if set, zero value otherwise. -func (o *RemoveRoleUsersRequest) GetUserId() []int32 { - if o == nil || isNil(o.UserId) { - var ret []int32 - return ret - } - return o.UserId -} - -// GetUserIdOk returns a tuple with the UserId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RemoveRoleUsersRequest) GetUserIdOk() ([]int32, bool) { - if o == nil || isNil(o.UserId) { - return nil, false - } - return o.UserId, true -} - -// HasUserId returns a boolean if a field has been set. -func (o *RemoveRoleUsersRequest) HasUserId() bool { - if o != nil && !isNil(o.UserId) { - return true - } - - return false -} - -// SetUserId gets a reference to the given []int32 and assigns it to the UserId field. -func (o *RemoveRoleUsersRequest) SetUserId(v []int32) { - o.UserId = v -} - -func (o RemoveRoleUsersRequest) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RemoveRoleUsersRequest) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.UserId) { - toSerialize["user_id"] = o.UserId - } - return toSerialize, nil -} - -type NullableRemoveRoleUsersRequest struct { - value *RemoveRoleUsersRequest - isSet bool -} - -func (v NullableRemoveRoleUsersRequest) Get() *RemoveRoleUsersRequest { - return v.value -} - -func (v *NullableRemoveRoleUsersRequest) Set(val *RemoveRoleUsersRequest) { - v.value = val - v.isSet = true -} - -func (v NullableRemoveRoleUsersRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableRemoveRoleUsersRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRemoveRoleUsersRequest(val *RemoveRoleUsersRequest) *NullableRemoveRoleUsersRequest { - return &NullableRemoveRoleUsersRequest{value: val, isSet: true} -} - -func (v NullableRemoveRoleUsersRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRemoveRoleUsersRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_remove_user_role_request.go b/model_remove_user_role_request.go deleted file mode 100644 index 098435d..0000000 --- a/model_remove_user_role_request.go +++ /dev/null @@ -1,117 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the RemoveUserRoleRequest type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RemoveUserRoleRequest{} - -// RemoveUserRoleRequest struct for RemoveUserRoleRequest -type RemoveUserRoleRequest struct { - RoleIdArray []RemoveUserRoleRequestRoleIdArrayInner `json:"role_id_array"` -} - -// NewRemoveUserRoleRequest instantiates a new RemoveUserRoleRequest 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 NewRemoveUserRoleRequest(roleIdArray []RemoveUserRoleRequestRoleIdArrayInner) *RemoveUserRoleRequest { - this := RemoveUserRoleRequest{} - this.RoleIdArray = roleIdArray - return &this -} - -// NewRemoveUserRoleRequestWithDefaults instantiates a new RemoveUserRoleRequest 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 NewRemoveUserRoleRequestWithDefaults() *RemoveUserRoleRequest { - this := RemoveUserRoleRequest{} - return &this -} - -// GetRoleIdArray returns the RoleIdArray field value -func (o *RemoveUserRoleRequest) GetRoleIdArray() []RemoveUserRoleRequestRoleIdArrayInner { - if o == nil { - var ret []RemoveUserRoleRequestRoleIdArrayInner - return ret - } - - return o.RoleIdArray -} - -// GetRoleIdArrayOk returns a tuple with the RoleIdArray field value -// and a boolean to check if the value has been set. -func (o *RemoveUserRoleRequest) GetRoleIdArrayOk() ([]RemoveUserRoleRequestRoleIdArrayInner, bool) { - if o == nil { - return nil, false - } - return o.RoleIdArray, true -} - -// SetRoleIdArray sets field value -func (o *RemoveUserRoleRequest) SetRoleIdArray(v []RemoveUserRoleRequestRoleIdArrayInner) { - o.RoleIdArray = v -} - -func (o RemoveUserRoleRequest) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RemoveUserRoleRequest) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["role_id_array"] = o.RoleIdArray - return toSerialize, nil -} - -type NullableRemoveUserRoleRequest struct { - value *RemoveUserRoleRequest - isSet bool -} - -func (v NullableRemoveUserRoleRequest) Get() *RemoveUserRoleRequest { - return v.value -} - -func (v *NullableRemoveUserRoleRequest) Set(val *RemoveUserRoleRequest) { - v.value = val - v.isSet = true -} - -func (v NullableRemoveUserRoleRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableRemoveUserRoleRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRemoveUserRoleRequest(val *RemoveUserRoleRequest) *NullableRemoveUserRoleRequest { - return &NullableRemoveUserRoleRequest{value: val, isSet: true} -} - -func (v NullableRemoveUserRoleRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRemoveUserRoleRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_remove_user_role_request_role_id_array_inner.go b/model_remove_user_role_request_role_id_array_inner.go deleted file mode 100644 index 479c319..0000000 --- a/model_remove_user_role_request_role_id_array_inner.go +++ /dev/null @@ -1,126 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the RemoveUserRoleRequestRoleIdArrayInner type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RemoveUserRoleRequestRoleIdArrayInner{} - -// RemoveUserRoleRequestRoleIdArrayInner struct for RemoveUserRoleRequestRoleIdArrayInner -type RemoveUserRoleRequestRoleIdArrayInner struct { - RoleId *int32 `json:"role_id,omitempty"` -} - -// NewRemoveUserRoleRequestRoleIdArrayInner instantiates a new RemoveUserRoleRequestRoleIdArrayInner 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 NewRemoveUserRoleRequestRoleIdArrayInner() *RemoveUserRoleRequestRoleIdArrayInner { - this := RemoveUserRoleRequestRoleIdArrayInner{} - return &this -} - -// NewRemoveUserRoleRequestRoleIdArrayInnerWithDefaults instantiates a new RemoveUserRoleRequestRoleIdArrayInner 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 NewRemoveUserRoleRequestRoleIdArrayInnerWithDefaults() *RemoveUserRoleRequestRoleIdArrayInner { - this := RemoveUserRoleRequestRoleIdArrayInner{} - return &this -} - -// GetRoleId returns the RoleId field value if set, zero value otherwise. -func (o *RemoveUserRoleRequestRoleIdArrayInner) GetRoleId() int32 { - if o == nil || isNil(o.RoleId) { - var ret int32 - return ret - } - return *o.RoleId -} - -// GetRoleIdOk returns a tuple with the RoleId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RemoveUserRoleRequestRoleIdArrayInner) GetRoleIdOk() (*int32, bool) { - if o == nil || isNil(o.RoleId) { - return nil, false - } - return o.RoleId, true -} - -// HasRoleId returns a boolean if a field has been set. -func (o *RemoveUserRoleRequestRoleIdArrayInner) HasRoleId() bool { - if o != nil && !isNil(o.RoleId) { - return true - } - - return false -} - -// SetRoleId gets a reference to the given int32 and assigns it to the RoleId field. -func (o *RemoveUserRoleRequestRoleIdArrayInner) SetRoleId(v int32) { - o.RoleId = &v -} - -func (o RemoveUserRoleRequestRoleIdArrayInner) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RemoveUserRoleRequestRoleIdArrayInner) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.RoleId) { - toSerialize["role_id"] = o.RoleId - } - return toSerialize, nil -} - -type NullableRemoveUserRoleRequestRoleIdArrayInner struct { - value *RemoveUserRoleRequestRoleIdArrayInner - isSet bool -} - -func (v NullableRemoveUserRoleRequestRoleIdArrayInner) Get() *RemoveUserRoleRequestRoleIdArrayInner { - return v.value -} - -func (v *NullableRemoveUserRoleRequestRoleIdArrayInner) Set(val *RemoveUserRoleRequestRoleIdArrayInner) { - v.value = val - v.isSet = true -} - -func (v NullableRemoveUserRoleRequestRoleIdArrayInner) IsSet() bool { - return v.isSet -} - -func (v *NullableRemoveUserRoleRequestRoleIdArrayInner) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRemoveUserRoleRequestRoleIdArrayInner(val *RemoveUserRoleRequestRoleIdArrayInner) *NullableRemoveUserRoleRequestRoleIdArrayInner { - return &NullableRemoveUserRoleRequestRoleIdArrayInner{value: val, isSet: true} -} - -func (v NullableRemoveUserRoleRequestRoleIdArrayInner) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRemoveUserRoleRequestRoleIdArrayInner) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_request_brand.go b/model_request_brand.go deleted file mode 100644 index 7fa7ec1..0000000 --- a/model_request_brand.go +++ /dev/null @@ -1,640 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the RequestBrand type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RequestBrand{} - -// RequestBrand struct for RequestBrand -type RequestBrand struct { - // Indicates if the brand is enabled or not - Enabled *bool `json:"enabled,omitempty"` - // Brand’s name for humans. This isn’t related to subdomains. - Name string `json:"name"` - // Indicates if the custom support is enabled. If enabled, the login page includes the ability to submit a support request. - CustomSupportEnabled *bool `json:"custom_support_enabled,omitempty"` - // Primary brand color - CustomColor *string `json:"custom_color,omitempty"` - // Secondary brand color - CustomAccentColor *string `json:"custom_accent_color,omitempty"` - // Color for the masking layer above the background image of the branded login screen. - CustomMaskingColor *string `json:"custom_masking_color,omitempty"` - // Opacity for the custom_masking_color. - CustomMaskingOpacity *int32 `json:"custom_masking_opacity,omitempty"` - // Indicates if the custom Username/Email field label is enabled or not - EnableCustomLabelForLoginScreen *bool `json:"enable_custom_label_for_login_screen,omitempty"` - // Custom label for the Username/Email field on the login screen. See example here. - CustomLabelTextForLoginScreen *string `json:"custom_label_text_for_login_screen,omitempty"` - // Link text to show login instruction screen. - LoginInstructionTitle *string `json:"login_instruction_title,omitempty"` - // Text for the login instruction screen, styled in Markdown. - LoginInstruction *string `json:"login_instruction,omitempty"` - // Indicates if the OneLogin footer will appear at the bottom of the login page. - HideOneloginFooter *bool `json:"hide_onelogin_footer,omitempty"` - // Text that replaces the default text displayed on the initial screen of the MFA Registration. - MfaEnrollmentMessage *string `json:"mfa_enrollment_message,omitempty"` - // Base64 encoded image data (JPG/PNG, <5MB) - Background *string `json:"background,omitempty"` - // Base64 encoded image data (PNG, <1MB) - Logo *string `json:"logo,omitempty"` -} - -// NewRequestBrand instantiates a new RequestBrand 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 NewRequestBrand(name string) *RequestBrand { - this := RequestBrand{} - var enabled bool = false - this.Enabled = &enabled - this.Name = name - return &this -} - -// NewRequestBrandWithDefaults instantiates a new RequestBrand 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 NewRequestBrandWithDefaults() *RequestBrand { - this := RequestBrand{} - var enabled bool = false - this.Enabled = &enabled - return &this -} - -// GetEnabled returns the Enabled field value if set, zero value otherwise. -func (o *RequestBrand) GetEnabled() bool { - if o == nil || isNil(o.Enabled) { - 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 *RequestBrand) GetEnabledOk() (*bool, bool) { - if o == nil || isNil(o.Enabled) { - return nil, false - } - return o.Enabled, true -} - -// HasEnabled returns a boolean if a field has been set. -func (o *RequestBrand) HasEnabled() bool { - if o != nil && !isNil(o.Enabled) { - return true - } - - return false -} - -// SetEnabled gets a reference to the given bool and assigns it to the Enabled field. -func (o *RequestBrand) SetEnabled(v bool) { - o.Enabled = &v -} - -// GetName returns the Name field value -func (o *RequestBrand) 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 *RequestBrand) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *RequestBrand) SetName(v string) { - o.Name = v -} - -// GetCustomSupportEnabled returns the CustomSupportEnabled field value if set, zero value otherwise. -func (o *RequestBrand) GetCustomSupportEnabled() bool { - if o == nil || isNil(o.CustomSupportEnabled) { - var ret bool - return ret - } - return *o.CustomSupportEnabled -} - -// GetCustomSupportEnabledOk returns a tuple with the CustomSupportEnabled field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RequestBrand) GetCustomSupportEnabledOk() (*bool, bool) { - if o == nil || isNil(o.CustomSupportEnabled) { - return nil, false - } - return o.CustomSupportEnabled, true -} - -// HasCustomSupportEnabled returns a boolean if a field has been set. -func (o *RequestBrand) HasCustomSupportEnabled() bool { - if o != nil && !isNil(o.CustomSupportEnabled) { - return true - } - - return false -} - -// SetCustomSupportEnabled gets a reference to the given bool and assigns it to the CustomSupportEnabled field. -func (o *RequestBrand) SetCustomSupportEnabled(v bool) { - o.CustomSupportEnabled = &v -} - -// GetCustomColor returns the CustomColor field value if set, zero value otherwise. -func (o *RequestBrand) GetCustomColor() string { - if o == nil || isNil(o.CustomColor) { - var ret string - return ret - } - return *o.CustomColor -} - -// GetCustomColorOk returns a tuple with the CustomColor field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RequestBrand) GetCustomColorOk() (*string, bool) { - if o == nil || isNil(o.CustomColor) { - return nil, false - } - return o.CustomColor, true -} - -// HasCustomColor returns a boolean if a field has been set. -func (o *RequestBrand) HasCustomColor() bool { - if o != nil && !isNil(o.CustomColor) { - return true - } - - return false -} - -// SetCustomColor gets a reference to the given string and assigns it to the CustomColor field. -func (o *RequestBrand) SetCustomColor(v string) { - o.CustomColor = &v -} - -// GetCustomAccentColor returns the CustomAccentColor field value if set, zero value otherwise. -func (o *RequestBrand) GetCustomAccentColor() string { - if o == nil || isNil(o.CustomAccentColor) { - var ret string - return ret - } - return *o.CustomAccentColor -} - -// GetCustomAccentColorOk returns a tuple with the CustomAccentColor field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RequestBrand) GetCustomAccentColorOk() (*string, bool) { - if o == nil || isNil(o.CustomAccentColor) { - return nil, false - } - return o.CustomAccentColor, true -} - -// HasCustomAccentColor returns a boolean if a field has been set. -func (o *RequestBrand) HasCustomAccentColor() bool { - if o != nil && !isNil(o.CustomAccentColor) { - return true - } - - return false -} - -// SetCustomAccentColor gets a reference to the given string and assigns it to the CustomAccentColor field. -func (o *RequestBrand) SetCustomAccentColor(v string) { - o.CustomAccentColor = &v -} - -// GetCustomMaskingColor returns the CustomMaskingColor field value if set, zero value otherwise. -func (o *RequestBrand) GetCustomMaskingColor() string { - if o == nil || isNil(o.CustomMaskingColor) { - var ret string - return ret - } - return *o.CustomMaskingColor -} - -// GetCustomMaskingColorOk returns a tuple with the CustomMaskingColor field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RequestBrand) GetCustomMaskingColorOk() (*string, bool) { - if o == nil || isNil(o.CustomMaskingColor) { - return nil, false - } - return o.CustomMaskingColor, true -} - -// HasCustomMaskingColor returns a boolean if a field has been set. -func (o *RequestBrand) HasCustomMaskingColor() bool { - if o != nil && !isNil(o.CustomMaskingColor) { - return true - } - - return false -} - -// SetCustomMaskingColor gets a reference to the given string and assigns it to the CustomMaskingColor field. -func (o *RequestBrand) SetCustomMaskingColor(v string) { - o.CustomMaskingColor = &v -} - -// GetCustomMaskingOpacity returns the CustomMaskingOpacity field value if set, zero value otherwise. -func (o *RequestBrand) GetCustomMaskingOpacity() int32 { - if o == nil || isNil(o.CustomMaskingOpacity) { - var ret int32 - return ret - } - return *o.CustomMaskingOpacity -} - -// GetCustomMaskingOpacityOk returns a tuple with the CustomMaskingOpacity field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RequestBrand) GetCustomMaskingOpacityOk() (*int32, bool) { - if o == nil || isNil(o.CustomMaskingOpacity) { - return nil, false - } - return o.CustomMaskingOpacity, true -} - -// HasCustomMaskingOpacity returns a boolean if a field has been set. -func (o *RequestBrand) HasCustomMaskingOpacity() bool { - if o != nil && !isNil(o.CustomMaskingOpacity) { - return true - } - - return false -} - -// SetCustomMaskingOpacity gets a reference to the given int32 and assigns it to the CustomMaskingOpacity field. -func (o *RequestBrand) SetCustomMaskingOpacity(v int32) { - o.CustomMaskingOpacity = &v -} - -// GetEnableCustomLabelForLoginScreen returns the EnableCustomLabelForLoginScreen field value if set, zero value otherwise. -func (o *RequestBrand) GetEnableCustomLabelForLoginScreen() bool { - if o == nil || isNil(o.EnableCustomLabelForLoginScreen) { - var ret bool - return ret - } - return *o.EnableCustomLabelForLoginScreen -} - -// GetEnableCustomLabelForLoginScreenOk returns a tuple with the EnableCustomLabelForLoginScreen field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RequestBrand) GetEnableCustomLabelForLoginScreenOk() (*bool, bool) { - if o == nil || isNil(o.EnableCustomLabelForLoginScreen) { - return nil, false - } - return o.EnableCustomLabelForLoginScreen, true -} - -// HasEnableCustomLabelForLoginScreen returns a boolean if a field has been set. -func (o *RequestBrand) HasEnableCustomLabelForLoginScreen() bool { - if o != nil && !isNil(o.EnableCustomLabelForLoginScreen) { - return true - } - - return false -} - -// SetEnableCustomLabelForLoginScreen gets a reference to the given bool and assigns it to the EnableCustomLabelForLoginScreen field. -func (o *RequestBrand) SetEnableCustomLabelForLoginScreen(v bool) { - o.EnableCustomLabelForLoginScreen = &v -} - -// GetCustomLabelTextForLoginScreen returns the CustomLabelTextForLoginScreen field value if set, zero value otherwise. -func (o *RequestBrand) GetCustomLabelTextForLoginScreen() string { - if o == nil || isNil(o.CustomLabelTextForLoginScreen) { - var ret string - return ret - } - return *o.CustomLabelTextForLoginScreen -} - -// GetCustomLabelTextForLoginScreenOk returns a tuple with the CustomLabelTextForLoginScreen field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RequestBrand) GetCustomLabelTextForLoginScreenOk() (*string, bool) { - if o == nil || isNil(o.CustomLabelTextForLoginScreen) { - return nil, false - } - return o.CustomLabelTextForLoginScreen, true -} - -// HasCustomLabelTextForLoginScreen returns a boolean if a field has been set. -func (o *RequestBrand) HasCustomLabelTextForLoginScreen() bool { - if o != nil && !isNil(o.CustomLabelTextForLoginScreen) { - return true - } - - return false -} - -// SetCustomLabelTextForLoginScreen gets a reference to the given string and assigns it to the CustomLabelTextForLoginScreen field. -func (o *RequestBrand) SetCustomLabelTextForLoginScreen(v string) { - o.CustomLabelTextForLoginScreen = &v -} - -// GetLoginInstructionTitle returns the LoginInstructionTitle field value if set, zero value otherwise. -func (o *RequestBrand) GetLoginInstructionTitle() string { - if o == nil || isNil(o.LoginInstructionTitle) { - var ret string - return ret - } - return *o.LoginInstructionTitle -} - -// GetLoginInstructionTitleOk returns a tuple with the LoginInstructionTitle field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RequestBrand) GetLoginInstructionTitleOk() (*string, bool) { - if o == nil || isNil(o.LoginInstructionTitle) { - return nil, false - } - return o.LoginInstructionTitle, true -} - -// HasLoginInstructionTitle returns a boolean if a field has been set. -func (o *RequestBrand) HasLoginInstructionTitle() bool { - if o != nil && !isNil(o.LoginInstructionTitle) { - return true - } - - return false -} - -// SetLoginInstructionTitle gets a reference to the given string and assigns it to the LoginInstructionTitle field. -func (o *RequestBrand) SetLoginInstructionTitle(v string) { - o.LoginInstructionTitle = &v -} - -// GetLoginInstruction returns the LoginInstruction field value if set, zero value otherwise. -func (o *RequestBrand) GetLoginInstruction() string { - if o == nil || isNil(o.LoginInstruction) { - var ret string - return ret - } - return *o.LoginInstruction -} - -// GetLoginInstructionOk returns a tuple with the LoginInstruction field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RequestBrand) GetLoginInstructionOk() (*string, bool) { - if o == nil || isNil(o.LoginInstruction) { - return nil, false - } - return o.LoginInstruction, true -} - -// HasLoginInstruction returns a boolean if a field has been set. -func (o *RequestBrand) HasLoginInstruction() bool { - if o != nil && !isNil(o.LoginInstruction) { - return true - } - - return false -} - -// SetLoginInstruction gets a reference to the given string and assigns it to the LoginInstruction field. -func (o *RequestBrand) SetLoginInstruction(v string) { - o.LoginInstruction = &v -} - -// GetHideOneloginFooter returns the HideOneloginFooter field value if set, zero value otherwise. -func (o *RequestBrand) GetHideOneloginFooter() bool { - if o == nil || isNil(o.HideOneloginFooter) { - var ret bool - return ret - } - return *o.HideOneloginFooter -} - -// GetHideOneloginFooterOk returns a tuple with the HideOneloginFooter field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RequestBrand) GetHideOneloginFooterOk() (*bool, bool) { - if o == nil || isNil(o.HideOneloginFooter) { - return nil, false - } - return o.HideOneloginFooter, true -} - -// HasHideOneloginFooter returns a boolean if a field has been set. -func (o *RequestBrand) HasHideOneloginFooter() bool { - if o != nil && !isNil(o.HideOneloginFooter) { - return true - } - - return false -} - -// SetHideOneloginFooter gets a reference to the given bool and assigns it to the HideOneloginFooter field. -func (o *RequestBrand) SetHideOneloginFooter(v bool) { - o.HideOneloginFooter = &v -} - -// GetMfaEnrollmentMessage returns the MfaEnrollmentMessage field value if set, zero value otherwise. -func (o *RequestBrand) GetMfaEnrollmentMessage() string { - if o == nil || isNil(o.MfaEnrollmentMessage) { - var ret string - return ret - } - return *o.MfaEnrollmentMessage -} - -// GetMfaEnrollmentMessageOk returns a tuple with the MfaEnrollmentMessage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RequestBrand) GetMfaEnrollmentMessageOk() (*string, bool) { - if o == nil || isNil(o.MfaEnrollmentMessage) { - return nil, false - } - return o.MfaEnrollmentMessage, true -} - -// HasMfaEnrollmentMessage returns a boolean if a field has been set. -func (o *RequestBrand) HasMfaEnrollmentMessage() bool { - if o != nil && !isNil(o.MfaEnrollmentMessage) { - return true - } - - return false -} - -// SetMfaEnrollmentMessage gets a reference to the given string and assigns it to the MfaEnrollmentMessage field. -func (o *RequestBrand) SetMfaEnrollmentMessage(v string) { - o.MfaEnrollmentMessage = &v -} - -// GetBackground returns the Background field value if set, zero value otherwise. -func (o *RequestBrand) GetBackground() string { - if o == nil || isNil(o.Background) { - var ret string - return ret - } - return *o.Background -} - -// 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 *RequestBrand) GetBackgroundOk() (*string, bool) { - if o == nil || isNil(o.Background) { - return nil, false - } - return o.Background, true -} - -// HasBackground returns a boolean if a field has been set. -func (o *RequestBrand) HasBackground() bool { - if o != nil && !isNil(o.Background) { - return true - } - - return false -} - -// SetBackground gets a reference to the given string and assigns it to the Background field. -func (o *RequestBrand) SetBackground(v string) { - o.Background = &v -} - -// GetLogo returns the Logo field value if set, zero value otherwise. -func (o *RequestBrand) GetLogo() string { - if o == nil || isNil(o.Logo) { - var ret string - return ret - } - return *o.Logo -} - -// GetLogoOk returns a tuple with the Logo field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RequestBrand) GetLogoOk() (*string, bool) { - if o == nil || isNil(o.Logo) { - return nil, false - } - return o.Logo, true -} - -// HasLogo returns a boolean if a field has been set. -func (o *RequestBrand) HasLogo() bool { - if o != nil && !isNil(o.Logo) { - return true - } - - return false -} - -// SetLogo gets a reference to the given string and assigns it to the Logo field. -func (o *RequestBrand) SetLogo(v string) { - o.Logo = &v -} - -func (o RequestBrand) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RequestBrand) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Enabled) { - toSerialize["enabled"] = o.Enabled - } - toSerialize["name"] = o.Name - if !isNil(o.CustomSupportEnabled) { - toSerialize["custom_support_enabled"] = o.CustomSupportEnabled - } - if !isNil(o.CustomColor) { - toSerialize["custom_color"] = o.CustomColor - } - if !isNil(o.CustomAccentColor) { - toSerialize["custom_accent_color"] = o.CustomAccentColor - } - if !isNil(o.CustomMaskingColor) { - toSerialize["custom_masking_color"] = o.CustomMaskingColor - } - if !isNil(o.CustomMaskingOpacity) { - toSerialize["custom_masking_opacity"] = o.CustomMaskingOpacity - } - if !isNil(o.EnableCustomLabelForLoginScreen) { - toSerialize["enable_custom_label_for_login_screen"] = o.EnableCustomLabelForLoginScreen - } - if !isNil(o.CustomLabelTextForLoginScreen) { - toSerialize["custom_label_text_for_login_screen"] = o.CustomLabelTextForLoginScreen - } - if !isNil(o.LoginInstructionTitle) { - toSerialize["login_instruction_title"] = o.LoginInstructionTitle - } - if !isNil(o.LoginInstruction) { - toSerialize["login_instruction"] = o.LoginInstruction - } - if !isNil(o.HideOneloginFooter) { - toSerialize["hide_onelogin_footer"] = o.HideOneloginFooter - } - if !isNil(o.MfaEnrollmentMessage) { - toSerialize["mfa_enrollment_message"] = o.MfaEnrollmentMessage - } - if !isNil(o.Background) { - toSerialize["background"] = o.Background - } - if !isNil(o.Logo) { - toSerialize["logo"] = o.Logo - } - return toSerialize, nil -} - -type NullableRequestBrand struct { - value *RequestBrand - isSet bool -} - -func (v NullableRequestBrand) Get() *RequestBrand { - return v.value -} - -func (v *NullableRequestBrand) Set(val *RequestBrand) { - v.value = val - v.isSet = true -} - -func (v NullableRequestBrand) IsSet() bool { - return v.isSet -} - -func (v *NullableRequestBrand) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRequestBrand(val *RequestBrand) *NullableRequestBrand { - return &NullableRequestBrand{value: val, isSet: true} -} - -func (v NullableRequestBrand) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRequestBrand) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_revoke_tokens_request.go b/model_revoke_tokens_request.go deleted file mode 100644 index e9e62c1..0000000 --- a/model_revoke_tokens_request.go +++ /dev/null @@ -1,118 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the RevokeTokensRequest type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RevokeTokensRequest{} - -// RevokeTokensRequest struct for RevokeTokensRequest -type RevokeTokensRequest struct { - // Set to the access token you want to revoke. This access token must have been generated using the client_id and client_secret provided in the Authorization header. - AccessToken string `json:"access_token"` -} - -// NewRevokeTokensRequest instantiates a new RevokeTokensRequest 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 NewRevokeTokensRequest(accessToken string) *RevokeTokensRequest { - this := RevokeTokensRequest{} - this.AccessToken = accessToken - return &this -} - -// NewRevokeTokensRequestWithDefaults instantiates a new RevokeTokensRequest 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 NewRevokeTokensRequestWithDefaults() *RevokeTokensRequest { - this := RevokeTokensRequest{} - return &this -} - -// GetAccessToken returns the AccessToken field value -func (o *RevokeTokensRequest) GetAccessToken() string { - if o == nil { - var ret string - return ret - } - - return o.AccessToken -} - -// GetAccessTokenOk returns a tuple with the AccessToken field value -// and a boolean to check if the value has been set. -func (o *RevokeTokensRequest) GetAccessTokenOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.AccessToken, true -} - -// SetAccessToken sets field value -func (o *RevokeTokensRequest) SetAccessToken(v string) { - o.AccessToken = v -} - -func (o RevokeTokensRequest) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RevokeTokensRequest) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["access_token"] = o.AccessToken - return toSerialize, nil -} - -type NullableRevokeTokensRequest struct { - value *RevokeTokensRequest - isSet bool -} - -func (v NullableRevokeTokensRequest) Get() *RevokeTokensRequest { - return v.value -} - -func (v *NullableRevokeTokensRequest) Set(val *RevokeTokensRequest) { - v.value = val - v.isSet = true -} - -func (v NullableRevokeTokensRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableRevokeTokensRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRevokeTokensRequest(val *RevokeTokensRequest) *NullableRevokeTokensRequest { - return &NullableRevokeTokensRequest{value: val, isSet: true} -} - -func (v NullableRevokeTokensRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRevokeTokensRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_risk_device.go b/model_risk_device.go deleted file mode 100644 index 469f0e4..0000000 --- a/model_risk_device.go +++ /dev/null @@ -1,127 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the RiskDevice type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RiskDevice{} - -// RiskDevice Information about the device being used. -type RiskDevice struct { - // This device's unique identifier - Id *string `json:"id,omitempty"` -} - -// NewRiskDevice instantiates a new RiskDevice 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 NewRiskDevice() *RiskDevice { - this := RiskDevice{} - return &this -} - -// NewRiskDeviceWithDefaults instantiates a new RiskDevice 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 NewRiskDeviceWithDefaults() *RiskDevice { - this := RiskDevice{} - return &this -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *RiskDevice) GetId() string { - if o == nil || isNil(o.Id) { - var ret string - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RiskDevice) GetIdOk() (*string, bool) { - if o == nil || isNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *RiskDevice) HasId() bool { - if o != nil && !isNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given string and assigns it to the Id field. -func (o *RiskDevice) SetId(v string) { - o.Id = &v -} - -func (o RiskDevice) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RiskDevice) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Id) { - toSerialize["id"] = o.Id - } - return toSerialize, nil -} - -type NullableRiskDevice struct { - value *RiskDevice - isSet bool -} - -func (v NullableRiskDevice) Get() *RiskDevice { - return v.value -} - -func (v *NullableRiskDevice) Set(val *RiskDevice) { - v.value = val - v.isSet = true -} - -func (v NullableRiskDevice) IsSet() bool { - return v.isSet -} - -func (v *NullableRiskDevice) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRiskDevice(val *RiskDevice) *NullableRiskDevice { - return &NullableRiskDevice{value: val, isSet: true} -} - -func (v NullableRiskDevice) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRiskDevice) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_risk_rule.go b/model_risk_rule.go deleted file mode 100644 index 08d7498..0000000 --- a/model_risk_rule.go +++ /dev/null @@ -1,346 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the RiskRule type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RiskRule{} - -// RiskRule struct for RiskRule -type RiskRule struct { - Id *string `json:"id,omitempty"` - // The name of this rule - Name *string `json:"name,omitempty"` - Description *string `json:"description,omitempty"` - // The type parameter specifies the type of rule that will be created. - Type *string `json:"type,omitempty"` - // The target parameter that will be used when evaluating the rule against an incoming event. - Target *string `json:"target,omitempty"` - // A list of IP addresses or country codes or names to evaluate against each event. - Filters []string `json:"filters,omitempty"` - Source *Source `json:"source,omitempty"` -} - -// NewRiskRule instantiates a new RiskRule 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 NewRiskRule() *RiskRule { - this := RiskRule{} - return &this -} - -// NewRiskRuleWithDefaults instantiates a new RiskRule 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 NewRiskRuleWithDefaults() *RiskRule { - this := RiskRule{} - return &this -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *RiskRule) GetId() string { - if o == nil || isNil(o.Id) { - var ret string - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RiskRule) GetIdOk() (*string, bool) { - if o == nil || isNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *RiskRule) HasId() bool { - if o != nil && !isNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given string and assigns it to the Id field. -func (o *RiskRule) SetId(v string) { - o.Id = &v -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *RiskRule) GetName() string { - if o == nil || isNil(o.Name) { - var ret string - return ret - } - return *o.Name -} - -// 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 *RiskRule) GetNameOk() (*string, bool) { - if o == nil || isNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *RiskRule) HasName() bool { - if o != nil && !isNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *RiskRule) SetName(v string) { - o.Name = &v -} - -// GetDescription returns the Description field value if set, zero value otherwise. -func (o *RiskRule) GetDescription() string { - if o == nil || isNil(o.Description) { - var ret string - return ret - } - return *o.Description -} - -// 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 *RiskRule) GetDescriptionOk() (*string, bool) { - if o == nil || isNil(o.Description) { - return nil, false - } - return o.Description, true -} - -// HasDescription returns a boolean if a field has been set. -func (o *RiskRule) HasDescription() bool { - if o != nil && !isNil(o.Description) { - return true - } - - return false -} - -// SetDescription gets a reference to the given string and assigns it to the Description field. -func (o *RiskRule) SetDescription(v string) { - o.Description = &v -} - -// GetType returns the Type field value if set, zero value otherwise. -func (o *RiskRule) GetType() string { - if o == nil || isNil(o.Type) { - var ret string - return ret - } - return *o.Type -} - -// 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 *RiskRule) GetTypeOk() (*string, bool) { - if o == nil || isNil(o.Type) { - return nil, false - } - return o.Type, true -} - -// HasType returns a boolean if a field has been set. -func (o *RiskRule) HasType() bool { - if o != nil && !isNil(o.Type) { - return true - } - - return false -} - -// SetType gets a reference to the given string and assigns it to the Type field. -func (o *RiskRule) SetType(v string) { - o.Type = &v -} - -// GetTarget returns the Target field value if set, zero value otherwise. -func (o *RiskRule) GetTarget() string { - if o == nil || isNil(o.Target) { - var ret string - return ret - } - return *o.Target -} - -// 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 *RiskRule) GetTargetOk() (*string, bool) { - if o == nil || isNil(o.Target) { - return nil, false - } - return o.Target, true -} - -// HasTarget returns a boolean if a field has been set. -func (o *RiskRule) HasTarget() bool { - if o != nil && !isNil(o.Target) { - return true - } - - return false -} - -// SetTarget gets a reference to the given string and assigns it to the Target field. -func (o *RiskRule) SetTarget(v string) { - o.Target = &v -} - -// GetFilters returns the Filters field value if set, zero value otherwise. -func (o *RiskRule) GetFilters() []string { - if o == nil || isNil(o.Filters) { - var ret []string - return ret - } - return o.Filters -} - -// GetFiltersOk returns a tuple with the Filters field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RiskRule) GetFiltersOk() ([]string, bool) { - if o == nil || isNil(o.Filters) { - return nil, false - } - return o.Filters, true -} - -// HasFilters returns a boolean if a field has been set. -func (o *RiskRule) HasFilters() bool { - if o != nil && !isNil(o.Filters) { - return true - } - - return false -} - -// SetFilters gets a reference to the given []string and assigns it to the Filters field. -func (o *RiskRule) SetFilters(v []string) { - o.Filters = v -} - -// GetSource returns the Source field value if set, zero value otherwise. -func (o *RiskRule) GetSource() Source { - if o == nil || isNil(o.Source) { - var ret Source - return ret - } - return *o.Source -} - -// GetSourceOk returns a tuple with the Source field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RiskRule) GetSourceOk() (*Source, bool) { - if o == nil || isNil(o.Source) { - return nil, false - } - return o.Source, true -} - -// HasSource returns a boolean if a field has been set. -func (o *RiskRule) HasSource() bool { - if o != nil && !isNil(o.Source) { - return true - } - - return false -} - -// SetSource gets a reference to the given Source and assigns it to the Source field. -func (o *RiskRule) SetSource(v Source) { - o.Source = &v -} - -func (o RiskRule) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RiskRule) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Id) { - toSerialize["id"] = o.Id - } - if !isNil(o.Name) { - toSerialize["name"] = o.Name - } - if !isNil(o.Description) { - toSerialize["description"] = o.Description - } - if !isNil(o.Type) { - toSerialize["type"] = o.Type - } - if !isNil(o.Target) { - toSerialize["target"] = o.Target - } - if !isNil(o.Filters) { - toSerialize["filters"] = o.Filters - } - if !isNil(o.Source) { - toSerialize["source"] = o.Source - } - return toSerialize, nil -} - -type NullableRiskRule struct { - value *RiskRule - isSet bool -} - -func (v NullableRiskRule) Get() *RiskRule { - return v.value -} - -func (v *NullableRiskRule) Set(val *RiskRule) { - v.value = val - v.isSet = true -} - -func (v NullableRiskRule) IsSet() bool { - return v.isSet -} - -func (v *NullableRiskRule) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRiskRule(val *RiskRule) *NullableRiskRule { - return &NullableRiskRule{value: val, isSet: true} -} - -func (v NullableRiskRule) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRiskRule) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_risk_user.go b/model_risk_user.go deleted file mode 100644 index f920100..0000000 --- a/model_risk_user.go +++ /dev/null @@ -1,196 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the RiskUser type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RiskUser{} - -// RiskUser An Object containing User details. -type RiskUser struct { - // A unique identifier for the user. - Id string `json:"id"` - // A name for the user. - Name *string `json:"name,omitempty"` - // Indicates if the metadata supplied in this event should be considered as trusted for the user. - Authenticated *bool `json:"authenticated,omitempty"` -} - -// NewRiskUser instantiates a new RiskUser 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 NewRiskUser(id string) *RiskUser { - this := RiskUser{} - this.Id = id - var authenticated bool = false - this.Authenticated = &authenticated - return &this -} - -// NewRiskUserWithDefaults instantiates a new RiskUser 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 NewRiskUserWithDefaults() *RiskUser { - this := RiskUser{} - var authenticated bool = false - this.Authenticated = &authenticated - return &this -} - -// GetId returns the Id field value -func (o *RiskUser) GetId() string { - if o == nil { - var ret string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *RiskUser) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Id, true -} - -// SetId sets field value -func (o *RiskUser) SetId(v string) { - o.Id = v -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *RiskUser) GetName() string { - if o == nil || isNil(o.Name) { - var ret string - return ret - } - return *o.Name -} - -// 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 *RiskUser) GetNameOk() (*string, bool) { - if o == nil || isNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *RiskUser) HasName() bool { - if o != nil && !isNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *RiskUser) SetName(v string) { - o.Name = &v -} - -// GetAuthenticated returns the Authenticated field value if set, zero value otherwise. -func (o *RiskUser) GetAuthenticated() bool { - if o == nil || isNil(o.Authenticated) { - var ret bool - return ret - } - return *o.Authenticated -} - -// GetAuthenticatedOk returns a tuple with the Authenticated field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RiskUser) GetAuthenticatedOk() (*bool, bool) { - if o == nil || isNil(o.Authenticated) { - return nil, false - } - return o.Authenticated, true -} - -// HasAuthenticated returns a boolean if a field has been set. -func (o *RiskUser) HasAuthenticated() bool { - if o != nil && !isNil(o.Authenticated) { - return true - } - - return false -} - -// SetAuthenticated gets a reference to the given bool and assigns it to the Authenticated field. -func (o *RiskUser) SetAuthenticated(v bool) { - o.Authenticated = &v -} - -func (o RiskUser) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RiskUser) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["id"] = o.Id - if !isNil(o.Name) { - toSerialize["name"] = o.Name - } - if !isNil(o.Authenticated) { - toSerialize["authenticated"] = o.Authenticated - } - return toSerialize, nil -} - -type NullableRiskUser struct { - value *RiskUser - isSet bool -} - -func (v NullableRiskUser) Get() *RiskUser { - return v.value -} - -func (v *NullableRiskUser) Set(val *RiskUser) { - v.value = val - v.isSet = true -} - -func (v NullableRiskUser) IsSet() bool { - return v.isSet -} - -func (v *NullableRiskUser) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRiskUser(val *RiskUser) *NullableRiskUser { - return &NullableRiskUser{value: val, isSet: true} -} - -func (v NullableRiskUser) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRiskUser) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_role.go b/model_role.go deleted file mode 100644 index 96f2aa9..0000000 --- a/model_role.go +++ /dev/null @@ -1,264 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the Role type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Role{} - -// Role struct for Role -type Role struct { - // Role ID - Id *int32 `json:"id,omitempty"` - // The name of the role. - Name string `json:"name"` - // A list of app IDs that will be assigned to the role. - Apps []int32 `json:"apps,omitempty"` - // A list of user IDs to assign to the role. - Users []int32 `json:"users,omitempty"` - // A list of user IDs to assign as role administrators. - Admins []int32 `json:"admins,omitempty"` -} - -// NewRole instantiates a new Role 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 NewRole(name string) *Role { - this := Role{} - this.Name = name - return &this -} - -// NewRoleWithDefaults instantiates a new Role 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 NewRoleWithDefaults() *Role { - this := Role{} - return &this -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *Role) GetId() int32 { - if o == nil || isNil(o.Id) { - var ret int32 - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Role) GetIdOk() (*int32, bool) { - if o == nil || isNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *Role) HasId() bool { - if o != nil && !isNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given int32 and assigns it to the Id field. -func (o *Role) SetId(v int32) { - o.Id = &v -} - -// GetName returns the Name field value -func (o *Role) 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 *Role) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *Role) SetName(v string) { - o.Name = v -} - -// GetApps returns the Apps field value if set, zero value otherwise. -func (o *Role) GetApps() []int32 { - if o == nil || isNil(o.Apps) { - var ret []int32 - return ret - } - return o.Apps -} - -// GetAppsOk returns a tuple with the Apps field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Role) GetAppsOk() ([]int32, bool) { - if o == nil || isNil(o.Apps) { - return nil, false - } - return o.Apps, true -} - -// HasApps returns a boolean if a field has been set. -func (o *Role) HasApps() bool { - if o != nil && !isNil(o.Apps) { - return true - } - - return false -} - -// SetApps gets a reference to the given []int32 and assigns it to the Apps field. -func (o *Role) SetApps(v []int32) { - o.Apps = v -} - -// GetUsers returns the Users field value if set, zero value otherwise. -func (o *Role) GetUsers() []int32 { - if o == nil || isNil(o.Users) { - 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 *Role) GetUsersOk() ([]int32, bool) { - if o == nil || isNil(o.Users) { - return nil, false - } - return o.Users, true -} - -// HasUsers returns a boolean if a field has been set. -func (o *Role) HasUsers() bool { - if o != nil && !isNil(o.Users) { - return true - } - - return false -} - -// SetUsers gets a reference to the given []int32 and assigns it to the Users field. -func (o *Role) SetUsers(v []int32) { - o.Users = v -} - -// GetAdmins returns the Admins field value if set, zero value otherwise. -func (o *Role) GetAdmins() []int32 { - if o == nil || isNil(o.Admins) { - var ret []int32 - return ret - } - return o.Admins -} - -// GetAdminsOk returns a tuple with the Admins field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Role) GetAdminsOk() ([]int32, bool) { - if o == nil || isNil(o.Admins) { - return nil, false - } - return o.Admins, true -} - -// HasAdmins returns a boolean if a field has been set. -func (o *Role) HasAdmins() bool { - if o != nil && !isNil(o.Admins) { - return true - } - - return false -} - -// SetAdmins gets a reference to the given []int32 and assigns it to the Admins field. -func (o *Role) SetAdmins(v []int32) { - o.Admins = v -} - -func (o Role) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Role) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - // skip: id is readOnly - toSerialize["name"] = o.Name - if !isNil(o.Apps) { - toSerialize["apps"] = o.Apps - } - if !isNil(o.Users) { - toSerialize["users"] = o.Users - } - if !isNil(o.Admins) { - toSerialize["admins"] = o.Admins - } - return toSerialize, nil -} - -type NullableRole struct { - value *Role - isSet bool -} - -func (v NullableRole) Get() *Role { - return v.value -} - -func (v *NullableRole) Set(val *Role) { - v.value = val - v.isSet = true -} - -func (v NullableRole) IsSet() bool { - return v.isSet -} - -func (v *NullableRole) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRole(val *Role) *NullableRole { - return &NullableRole{value: val, isSet: true} -} - -func (v NullableRole) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRole) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_rule_action.go b/model_rule_action.go deleted file mode 100644 index bd8cd73..0000000 --- a/model_rule_action.go +++ /dev/null @@ -1,164 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the RuleAction type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RuleAction{} - -// RuleAction struct for RuleAction -type RuleAction struct { - // Name of the Action - Name *string `json:"name,omitempty"` - // The unique identifier of the action. This should be used when defining actions for a User Mapping. - Value *string `json:"value,omitempty"` -} - -// NewRuleAction instantiates a new RuleAction 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 NewRuleAction() *RuleAction { - this := RuleAction{} - return &this -} - -// NewRuleActionWithDefaults instantiates a new RuleAction 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 NewRuleActionWithDefaults() *RuleAction { - this := RuleAction{} - return &this -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *RuleAction) GetName() string { - if o == nil || isNil(o.Name) { - var ret string - return ret - } - return *o.Name -} - -// 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 *RuleAction) GetNameOk() (*string, bool) { - if o == nil || isNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *RuleAction) HasName() bool { - if o != nil && !isNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *RuleAction) SetName(v string) { - o.Name = &v -} - -// GetValue returns the Value field value if set, zero value otherwise. -func (o *RuleAction) GetValue() string { - if o == nil || isNil(o.Value) { - var ret string - return ret - } - return *o.Value -} - -// GetValueOk returns a tuple with the Value field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RuleAction) GetValueOk() (*string, bool) { - if o == nil || isNil(o.Value) { - return nil, false - } - return o.Value, true -} - -// HasValue returns a boolean if a field has been set. -func (o *RuleAction) HasValue() bool { - if o != nil && !isNil(o.Value) { - return true - } - - return false -} - -// SetValue gets a reference to the given string and assigns it to the Value field. -func (o *RuleAction) SetValue(v string) { - o.Value = &v -} - -func (o RuleAction) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RuleAction) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Name) { - toSerialize["name"] = o.Name - } - if !isNil(o.Value) { - toSerialize["value"] = o.Value - } - return toSerialize, nil -} - -type NullableRuleAction struct { - value *RuleAction - isSet bool -} - -func (v NullableRuleAction) Get() *RuleAction { - return v.value -} - -func (v *NullableRuleAction) Set(val *RuleAction) { - v.value = val - v.isSet = true -} - -func (v NullableRuleAction) IsSet() bool { - return v.isSet -} - -func (v *NullableRuleAction) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRuleAction(val *RuleAction) *NullableRuleAction { - return &NullableRuleAction{value: val, isSet: true} -} - -func (v NullableRuleAction) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRuleAction) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_rule_condition.go b/model_rule_condition.go deleted file mode 100644 index 8fce1fa..0000000 --- a/model_rule_condition.go +++ /dev/null @@ -1,164 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the RuleCondition type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RuleCondition{} - -// RuleCondition struct for RuleCondition -type RuleCondition struct { - // Name of the operator - Name *string `json:"name,omitempty"` - // The condition operator value to use when creating or updating rules. - Value *string `json:"value,omitempty"` -} - -// NewRuleCondition instantiates a new RuleCondition 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 NewRuleCondition() *RuleCondition { - this := RuleCondition{} - return &this -} - -// NewRuleConditionWithDefaults instantiates a new RuleCondition 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 NewRuleConditionWithDefaults() *RuleCondition { - this := RuleCondition{} - return &this -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *RuleCondition) GetName() string { - if o == nil || isNil(o.Name) { - var ret string - return ret - } - return *o.Name -} - -// 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 *RuleCondition) GetNameOk() (*string, bool) { - if o == nil || isNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *RuleCondition) HasName() bool { - if o != nil && !isNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *RuleCondition) SetName(v string) { - o.Name = &v -} - -// GetValue returns the Value field value if set, zero value otherwise. -func (o *RuleCondition) GetValue() string { - if o == nil || isNil(o.Value) { - var ret string - return ret - } - return *o.Value -} - -// GetValueOk returns a tuple with the Value field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RuleCondition) GetValueOk() (*string, bool) { - if o == nil || isNil(o.Value) { - return nil, false - } - return o.Value, true -} - -// HasValue returns a boolean if a field has been set. -func (o *RuleCondition) HasValue() bool { - if o != nil && !isNil(o.Value) { - return true - } - - return false -} - -// SetValue gets a reference to the given string and assigns it to the Value field. -func (o *RuleCondition) SetValue(v string) { - o.Value = &v -} - -func (o RuleCondition) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RuleCondition) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Name) { - toSerialize["name"] = o.Name - } - if !isNil(o.Value) { - toSerialize["value"] = o.Value - } - return toSerialize, nil -} - -type NullableRuleCondition struct { - value *RuleCondition - isSet bool -} - -func (v NullableRuleCondition) Get() *RuleCondition { - return v.value -} - -func (v *NullableRuleCondition) Set(val *RuleCondition) { - v.value = val - v.isSet = true -} - -func (v NullableRuleCondition) IsSet() bool { - return v.isSet -} - -func (v *NullableRuleCondition) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRuleCondition(val *RuleCondition) *NullableRuleCondition { - return &NullableRuleCondition{value: val, isSet: true} -} - -func (v NullableRuleCondition) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRuleCondition) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_saml_app.go b/model_saml_app.go deleted file mode 100644 index 527ae5c..0000000 --- a/model_saml_app.go +++ /dev/null @@ -1,722 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the SamlApp type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SamlApp{} - -// SamlApp struct for SamlApp -type SamlApp struct { - // Apps unique ID in OneLogin. - Id *int32 `json:"id,omitempty"` - // The name of the app. - Name string `json:"name"` - // Indicates if the app is visible in the OneLogin portal. - Visible bool `json:"visible"` - // Freeform description of the app. - Description string `json:"description"` - // Freeform notes about the app. - Notes *string `json:"notes,omitempty"` - // A link to the apps icon url - IconUrl *string `json:"icon_url,omitempty"` - AuthMethod *AuthMethod `json:"auth_method,omitempty"` - // The security policy assigned to the app. - PolicyId int32 `json:"policy_id"` - // Indicates whether or not administrators can access the app as a user that they have assumed control over. - AllowAssumedSignin *bool `json:"allow_assumed_signin,omitempty"` - // ID of the OneLogin portal tab that the app is assigned to. - TabId *int32 `json:"tab_id,omitempty"` - // ID of the connector to base the app from. - ConnectorId int32 `json:"connector_id"` - // the date the app was created - CreatedAt *string `json:"created_at,omitempty"` - // the date the app was last updated - UpdatedAt *string `json:"updated_at,omitempty"` - // List of Role IDs that are assigned to the app. On App Create or Update the entire array is replaced with the values provided. - RoleIds []int32 `json:"role_ids,omitempty"` - Provisioning *GenericAppProvisioning `json:"provisioning,omitempty"` - Parameters SamlAppAllOfParameters `json:"parameters"` - EnforcementPoint *EnforcementPoint `json:"enforcement_point,omitempty"` - Configuration ConfigurationSaml `json:"configuration"` - Sso *SsoSaml `json:"sso,omitempty"` -} - -// NewSamlApp instantiates a new SamlApp 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 NewSamlApp(name string, visible bool, description string, policyId int32, connectorId int32, parameters SamlAppAllOfParameters, configuration ConfigurationSaml) *SamlApp { - this := SamlApp{} - this.Name = name - this.Visible = visible - this.Description = description - this.PolicyId = policyId - this.ConnectorId = connectorId - this.Parameters = parameters - this.Configuration = configuration - return &this -} - -// NewSamlAppWithDefaults instantiates a new SamlApp 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 NewSamlAppWithDefaults() *SamlApp { - this := SamlApp{} - return &this -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *SamlApp) GetId() int32 { - if o == nil || isNil(o.Id) { - var ret int32 - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SamlApp) GetIdOk() (*int32, bool) { - if o == nil || isNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *SamlApp) HasId() bool { - if o != nil && !isNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given int32 and assigns it to the Id field. -func (o *SamlApp) SetId(v int32) { - o.Id = &v -} - -// GetName returns the Name field value -func (o *SamlApp) 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 *SamlApp) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *SamlApp) SetName(v string) { - o.Name = v -} - -// GetVisible returns the Visible field value -func (o *SamlApp) GetVisible() bool { - if o == nil { - var ret bool - return ret - } - - return o.Visible -} - -// GetVisibleOk returns a tuple with the Visible field value -// and a boolean to check if the value has been set. -func (o *SamlApp) GetVisibleOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.Visible, true -} - -// SetVisible sets field value -func (o *SamlApp) SetVisible(v bool) { - o.Visible = v -} - -// GetDescription returns the Description field value -func (o *SamlApp) GetDescription() string { - if o == nil { - var ret string - return ret - } - - return o.Description -} - -// GetDescriptionOk returns a tuple with the Description field value -// and a boolean to check if the value has been set. -func (o *SamlApp) GetDescriptionOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Description, true -} - -// SetDescription sets field value -func (o *SamlApp) SetDescription(v string) { - o.Description = v -} - -// GetNotes returns the Notes field value if set, zero value otherwise. -func (o *SamlApp) GetNotes() string { - if o == nil || isNil(o.Notes) { - var ret string - return ret - } - return *o.Notes -} - -// GetNotesOk returns a tuple with the Notes field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SamlApp) GetNotesOk() (*string, bool) { - if o == nil || isNil(o.Notes) { - return nil, false - } - return o.Notes, true -} - -// HasNotes returns a boolean if a field has been set. -func (o *SamlApp) HasNotes() bool { - if o != nil && !isNil(o.Notes) { - return true - } - - return false -} - -// SetNotes gets a reference to the given string and assigns it to the Notes field. -func (o *SamlApp) SetNotes(v string) { - o.Notes = &v -} - -// GetIconUrl returns the IconUrl field value if set, zero value otherwise. -func (o *SamlApp) GetIconUrl() string { - if o == nil || isNil(o.IconUrl) { - var ret string - return ret - } - return *o.IconUrl -} - -// 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 *SamlApp) GetIconUrlOk() (*string, bool) { - if o == nil || isNil(o.IconUrl) { - return nil, false - } - return o.IconUrl, true -} - -// HasIconUrl returns a boolean if a field has been set. -func (o *SamlApp) HasIconUrl() bool { - if o != nil && !isNil(o.IconUrl) { - return true - } - - return false -} - -// SetIconUrl gets a reference to the given string and assigns it to the IconUrl field. -func (o *SamlApp) SetIconUrl(v string) { - o.IconUrl = &v -} - -// GetAuthMethod returns the AuthMethod field value if set, zero value otherwise. -func (o *SamlApp) GetAuthMethod() AuthMethod { - if o == nil || isNil(o.AuthMethod) { - var ret AuthMethod - return ret - } - return *o.AuthMethod -} - -// GetAuthMethodOk returns a tuple with the AuthMethod field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SamlApp) GetAuthMethodOk() (*AuthMethod, bool) { - if o == nil || isNil(o.AuthMethod) { - return nil, false - } - return o.AuthMethod, true -} - -// HasAuthMethod returns a boolean if a field has been set. -func (o *SamlApp) HasAuthMethod() bool { - if o != nil && !isNil(o.AuthMethod) { - return true - } - - return false -} - -// SetAuthMethod gets a reference to the given AuthMethod and assigns it to the AuthMethod field. -func (o *SamlApp) SetAuthMethod(v AuthMethod) { - o.AuthMethod = &v -} - -// GetPolicyId returns the PolicyId field value -func (o *SamlApp) GetPolicyId() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.PolicyId -} - -// GetPolicyIdOk returns a tuple with the PolicyId field value -// and a boolean to check if the value has been set. -func (o *SamlApp) GetPolicyIdOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.PolicyId, true -} - -// SetPolicyId sets field value -func (o *SamlApp) SetPolicyId(v int32) { - o.PolicyId = v -} - -// GetAllowAssumedSignin returns the AllowAssumedSignin field value if set, zero value otherwise. -func (o *SamlApp) GetAllowAssumedSignin() bool { - if o == nil || isNil(o.AllowAssumedSignin) { - var ret bool - return ret - } - return *o.AllowAssumedSignin -} - -// GetAllowAssumedSigninOk returns a tuple with the AllowAssumedSignin field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SamlApp) GetAllowAssumedSigninOk() (*bool, bool) { - if o == nil || isNil(o.AllowAssumedSignin) { - return nil, false - } - return o.AllowAssumedSignin, true -} - -// HasAllowAssumedSignin returns a boolean if a field has been set. -func (o *SamlApp) HasAllowAssumedSignin() bool { - if o != nil && !isNil(o.AllowAssumedSignin) { - return true - } - - return false -} - -// SetAllowAssumedSignin gets a reference to the given bool and assigns it to the AllowAssumedSignin field. -func (o *SamlApp) SetAllowAssumedSignin(v bool) { - o.AllowAssumedSignin = &v -} - -// GetTabId returns the TabId field value if set, zero value otherwise. -func (o *SamlApp) GetTabId() int32 { - if o == nil || isNil(o.TabId) { - var ret int32 - return ret - } - return *o.TabId -} - -// GetTabIdOk returns a tuple with the TabId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SamlApp) GetTabIdOk() (*int32, bool) { - if o == nil || isNil(o.TabId) { - return nil, false - } - return o.TabId, true -} - -// HasTabId returns a boolean if a field has been set. -func (o *SamlApp) HasTabId() bool { - if o != nil && !isNil(o.TabId) { - return true - } - - return false -} - -// SetTabId gets a reference to the given int32 and assigns it to the TabId field. -func (o *SamlApp) SetTabId(v int32) { - o.TabId = &v -} - -// GetConnectorId returns the ConnectorId field value -func (o *SamlApp) GetConnectorId() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.ConnectorId -} - -// GetConnectorIdOk returns a tuple with the ConnectorId field value -// and a boolean to check if the value has been set. -func (o *SamlApp) GetConnectorIdOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.ConnectorId, true -} - -// SetConnectorId sets field value -func (o *SamlApp) SetConnectorId(v int32) { - o.ConnectorId = v -} - -// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. -func (o *SamlApp) GetCreatedAt() string { - if o == nil || isNil(o.CreatedAt) { - var ret string - return ret - } - return *o.CreatedAt -} - -// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SamlApp) GetCreatedAtOk() (*string, bool) { - if o == nil || isNil(o.CreatedAt) { - return nil, false - } - return o.CreatedAt, true -} - -// HasCreatedAt returns a boolean if a field has been set. -func (o *SamlApp) HasCreatedAt() bool { - if o != nil && !isNil(o.CreatedAt) { - return true - } - - return false -} - -// SetCreatedAt gets a reference to the given string and assigns it to the CreatedAt field. -func (o *SamlApp) SetCreatedAt(v string) { - o.CreatedAt = &v -} - -// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. -func (o *SamlApp) GetUpdatedAt() string { - if o == nil || isNil(o.UpdatedAt) { - var ret string - return ret - } - return *o.UpdatedAt -} - -// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SamlApp) GetUpdatedAtOk() (*string, bool) { - if o == nil || isNil(o.UpdatedAt) { - return nil, false - } - return o.UpdatedAt, true -} - -// HasUpdatedAt returns a boolean if a field has been set. -func (o *SamlApp) HasUpdatedAt() bool { - if o != nil && !isNil(o.UpdatedAt) { - return true - } - - return false -} - -// SetUpdatedAt gets a reference to the given string and assigns it to the UpdatedAt field. -func (o *SamlApp) SetUpdatedAt(v string) { - o.UpdatedAt = &v -} - -// GetRoleIds returns the RoleIds field value if set, zero value otherwise. -func (o *SamlApp) GetRoleIds() []int32 { - if o == nil || isNil(o.RoleIds) { - var ret []int32 - return ret - } - return o.RoleIds -} - -// GetRoleIdsOk returns a tuple with the RoleIds field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SamlApp) GetRoleIdsOk() ([]int32, bool) { - if o == nil || isNil(o.RoleIds) { - return nil, false - } - return o.RoleIds, true -} - -// HasRoleIds returns a boolean if a field has been set. -func (o *SamlApp) HasRoleIds() bool { - if o != nil && !isNil(o.RoleIds) { - return true - } - - return false -} - -// SetRoleIds gets a reference to the given []int32 and assigns it to the RoleIds field. -func (o *SamlApp) SetRoleIds(v []int32) { - o.RoleIds = v -} - -// GetProvisioning returns the Provisioning field value if set, zero value otherwise. -func (o *SamlApp) GetProvisioning() GenericAppProvisioning { - if o == nil || isNil(o.Provisioning) { - var ret GenericAppProvisioning - return ret - } - return *o.Provisioning -} - -// GetProvisioningOk returns a tuple with the Provisioning field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SamlApp) GetProvisioningOk() (*GenericAppProvisioning, bool) { - if o == nil || isNil(o.Provisioning) { - return nil, false - } - return o.Provisioning, true -} - -// HasProvisioning returns a boolean if a field has been set. -func (o *SamlApp) HasProvisioning() bool { - if o != nil && !isNil(o.Provisioning) { - return true - } - - return false -} - -// SetProvisioning gets a reference to the given GenericAppProvisioning and assigns it to the Provisioning field. -func (o *SamlApp) SetProvisioning(v GenericAppProvisioning) { - o.Provisioning = &v -} - -// GetParameters returns the Parameters field value -func (o *SamlApp) GetParameters() SamlAppAllOfParameters { - if o == nil { - var ret SamlAppAllOfParameters - return ret - } - - return o.Parameters -} - -// GetParametersOk returns a tuple with the Parameters field value -// and a boolean to check if the value has been set. -func (o *SamlApp) GetParametersOk() (*SamlAppAllOfParameters, bool) { - if o == nil { - return nil, false - } - return &o.Parameters, true -} - -// SetParameters sets field value -func (o *SamlApp) SetParameters(v SamlAppAllOfParameters) { - o.Parameters = v -} - -// GetEnforcementPoint returns the EnforcementPoint field value if set, zero value otherwise. -func (o *SamlApp) GetEnforcementPoint() EnforcementPoint { - if o == nil || isNil(o.EnforcementPoint) { - var ret EnforcementPoint - return ret - } - return *o.EnforcementPoint -} - -// GetEnforcementPointOk returns a tuple with the EnforcementPoint field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SamlApp) GetEnforcementPointOk() (*EnforcementPoint, bool) { - if o == nil || isNil(o.EnforcementPoint) { - return nil, false - } - return o.EnforcementPoint, true -} - -// HasEnforcementPoint returns a boolean if a field has been set. -func (o *SamlApp) HasEnforcementPoint() bool { - if o != nil && !isNil(o.EnforcementPoint) { - return true - } - - return false -} - -// SetEnforcementPoint gets a reference to the given EnforcementPoint and assigns it to the EnforcementPoint field. -func (o *SamlApp) SetEnforcementPoint(v EnforcementPoint) { - o.EnforcementPoint = &v -} - -// GetConfiguration returns the Configuration field value -func (o *SamlApp) GetConfiguration() ConfigurationSaml { - if o == nil { - var ret ConfigurationSaml - return ret - } - - return o.Configuration -} - -// GetConfigurationOk returns a tuple with the Configuration field value -// and a boolean to check if the value has been set. -func (o *SamlApp) GetConfigurationOk() (*ConfigurationSaml, bool) { - if o == nil { - return nil, false - } - return &o.Configuration, true -} - -// SetConfiguration sets field value -func (o *SamlApp) SetConfiguration(v ConfigurationSaml) { - o.Configuration = v -} - -// GetSso returns the Sso field value if set, zero value otherwise. -func (o *SamlApp) GetSso() SsoSaml { - if o == nil || isNil(o.Sso) { - var ret SsoSaml - return ret - } - return *o.Sso -} - -// GetSsoOk returns a tuple with the Sso field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SamlApp) GetSsoOk() (*SsoSaml, bool) { - if o == nil || isNil(o.Sso) { - return nil, false - } - return o.Sso, true -} - -// HasSso returns a boolean if a field has been set. -func (o *SamlApp) HasSso() bool { - if o != nil && !isNil(o.Sso) { - return true - } - - return false -} - -// SetSso gets a reference to the given SsoSaml and assigns it to the Sso field. -func (o *SamlApp) SetSso(v SsoSaml) { - o.Sso = &v -} - -func (o SamlApp) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o SamlApp) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - // skip: id is readOnly - toSerialize["name"] = o.Name - toSerialize["visible"] = o.Visible - toSerialize["description"] = o.Description - if !isNil(o.Notes) { - toSerialize["notes"] = o.Notes - } - if !isNil(o.IconUrl) { - toSerialize["icon_url"] = o.IconUrl - } - if !isNil(o.AuthMethod) { - toSerialize["auth_method"] = o.AuthMethod - } - toSerialize["policy_id"] = o.PolicyId - if !isNil(o.AllowAssumedSignin) { - toSerialize["allow_assumed_signin"] = o.AllowAssumedSignin - } - if !isNil(o.TabId) { - toSerialize["tab_id"] = o.TabId - } - toSerialize["connector_id"] = o.ConnectorId - if !isNil(o.CreatedAt) { - toSerialize["created_at"] = o.CreatedAt - } - if !isNil(o.UpdatedAt) { - toSerialize["updated_at"] = o.UpdatedAt - } - if !isNil(o.RoleIds) { - toSerialize["role_ids"] = o.RoleIds - } - if !isNil(o.Provisioning) { - toSerialize["provisioning"] = o.Provisioning - } - toSerialize["parameters"] = o.Parameters - if !isNil(o.EnforcementPoint) { - toSerialize["enforcement_point"] = o.EnforcementPoint - } - toSerialize["configuration"] = o.Configuration - if !isNil(o.Sso) { - toSerialize["sso"] = o.Sso - } - return toSerialize, nil -} - -type NullableSamlApp struct { - value *SamlApp - isSet bool -} - -func (v NullableSamlApp) Get() *SamlApp { - return v.value -} - -func (v *NullableSamlApp) Set(val *SamlApp) { - v.value = val - v.isSet = true -} - -func (v NullableSamlApp) IsSet() bool { - return v.isSet -} - -func (v *NullableSamlApp) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSamlApp(val *SamlApp) *NullableSamlApp { - return &NullableSamlApp{value: val, isSet: true} -} - -func (v NullableSamlApp) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSamlApp) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_saml_app_all_of.go b/model_saml_app_all_of.go deleted file mode 100644 index 167af2a..0000000 --- a/model_saml_app_all_of.go +++ /dev/null @@ -1,180 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the SamlAppAllOf type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SamlAppAllOf{} - -// SamlAppAllOf struct for SamlAppAllOf -type SamlAppAllOf struct { - Configuration ConfigurationSaml `json:"configuration"` - Sso *SsoSaml `json:"sso,omitempty"` - Parameters SamlAppAllOfParameters `json:"parameters"` -} - -// NewSamlAppAllOf instantiates a new SamlAppAllOf 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 NewSamlAppAllOf(configuration ConfigurationSaml, parameters SamlAppAllOfParameters) *SamlAppAllOf { - this := SamlAppAllOf{} - this.Configuration = configuration - this.Parameters = parameters - return &this -} - -// NewSamlAppAllOfWithDefaults instantiates a new SamlAppAllOf 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 NewSamlAppAllOfWithDefaults() *SamlAppAllOf { - this := SamlAppAllOf{} - return &this -} - -// GetConfiguration returns the Configuration field value -func (o *SamlAppAllOf) GetConfiguration() ConfigurationSaml { - if o == nil { - var ret ConfigurationSaml - return ret - } - - return o.Configuration -} - -// GetConfigurationOk returns a tuple with the Configuration field value -// and a boolean to check if the value has been set. -func (o *SamlAppAllOf) GetConfigurationOk() (*ConfigurationSaml, bool) { - if o == nil { - return nil, false - } - return &o.Configuration, true -} - -// SetConfiguration sets field value -func (o *SamlAppAllOf) SetConfiguration(v ConfigurationSaml) { - o.Configuration = v -} - -// GetSso returns the Sso field value if set, zero value otherwise. -func (o *SamlAppAllOf) GetSso() SsoSaml { - if o == nil || isNil(o.Sso) { - var ret SsoSaml - return ret - } - return *o.Sso -} - -// GetSsoOk returns a tuple with the Sso field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SamlAppAllOf) GetSsoOk() (*SsoSaml, bool) { - if o == nil || isNil(o.Sso) { - return nil, false - } - return o.Sso, true -} - -// HasSso returns a boolean if a field has been set. -func (o *SamlAppAllOf) HasSso() bool { - if o != nil && !isNil(o.Sso) { - return true - } - - return false -} - -// SetSso gets a reference to the given SsoSaml and assigns it to the Sso field. -func (o *SamlAppAllOf) SetSso(v SsoSaml) { - o.Sso = &v -} - -// GetParameters returns the Parameters field value -func (o *SamlAppAllOf) GetParameters() SamlAppAllOfParameters { - if o == nil { - var ret SamlAppAllOfParameters - return ret - } - - return o.Parameters -} - -// GetParametersOk returns a tuple with the Parameters field value -// and a boolean to check if the value has been set. -func (o *SamlAppAllOf) GetParametersOk() (*SamlAppAllOfParameters, bool) { - if o == nil { - return nil, false - } - return &o.Parameters, true -} - -// SetParameters sets field value -func (o *SamlAppAllOf) SetParameters(v SamlAppAllOfParameters) { - o.Parameters = v -} - -func (o SamlAppAllOf) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o SamlAppAllOf) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["configuration"] = o.Configuration - if !isNil(o.Sso) { - toSerialize["sso"] = o.Sso - } - toSerialize["parameters"] = o.Parameters - return toSerialize, nil -} - -type NullableSamlAppAllOf struct { - value *SamlAppAllOf - isSet bool -} - -func (v NullableSamlAppAllOf) Get() *SamlAppAllOf { - return v.value -} - -func (v *NullableSamlAppAllOf) Set(val *SamlAppAllOf) { - v.value = val - v.isSet = true -} - -func (v NullableSamlAppAllOf) IsSet() bool { - return v.isSet -} - -func (v *NullableSamlAppAllOf) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSamlAppAllOf(val *SamlAppAllOf) *NullableSamlAppAllOf { - return &NullableSamlAppAllOf{value: val, isSet: true} -} - -func (v NullableSamlAppAllOf) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSamlAppAllOf) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_saml_app_all_of_parameters.go b/model_saml_app_all_of_parameters.go deleted file mode 100644 index fc24f88..0000000 --- a/model_saml_app_all_of_parameters.go +++ /dev/null @@ -1,117 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the SamlAppAllOfParameters type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SamlAppAllOfParameters{} - -// SamlAppAllOfParameters struct for SamlAppAllOfParameters -type SamlAppAllOfParameters struct { - SamlUsername SamlAppAllOfParametersSamlUsername `json:"saml_username"` -} - -// NewSamlAppAllOfParameters instantiates a new SamlAppAllOfParameters 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 NewSamlAppAllOfParameters(samlUsername SamlAppAllOfParametersSamlUsername) *SamlAppAllOfParameters { - this := SamlAppAllOfParameters{} - this.SamlUsername = samlUsername - return &this -} - -// NewSamlAppAllOfParametersWithDefaults instantiates a new SamlAppAllOfParameters 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 NewSamlAppAllOfParametersWithDefaults() *SamlAppAllOfParameters { - this := SamlAppAllOfParameters{} - return &this -} - -// GetSamlUsername returns the SamlUsername field value -func (o *SamlAppAllOfParameters) GetSamlUsername() SamlAppAllOfParametersSamlUsername { - if o == nil { - var ret SamlAppAllOfParametersSamlUsername - return ret - } - - return o.SamlUsername -} - -// GetSamlUsernameOk returns a tuple with the SamlUsername field value -// and a boolean to check if the value has been set. -func (o *SamlAppAllOfParameters) GetSamlUsernameOk() (*SamlAppAllOfParametersSamlUsername, bool) { - if o == nil { - return nil, false - } - return &o.SamlUsername, true -} - -// SetSamlUsername sets field value -func (o *SamlAppAllOfParameters) SetSamlUsername(v SamlAppAllOfParametersSamlUsername) { - o.SamlUsername = v -} - -func (o SamlAppAllOfParameters) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o SamlAppAllOfParameters) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["saml_username"] = o.SamlUsername - return toSerialize, nil -} - -type NullableSamlAppAllOfParameters struct { - value *SamlAppAllOfParameters - isSet bool -} - -func (v NullableSamlAppAllOfParameters) Get() *SamlAppAllOfParameters { - return v.value -} - -func (v *NullableSamlAppAllOfParameters) Set(val *SamlAppAllOfParameters) { - v.value = val - v.isSet = true -} - -func (v NullableSamlAppAllOfParameters) IsSet() bool { - return v.isSet -} - -func (v *NullableSamlAppAllOfParameters) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSamlAppAllOfParameters(val *SamlAppAllOfParameters) *NullableSamlAppAllOfParameters { - return &NullableSamlAppAllOfParameters{value: val, isSet: true} -} - -func (v NullableSamlAppAllOfParameters) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSamlAppAllOfParameters) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_saml_app_all_of_parameters_saml_username.go b/model_saml_app_all_of_parameters_saml_username.go deleted file mode 100644 index ec0c2c2..0000000 --- a/model_saml_app_all_of_parameters_saml_username.go +++ /dev/null @@ -1,117 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the SamlAppAllOfParametersSamlUsername type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SamlAppAllOfParametersSamlUsername{} - -// SamlAppAllOfParametersSamlUsername struct for SamlAppAllOfParametersSamlUsername -type SamlAppAllOfParametersSamlUsername struct { - UserAttributeMappings string `json:"user_attribute_mappings"` -} - -// NewSamlAppAllOfParametersSamlUsername instantiates a new SamlAppAllOfParametersSamlUsername 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 NewSamlAppAllOfParametersSamlUsername(userAttributeMappings string) *SamlAppAllOfParametersSamlUsername { - this := SamlAppAllOfParametersSamlUsername{} - this.UserAttributeMappings = userAttributeMappings - return &this -} - -// NewSamlAppAllOfParametersSamlUsernameWithDefaults instantiates a new SamlAppAllOfParametersSamlUsername 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 NewSamlAppAllOfParametersSamlUsernameWithDefaults() *SamlAppAllOfParametersSamlUsername { - this := SamlAppAllOfParametersSamlUsername{} - return &this -} - -// GetUserAttributeMappings returns the UserAttributeMappings field value -func (o *SamlAppAllOfParametersSamlUsername) GetUserAttributeMappings() string { - if o == nil { - var ret string - return ret - } - - return o.UserAttributeMappings -} - -// GetUserAttributeMappingsOk returns a tuple with the UserAttributeMappings field value -// and a boolean to check if the value has been set. -func (o *SamlAppAllOfParametersSamlUsername) GetUserAttributeMappingsOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.UserAttributeMappings, true -} - -// SetUserAttributeMappings sets field value -func (o *SamlAppAllOfParametersSamlUsername) SetUserAttributeMappings(v string) { - o.UserAttributeMappings = v -} - -func (o SamlAppAllOfParametersSamlUsername) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o SamlAppAllOfParametersSamlUsername) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["user_attribute_mappings"] = o.UserAttributeMappings - return toSerialize, nil -} - -type NullableSamlAppAllOfParametersSamlUsername struct { - value *SamlAppAllOfParametersSamlUsername - isSet bool -} - -func (v NullableSamlAppAllOfParametersSamlUsername) Get() *SamlAppAllOfParametersSamlUsername { - return v.value -} - -func (v *NullableSamlAppAllOfParametersSamlUsername) Set(val *SamlAppAllOfParametersSamlUsername) { - v.value = val - v.isSet = true -} - -func (v NullableSamlAppAllOfParametersSamlUsername) IsSet() bool { - return v.isSet -} - -func (v *NullableSamlAppAllOfParametersSamlUsername) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSamlAppAllOfParametersSamlUsername(val *SamlAppAllOfParametersSamlUsername) *NullableSamlAppAllOfParametersSamlUsername { - return &NullableSamlAppAllOfParametersSamlUsername{value: val, isSet: true} -} - -func (v NullableSamlAppAllOfParametersSamlUsername) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSamlAppAllOfParametersSamlUsername) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_saml_assert.go b/model_saml_assert.go deleted file mode 100644 index 74ced65..0000000 --- a/model_saml_assert.go +++ /dev/null @@ -1,239 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the SamlAssert type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SamlAssert{} - -// SamlAssert struct for SamlAssert -type SamlAssert struct { - // Set this to the username or email of the OneLogin user accessing the app for which you want to generate a SAML token. - UsernameOrEmail string `json:"username_or_email"` - // Password of the OneLogin user accessing the app for which you want to generate a SAML token. - Password string `json:"password"` - // App ID of the app for which you want to generate a SAML token. This is the app ID in OneLogin. - AppId string `json:"app_id"` - // Set to the subdomain of the OneLogin user accessing the app for which you want to generate a SAML token. - Subdomain string `json:"subdomain"` - // If you are using this API in a scenario in which MFA is required and you’ll need to be able to honor IP address whitelisting defined in MFA policies, provide this parameter and set its value to the whitelisted IP address that needs to be bypassed. - IpAddress *string `json:"ip_address,omitempty"` -} - -// NewSamlAssert instantiates a new SamlAssert 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 NewSamlAssert(usernameOrEmail string, password string, appId string, subdomain string) *SamlAssert { - this := SamlAssert{} - this.UsernameOrEmail = usernameOrEmail - this.Password = password - this.AppId = appId - this.Subdomain = subdomain - return &this -} - -// NewSamlAssertWithDefaults instantiates a new SamlAssert 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 NewSamlAssertWithDefaults() *SamlAssert { - this := SamlAssert{} - return &this -} - -// GetUsernameOrEmail returns the UsernameOrEmail field value -func (o *SamlAssert) GetUsernameOrEmail() string { - if o == nil { - var ret string - return ret - } - - return o.UsernameOrEmail -} - -// GetUsernameOrEmailOk returns a tuple with the UsernameOrEmail field value -// and a boolean to check if the value has been set. -func (o *SamlAssert) GetUsernameOrEmailOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.UsernameOrEmail, true -} - -// SetUsernameOrEmail sets field value -func (o *SamlAssert) SetUsernameOrEmail(v string) { - o.UsernameOrEmail = v -} - -// GetPassword returns the Password field value -func (o *SamlAssert) GetPassword() string { - if o == nil { - var ret string - return ret - } - - return o.Password -} - -// GetPasswordOk returns a tuple with the Password field value -// and a boolean to check if the value has been set. -func (o *SamlAssert) GetPasswordOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Password, true -} - -// SetPassword sets field value -func (o *SamlAssert) SetPassword(v string) { - o.Password = v -} - -// GetAppId returns the AppId field value -func (o *SamlAssert) GetAppId() string { - if o == nil { - var ret string - return ret - } - - return o.AppId -} - -// GetAppIdOk returns a tuple with the AppId field value -// and a boolean to check if the value has been set. -func (o *SamlAssert) GetAppIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.AppId, true -} - -// SetAppId sets field value -func (o *SamlAssert) SetAppId(v string) { - o.AppId = v -} - -// GetSubdomain returns the Subdomain field value -func (o *SamlAssert) GetSubdomain() string { - if o == nil { - var ret string - return ret - } - - return o.Subdomain -} - -// GetSubdomainOk returns a tuple with the Subdomain field value -// and a boolean to check if the value has been set. -func (o *SamlAssert) GetSubdomainOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Subdomain, true -} - -// SetSubdomain sets field value -func (o *SamlAssert) SetSubdomain(v string) { - o.Subdomain = v -} - -// GetIpAddress returns the IpAddress field value if set, zero value otherwise. -func (o *SamlAssert) GetIpAddress() string { - if o == nil || isNil(o.IpAddress) { - var ret string - return ret - } - return *o.IpAddress -} - -// GetIpAddressOk returns a tuple with the IpAddress field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SamlAssert) GetIpAddressOk() (*string, bool) { - if o == nil || isNil(o.IpAddress) { - return nil, false - } - return o.IpAddress, true -} - -// HasIpAddress returns a boolean if a field has been set. -func (o *SamlAssert) HasIpAddress() bool { - if o != nil && !isNil(o.IpAddress) { - return true - } - - return false -} - -// SetIpAddress gets a reference to the given string and assigns it to the IpAddress field. -func (o *SamlAssert) SetIpAddress(v string) { - o.IpAddress = &v -} - -func (o SamlAssert) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o SamlAssert) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["username_or_email"] = o.UsernameOrEmail - toSerialize["password"] = o.Password - toSerialize["app_id"] = o.AppId - toSerialize["subdomain"] = o.Subdomain - if !isNil(o.IpAddress) { - toSerialize["ip_address"] = o.IpAddress - } - return toSerialize, nil -} - -type NullableSamlAssert struct { - value *SamlAssert - isSet bool -} - -func (v NullableSamlAssert) Get() *SamlAssert { - return v.value -} - -func (v *NullableSamlAssert) Set(val *SamlAssert) { - v.value = val - v.isSet = true -} - -func (v NullableSamlAssert) IsSet() bool { - return v.isSet -} - -func (v *NullableSamlAssert) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSamlAssert(val *SamlAssert) *NullableSamlAssert { - return &NullableSamlAssert{value: val, isSet: true} -} - -func (v NullableSamlAssert) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSamlAssert) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_saml_factor.go b/model_saml_factor.go deleted file mode 100644 index 7d0f95c..0000000 --- a/model_saml_factor.go +++ /dev/null @@ -1,248 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the SamlFactor type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SamlFactor{} - -// SamlFactor struct for SamlFactor -type SamlFactor struct { - // App ID of the app for which you want to generate a SAML token. This is the app ID in OneLogin. - AppId string `json:"app_id"` - // Provide the MFA device_id you are submitting for verification. The device_id is supplied by the Generate SAML Assertion API. - DeviceId string `json:"device_id"` - // Provide the state_token associated with the MFA device_id you are submitting for verification. The state_token is supplied by the Generate SAML Assertion API. - StateToken string `json:"state_token"` - // Provide the OTP value for the MFA factor you are submitting for verification. For some MFA factors; such as OneLogin OTP SMS, which requires the user to request an OTP; the otp_token value is not required, and if not included, returns a 200 OK - Pending result. You’ll make a subsequent Verify Factor API call to provide the otp_token value once it has been provided to the user. - OtpToken *string `json:"otp_token,omitempty"` - // When verifying MFA via Protect Push, set this to true to stop additional push notifications being sent to the OneLogin Protect device. - DoNotNotify *bool `json:"do_not_notify,omitempty"` -} - -// NewSamlFactor instantiates a new SamlFactor 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 NewSamlFactor(appId string, deviceId string, stateToken string) *SamlFactor { - this := SamlFactor{} - this.AppId = appId - this.DeviceId = deviceId - this.StateToken = stateToken - return &this -} - -// NewSamlFactorWithDefaults instantiates a new SamlFactor 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 NewSamlFactorWithDefaults() *SamlFactor { - this := SamlFactor{} - return &this -} - -// GetAppId returns the AppId field value -func (o *SamlFactor) GetAppId() string { - if o == nil { - var ret string - return ret - } - - return o.AppId -} - -// GetAppIdOk returns a tuple with the AppId field value -// and a boolean to check if the value has been set. -func (o *SamlFactor) GetAppIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.AppId, true -} - -// SetAppId sets field value -func (o *SamlFactor) SetAppId(v string) { - o.AppId = v -} - -// GetDeviceId returns the DeviceId field value -func (o *SamlFactor) GetDeviceId() string { - if o == nil { - var ret string - return ret - } - - return o.DeviceId -} - -// GetDeviceIdOk returns a tuple with the DeviceId field value -// and a boolean to check if the value has been set. -func (o *SamlFactor) GetDeviceIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.DeviceId, true -} - -// SetDeviceId sets field value -func (o *SamlFactor) SetDeviceId(v string) { - o.DeviceId = v -} - -// GetStateToken returns the StateToken field value -func (o *SamlFactor) GetStateToken() string { - if o == nil { - var ret string - return ret - } - - return o.StateToken -} - -// GetStateTokenOk returns a tuple with the StateToken field value -// and a boolean to check if the value has been set. -func (o *SamlFactor) GetStateTokenOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.StateToken, true -} - -// SetStateToken sets field value -func (o *SamlFactor) SetStateToken(v string) { - o.StateToken = v -} - -// GetOtpToken returns the OtpToken field value if set, zero value otherwise. -func (o *SamlFactor) GetOtpToken() string { - if o == nil || isNil(o.OtpToken) { - var ret string - return ret - } - return *o.OtpToken -} - -// GetOtpTokenOk returns a tuple with the OtpToken field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SamlFactor) GetOtpTokenOk() (*string, bool) { - if o == nil || isNil(o.OtpToken) { - return nil, false - } - return o.OtpToken, true -} - -// HasOtpToken returns a boolean if a field has been set. -func (o *SamlFactor) HasOtpToken() bool { - if o != nil && !isNil(o.OtpToken) { - return true - } - - return false -} - -// SetOtpToken gets a reference to the given string and assigns it to the OtpToken field. -func (o *SamlFactor) SetOtpToken(v string) { - o.OtpToken = &v -} - -// GetDoNotNotify returns the DoNotNotify field value if set, zero value otherwise. -func (o *SamlFactor) GetDoNotNotify() bool { - if o == nil || isNil(o.DoNotNotify) { - var ret bool - return ret - } - return *o.DoNotNotify -} - -// GetDoNotNotifyOk returns a tuple with the DoNotNotify field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SamlFactor) GetDoNotNotifyOk() (*bool, bool) { - if o == nil || isNil(o.DoNotNotify) { - return nil, false - } - return o.DoNotNotify, true -} - -// HasDoNotNotify returns a boolean if a field has been set. -func (o *SamlFactor) HasDoNotNotify() bool { - if o != nil && !isNil(o.DoNotNotify) { - return true - } - - return false -} - -// SetDoNotNotify gets a reference to the given bool and assigns it to the DoNotNotify field. -func (o *SamlFactor) SetDoNotNotify(v bool) { - o.DoNotNotify = &v -} - -func (o SamlFactor) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o SamlFactor) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["app_id"] = o.AppId - toSerialize["device_id"] = o.DeviceId - toSerialize["state_token"] = o.StateToken - if !isNil(o.OtpToken) { - toSerialize["otp_token"] = o.OtpToken - } - if !isNil(o.DoNotNotify) { - toSerialize["do_not_notify"] = o.DoNotNotify - } - return toSerialize, nil -} - -type NullableSamlFactor struct { - value *SamlFactor - isSet bool -} - -func (v NullableSamlFactor) Get() *SamlFactor { - return v.value -} - -func (v *NullableSamlFactor) Set(val *SamlFactor) { - v.value = val - v.isSet = true -} - -func (v NullableSamlFactor) IsSet() bool { - return v.isSet -} - -func (v *NullableSamlFactor) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSamlFactor(val *SamlFactor) *NullableSamlFactor { - return &NullableSamlFactor{value: val, isSet: true} -} - -func (v NullableSamlFactor) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSamlFactor) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_scope.go b/model_scope.go deleted file mode 100644 index 131593b..0000000 --- a/model_scope.go +++ /dev/null @@ -1,201 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the Scope type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Scope{} - -// Scope struct for Scope -type Scope struct { - // Unique Scope ID value - Id *int32 `json:"id,omitempty"` - // Scope Value - Value *string `json:"value,omitempty"` - // Description of the scope - Description *string `json:"description,omitempty"` -} - -// NewScope instantiates a new Scope 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 NewScope() *Scope { - this := Scope{} - return &this -} - -// NewScopeWithDefaults instantiates a new Scope 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 NewScopeWithDefaults() *Scope { - this := Scope{} - return &this -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *Scope) GetId() int32 { - if o == nil || isNil(o.Id) { - var ret int32 - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Scope) GetIdOk() (*int32, bool) { - if o == nil || isNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *Scope) HasId() bool { - if o != nil && !isNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given int32 and assigns it to the Id field. -func (o *Scope) SetId(v int32) { - o.Id = &v -} - -// GetValue returns the Value field value if set, zero value otherwise. -func (o *Scope) GetValue() string { - if o == nil || isNil(o.Value) { - var ret string - return ret - } - return *o.Value -} - -// GetValueOk returns a tuple with the Value field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Scope) GetValueOk() (*string, bool) { - if o == nil || isNil(o.Value) { - return nil, false - } - return o.Value, true -} - -// HasValue returns a boolean if a field has been set. -func (o *Scope) HasValue() bool { - if o != nil && !isNil(o.Value) { - return true - } - - return false -} - -// SetValue gets a reference to the given string and assigns it to the Value field. -func (o *Scope) SetValue(v string) { - o.Value = &v -} - -// GetDescription returns the Description field value if set, zero value otherwise. -func (o *Scope) GetDescription() string { - if o == nil || isNil(o.Description) { - var ret string - return ret - } - return *o.Description -} - -// 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 *Scope) GetDescriptionOk() (*string, bool) { - if o == nil || isNil(o.Description) { - return nil, false - } - return o.Description, true -} - -// HasDescription returns a boolean if a field has been set. -func (o *Scope) HasDescription() bool { - if o != nil && !isNil(o.Description) { - return true - } - - return false -} - -// SetDescription gets a reference to the given string and assigns it to the Description field. -func (o *Scope) SetDescription(v string) { - o.Description = &v -} - -func (o Scope) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Scope) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Id) { - toSerialize["id"] = o.Id - } - if !isNil(o.Value) { - toSerialize["value"] = o.Value - } - if !isNil(o.Description) { - toSerialize["description"] = o.Description - } - return toSerialize, nil -} - -type NullableScope struct { - value *Scope - isSet bool -} - -func (v NullableScope) Get() *Scope { - return v.value -} - -func (v *NullableScope) Set(val *Scope) { - v.value = val - v.isSet = true -} - -func (v NullableScope) IsSet() bool { - return v.isSet -} - -func (v *NullableScope) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableScope(val *Scope) *NullableScope { - return &NullableScope{value: val, isSet: true} -} - -func (v NullableScope) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableScope) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_send_invite_link_200_response.go b/model_send_invite_link_200_response.go deleted file mode 100644 index 4f4ed4d..0000000 --- a/model_send_invite_link_200_response.go +++ /dev/null @@ -1,126 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the SendInviteLink200Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SendInviteLink200Response{} - -// SendInviteLink200Response struct for SendInviteLink200Response -type SendInviteLink200Response struct { - Status *Error `json:"status,omitempty"` -} - -// NewSendInviteLink200Response instantiates a new SendInviteLink200Response 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 NewSendInviteLink200Response() *SendInviteLink200Response { - this := SendInviteLink200Response{} - return &this -} - -// NewSendInviteLink200ResponseWithDefaults instantiates a new SendInviteLink200Response 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 NewSendInviteLink200ResponseWithDefaults() *SendInviteLink200Response { - this := SendInviteLink200Response{} - return &this -} - -// GetStatus returns the Status field value if set, zero value otherwise. -func (o *SendInviteLink200Response) GetStatus() Error { - if o == nil || isNil(o.Status) { - var ret Error - return ret - } - return *o.Status -} - -// GetStatusOk returns a tuple with the Status field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SendInviteLink200Response) GetStatusOk() (*Error, bool) { - if o == nil || isNil(o.Status) { - return nil, false - } - return o.Status, true -} - -// HasStatus returns a boolean if a field has been set. -func (o *SendInviteLink200Response) HasStatus() bool { - if o != nil && !isNil(o.Status) { - return true - } - - return false -} - -// SetStatus gets a reference to the given Error and assigns it to the Status field. -func (o *SendInviteLink200Response) SetStatus(v Error) { - o.Status = &v -} - -func (o SendInviteLink200Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o SendInviteLink200Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Status) { - toSerialize["status"] = o.Status - } - return toSerialize, nil -} - -type NullableSendInviteLink200Response struct { - value *SendInviteLink200Response - isSet bool -} - -func (v NullableSendInviteLink200Response) Get() *SendInviteLink200Response { - return v.value -} - -func (v *NullableSendInviteLink200Response) Set(val *SendInviteLink200Response) { - v.value = val - v.isSet = true -} - -func (v NullableSendInviteLink200Response) IsSet() bool { - return v.isSet -} - -func (v *NullableSendInviteLink200Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSendInviteLink200Response(val *SendInviteLink200Response) *NullableSendInviteLink200Response { - return &NullableSendInviteLink200Response{value: val, isSet: true} -} - -func (v NullableSendInviteLink200Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSendInviteLink200Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_send_invite_link_request.go b/model_send_invite_link_request.go deleted file mode 100644 index 148dad4..0000000 --- a/model_send_invite_link_request.go +++ /dev/null @@ -1,164 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the SendInviteLinkRequest type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SendInviteLinkRequest{} - -// SendInviteLinkRequest struct for SendInviteLinkRequest -type SendInviteLinkRequest struct { - // Set to the user email address to generate an invite link. The value is case sensitive. - Email *string `json:"email,omitempty"` - // To send an invite email to a different address than the one provided in email, provide it here. The invite link is sent to this address instead. - PersonalEmail *string `json:"personal_email,omitempty"` -} - -// NewSendInviteLinkRequest instantiates a new SendInviteLinkRequest 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 NewSendInviteLinkRequest() *SendInviteLinkRequest { - this := SendInviteLinkRequest{} - return &this -} - -// NewSendInviteLinkRequestWithDefaults instantiates a new SendInviteLinkRequest 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 NewSendInviteLinkRequestWithDefaults() *SendInviteLinkRequest { - this := SendInviteLinkRequest{} - return &this -} - -// GetEmail returns the Email field value if set, zero value otherwise. -func (o *SendInviteLinkRequest) GetEmail() string { - if o == nil || isNil(o.Email) { - 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 *SendInviteLinkRequest) GetEmailOk() (*string, bool) { - if o == nil || isNil(o.Email) { - return nil, false - } - return o.Email, true -} - -// HasEmail returns a boolean if a field has been set. -func (o *SendInviteLinkRequest) HasEmail() bool { - if o != nil && !isNil(o.Email) { - return true - } - - return false -} - -// SetEmail gets a reference to the given string and assigns it to the Email field. -func (o *SendInviteLinkRequest) SetEmail(v string) { - o.Email = &v -} - -// GetPersonalEmail returns the PersonalEmail field value if set, zero value otherwise. -func (o *SendInviteLinkRequest) GetPersonalEmail() string { - if o == nil || isNil(o.PersonalEmail) { - var ret string - return ret - } - return *o.PersonalEmail -} - -// GetPersonalEmailOk returns a tuple with the PersonalEmail field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SendInviteLinkRequest) GetPersonalEmailOk() (*string, bool) { - if o == nil || isNil(o.PersonalEmail) { - return nil, false - } - return o.PersonalEmail, true -} - -// HasPersonalEmail returns a boolean if a field has been set. -func (o *SendInviteLinkRequest) HasPersonalEmail() bool { - if o != nil && !isNil(o.PersonalEmail) { - return true - } - - return false -} - -// SetPersonalEmail gets a reference to the given string and assigns it to the PersonalEmail field. -func (o *SendInviteLinkRequest) SetPersonalEmail(v string) { - o.PersonalEmail = &v -} - -func (o SendInviteLinkRequest) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o SendInviteLinkRequest) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Email) { - toSerialize["email"] = o.Email - } - if !isNil(o.PersonalEmail) { - toSerialize["personal_email"] = o.PersonalEmail - } - return toSerialize, nil -} - -type NullableSendInviteLinkRequest struct { - value *SendInviteLinkRequest - isSet bool -} - -func (v NullableSendInviteLinkRequest) Get() *SendInviteLinkRequest { - return v.value -} - -func (v *NullableSendInviteLinkRequest) Set(val *SendInviteLinkRequest) { - v.value = val - v.isSet = true -} - -func (v NullableSendInviteLinkRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableSendInviteLinkRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSendInviteLinkRequest(val *SendInviteLinkRequest) *NullableSendInviteLinkRequest { - return &NullableSendInviteLinkRequest{value: val, isSet: true} -} - -func (v NullableSendInviteLinkRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSendInviteLinkRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_session.go b/model_session.go deleted file mode 100644 index 620655b..0000000 --- a/model_session.go +++ /dev/null @@ -1,127 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the Session type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Session{} - -// Session A dictionary of extra information that provides useful context about the session, for example the session ID, or some cookie information. -type Session struct { - // If you use a database to track sessions, you can send us the session ID. - Id *string `json:"id,omitempty"` -} - -// NewSession instantiates a new Session 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 NewSession() *Session { - this := Session{} - return &this -} - -// NewSessionWithDefaults instantiates a new Session 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 NewSessionWithDefaults() *Session { - this := Session{} - return &this -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *Session) GetId() string { - if o == nil || isNil(o.Id) { - var ret string - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Session) GetIdOk() (*string, bool) { - if o == nil || isNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *Session) HasId() bool { - if o != nil && !isNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given string and assigns it to the Id field. -func (o *Session) SetId(v string) { - o.Id = &v -} - -func (o Session) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Session) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Id) { - toSerialize["id"] = o.Id - } - return toSerialize, nil -} - -type NullableSession struct { - value *Session - isSet bool -} - -func (v NullableSession) Get() *Session { - return v.value -} - -func (v *NullableSession) Set(val *Session) { - v.value = val - v.isSet = true -} - -func (v NullableSession) IsSet() bool { - return v.isSet -} - -func (v *NullableSession) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSession(val *Session) *NullableSession { - return &NullableSession{value: val, isSet: true} -} - -func (v NullableSession) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSession) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_set_user_state_request.go b/model_set_user_state_request.go deleted file mode 100644 index 5d4794e..0000000 --- a/model_set_user_state_request.go +++ /dev/null @@ -1,118 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the SetUserStateRequest type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SetUserStateRequest{} - -// SetUserStateRequest struct for SetUserStateRequest -type SetUserStateRequest struct { - // Set to the state value. Valid values include: - 0 : Unapproved - 1 : Approved - 2 : Rejected - 3 : Unlicensed - State int32 `json:"state"` -} - -// NewSetUserStateRequest instantiates a new SetUserStateRequest 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 NewSetUserStateRequest(state int32) *SetUserStateRequest { - this := SetUserStateRequest{} - this.State = state - return &this -} - -// NewSetUserStateRequestWithDefaults instantiates a new SetUserStateRequest 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 NewSetUserStateRequestWithDefaults() *SetUserStateRequest { - this := SetUserStateRequest{} - return &this -} - -// GetState returns the State field value -func (o *SetUserStateRequest) GetState() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.State -} - -// GetStateOk returns a tuple with the State field value -// and a boolean to check if the value has been set. -func (o *SetUserStateRequest) GetStateOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.State, true -} - -// SetState sets field value -func (o *SetUserStateRequest) SetState(v int32) { - o.State = v -} - -func (o SetUserStateRequest) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o SetUserStateRequest) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["state"] = o.State - return toSerialize, nil -} - -type NullableSetUserStateRequest struct { - value *SetUserStateRequest - isSet bool -} - -func (v NullableSetUserStateRequest) Get() *SetUserStateRequest { - return v.value -} - -func (v *NullableSetUserStateRequest) Set(val *SetUserStateRequest) { - v.value = val - v.isSet = true -} - -func (v NullableSetUserStateRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableSetUserStateRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSetUserStateRequest(val *SetUserStateRequest) *NullableSetUserStateRequest { - return &NullableSetUserStateRequest{value: val, isSet: true} -} - -func (v NullableSetUserStateRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSetUserStateRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_source.go b/model_source.go deleted file mode 100644 index 195fe96..0000000 --- a/model_source.go +++ /dev/null @@ -1,164 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the Source type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Source{} - -// Source Used for targeting custom rules based on a group of people, customers, accounts, or even a single user. -type Source struct { - // A unique id that represents the source of the event. - Id *string `json:"id,omitempty"` - // The name of the source - Name *string `json:"name,omitempty"` -} - -// NewSource instantiates a new Source 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 NewSource() *Source { - this := Source{} - return &this -} - -// NewSourceWithDefaults instantiates a new Source 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 NewSourceWithDefaults() *Source { - this := Source{} - return &this -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *Source) GetId() string { - if o == nil || isNil(o.Id) { - var ret string - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Source) GetIdOk() (*string, bool) { - if o == nil || isNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *Source) HasId() bool { - if o != nil && !isNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given string and assigns it to the Id field. -func (o *Source) SetId(v string) { - o.Id = &v -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *Source) GetName() string { - if o == nil || isNil(o.Name) { - var ret string - return ret - } - return *o.Name -} - -// 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 *Source) GetNameOk() (*string, bool) { - if o == nil || isNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *Source) HasName() bool { - if o != nil && !isNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *Source) SetName(v string) { - o.Name = &v -} - -func (o Source) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Source) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Id) { - toSerialize["id"] = o.Id - } - if !isNil(o.Name) { - toSerialize["name"] = o.Name - } - return toSerialize, nil -} - -type NullableSource struct { - value *Source - isSet bool -} - -func (v NullableSource) Get() *Source { - return v.value -} - -func (v *NullableSource) Set(val *Source) { - v.value = val - v.isSet = true -} - -func (v NullableSource) IsSet() bool { - return v.isSet -} - -func (v *NullableSource) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSource(val *Source) *NullableSource { - return &NullableSource{value: val, isSet: true} -} - -func (v NullableSource) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSource) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_sso_oidc.go b/model_sso_oidc.go deleted file mode 100644 index 7232616..0000000 --- a/model_sso_oidc.go +++ /dev/null @@ -1,127 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the SsoOidc type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SsoOidc{} - -// SsoOidc struct for SsoOidc -type SsoOidc struct { - // OIDC: The OpenId Connect Client Id. Note that client_secret is only returned after Creating an App - ClientId *string `json:"client_id,omitempty"` -} - -// NewSsoOidc instantiates a new SsoOidc 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 NewSsoOidc() *SsoOidc { - this := SsoOidc{} - return &this -} - -// NewSsoOidcWithDefaults instantiates a new SsoOidc 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 NewSsoOidcWithDefaults() *SsoOidc { - this := SsoOidc{} - return &this -} - -// GetClientId returns the ClientId field value if set, zero value otherwise. -func (o *SsoOidc) GetClientId() string { - if o == nil || isNil(o.ClientId) { - var ret string - return ret - } - return *o.ClientId -} - -// 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 *SsoOidc) GetClientIdOk() (*string, bool) { - if o == nil || isNil(o.ClientId) { - return nil, false - } - return o.ClientId, true -} - -// HasClientId returns a boolean if a field has been set. -func (o *SsoOidc) HasClientId() bool { - if o != nil && !isNil(o.ClientId) { - return true - } - - return false -} - -// SetClientId gets a reference to the given string and assigns it to the ClientId field. -func (o *SsoOidc) SetClientId(v string) { - o.ClientId = &v -} - -func (o SsoOidc) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o SsoOidc) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.ClientId) { - toSerialize["client_id"] = o.ClientId - } - return toSerialize, nil -} - -type NullableSsoOidc struct { - value *SsoOidc - isSet bool -} - -func (v NullableSsoOidc) Get() *SsoOidc { - return v.value -} - -func (v *NullableSsoOidc) Set(val *SsoOidc) { - v.value = val - v.isSet = true -} - -func (v NullableSsoOidc) IsSet() bool { - return v.isSet -} - -func (v *NullableSsoOidc) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSsoOidc(val *SsoOidc) *NullableSsoOidc { - return &NullableSsoOidc{value: val, isSet: true} -} - -func (v NullableSsoOidc) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSsoOidc) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_sso_saml.go b/model_sso_saml.go deleted file mode 100644 index 8ba7049..0000000 --- a/model_sso_saml.go +++ /dev/null @@ -1,270 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the SsoSaml type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SsoSaml{} - -// SsoSaml struct for SsoSaml -type SsoSaml struct { - MetadataUrl *string `json:"metadata_url,omitempty"` - AcsUrl *string `json:"acs_url,omitempty"` - SlsUrl *string `json:"sls_url,omitempty"` - Issuer *string `json:"issuer,omitempty"` - Certificate *SsoSamlCertificate `json:"certificate,omitempty"` -} - -// NewSsoSaml instantiates a new SsoSaml 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 NewSsoSaml() *SsoSaml { - this := SsoSaml{} - return &this -} - -// NewSsoSamlWithDefaults instantiates a new SsoSaml 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 NewSsoSamlWithDefaults() *SsoSaml { - this := SsoSaml{} - return &this -} - -// GetMetadataUrl returns the MetadataUrl field value if set, zero value otherwise. -func (o *SsoSaml) GetMetadataUrl() string { - if o == nil || isNil(o.MetadataUrl) { - var ret string - return ret - } - return *o.MetadataUrl -} - -// GetMetadataUrlOk returns a tuple with the MetadataUrl field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SsoSaml) GetMetadataUrlOk() (*string, bool) { - if o == nil || isNil(o.MetadataUrl) { - return nil, false - } - return o.MetadataUrl, true -} - -// HasMetadataUrl returns a boolean if a field has been set. -func (o *SsoSaml) HasMetadataUrl() bool { - if o != nil && !isNil(o.MetadataUrl) { - return true - } - - return false -} - -// SetMetadataUrl gets a reference to the given string and assigns it to the MetadataUrl field. -func (o *SsoSaml) SetMetadataUrl(v string) { - o.MetadataUrl = &v -} - -// GetAcsUrl returns the AcsUrl field value if set, zero value otherwise. -func (o *SsoSaml) GetAcsUrl() string { - if o == nil || isNil(o.AcsUrl) { - var ret string - return ret - } - return *o.AcsUrl -} - -// 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 *SsoSaml) GetAcsUrlOk() (*string, bool) { - if o == nil || isNil(o.AcsUrl) { - return nil, false - } - return o.AcsUrl, true -} - -// HasAcsUrl returns a boolean if a field has been set. -func (o *SsoSaml) HasAcsUrl() bool { - if o != nil && !isNil(o.AcsUrl) { - return true - } - - return false -} - -// SetAcsUrl gets a reference to the given string and assigns it to the AcsUrl field. -func (o *SsoSaml) SetAcsUrl(v string) { - o.AcsUrl = &v -} - -// GetSlsUrl returns the SlsUrl field value if set, zero value otherwise. -func (o *SsoSaml) GetSlsUrl() string { - if o == nil || isNil(o.SlsUrl) { - var ret string - return ret - } - return *o.SlsUrl -} - -// GetSlsUrlOk returns a tuple with the SlsUrl field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SsoSaml) GetSlsUrlOk() (*string, bool) { - if o == nil || isNil(o.SlsUrl) { - return nil, false - } - return o.SlsUrl, true -} - -// HasSlsUrl returns a boolean if a field has been set. -func (o *SsoSaml) HasSlsUrl() bool { - if o != nil && !isNil(o.SlsUrl) { - return true - } - - return false -} - -// SetSlsUrl gets a reference to the given string and assigns it to the SlsUrl field. -func (o *SsoSaml) SetSlsUrl(v string) { - o.SlsUrl = &v -} - -// GetIssuer returns the Issuer field value if set, zero value otherwise. -func (o *SsoSaml) GetIssuer() string { - if o == nil || isNil(o.Issuer) { - var ret string - return ret - } - return *o.Issuer -} - -// 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 *SsoSaml) GetIssuerOk() (*string, bool) { - if o == nil || isNil(o.Issuer) { - return nil, false - } - return o.Issuer, true -} - -// HasIssuer returns a boolean if a field has been set. -func (o *SsoSaml) HasIssuer() bool { - if o != nil && !isNil(o.Issuer) { - return true - } - - return false -} - -// SetIssuer gets a reference to the given string and assigns it to the Issuer field. -func (o *SsoSaml) SetIssuer(v string) { - o.Issuer = &v -} - -// GetCertificate returns the Certificate field value if set, zero value otherwise. -func (o *SsoSaml) GetCertificate() SsoSamlCertificate { - if o == nil || isNil(o.Certificate) { - var ret SsoSamlCertificate - return ret - } - return *o.Certificate -} - -// GetCertificateOk returns a tuple with the Certificate field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SsoSaml) GetCertificateOk() (*SsoSamlCertificate, bool) { - if o == nil || isNil(o.Certificate) { - return nil, false - } - return o.Certificate, true -} - -// HasCertificate returns a boolean if a field has been set. -func (o *SsoSaml) HasCertificate() bool { - if o != nil && !isNil(o.Certificate) { - return true - } - - return false -} - -// SetCertificate gets a reference to the given SsoSamlCertificate and assigns it to the Certificate field. -func (o *SsoSaml) SetCertificate(v SsoSamlCertificate) { - o.Certificate = &v -} - -func (o SsoSaml) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o SsoSaml) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.MetadataUrl) { - toSerialize["metadata_url"] = o.MetadataUrl - } - if !isNil(o.AcsUrl) { - toSerialize["acs_url"] = o.AcsUrl - } - if !isNil(o.SlsUrl) { - toSerialize["sls_url"] = o.SlsUrl - } - if !isNil(o.Issuer) { - toSerialize["issuer"] = o.Issuer - } - if !isNil(o.Certificate) { - toSerialize["certificate"] = o.Certificate - } - return toSerialize, nil -} - -type NullableSsoSaml struct { - value *SsoSaml - isSet bool -} - -func (v NullableSsoSaml) Get() *SsoSaml { - return v.value -} - -func (v *NullableSsoSaml) Set(val *SsoSaml) { - v.value = val - v.isSet = true -} - -func (v NullableSsoSaml) IsSet() bool { - return v.isSet -} - -func (v *NullableSsoSaml) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSsoSaml(val *SsoSaml) *NullableSsoSaml { - return &NullableSsoSaml{value: val, isSet: true} -} - -func (v NullableSsoSaml) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSsoSaml) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_sso_saml_certificate.go b/model_sso_saml_certificate.go deleted file mode 100644 index 548a234..0000000 --- a/model_sso_saml_certificate.go +++ /dev/null @@ -1,201 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the SsoSamlCertificate type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SsoSamlCertificate{} - -// SsoSamlCertificate The Certificate used for signing -type SsoSamlCertificate struct { - // SAML Certificate ID - Id *int32 `json:"id,omitempty"` - // SAML Certificate Name - Name *string `json:"name,omitempty"` - // SAML Certificate Value - Value *string `json:"value,omitempty"` -} - -// NewSsoSamlCertificate instantiates a new SsoSamlCertificate 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 NewSsoSamlCertificate() *SsoSamlCertificate { - this := SsoSamlCertificate{} - return &this -} - -// NewSsoSamlCertificateWithDefaults instantiates a new SsoSamlCertificate 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 NewSsoSamlCertificateWithDefaults() *SsoSamlCertificate { - this := SsoSamlCertificate{} - return &this -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *SsoSamlCertificate) GetId() int32 { - if o == nil || isNil(o.Id) { - var ret int32 - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SsoSamlCertificate) GetIdOk() (*int32, bool) { - if o == nil || isNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *SsoSamlCertificate) HasId() bool { - if o != nil && !isNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given int32 and assigns it to the Id field. -func (o *SsoSamlCertificate) SetId(v int32) { - o.Id = &v -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *SsoSamlCertificate) GetName() string { - if o == nil || isNil(o.Name) { - var ret string - return ret - } - return *o.Name -} - -// 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 *SsoSamlCertificate) GetNameOk() (*string, bool) { - if o == nil || isNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *SsoSamlCertificate) HasName() bool { - if o != nil && !isNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *SsoSamlCertificate) SetName(v string) { - o.Name = &v -} - -// GetValue returns the Value field value if set, zero value otherwise. -func (o *SsoSamlCertificate) GetValue() string { - if o == nil || isNil(o.Value) { - var ret string - return ret - } - return *o.Value -} - -// GetValueOk returns a tuple with the Value field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SsoSamlCertificate) GetValueOk() (*string, bool) { - if o == nil || isNil(o.Value) { - return nil, false - } - return o.Value, true -} - -// HasValue returns a boolean if a field has been set. -func (o *SsoSamlCertificate) HasValue() bool { - if o != nil && !isNil(o.Value) { - return true - } - - return false -} - -// SetValue gets a reference to the given string and assigns it to the Value field. -func (o *SsoSamlCertificate) SetValue(v string) { - o.Value = &v -} - -func (o SsoSamlCertificate) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o SsoSamlCertificate) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Id) { - toSerialize["id"] = o.Id - } - if !isNil(o.Name) { - toSerialize["name"] = o.Name - } - if !isNil(o.Value) { - toSerialize["value"] = o.Value - } - return toSerialize, nil -} - -type NullableSsoSamlCertificate struct { - value *SsoSamlCertificate - isSet bool -} - -func (v NullableSsoSamlCertificate) Get() *SsoSamlCertificate { - return v.value -} - -func (v *NullableSsoSamlCertificate) Set(val *SsoSamlCertificate) { - v.value = val - v.isSet = true -} - -func (v NullableSsoSamlCertificate) IsSet() bool { - return v.isSet -} - -func (v *NullableSsoSamlCertificate) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSsoSamlCertificate(val *SsoSamlCertificate) *NullableSsoSamlCertificate { - return &NullableSsoSamlCertificate{value: val, isSet: true} -} - -func (v NullableSsoSamlCertificate) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSsoSamlCertificate) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_token_claim.go b/model_token_claim.go deleted file mode 100644 index 8c0e1f3..0000000 --- a/model_token_claim.go +++ /dev/null @@ -1,423 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the TokenClaim type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &TokenClaim{} - -// TokenClaim struct for TokenClaim -type TokenClaim struct { - // The unique ID of the claim. - Id *int32 `json:"id,omitempty"` - // The UI label for the claims. - Label *string `json:"label,omitempty"` - // A user attribute to map values from. - UserAttributeMappings *string `json:"user_attribute_mappings,omitempty"` - // When `user_attribute_mappings` is set to `_macro_` this macro will be used to assign the claims value. - UserAttributeMacros *string `json:"user_attribute_macros,omitempty"` - // The type of transformation to perform on multi valued attributes. - AttributeTransformations *string `json:"attribute_transformations,omitempty"` - // not used - SkipIfBlank *bool `json:"skip_if_blank,omitempty"` - // Relates to Rules/Entitlements. Not supported yet. - Values []string `json:"values,omitempty"` - // Relates to Rules/Entitlements. Not supported yet. - DefaultValues *string `json:"default_values,omitempty"` - // Relates to Rules/Entitlements. Not supported yet. - ProvisionedEntitlements *bool `json:"provisioned_entitlements,omitempty"` -} - -// NewTokenClaim instantiates a new TokenClaim 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 NewTokenClaim() *TokenClaim { - this := TokenClaim{} - return &this -} - -// NewTokenClaimWithDefaults instantiates a new TokenClaim 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 NewTokenClaimWithDefaults() *TokenClaim { - this := TokenClaim{} - return &this -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *TokenClaim) GetId() int32 { - if o == nil || isNil(o.Id) { - var ret int32 - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *TokenClaim) GetIdOk() (*int32, bool) { - if o == nil || isNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *TokenClaim) HasId() bool { - if o != nil && !isNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given int32 and assigns it to the Id field. -func (o *TokenClaim) SetId(v int32) { - o.Id = &v -} - -// GetLabel returns the Label field value if set, zero value otherwise. -func (o *TokenClaim) GetLabel() string { - if o == nil || isNil(o.Label) { - var ret string - return ret - } - return *o.Label -} - -// 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 *TokenClaim) GetLabelOk() (*string, bool) { - if o == nil || isNil(o.Label) { - return nil, false - } - return o.Label, true -} - -// HasLabel returns a boolean if a field has been set. -func (o *TokenClaim) HasLabel() bool { - if o != nil && !isNil(o.Label) { - return true - } - - return false -} - -// SetLabel gets a reference to the given string and assigns it to the Label field. -func (o *TokenClaim) SetLabel(v string) { - o.Label = &v -} - -// GetUserAttributeMappings returns the UserAttributeMappings field value if set, zero value otherwise. -func (o *TokenClaim) GetUserAttributeMappings() string { - if o == nil || isNil(o.UserAttributeMappings) { - var ret string - return ret - } - return *o.UserAttributeMappings -} - -// GetUserAttributeMappingsOk returns a tuple with the UserAttributeMappings field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *TokenClaim) GetUserAttributeMappingsOk() (*string, bool) { - if o == nil || isNil(o.UserAttributeMappings) { - return nil, false - } - return o.UserAttributeMappings, true -} - -// HasUserAttributeMappings returns a boolean if a field has been set. -func (o *TokenClaim) HasUserAttributeMappings() bool { - if o != nil && !isNil(o.UserAttributeMappings) { - return true - } - - return false -} - -// SetUserAttributeMappings gets a reference to the given string and assigns it to the UserAttributeMappings field. -func (o *TokenClaim) SetUserAttributeMappings(v string) { - o.UserAttributeMappings = &v -} - -// GetUserAttributeMacros returns the UserAttributeMacros field value if set, zero value otherwise. -func (o *TokenClaim) GetUserAttributeMacros() string { - if o == nil || isNil(o.UserAttributeMacros) { - var ret string - return ret - } - return *o.UserAttributeMacros -} - -// GetUserAttributeMacrosOk returns a tuple with the UserAttributeMacros field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *TokenClaim) GetUserAttributeMacrosOk() (*string, bool) { - if o == nil || isNil(o.UserAttributeMacros) { - return nil, false - } - return o.UserAttributeMacros, true -} - -// HasUserAttributeMacros returns a boolean if a field has been set. -func (o *TokenClaim) HasUserAttributeMacros() bool { - if o != nil && !isNil(o.UserAttributeMacros) { - return true - } - - return false -} - -// SetUserAttributeMacros gets a reference to the given string and assigns it to the UserAttributeMacros field. -func (o *TokenClaim) SetUserAttributeMacros(v string) { - o.UserAttributeMacros = &v -} - -// GetAttributeTransformations returns the AttributeTransformations field value if set, zero value otherwise. -func (o *TokenClaim) GetAttributeTransformations() string { - if o == nil || isNil(o.AttributeTransformations) { - var ret string - return ret - } - return *o.AttributeTransformations -} - -// GetAttributeTransformationsOk returns a tuple with the AttributeTransformations field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *TokenClaim) GetAttributeTransformationsOk() (*string, bool) { - if o == nil || isNil(o.AttributeTransformations) { - return nil, false - } - return o.AttributeTransformations, true -} - -// HasAttributeTransformations returns a boolean if a field has been set. -func (o *TokenClaim) HasAttributeTransformations() bool { - if o != nil && !isNil(o.AttributeTransformations) { - return true - } - - return false -} - -// SetAttributeTransformations gets a reference to the given string and assigns it to the AttributeTransformations field. -func (o *TokenClaim) SetAttributeTransformations(v string) { - o.AttributeTransformations = &v -} - -// GetSkipIfBlank returns the SkipIfBlank field value if set, zero value otherwise. -func (o *TokenClaim) GetSkipIfBlank() bool { - if o == nil || isNil(o.SkipIfBlank) { - var ret bool - return ret - } - return *o.SkipIfBlank -} - -// GetSkipIfBlankOk returns a tuple with the SkipIfBlank field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *TokenClaim) GetSkipIfBlankOk() (*bool, bool) { - if o == nil || isNil(o.SkipIfBlank) { - return nil, false - } - return o.SkipIfBlank, true -} - -// HasSkipIfBlank returns a boolean if a field has been set. -func (o *TokenClaim) HasSkipIfBlank() bool { - if o != nil && !isNil(o.SkipIfBlank) { - return true - } - - return false -} - -// SetSkipIfBlank gets a reference to the given bool and assigns it to the SkipIfBlank field. -func (o *TokenClaim) SetSkipIfBlank(v bool) { - o.SkipIfBlank = &v -} - -// GetValues returns the Values field value if set, zero value otherwise. -func (o *TokenClaim) GetValues() []string { - if o == nil || isNil(o.Values) { - var ret []string - return ret - } - return o.Values -} - -// GetValuesOk returns a tuple with the Values field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *TokenClaim) GetValuesOk() ([]string, bool) { - if o == nil || isNil(o.Values) { - return nil, false - } - return o.Values, true -} - -// HasValues returns a boolean if a field has been set. -func (o *TokenClaim) HasValues() bool { - if o != nil && !isNil(o.Values) { - return true - } - - return false -} - -// SetValues gets a reference to the given []string and assigns it to the Values field. -func (o *TokenClaim) SetValues(v []string) { - o.Values = v -} - -// GetDefaultValues returns the DefaultValues field value if set, zero value otherwise. -func (o *TokenClaim) GetDefaultValues() string { - if o == nil || isNil(o.DefaultValues) { - var ret string - return ret - } - return *o.DefaultValues -} - -// GetDefaultValuesOk returns a tuple with the DefaultValues field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *TokenClaim) GetDefaultValuesOk() (*string, bool) { - if o == nil || isNil(o.DefaultValues) { - return nil, false - } - return o.DefaultValues, true -} - -// HasDefaultValues returns a boolean if a field has been set. -func (o *TokenClaim) HasDefaultValues() bool { - if o != nil && !isNil(o.DefaultValues) { - return true - } - - return false -} - -// SetDefaultValues gets a reference to the given string and assigns it to the DefaultValues field. -func (o *TokenClaim) SetDefaultValues(v string) { - o.DefaultValues = &v -} - -// GetProvisionedEntitlements returns the ProvisionedEntitlements field value if set, zero value otherwise. -func (o *TokenClaim) GetProvisionedEntitlements() bool { - if o == nil || isNil(o.ProvisionedEntitlements) { - var ret bool - return ret - } - return *o.ProvisionedEntitlements -} - -// GetProvisionedEntitlementsOk returns a tuple with the ProvisionedEntitlements field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *TokenClaim) GetProvisionedEntitlementsOk() (*bool, bool) { - if o == nil || isNil(o.ProvisionedEntitlements) { - return nil, false - } - return o.ProvisionedEntitlements, true -} - -// HasProvisionedEntitlements returns a boolean if a field has been set. -func (o *TokenClaim) HasProvisionedEntitlements() bool { - if o != nil && !isNil(o.ProvisionedEntitlements) { - return true - } - - return false -} - -// SetProvisionedEntitlements gets a reference to the given bool and assigns it to the ProvisionedEntitlements field. -func (o *TokenClaim) SetProvisionedEntitlements(v bool) { - o.ProvisionedEntitlements = &v -} - -func (o TokenClaim) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o TokenClaim) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Id) { - toSerialize["id"] = o.Id - } - if !isNil(o.Label) { - toSerialize["label"] = o.Label - } - if !isNil(o.UserAttributeMappings) { - toSerialize["user_attribute_mappings"] = o.UserAttributeMappings - } - if !isNil(o.UserAttributeMacros) { - toSerialize["user_attribute_macros"] = o.UserAttributeMacros - } - if !isNil(o.AttributeTransformations) { - toSerialize["attribute_transformations"] = o.AttributeTransformations - } - if !isNil(o.SkipIfBlank) { - toSerialize["skip_if_blank"] = o.SkipIfBlank - } - if !isNil(o.Values) { - toSerialize["values"] = o.Values - } - if !isNil(o.DefaultValues) { - toSerialize["default_values"] = o.DefaultValues - } - if !isNil(o.ProvisionedEntitlements) { - toSerialize["provisioned_entitlements"] = o.ProvisionedEntitlements - } - return toSerialize, nil -} - -type NullableTokenClaim struct { - value *TokenClaim - isSet bool -} - -func (v NullableTokenClaim) Get() *TokenClaim { - return v.value -} - -func (v *NullableTokenClaim) Set(val *TokenClaim) { - v.value = val - v.isSet = true -} - -func (v NullableTokenClaim) IsSet() bool { - return v.isSet -} - -func (v *NullableTokenClaim) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTokenClaim(val *TokenClaim) *NullableTokenClaim { - return &NullableTokenClaim{value: val, isSet: true} -} - -func (v NullableTokenClaim) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableTokenClaim) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_track_risk_event_request.go b/model_track_risk_event_request.go deleted file mode 100644 index 4048851..0000000 --- a/model_track_risk_event_request.go +++ /dev/null @@ -1,383 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the TrackRiskEventRequest type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &TrackRiskEventRequest{} - -// TrackRiskEventRequest struct for TrackRiskEventRequest -type TrackRiskEventRequest struct { - // Verbs are used to distinguish between different types of events. - Verb string `json:"verb"` - // The IP address of the User's request. - Ip string `json:"ip"` - // The user agent of the User's request. - UserAgent string `json:"user_agent"` - User RiskUser `json:"user"` - Source *Source `json:"source,omitempty"` - Session *Session `json:"session,omitempty"` - Device *RiskDevice `json:"device,omitempty"` - // Set to the value of the __tdli_fp cookie. - Fp *string `json:"fp,omitempty"` - // Date and time of the event in IS08601 format. Useful for preloading old events. Defaults to date time this API request is received. - Published *string `json:"published,omitempty"` -} - -// NewTrackRiskEventRequest instantiates a new TrackRiskEventRequest 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 NewTrackRiskEventRequest(verb string, ip string, userAgent string, user RiskUser) *TrackRiskEventRequest { - this := TrackRiskEventRequest{} - this.Verb = verb - this.Ip = ip - this.UserAgent = userAgent - this.User = user - return &this -} - -// NewTrackRiskEventRequestWithDefaults instantiates a new TrackRiskEventRequest 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 NewTrackRiskEventRequestWithDefaults() *TrackRiskEventRequest { - this := TrackRiskEventRequest{} - return &this -} - -// GetVerb returns the Verb field value -func (o *TrackRiskEventRequest) GetVerb() string { - if o == nil { - var ret string - return ret - } - - return o.Verb -} - -// GetVerbOk returns a tuple with the Verb field value -// and a boolean to check if the value has been set. -func (o *TrackRiskEventRequest) GetVerbOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Verb, true -} - -// SetVerb sets field value -func (o *TrackRiskEventRequest) SetVerb(v string) { - o.Verb = v -} - -// GetIp returns the Ip field value -func (o *TrackRiskEventRequest) GetIp() string { - if o == nil { - var ret string - return ret - } - - return o.Ip -} - -// GetIpOk returns a tuple with the Ip field value -// and a boolean to check if the value has been set. -func (o *TrackRiskEventRequest) GetIpOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Ip, true -} - -// SetIp sets field value -func (o *TrackRiskEventRequest) SetIp(v string) { - o.Ip = v -} - -// GetUserAgent returns the UserAgent field value -func (o *TrackRiskEventRequest) GetUserAgent() string { - if o == nil { - var ret string - return ret - } - - return o.UserAgent -} - -// GetUserAgentOk returns a tuple with the UserAgent field value -// and a boolean to check if the value has been set. -func (o *TrackRiskEventRequest) GetUserAgentOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.UserAgent, true -} - -// SetUserAgent sets field value -func (o *TrackRiskEventRequest) SetUserAgent(v string) { - o.UserAgent = v -} - -// GetUser returns the User field value -func (o *TrackRiskEventRequest) GetUser() RiskUser { - if o == nil { - var ret RiskUser - return ret - } - - return o.User -} - -// GetUserOk returns a tuple with the User field value -// and a boolean to check if the value has been set. -func (o *TrackRiskEventRequest) GetUserOk() (*RiskUser, bool) { - if o == nil { - return nil, false - } - return &o.User, true -} - -// SetUser sets field value -func (o *TrackRiskEventRequest) SetUser(v RiskUser) { - o.User = v -} - -// GetSource returns the Source field value if set, zero value otherwise. -func (o *TrackRiskEventRequest) GetSource() Source { - if o == nil || isNil(o.Source) { - var ret Source - return ret - } - return *o.Source -} - -// GetSourceOk returns a tuple with the Source field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *TrackRiskEventRequest) GetSourceOk() (*Source, bool) { - if o == nil || isNil(o.Source) { - return nil, false - } - return o.Source, true -} - -// HasSource returns a boolean if a field has been set. -func (o *TrackRiskEventRequest) HasSource() bool { - if o != nil && !isNil(o.Source) { - return true - } - - return false -} - -// SetSource gets a reference to the given Source and assigns it to the Source field. -func (o *TrackRiskEventRequest) SetSource(v Source) { - o.Source = &v -} - -// GetSession returns the Session field value if set, zero value otherwise. -func (o *TrackRiskEventRequest) GetSession() Session { - if o == nil || isNil(o.Session) { - var ret Session - return ret - } - return *o.Session -} - -// GetSessionOk returns a tuple with the Session field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *TrackRiskEventRequest) GetSessionOk() (*Session, bool) { - if o == nil || isNil(o.Session) { - return nil, false - } - return o.Session, true -} - -// HasSession returns a boolean if a field has been set. -func (o *TrackRiskEventRequest) HasSession() bool { - if o != nil && !isNil(o.Session) { - return true - } - - return false -} - -// SetSession gets a reference to the given Session and assigns it to the Session field. -func (o *TrackRiskEventRequest) SetSession(v Session) { - o.Session = &v -} - -// GetDevice returns the Device field value if set, zero value otherwise. -func (o *TrackRiskEventRequest) GetDevice() RiskDevice { - if o == nil || isNil(o.Device) { - var ret RiskDevice - return ret - } - return *o.Device -} - -// GetDeviceOk returns a tuple with the Device field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *TrackRiskEventRequest) GetDeviceOk() (*RiskDevice, bool) { - if o == nil || isNil(o.Device) { - return nil, false - } - return o.Device, true -} - -// HasDevice returns a boolean if a field has been set. -func (o *TrackRiskEventRequest) HasDevice() bool { - if o != nil && !isNil(o.Device) { - return true - } - - return false -} - -// SetDevice gets a reference to the given RiskDevice and assigns it to the Device field. -func (o *TrackRiskEventRequest) SetDevice(v RiskDevice) { - o.Device = &v -} - -// GetFp returns the Fp field value if set, zero value otherwise. -func (o *TrackRiskEventRequest) GetFp() string { - if o == nil || isNil(o.Fp) { - var ret string - return ret - } - return *o.Fp -} - -// GetFpOk returns a tuple with the Fp field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *TrackRiskEventRequest) GetFpOk() (*string, bool) { - if o == nil || isNil(o.Fp) { - return nil, false - } - return o.Fp, true -} - -// HasFp returns a boolean if a field has been set. -func (o *TrackRiskEventRequest) HasFp() bool { - if o != nil && !isNil(o.Fp) { - return true - } - - return false -} - -// SetFp gets a reference to the given string and assigns it to the Fp field. -func (o *TrackRiskEventRequest) SetFp(v string) { - o.Fp = &v -} - -// GetPublished returns the Published field value if set, zero value otherwise. -func (o *TrackRiskEventRequest) GetPublished() string { - if o == nil || isNil(o.Published) { - var ret string - return ret - } - return *o.Published -} - -// GetPublishedOk returns a tuple with the Published field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *TrackRiskEventRequest) GetPublishedOk() (*string, bool) { - if o == nil || isNil(o.Published) { - return nil, false - } - return o.Published, true -} - -// HasPublished returns a boolean if a field has been set. -func (o *TrackRiskEventRequest) HasPublished() bool { - if o != nil && !isNil(o.Published) { - return true - } - - return false -} - -// SetPublished gets a reference to the given string and assigns it to the Published field. -func (o *TrackRiskEventRequest) SetPublished(v string) { - o.Published = &v -} - -func (o TrackRiskEventRequest) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o TrackRiskEventRequest) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["verb"] = o.Verb - toSerialize["ip"] = o.Ip - toSerialize["user_agent"] = o.UserAgent - toSerialize["user"] = o.User - if !isNil(o.Source) { - toSerialize["source"] = o.Source - } - if !isNil(o.Session) { - toSerialize["session"] = o.Session - } - if !isNil(o.Device) { - toSerialize["device"] = o.Device - } - if !isNil(o.Fp) { - toSerialize["fp"] = o.Fp - } - if !isNil(o.Published) { - toSerialize["published"] = o.Published - } - return toSerialize, nil -} - -type NullableTrackRiskEventRequest struct { - value *TrackRiskEventRequest - isSet bool -} - -func (v NullableTrackRiskEventRequest) Get() *TrackRiskEventRequest { - return v.value -} - -func (v *NullableTrackRiskEventRequest) Set(val *TrackRiskEventRequest) { - v.value = val - v.isSet = true -} - -func (v NullableTrackRiskEventRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableTrackRiskEventRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTrackRiskEventRequest(val *TrackRiskEventRequest) *NullableTrackRiskEventRequest { - return &NullableTrackRiskEventRequest{value: val, isSet: true} -} - -func (v NullableTrackRiskEventRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableTrackRiskEventRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_update_client_app_request.go b/model_update_client_app_request.go deleted file mode 100644 index 5f4de77..0000000 --- a/model_update_client_app_request.go +++ /dev/null @@ -1,127 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the UpdateClientAppRequest type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &UpdateClientAppRequest{} - -// UpdateClientAppRequest struct for UpdateClientAppRequest -type UpdateClientAppRequest struct { - // An array of Scope IDs the scopes the app can request - Scopes []int32 `json:"scopes,omitempty"` -} - -// NewUpdateClientAppRequest instantiates a new UpdateClientAppRequest 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 NewUpdateClientAppRequest() *UpdateClientAppRequest { - this := UpdateClientAppRequest{} - return &this -} - -// NewUpdateClientAppRequestWithDefaults instantiates a new UpdateClientAppRequest 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 NewUpdateClientAppRequestWithDefaults() *UpdateClientAppRequest { - this := UpdateClientAppRequest{} - return &this -} - -// GetScopes returns the Scopes field value if set, zero value otherwise. -func (o *UpdateClientAppRequest) GetScopes() []int32 { - if o == nil || isNil(o.Scopes) { - var ret []int32 - return ret - } - return o.Scopes -} - -// GetScopesOk returns a tuple with the Scopes field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateClientAppRequest) GetScopesOk() ([]int32, bool) { - if o == nil || isNil(o.Scopes) { - return nil, false - } - return o.Scopes, true -} - -// HasScopes returns a boolean if a field has been set. -func (o *UpdateClientAppRequest) HasScopes() bool { - if o != nil && !isNil(o.Scopes) { - return true - } - - return false -} - -// SetScopes gets a reference to the given []int32 and assigns it to the Scopes field. -func (o *UpdateClientAppRequest) SetScopes(v []int32) { - o.Scopes = v -} - -func (o UpdateClientAppRequest) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o UpdateClientAppRequest) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Scopes) { - toSerialize["scopes"] = o.Scopes - } - return toSerialize, nil -} - -type NullableUpdateClientAppRequest struct { - value *UpdateClientAppRequest - isSet bool -} - -func (v NullableUpdateClientAppRequest) Get() *UpdateClientAppRequest { - return v.value -} - -func (v *NullableUpdateClientAppRequest) Set(val *UpdateClientAppRequest) { - v.value = val - v.isSet = true -} - -func (v NullableUpdateClientAppRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableUpdateClientAppRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableUpdateClientAppRequest(val *UpdateClientAppRequest) *NullableUpdateClientAppRequest { - return &NullableUpdateClientAppRequest{value: val, isSet: true} -} - -func (v NullableUpdateClientAppRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableUpdateClientAppRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_update_environment_variable_request.go b/model_update_environment_variable_request.go deleted file mode 100644 index b9bb324..0000000 --- a/model_update_environment_variable_request.go +++ /dev/null @@ -1,118 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the UpdateEnvironmentVariableRequest type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &UpdateEnvironmentVariableRequest{} - -// UpdateEnvironmentVariableRequest struct for UpdateEnvironmentVariableRequest -type UpdateEnvironmentVariableRequest struct { - // The secret value that will be encrypted at rest and injected in applicable hook functions at run time. - Value string `json:"value"` -} - -// NewUpdateEnvironmentVariableRequest instantiates a new UpdateEnvironmentVariableRequest 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 NewUpdateEnvironmentVariableRequest(value string) *UpdateEnvironmentVariableRequest { - this := UpdateEnvironmentVariableRequest{} - this.Value = value - return &this -} - -// NewUpdateEnvironmentVariableRequestWithDefaults instantiates a new UpdateEnvironmentVariableRequest 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 NewUpdateEnvironmentVariableRequestWithDefaults() *UpdateEnvironmentVariableRequest { - this := UpdateEnvironmentVariableRequest{} - return &this -} - -// GetValue returns the Value field value -func (o *UpdateEnvironmentVariableRequest) GetValue() string { - if o == nil { - var ret string - return ret - } - - return o.Value -} - -// GetValueOk returns a tuple with the Value field value -// and a boolean to check if the value has been set. -func (o *UpdateEnvironmentVariableRequest) GetValueOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Value, true -} - -// SetValue sets field value -func (o *UpdateEnvironmentVariableRequest) SetValue(v string) { - o.Value = v -} - -func (o UpdateEnvironmentVariableRequest) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o UpdateEnvironmentVariableRequest) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["value"] = o.Value - return toSerialize, nil -} - -type NullableUpdateEnvironmentVariableRequest struct { - value *UpdateEnvironmentVariableRequest - isSet bool -} - -func (v NullableUpdateEnvironmentVariableRequest) Get() *UpdateEnvironmentVariableRequest { - return v.value -} - -func (v *NullableUpdateEnvironmentVariableRequest) Set(val *UpdateEnvironmentVariableRequest) { - v.value = val - v.isSet = true -} - -func (v NullableUpdateEnvironmentVariableRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableUpdateEnvironmentVariableRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableUpdateEnvironmentVariableRequest(val *UpdateEnvironmentVariableRequest) *NullableUpdateEnvironmentVariableRequest { - return &NullableUpdateEnvironmentVariableRequest{value: val, isSet: true} -} - -func (v NullableUpdateEnvironmentVariableRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableUpdateEnvironmentVariableRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_update_password_insecure_request.go b/model_update_password_insecure_request.go deleted file mode 100644 index f475caf..0000000 --- a/model_update_password_insecure_request.go +++ /dev/null @@ -1,187 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the UpdatePasswordInsecureRequest type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &UpdatePasswordInsecureRequest{} - -// UpdatePasswordInsecureRequest struct for UpdatePasswordInsecureRequest -type UpdatePasswordInsecureRequest struct { - // Set to the password value using cleartext. Hashes are never stored as cleartext. They are stored securely using cryptographic hash. OneLogin continuously upgrades the strength of the hash. Ensure that the value meets the password strength requirements set for the account. - Password string `json:"password"` - // Ensure that this value matches the password value exactly. - PasswordConfirmation string `json:"password_confirmation"` - // Will passwords validate against the User Policy. Defaults to false. - ValidatePolicy *bool `json:"validate_policy,omitempty"` -} - -// NewUpdatePasswordInsecureRequest instantiates a new UpdatePasswordInsecureRequest 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 NewUpdatePasswordInsecureRequest(password string, passwordConfirmation string) *UpdatePasswordInsecureRequest { - this := UpdatePasswordInsecureRequest{} - this.Password = password - this.PasswordConfirmation = passwordConfirmation - var validatePolicy bool = false - this.ValidatePolicy = &validatePolicy - return &this -} - -// NewUpdatePasswordInsecureRequestWithDefaults instantiates a new UpdatePasswordInsecureRequest 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 NewUpdatePasswordInsecureRequestWithDefaults() *UpdatePasswordInsecureRequest { - this := UpdatePasswordInsecureRequest{} - var validatePolicy bool = false - this.ValidatePolicy = &validatePolicy - return &this -} - -// GetPassword returns the Password field value -func (o *UpdatePasswordInsecureRequest) GetPassword() string { - if o == nil { - var ret string - return ret - } - - return o.Password -} - -// GetPasswordOk returns a tuple with the Password field value -// and a boolean to check if the value has been set. -func (o *UpdatePasswordInsecureRequest) GetPasswordOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Password, true -} - -// SetPassword sets field value -func (o *UpdatePasswordInsecureRequest) SetPassword(v string) { - o.Password = v -} - -// GetPasswordConfirmation returns the PasswordConfirmation field value -func (o *UpdatePasswordInsecureRequest) GetPasswordConfirmation() string { - if o == nil { - var ret string - return ret - } - - return o.PasswordConfirmation -} - -// GetPasswordConfirmationOk returns a tuple with the PasswordConfirmation field value -// and a boolean to check if the value has been set. -func (o *UpdatePasswordInsecureRequest) GetPasswordConfirmationOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.PasswordConfirmation, true -} - -// SetPasswordConfirmation sets field value -func (o *UpdatePasswordInsecureRequest) SetPasswordConfirmation(v string) { - o.PasswordConfirmation = v -} - -// GetValidatePolicy returns the ValidatePolicy field value if set, zero value otherwise. -func (o *UpdatePasswordInsecureRequest) GetValidatePolicy() bool { - if o == nil || isNil(o.ValidatePolicy) { - var ret bool - return ret - } - return *o.ValidatePolicy -} - -// GetValidatePolicyOk returns a tuple with the ValidatePolicy field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdatePasswordInsecureRequest) GetValidatePolicyOk() (*bool, bool) { - if o == nil || isNil(o.ValidatePolicy) { - return nil, false - } - return o.ValidatePolicy, true -} - -// HasValidatePolicy returns a boolean if a field has been set. -func (o *UpdatePasswordInsecureRequest) HasValidatePolicy() bool { - if o != nil && !isNil(o.ValidatePolicy) { - return true - } - - return false -} - -// SetValidatePolicy gets a reference to the given bool and assigns it to the ValidatePolicy field. -func (o *UpdatePasswordInsecureRequest) SetValidatePolicy(v bool) { - o.ValidatePolicy = &v -} - -func (o UpdatePasswordInsecureRequest) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o UpdatePasswordInsecureRequest) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["password"] = o.Password - toSerialize["password_confirmation"] = o.PasswordConfirmation - if !isNil(o.ValidatePolicy) { - toSerialize["validate_policy"] = o.ValidatePolicy - } - return toSerialize, nil -} - -type NullableUpdatePasswordInsecureRequest struct { - value *UpdatePasswordInsecureRequest - isSet bool -} - -func (v NullableUpdatePasswordInsecureRequest) Get() *UpdatePasswordInsecureRequest { - return v.value -} - -func (v *NullableUpdatePasswordInsecureRequest) Set(val *UpdatePasswordInsecureRequest) { - v.value = val - v.isSet = true -} - -func (v NullableUpdatePasswordInsecureRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableUpdatePasswordInsecureRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableUpdatePasswordInsecureRequest(val *UpdatePasswordInsecureRequest) *NullableUpdatePasswordInsecureRequest { - return &NullableUpdatePasswordInsecureRequest{value: val, isSet: true} -} - -func (v NullableUpdatePasswordInsecureRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableUpdatePasswordInsecureRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_update_password_secure_request.go b/model_update_password_secure_request.go deleted file mode 100644 index e78b8be..0000000 --- a/model_update_password_secure_request.go +++ /dev/null @@ -1,211 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the UpdatePasswordSecureRequest type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &UpdatePasswordSecureRequest{} - -// UpdatePasswordSecureRequest struct for UpdatePasswordSecureRequest -type UpdatePasswordSecureRequest struct { - // Set to the password value using a SHA-256-encoded value. If you are including your own password_salt value in your request, prepend the salt value to the cleartext password value before SHA-256-encoding it. For example, if your salt value is hello and your cleartext password value is password, the value you need to SHA-256-encode is hellopassword. The resulting encoded value would be b1c788abac15390de987ad17b65ac73c9b475d428a51f245c645a442fddd078b. Note that the alpha characters in this has must all be lower case. - Password string `json:"password"` - // This value must match the password value. - PasswordConfirmation string `json:"password_confirmation"` - // Set to salt+sha256. - PasswordAlgorithm string `json:"password_algorithm"` - // Optional. If your password hash has been salted then you can provide the salt used in this param. This assumes that the salt was prepended to the password before doing the SHA256 hash. The API supports a salt value that is up to 40 characters long. - PasswordSalt *string `json:"password_salt,omitempty"` -} - -// NewUpdatePasswordSecureRequest instantiates a new UpdatePasswordSecureRequest 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 NewUpdatePasswordSecureRequest(password string, passwordConfirmation string, passwordAlgorithm string) *UpdatePasswordSecureRequest { - this := UpdatePasswordSecureRequest{} - this.Password = password - this.PasswordConfirmation = passwordConfirmation - this.PasswordAlgorithm = passwordAlgorithm - return &this -} - -// NewUpdatePasswordSecureRequestWithDefaults instantiates a new UpdatePasswordSecureRequest 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 NewUpdatePasswordSecureRequestWithDefaults() *UpdatePasswordSecureRequest { - this := UpdatePasswordSecureRequest{} - return &this -} - -// GetPassword returns the Password field value -func (o *UpdatePasswordSecureRequest) GetPassword() string { - if o == nil { - var ret string - return ret - } - - return o.Password -} - -// GetPasswordOk returns a tuple with the Password field value -// and a boolean to check if the value has been set. -func (o *UpdatePasswordSecureRequest) GetPasswordOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Password, true -} - -// SetPassword sets field value -func (o *UpdatePasswordSecureRequest) SetPassword(v string) { - o.Password = v -} - -// GetPasswordConfirmation returns the PasswordConfirmation field value -func (o *UpdatePasswordSecureRequest) GetPasswordConfirmation() string { - if o == nil { - var ret string - return ret - } - - return o.PasswordConfirmation -} - -// GetPasswordConfirmationOk returns a tuple with the PasswordConfirmation field value -// and a boolean to check if the value has been set. -func (o *UpdatePasswordSecureRequest) GetPasswordConfirmationOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.PasswordConfirmation, true -} - -// SetPasswordConfirmation sets field value -func (o *UpdatePasswordSecureRequest) SetPasswordConfirmation(v string) { - o.PasswordConfirmation = v -} - -// GetPasswordAlgorithm returns the PasswordAlgorithm field value -func (o *UpdatePasswordSecureRequest) GetPasswordAlgorithm() string { - if o == nil { - var ret string - return ret - } - - return o.PasswordAlgorithm -} - -// GetPasswordAlgorithmOk returns a tuple with the PasswordAlgorithm field value -// and a boolean to check if the value has been set. -func (o *UpdatePasswordSecureRequest) GetPasswordAlgorithmOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.PasswordAlgorithm, true -} - -// SetPasswordAlgorithm sets field value -func (o *UpdatePasswordSecureRequest) SetPasswordAlgorithm(v string) { - o.PasswordAlgorithm = v -} - -// GetPasswordSalt returns the PasswordSalt field value if set, zero value otherwise. -func (o *UpdatePasswordSecureRequest) GetPasswordSalt() string { - if o == nil || isNil(o.PasswordSalt) { - var ret string - return ret - } - return *o.PasswordSalt -} - -// GetPasswordSaltOk returns a tuple with the PasswordSalt field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdatePasswordSecureRequest) GetPasswordSaltOk() (*string, bool) { - if o == nil || isNil(o.PasswordSalt) { - return nil, false - } - return o.PasswordSalt, true -} - -// HasPasswordSalt returns a boolean if a field has been set. -func (o *UpdatePasswordSecureRequest) HasPasswordSalt() bool { - if o != nil && !isNil(o.PasswordSalt) { - return true - } - - return false -} - -// SetPasswordSalt gets a reference to the given string and assigns it to the PasswordSalt field. -func (o *UpdatePasswordSecureRequest) SetPasswordSalt(v string) { - o.PasswordSalt = &v -} - -func (o UpdatePasswordSecureRequest) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o UpdatePasswordSecureRequest) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["password"] = o.Password - toSerialize["password_confirmation"] = o.PasswordConfirmation - toSerialize["password_algorithm"] = o.PasswordAlgorithm - if !isNil(o.PasswordSalt) { - toSerialize["password_salt"] = o.PasswordSalt - } - return toSerialize, nil -} - -type NullableUpdatePasswordSecureRequest struct { - value *UpdatePasswordSecureRequest - isSet bool -} - -func (v NullableUpdatePasswordSecureRequest) Get() *UpdatePasswordSecureRequest { - return v.value -} - -func (v *NullableUpdatePasswordSecureRequest) Set(val *UpdatePasswordSecureRequest) { - v.value = val - v.isSet = true -} - -func (v NullableUpdatePasswordSecureRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableUpdatePasswordSecureRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableUpdatePasswordSecureRequest(val *UpdatePasswordSecureRequest) *NullableUpdatePasswordSecureRequest { - return &NullableUpdatePasswordSecureRequest{value: val, isSet: true} -} - -func (v NullableUpdatePasswordSecureRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableUpdatePasswordSecureRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_update_privilege_200_response.go b/model_update_privilege_200_response.go deleted file mode 100644 index 8e99f57..0000000 --- a/model_update_privilege_200_response.go +++ /dev/null @@ -1,127 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the UpdatePrivilege200Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &UpdatePrivilege200Response{} - -// UpdatePrivilege200Response struct for UpdatePrivilege200Response -type UpdatePrivilege200Response struct { - // Privilege ID - Id *string `json:"id,omitempty"` -} - -// NewUpdatePrivilege200Response instantiates a new UpdatePrivilege200Response 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 NewUpdatePrivilege200Response() *UpdatePrivilege200Response { - this := UpdatePrivilege200Response{} - return &this -} - -// NewUpdatePrivilege200ResponseWithDefaults instantiates a new UpdatePrivilege200Response 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 NewUpdatePrivilege200ResponseWithDefaults() *UpdatePrivilege200Response { - this := UpdatePrivilege200Response{} - return &this -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *UpdatePrivilege200Response) GetId() string { - if o == nil || isNil(o.Id) { - var ret string - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdatePrivilege200Response) GetIdOk() (*string, bool) { - if o == nil || isNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *UpdatePrivilege200Response) HasId() bool { - if o != nil && !isNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given string and assigns it to the Id field. -func (o *UpdatePrivilege200Response) SetId(v string) { - o.Id = &v -} - -func (o UpdatePrivilege200Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o UpdatePrivilege200Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Id) { - toSerialize["id"] = o.Id - } - return toSerialize, nil -} - -type NullableUpdatePrivilege200Response struct { - value *UpdatePrivilege200Response - isSet bool -} - -func (v NullableUpdatePrivilege200Response) Get() *UpdatePrivilege200Response { - return v.value -} - -func (v *NullableUpdatePrivilege200Response) Set(val *UpdatePrivilege200Response) { - v.value = val - v.isSet = true -} - -func (v NullableUpdatePrivilege200Response) IsSet() bool { - return v.isSet -} - -func (v *NullableUpdatePrivilege200Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableUpdatePrivilege200Response(val *UpdatePrivilege200Response) *NullableUpdatePrivilege200Response { - return &NullableUpdatePrivilege200Response{value: val, isSet: true} -} - -func (v NullableUpdatePrivilege200Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableUpdatePrivilege200Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_update_risk_rule_request.go b/model_update_risk_rule_request.go deleted file mode 100644 index 0ff56f1..0000000 --- a/model_update_risk_rule_request.go +++ /dev/null @@ -1,127 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the UpdateRiskRuleRequest type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &UpdateRiskRuleRequest{} - -// UpdateRiskRuleRequest struct for UpdateRiskRuleRequest -type UpdateRiskRuleRequest struct { - // The ID of the Rule to Update - Id *string `json:"id,omitempty"` -} - -// NewUpdateRiskRuleRequest instantiates a new UpdateRiskRuleRequest 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 NewUpdateRiskRuleRequest() *UpdateRiskRuleRequest { - this := UpdateRiskRuleRequest{} - return &this -} - -// NewUpdateRiskRuleRequestWithDefaults instantiates a new UpdateRiskRuleRequest 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 NewUpdateRiskRuleRequestWithDefaults() *UpdateRiskRuleRequest { - this := UpdateRiskRuleRequest{} - return &this -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *UpdateRiskRuleRequest) GetId() string { - if o == nil || isNil(o.Id) { - var ret string - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateRiskRuleRequest) GetIdOk() (*string, bool) { - if o == nil || isNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *UpdateRiskRuleRequest) HasId() bool { - if o != nil && !isNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given string and assigns it to the Id field. -func (o *UpdateRiskRuleRequest) SetId(v string) { - o.Id = &v -} - -func (o UpdateRiskRuleRequest) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o UpdateRiskRuleRequest) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Id) { - toSerialize["id"] = o.Id - } - return toSerialize, nil -} - -type NullableUpdateRiskRuleRequest struct { - value *UpdateRiskRuleRequest - isSet bool -} - -func (v NullableUpdateRiskRuleRequest) Get() *UpdateRiskRuleRequest { - return v.value -} - -func (v *NullableUpdateRiskRuleRequest) Set(val *UpdateRiskRuleRequest) { - v.value = val - v.isSet = true -} - -func (v NullableUpdateRiskRuleRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableUpdateRiskRuleRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableUpdateRiskRuleRequest(val *UpdateRiskRuleRequest) *NullableUpdateRiskRuleRequest { - return &NullableUpdateRiskRuleRequest{value: val, isSet: true} -} - -func (v NullableUpdateRiskRuleRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableUpdateRiskRuleRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_update_role_200_response.go b/model_update_role_200_response.go deleted file mode 100644 index b9bfdba..0000000 --- a/model_update_role_200_response.go +++ /dev/null @@ -1,126 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the UpdateRole200Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &UpdateRole200Response{} - -// UpdateRole200Response struct for UpdateRole200Response -type UpdateRole200Response struct { - Id *int32 `json:"id,omitempty"` -} - -// NewUpdateRole200Response instantiates a new UpdateRole200Response 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 NewUpdateRole200Response() *UpdateRole200Response { - this := UpdateRole200Response{} - return &this -} - -// NewUpdateRole200ResponseWithDefaults instantiates a new UpdateRole200Response 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 NewUpdateRole200ResponseWithDefaults() *UpdateRole200Response { - this := UpdateRole200Response{} - return &this -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *UpdateRole200Response) GetId() int32 { - if o == nil || isNil(o.Id) { - var ret int32 - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateRole200Response) GetIdOk() (*int32, bool) { - if o == nil || isNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *UpdateRole200Response) HasId() bool { - if o != nil && !isNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given int32 and assigns it to the Id field. -func (o *UpdateRole200Response) SetId(v int32) { - o.Id = &v -} - -func (o UpdateRole200Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o UpdateRole200Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Id) { - toSerialize["id"] = o.Id - } - return toSerialize, nil -} - -type NullableUpdateRole200Response struct { - value *UpdateRole200Response - isSet bool -} - -func (v NullableUpdateRole200Response) Get() *UpdateRole200Response { - return v.value -} - -func (v *NullableUpdateRole200Response) Set(val *UpdateRole200Response) { - v.value = val - v.isSet = true -} - -func (v NullableUpdateRole200Response) IsSet() bool { - return v.isSet -} - -func (v *NullableUpdateRole200Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableUpdateRole200Response(val *UpdateRole200Response) *NullableUpdateRole200Response { - return &NullableUpdateRole200Response{value: val, isSet: true} -} - -func (v NullableUpdateRole200Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableUpdateRole200Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_user.go b/model_user.go deleted file mode 100644 index 30703cc..0000000 --- a/model_user.go +++ /dev/null @@ -1,1410 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the User type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &User{} - -// User struct for User -type User struct { - Id *int32 `json:"id,omitempty"` - // A username for the user. - Username *string `json:"username,omitempty"` - // A valid email for the user. - Email *string `json:"email,omitempty"` - // The user's first name. - Firstname *string `json:"firstname,omitempty"` - // The user's last name. - Lastname *string `json:"lastname,omitempty"` - // The user's job title. - Title *string `json:"title,omitempty"` - // The user's department. - Department *string `json:"department,omitempty"` - // The user's company. - Company *string `json:"company,omitempty"` - // Free text related to the user. - Comment *string `json:"comment,omitempty"` - // The ID of the Group in OneLogin that the user is assigned to. - GroupId *int32 `json:"group_id,omitempty"` - // A list of OneLogin Role IDs of the user - RoleIds []int32 `json:"role_ids,omitempty"` - // The E.164 format phone number for a user. - Phone *string `json:"phone,omitempty"` - State *int32 `json:"state,omitempty"` - Status *int32 `json:"status,omitempty"` - // The ID of the OneLogin Directory of the user. - DirectoryId *int32 `json:"directory_id,omitempty"` - // The ID of the OneLogin Trusted IDP of the user. - TrustedIdpId *int32 `json:"trusted_idp_id,omitempty"` - // The ID of the user's manager in Active Directory. - ManagerAdId *string `json:"manager_ad_id,omitempty"` - // The OneLogin User ID for the user's manager. - ManagerUserId *string `json:"manager_user_id,omitempty"` - // The user's Active Directory username. - Samaccountname *string `json:"samaccountname,omitempty"` - // The user's directory membership. - MemberOf *string `json:"member_of,omitempty"` - // The principle name of the user. - Userprincipalname *string `json:"userprincipalname,omitempty"` - // The distinguished name of the user. - DistinguishedName *string `json:"distinguished_name,omitempty"` - // The ID of the user in an external directory. - ExternalId *string `json:"external_id,omitempty"` - ActivatedAt *string `json:"activated_at,omitempty"` - LastLogin *string `json:"last_login,omitempty"` - InvitationSentAt *string `json:"invitation_sent_at,omitempty"` - UpdatedAt *string `json:"updated_at,omitempty"` - PreferredLocaleCode *string `json:"preferred_locale_code,omitempty"` - CreatedAt *string `json:"created_at,omitempty"` - InvalidLoginAttempts *int32 `json:"invalid_login_attempts,omitempty"` - LockedUntil *string `json:"locked_until,omitempty"` - PasswordChangedAt *string `json:"password_changed_at,omitempty"` - // The password to set for a user. - Password *string `json:"password,omitempty"` - // Required if the password is being set. - PasswordConfirmation *string `json:"password_confirmation,omitempty"` - // Use this when importing a password that's already hashed. Prepend the salt value to the cleartext password value before SHA-256-encoding it - PasswordAlgorithm *string `json:"password_algorithm,omitempty"` - // The salt value used with the password_algorithm. - Salt *string `json:"salt,omitempty"` -} - -// NewUser instantiates a new User 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 NewUser() *User { - this := User{} - return &this -} - -// NewUserWithDefaults instantiates a new User 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 NewUserWithDefaults() *User { - this := User{} - return &this -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *User) GetId() int32 { - if o == nil || isNil(o.Id) { - var ret int32 - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *User) GetIdOk() (*int32, bool) { - if o == nil || isNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *User) HasId() bool { - if o != nil && !isNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given int32 and assigns it to the Id field. -func (o *User) SetId(v int32) { - o.Id = &v -} - -// GetUsername returns the Username field value if set, zero value otherwise. -func (o *User) GetUsername() string { - if o == nil || isNil(o.Username) { - var ret string - return ret - } - return *o.Username -} - -// 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 *User) GetUsernameOk() (*string, bool) { - if o == nil || isNil(o.Username) { - return nil, false - } - return o.Username, true -} - -// HasUsername returns a boolean if a field has been set. -func (o *User) HasUsername() bool { - if o != nil && !isNil(o.Username) { - return true - } - - return false -} - -// SetUsername gets a reference to the given string and assigns it to the Username field. -func (o *User) SetUsername(v string) { - o.Username = &v -} - -// GetEmail returns the Email field value if set, zero value otherwise. -func (o *User) GetEmail() string { - if o == nil || isNil(o.Email) { - 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 *User) GetEmailOk() (*string, bool) { - if o == nil || isNil(o.Email) { - return nil, false - } - return o.Email, true -} - -// HasEmail returns a boolean if a field has been set. -func (o *User) HasEmail() bool { - if o != nil && !isNil(o.Email) { - return true - } - - return false -} - -// SetEmail gets a reference to the given string and assigns it to the Email field. -func (o *User) SetEmail(v string) { - o.Email = &v -} - -// GetFirstname returns the Firstname field value if set, zero value otherwise. -func (o *User) GetFirstname() string { - if o == nil || isNil(o.Firstname) { - var ret string - return ret - } - return *o.Firstname -} - -// GetFirstnameOk returns a tuple with the Firstname field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *User) GetFirstnameOk() (*string, bool) { - if o == nil || isNil(o.Firstname) { - return nil, false - } - return o.Firstname, true -} - -// HasFirstname returns a boolean if a field has been set. -func (o *User) HasFirstname() bool { - if o != nil && !isNil(o.Firstname) { - return true - } - - return false -} - -// SetFirstname gets a reference to the given string and assigns it to the Firstname field. -func (o *User) SetFirstname(v string) { - o.Firstname = &v -} - -// GetLastname returns the Lastname field value if set, zero value otherwise. -func (o *User) GetLastname() string { - if o == nil || isNil(o.Lastname) { - var ret string - return ret - } - return *o.Lastname -} - -// GetLastnameOk returns a tuple with the Lastname field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *User) GetLastnameOk() (*string, bool) { - if o == nil || isNil(o.Lastname) { - return nil, false - } - return o.Lastname, true -} - -// HasLastname returns a boolean if a field has been set. -func (o *User) HasLastname() bool { - if o != nil && !isNil(o.Lastname) { - return true - } - - return false -} - -// SetLastname gets a reference to the given string and assigns it to the Lastname field. -func (o *User) SetLastname(v string) { - o.Lastname = &v -} - -// GetTitle returns the Title field value if set, zero value otherwise. -func (o *User) GetTitle() string { - if o == nil || isNil(o.Title) { - var ret string - return ret - } - return *o.Title -} - -// 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 *User) GetTitleOk() (*string, bool) { - if o == nil || isNil(o.Title) { - return nil, false - } - return o.Title, true -} - -// HasTitle returns a boolean if a field has been set. -func (o *User) HasTitle() bool { - if o != nil && !isNil(o.Title) { - return true - } - - return false -} - -// SetTitle gets a reference to the given string and assigns it to the Title field. -func (o *User) SetTitle(v string) { - o.Title = &v -} - -// GetDepartment returns the Department field value if set, zero value otherwise. -func (o *User) GetDepartment() string { - if o == nil || isNil(o.Department) { - var ret string - return ret - } - return *o.Department -} - -// GetDepartmentOk returns a tuple with the Department field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *User) GetDepartmentOk() (*string, bool) { - if o == nil || isNil(o.Department) { - return nil, false - } - return o.Department, true -} - -// HasDepartment returns a boolean if a field has been set. -func (o *User) HasDepartment() bool { - if o != nil && !isNil(o.Department) { - return true - } - - return false -} - -// SetDepartment gets a reference to the given string and assigns it to the Department field. -func (o *User) SetDepartment(v string) { - o.Department = &v -} - -// GetCompany returns the Company field value if set, zero value otherwise. -func (o *User) GetCompany() string { - if o == nil || isNil(o.Company) { - var ret string - return ret - } - return *o.Company -} - -// GetCompanyOk returns a tuple with the Company field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *User) GetCompanyOk() (*string, bool) { - if o == nil || isNil(o.Company) { - return nil, false - } - return o.Company, true -} - -// HasCompany returns a boolean if a field has been set. -func (o *User) HasCompany() bool { - if o != nil && !isNil(o.Company) { - return true - } - - return false -} - -// SetCompany gets a reference to the given string and assigns it to the Company field. -func (o *User) SetCompany(v string) { - o.Company = &v -} - -// GetComment returns the Comment field value if set, zero value otherwise. -func (o *User) GetComment() string { - if o == nil || isNil(o.Comment) { - var ret string - return ret - } - return *o.Comment -} - -// GetCommentOk returns a tuple with the Comment field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *User) GetCommentOk() (*string, bool) { - if o == nil || isNil(o.Comment) { - return nil, false - } - return o.Comment, true -} - -// HasComment returns a boolean if a field has been set. -func (o *User) HasComment() bool { - if o != nil && !isNil(o.Comment) { - return true - } - - return false -} - -// SetComment gets a reference to the given string and assigns it to the Comment field. -func (o *User) SetComment(v string) { - o.Comment = &v -} - -// GetGroupId returns the GroupId field value if set, zero value otherwise. -func (o *User) GetGroupId() int32 { - if o == nil || isNil(o.GroupId) { - var ret int32 - return ret - } - return *o.GroupId -} - -// GetGroupIdOk returns a tuple with the GroupId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *User) GetGroupIdOk() (*int32, bool) { - if o == nil || isNil(o.GroupId) { - return nil, false - } - return o.GroupId, true -} - -// HasGroupId returns a boolean if a field has been set. -func (o *User) HasGroupId() bool { - if o != nil && !isNil(o.GroupId) { - return true - } - - return false -} - -// SetGroupId gets a reference to the given int32 and assigns it to the GroupId field. -func (o *User) SetGroupId(v int32) { - o.GroupId = &v -} - -// GetRoleIds returns the RoleIds field value if set, zero value otherwise. -func (o *User) GetRoleIds() []int32 { - if o == nil || isNil(o.RoleIds) { - var ret []int32 - return ret - } - return o.RoleIds -} - -// GetRoleIdsOk returns a tuple with the RoleIds field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *User) GetRoleIdsOk() ([]int32, bool) { - if o == nil || isNil(o.RoleIds) { - return nil, false - } - return o.RoleIds, true -} - -// HasRoleIds returns a boolean if a field has been set. -func (o *User) HasRoleIds() bool { - if o != nil && !isNil(o.RoleIds) { - return true - } - - return false -} - -// SetRoleIds gets a reference to the given []int32 and assigns it to the RoleIds field. -func (o *User) SetRoleIds(v []int32) { - o.RoleIds = v -} - -// GetPhone returns the Phone field value if set, zero value otherwise. -func (o *User) GetPhone() string { - if o == nil || isNil(o.Phone) { - var ret string - return ret - } - return *o.Phone -} - -// GetPhoneOk returns a tuple with the Phone field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *User) GetPhoneOk() (*string, bool) { - if o == nil || isNil(o.Phone) { - return nil, false - } - return o.Phone, true -} - -// HasPhone returns a boolean if a field has been set. -func (o *User) HasPhone() bool { - if o != nil && !isNil(o.Phone) { - return true - } - - return false -} - -// SetPhone gets a reference to the given string and assigns it to the Phone field. -func (o *User) SetPhone(v string) { - o.Phone = &v -} - -// GetState returns the State field value if set, zero value otherwise. -func (o *User) GetState() int32 { - if o == nil || isNil(o.State) { - var ret int32 - return ret - } - return *o.State -} - -// GetStateOk returns a tuple with the State field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *User) GetStateOk() (*int32, bool) { - if o == nil || isNil(o.State) { - return nil, false - } - return o.State, true -} - -// HasState returns a boolean if a field has been set. -func (o *User) HasState() bool { - if o != nil && !isNil(o.State) { - return true - } - - return false -} - -// SetState gets a reference to the given int32 and assigns it to the State field. -func (o *User) SetState(v int32) { - o.State = &v -} - -// GetStatus returns the Status field value if set, zero value otherwise. -func (o *User) GetStatus() int32 { - if o == nil || isNil(o.Status) { - var ret int32 - return ret - } - return *o.Status -} - -// GetStatusOk returns a tuple with the Status field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *User) GetStatusOk() (*int32, bool) { - if o == nil || isNil(o.Status) { - return nil, false - } - return o.Status, true -} - -// HasStatus returns a boolean if a field has been set. -func (o *User) HasStatus() bool { - if o != nil && !isNil(o.Status) { - return true - } - - return false -} - -// SetStatus gets a reference to the given int32 and assigns it to the Status field. -func (o *User) SetStatus(v int32) { - o.Status = &v -} - -// GetDirectoryId returns the DirectoryId field value if set, zero value otherwise. -func (o *User) GetDirectoryId() int32 { - if o == nil || isNil(o.DirectoryId) { - var ret int32 - return ret - } - return *o.DirectoryId -} - -// GetDirectoryIdOk returns a tuple with the DirectoryId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *User) GetDirectoryIdOk() (*int32, bool) { - if o == nil || isNil(o.DirectoryId) { - return nil, false - } - return o.DirectoryId, true -} - -// HasDirectoryId returns a boolean if a field has been set. -func (o *User) HasDirectoryId() bool { - if o != nil && !isNil(o.DirectoryId) { - return true - } - - return false -} - -// SetDirectoryId gets a reference to the given int32 and assigns it to the DirectoryId field. -func (o *User) SetDirectoryId(v int32) { - o.DirectoryId = &v -} - -// GetTrustedIdpId returns the TrustedIdpId field value if set, zero value otherwise. -func (o *User) GetTrustedIdpId() int32 { - if o == nil || isNil(o.TrustedIdpId) { - var ret int32 - return ret - } - return *o.TrustedIdpId -} - -// GetTrustedIdpIdOk returns a tuple with the TrustedIdpId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *User) GetTrustedIdpIdOk() (*int32, bool) { - if o == nil || isNil(o.TrustedIdpId) { - return nil, false - } - return o.TrustedIdpId, true -} - -// HasTrustedIdpId returns a boolean if a field has been set. -func (o *User) HasTrustedIdpId() bool { - if o != nil && !isNil(o.TrustedIdpId) { - return true - } - - return false -} - -// SetTrustedIdpId gets a reference to the given int32 and assigns it to the TrustedIdpId field. -func (o *User) SetTrustedIdpId(v int32) { - o.TrustedIdpId = &v -} - -// GetManagerAdId returns the ManagerAdId field value if set, zero value otherwise. -func (o *User) GetManagerAdId() string { - if o == nil || isNil(o.ManagerAdId) { - var ret string - return ret - } - return *o.ManagerAdId -} - -// GetManagerAdIdOk returns a tuple with the ManagerAdId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *User) GetManagerAdIdOk() (*string, bool) { - if o == nil || isNil(o.ManagerAdId) { - return nil, false - } - return o.ManagerAdId, true -} - -// HasManagerAdId returns a boolean if a field has been set. -func (o *User) HasManagerAdId() bool { - if o != nil && !isNil(o.ManagerAdId) { - return true - } - - return false -} - -// SetManagerAdId gets a reference to the given string and assigns it to the ManagerAdId field. -func (o *User) SetManagerAdId(v string) { - o.ManagerAdId = &v -} - -// GetManagerUserId returns the ManagerUserId field value if set, zero value otherwise. -func (o *User) GetManagerUserId() string { - if o == nil || isNil(o.ManagerUserId) { - var ret string - return ret - } - return *o.ManagerUserId -} - -// GetManagerUserIdOk returns a tuple with the ManagerUserId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *User) GetManagerUserIdOk() (*string, bool) { - if o == nil || isNil(o.ManagerUserId) { - return nil, false - } - return o.ManagerUserId, true -} - -// HasManagerUserId returns a boolean if a field has been set. -func (o *User) HasManagerUserId() bool { - if o != nil && !isNil(o.ManagerUserId) { - return true - } - - return false -} - -// SetManagerUserId gets a reference to the given string and assigns it to the ManagerUserId field. -func (o *User) SetManagerUserId(v string) { - o.ManagerUserId = &v -} - -// GetSamaccountname returns the Samaccountname field value if set, zero value otherwise. -func (o *User) GetSamaccountname() string { - if o == nil || isNil(o.Samaccountname) { - var ret string - return ret - } - return *o.Samaccountname -} - -// GetSamaccountnameOk returns a tuple with the Samaccountname field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *User) GetSamaccountnameOk() (*string, bool) { - if o == nil || isNil(o.Samaccountname) { - return nil, false - } - return o.Samaccountname, true -} - -// HasSamaccountname returns a boolean if a field has been set. -func (o *User) HasSamaccountname() bool { - if o != nil && !isNil(o.Samaccountname) { - return true - } - - return false -} - -// SetSamaccountname gets a reference to the given string and assigns it to the Samaccountname field. -func (o *User) SetSamaccountname(v string) { - o.Samaccountname = &v -} - -// GetMemberOf returns the MemberOf field value if set, zero value otherwise. -func (o *User) GetMemberOf() string { - if o == nil || isNil(o.MemberOf) { - var ret string - return ret - } - return *o.MemberOf -} - -// GetMemberOfOk returns a tuple with the MemberOf field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *User) GetMemberOfOk() (*string, bool) { - if o == nil || isNil(o.MemberOf) { - return nil, false - } - return o.MemberOf, true -} - -// HasMemberOf returns a boolean if a field has been set. -func (o *User) HasMemberOf() bool { - if o != nil && !isNil(o.MemberOf) { - return true - } - - return false -} - -// SetMemberOf gets a reference to the given string and assigns it to the MemberOf field. -func (o *User) SetMemberOf(v string) { - o.MemberOf = &v -} - -// GetUserprincipalname returns the Userprincipalname field value if set, zero value otherwise. -func (o *User) GetUserprincipalname() string { - if o == nil || isNil(o.Userprincipalname) { - var ret string - return ret - } - return *o.Userprincipalname -} - -// GetUserprincipalnameOk returns a tuple with the Userprincipalname field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *User) GetUserprincipalnameOk() (*string, bool) { - if o == nil || isNil(o.Userprincipalname) { - return nil, false - } - return o.Userprincipalname, true -} - -// HasUserprincipalname returns a boolean if a field has been set. -func (o *User) HasUserprincipalname() bool { - if o != nil && !isNil(o.Userprincipalname) { - return true - } - - return false -} - -// SetUserprincipalname gets a reference to the given string and assigns it to the Userprincipalname field. -func (o *User) SetUserprincipalname(v string) { - o.Userprincipalname = &v -} - -// GetDistinguishedName returns the DistinguishedName field value if set, zero value otherwise. -func (o *User) GetDistinguishedName() string { - if o == nil || isNil(o.DistinguishedName) { - var ret string - return ret - } - return *o.DistinguishedName -} - -// GetDistinguishedNameOk returns a tuple with the DistinguishedName field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *User) GetDistinguishedNameOk() (*string, bool) { - if o == nil || isNil(o.DistinguishedName) { - return nil, false - } - return o.DistinguishedName, true -} - -// HasDistinguishedName returns a boolean if a field has been set. -func (o *User) HasDistinguishedName() bool { - if o != nil && !isNil(o.DistinguishedName) { - return true - } - - return false -} - -// SetDistinguishedName gets a reference to the given string and assigns it to the DistinguishedName field. -func (o *User) SetDistinguishedName(v string) { - o.DistinguishedName = &v -} - -// GetExternalId returns the ExternalId field value if set, zero value otherwise. -func (o *User) GetExternalId() string { - if o == nil || isNil(o.ExternalId) { - var ret string - return ret - } - return *o.ExternalId -} - -// GetExternalIdOk returns a tuple with the ExternalId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *User) GetExternalIdOk() (*string, bool) { - if o == nil || isNil(o.ExternalId) { - return nil, false - } - return o.ExternalId, true -} - -// HasExternalId returns a boolean if a field has been set. -func (o *User) HasExternalId() bool { - if o != nil && !isNil(o.ExternalId) { - return true - } - - return false -} - -// SetExternalId gets a reference to the given string and assigns it to the ExternalId field. -func (o *User) SetExternalId(v string) { - o.ExternalId = &v -} - -// GetActivatedAt returns the ActivatedAt field value if set, zero value otherwise. -func (o *User) GetActivatedAt() string { - if o == nil || isNil(o.ActivatedAt) { - var ret string - return ret - } - return *o.ActivatedAt -} - -// GetActivatedAtOk returns a tuple with the ActivatedAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *User) GetActivatedAtOk() (*string, bool) { - if o == nil || isNil(o.ActivatedAt) { - return nil, false - } - return o.ActivatedAt, true -} - -// HasActivatedAt returns a boolean if a field has been set. -func (o *User) HasActivatedAt() bool { - if o != nil && !isNil(o.ActivatedAt) { - return true - } - - return false -} - -// SetActivatedAt gets a reference to the given string and assigns it to the ActivatedAt field. -func (o *User) SetActivatedAt(v string) { - o.ActivatedAt = &v -} - -// GetLastLogin returns the LastLogin field value if set, zero value otherwise. -func (o *User) GetLastLogin() string { - if o == nil || isNil(o.LastLogin) { - var ret string - return ret - } - return *o.LastLogin -} - -// GetLastLoginOk returns a tuple with the LastLogin field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *User) GetLastLoginOk() (*string, bool) { - if o == nil || isNil(o.LastLogin) { - return nil, false - } - return o.LastLogin, true -} - -// HasLastLogin returns a boolean if a field has been set. -func (o *User) HasLastLogin() bool { - if o != nil && !isNil(o.LastLogin) { - return true - } - - return false -} - -// SetLastLogin gets a reference to the given string and assigns it to the LastLogin field. -func (o *User) SetLastLogin(v string) { - o.LastLogin = &v -} - -// GetInvitationSentAt returns the InvitationSentAt field value if set, zero value otherwise. -func (o *User) GetInvitationSentAt() string { - if o == nil || isNil(o.InvitationSentAt) { - var ret string - return ret - } - return *o.InvitationSentAt -} - -// GetInvitationSentAtOk returns a tuple with the InvitationSentAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *User) GetInvitationSentAtOk() (*string, bool) { - if o == nil || isNil(o.InvitationSentAt) { - return nil, false - } - return o.InvitationSentAt, true -} - -// HasInvitationSentAt returns a boolean if a field has been set. -func (o *User) HasInvitationSentAt() bool { - if o != nil && !isNil(o.InvitationSentAt) { - return true - } - - return false -} - -// SetInvitationSentAt gets a reference to the given string and assigns it to the InvitationSentAt field. -func (o *User) SetInvitationSentAt(v string) { - o.InvitationSentAt = &v -} - -// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. -func (o *User) GetUpdatedAt() string { - if o == nil || isNil(o.UpdatedAt) { - var ret string - return ret - } - return *o.UpdatedAt -} - -// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *User) GetUpdatedAtOk() (*string, bool) { - if o == nil || isNil(o.UpdatedAt) { - return nil, false - } - return o.UpdatedAt, true -} - -// HasUpdatedAt returns a boolean if a field has been set. -func (o *User) HasUpdatedAt() bool { - if o != nil && !isNil(o.UpdatedAt) { - return true - } - - return false -} - -// SetUpdatedAt gets a reference to the given string and assigns it to the UpdatedAt field. -func (o *User) SetUpdatedAt(v string) { - o.UpdatedAt = &v -} - -// GetPreferredLocaleCode returns the PreferredLocaleCode field value if set, zero value otherwise. -func (o *User) GetPreferredLocaleCode() string { - if o == nil || isNil(o.PreferredLocaleCode) { - var ret string - return ret - } - return *o.PreferredLocaleCode -} - -// GetPreferredLocaleCodeOk returns a tuple with the PreferredLocaleCode field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *User) GetPreferredLocaleCodeOk() (*string, bool) { - if o == nil || isNil(o.PreferredLocaleCode) { - return nil, false - } - return o.PreferredLocaleCode, true -} - -// HasPreferredLocaleCode returns a boolean if a field has been set. -func (o *User) HasPreferredLocaleCode() bool { - if o != nil && !isNil(o.PreferredLocaleCode) { - return true - } - - return false -} - -// SetPreferredLocaleCode gets a reference to the given string and assigns it to the PreferredLocaleCode field. -func (o *User) SetPreferredLocaleCode(v string) { - o.PreferredLocaleCode = &v -} - -// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. -func (o *User) GetCreatedAt() string { - if o == nil || isNil(o.CreatedAt) { - var ret string - return ret - } - return *o.CreatedAt -} - -// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *User) GetCreatedAtOk() (*string, bool) { - if o == nil || isNil(o.CreatedAt) { - return nil, false - } - return o.CreatedAt, true -} - -// HasCreatedAt returns a boolean if a field has been set. -func (o *User) HasCreatedAt() bool { - if o != nil && !isNil(o.CreatedAt) { - return true - } - - return false -} - -// SetCreatedAt gets a reference to the given string and assigns it to the CreatedAt field. -func (o *User) SetCreatedAt(v string) { - o.CreatedAt = &v -} - -// GetInvalidLoginAttempts returns the InvalidLoginAttempts field value if set, zero value otherwise. -func (o *User) GetInvalidLoginAttempts() int32 { - if o == nil || isNil(o.InvalidLoginAttempts) { - var ret int32 - return ret - } - return *o.InvalidLoginAttempts -} - -// GetInvalidLoginAttemptsOk returns a tuple with the InvalidLoginAttempts field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *User) GetInvalidLoginAttemptsOk() (*int32, bool) { - if o == nil || isNil(o.InvalidLoginAttempts) { - return nil, false - } - return o.InvalidLoginAttempts, true -} - -// HasInvalidLoginAttempts returns a boolean if a field has been set. -func (o *User) HasInvalidLoginAttempts() bool { - if o != nil && !isNil(o.InvalidLoginAttempts) { - return true - } - - return false -} - -// SetInvalidLoginAttempts gets a reference to the given int32 and assigns it to the InvalidLoginAttempts field. -func (o *User) SetInvalidLoginAttempts(v int32) { - o.InvalidLoginAttempts = &v -} - -// GetLockedUntil returns the LockedUntil field value if set, zero value otherwise. -func (o *User) GetLockedUntil() string { - if o == nil || isNil(o.LockedUntil) { - var ret string - return ret - } - return *o.LockedUntil -} - -// GetLockedUntilOk returns a tuple with the LockedUntil field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *User) GetLockedUntilOk() (*string, bool) { - if o == nil || isNil(o.LockedUntil) { - return nil, false - } - return o.LockedUntil, true -} - -// HasLockedUntil returns a boolean if a field has been set. -func (o *User) HasLockedUntil() bool { - if o != nil && !isNil(o.LockedUntil) { - return true - } - - return false -} - -// SetLockedUntil gets a reference to the given string and assigns it to the LockedUntil field. -func (o *User) SetLockedUntil(v string) { - o.LockedUntil = &v -} - -// GetPasswordChangedAt returns the PasswordChangedAt field value if set, zero value otherwise. -func (o *User) GetPasswordChangedAt() string { - if o == nil || isNil(o.PasswordChangedAt) { - var ret string - return ret - } - return *o.PasswordChangedAt -} - -// GetPasswordChangedAtOk returns a tuple with the PasswordChangedAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *User) GetPasswordChangedAtOk() (*string, bool) { - if o == nil || isNil(o.PasswordChangedAt) { - return nil, false - } - return o.PasswordChangedAt, true -} - -// HasPasswordChangedAt returns a boolean if a field has been set. -func (o *User) HasPasswordChangedAt() bool { - if o != nil && !isNil(o.PasswordChangedAt) { - return true - } - - return false -} - -// SetPasswordChangedAt gets a reference to the given string and assigns it to the PasswordChangedAt field. -func (o *User) SetPasswordChangedAt(v string) { - o.PasswordChangedAt = &v -} - -// GetPassword returns the Password field value if set, zero value otherwise. -func (o *User) GetPassword() string { - if o == nil || isNil(o.Password) { - var ret string - return ret - } - return *o.Password -} - -// 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 *User) GetPasswordOk() (*string, bool) { - if o == nil || isNil(o.Password) { - return nil, false - } - return o.Password, true -} - -// HasPassword returns a boolean if a field has been set. -func (o *User) HasPassword() bool { - if o != nil && !isNil(o.Password) { - return true - } - - return false -} - -// SetPassword gets a reference to the given string and assigns it to the Password field. -func (o *User) SetPassword(v string) { - o.Password = &v -} - -// GetPasswordConfirmation returns the PasswordConfirmation field value if set, zero value otherwise. -func (o *User) GetPasswordConfirmation() string { - if o == nil || isNil(o.PasswordConfirmation) { - var ret string - return ret - } - return *o.PasswordConfirmation -} - -// GetPasswordConfirmationOk returns a tuple with the PasswordConfirmation field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *User) GetPasswordConfirmationOk() (*string, bool) { - if o == nil || isNil(o.PasswordConfirmation) { - return nil, false - } - return o.PasswordConfirmation, true -} - -// HasPasswordConfirmation returns a boolean if a field has been set. -func (o *User) HasPasswordConfirmation() bool { - if o != nil && !isNil(o.PasswordConfirmation) { - return true - } - - return false -} - -// SetPasswordConfirmation gets a reference to the given string and assigns it to the PasswordConfirmation field. -func (o *User) SetPasswordConfirmation(v string) { - o.PasswordConfirmation = &v -} - -// GetPasswordAlgorithm returns the PasswordAlgorithm field value if set, zero value otherwise. -func (o *User) GetPasswordAlgorithm() string { - if o == nil || isNil(o.PasswordAlgorithm) { - var ret string - return ret - } - return *o.PasswordAlgorithm -} - -// GetPasswordAlgorithmOk returns a tuple with the PasswordAlgorithm field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *User) GetPasswordAlgorithmOk() (*string, bool) { - if o == nil || isNil(o.PasswordAlgorithm) { - return nil, false - } - return o.PasswordAlgorithm, true -} - -// HasPasswordAlgorithm returns a boolean if a field has been set. -func (o *User) HasPasswordAlgorithm() bool { - if o != nil && !isNil(o.PasswordAlgorithm) { - return true - } - - return false -} - -// SetPasswordAlgorithm gets a reference to the given string and assigns it to the PasswordAlgorithm field. -func (o *User) SetPasswordAlgorithm(v string) { - o.PasswordAlgorithm = &v -} - -// GetSalt returns the Salt field value if set, zero value otherwise. -func (o *User) GetSalt() string { - if o == nil || isNil(o.Salt) { - var ret string - return ret - } - return *o.Salt -} - -// GetSaltOk returns a tuple with the Salt field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *User) GetSaltOk() (*string, bool) { - if o == nil || isNil(o.Salt) { - return nil, false - } - return o.Salt, true -} - -// HasSalt returns a boolean if a field has been set. -func (o *User) HasSalt() bool { - if o != nil && !isNil(o.Salt) { - return true - } - - return false -} - -// SetSalt gets a reference to the given string and assigns it to the Salt field. -func (o *User) SetSalt(v string) { - o.Salt = &v -} - -func (o User) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o User) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Id) { - toSerialize["id"] = o.Id - } - if !isNil(o.Username) { - toSerialize["username"] = o.Username - } - if !isNil(o.Email) { - toSerialize["email"] = o.Email - } - if !isNil(o.Firstname) { - toSerialize["firstname"] = o.Firstname - } - if !isNil(o.Lastname) { - toSerialize["lastname"] = o.Lastname - } - if !isNil(o.Title) { - toSerialize["title"] = o.Title - } - if !isNil(o.Department) { - toSerialize["department"] = o.Department - } - if !isNil(o.Company) { - toSerialize["company"] = o.Company - } - if !isNil(o.Comment) { - toSerialize["comment"] = o.Comment - } - if !isNil(o.GroupId) { - toSerialize["group_id"] = o.GroupId - } - if !isNil(o.RoleIds) { - toSerialize["role_ids"] = o.RoleIds - } - if !isNil(o.Phone) { - toSerialize["phone"] = o.Phone - } - if !isNil(o.State) { - toSerialize["state"] = o.State - } - if !isNil(o.Status) { - toSerialize["status"] = o.Status - } - if !isNil(o.DirectoryId) { - toSerialize["directory_id"] = o.DirectoryId - } - if !isNil(o.TrustedIdpId) { - toSerialize["trusted_idp_id"] = o.TrustedIdpId - } - if !isNil(o.ManagerAdId) { - toSerialize["manager_ad_id"] = o.ManagerAdId - } - if !isNil(o.ManagerUserId) { - toSerialize["manager_user_id"] = o.ManagerUserId - } - if !isNil(o.Samaccountname) { - toSerialize["samaccountname"] = o.Samaccountname - } - if !isNil(o.MemberOf) { - toSerialize["member_of"] = o.MemberOf - } - if !isNil(o.Userprincipalname) { - toSerialize["userprincipalname"] = o.Userprincipalname - } - if !isNil(o.DistinguishedName) { - toSerialize["distinguished_name"] = o.DistinguishedName - } - if !isNil(o.ExternalId) { - toSerialize["external_id"] = o.ExternalId - } - if !isNil(o.ActivatedAt) { - toSerialize["activated_at"] = o.ActivatedAt - } - if !isNil(o.LastLogin) { - toSerialize["last_login"] = o.LastLogin - } - if !isNil(o.InvitationSentAt) { - toSerialize["invitation_sent_at"] = o.InvitationSentAt - } - if !isNil(o.UpdatedAt) { - toSerialize["updated_at"] = o.UpdatedAt - } - if !isNil(o.PreferredLocaleCode) { - toSerialize["preferred_locale_code"] = o.PreferredLocaleCode - } - if !isNil(o.CreatedAt) { - toSerialize["created_at"] = o.CreatedAt - } - if !isNil(o.InvalidLoginAttempts) { - toSerialize["invalid_login_attempts"] = o.InvalidLoginAttempts - } - if !isNil(o.LockedUntil) { - toSerialize["locked_until"] = o.LockedUntil - } - if !isNil(o.PasswordChangedAt) { - toSerialize["password_changed_at"] = o.PasswordChangedAt - } - if !isNil(o.Password) { - toSerialize["password"] = o.Password - } - if !isNil(o.PasswordConfirmation) { - toSerialize["password_confirmation"] = o.PasswordConfirmation - } - if !isNil(o.PasswordAlgorithm) { - toSerialize["password_algorithm"] = o.PasswordAlgorithm - } - if !isNil(o.Salt) { - toSerialize["salt"] = o.Salt - } - return toSerialize, nil -} - -type NullableUser struct { - value *User - isSet bool -} - -func (v NullableUser) Get() *User { - return v.value -} - -func (v *NullableUser) Set(val *User) { - v.value = val - v.isSet = true -} - -func (v NullableUser) IsSet() bool { - return v.isSet -} - -func (v *NullableUser) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableUser(val *User) *NullableUser { - return &NullableUser{value: val, isSet: true} -} - -func (v NullableUser) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableUser) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_ver_factor_saml_200_response.go b/model_ver_factor_saml_200_response.go deleted file mode 100644 index e79cbf2..0000000 --- a/model_ver_factor_saml_200_response.go +++ /dev/null @@ -1,164 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the VerFactorSaml200Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &VerFactorSaml200Response{} - -// VerFactorSaml200Response struct for VerFactorSaml200Response -type VerFactorSaml200Response struct { - // Provides the SAML assertion. - Data *string `json:"data,omitempty"` - // Plain text description describing the outcome of the response. - Message *string `json:"message,omitempty"` -} - -// NewVerFactorSaml200Response instantiates a new VerFactorSaml200Response 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 NewVerFactorSaml200Response() *VerFactorSaml200Response { - this := VerFactorSaml200Response{} - return &this -} - -// NewVerFactorSaml200ResponseWithDefaults instantiates a new VerFactorSaml200Response 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 NewVerFactorSaml200ResponseWithDefaults() *VerFactorSaml200Response { - this := VerFactorSaml200Response{} - return &this -} - -// GetData returns the Data field value if set, zero value otherwise. -func (o *VerFactorSaml200Response) GetData() string { - if o == nil || isNil(o.Data) { - var ret string - return ret - } - return *o.Data -} - -// GetDataOk returns a tuple with the Data field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *VerFactorSaml200Response) GetDataOk() (*string, bool) { - if o == nil || isNil(o.Data) { - return nil, false - } - return o.Data, true -} - -// HasData returns a boolean if a field has been set. -func (o *VerFactorSaml200Response) HasData() bool { - if o != nil && !isNil(o.Data) { - return true - } - - return false -} - -// SetData gets a reference to the given string and assigns it to the Data field. -func (o *VerFactorSaml200Response) SetData(v string) { - o.Data = &v -} - -// GetMessage returns the Message field value if set, zero value otherwise. -func (o *VerFactorSaml200Response) GetMessage() string { - if o == nil || isNil(o.Message) { - var ret string - return ret - } - return *o.Message -} - -// GetMessageOk returns a tuple with the Message field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *VerFactorSaml200Response) GetMessageOk() (*string, bool) { - if o == nil || isNil(o.Message) { - return nil, false - } - return o.Message, true -} - -// HasMessage returns a boolean if a field has been set. -func (o *VerFactorSaml200Response) HasMessage() bool { - if o != nil && !isNil(o.Message) { - return true - } - - return false -} - -// SetMessage gets a reference to the given string and assigns it to the Message field. -func (o *VerFactorSaml200Response) SetMessage(v string) { - o.Message = &v -} - -func (o VerFactorSaml200Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o VerFactorSaml200Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Data) { - toSerialize["data"] = o.Data - } - if !isNil(o.Message) { - toSerialize["message"] = o.Message - } - return toSerialize, nil -} - -type NullableVerFactorSaml200Response struct { - value *VerFactorSaml200Response - isSet bool -} - -func (v NullableVerFactorSaml200Response) Get() *VerFactorSaml200Response { - return v.value -} - -func (v *NullableVerFactorSaml200Response) Set(val *VerFactorSaml200Response) { - v.value = val - v.isSet = true -} - -func (v NullableVerFactorSaml200Response) IsSet() bool { - return v.isSet -} - -func (v *NullableVerFactorSaml200Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableVerFactorSaml200Response(val *VerFactorSaml200Response) *NullableVerFactorSaml200Response { - return &NullableVerFactorSaml200Response{value: val, isSet: true} -} - -func (v NullableVerFactorSaml200Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableVerFactorSaml200Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_verb.go b/model_verb.go deleted file mode 100644 index 23e9376..0000000 --- a/model_verb.go +++ /dev/null @@ -1,119 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" - "fmt" -) - -// Verb Verbs are used to distinguish between different types of events. Where possible use one of the following verbs to describe the event. Alternately you can create custom verbs to describe other types of actions within your application. -type Verb string - -// List of verb -const ( - LOG_IN Verb = "log-in" - LOG_OUT Verb = "log-out" - LOG_IN_DENIED Verb = "log-in-denied" - AUTHENTICATION_CHALLENGE Verb = "authentication-challenge" - AUTHENTICATION_CHALLENGE_PASS Verb = "authentication-challenge-pass" - AUTHENTICATION_CHALLENGE_FAIL Verb = "authentication-challenge-fail" -) - -// All allowed values of Verb enum -var AllowedVerbEnumValues = []Verb{ - "log-in", - "log-out", - "log-in-denied", - "authentication-challenge", - "authentication-challenge-pass", - "authentication-challenge-fail", -} - -func (v *Verb) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - enumTypeValue := Verb(value) - for _, existing := range AllowedVerbEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid Verb", value) -} - -// NewVerbFromValue returns a pointer to a valid Verb -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewVerbFromValue(v string) (*Verb, error) { - ev := Verb(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for Verb: valid values are %v", v, AllowedVerbEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v Verb) IsValid() bool { - for _, existing := range AllowedVerbEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to verb value -func (v Verb) Ptr() *Verb { - return &v -} - -type NullableVerb struct { - value *Verb - isSet bool -} - -func (v NullableVerb) Get() *Verb { - return v.value -} - -func (v *NullableVerb) Set(val *Verb) { - v.value = val - v.isSet = true -} - -func (v NullableVerb) IsSet() bool { - return v.isSet -} - -func (v *NullableVerb) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableVerb(val *Verb) *NullableVerb { - return &NullableVerb{value: val, isSet: true} -} - -func (v NullableVerb) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableVerb) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - diff --git a/model_verify_mfa_factor_request.go b/model_verify_mfa_factor_request.go deleted file mode 100644 index fb19b2c..0000000 --- a/model_verify_mfa_factor_request.go +++ /dev/null @@ -1,164 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the VerifyMfaFactorRequest type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &VerifyMfaFactorRequest{} - -// VerifyMfaFactorRequest struct for VerifyMfaFactorRequest -type VerifyMfaFactorRequest struct { - // The state_token is returned after a successful request to Enroll a Factor or Activate a Factor. The state_token MUST be provided if the needs_trigger attribute from the proceeding calls is set to true. Note that the state_token expires 120 seconds after creation. If the token is expired you will need to Activate the Factor again. - StateToken *string `json:"state_token,omitempty"` - // OTP code provided by the device or SMS message sent to user. When a device like OneLogin Protect that supports Push has been used you do not need to provide the otp_token and can keep polling this endpoint until the state_token expires. - OtpToken *string `json:"otp_token,omitempty"` -} - -// NewVerifyMfaFactorRequest instantiates a new VerifyMfaFactorRequest 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 NewVerifyMfaFactorRequest() *VerifyMfaFactorRequest { - this := VerifyMfaFactorRequest{} - return &this -} - -// NewVerifyMfaFactorRequestWithDefaults instantiates a new VerifyMfaFactorRequest 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 NewVerifyMfaFactorRequestWithDefaults() *VerifyMfaFactorRequest { - this := VerifyMfaFactorRequest{} - return &this -} - -// GetStateToken returns the StateToken field value if set, zero value otherwise. -func (o *VerifyMfaFactorRequest) GetStateToken() string { - if o == nil || isNil(o.StateToken) { - var ret string - return ret - } - return *o.StateToken -} - -// GetStateTokenOk returns a tuple with the StateToken field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *VerifyMfaFactorRequest) GetStateTokenOk() (*string, bool) { - if o == nil || isNil(o.StateToken) { - return nil, false - } - return o.StateToken, true -} - -// HasStateToken returns a boolean if a field has been set. -func (o *VerifyMfaFactorRequest) HasStateToken() bool { - if o != nil && !isNil(o.StateToken) { - return true - } - - return false -} - -// SetStateToken gets a reference to the given string and assigns it to the StateToken field. -func (o *VerifyMfaFactorRequest) SetStateToken(v string) { - o.StateToken = &v -} - -// GetOtpToken returns the OtpToken field value if set, zero value otherwise. -func (o *VerifyMfaFactorRequest) GetOtpToken() string { - if o == nil || isNil(o.OtpToken) { - var ret string - return ret - } - return *o.OtpToken -} - -// GetOtpTokenOk returns a tuple with the OtpToken field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *VerifyMfaFactorRequest) GetOtpTokenOk() (*string, bool) { - if o == nil || isNil(o.OtpToken) { - return nil, false - } - return o.OtpToken, true -} - -// HasOtpToken returns a boolean if a field has been set. -func (o *VerifyMfaFactorRequest) HasOtpToken() bool { - if o != nil && !isNil(o.OtpToken) { - return true - } - - return false -} - -// SetOtpToken gets a reference to the given string and assigns it to the OtpToken field. -func (o *VerifyMfaFactorRequest) SetOtpToken(v string) { - o.OtpToken = &v -} - -func (o VerifyMfaFactorRequest) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o VerifyMfaFactorRequest) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.StateToken) { - toSerialize["state_token"] = o.StateToken - } - if !isNil(o.OtpToken) { - toSerialize["otp_token"] = o.OtpToken - } - return toSerialize, nil -} - -type NullableVerifyMfaFactorRequest struct { - value *VerifyMfaFactorRequest - isSet bool -} - -func (v NullableVerifyMfaFactorRequest) Get() *VerifyMfaFactorRequest { - return v.value -} - -func (v *NullableVerifyMfaFactorRequest) Set(val *VerifyMfaFactorRequest) { - v.value = val - v.isSet = true -} - -func (v NullableVerifyMfaFactorRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableVerifyMfaFactorRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableVerifyMfaFactorRequest(val *VerifyMfaFactorRequest) *NullableVerifyMfaFactorRequest { - return &NullableVerifyMfaFactorRequest{value: val, isSet: true} -} - -func (v NullableVerifyMfaFactorRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableVerifyMfaFactorRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_verify_user_registration_200_response.go b/model_verify_user_registration_200_response.go deleted file mode 100644 index 3f00060..0000000 --- a/model_verify_user_registration_200_response.go +++ /dev/null @@ -1,201 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the VerifyUserRegistration200Response type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &VerifyUserRegistration200Response{} - -// VerifyUserRegistration200Response struct for VerifyUserRegistration200Response -type VerifyUserRegistration200Response struct { - // Registration identifier. - Id *string `json:"id,omitempty"` - // pending registration has not been completed successfully. accepted registration has successfully completed. - Status *string `json:"status,omitempty"` - // Device id to be used with Verify the Factor. - DeviceId *string `json:"device_id,omitempty"` -} - -// NewVerifyUserRegistration200Response instantiates a new VerifyUserRegistration200Response 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 NewVerifyUserRegistration200Response() *VerifyUserRegistration200Response { - this := VerifyUserRegistration200Response{} - return &this -} - -// NewVerifyUserRegistration200ResponseWithDefaults instantiates a new VerifyUserRegistration200Response 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 NewVerifyUserRegistration200ResponseWithDefaults() *VerifyUserRegistration200Response { - this := VerifyUserRegistration200Response{} - return &this -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *VerifyUserRegistration200Response) GetId() string { - if o == nil || isNil(o.Id) { - var ret string - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *VerifyUserRegistration200Response) GetIdOk() (*string, bool) { - if o == nil || isNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *VerifyUserRegistration200Response) HasId() bool { - if o != nil && !isNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given string and assigns it to the Id field. -func (o *VerifyUserRegistration200Response) SetId(v string) { - o.Id = &v -} - -// GetStatus returns the Status field value if set, zero value otherwise. -func (o *VerifyUserRegistration200Response) GetStatus() string { - if o == nil || isNil(o.Status) { - var ret string - return ret - } - return *o.Status -} - -// GetStatusOk returns a tuple with the Status field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *VerifyUserRegistration200Response) GetStatusOk() (*string, bool) { - if o == nil || isNil(o.Status) { - return nil, false - } - return o.Status, true -} - -// HasStatus returns a boolean if a field has been set. -func (o *VerifyUserRegistration200Response) HasStatus() bool { - if o != nil && !isNil(o.Status) { - return true - } - - return false -} - -// SetStatus gets a reference to the given string and assigns it to the Status field. -func (o *VerifyUserRegistration200Response) SetStatus(v string) { - o.Status = &v -} - -// GetDeviceId returns the DeviceId field value if set, zero value otherwise. -func (o *VerifyUserRegistration200Response) GetDeviceId() string { - if o == nil || isNil(o.DeviceId) { - var ret string - return ret - } - return *o.DeviceId -} - -// GetDeviceIdOk returns a tuple with the DeviceId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *VerifyUserRegistration200Response) GetDeviceIdOk() (*string, bool) { - if o == nil || isNil(o.DeviceId) { - return nil, false - } - return o.DeviceId, true -} - -// HasDeviceId returns a boolean if a field has been set. -func (o *VerifyUserRegistration200Response) HasDeviceId() bool { - if o != nil && !isNil(o.DeviceId) { - return true - } - - return false -} - -// SetDeviceId gets a reference to the given string and assigns it to the DeviceId field. -func (o *VerifyUserRegistration200Response) SetDeviceId(v string) { - o.DeviceId = &v -} - -func (o VerifyUserRegistration200Response) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o VerifyUserRegistration200Response) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Id) { - toSerialize["id"] = o.Id - } - if !isNil(o.Status) { - toSerialize["status"] = o.Status - } - if !isNil(o.DeviceId) { - toSerialize["device_id"] = o.DeviceId - } - return toSerialize, nil -} - -type NullableVerifyUserRegistration200Response struct { - value *VerifyUserRegistration200Response - isSet bool -} - -func (v NullableVerifyUserRegistration200Response) Get() *VerifyUserRegistration200Response { - return v.value -} - -func (v *NullableVerifyUserRegistration200Response) Set(val *VerifyUserRegistration200Response) { - v.value = val - v.isSet = true -} - -func (v NullableVerifyUserRegistration200Response) IsSet() bool { - return v.isSet -} - -func (v *NullableVerifyUserRegistration200Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableVerifyUserRegistration200Response(val *VerifyUserRegistration200Response) *NullableVerifyUserRegistration200Response { - return &NullableVerifyUserRegistration200Response{value: val, isSet: true} -} - -func (v NullableVerifyUserRegistration200Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableVerifyUserRegistration200Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_verify_user_registration_request.go b/model_verify_user_registration_request.go deleted file mode 100644 index 8ff177e..0000000 --- a/model_verify_user_registration_request.go +++ /dev/null @@ -1,127 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the VerifyUserRegistrationRequest type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &VerifyUserRegistrationRequest{} - -// VerifyUserRegistrationRequest struct for VerifyUserRegistrationRequest -type VerifyUserRegistrationRequest struct { - // One-Time-Password (OTP) that was sent to the user based on the chosen factor. OneLogin SMS and OneLogin Email support this OTP code. - Otp *int32 `json:"otp,omitempty"` -} - -// NewVerifyUserRegistrationRequest instantiates a new VerifyUserRegistrationRequest 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 NewVerifyUserRegistrationRequest() *VerifyUserRegistrationRequest { - this := VerifyUserRegistrationRequest{} - return &this -} - -// NewVerifyUserRegistrationRequestWithDefaults instantiates a new VerifyUserRegistrationRequest 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 NewVerifyUserRegistrationRequestWithDefaults() *VerifyUserRegistrationRequest { - this := VerifyUserRegistrationRequest{} - return &this -} - -// GetOtp returns the Otp field value if set, zero value otherwise. -func (o *VerifyUserRegistrationRequest) GetOtp() int32 { - if o == nil || isNil(o.Otp) { - var ret int32 - return ret - } - return *o.Otp -} - -// GetOtpOk returns a tuple with the Otp field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *VerifyUserRegistrationRequest) GetOtpOk() (*int32, bool) { - if o == nil || isNil(o.Otp) { - return nil, false - } - return o.Otp, true -} - -// HasOtp returns a boolean if a field has been set. -func (o *VerifyUserRegistrationRequest) HasOtp() bool { - if o != nil && !isNil(o.Otp) { - return true - } - - return false -} - -// SetOtp gets a reference to the given int32 and assigns it to the Otp field. -func (o *VerifyUserRegistrationRequest) SetOtp(v int32) { - o.Otp = &v -} - -func (o VerifyUserRegistrationRequest) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o VerifyUserRegistrationRequest) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Otp) { - toSerialize["otp"] = o.Otp - } - return toSerialize, nil -} - -type NullableVerifyUserRegistrationRequest struct { - value *VerifyUserRegistrationRequest - isSet bool -} - -func (v NullableVerifyUserRegistrationRequest) Get() *VerifyUserRegistrationRequest { - return v.value -} - -func (v *NullableVerifyUserRegistrationRequest) Set(val *VerifyUserRegistrationRequest) { - v.value = val - v.isSet = true -} - -func (v NullableVerifyUserRegistrationRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableVerifyUserRegistrationRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableVerifyUserRegistrationRequest(val *VerifyUserRegistrationRequest) *NullableVerifyUserRegistrationRequest { - return &NullableVerifyUserRegistrationRequest{value: val, isSet: true} -} - -func (v NullableVerifyUserRegistrationRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableVerifyUserRegistrationRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_verify_user_verification_request.go b/model_verify_user_verification_request.go deleted file mode 100644 index 9925287..0000000 --- a/model_verify_user_verification_request.go +++ /dev/null @@ -1,164 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" -) - -// checks if the VerifyUserVerificationRequest type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &VerifyUserVerificationRequest{} - -// VerifyUserVerificationRequest struct for VerifyUserVerificationRequest -type VerifyUserVerificationRequest struct { - // OTP code provided by the device or SMS message sent to user. - Otp *string `json:"otp,omitempty"` - // ID of the specified device which has been registerd for the given user. Available on Get Devices API call. - DeviceId *int32 `json:"device_id,omitempty"` -} - -// NewVerifyUserVerificationRequest instantiates a new VerifyUserVerificationRequest 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 NewVerifyUserVerificationRequest() *VerifyUserVerificationRequest { - this := VerifyUserVerificationRequest{} - return &this -} - -// NewVerifyUserVerificationRequestWithDefaults instantiates a new VerifyUserVerificationRequest 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 NewVerifyUserVerificationRequestWithDefaults() *VerifyUserVerificationRequest { - this := VerifyUserVerificationRequest{} - return &this -} - -// GetOtp returns the Otp field value if set, zero value otherwise. -func (o *VerifyUserVerificationRequest) GetOtp() string { - if o == nil || isNil(o.Otp) { - var ret string - return ret - } - return *o.Otp -} - -// GetOtpOk returns a tuple with the Otp field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *VerifyUserVerificationRequest) GetOtpOk() (*string, bool) { - if o == nil || isNil(o.Otp) { - return nil, false - } - return o.Otp, true -} - -// HasOtp returns a boolean if a field has been set. -func (o *VerifyUserVerificationRequest) HasOtp() bool { - if o != nil && !isNil(o.Otp) { - return true - } - - return false -} - -// SetOtp gets a reference to the given string and assigns it to the Otp field. -func (o *VerifyUserVerificationRequest) SetOtp(v string) { - o.Otp = &v -} - -// GetDeviceId returns the DeviceId field value if set, zero value otherwise. -func (o *VerifyUserVerificationRequest) GetDeviceId() int32 { - if o == nil || isNil(o.DeviceId) { - var ret int32 - return ret - } - return *o.DeviceId -} - -// GetDeviceIdOk returns a tuple with the DeviceId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *VerifyUserVerificationRequest) GetDeviceIdOk() (*int32, bool) { - if o == nil || isNil(o.DeviceId) { - return nil, false - } - return o.DeviceId, true -} - -// HasDeviceId returns a boolean if a field has been set. -func (o *VerifyUserVerificationRequest) HasDeviceId() bool { - if o != nil && !isNil(o.DeviceId) { - return true - } - - return false -} - -// SetDeviceId gets a reference to the given int32 and assigns it to the DeviceId field. -func (o *VerifyUserVerificationRequest) SetDeviceId(v int32) { - o.DeviceId = &v -} - -func (o VerifyUserVerificationRequest) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o VerifyUserVerificationRequest) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !isNil(o.Otp) { - toSerialize["otp"] = o.Otp - } - if !isNil(o.DeviceId) { - toSerialize["device_id"] = o.DeviceId - } - return toSerialize, nil -} - -type NullableVerifyUserVerificationRequest struct { - value *VerifyUserVerificationRequest - isSet bool -} - -func (v NullableVerifyUserVerificationRequest) Get() *VerifyUserVerificationRequest { - return v.value -} - -func (v *NullableVerifyUserVerificationRequest) Set(val *VerifyUserVerificationRequest) { - v.value = val - v.isSet = true -} - -func (v NullableVerifyUserVerificationRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableVerifyUserVerificationRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableVerifyUserVerificationRequest(val *VerifyUserVerificationRequest) *NullableVerifyUserVerificationRequest { - return &NullableVerifyUserVerificationRequest{value: val, isSet: true} -} - -func (v NullableVerifyUserVerificationRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableVerifyUserVerificationRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/pkg/onelogin/api_authorizations.go b/pkg/onelogin/api_authorizations.go new file mode 100644 index 0000000..41f6257 --- /dev/null +++ b/pkg/onelogin/api_authorizations.go @@ -0,0 +1,219 @@ +package onelogin + +import ( + mod "github.com/onelogin/onelogin-go-sdk/internal/models" + utl "github.com/onelogin/onelogin-go-sdk/internal/utilities" +) + +const ( + APIAuthPath string = "api/2/api_authorizations" +) + +func (sdk *OneloginSDK) CreateAuthServer(authServer *mod.AuthServer) (interface{}, error) { + p, err := utl.BuildAPIPath(APIAuthPath) + if err != nil { + return nil, err + } + resp, err := sdk.Client.Post(&p, authServer) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +// was ListAuthServers +func (sdk *OneloginSDK) GetAuthServers(queryParams mod.Queryable) (interface{}, error) { + p, err := utl.BuildAPIPath(APIAuthPath) + if err != nil { + return nil, err + } + resp, err := sdk.Client.Get(&p, queryParams) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +func (sdk *OneloginSDK) GetAuthServerByID(id int, queryParams mod.Queryable) (interface{}, error) { + p, err := utl.BuildAPIPath(APIAuthPath) + if err != nil { + return nil, err + } + resp, err := sdk.Client.Get(&p, queryParams) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +func (sdk *OneloginSDK) UpdateAuthServer(id int, authServer mod.AuthServer) (interface{}, error) { + p, err := utl.BuildAPIPath(APIAuthPath) + if err != nil { + return nil, err + } + resp, err := sdk.Client.Put(&p, authServer) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +func (sdk *OneloginSDK) DeleteAuthServer(id int) (interface{}, error) { + p, err := utl.BuildAPIPath(APIAuthPath, id) + if err != nil { + return nil, err + } + resp, err := sdk.Client.Delete(&p) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +// Claim related endpoints +func (sdk *OneloginSDK) CreateAuthServerClaim(id int, claim mod.AccessTokenClaim) (interface{}, error) { + p, err := utl.BuildAPIPath(APIAuthPath, id, "claims") + if err != nil { + return nil, err + } + resp, err := sdk.Client.Post(&p, claim) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +func (sdk *OneloginSDK) DeleteAuthClaim(id, claimID int) (interface{}, error) { + p, err := utl.BuildAPIPath(APIAuthPath, id, "claims", claimID) + if err != nil { + return nil, err + } + resp, err := sdk.Client.Delete(&p) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +func (sdk *OneloginSDK) GetAuthClaims(id int, queryParams mod.Queryable) (interface{}, error) { + p, err := utl.BuildAPIPath(APIAuthPath, id, "claims") + if err != nil { + return nil, err + } + resp, err := sdk.Client.Get(&p, queryParams) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +func (sdk *OneloginSDK) UpdateClaim(id, claimID int, claim mod.AccessTokenClaim) (interface{}, error) { + p, err := utl.BuildAPIPath(APIAuthPath, id, "claims", claimID) + if err != nil { + return nil, err + } + resp, err := sdk.Client.Put(&p, claim) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +// Scopes related endpoints +func (sdk *OneloginSDK) CreateAuthServerScope(id int, scope mod.Scope) (interface{}, error) { + p, err := utl.BuildAPIPath(APIAuthPath, id, "scopes") + if err != nil { + return nil, err + } + resp, err := sdk.Client.Post(&p, scope) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +func (sdk *OneloginSDK) DeleteAuthServerScope(id, scopeID int) (interface{}, error) { + p, err := utl.BuildAPIPath(APIAuthPath, id, "scopes", scopeID) + if err != nil { + return nil, err + } + resp, err := sdk.Client.Delete(&p) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +func (sdk *OneloginSDK) GetAuthServerScopes(id int, queryParams mod.Queryable) (interface{}, error) { + p, err := utl.BuildAPIPath(APIAuthPath, id, "scopes") + if err != nil { + return nil, err + } + resp, err := sdk.Client.Get(&p, queryParams) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +func (sdk *OneloginSDK) UpdateAuthServerScope(id, scopeID int, scope mod.Scope) (interface{}, error) { + p, err := utl.BuildAPIPath(APIAuthPath, id, "scopes", scopeID) + if err != nil { + return nil, err + } + resp, err := sdk.Client.Put(&p, scope) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +// Client App related endpoints + +func (sdk *OneloginSDK) CreateClientApp(id int, clientApp mod.ClientApp) (interface{}, error) { + p, err := utl.BuildAPIPath(APIAuthPath, id, "clients") + if err != nil { + return nil, err + } + resp, err := sdk.Client.Post(&p, clientApp) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +func (sdk *OneloginSDK) GetClientApps(id int) (interface{}, error) { + p, err := utl.BuildAPIPath(APIAuthPath, id, "clients") + if err != nil { + return nil, err + } + resp, err := sdk.Client.Get(&p, nil) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +func (sdk *OneloginSDK) DeleteClientApp(id, clientID int) (interface{}, error) { + p, err := utl.BuildAPIPath(APIAuthPath, id, "clients", clientID) + if err != nil { + return nil, err + } + resp, err := sdk.Client.Delete(&p) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +func (sdk *OneloginSDK) UpdateClientApp(id, clientID int, clientApp mod.ClientApp) (interface{}, error) { + p, err := utl.BuildAPIPath(APIAuthPath, id, "clients", clientID) + if err != nil { + return nil, err + } + resp, err := sdk.Client.Put(&p, clientApp) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} diff --git a/pkg/onelogin/apps.go b/pkg/onelogin/apps.go new file mode 100644 index 0000000..5fd4cbb --- /dev/null +++ b/pkg/onelogin/apps.go @@ -0,0 +1,151 @@ +package onelogin + +import ( + mod "github.com/onelogin/onelogin-go-sdk/internal/models" + utl "github.com/onelogin/onelogin-go-sdk/internal/utilities" +) + +const ( + AppPath string = "api/2/apps" +) + +func (sdk *OneloginSDK) CreateApp(app mod.App) (interface{}, error) { + p, err := utl.BuildAPIPath(AppPath) + if err != nil { + return nil, err + } + resp, err := sdk.Client.Post(&p, app) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) + +} + +// was ListApps +func (sdk *OneloginSDK) GetApps(queryParams mod.Queryable) (interface{}, error) { + p, err := utl.BuildAPIPath(AppPath) + if err != nil { + return nil, err + } + resp, err := sdk.Client.Get(&p, queryParams) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +func (sdk *OneloginSDK) GetAppByID(id int, queryParams mod.Queryable) (interface{}, error) { + p, err := utl.BuildAPIPath(AppPath, id) + if err != nil { + return nil, err + } + resp, err := sdk.Client.Get(&p, queryParams) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) + +} + +func (sdk *OneloginSDK) UpdateApp(id int, app mod.App) (interface{}, error) { + p, err := utl.BuildAPIPath(AppPath, id) + if err != nil { + return nil, err + } + resp, err := sdk.Client.Put(&p, app) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) + +} + +func (sdk *OneloginSDK) DeleteApp(id int) (interface{}, error) { + p, err := utl.BuildAPIPath(AppPath, id) + if err != nil { + return nil, err + } + resp, err := sdk.Client.Delete(&p) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) + +} + +func (sdk *OneloginSDK) CreateAppRule(id int, appRule mod.AppRule) (interface{}, error) { + p, err := utl.BuildAPIPath(AppPath, id) + if err != nil { + return nil, err + } + resp, err := sdk.Client.Post(&p, appRule) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) + +} + +func (sdk *OneloginSDK) GetAppRules(id int, queryParams mod.Queryable) (interface{}, error) { + p, err := utl.BuildAPIPath(AppPath, id) + if err != nil { + return nil, err + } + resp, err := sdk.Client.Get(&p, queryParams) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) + +} + +func (sdk *OneloginSDK) GetAppRuleByID(id, ruleID int, queryParams mod.Queryable) (interface{}, error) { + p, err := utl.BuildAPIPath(AppPath, id) + if err != nil { + return nil, err + } + resp, err := sdk.Client.Get(&p, queryParams) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) + +} + +func (sdk *OneloginSDK) UpdateAppRule(id, ruleID int, appRule mod.AppRule, queryParams map[string]string) (interface{}, error) { + p, err := utl.BuildAPIPath(AppPath, id, "rules", ruleID) + if err != nil { + return nil, err + } + resp, err := sdk.Client.Put(&p, appRule) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) + +} + +func (sdk *OneloginSDK) DeleteAppRule(id, ruleID int, queryParams map[string]string) (interface{}, error) { + p, err := utl.BuildAPIPath(AppPath, id, "rules", ruleID) + if err != nil { + return nil, err + } + resp, err := sdk.Client.Delete(&p) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +func (sdk *OneloginSDK) GetAppUsers(appID int) (interface{}, error) { + p, err := utl.BuildAPIPath(AppPath, appID, "users") + if err != nil { + return nil, err + } + resp, err := sdk.Client.Get(&p, nil) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} diff --git a/pkg/onelogin/groups.go b/pkg/onelogin/groups.go new file mode 100644 index 0000000..97e7ed4 --- /dev/null +++ b/pkg/onelogin/groups.go @@ -0,0 +1,28 @@ +package onelogin + +import utl "github.com/onelogin/onelogin-go-sdk/internal/utilities" + +const ( + GroupsPath = "api/1/groups" +) + +func (sdk *OneloginSDK) GetGroupByID(groupID int) (interface{}, error) { + p, err := utl.BuildAPIPath(GroupsPath, groupID) + if err != nil { + return nil, err + } + resp, err := sdk.Client.Get(&p, nil) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +func (sdk *OneloginSDK) GetGroups() (interface{}, error) { + p := GroupsPath + resp, err := sdk.Client.Get(&p, nil) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} diff --git a/pkg/onelogin/mfas.go b/pkg/onelogin/mfas.go new file mode 100644 index 0000000..7e69225 --- /dev/null +++ b/pkg/onelogin/mfas.go @@ -0,0 +1,101 @@ +package onelogin + +import ( + "github.com/onelogin/onelogin-go-sdk/internal/models" + utl "github.com/onelogin/onelogin-go-sdk/internal/utilities" +) + +const ( + MFAPath string = "api/2/mfa/users" +) + +// https:///api/2/mfa/users//factors +func (sdk *OneloginSDK) GetAvailableMFAFactors(userID int) (interface{}, error) { + p, err := utl.BuildAPIPath(MFAPath, userID, "factors") + if err != nil { + return nil, err + } + resp, err := sdk.Client.Get(&p, nil) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +// https:///api/2/mfa/users//registrations +func (sdk *OneloginSDK) EnrollMFAFactor(factor models.EnrollFactorRequest, userID int) (interface{}, error) { + p, err := utl.BuildAPIPath(MFAPath, userID, "registrations") + if err != nil { + return nil, err + } + resp, err := sdk.Client.Post(&p, factor) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +// https:///api/2/mfa/users//registrations/ +func (sdk *OneloginSDK) VerifyMFAEnrollment(userID, registrationID, otp int) (interface{}, error) { + p, err := utl.BuildAPIPath(MFAPath, userID, "registrations", registrationID) + if err != nil { + return nil, err + } + resp, err := sdk.Client.Put(&p, otp) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +// https:///api/2/mfa/users//verifications +func (sdk *OneloginSDK) ActivateMFAFactor(userID int, request models.ActivateFactorRequest) (interface{}, error) { + p, err := utl.BuildAPIPath(MFAPath, userID, "verifications") + if err != nil { + return nil, err + } + resp, err := sdk.Client.Post(&p, request) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +// https:///api/2/mfa/users//devices/ +func (sdk *OneloginSDK) RemoveMFAFactor(userID, deviceID int) (interface{}, error) { + p, err := utl.BuildAPIPath(MFAPath, userID, "devices", deviceID) + if err != nil { + return nil, err + } + resp, err := sdk.Client.Delete(&p) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +// https:///api/2/mfa/users//factors +func (sdk *OneloginSDK) GetEnrolledMFAFactors(userID int) (interface{}, error) { + p, err := utl.BuildAPIPath(MFAPath, userID, "factors") + if err != nil { + return nil, err + } + resp, err := sdk.Client.Get(&p, nil) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +// https:///api/2/mfa/users/:user_id/mfa_token +func (sdk *OneloginSDK) GenerateMFAToken(userID int, request models.GenerateMFATokenRequest) (interface{}, error) { + p, err := utl.BuildAPIPath(MFAPath, userID, "mfa_token") + if err != nil { + return nil, err + } + resp, err := sdk.Client.Post(&p, request) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} diff --git a/pkg/onelogin/onelogin.go b/pkg/onelogin/onelogin.go new file mode 100644 index 0000000..5b4dd5d --- /dev/null +++ b/pkg/onelogin/onelogin.go @@ -0,0 +1,57 @@ +package onelogin + +import ( + "github.com/onelogin/onelogin-go-sdk/internal/api" + olerror "github.com/onelogin/onelogin-go-sdk/internal/error" +) + +// OneloginSDK represents the Onelogin SDK. +type OneloginSDK struct { + Client *api.Client +} + +// NewOneloginSDK creates a new instance of the Onelogin SDK. +func NewOneloginSDK() (*OneloginSDK, error) { + client, err := api.NewClient() + if err != nil { + return nil, err + } + return &OneloginSDK{Client: client}, nil +} + +// GetToken performs the authentication process using the env credentials. +func (sdk *OneloginSDK) GetToken() (string, error) { + // Call the authenticator to perform the authentication process + accessTk, err := sdk.Client.Auth.GetToken() + if err != nil { + return "", olerror.NewSDKError("Access Token retrieval unsuccessful") + } + return accessTk, nil +} + +func (sdk *OneloginSDK) GenerateInviteLink(email string) (interface{}, error) { + p := "api/1/invites/get_invite_link" + resp, err := sdk.Client.Post(&p, email) + if err != nil { + return nil, err + } + return resp, nil +} + +func (sdk *OneloginSDK) ListConnectors() (interface{}, error) { + p := "api/2/connectors" + resp, err := sdk.Client.Get(&p, nil) + if err != nil { + return nil, err + } + return resp, nil +} + +func (sdk *OneloginSDK) SendInviteLink(email string) (interface{}, error) { + p := "api/1/invites/send_invite_link" + resp, err := sdk.Client.Post(&p, email) + if err != nil { + return nil, err + } + return resp, nil +} diff --git a/pkg/onelogin/privileges.go b/pkg/onelogin/privileges.go new file mode 100644 index 0000000..d8ae218 --- /dev/null +++ b/pkg/onelogin/privileges.go @@ -0,0 +1,142 @@ +package onelogin + +import ( + "github.com/onelogin/onelogin-go-sdk/internal/models" + utl "github.com/onelogin/onelogin-go-sdk/internal/utilities" +) + +const ( + PrivilegesPath string = "api/1/privileges" +) + +func (sdk *OneloginSDK) ListPrivileges() (interface{}, error) { + p, err := utl.BuildAPIPath(PrivilegesPath) + if err != nil { + return nil, err + } + resp, err := sdk.Client.Get(&p, nil) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +func (sdk *OneloginSDK) CreatePrivilege(privilege models.Privilege) (interface{}, error) { + p, err := utl.BuildAPIPath(PrivilegesPath) + if err != nil { + return nil, err + } + resp, err := sdk.Client.Post(&p, privilege) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +func (sdk *OneloginSDK) GetPrivilege(privilegeID int) (interface{}, error) { + p, err := utl.BuildAPIPath(PrivilegesPath, privilegeID) + if err != nil { + return nil, err + } + resp, err := sdk.Client.Get(&p, nil) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +func (sdk *OneloginSDK) DeletePrivilege(privilegeID int) (interface{}, error) { + p, err := utl.BuildAPIPath(PrivilegesPath, privilegeID) + if err != nil { + return nil, err + } + resp, err := sdk.Client.Delete(&p) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +func (sdk *OneloginSDK) UpdatePrivilege(privilegeID int) (interface{}, error) { + p, err := utl.BuildAPIPath(PrivilegesPath, privilegeID) + if err != nil { + return nil, err + } + resp, err := sdk.Client.Put(&p, nil) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +func (sdk *OneloginSDK) GetPrivilegeUsers(privilegeID int) (interface{}, error) { + p, err := utl.BuildAPIPath(PrivilegesPath, privilegeID, "users") + if err != nil { + return nil, err + } + resp, err := sdk.Client.Get(&p, nil) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +func (sdk *OneloginSDK) AssignUsersToPrivilege(privilegeID int) (interface{}, error) { + p, err := utl.BuildAPIPath(PrivilegesPath, privilegeID, "users") + if err != nil { + return nil, err + } + resp, err := sdk.Client.Put(&p, nil) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +func (sdk *OneloginSDK) RemovePrivilegeFromUser(privilegeID int, userID int) (interface{}, error) { + p, err := utl.BuildAPIPath(PrivilegesPath, privilegeID, "users", userID) + if err != nil { + return nil, err + } + resp, err := sdk.Client.Delete(&p) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +func (sdk *OneloginSDK) GetPrivilegeRoles(privilegeID int) (interface{}, error) { + p, err := utl.BuildAPIPath(PrivilegesPath, privilegeID, "roles") + if err != nil { + return nil, err + } + resp, err := sdk.Client.Get(&p, nil) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +func (sdk *OneloginSDK) AddPrivilegeToRole(privilegeID int, roleID int) (interface{}, error) { + p, err := utl.BuildAPIPath(PrivilegesPath, privilegeID, "roles", roleID) + if err != nil { + return nil, err + } + resp, err := sdk.Client.Put(&p, nil) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +func (sdk *OneloginSDK) DeleteRoleFromPrivilege(privilegeID int, roleID int) (interface{}, error) { + p, err := utl.BuildAPIPath(PrivilegesPath, privilegeID, "roles", roleID) + if err != nil { + return nil, err + } + resp, err := sdk.Client.Delete(&p) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} diff --git a/pkg/onelogin/roles.go b/pkg/onelogin/roles.go new file mode 100644 index 0000000..05d5d1c --- /dev/null +++ b/pkg/onelogin/roles.go @@ -0,0 +1,168 @@ +package onelogin + +import ( + mod "github.com/onelogin/onelogin-go-sdk/internal/models" + utl "github.com/onelogin/onelogin-go-sdk/internal/utilities" +) + +var ( + RolePath string = "api/2/roles" +) + +func (sdk *OneloginSDK) CreateRole(role *mod.Role) (interface{}, error) { + p, err := utl.BuildAPIPath(RolePath) + if err != nil { + return nil, err + } + resp, err := sdk.Client.Post(&p, role) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +// was ListRoles +func (sdk *OneloginSDK) GetRoles(queryParams mod.Queryable) (interface{}, error) { + p := RolePath + resp, err := sdk.Client.Get(&p, queryParams) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +func (sdk *OneloginSDK) GetRoleByID(id int, queryParams mod.Queryable) (interface{}, error) { + p, err := utl.BuildAPIPath(RolePath, id) + if err != nil { + return nil, err + } + resp, err := sdk.Client.Get(&p, queryParams) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +func (sdk *OneloginSDK) UpdateRole(id int, role mod.Role, queryParams map[string]string) (interface{}, error) { + p, err := utl.BuildAPIPath(RolePath, id) + if err != nil { + return nil, err + } + resp, err := sdk.Client.Put(&p, role) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +func (sdk *OneloginSDK) DeleteRole(id int, queryParams map[string]string) (interface{}, error) { + p, err := utl.BuildAPIPath(RolePath, id) + if err != nil { + return nil, err + } + resp, err := sdk.Client.Delete(&p) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +// was ListRoleUsers +func (sdk *OneloginSDK) GetRoleUsers(roleID int, queryParams mod.Queryable) (interface{}, error) { + p, err := utl.BuildAPIPath(RolePath, roleID, "users") + if err != nil { + return nil, err + } + resp, err := sdk.Client.Get(&p, queryParams) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +func (sdk *OneloginSDK) AddRoleUsers(roleID int) (interface{}, error) { + p, err := utl.BuildAPIPath(RolePath, roleID, "users") + if err != nil { + return nil, err + } + resp, err := sdk.Client.Put(&p, nil) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +// was removeRoleUsers +func (sdk *OneloginSDK) DeleteRoleUsers(roleID int, users []int) (interface{}, error) { + p, err := utl.BuildAPIPath(RolePath, roleID, "users") + if err != nil { + return nil, err + } + resp, err := sdk.Client.DeleteWithBody(&p, users) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +func (sdk *OneloginSDK) GetRoleAdmins(roleID int) (interface{}, error) { + p, err := utl.BuildAPIPath(RolePath, roleID, "admins") + if err != nil { + return nil, err + } + resp, err := sdk.Client.Get(&p, nil) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +func (sdk *OneloginSDK) AddRoleAdmins(roleID int) (interface{}, error) { + p, err := utl.BuildAPIPath(RolePath, roleID, "admins") + if err != nil { + return nil, err + } + resp, err := sdk.Client.Put(&p, nil) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +// was removeRoleAdmins +func (sdk *OneloginSDK) DeleteRoleAdmins(roleID int, admins []int) (interface{}, error) { + p, err := utl.BuildAPIPath(RolePath, roleID, "admins") + if err != nil { + return nil, err + } + resp, err := sdk.Client.DeleteWithBody(&p, admins) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +func (sdk *OneloginSDK) GetRoleApps(roleID int) (interface{}, error) { + p, err := utl.BuildAPIPath(RolePath, roleID, "apps") + if err != nil { + return nil, err + } + resp, err := sdk.Client.Get(&p, nil) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +// was setRoleApps +func (sdk *OneloginSDK) UpdateRoleApps(roleID int, apps []int) (interface{}, error) { + p, err := utl.BuildAPIPath(RolePath, roleID, "apps") + if err != nil { + return nil, err + } + resp, err := sdk.Client.Put(&p, apps) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} diff --git a/pkg/onelogin/saml.go b/pkg/onelogin/saml.go new file mode 100644 index 0000000..dd5c1a3 --- /dev/null +++ b/pkg/onelogin/saml.go @@ -0,0 +1,34 @@ +package onelogin + +import ( + "github.com/onelogin/onelogin-go-sdk/internal/models" + utl "github.com/onelogin/onelogin-go-sdk/internal/utilities" +) + +const ( + SAMLPath string = "api/2/saml_assertion" +) + +func (sdk *OneloginSDK) VerifyFactorSAML(request models.VerifyMFATokenRequest) (interface{}, error) { + p, err := utl.BuildAPIPath(SAMLPath, "verify_factor") + if err != nil { + return nil, err + } + resp, err := sdk.Client.Post(&p, request) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +func (sdk *OneloginSDK) GenerateSAMLAssertion(request models.GenerateSAMLTokenRequest) (interface{}, error) { + p, err := utl.BuildAPIPath(SAMLPath) + if err != nil { + return nil, err + } + resp, err := sdk.Client.Post(&p, request) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} diff --git a/pkg/onelogin/smart_hooks.go b/pkg/onelogin/smart_hooks.go new file mode 100644 index 0000000..244be9d --- /dev/null +++ b/pkg/onelogin/smart_hooks.go @@ -0,0 +1,150 @@ +package onelogin + +import ( + "github.com/onelogin/onelogin-go-sdk/internal/models" + utl "github.com/onelogin/onelogin-go-sdk/internal/utilities" +) + +const ( + SmartHooksPath string = "api/2/hooks" +) + +func (sdk *OneloginSDK) CreateHook(hook models.SmartHook) (interface{}, error) { + p, err := utl.BuildAPIPath(SmartHooksPath) + if err != nil { + return nil, err + } + resp, err := sdk.Client.Post(&p, hook) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +func (sdk *OneloginSDK) DeleteHook(hookID int) (interface{}, error) { + p, err := utl.BuildAPIPath(SmartHooksPath, hookID) + if err != nil { + return nil, err + } + resp, err := sdk.Client.Delete(&p) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +func (sdk *OneloginSDK) GetHook(hookID int, query models.Queryable) (interface{}, error) { + p, err := utl.BuildAPIPath(SmartHooksPath, hookID) + if err != nil { + return nil, err + } + resp, err := sdk.Client.Get(&p, query) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +func (sdk *OneloginSDK) ListHooks(query models.Queryable) (interface{}, error) { + p, err := utl.BuildAPIPath(SmartHooksPath) + if err != nil { + return nil, err + } + resp, err := sdk.Client.Get(&p, query) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +func (sdk *OneloginSDK) UpdateSmartHook(hookID int, hook models.SmartHook) (interface{}, error) { + p, err := utl.BuildAPIPath(SmartHooksPath, hookID) + if err != nil { + return nil, err + } + resp, err := sdk.Client.Put(&p, hook) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +func (sdk *OneloginSDK) ListEnvironmentVariables() (interface{}, error) { + p, err := utl.BuildAPIPath(SmartHooksPath, "envs") + if err != nil { + return nil, err + } + resp, err := sdk.Client.Get(&p, nil) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +func (sdk *OneloginSDK) CreateEnvironmentVariable(name, value string) (interface{}, error) { + p, err := utl.BuildAPIPath(SmartHooksPath, "envs") + if err != nil { + return nil, err + } + envVar := map[string]string{ + "name": name, + "value": value, + } + resp, err := sdk.Client.Post(&p, envVar) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +func (sdk *OneloginSDK) GetEnvironmentVariable(envVarID int) (interface{}, error) { + p, err := utl.BuildAPIPath(SmartHooksPath, "envs", envVarID) + if err != nil { + return nil, err + } + resp, err := sdk.Client.Get(&p, nil) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +func (sdk *OneloginSDK) UpdateEnvironmentVariable(envVarID int, name, value string) (interface{}, error) { + p, err := utl.BuildAPIPath(SmartHooksPath, "envs", envVarID) + if err != nil { + return nil, err + } + envVar := map[string]string{ + "name": name, + "value": value, + } + resp, err := sdk.Client.Put(&p, envVar) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +func (sdk *OneloginSDK) DeleteEnvironmentVariable(envVarID int) (interface{}, error) { + p, err := utl.BuildAPIPath(SmartHooksPath, "envs", envVarID) + if err != nil { + return nil, err + } + resp, err := sdk.Client.Delete(&p) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +func (sdk *OneloginSDK) GetHookLogs(hookID int, query models.Queryable) (interface{}, error) { + p, err := utl.BuildAPIPath(SmartHooksPath, hookID, "logs") + if err != nil { + return nil, err + } + resp, err := sdk.Client.Get(&p, query) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} diff --git a/pkg/onelogin/user_mappings.go b/pkg/onelogin/user_mappings.go new file mode 100644 index 0000000..dc71d85 --- /dev/null +++ b/pkg/onelogin/user_mappings.go @@ -0,0 +1,155 @@ +package onelogin + +import ( + mod "github.com/onelogin/onelogin-go-sdk/internal/models" + utl "github.com/onelogin/onelogin-go-sdk/internal/utilities" +) + +const ( + MappingsPath string = "api/2/mappings" +) + +func (sdk *OneloginSDK) ListMappings() (interface{}, error) { + p, err := utl.BuildAPIPath(MappingsPath) + if err != nil { + return nil, err + } + resp, err := sdk.Client.Get(&p, nil) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +func (sdk *OneloginSDK) CreateMapping(mapping mod.UserMapping) (interface{}, error) { + p, err := utl.BuildAPIPath(MappingsPath) + if err != nil { + return nil, err + } + resp, err := sdk.Client.Post(&p, mapping) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +func (sdk *OneloginSDK) DeleteMapping(mappingID int) (interface{}, error) { + p, err := utl.BuildAPIPath(MappingsPath, mappingID) + if err != nil { + return nil, err + } + resp, err := sdk.Client.Delete(&p) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +func (sdk *OneloginSDK) GetMapping(mappingID int) (interface{}, error) { + p, err := utl.BuildAPIPath(MappingsPath, mappingID) + if err != nil { + return nil, err + } + resp, err := sdk.Client.Get(&p, nil) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +func (sdk *OneloginSDK) ListActions() (interface{}, error) { + p, err := utl.BuildAPIPath(MappingsPath, "actions") + if err != nil { + return nil, err + } + resp, err := sdk.Client.Get(&p, nil) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +func (sdk *OneloginSDK) UpdateMapping(mappingID int) (interface{}, error) { + p, err := utl.BuildAPIPath(MappingsPath, mappingID) + if err != nil { + return nil, err + } + resp, err := sdk.Client.Put(&p, nil) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +func (sdk *OneloginSDK) BulkSortMappings(mappingIDs []int) (interface{}, error) { + p, err := utl.BuildAPIPath(MappingsPath, "bulk_sort") + if err != nil { + return nil, err + } + resp, err := sdk.Client.Put(&p, mappingIDs) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +func (sdk *OneloginSDK) ListActionValues(actionValue string) (interface{}, error) { + p, err := utl.BuildAPIPath(MappingsPath, "actions", actionValue, "values") + if err != nil { + return nil, err + } + resp, err := sdk.Client.Get(&p, nil) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +func (sdk *OneloginSDK) ListConditionValues(conditionValue string) (interface{}, error) { + p, err := utl.BuildAPIPath(MappingsPath, "conditions", conditionValue, "values") + if err != nil { + return nil, err + } + resp, err := sdk.Client.Get(&p, nil) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +func (sdk *OneloginSDK) ListConditionOperators(conditionValue string) (interface{}, error) { + p, err := utl.BuildAPIPath(MappingsPath, "conditions", conditionValue, "operators") + if err != nil { + return nil, err + } + resp, err := sdk.Client.Get(&p, nil) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +func (sdk *OneloginSDK) DryrunMapping(mappingID int) (interface{}, error) { + p, err := utl.BuildAPIPath(MappingsPath, mappingID, "dryrun") + if err != nil { + return nil, err + } + resp, err := sdk.Client.Post(&p, nil) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +// https:///api/2/mappings/conditions +func (sdk *OneloginSDK) ListConditions() (interface{}, error) { + p, err := utl.BuildAPIPath(MappingsPath, "conditions") + if err != nil { + return nil, err + } + resp, err := sdk.Client.Get(&p, nil) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} diff --git a/pkg/onelogin/users.go b/pkg/onelogin/users.go new file mode 100644 index 0000000..a3cd93c --- /dev/null +++ b/pkg/onelogin/users.go @@ -0,0 +1,225 @@ +package onelogin + +import ( + "bytes" + "encoding/json" + "errors" + + mod "github.com/onelogin/onelogin-go-sdk/internal/models" + utl "github.com/onelogin/onelogin-go-sdk/internal/utilities" +) + +const ( + UserPathV1 string = "api/1/users" + UserPathV2 string = "api/2/users" +) + +// Users V2 +func (sdk *OneloginSDK) CreateUser(user mod.User) (interface{}, error) { + p, err := utl.BuildAPIPath(UserPathV2) + if err != nil { + return nil, err + } + + resp, err := sdk.Client.Post(&p, user) + if err != nil { + return nil, err + } + + return utl.CheckHTTPResponse(resp) +} + +// was ListUsers +func (sdk *OneloginSDK) GetUsers(query mod.Queryable) (interface{}, error) { + p, err := utl.BuildAPIPath(UserPathV2) + if err != nil { + return nil, err + } + + // Validate query parameters + validators := query.GetKeyValidators() + if !utl.ValidateQueryParams(query, validators) { + return nil, errors.New("invalid query parameters") + } + + resp, err := sdk.Client.Get(&p, query) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +func (sdk *OneloginSDK) GetUserByID(id int, queryParams mod.Queryable) (interface{}, error) { + p, err := utl.BuildAPIPath(UserPathV2, id) + if err != nil { + return nil, err + } + resp, err := sdk.Client.Get(&p, queryParams) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +func (sdk *OneloginSDK) GetUserApps(id int, queryParams mod.Queryable) (interface{}, error) { + p, err := utl.BuildAPIPath(UserPathV2, id, "apps") + if err != nil { + return nil, err + } + resp, err := sdk.Client.Get(&p, queryParams) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +func (sdk *OneloginSDK) UpdateUser(id int, user mod.User) (interface{}, error) { + p, err := utl.BuildAPIPath(UserPathV2, id) + if err != nil { + return nil, err + } + resp, err := sdk.Client.Put(&p, user) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +func (sdk *OneloginSDK) DeleteUser(id int) (interface{}, error) { + p, err := utl.BuildAPIPath(UserPathV2, id) + if err != nil { + return nil, err + } + resp, err := sdk.Client.Delete(&p) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +// Users V1 +func (sdk *OneloginSDK) UpdatePasswordSecure(id int) (interface{}, error) { + p, err := utl.BuildAPIPath(UserPathV1, "set_password_using_salt", id) + if err != nil { + return nil, err + } + resp, err := sdk.Client.Put(&p, nil) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +func (sdk *OneloginSDK) UpdatePasswordInsecure(id int) (interface{}, error) { + p, err := utl.BuildAPIPath(UserPathV1, "set_password_clear", id) + if err != nil { + return nil, err + } + resp, err := sdk.Client.Put(&p, nil) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +func (sdk *OneloginSDK) LockUserAccount(id int) (interface{}, error) { + p, err := utl.BuildAPIPath(UserPathV1, id, "lock_user") + if err != nil { + return nil, err + } + resp, err := sdk.Client.Put(&p, nil) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +func (sdk *OneloginSDK) GetUserRoles(id int) (interface{}, error) { + p, err := utl.BuildAPIPath(UserPathV1, id, "roles") + if err != nil { + return nil, err + } + resp, err := sdk.Client.Get(&p, nil) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +func (sdk *OneloginSDK) LogOutUser(userID int) (interface{}, error) { + p, err := utl.BuildAPIPath(UserPathV1, userID, "logout") + if err != nil { + return nil, err + } + resp, err := sdk.Client.Put(&p, nil) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +func (sdk *OneloginSDK) AssignRolesToUser(userID int, roles []int) (interface{}, error) { + p, err := utl.BuildAPIPath(UserPathV1, userID, "add_roles") + if err != nil { + return nil, err + } + payload := map[string][]int{"role_id_array": roles} + payloadBytes, err := json.Marshal(payload) + if err != nil { + return nil, err + } + resp, err := sdk.Client.Put(&p, bytes.NewBuffer(payloadBytes)) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +func (sdk *OneloginSDK) SetUserState(userID, state int) (interface{}, error) { + p, err := utl.BuildAPIPath(UserPathV1, userID, "set_state") + if err != nil { + return nil, err + } + payload := map[string]int{"state": state} + resp, err := sdk.Client.Put(&p, payload) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +func (sdk *OneloginSDK) RemoveUserRole(userID int) (interface{}, error) { + p, err := utl.BuildAPIPath(UserPathV1, userID, "remove_roles") + if err != nil { + return nil, err + } + resp, err := sdk.Client.Put(&p, nil) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +func (sdk *OneloginSDK) GetCustomAttributes() (interface{}, error) { + p, err := utl.BuildAPIPath(UserPathV1, "custom_attributes") + if err != nil { + return nil, err + } + resp, err := sdk.Client.Get(&p, nil) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} + +func (sdk *OneloginSDK) SetCustomAttributes(userID int, attr interface{}) (interface{}, error) { + p, err := utl.BuildAPIPath(UserPathV1, userID, "set_custom_attributes") + if err != nil { + return nil, err + } + resp, err := sdk.Client.Put(&p, attr) + if err != nil { + return nil, err + } + return utl.CheckHTTPResponse(resp) +} diff --git a/readme.md b/readme.md index 0221dab..19edfe6 100644 --- a/readme.md +++ b/readme.md @@ -1,479 +1,118 @@ -# Go API client for onelogin -OpenAPI Specification for OneLogin +# Onelogin Go SDK -## Overview +This is the Onelogin SDK, a Go package that provides a convenient interface for interacting with Onelogin's API. The SDK simplifies the integration process by providing developers an easy-to-use tool for managing authentication, making API requests, and handling responses. -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. +## Features -- API version: 3.1.1 -- Package version: 3.1.0 -- Build package: org.openapitools.codegen.languages.GoClientCodegen -For more information, please visit [https://support.onelogin.com](https://support.onelogin.com) +- **Authentication**: Obtain and revoke access tokens for authenticating API requests using environment variables. +- **API Requests**: Construct and send requests to Onelogin's API. +- **Response Handling**: Parse and handle API responses. +- **Error Management**: Handle and recover from errors effectively. +- **Data Models**: Represent Onelogin entities and resources. +- **Utilities**: Provide utility functions and helper methods. -## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/oauth2 -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: - -```golang -import onelogin "github.com/onelogin/onelogin-go-sdk" -``` - -To use a proxy, set the environment variable `HTTP_PROXY`: - -```golang -os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port") -``` -## Configuration of Server URL +## Supported APIs +- [API Authorization](https://developers.onelogin.com/api-docs/2/api-authorization/overview) +- [Apps](https://developers.onelogin.com/api-docs/2/apps) +- [App Rules](https://developers.onelogin.com/api-docs/2/app-rules) +- [Groups](https://developers.onelogin.com/api-docs/2/groups) +- [Privileges](https://developers.onelogin.com/api-docs/1/privileges) +- [Roles](https://developers.onelogin.com/api-docs/2/roles) +- [SAML Assertions](https://developers.onelogin.com/api-docs/2/saml-assertions) +- [Smart Hooks](https://developers.onelogin.com/api-docs/2/smart-hooks) +- [Users](https://developers.onelogin.com/api-docs/2/users) +- [User Mappings](https://developers.onelogin.com/api-docs/2/user-mappings) -Default configuration comes with `Servers` field that contains server objects as defined in the OpenAPI specification. +## Partially Support APIs +- [MFA](https://developers.onelogin.com/api-docs/2/multi-factor-authentication) -### Select Server Configuration - -For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`. - -```golang -ctx := context.WithValue(context.Background(), onelogin.ContextServerIndex, 1) -``` - -### Templated Server URL - -Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`. - -```golang -ctx := context.WithValue(context.Background(), onelogin.ContextServerVariables, map[string]string{ - "basePath": "v2", -}) -``` - -Note, enum values are always validated and all unused variables are silently ignored. - -### URLs Configuration per Operation +## Installation -Each operation can use different server URL defined using `OperationServers` map in the `Configuration`. -An operation is uniquely identified by `"{classname}Service.{nickname}"` string. -Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps. +To use the Onelogin SDK in your Go project, you need to have Go installed and set up. Then, you can install the SDK using the `go get` command: -```golang -ctx := context.WithValue(context.Background(), onelogin.ContextOperationServerIndices, map[string]int{ - "{classname}Service.{nickname}": 2, -}) -ctx = context.WithValue(context.Background(), onelogin.ContextOperationServerVariables, map[string]map[string]string{ - "{classname}Service.{nickname}": { - "port": "8443", - }, -}) +```shell +go get github.com/onelogin/onelogin-go-sdk ``` -## Documentation for API Endpoints - -All URIs are relative to *https://your-api-subdomain.onelogin.com* - -| Class | Method | HTTP request | Description | -| -------------------------------- | ---------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ | ------------------------------------------ | -| *APIAuthClaimsApi* | [**CreateAuthClaim**](docs/APIAuthClaimsApi.md#createauthclaim) | **Post** /api/2/api_authorizations/{api_auth_id}/claims | Create Api Auth Server Claim | -| *APIAuthClaimsApi* | [**DeleteAuthClaim**](docs/APIAuthClaimsApi.md#deleteauthclaim) | **Delete** /api/2/api_authorizations/{api_auth_id}/claims/{claim_id} | Delete Api Auth Server Claim | -| *APIAuthClaimsApi* | [**GetAuthclaims**](docs/APIAuthClaimsApi.md#getauthclaims) | **Get** /api/2/api_authorizations/{api_auth_id}/claims | Get Api Auth Server claims | -| *APIAuthClaimsApi* | [**UpdateClaim**](docs/APIAuthClaimsApi.md#updateclaim) | **Put** /api/2/api_authorizations/{api_auth_id}/claims/{claim_id} | Update Api Auth Server Claim | -| *APIAuthClientAppsApi* | [**AddClientApp**](docs/APIAuthClientAppsApi.md#addclientapp) | **Post** /api/2/api_authorizations/{api_auth_id}/clients | Add Client App | -| *APIAuthClientAppsApi* | [**DeleteClientApp**](docs/APIAuthClientAppsApi.md#deleteclientapp) | **Delete** /api/2/api_authorizations/{api_auth_id}/clients/{client_app_id} | Remove Client App | -| *APIAuthClientAppsApi* | [**ListClientApps**](docs/APIAuthClientAppsApi.md#listclientapps) | **Get** /api/2/api_authorizations/{api_auth_id}/clients | List Clients Apps | -| *APIAuthClientAppsApi* | [**UpdateClientApp**](docs/APIAuthClientAppsApi.md#updateclientapp) | **Put** /api/2/api_authorizations/{api_auth_id}/clients/{client_app_id} | Update Client App | -| *APIAuthScopesApi* | [**CreateScope**](docs/APIAuthScopesApi.md#createscope) | **Post** /api/2/api_authorizations/{api_auth_id}/scopes | Create Api Auth Server Scope | -| *APIAuthScopesApi* | [**DeleteScope**](docs/APIAuthScopesApi.md#deletescope) | **Delete** /api/2/api_authorizations/{api_auth_id}/scopes/{scope_id} | Delete Api Auth Server Scope | -| *APIAuthScopesApi* | [**GetScopes**](docs/APIAuthScopesApi.md#getscopes) | **Get** /api/2/api_authorizations/{api_auth_id}/scopes | Get Api Auth Server Scopes | -| *APIAuthScopesApi* | [**UpdateScope**](docs/APIAuthScopesApi.md#updatescope) | **Put** /api/2/api_authorizations/{api_auth_id}/scopes/{scope_id} | Update Api Auth Server Scope | -| *APIAuthorizationServerApi* | [**CreateAuthServer**](docs/APIAuthorizationServerApi.md#createauthserver) | **Post** /api/2/api_authorizations | Create Api Auth Server | -| *APIAuthorizationServerApi* | [**DeleteAuthServer**](docs/APIAuthorizationServerApi.md#deleteauthserver) | **Delete** /api/2/api_authorizations/{api_auth_id} | Delete Api Auth Server | -| *APIAuthorizationServerApi* | [**GetAuthServer**](docs/APIAuthorizationServerApi.md#getauthserver) | **Get** /api/2/api_authorizations/{api_auth_id} | Get Api Auth Server | -| *APIAuthorizationServerApi* | [**ListAuthServers**](docs/APIAuthorizationServerApi.md#listauthservers) | **Get** /api/2/api_authorizations | List Api Auth Servers | -| *APIAuthorizationServerApi* | [**UpdateAuthServer**](docs/APIAuthorizationServerApi.md#updateauthserver) | **Put** /api/2/api_authorizations/{api_auth_id} | Update Api Auth Server | -| *AppRulesApi* | [**CreateAppRule**](docs/AppRulesApi.md#createapprule) | **Post** /api/2/apps/{app_id}/rules | -| *AppRulesApi* | [**DeleteRule**](docs/AppRulesApi.md#deleterule) | **Delete** /api/2/apps/{app_id}/rules/{rule_id} | Delete Rule | -| *AppRulesApi* | [**GetAppRule**](docs/AppRulesApi.md#getapprule) | **Get** /api/2/apps/{app_id}/rules/{rule_id} | Get Rule | -| *AppRulesApi* | [**ListActionValies**](docs/AppRulesApi.md#listactionvalies) | **Get** /api/2/apps/{app_id}/rules/actions/{rule_action_value}/values | List Actions Values | -| *AppRulesApi* | [**ListActions**](docs/AppRulesApi.md#listactions) | **Get** /api/2/apps/{app_id}/rules/actions | List Actions | -| *AppRulesApi* | [**ListAppRules**](docs/AppRulesApi.md#listapprules) | **Get** /api/2/apps/{app_id}/rules | List Rules | -| *AppRulesApi* | [**ListConditionOperators**](docs/AppRulesApi.md#listconditionoperators) | **Get** /api/2/apps/{app_id}/rules/conditions/{rule_condition_value}/operators | List Conditions Operators | -| *AppRulesApi* | [**ListConditionValues**](docs/AppRulesApi.md#listconditionvalues) | **Get** /api/2/apps/{app_id}/rules/conditions/{rule_condition_value}/values | List Conditions Values | -| *AppRulesApi* | [**ListConditions**](docs/AppRulesApi.md#listconditions) | **Get** /api/2/apps/{app_id}/rules/conditions | List Conditions | -| *AppRulesApi* | [**SortAppRules**](docs/AppRulesApi.md#sortapprules) | **Put** /api/2/apps/{app_id}/rules/sort | Bulk Sort | -| *AppRulesApi* | [**UpdateAppRule**](docs/AppRulesApi.md#updateapprule) | **Put** /api/2/apps/{app_id}/rules/{rule_id} | Update Rule | -| *AppsApi* | [**CreateApp**](docs/AppsApi.md#createapp) | **Post** /api/2/apps | Create App | -| *AppsApi* | [**DeleteApp**](docs/AppsApi.md#deleteapp) | **Delete** /api/2/apps/{app_id} | Delete App | -| *AppsApi* | [**DeleteAppParameter**](docs/AppsApi.md#deleteappparameter) | **Delete** /api/2/apps/{app_id}/parameters/{parameter_id} | Delete Parameter from App | -| *AppsApi* | [**GetApp**](docs/AppsApi.md#getapp) | **Get** /api/2/apps/{app_id} | Get App | -| *AppsApi* | [**GetAppUsers**](docs/AppsApi.md#getappusers) | **Get** /api/2/apps/{app_id}/users | Get App Users | -| *AppsApi* | [**ListApps**](docs/AppsApi.md#listapps) | **Get** /api/2/apps | List Apps | -| *AppsApi* | [**ListConnectors**](docs/AppsApi.md#listconnectors) | **Get** /api/2/connectors | List Connectors | -| *AppsApi* | [**UpdateApp**](docs/AppsApi.md#updateapp) | **Put** /api/2/apps/{app_id} | Update App | -| *BrandingServiceApi* | [**CreateBrand**](docs/BrandingServiceApi.md#createbrand) | **Post** /api/2/branding/brands | Create Brand | -| *BrandingServiceApi* | [**DeleteBrand**](docs/BrandingServiceApi.md#deletebrand) | **Delete** /api/2/branding/brands/{brand_id} | Delete Brand | -| *BrandingServiceApi* | [**GetBrand**](docs/BrandingServiceApi.md#getbrand) | **Get** /api/2/branding/brands/{brand_id} | Get Brand | -| *BrandingServiceApi* | [**GetBrandApps**](docs/BrandingServiceApi.md#getbrandapps) | **Get** /api/2/branding/brands/{brand_id}/apps | Get Brand Apps | -| *BrandingServiceApi* | [**ListBrands**](docs/BrandingServiceApi.md#listbrands) | **Get** /api/2/branding/brands | List Account Brands | -| *BrandingServiceApi* | [**UpdateBrand**](docs/BrandingServiceApi.md#updatebrand) | **Put** /api/2/branding/brands/{brand_id} | Update Brand | -| *BrandingServiceSMTPApi* | [**DeleteEmailSettings**](docs/BrandingServiceSMTPApi.md#deleteemailsettings) | **Delete** /api/2/branding/email_settings | Delete Custom Email Settings | -| *BrandingServiceSMTPApi* | [**GetEmailSettings**](docs/BrandingServiceSMTPApi.md#getemailsettings) | **Get** /api/2/branding/email_settings | Get Email Settings | -| *BrandingServiceSMTPApi* | [**UpdateEmailSettings**](docs/BrandingServiceSMTPApi.md#updateemailsettings) | **Put** /api/2/branding/email_settings | Update Email Settings | -| *BrandingServiceTemplatesApi* | [**CreateMessageTemplate**](docs/BrandingServiceTemplatesApi.md#createmessagetemplate) | **Post** /api/2/branding/brands/{brand_id}/templates | Create Message Template | -| *BrandingServiceTemplatesApi* | [**DeleteMessageTemplate**](docs/BrandingServiceTemplatesApi.md#deletemessagetemplate) | **Delete** /api/2/branding/brands/{brand_id}/templates/{template_id} | Delete Message Template | -| *BrandingServiceTemplatesApi* | [**GetMasterByType**](docs/BrandingServiceTemplatesApi.md#getmasterbytype) | **Get** /api/2/branding/brands/master/templates/{template_type} | Get Master Template by Type | -| *BrandingServiceTemplatesApi* | [**GetMessageTemplateById**](docs/BrandingServiceTemplatesApi.md#getmessagetemplatebyid) | **Get** /api/2/branding/brands/{brand_id}/templates/{template_id} | Get Message Template | -| *BrandingServiceTemplatesApi* | [**GetTemplateByLocale**](docs/BrandingServiceTemplatesApi.md#gettemplatebylocale) | **Get** /api/2/branding/brands/{brand_id}/templates/{template_type}/{locale} | Get Template by Type & Locale | -| *BrandingServiceTemplatesApi* | [**ListMessageTemplates**](docs/BrandingServiceTemplatesApi.md#listmessagetemplates) | **Get** /api/2/branding/brands/{brand_id}/templates | List Message Templates | -| *BrandingServiceTemplatesApi* | [**UpdateMessageTemplateById**](docs/BrandingServiceTemplatesApi.md#updatemessagetemplatebyid) | **Put** /api/2/branding/brands/{brand_id}/templates/{template_id} | Update Message Template | -| *BrandingServiceTemplatesApi* | [**UpdateTemplateByLocale**](docs/BrandingServiceTemplatesApi.md#updatetemplatebylocale) | **Put** /api/2/branding/brands/{brand_id}/templates/{template_type}/{locale} | Update Template by Type & Locale | -| *EventsApi* | [**GetEventById**](docs/EventsApi.md#geteventbyid) | **Get** /api/1/events/{event_id} | Get Event by ID | -| *EventsApi* | [**GetEventTypes**](docs/EventsApi.md#geteventtypes) | **Get** /api/1/events/types | Get Event Types | -| *EventsApi* | [**GetEvents**](docs/EventsApi.md#getevents) | **Get** /api/1/events | Get Events | -| *GroupsApi* | [**GetGroupById**](docs/GroupsApi.md#getgroupbyid) | **Get** /api/1/groups/{group_id} | Get Group by ID | -| *GroupsApi* | [**GetGroups**](docs/GroupsApi.md#getgroups) | **Get** /api/1/groups | Get Groups | -| *InviteLinksApi* | [**GetInviteLink**](docs/InviteLinksApi.md#getinvitelink) | **Post** /api/1/invites/get_invite_link | Generate Invite Link | -| *InviteLinksApi* | [**SendInviteLink**](docs/InviteLinksApi.md#sendinvitelink) | **Post** /api/1/invites/send_invite_link | Send Invite Link | -| *MultiFactorAuthenticationApi* | [**CreateDeviceVerification**](docs/MultiFactorAuthenticationApi.md#createdeviceverification) | **Post** /api/2/mfa/users/{user_id}/verifications | Create Device Verification | -| *MultiFactorAuthenticationApi* | [**CreateFactorRegistration**](docs/MultiFactorAuthenticationApi.md#createfactorregistration) | **Post** /api/2/mfa/users/{user_id}/registrations | Create Factor Registration | -| *MultiFactorAuthenticationApi* | [**DeleteEnrolledFactor**](docs/MultiFactorAuthenticationApi.md#deleteenrolledfactor) | **Delete** /api/2/mfa/users/{user_id}/devices/{device_id} | Delete Enrolled Factor | -| *MultiFactorAuthenticationApi* | [**GenerateOTP**](docs/MultiFactorAuthenticationApi.md#generateotp) | **Post** /api/2/mfa/users/{user_id}/mfa_token | Generate MFA token | -| *MultiFactorAuthenticationApi* | [**GetAuthFactors**](docs/MultiFactorAuthenticationApi.md#getauthfactors) | **Get** /api/2/mfa/users/{user_id}/factors | Get User Factors | -| *MultiFactorAuthenticationApi* | [**GetAuthenticationDevices**](docs/MultiFactorAuthenticationApi.md#getauthenticationdevices) | **Get** /api/2/mfa/users/{user_id}/devices | Get User Devices | -| *MultiFactorAuthenticationApi* | [**GetUserRegistration**](docs/MultiFactorAuthenticationApi.md#getuserregistration) | **Get** /api/2/mfa/users/{user_id}/registrations/{registration_id} | Get User Registration | -| *MultiFactorAuthenticationApi* | [**GetUserVerification**](docs/MultiFactorAuthenticationApi.md#getuserverification) | **Get** /api/2/mfa/users/{user_id}/verifications/{verification_id} | Get User Verification | -| *MultiFactorAuthenticationApi* | [**VerifyUserRegistration**](docs/MultiFactorAuthenticationApi.md#verifyuserregistration) | **Put** /api/2/mfa/users/{user_id}/registrations/{registration_id} | Verify User Registration | -| *MultiFactorAuthenticationApi* | [**VerifyUserVerification**](docs/MultiFactorAuthenticationApi.md#verifyuserverification) | **Put** /api/2/mfa/users/{user_id}/verifications/{verification_id} | Verify User Verification | -| *MultiFactorAuthenticationV1Api* | [**ActivateMfaFactors**](docs/MultiFactorAuthenticationV1Api.md#activatemfafactors) | **Post** /api/1/users/{user_id}/otp_devices/{device_id}/trigger | Activate a Factor | -| *MultiFactorAuthenticationV1Api* | [**EnrollMfaFactor**](docs/MultiFactorAuthenticationV1Api.md#enrollmfafactor) | **Post** /api/1/users/{user_id}/otp_devices | Enroll a Factor | -| *MultiFactorAuthenticationV1Api* | [**GenerateMFAtoken**](docs/MultiFactorAuthenticationV1Api.md#generatemfatoken) | **Post** /api/1/users/{user_id}/mfa_token | Generate Temp MFA Token | -| *MultiFactorAuthenticationV1Api* | [**GetEnrolledFactors**](docs/MultiFactorAuthenticationV1Api.md#getenrolledfactors) | **Get** /api/1/users/{user_id}/otp_devices | Get Enrolled Factors | -| *MultiFactorAuthenticationV1Api* | [**GetMFAFactors**](docs/MultiFactorAuthenticationV1Api.md#getmfafactors) | **Get** /api/1/users/{user_id}/auth_factor | Get Available Factors | -| *MultiFactorAuthenticationV1Api* | [**RemoveMfaFactors**](docs/MultiFactorAuthenticationV1Api.md#removemfafactors) | **Delete** /api/1/users/{user_id}/otp_devices/{device_id} | Remove an Enrolled Factor | -| *MultiFactorAuthenticationV1Api* | [**VerifyMfaFactor**](docs/MultiFactorAuthenticationV1Api.md#verifymfafactor) | **Post** /api/1/users/{user_id}/otp_devices/{device_id}/verify | Verify a Factor | -| *OAuth2Api* | [**GenerateToken**](docs/OAuth2Api.md#generatetoken) | **Post** /auth/oauth2/v2/token | Generate Token | -| *OAuth2Api* | [**GetRateLimit**](docs/OAuth2Api.md#getratelimit) | **Get** /auth/rate_limit | Get Rate Limit | -| *OAuth2Api* | [**RevokeTokens**](docs/OAuth2Api.md#revoketokens) | **Post** /auth/oauth2/revoke | Revoke Tokens | -| *PrivilegesApi* | [**AddPrivilegeToRole**](docs/PrivilegesApi.md#addprivilegetorole) | **Post** /api/1/privileges/{privilege_id}/roles | Assign a Privilege to Roles | -| *PrivilegesApi* | [**AssignUsersToPrivilege**](docs/PrivilegesApi.md#assignuserstoprivilege) | **Post** /api/1/privileges/{privilege_id}/users | Assign Users to a Privilege | -| *PrivilegesApi* | [**CreatePrivilege**](docs/PrivilegesApi.md#createprivilege) | **Post** /api/1/privileges | Create a Privilege | -| *PrivilegesApi* | [**DeletePrivilege**](docs/PrivilegesApi.md#deleteprivilege) | **Delete** /api/1/privileges/{privilege_id} | Delete a Privilege | -| *PrivilegesApi* | [**DeleteRoleFromPrivilege**](docs/PrivilegesApi.md#deleterolefromprivilege) | **Delete** /api/1/privileges/{privilege_id}/roles/{role_id} | Remove a Privilege from a Role | -| *PrivilegesApi* | [**GetAssignedUser**](docs/PrivilegesApi.md#getassigneduser) | **Get** /api/1/privileges/{privilege_id}/users | Get Users assigned to a Privilege | -| *PrivilegesApi* | [**GetPrivilege**](docs/PrivilegesApi.md#getprivilege) | **Get** /api/1/privileges/{privilege_id} | Get a Privilege | -| *PrivilegesApi* | [**ListPrivelegeRoles**](docs/PrivilegesApi.md#listprivelegeroles) | **Get** /api/1/privileges/{privilege_id}/roles | Get Roles assigned to Privilege | -| *PrivilegesApi* | [**ListPriveleges**](docs/PrivilegesApi.md#listpriveleges) | **Get** /api/1/privileges | List Privileges | -| *PrivilegesApi* | [**RemoveUserFromPrivilege**](docs/PrivilegesApi.md#removeuserfromprivilege) | **Delete** /api/1/privileges/{privilege_id}/users/{user_id} | Remove a Privilege from Users | -| *PrivilegesApi* | [**UpdatePrivilege**](docs/PrivilegesApi.md#updateprivilege) | **Put** /api/1/privileges/{privilege_id} | Update a Privilege | -| *RolesApi* | [**AddRoleAdmins**](docs/RolesApi.md#addroleadmins) | **Post** /api/2/roles/{role_id}/admins | Add Role Admins | -| *RolesApi* | [**AddRoleUsers**](docs/RolesApi.md#addroleusers) | **Post** /api/2/roles/{role_id}/users | Add Role Users | -| *RolesApi* | [**CreateRole**](docs/RolesApi.md#createrole) | **Post** /api/2/roles | Create Role | -| *RolesApi* | [**DeleteRole**](docs/RolesApi.md#deleterole) | **Delete** /api/2/roles/{role_id} | Delete Role by ID | -| *RolesApi* | [**GetRole**](docs/RolesApi.md#getrole) | **Get** /api/2/roles/{role_id} | Get Role by ID | -| *RolesApi* | [**GetRoleAdmins**](docs/RolesApi.md#getroleadmins) | **Get** /api/2/roles/{role_id}/admins | Get Role Admins | -| *RolesApi* | [**GetRoleApps**](docs/RolesApi.md#getroleapps) | **Get** /api/2/roles/{role_id}/apps | Get all Apps assigned to Role | -| *RolesApi* | [**GetRoleById**](docs/RolesApi.md#getrolebyid) | **Get** /api/1/roles/{role_id} | Get Role by ID | -| *RolesApi* | [**GetRoleByName**](docs/RolesApi.md#getrolebyname) | **Get** /api/1/roles | Get Role by Name | -| *RolesApi* | [**GetRoleUsers**](docs/RolesApi.md#getroleusers) | **Get** /api/2/roles/{role_id}/users | Get Role Users | -| *RolesApi* | [**ListRoles**](docs/RolesApi.md#listroles) | **Get** /api/2/roles | List Roles | -| *RolesApi* | [**RemoveRoleAdmins**](docs/RolesApi.md#removeroleadmins) | **Delete** /api/2/roles/{role_id}/admins | Remove Role Admins | -| *RolesApi* | [**RemoveRoleUsers**](docs/RolesApi.md#removeroleusers) | **Delete** /api/2/roles/{role_id}/users | Remove Role Users | -| *RolesApi* | [**SetRoleApps**](docs/RolesApi.md#setroleapps) | **Put** /api/2/roles/{role_id}/apps | Set Role Apps | -| *RolesApi* | [**UpdateRole**](docs/RolesApi.md#updaterole) | **Put** /api/2/roles/{role_id} | Update Role | -| *SAMLAssertionsApi* | [**GenerateSamlAssert**](docs/SAMLAssertionsApi.md#generatesamlassert) | **Post** /api/1/saml_assertion | Generate SAML Assertion | -| *SAMLAssertionsApi* | [**GenerateSamlAssert2**](docs/SAMLAssertionsApi.md#generatesamlassert2) | **Post** /api/2/saml_assertion | Generate SAML Assertion | -| *SAMLAssertionsApi* | [**VerFactorSaml**](docs/SAMLAssertionsApi.md#verfactorsaml) | **Post** /api/1/saml_assertion/verify_factor | Verify Factor SAML | -| *SAMLAssertionsApi* | [**VerFactorSaml2**](docs/SAMLAssertionsApi.md#verfactorsaml2) | **Post** /api/2/saml_assertion/verify_factor | Verify Factor SAML | -| *SmartHooksApi* | [**CreateEnvironmentVariable**](docs/SmartHooksApi.md#createenvironmentvariable) | **Post** /api/2/hooks/envs | Create Environment Variable | -| *SmartHooksApi* | [**CreateHook**](docs/SmartHooksApi.md#createhook) | **Post** /api/2/hooks | Create Smart Hook | -| *SmartHooksApi* | [**DeleteEnvironmentVariable**](docs/SmartHooksApi.md#deleteenvironmentvariable) | **Delete** /api/2/hooks/envs/{envvar_id} | Delete Environment Variable | -| *SmartHooksApi* | [**DeleteHook**](docs/SmartHooksApi.md#deletehook) | **Delete** /api/2/hooks/{hook_id} | Delete Smart Hook by ID | -| *SmartHooksApi* | [**GetEnvironmentVariable**](docs/SmartHooksApi.md#getenvironmentvariable) | **Get** /api/2/hooks/envs/{envvar_id} | Get Environment Variable | -| *SmartHooksApi* | [**GetHook**](docs/SmartHooksApi.md#gethook) | **Get** /api/2/hooks/{hook_id} | Get Smart Hook by ID | -| *SmartHooksApi* | [**GetLogs**](docs/SmartHooksApi.md#getlogs) | **Get** /api/2/hooks/{hook_id}/logs | Get Smart Hook Logs | -| *SmartHooksApi* | [**ListEnvironmentVariables**](docs/SmartHooksApi.md#listenvironmentvariables) | **Get** /api/2/hooks/envs | List Environment Variables | -| *SmartHooksApi* | [**ListHooks**](docs/SmartHooksApi.md#listhooks) | **Get** /api/2/hooks | List all Smart Hooks | -| *SmartHooksApi* | [**UpdateEnvironmentVariable**](docs/SmartHooksApi.md#updateenvironmentvariable) | **Put** /api/2/hooks/envs/{envvar_id} | Update Environment Variable | -| *SmartHooksApi* | [**UpdateHook**](docs/SmartHooksApi.md#updatehook) | **Put** /api/2/hooks/{hook_id} | Update Smart Hook by ID | -| *UserMappingsApi* | [**CreateMapping**](docs/UserMappingsApi.md#createmapping) | **Post** /api/2/mappings | Create Mapping | -| *UserMappingsApi* | [**DeleteMapping**](docs/UserMappingsApi.md#deletemapping) | **Delete** /api/2/mappings/{mapping_id} | Delete Mapping | -| *UserMappingsApi* | [**GetMapping**](docs/UserMappingsApi.md#getmapping) | **Get** /api/2/mappings/{mapping_id} | Get Mapping | -| *UserMappingsApi* | [**ListMappingActionValues**](docs/UserMappingsApi.md#listmappingactionvalues) | **Get** /api/2/mappings/actions/{mapping_action_value}/values | List Actions Values | -| *UserMappingsApi* | [**ListMappingConditions**](docs/UserMappingsApi.md#listmappingconditions) | **Get** /api/2/mappings/conditions | List Conditions | -| *UserMappingsApi* | [**ListMappingConditionsOperators**](docs/UserMappingsApi.md#listmappingconditionsoperators) | **Get** /api/2/mappings/conditions/{mapping_condition_value}/operators | List Conditions Operators | -| *UserMappingsApi* | [**ListMappingContionValues**](docs/UserMappingsApi.md#listmappingcontionvalues) | **Get** /api/2/mappings/conditions/{mapping_condition_value}/values | List Conditions Values | -| *UserMappingsApi* | [**ListMappings**](docs/UserMappingsApi.md#listmappings) | **Get** /api/2/mappings | List Mappings | -| *UserMappingsApi* | [**ListMappingsActions**](docs/UserMappingsApi.md#listmappingsactions) | **Get** /api/2/mappings/actions | List Actions | -| *UserMappingsApi* | [**SortMappings**](docs/UserMappingsApi.md#sortmappings) | **Put** /api/2/mappings/sort | Bulk Sort | -| *UserMappingsApi* | [**UpdateMapping**](docs/UserMappingsApi.md#updatemapping) | **Put** /api/2/mappings/{mapping_id} | Update Mapping | -| *UsersV1Api* | [**AddRolesToUser**](docs/UsersV1Api.md#addrolestouser) | **Put** /api/1/users/{user_id}/add_roles | Add Roles for a User | -| *UsersV1Api* | [**CreateUser**](docs/UsersV1Api.md#createuser) | **Post** /api/1/users | Create a User | -| *UsersV1Api* | [**DeleteUser**](docs/UsersV1Api.md#deleteuser) | **Delete** /api/1/users/{user_id} | Delete a User | -| *UsersV1Api* | [**GetCustomAttributes**](docs/UsersV1Api.md#getcustomattributes) | **Get** /api/1/users/custom_attributes | Get Custom Attributes | -| *UsersV1Api* | [**GetUserApps**](docs/UsersV1Api.md#getuserapps) | **Get** /api/1/users/{user_id}/apps | Get Apps for a User | -| *UsersV1Api* | [**GetUserById**](docs/UsersV1Api.md#getuserbyid) | **Get** /api/1/users/{user_id} | Get User by ID | -| *UsersV1Api* | [**GetUserRoles**](docs/UsersV1Api.md#getuserroles) | **Get** /api/1/users/{user_id}/roles | Get Roles for a User | -| *UsersV1Api* | [**ListUsers**](docs/UsersV1Api.md#listusers) | **Get** /api/1/users | List Users | -| *UsersV1Api* | [**LockAccountUser**](docs/UsersV1Api.md#lockaccountuser) | **Put** /api/1/users/{user_id}/lock_user | Lock User Account | -| *UsersV1Api* | [**LogOutUser**](docs/UsersV1Api.md#logoutuser) | **Put** /api/1/users/{user_id}/logout | Log User Out | -| *UsersV1Api* | [**RemoveUserRole**](docs/UsersV1Api.md#removeuserrole) | **Put** /api/1/users/{user_id}/remove_roles | Remove Roles for a User | -| *UsersV1Api* | [**SetUserState**](docs/UsersV1Api.md#setuserstate) | **Put** /api/1/users/{user_id}/set_state | Set User State | -| *UsersV1Api* | [**UpdatePasswordInsecure**](docs/UsersV1Api.md#updatepasswordinsecure) | **Put** /api/1/users/set_password_clear_text/{user_id} | Set Password Using ID in Cleartext | -| *UsersV1Api* | [**UpdatePasswordSecure**](docs/UsersV1Api.md#updatepasswordsecure) | **Put** /api/1/users/set_password_using_salt/{user_id} | Set Password Using ID and SHA-256 and Salt | -| *UsersV1Api* | [**UpdateUser**](docs/UsersV1Api.md#updateuser) | **Put** /api/1/users/{user_id} | Update a User | -| *UsersV2Api* | [**CreateUser2**](docs/UsersV2Api.md#createuser2) | **Post** /api/2/users | Create User | -| *UsersV2Api* | [**DeleteUser2**](docs/UsersV2Api.md#deleteuser2) | **Delete** /api/2/users/{user_id} | Delete User | -| *UsersV2Api* | [**GetUser2**](docs/UsersV2Api.md#getuser2) | **Get** /api/2/users/{user_id} | Get User | -| *UsersV2Api* | [**GetUserApps2**](docs/UsersV2Api.md#getuserapps2) | **Get** /api/2/users/{user_id}/apps | Get User Apps | -| *UsersV2Api* | [**ListUsers2**](docs/UsersV2Api.md#listusers2) | **Get** /api/2/users | List Users | -| *UsersV2Api* | [**UpdateUser2**](docs/UsersV2Api.md#updateuser2) | **Put** /api/2/users/{user_id} | Update User | -| *VigilanceAIApi* | [**CreateRiskRule**](docs/VigilanceAIApi.md#createriskrule) | **Post** /api/2/risk/rules | Create Rule | -| *VigilanceAIApi* | [**DeleteRiskRule**](docs/VigilanceAIApi.md#deleteriskrule) | **Delete** /api/2/risk/rules/{rule_id} | Delete Rule | -| *VigilanceAIApi* | [**GetRiskRule**](docs/VigilanceAIApi.md#getriskrule) | **Get** /api/2/risk/rules/{rule_id} | get Risk Rule | -| *VigilanceAIApi* | [**GetRiskScore**](docs/VigilanceAIApi.md#getriskscore) | **Post** /api/2/risk/verify | Get a Risk Score | -| *VigilanceAIApi* | [**GetRiskScores**](docs/VigilanceAIApi.md#getriskscores) | **Get** /api/2/risk/scores | Get Score Summary | -| *VigilanceAIApi* | [**ListRiskRules**](docs/VigilanceAIApi.md#listriskrules) | **Get** /api/2/risk/rules | List Rules | -| *VigilanceAIApi* | [**TrackRiskEvent**](docs/VigilanceAIApi.md#trackriskevent) | **Post** /api/2/risk/events | Track an Event | -| *VigilanceAIApi* | [**UpdateRiskRule**](docs/VigilanceAIApi.md#updateriskrule) | **Put** /api/2/risk/rules/{rule_id} | Update Rule | - - -## Documentation For Models - - - [ActionObj](docs/ActionObj.md) - - [ActivateMfaFactorsRequest](docs/ActivateMfaFactorsRequest.md) - - [AddClientApp201Response](docs/AddClientApp201Response.md) - - [AddClientAppRequest](docs/AddClientAppRequest.md) - - [AddPrivilegeToRole201Response](docs/AddPrivilegeToRole201Response.md) - - [AddPrivilegeToRoleRequest](docs/AddPrivilegeToRoleRequest.md) - - [AddRolesToUserRequest](docs/AddRolesToUserRequest.md) - - [AltErr](docs/AltErr.md) - - [AppParameters](docs/AppParameters.md) - - [AppRule](docs/AppRule.md) - - [AssignUsersToPrivilegeRequest](docs/AssignUsersToPrivilegeRequest.md) - - [AuthClaim](docs/AuthClaim.md) - - [AuthId](docs/AuthId.md) - - [AuthMethod](docs/AuthMethod.md) - - [AuthScope](docs/AuthScope.md) - - [AuthServer](docs/AuthServer.md) - - [AuthServerConfiguration](docs/AuthServerConfiguration.md) - - [Brand](docs/Brand.md) - - [BrandApp](docs/BrandApp.md) - - [BrandBackground](docs/BrandBackground.md) - - [BrandBackgroundUrls](docs/BrandBackgroundUrls.md) - - [BrandLogo](docs/BrandLogo.md) - - [BrandLogoUrls](docs/BrandLogoUrls.md) - - [BrandReq](docs/BrandReq.md) - - [ClientAppFull](docs/ClientAppFull.md) - - [ClockCounter](docs/ClockCounter.md) - - [Condition](docs/Condition.md) - - [ConfigurationOidc](docs/ConfigurationOidc.md) - - [ConfigurationSaml](docs/ConfigurationSaml.md) - - [Connector](docs/Connector.md) - - [CreateApp200Response](docs/CreateApp200Response.md) - - [CreateAppRequest](docs/CreateAppRequest.md) - - [CreateDeviceVerification201Response](docs/CreateDeviceVerification201Response.md) - - [CreateDeviceVerificationRequest](docs/CreateDeviceVerificationRequest.md) - - [CreateFactorRegistration201Response](docs/CreateFactorRegistration201Response.md) - - [CreateFactorRegistrationRequest](docs/CreateFactorRegistrationRequest.md) - - [CreatePrivilege200Response](docs/CreatePrivilege200Response.md) - - [CreateRole201ResponseInner](docs/CreateRole201ResponseInner.md) - - [Device](docs/Device.md) - - [EmailConfig](docs/EmailConfig.md) - - [EnforcementPoint](docs/EnforcementPoint.md) - - [EnforcementPointResourcesInner](docs/EnforcementPointResourcesInner.md) - - [EnrollMfaFactor200Response](docs/EnrollMfaFactor200Response.md) - - [Error](docs/Error.md) - - [Event](docs/Event.md) - - [GenerateMFAtoken200Response](docs/GenerateMFAtoken200Response.md) - - [GenerateMFAtokenRequest](docs/GenerateMFAtokenRequest.md) - - [GenerateOTP201Response](docs/GenerateOTP201Response.md) - - [GenerateOTPRequest](docs/GenerateOTPRequest.md) - - [GenerateSamlAssert200Response](docs/GenerateSamlAssert200Response.md) - - [GenerateTokenRequest](docs/GenerateTokenRequest.md) - - [GenericApp](docs/GenericApp.md) - - [GenericAppProvisioning](docs/GenericAppProvisioning.md) - - [GetAssignedUser200Response](docs/GetAssignedUser200Response.md) - - [GetAuthFactors200Response](docs/GetAuthFactors200Response.md) - - [GetAuthenticationDevices200ResponseInner](docs/GetAuthenticationDevices200ResponseInner.md) - - [GetCustomAttributes200Response](docs/GetCustomAttributes200Response.md) - - [GetEmailSettings200Response](docs/GetEmailSettings200Response.md) - - [GetEmailSettings200ResponseOneOf](docs/GetEmailSettings200ResponseOneOf.md) - - [GetEnrolledFactors200Response](docs/GetEnrolledFactors200Response.md) - - [GetEnrolledFactors200ResponseData](docs/GetEnrolledFactors200ResponseData.md) - - [GetEnrolledFactors200ResponseDataOtpDevicesInner](docs/GetEnrolledFactors200ResponseDataOtpDevicesInner.md) - - [GetEventById200Response](docs/GetEventById200Response.md) - - [GetEventTypes200Response](docs/GetEventTypes200Response.md) - - [GetEventTypes200ResponseDataInner](docs/GetEventTypes200ResponseDataInner.md) - - [GetEvents200Response](docs/GetEvents200Response.md) - - [GetEvents200ResponsePagination](docs/GetEvents200ResponsePagination.md) - - [GetGroups200Response](docs/GetGroups200Response.md) - - [GetInviteLink200Response](docs/GetInviteLink200Response.md) - - [GetInviteLinkRequest](docs/GetInviteLinkRequest.md) - - [GetMFAFactors200Response](docs/GetMFAFactors200Response.md) - - [GetMFAFactors200ResponseData](docs/GetMFAFactors200ResponseData.md) - - [GetMFAFactors200ResponseDataAuthFactorsInner](docs/GetMFAFactors200ResponseDataAuthFactorsInner.md) - - [GetRateLimit200Response](docs/GetRateLimit200Response.md) - - [GetRiskScore200Response](docs/GetRiskScore200Response.md) - - [GetRiskScoreRequest](docs/GetRiskScoreRequest.md) - - [GetRiskScores200Response](docs/GetRiskScores200Response.md) - - [GetRiskScores200ResponseScores](docs/GetRiskScores200ResponseScores.md) - - [GetRoleApps200ResponseInner](docs/GetRoleApps200ResponseInner.md) - - [GetRoleById200Response](docs/GetRoleById200Response.md) - - [GetRoleById200ResponseDataInner](docs/GetRoleById200ResponseDataInner.md) - - [GetRoleByName200Response](docs/GetRoleByName200Response.md) - - [GetRoleByName200ResponseDataInner](docs/GetRoleByName200ResponseDataInner.md) - - [GetRoleByName200ResponsePagination](docs/GetRoleByName200ResponsePagination.md) - - [GetUserApps200ResponseInner](docs/GetUserApps200ResponseInner.md) - - [GetUserRoles200Response](docs/GetUserRoles200Response.md) - - [GetUserVerification200Response](docs/GetUserVerification200Response.md) - - [Group](docs/Group.md) - - [Hook](docs/Hook.md) - - [HookEnvvar](docs/HookEnvvar.md) - - [HookLog](docs/HookLog.md) - - [HookOptions](docs/HookOptions.md) - - [HookStatus](docs/HookStatus.md) - - [ListConditions200ResponseInner](docs/ListConditions200ResponseInner.md) - - [ListMappingActionValues200ResponseInner](docs/ListMappingActionValues200ResponseInner.md) - - [ListMappingConditions200Response](docs/ListMappingConditions200Response.md) - - [ListMappingConditionsOperators200ResponseInner](docs/ListMappingConditionsOperators200ResponseInner.md) - - [ListMappingContionValues200ResponseInner](docs/ListMappingContionValues200ResponseInner.md) - - [ListMappingsActions200ResponseInner](docs/ListMappingsActions200ResponseInner.md) - - [ListMessageTemplates200ResponseInner](docs/ListMessageTemplates200ResponseInner.md) - - [ListPrivelegeRoles200Response](docs/ListPrivelegeRoles200Response.md) - - [Locale](docs/Locale.md) - - [LockAccountUserRequest](docs/LockAccountUserRequest.md) - - [Mapping](docs/Mapping.md) - - [MessageTemplate](docs/MessageTemplate.md) - - [MessageTemplateTemplate](docs/MessageTemplateTemplate.md) - - [MessageTemplateTemplateOneOf](docs/MessageTemplateTemplateOneOf.md) - - [MessageTemplateTemplateOneOf1](docs/MessageTemplateTemplateOneOf1.md) - - [OauthToken](docs/OauthToken.md) - - [OidcApp](docs/OidcApp.md) - - [OidcAppAllOf](docs/OidcAppAllOf.md) - - [OtpDevice](docs/OtpDevice.md) - - [Privilege](docs/Privilege.md) - - [PrivilegePrivilege](docs/PrivilegePrivilege.md) - - [PrivilegePrivilegeStatementInner](docs/PrivilegePrivilegeStatementInner.md) - - [RateLimit](docs/RateLimit.md) - - [RemoveRoleUsersRequest](docs/RemoveRoleUsersRequest.md) - - [RemoveUserRoleRequest](docs/RemoveUserRoleRequest.md) - - [RemoveUserRoleRequestRoleIdArrayInner](docs/RemoveUserRoleRequestRoleIdArrayInner.md) - - [RequestBrand](docs/RequestBrand.md) - - [RevokeTokensRequest](docs/RevokeTokensRequest.md) - - [RiskDevice](docs/RiskDevice.md) - - [RiskRule](docs/RiskRule.md) - - [RiskUser](docs/RiskUser.md) - - [Role](docs/Role.md) - - [RuleAction](docs/RuleAction.md) - - [RuleCondition](docs/RuleCondition.md) - - [SamlApp](docs/SamlApp.md) - - [SamlAppAllOf](docs/SamlAppAllOf.md) - - [SamlAppAllOfParameters](docs/SamlAppAllOfParameters.md) - - [SamlAppAllOfParametersSamlUsername](docs/SamlAppAllOfParametersSamlUsername.md) - - [SamlAssert](docs/SamlAssert.md) - - [SamlFactor](docs/SamlFactor.md) - - [Scope](docs/Scope.md) - - [SendInviteLink200Response](docs/SendInviteLink200Response.md) - - [SendInviteLinkRequest](docs/SendInviteLinkRequest.md) - - [Session](docs/Session.md) - - [SetUserStateRequest](docs/SetUserStateRequest.md) - - [Source](docs/Source.md) - - [SsoOidc](docs/SsoOidc.md) - - [SsoSaml](docs/SsoSaml.md) - - [SsoSamlCertificate](docs/SsoSamlCertificate.md) - - [TokenClaim](docs/TokenClaim.md) - - [TrackRiskEventRequest](docs/TrackRiskEventRequest.md) - - [UpdateClientAppRequest](docs/UpdateClientAppRequest.md) - - [UpdateEnvironmentVariableRequest](docs/UpdateEnvironmentVariableRequest.md) - - [UpdatePasswordInsecureRequest](docs/UpdatePasswordInsecureRequest.md) - - [UpdatePasswordSecureRequest](docs/UpdatePasswordSecureRequest.md) - - [UpdatePrivilege200Response](docs/UpdatePrivilege200Response.md) - - [UpdateRiskRuleRequest](docs/UpdateRiskRuleRequest.md) - - [UpdateRole200Response](docs/UpdateRole200Response.md) - - [User](docs/User.md) - - [VerFactorSaml200Response](docs/VerFactorSaml200Response.md) - - [Verb](docs/Verb.md) - - [VerifyMfaFactorRequest](docs/VerifyMfaFactorRequest.md) - - [VerifyUserRegistration200Response](docs/VerifyUserRegistration200Response.md) - - [VerifyUserRegistrationRequest](docs/VerifyUserRegistrationRequest.md) - - [VerifyUserVerificationRequest](docs/VerifyUserVerificationRequest.md) - - -## Documentation For Authorization - - +## Requirements -### OAuth2 +The SDK expects three environment variables to be set for authentication: +- `ONELOGIN_CLIENT_ID` +- `ONELOGIN_CLIENT_SECRET` +- `ONELOGIN_SUBDOMAIN` -- **Type**: OAuth -- **Flow**: application -- **Authorization URL**: -- **Scopes**: - - **Authentication Only**: Gives the credential pair the ability to generate an access token that can perform POST calls only to authentication endpoints, providing least privileged access to authentication code. These endpoints include: - Verify Factor (SAML Assertion) - Generate SAML Assertion - Verify Factor (Login) - Create Session Login Token - Log User Out - - **Read Users**: Gives the credential pair the ability to generate an access token that can perform GET calls available for the User, Role, and Group API resources. - - **Manage users**: Gives the credential pair the ability to generate an access token that can perform GET, POST, PUT, and DELETE calls available for the User, Role, and Group API resources, with the exception of setting passwords and assigning and removing roles - - **Manage All**: Gives the credential pair the ability to generate an access token that can perform GET, POST, PUT, and DELETE calls for all available API resources, including the ability to set passwords and assign and remove roles. - - **Read All**: Gives the credential pair the ability to generate an access token that can perform GET calls available for all API resources. +These variables are used by the Authenticator for authentication with the OneLogin API. The Authenticator retrieves an access token using these credentials, which is then used for API requests. You can set these variables directly in your shell or in the environment of the program that will be using this SDK. -Example +In a Unix/Linux shell, you can use the `export` command to set these variables: -```golang -auth := context.WithValue(context.Background(), sw.ContextAccessToken, "ACCESSTOKENSTRING") -r, err := client.Service.Operation(auth, args) +```shell +export ONELOGIN_CLIENT_ID=your_client_id +export ONELOGIN_CLIENT_SECRET=your_client_secret +export ONELOGIN_SUBDOMAIN=your_subdomain ``` -Or via OAuth2 module to automatically refresh tokens and perform user authentication. - -```golang -import "golang.org/x/oauth2" - -/* Perform OAuth2 round trip request and obtain a token */ +In a Go program, you can use the `os` package to set these variables: -tokenSource := oauth2cfg.TokenSource(createContext(httpClient), &token) -auth := context.WithValue(oauth2.NoContext, sw.ContextOAuth2, tokenSource) -r, err := client.Service.Operation(auth, args) +```go +os.Setenv("ONELOGIN_CLIENT_ID", "your_client_id") +os.Setenv("ONELOGIN_CLIENT_SECRET", "your_client_secret") +os.Setenv("ONELOGIN_SUBDOMAIN", "your_subdomain") ``` - -### basicAuth - -- **Type**: HTTP basic authentication - -Example - -```golang -auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ - UserName: "username", - Password: "password", -}) -r, err := client.Service.Operation(auth, args) +Please ensure these variables are set before attempting to use the SDK to make API requests. + +## Usage + +Here's an example demonstrating how to use the Onelogin SDK: + +```go +package main + +import ( + "fmt" + + "github.com/onelogin/onelogin-go-sdk/internal/models" + "github.com/onelogin/onelogin-go-sdk/pkg/onelogin" +) + +func main() { + ol, err := onelogin.NewOneloginSDK() + if err != nil { + fmt.Println("Unable to initialize client:", err) + return + } + userQuery := models.UserQuery{} + userList, err := ol.GetUsers(&userQuery) + if err != nil { + fmt.Println("Failed to get user:", err) + return + } + fmt.Println(userList) + + appQuery := models.AppQuery{} + appList, err := ol.GetApps(&appQuery) + if err != nil { + fmt.Println("Failed to get app list:", err) + return + } + fmt.Println("App List:", appList) +} ``` +## Documentation -## Documentation for Utility Methods - -Due to the fact that model structure members are all pointers, this package contains -a number of utility functions to easily obtain pointers to values of basic types. -Each of these functions takes a value of the given basic type and returns a pointer to it: - -* `PtrBool` -* `PtrInt` -* `PtrInt32` -* `PtrInt64` -* `PtrFloat` -* `PtrFloat32` -* `PtrFloat64` -* `PtrString` -* `PtrTime` - -## Author +[Comprehensive documentation](docs/index.md) for the Onelogin SDK is available in the `docs` directory. The following documents provide detailed information on using the SDK and its various modules: +- `api.md`: Documentation for the API module, including request construction, communication, and response handling. +- `authentication.md`: Detailed documentation for the Authentication module, including the process of obtaining and revoking access tokens as well as retrieving the token for other applications or services. +- `error_handling.md`: Documentation for error handling, including information on error types and codes. +- `index.md`: Introduction and overview of the SDK, including goals and architecture. +- `models.md`: Documentation for the models module, describing the data models that represent Onelogin entities and resources. +- `usage_examples.md`: Contains usage examples and code snippets demonstrating various SDK functionalities. +## Contributing +Contributions to the Onelogin SDK are welcome! If you encounter any issues or have suggestions for improvement, please open an issue or submit a pull request. We appreciate your feedback and contributions. \ No newline at end of file diff --git a/response.go b/response.go deleted file mode 100644 index 41383c6..0000000 --- a/response.go +++ /dev/null @@ -1,47 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "net/http" -) - -// APIResponse stores the API response returned by the server. -type APIResponse struct { - *http.Response `json:"-"` - Message string `json:"message,omitempty"` - // Operation is the name of the OpenAPI operation. - Operation string `json:"operation,omitempty"` - // RequestURL is the request URL. This value is always available, even if the - // embedded *http.Response is nil. - RequestURL string `json:"url,omitempty"` - // Method is the HTTP method used for the request. This value is always - // available, even if the embedded *http.Response is nil. - Method string `json:"method,omitempty"` - // Payload holds the contents of the response body (which may be nil or empty). - // This is provided here as the raw response.Body() reader will have already - // been drained. - Payload []byte `json:"-"` -} - -// NewAPIResponse returns a new APIResponse object. -func NewAPIResponse(r *http.Response) *APIResponse { - - response := &APIResponse{Response: r} - return response -} - -// NewAPIResponseWithError returns a new APIResponse object with the provided error message. -func NewAPIResponseWithError(errorMessage string) *APIResponse { - - response := &APIResponse{Message: errorMessage} - return response -} diff --git a/test/CHANGELOG.md b/test/CHANGELOG.md deleted file mode 100644 index e69de29..0000000 diff --git a/test/api_api_auth_claims_test.go b/test/api_api_auth_claims_test.go deleted file mode 100644 index 894dad8..0000000 --- a/test/api_api_auth_claims_test.go +++ /dev/null @@ -1,83 +0,0 @@ -/* -OneLogin API - -Testing APIAuthClaimsApiService - -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - -package onelogin - -import ( - "context" - "testing" - - openapiclient "github.com/onelogin/onelogin-go-sdk" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -func Test_onelogin_APIAuthClaimsApiService(t *testing.T) { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test APIAuthClaimsApiService CreateAuthClaim", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var apiAuthId string - - resp, httpRes, err := apiClient.APIAuthClaimsApi.CreateAuthClaim(context.Background(), apiAuthId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test APIAuthClaimsApiService DeleteAuthClaim", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var apiAuthId string - var claimId int32 - - httpRes, err := apiClient.APIAuthClaimsApi.DeleteAuthClaim(context.Background(), apiAuthId, claimId).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test APIAuthClaimsApiService GetAuthclaims", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var apiAuthId string - - resp, httpRes, err := apiClient.APIAuthClaimsApi.GetAuthclaims(context.Background(), apiAuthId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test APIAuthClaimsApiService UpdateClaim", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var apiAuthId string - var claimId int32 - - resp, httpRes, err := apiClient.APIAuthClaimsApi.UpdateClaim(context.Background(), apiAuthId, claimId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - -} diff --git a/test/api_api_auth_client_apps_test.go b/test/api_api_auth_client_apps_test.go deleted file mode 100644 index 45029a8..0000000 --- a/test/api_api_auth_client_apps_test.go +++ /dev/null @@ -1,84 +0,0 @@ -/* -OneLogin API - -Testing APIAuthClientAppsApiService - -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - -package onelogin - -import ( - "context" - "testing" - - openapiclient "github.com/onelogin/onelogin-go-sdk" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -func Test_onelogin_APIAuthClientAppsApiService(t *testing.T) { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test APIAuthClientAppsApiService AddClientApp", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var apiAuthId string - - resp, httpRes, err := apiClient.APIAuthClientAppsApi.AddClientApp(context.Background(), apiAuthId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test APIAuthClientAppsApiService DeleteClientApp", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var apiAuthId string - var clientAppId int32 - - resp, httpRes, err := apiClient.APIAuthClientAppsApi.DeleteClientApp(context.Background(), apiAuthId, clientAppId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test APIAuthClientAppsApiService ListClientApps", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var apiAuthId string - - resp, httpRes, err := apiClient.APIAuthClientAppsApi.ListClientApps(context.Background(), apiAuthId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test APIAuthClientAppsApiService UpdateClientApp", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var apiAuthId string - var clientAppId int32 - - resp, httpRes, err := apiClient.APIAuthClientAppsApi.UpdateClientApp(context.Background(), apiAuthId, clientAppId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - -} diff --git a/test/api_api_auth_scopes_test.go b/test/api_api_auth_scopes_test.go deleted file mode 100644 index 44c3bbe..0000000 --- a/test/api_api_auth_scopes_test.go +++ /dev/null @@ -1,83 +0,0 @@ -/* -OneLogin API - -Testing APIAuthScopesApiService - -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - -package onelogin - -import ( - "context" - "testing" - - openapiclient "github.com/onelogin/onelogin-go-sdk" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -func Test_onelogin_APIAuthScopesApiService(t *testing.T) { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test APIAuthScopesApiService CreateScope", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var apiAuthId string - - resp, httpRes, err := apiClient.APIAuthScopesApi.CreateScope(context.Background(), apiAuthId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test APIAuthScopesApiService DeleteScope", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var apiAuthId string - var scopeId int32 - - httpRes, err := apiClient.APIAuthScopesApi.DeleteScope(context.Background(), apiAuthId, scopeId).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test APIAuthScopesApiService GetScopes", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var apiAuthId string - - resp, httpRes, err := apiClient.APIAuthScopesApi.GetScopes(context.Background(), apiAuthId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test APIAuthScopesApiService UpdateScope", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var apiAuthId string - var scopeId int32 - - resp, httpRes, err := apiClient.APIAuthScopesApi.UpdateScope(context.Background(), apiAuthId, scopeId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - -} diff --git a/test/api_api_authorization_server_test.go b/test/api_api_authorization_server_test.go deleted file mode 100644 index d710b6b..0000000 --- a/test/api_api_authorization_server_test.go +++ /dev/null @@ -1,91 +0,0 @@ -/* -OneLogin API - -Testing APIAuthorizationServerApiService - -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - -package onelogin - -import ( - "context" - "testing" - - openapiclient "github.com/onelogin/onelogin-go-sdk" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -func Test_onelogin_APIAuthorizationServerApiService(t *testing.T) { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test APIAuthorizationServerApiService CreateAuthServer", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.APIAuthorizationServerApi.CreateAuthServer(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test APIAuthorizationServerApiService DeleteAuthServer", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var apiAuthId string - - httpRes, err := apiClient.APIAuthorizationServerApi.DeleteAuthServer(context.Background(), apiAuthId).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test APIAuthorizationServerApiService GetAuthServer", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var apiAuthId string - - resp, httpRes, err := apiClient.APIAuthorizationServerApi.GetAuthServer(context.Background(), apiAuthId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test APIAuthorizationServerApiService ListAuthServers", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.APIAuthorizationServerApi.ListAuthServers(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test APIAuthorizationServerApiService UpdateAuthServer", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var apiAuthId string - - resp, httpRes, err := apiClient.APIAuthorizationServerApi.UpdateAuthServer(context.Background(), apiAuthId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - -} diff --git a/test/api_app_rules_test.go b/test/api_app_rules_test.go deleted file mode 100644 index b9469db..0000000 --- a/test/api_app_rules_test.go +++ /dev/null @@ -1,185 +0,0 @@ -/* -OneLogin API - -Testing AppRulesApiService - -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - -package onelogin - -import ( - "context" - "testing" - - openapiclient "github.com/onelogin/onelogin-go-sdk" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -func Test_onelogin_AppRulesApiService(t *testing.T) { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test AppRulesApiService CreateAppRule", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var appId int32 - - resp, httpRes, err := apiClient.AppRulesApi.CreateAppRule(context.Background(), appId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test AppRulesApiService DeleteRule", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var appId int32 - var ruleId string - - httpRes, err := apiClient.AppRulesApi.DeleteRule(context.Background(), appId, ruleId).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test AppRulesApiService GetAppRule", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var appId int32 - var ruleId string - - resp, httpRes, err := apiClient.AppRulesApi.GetAppRule(context.Background(), appId, ruleId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test AppRulesApiService ListActionValies", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var appId int32 - var ruleActionValue string - - resp, httpRes, err := apiClient.AppRulesApi.ListActionValies(context.Background(), appId, ruleActionValue).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test AppRulesApiService ListActions", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var appId int32 - - resp, httpRes, err := apiClient.AppRulesApi.ListActions(context.Background(), appId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test AppRulesApiService ListAppRules", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var appId int32 - - resp, httpRes, err := apiClient.AppRulesApi.ListAppRules(context.Background(), appId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test AppRulesApiService ListConditionOperators", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var appId int32 - var ruleConditionValue string - - resp, httpRes, err := apiClient.AppRulesApi.ListConditionOperators(context.Background(), appId, ruleConditionValue).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test AppRulesApiService ListConditionValues", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var appId int32 - var ruleConditionValue string - - resp, httpRes, err := apiClient.AppRulesApi.ListConditionValues(context.Background(), appId, ruleConditionValue).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test AppRulesApiService ListConditions", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var appId int32 - - resp, httpRes, err := apiClient.AppRulesApi.ListConditions(context.Background(), appId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test AppRulesApiService SortAppRules", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var appId int32 - - resp, httpRes, err := apiClient.AppRulesApi.SortAppRules(context.Background(), appId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test AppRulesApiService UpdateAppRule", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var appId int32 - var ruleId string - - resp, httpRes, err := apiClient.AppRulesApi.UpdateAppRule(context.Background(), appId, ruleId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - -} diff --git a/test/api_apps_test.go b/test/api_apps_test.go deleted file mode 100644 index ec3c492..0000000 --- a/test/api_apps_test.go +++ /dev/null @@ -1,131 +0,0 @@ -/* -OneLogin API - -Testing AppsApiService - -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - -package onelogin - -import ( - "context" - "testing" - - openapiclient "github.com/onelogin/onelogin-go-sdk" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -func Test_onelogin_AppsApiService(t *testing.T) { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test AppsApiService CreateApp", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.AppsApi.CreateApp(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test AppsApiService DeleteApp", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var appId int32 - - httpRes, err := apiClient.AppsApi.DeleteApp(context.Background(), appId).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test AppsApiService DeleteAppParameter", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var appId int32 - var parameterId string - - httpRes, err := apiClient.AppsApi.DeleteAppParameter(context.Background(), appId, parameterId).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test AppsApiService GetApp", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var appId int32 - - resp, httpRes, err := apiClient.AppsApi.GetApp(context.Background(), appId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test AppsApiService GetAppUsers", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var appId int32 - - resp, httpRes, err := apiClient.AppsApi.GetAppUsers(context.Background(), appId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test AppsApiService ListApps", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.AppsApi.ListApps(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test AppsApiService ListConnectors", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.AppsApi.ListConnectors(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test AppsApiService UpdateApp", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var appId int32 - - resp, httpRes, err := apiClient.AppsApi.UpdateApp(context.Background(), appId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - -} diff --git a/test/api_branding_service_smtp_test.go b/test/api_branding_service_smtp_test.go deleted file mode 100644 index eb7eab7..0000000 --- a/test/api_branding_service_smtp_test.go +++ /dev/null @@ -1,62 +0,0 @@ -/* -OneLogin API - -Testing BrandingServiceSMTPApiService - -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - -package onelogin - -import ( - "context" - "testing" - - openapiclient "github.com/onelogin/onelogin-go-sdk" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -func Test_onelogin_BrandingServiceSMTPApiService(t *testing.T) { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test BrandingServiceSMTPApiService DeleteEmailSettings", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.BrandingServiceSMTPApi.DeleteEmailSettings(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test BrandingServiceSMTPApiService GetEmailSettings", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.BrandingServiceSMTPApi.GetEmailSettings(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test BrandingServiceSMTPApiService UpdateEmailSettings", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.BrandingServiceSMTPApi.UpdateEmailSettings(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - -} diff --git a/test/api_branding_service_templates_test.go b/test/api_branding_service_templates_test.go deleted file mode 100644 index 5bdcded..0000000 --- a/test/api_branding_service_templates_test.go +++ /dev/null @@ -1,144 +0,0 @@ -/* -OneLogin API - -Testing BrandingServiceTemplatesApiService - -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - -package onelogin - -import ( - "context" - "testing" - - openapiclient "github.com/onelogin/onelogin-go-sdk" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -func Test_onelogin_BrandingServiceTemplatesApiService(t *testing.T) { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test BrandingServiceTemplatesApiService CreateMessageTemplate", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var brandId int32 - - resp, httpRes, err := apiClient.BrandingServiceTemplatesApi.CreateMessageTemplate(context.Background(), brandId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test BrandingServiceTemplatesApiService DeleteMessageTemplate", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var brandId int32 - var templateId int32 - - httpRes, err := apiClient.BrandingServiceTemplatesApi.DeleteMessageTemplate(context.Background(), brandId, templateId).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test BrandingServiceTemplatesApiService GetMasterByType", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var templateType string - - resp, httpRes, err := apiClient.BrandingServiceTemplatesApi.GetMasterByType(context.Background(), templateType).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test BrandingServiceTemplatesApiService GetMessageTemplateById", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var brandId int32 - var templateId int32 - - resp, httpRes, err := apiClient.BrandingServiceTemplatesApi.GetMessageTemplateById(context.Background(), brandId, templateId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test BrandingServiceTemplatesApiService GetTemplateByLocale", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var brandId int32 - var templateType string - var locale string - - resp, httpRes, err := apiClient.BrandingServiceTemplatesApi.GetTemplateByLocale(context.Background(), brandId, templateType, locale).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test BrandingServiceTemplatesApiService ListMessageTemplates", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var brandId int32 - - resp, httpRes, err := apiClient.BrandingServiceTemplatesApi.ListMessageTemplates(context.Background(), brandId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test BrandingServiceTemplatesApiService UpdateMessageTemplateById", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var brandId int32 - var templateId int32 - - resp, httpRes, err := apiClient.BrandingServiceTemplatesApi.UpdateMessageTemplateById(context.Background(), brandId, templateId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test BrandingServiceTemplatesApiService UpdateTemplateByLocale", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var brandId int32 - var templateType string - var locale string - - resp, httpRes, err := apiClient.BrandingServiceTemplatesApi.UpdateTemplateByLocale(context.Background(), brandId, templateType, locale).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - -} diff --git a/test/api_branding_service_test.go b/test/api_branding_service_test.go deleted file mode 100644 index b0a6e10..0000000 --- a/test/api_branding_service_test.go +++ /dev/null @@ -1,105 +0,0 @@ -/* -OneLogin API - -Testing BrandingServiceApiService - -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - -package onelogin - -import ( - "context" - "testing" - - openapiclient "github.com/onelogin/onelogin-go-sdk" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -func Test_onelogin_BrandingServiceApiService(t *testing.T) { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test BrandingServiceApiService CreateBrand", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.BrandingServiceApi.CreateBrand(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test BrandingServiceApiService DeleteBrand", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var brandId int32 - - httpRes, err := apiClient.BrandingServiceApi.DeleteBrand(context.Background(), brandId).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test BrandingServiceApiService GetBrand", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var brandId int32 - - resp, httpRes, err := apiClient.BrandingServiceApi.GetBrand(context.Background(), brandId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test BrandingServiceApiService GetBrandApps", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var brandId int32 - - resp, httpRes, err := apiClient.BrandingServiceApi.GetBrandApps(context.Background(), brandId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test BrandingServiceApiService ListBrands", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.BrandingServiceApi.ListBrands(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test BrandingServiceApiService UpdateBrand", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var brandId int32 - - resp, httpRes, err := apiClient.BrandingServiceApi.UpdateBrand(context.Background(), brandId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - -} diff --git a/test/api_events_test.go b/test/api_events_test.go deleted file mode 100644 index 435845a..0000000 --- a/test/api_events_test.go +++ /dev/null @@ -1,64 +0,0 @@ -/* -OneLogin API - -Testing EventsApiService - -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - -package onelogin - -import ( - "context" - "testing" - - openapiclient "github.com/onelogin/onelogin-go-sdk" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -func Test_onelogin_EventsApiService(t *testing.T) { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test EventsApiService GetEventById", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var eventId int32 - - resp, httpRes, err := apiClient.EventsApi.GetEventById(context.Background(), eventId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test EventsApiService GetEventTypes", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.EventsApi.GetEventTypes(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test EventsApiService GetEvents", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.EventsApi.GetEvents(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - -} diff --git a/test/api_groups_test.go b/test/api_groups_test.go deleted file mode 100644 index 353edcc..0000000 --- a/test/api_groups_test.go +++ /dev/null @@ -1,52 +0,0 @@ -/* -OneLogin API - -Testing GroupsApiService - -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - -package onelogin - -import ( - "context" - "testing" - - openapiclient "github.com/onelogin/onelogin-go-sdk" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -func Test_onelogin_GroupsApiService(t *testing.T) { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test GroupsApiService GetGroupById", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var groupId string - - resp, httpRes, err := apiClient.GroupsApi.GetGroupById(context.Background(), groupId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test GroupsApiService GetGroups", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.GroupsApi.GetGroups(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - -} diff --git a/test/api_invite_links_test.go b/test/api_invite_links_test.go deleted file mode 100644 index 3db1719..0000000 --- a/test/api_invite_links_test.go +++ /dev/null @@ -1,50 +0,0 @@ -/* -OneLogin API - -Testing InviteLinksApiService - -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - -package onelogin - -import ( - "context" - "testing" - - openapiclient "github.com/onelogin/onelogin-go-sdk" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -func Test_onelogin_InviteLinksApiService(t *testing.T) { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test InviteLinksApiService GetInviteLink", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.InviteLinksApi.GetInviteLink(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test InviteLinksApiService SendInviteLink", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.InviteLinksApi.SendInviteLink(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - -} diff --git a/test/api_multi_factor_authentication_test.go b/test/api_multi_factor_authentication_test.go deleted file mode 100644 index 55c0bf8..0000000 --- a/test/api_multi_factor_authentication_test.go +++ /dev/null @@ -1,170 +0,0 @@ -/* -OneLogin API - -Testing MultiFactorAuthenticationApiService - -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - -package onelogin - -import ( - "context" - "testing" - - openapiclient "github.com/onelogin/onelogin-go-sdk" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -func Test_onelogin_MultiFactorAuthenticationApiService(t *testing.T) { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test MultiFactorAuthenticationApiService CreateDeviceVerification", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var userId int32 - - resp, httpRes, err := apiClient.MultiFactorAuthenticationApi.CreateDeviceVerification(context.Background(), userId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test MultiFactorAuthenticationApiService CreateFactorRegistration", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var userId int32 - - resp, httpRes, err := apiClient.MultiFactorAuthenticationApi.CreateFactorRegistration(context.Background(), userId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test MultiFactorAuthenticationApiService DeleteEnrolledFactor", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var userId int32 - var deviceId string - - httpRes, err := apiClient.MultiFactorAuthenticationApi.DeleteEnrolledFactor(context.Background(), userId, deviceId).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test MultiFactorAuthenticationApiService GenerateOTP", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var userId int32 - - resp, httpRes, err := apiClient.MultiFactorAuthenticationApi.GenerateOTP(context.Background(), userId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test MultiFactorAuthenticationApiService GetAuthFactors", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var userId int32 - - resp, httpRes, err := apiClient.MultiFactorAuthenticationApi.GetAuthFactors(context.Background(), userId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test MultiFactorAuthenticationApiService GetAuthenticationDevices", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var userId int32 - - resp, httpRes, err := apiClient.MultiFactorAuthenticationApi.GetAuthenticationDevices(context.Background(), userId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test MultiFactorAuthenticationApiService GetUserRegistration", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var userId int32 - var registrationId string - - resp, httpRes, err := apiClient.MultiFactorAuthenticationApi.GetUserRegistration(context.Background(), userId, registrationId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test MultiFactorAuthenticationApiService GetUserVerification", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var userId int32 - var verificationId string - - resp, httpRes, err := apiClient.MultiFactorAuthenticationApi.GetUserVerification(context.Background(), userId, verificationId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test MultiFactorAuthenticationApiService VerifyUserRegistration", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var userId int32 - var registrationId string - - resp, httpRes, err := apiClient.MultiFactorAuthenticationApi.VerifyUserRegistration(context.Background(), userId, registrationId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test MultiFactorAuthenticationApiService VerifyUserVerification", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var userId int32 - var verificationId string - - resp, httpRes, err := apiClient.MultiFactorAuthenticationApi.VerifyUserVerification(context.Background(), userId, verificationId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - -} diff --git a/test/api_multi_factor_authentication_v1_test.go b/test/api_multi_factor_authentication_v1_test.go deleted file mode 100644 index 7c38bd9..0000000 --- a/test/api_multi_factor_authentication_v1_test.go +++ /dev/null @@ -1,126 +0,0 @@ -/* -OneLogin API - -Testing MultiFactorAuthenticationV1ApiService - -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - -package onelogin - -import ( - "context" - "testing" - - openapiclient "github.com/onelogin/onelogin-go-sdk" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -func Test_onelogin_MultiFactorAuthenticationV1ApiService(t *testing.T) { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test MultiFactorAuthenticationV1ApiService ActivateMfaFactors", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var userId int32 - var deviceId string - - resp, httpRes, err := apiClient.MultiFactorAuthenticationV1Api.ActivateMfaFactors(context.Background(), userId, deviceId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test MultiFactorAuthenticationV1ApiService EnrollMfaFactor", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var userId int32 - - resp, httpRes, err := apiClient.MultiFactorAuthenticationV1Api.EnrollMfaFactor(context.Background(), userId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test MultiFactorAuthenticationV1ApiService GenerateMFAtoken", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var userId int32 - - resp, httpRes, err := apiClient.MultiFactorAuthenticationV1Api.GenerateMFAtoken(context.Background(), userId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test MultiFactorAuthenticationV1ApiService GetEnrolledFactors", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var userId int32 - - resp, httpRes, err := apiClient.MultiFactorAuthenticationV1Api.GetEnrolledFactors(context.Background(), userId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test MultiFactorAuthenticationV1ApiService GetMFAFactors", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var userId int32 - - resp, httpRes, err := apiClient.MultiFactorAuthenticationV1Api.GetMFAFactors(context.Background(), userId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test MultiFactorAuthenticationV1ApiService RemoveMfaFactors", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var userId int32 - var deviceId string - - httpRes, err := apiClient.MultiFactorAuthenticationV1Api.RemoveMfaFactors(context.Background(), userId, deviceId).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test MultiFactorAuthenticationV1ApiService VerifyMfaFactor", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var userId int32 - var deviceId string - - resp, httpRes, err := apiClient.MultiFactorAuthenticationV1Api.VerifyMfaFactor(context.Background(), userId, deviceId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - -} diff --git a/test/api_o_auth2_test.go b/test/api_o_auth2_test.go deleted file mode 100644 index 67b6392..0000000 --- a/test/api_o_auth2_test.go +++ /dev/null @@ -1,62 +0,0 @@ -/* -OneLogin API - -Testing OAuth2ApiService - -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - -package onelogin - -import ( - "context" - "testing" - - openapiclient "github.com/onelogin/onelogin-go-sdk" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -func Test_onelogin_OAuth2ApiService(t *testing.T) { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test OAuth2ApiService GenerateToken", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.OAuth2Api.GenerateToken(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test OAuth2ApiService GetRateLimit", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.OAuth2Api.GetRateLimit(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test OAuth2ApiService RevokeTokens", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.OAuth2Api.RevokeTokens(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - -} diff --git a/test/api_privileges_test.go b/test/api_privileges_test.go deleted file mode 100644 index cd2bf8a..0000000 --- a/test/api_privileges_test.go +++ /dev/null @@ -1,175 +0,0 @@ -/* -OneLogin API - -Testing PrivilegesApiService - -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - -package onelogin - -import ( - "context" - "testing" - - openapiclient "github.com/onelogin/onelogin-go-sdk" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -func Test_onelogin_PrivilegesApiService(t *testing.T) { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test PrivilegesApiService AddPrivilegeToRole", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var privilegeId string - - resp, httpRes, err := apiClient.PrivilegesApi.AddPrivilegeToRole(context.Background(), privilegeId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test PrivilegesApiService AssignUsersToPrivilege", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var privilegeId string - - resp, httpRes, err := apiClient.PrivilegesApi.AssignUsersToPrivilege(context.Background(), privilegeId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test PrivilegesApiService CreatePrivilege", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.PrivilegesApi.CreatePrivilege(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test PrivilegesApiService DeletePrivilege", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var privilegeId string - - httpRes, err := apiClient.PrivilegesApi.DeletePrivilege(context.Background(), privilegeId).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test PrivilegesApiService DeleteRoleFromPrivilege", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var privilegeId string - var roleId string - - httpRes, err := apiClient.PrivilegesApi.DeleteRoleFromPrivilege(context.Background(), privilegeId, roleId).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test PrivilegesApiService GetAssignedUser", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var privilegeId string - - resp, httpRes, err := apiClient.PrivilegesApi.GetAssignedUser(context.Background(), privilegeId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test PrivilegesApiService GetPrivilege", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var privilegeId string - - resp, httpRes, err := apiClient.PrivilegesApi.GetPrivilege(context.Background(), privilegeId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test PrivilegesApiService ListPrivelegeRoles", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var privilegeId string - - resp, httpRes, err := apiClient.PrivilegesApi.ListPrivelegeRoles(context.Background(), privilegeId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test PrivilegesApiService ListPriveleges", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.PrivilegesApi.ListPriveleges(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test PrivilegesApiService RemoveUserFromPrivilege", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var privilegeId string - var userId int32 - - httpRes, err := apiClient.PrivilegesApi.RemoveUserFromPrivilege(context.Background(), privilegeId, userId).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test PrivilegesApiService UpdatePrivilege", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var privilegeId string - - resp, httpRes, err := apiClient.PrivilegesApi.UpdatePrivilege(context.Background(), privilegeId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - -} diff --git a/test/api_roles_test.go b/test/api_roles_test.go deleted file mode 100644 index 7b3a454..0000000 --- a/test/api_roles_test.go +++ /dev/null @@ -1,227 +0,0 @@ -/* -OneLogin API - -Testing RolesApiService - -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - -package onelogin - -import ( - "context" - "testing" - - openapiclient "github.com/onelogin/onelogin-go-sdk" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -func Test_onelogin_RolesApiService(t *testing.T) { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test RolesApiService AddRoleAdmins", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var roleId string - - resp, httpRes, err := apiClient.RolesApi.AddRoleAdmins(context.Background(), roleId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test RolesApiService AddRoleUsers", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var roleId string - - resp, httpRes, err := apiClient.RolesApi.AddRoleUsers(context.Background(), roleId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test RolesApiService CreateRole", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.RolesApi.CreateRole(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test RolesApiService DeleteRole", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var roleId string - - httpRes, err := apiClient.RolesApi.DeleteRole(context.Background(), roleId).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test RolesApiService GetRole", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var roleId string - - resp, httpRes, err := apiClient.RolesApi.GetRole(context.Background(), roleId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test RolesApiService GetRoleAdmins", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var roleId string - - resp, httpRes, err := apiClient.RolesApi.GetRoleAdmins(context.Background(), roleId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test RolesApiService GetRoleApps", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var roleId string - - resp, httpRes, err := apiClient.RolesApi.GetRoleApps(context.Background(), roleId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test RolesApiService GetRoleById", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var roleId string - - resp, httpRes, err := apiClient.RolesApi.GetRoleById(context.Background(), roleId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test RolesApiService GetRoleByName", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.RolesApi.GetRoleByName(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test RolesApiService GetRoleUsers", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var roleId string - - resp, httpRes, err := apiClient.RolesApi.GetRoleUsers(context.Background(), roleId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test RolesApiService ListRoles", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.RolesApi.ListRoles(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test RolesApiService RemoveRoleAdmins", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var roleId string - - httpRes, err := apiClient.RolesApi.RemoveRoleAdmins(context.Background(), roleId).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test RolesApiService RemoveRoleUsers", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var roleId string - - httpRes, err := apiClient.RolesApi.RemoveRoleUsers(context.Background(), roleId).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test RolesApiService SetRoleApps", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var roleId string - - resp, httpRes, err := apiClient.RolesApi.SetRoleApps(context.Background(), roleId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test RolesApiService UpdateRole", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var roleId string - - resp, httpRes, err := apiClient.RolesApi.UpdateRole(context.Background(), roleId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - -} diff --git a/test/api_saml_assertions_test.go b/test/api_saml_assertions_test.go deleted file mode 100644 index 5aa6c59..0000000 --- a/test/api_saml_assertions_test.go +++ /dev/null @@ -1,74 +0,0 @@ -/* -OneLogin API - -Testing SAMLAssertionsApiService - -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - -package onelogin - -import ( - "context" - "testing" - - openapiclient "github.com/onelogin/onelogin-go-sdk" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -func Test_onelogin_SAMLAssertionsApiService(t *testing.T) { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test SAMLAssertionsApiService GenerateSamlAssert", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.SAMLAssertionsApi.GenerateSamlAssert(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test SAMLAssertionsApiService GenerateSamlAssert2", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.SAMLAssertionsApi.GenerateSamlAssert2(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test SAMLAssertionsApiService VerFactorSaml", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.SAMLAssertionsApi.VerFactorSaml(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test SAMLAssertionsApiService VerFactorSaml2", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.SAMLAssertionsApi.VerFactorSaml2(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - -} diff --git a/test/api_smart_hooks_test.go b/test/api_smart_hooks_test.go deleted file mode 100644 index f8ea9c1..0000000 --- a/test/api_smart_hooks_test.go +++ /dev/null @@ -1,170 +0,0 @@ -/* -OneLogin API - -Testing SmartHooksApiService - -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - -package onelogin - -import ( - "context" - "testing" - - openapiclient "github.com/onelogin/onelogin-go-sdk" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -func Test_onelogin_SmartHooksApiService(t *testing.T) { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test SmartHooksApiService CreateEnvironmentVariable", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.SmartHooksApi.CreateEnvironmentVariable(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test SmartHooksApiService CreateHook", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.SmartHooksApi.CreateHook(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test SmartHooksApiService DeleteEnvironmentVariable", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var envvarId string - - httpRes, err := apiClient.SmartHooksApi.DeleteEnvironmentVariable(context.Background(), envvarId).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test SmartHooksApiService DeleteHook", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var hookId string - - httpRes, err := apiClient.SmartHooksApi.DeleteHook(context.Background(), hookId).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test SmartHooksApiService GetEnvironmentVariable", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var envvarId string - - resp, httpRes, err := apiClient.SmartHooksApi.GetEnvironmentVariable(context.Background(), envvarId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test SmartHooksApiService GetHook", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var hookId string - - resp, httpRes, err := apiClient.SmartHooksApi.GetHook(context.Background(), hookId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test SmartHooksApiService GetLogs", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var hookId string - - resp, httpRes, err := apiClient.SmartHooksApi.GetLogs(context.Background(), hookId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test SmartHooksApiService ListEnvironmentVariables", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.SmartHooksApi.ListEnvironmentVariables(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test SmartHooksApiService ListHooks", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.SmartHooksApi.ListHooks(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test SmartHooksApiService UpdateEnvironmentVariable", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var envvarId string - - resp, httpRes, err := apiClient.SmartHooksApi.UpdateEnvironmentVariable(context.Background(), envvarId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test SmartHooksApiService UpdateHook", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var hookId string - - resp, httpRes, err := apiClient.SmartHooksApi.UpdateHook(context.Background(), hookId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - -} diff --git a/test/api_user_mappings_test.go b/test/api_user_mappings_test.go deleted file mode 100644 index 638f896..0000000 --- a/test/api_user_mappings_test.go +++ /dev/null @@ -1,169 +0,0 @@ -/* -OneLogin API - -Testing UserMappingsApiService - -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - -package onelogin - -import ( - "context" - "testing" - - openapiclient "github.com/onelogin/onelogin-go-sdk" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -func Test_onelogin_UserMappingsApiService(t *testing.T) { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test UserMappingsApiService CreateMapping", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.UserMappingsApi.CreateMapping(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test UserMappingsApiService DeleteMapping", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var mappingId int32 - - httpRes, err := apiClient.UserMappingsApi.DeleteMapping(context.Background(), mappingId).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test UserMappingsApiService GetMapping", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var mappingId int32 - - resp, httpRes, err := apiClient.UserMappingsApi.GetMapping(context.Background(), mappingId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test UserMappingsApiService ListMappingActionValues", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var mappingActionValue string - - resp, httpRes, err := apiClient.UserMappingsApi.ListMappingActionValues(context.Background(), mappingActionValue).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test UserMappingsApiService ListMappingConditions", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.UserMappingsApi.ListMappingConditions(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test UserMappingsApiService ListMappingConditionsOperators", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var mappingConditionValue string - - resp, httpRes, err := apiClient.UserMappingsApi.ListMappingConditionsOperators(context.Background(), mappingConditionValue).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test UserMappingsApiService ListMappingContionValues", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var mappingConditionValue string - - resp, httpRes, err := apiClient.UserMappingsApi.ListMappingContionValues(context.Background(), mappingConditionValue).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test UserMappingsApiService ListMappings", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.UserMappingsApi.ListMappings(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test UserMappingsApiService ListMappingsActions", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.UserMappingsApi.ListMappingsActions(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test UserMappingsApiService SortMappings", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.UserMappingsApi.SortMappings(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test UserMappingsApiService UpdateMapping", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var mappingId int32 - - resp, httpRes, err := apiClient.UserMappingsApi.UpdateMapping(context.Background(), mappingId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - -} diff --git a/test/api_users_v1_test.go b/test/api_users_v1_test.go deleted file mode 100644 index 59b7dbc..0000000 --- a/test/api_users_v1_test.go +++ /dev/null @@ -1,229 +0,0 @@ -/* -OneLogin API - -Testing UsersV1ApiService - -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - -package onelogin - -import ( - "context" - "testing" - - openapiclient "github.com/onelogin/onelogin-go-sdk" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -func Test_onelogin_UsersV1ApiService(t *testing.T) { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test UsersV1ApiService AddRolesToUser", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var userId int32 - - resp, httpRes, err := apiClient.UsersV1Api.AddRolesToUser(context.Background(), userId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test UsersV1ApiService CreateUser", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.UsersV1Api.CreateUser(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test UsersV1ApiService DeleteUser", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var userId int32 - - httpRes, err := apiClient.UsersV1Api.DeleteUser(context.Background(), userId).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test UsersV1ApiService GetCustomAttributes", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.UsersV1Api.GetCustomAttributes(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test UsersV1ApiService GetUserApps", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var userId int32 - - resp, httpRes, err := apiClient.UsersV1Api.GetUserApps(context.Background(), userId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test UsersV1ApiService GetUserById", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var userId int32 - - resp, httpRes, err := apiClient.UsersV1Api.GetUserById(context.Background(), userId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test UsersV1ApiService GetUserRoles", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var userId int32 - - resp, httpRes, err := apiClient.UsersV1Api.GetUserRoles(context.Background(), userId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test UsersV1ApiService ListUsers", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.UsersV1Api.ListUsers(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test UsersV1ApiService LockAccountUser", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var userId int32 - - resp, httpRes, err := apiClient.UsersV1Api.LockAccountUser(context.Background(), userId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test UsersV1ApiService LogOutUser", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var userId int32 - - resp, httpRes, err := apiClient.UsersV1Api.LogOutUser(context.Background(), userId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test UsersV1ApiService RemoveUserRole", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var userId int32 - - resp, httpRes, err := apiClient.UsersV1Api.RemoveUserRole(context.Background(), userId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test UsersV1ApiService SetUserState", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var userId int32 - - resp, httpRes, err := apiClient.UsersV1Api.SetUserState(context.Background(), userId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test UsersV1ApiService UpdatePasswordInsecure", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var userId int32 - - resp, httpRes, err := apiClient.UsersV1Api.UpdatePasswordInsecure(context.Background(), userId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test UsersV1ApiService UpdatePasswordSecure", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var userId int32 - - resp, httpRes, err := apiClient.UsersV1Api.UpdatePasswordSecure(context.Background(), userId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test UsersV1ApiService UpdateUser", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var userId int32 - - resp, httpRes, err := apiClient.UsersV1Api.UpdateUser(context.Background(), userId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - -} diff --git a/test/api_users_v2_test.go b/test/api_users_v2_test.go deleted file mode 100644 index b5fb6aa..0000000 --- a/test/api_users_v2_test.go +++ /dev/null @@ -1,105 +0,0 @@ -/* -OneLogin API - -Testing UsersV2ApiService - -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - -package onelogin - -import ( - "context" - "testing" - - openapiclient "github.com/onelogin/onelogin-go-sdk" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -func Test_onelogin_UsersV2ApiService(t *testing.T) { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test UsersV2ApiService CreateUser2", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.UsersV2Api.CreateUser2(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test UsersV2ApiService DeleteUser2", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var userId int32 - - httpRes, err := apiClient.UsersV2Api.DeleteUser2(context.Background(), userId).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test UsersV2ApiService GetUser2", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var userId int32 - - resp, httpRes, err := apiClient.UsersV2Api.GetUser2(context.Background(), userId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test UsersV2ApiService GetUserApps2", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var userId int32 - - resp, httpRes, err := apiClient.UsersV2Api.GetUserApps2(context.Background(), userId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test UsersV2ApiService ListUsers2", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.UsersV2Api.ListUsers2(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test UsersV2ApiService UpdateUser2", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var userId int32 - - resp, httpRes, err := apiClient.UsersV2Api.UpdateUser2(context.Background(), userId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - -} diff --git a/test/api_vigilance_ai_test.go b/test/api_vigilance_ai_test.go deleted file mode 100644 index 9bce86a..0000000 --- a/test/api_vigilance_ai_test.go +++ /dev/null @@ -1,126 +0,0 @@ -/* -OneLogin API - -Testing VigilanceAIApiService - -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); - -package onelogin - -import ( - "context" - "testing" - - openapiclient "github.com/onelogin/onelogin-go-sdk" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -func Test_onelogin_VigilanceAIApiService(t *testing.T) { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - - t.Run("Test VigilanceAIApiService CreateRiskRule", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.VigilanceAIApi.CreateRiskRule(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test VigilanceAIApiService DeleteRiskRule", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var ruleId string - - httpRes, err := apiClient.VigilanceAIApi.DeleteRiskRule(context.Background(), ruleId).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test VigilanceAIApiService GetRiskRule", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var ruleId string - - resp, httpRes, err := apiClient.VigilanceAIApi.GetRiskRule(context.Background(), ruleId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test VigilanceAIApiService GetRiskScore", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.VigilanceAIApi.GetRiskScore(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test VigilanceAIApiService GetRiskScores", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.VigilanceAIApi.GetRiskScores(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test VigilanceAIApiService ListRiskRules", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - resp, httpRes, err := apiClient.VigilanceAIApi.ListRiskRules(context.Background()).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test VigilanceAIApiService TrackRiskEvent", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - httpRes, err := apiClient.VigilanceAIApi.TrackRiskEvent(context.Background()).Execute() - - require.Nil(t, err) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - - t.Run("Test VigilanceAIApiService UpdateRiskRule", func(t *testing.T) { - - t.Skip("skip test") // remove to run test - - var ruleId string - - resp, httpRes, err := apiClient.VigilanceAIApi.UpdateRiskRule(context.Background(), ruleId).Execute() - - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) - - }) - -} diff --git a/tests/api_test.go b/tests/api_test.go new file mode 100644 index 0000000..3b6db01 --- /dev/null +++ b/tests/api_test.go @@ -0,0 +1,144 @@ +package tests + +import ( + "bytes" + "io/ioutil" + "net/http" + "testing" + + "github.com/onelogin/onelogin-go-sdk/internal/api" + "github.com/onelogin/onelogin-go-sdk/internal/authentication" +) + +type MockHttpClient struct { + DoFunc func(req *http.Request) (*http.Response, error) +} + +func (m *MockHttpClient) Do(req *http.Request) (*http.Response, error) { + return m.DoFunc(req) +} + +type MockAuthenticator struct { + GetTokenFunc func() (string, error) + NewAuthenticatorFunc func() *authentication.Authenticator +} + +func (m *MockAuthenticator) GetToken() (string, error) { + return m.GetTokenFunc() +} + +func (m *MockAuthenticator) NewAuthenticator() *authentication.Authenticator { + return &authentication.Authenticator{} +} + +func createMockClient() *api.Client { + mockClient := &MockHttpClient{} + mockAuth := &MockAuthenticator{} + + mockAuth.GetTokenFunc = func() (string, error) { + return "mockToken", nil + } + + auth := authentication.NewAuthenticator() + client := &api.Client{ + HttpClient: mockClient, + Auth: auth, + OLdomain: "https://api.onelogin.com", + } + + return client +} + +func TestClientGet(t *testing.T) { + client := createMockClient() + + client.HttpClient.(*MockHttpClient).DoFunc = func(*http.Request) (*http.Response, error) { + response := &http.Response{ + StatusCode: 200, + Body: ioutil.NopCloser(bytes.NewBufferString(`{"key":"value"}`)), + } + return response, nil + } + + resp, err := client.Get(new(string), nil) + if err != nil { + t.Fatal(err) + } + defer resp.Body.Close() + + body, _ := ioutil.ReadAll(resp.Body) + if string(body) != `{"key":"value"}` { + t.Fatalf("Expected `{\"key\":\"value\"}`, got %s", string(body)) + } +} + +func TestClientPost(t *testing.T) { + client := createMockClient() + + client.HttpClient.(*MockHttpClient).DoFunc = func(*http.Request) (*http.Response, error) { + response := &http.Response{ + StatusCode: 201, + Body: ioutil.NopCloser(bytes.NewBufferString(`{"result":"created"}`)), + } + return response, nil + } + + resp, err := client.Post(new(string), map[string]string{"foo": "bar"}) + if err != nil { + t.Fatal(err) + } + defer resp.Body.Close() + + body, _ := ioutil.ReadAll(resp.Body) + if string(body) != `{"result":"created"}` { + t.Fatalf("Expected `{\"result\":\"created\"}`, got %s", string(body)) + } +} + +// ... Additional tests for Delete, DeleteWithBody, Put + +func TestClientDelete(t *testing.T) { + client := createMockClient() + + client.HttpClient.(*MockHttpClient).DoFunc = func(*http.Request) (*http.Response, error) { + response := &http.Response{ + StatusCode: 204, + Body: ioutil.NopCloser(bytes.NewBufferString(``)), + } + return response, nil + } + + resp, err := client.Delete(new(string)) + if err != nil { + t.Fatal(err) + } + defer resp.Body.Close() + + body, _ := ioutil.ReadAll(resp.Body) + if string(body) != `` { + t.Fatalf("Expected ``, got %s", string(body)) + } +} + +func TestClientDeleteWithBody(t *testing.T) { + client := createMockClient() + + client.HttpClient.(*MockHttpClient).DoFunc = func(*http.Request) (*http.Response, error) { + response := &http.Response{ + StatusCode: 204, + Body: ioutil.NopCloser(bytes.NewBufferString(``)), + } + return response, nil + } + + resp, err := client.DeleteWithBody(new(string), map[string]string{"foo": "bar"}) + if err != nil { + t.Fatal(err) + } + defer resp.Body.Close() + + body, _ := ioutil.ReadAll(resp.Body) + if string(body) != `` { + t.Fatalf("Expected ``, got %s", string(body)) + } +} diff --git a/tests/error_handling_test.go b/tests/error_handling_test.go new file mode 100644 index 0000000..adeb9bd --- /dev/null +++ b/tests/error_handling_test.go @@ -0,0 +1,86 @@ +package tests + +import ( + "errors" + "testing" + + "github.com/onelogin/onelogin-go-sdk/internal/error" +) + +func TestNewSerializationError(t *testing.T) { + expectedMessage := "mock message" + err := error.NewSerializationError(expectedMessage) + + serializationError, ok := err.(error.SerializationError) + if !ok { + t.Errorf("unexpected error type: got %T, want *error.SerializationError", err) + return + } + + if serializationError.Message != expectedMessage { + t.Errorf("unexpected message: got %q, want %q", serializationError.Message, expectedMessage) + } +} + +func TestNewSDKError(t *testing.T) { + expectedMessage := "mock message" + err := error.NewSDKError(expectedMessage) + + sdkError, ok := err.(error.SDKError) + if !ok { + t.Errorf("unexpected error type: got %T, want *error.SDKError", err) + return + } + + if sdkError.Message != expectedMessage { + t.Errorf("unexpected message: got %q, want %q", sdkError.Message, expectedMessage) + } +} + +func TestSerializationError_Is(t *testing.T) { + expectedMessage := "mock message" + serializationError := error.NewSerializationError(expectedMessage) + + t.Run("when the error is a SerializationError", func(t *testing.T) { + var targetErr error.SerializationError + if !errors.As(serializationError, &targetErr) { + t.Errorf("expected error to be a SerializationError") + return + } + if targetErr.Message != expectedMessage { + t.Errorf("unexpected message: got %q, want %q", targetErr.Message, expectedMessage) + } + }) + + t.Run("when the error is not a SerializationError", func(t *testing.T) { + var targetErr error.SerializationError + if !errors.As(serializationError, &targetErr) { + t.Errorf("expected error to be a SerializationError") + return + } + }) +} + +func TestSDKError_Is(t *testing.T) { + expectedMessage := "mock message" + sdkError := error.NewSDKError(expectedMessage) + + t.Run("when the error is an SDKError", func(t *testing.T) { + targetErr := &error.SDKError{} + if !errors.As(sdkError, targetErr) { + t.Errorf("expected error to be an SDKError") + return + } + if targetErr.Message != expectedMessage { + t.Errorf("unexpected message: got %q, want %q", targetErr.Message, expectedMessage) + } + }) + + t.Run("when the error is not an SDKError", func(t *testing.T) { + var targetErr error.SDKError + if !errors.As(sdkError, &targetErr) { + t.Errorf("expected error to be an SDKError") + return + } + }) +} diff --git a/utils.go b/utils.go deleted file mode 100644 index 65e8a82..0000000 --- a/utils.go +++ /dev/null @@ -1,347 +0,0 @@ -/* -OneLogin API - -OpenAPI Specification for OneLogin - -API version: 3.1.1 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package onelogin - -import ( - "encoding/json" - "reflect" - "time" -) - -// PtrBool is a helper routine that returns a pointer to given boolean value. -func PtrBool(v bool) *bool { return &v } - -// PtrInt is a helper routine that returns a pointer to given integer value. -func PtrInt(v int) *int { return &v } - -// PtrInt32 is a helper routine that returns a pointer to given integer value. -func PtrInt32(v int32) *int32 { return &v } - -// PtrInt64 is a helper routine that returns a pointer to given integer value. -func PtrInt64(v int64) *int64 { return &v } - -// PtrFloat32 is a helper routine that returns a pointer to given float value. -func PtrFloat32(v float32) *float32 { return &v } - -// PtrFloat64 is a helper routine that returns a pointer to given float value. -func PtrFloat64(v float64) *float64 { return &v } - -// PtrString is a helper routine that returns a pointer to given string value. -func PtrString(v string) *string { return &v } - -// PtrTime is helper routine that returns a pointer to given Time value. -func PtrTime(v time.Time) *time.Time { return &v } - -type NullableBool struct { - value *bool - isSet bool -} - -func (v NullableBool) Get() *bool { - return v.value -} - -func (v *NullableBool) Set(val *bool) { - v.value = val - v.isSet = true -} - -func (v NullableBool) IsSet() bool { - return v.isSet -} - -func (v *NullableBool) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableBool(val *bool) *NullableBool { - return &NullableBool{value: val, isSet: true} -} - -func (v NullableBool) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableBool) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt struct { - value *int - isSet bool -} - -func (v NullableInt) Get() *int { - return v.value -} - -func (v *NullableInt) Set(val *int) { - v.value = val - v.isSet = true -} - -func (v NullableInt) IsSet() bool { - return v.isSet -} - -func (v *NullableInt) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt(val *int) *NullableInt { - return &NullableInt{value: val, isSet: true} -} - -func (v NullableInt) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt32 struct { - value *int32 - isSet bool -} - -func (v NullableInt32) Get() *int32 { - return v.value -} - -func (v *NullableInt32) Set(val *int32) { - v.value = val - v.isSet = true -} - -func (v NullableInt32) IsSet() bool { - return v.isSet -} - -func (v *NullableInt32) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt32(val *int32) *NullableInt32 { - return &NullableInt32{value: val, isSet: true} -} - -func (v NullableInt32) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt32) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableInt64 struct { - value *int64 - isSet bool -} - -func (v NullableInt64) Get() *int64 { - return v.value -} - -func (v *NullableInt64) Set(val *int64) { - v.value = val - v.isSet = true -} - -func (v NullableInt64) IsSet() bool { - return v.isSet -} - -func (v *NullableInt64) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInt64(val *int64) *NullableInt64 { - return &NullableInt64{value: val, isSet: true} -} - -func (v NullableInt64) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInt64) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableFloat32 struct { - value *float32 - isSet bool -} - -func (v NullableFloat32) Get() *float32 { - return v.value -} - -func (v *NullableFloat32) Set(val *float32) { - v.value = val - v.isSet = true -} - -func (v NullableFloat32) IsSet() bool { - return v.isSet -} - -func (v *NullableFloat32) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFloat32(val *float32) *NullableFloat32 { - return &NullableFloat32{value: val, isSet: true} -} - -func (v NullableFloat32) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFloat32) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableFloat64 struct { - value *float64 - isSet bool -} - -func (v NullableFloat64) Get() *float64 { - return v.value -} - -func (v *NullableFloat64) Set(val *float64) { - v.value = val - v.isSet = true -} - -func (v NullableFloat64) IsSet() bool { - return v.isSet -} - -func (v *NullableFloat64) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFloat64(val *float64) *NullableFloat64 { - return &NullableFloat64{value: val, isSet: true} -} - -func (v NullableFloat64) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFloat64) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableString struct { - value *string - isSet bool -} - -func (v NullableString) Get() *string { - return v.value -} - -func (v *NullableString) Set(val *string) { - v.value = val - v.isSet = true -} - -func (v NullableString) IsSet() bool { - return v.isSet -} - -func (v *NullableString) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableString(val *string) *NullableString { - return &NullableString{value: val, isSet: true} -} - -func (v NullableString) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableString) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - -type NullableTime struct { - value *time.Time - isSet bool -} - -func (v NullableTime) Get() *time.Time { - return v.value -} - -func (v *NullableTime) Set(val *time.Time) { - v.value = val - v.isSet = true -} - -func (v NullableTime) IsSet() bool { - return v.isSet -} - -func (v *NullableTime) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTime(val *time.Time) *NullableTime { - return &NullableTime{value: val, isSet: true} -} - -func (v NullableTime) MarshalJSON() ([]byte, error) { - return v.value.MarshalJSON() -} - -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) -} From 0026accd2ea2406ac1c0e10520545fc444ce7e32 Mon Sep 17 00:00:00 2001 From: Jmfwolf <77870544+Jmfwolf@users.noreply.github.com> Date: Wed, 21 Jun 2023 13:10:09 -0700 Subject: [PATCH 12/24] Create changelog.md --- changelog.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.md diff --git a/changelog.md b/changelog.md new file mode 100644 index 0000000..eceb445 --- /dev/null +++ b/changelog.md @@ -0,0 +1 @@ +V4.0.0 is a new implementation and is not compatible with previous versions of the SDK From aefa4bb92c7bf3ecb4296915738ae7c8a8cf3949 Mon Sep 17 00:00:00 2001 From: Joe Wolf Date: Mon, 26 Jun 2023 12:13:03 -0700 Subject: [PATCH 13/24] update config --- config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.yml b/config.yml index 43e4475..ef686a2 100644 --- a/config.yml +++ b/config.yml @@ -1 +1 @@ -version: "0.4.0" +version: "4.0.0" From 7cac89c2c73e03203e4c9fe557d054a96b0ebc4a Mon Sep 17 00:00:00 2001 From: Joe Wolf Date: Tue, 27 Jun 2023 14:26:47 -0700 Subject: [PATCH 14/24] v4 --- LICENSE | 2 +- go.mod | 2 +- internal/api/client.go | 8 ++++---- internal/authentication/authenticator.go | 2 +- internal/models/app.go | 18 +++++++++--------- internal/utilities/web.go | 2 +- pkg/onelogin/api_authorizations.go | 4 ++-- pkg/onelogin/apps.go | 4 ++-- pkg/onelogin/groups.go | 2 +- pkg/onelogin/mfas.go | 4 ++-- pkg/onelogin/onelogin.go | 4 ++-- pkg/onelogin/privileges.go | 4 ++-- pkg/onelogin/roles.go | 4 ++-- pkg/onelogin/saml.go | 4 ++-- pkg/onelogin/smart_hooks.go | 4 ++-- pkg/onelogin/user_mappings.go | 4 ++-- pkg/onelogin/users.go | 4 ++-- tests/api_test.go | 4 ++-- tests/error_handling_test.go | 2 +- 19 files changed, 41 insertions(+), 41 deletions(-) diff --git a/LICENSE b/LICENSE index 389489f..1d748c8 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2010-2021 OneLogin, Inc. +Copyright (c) 2010-2023 OneLogin, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation diff --git a/go.mod b/go.mod index f28dc8b..2ed8ad4 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,3 @@ -module github.com/onelogin/onelogin-go-sdk +module github.com/onelogin/onelogin-go-sdk/v4 go 1.18 diff --git a/internal/api/client.go b/internal/api/client.go index 4efc595..cb56e87 100644 --- a/internal/api/client.go +++ b/internal/api/client.go @@ -10,10 +10,10 @@ import ( "net/url" "os" - "github.com/onelogin/onelogin-go-sdk/internal/authentication" - olerror "github.com/onelogin/onelogin-go-sdk/internal/error" - mod "github.com/onelogin/onelogin-go-sdk/internal/models" - utl "github.com/onelogin/onelogin-go-sdk/internal/utilities" + "github.com/onelogin/onelogin-go-sdk/v4/internal/authentication" + olerror "github.com/onelogin/onelogin-go-sdk/v4/internal/error" + mod "github.com/onelogin/onelogin-go-sdk/v4/internal/models" + utl "github.com/onelogin/onelogin-go-sdk/v4/internal/utilities" ) // Client represents the API client. diff --git a/internal/authentication/authenticator.go b/internal/authentication/authenticator.go index daaca15..cb79286 100644 --- a/internal/authentication/authenticator.go +++ b/internal/authentication/authenticator.go @@ -9,7 +9,7 @@ import ( "os" "strings" - olError "github.com/onelogin/onelogin-go-sdk/internal/error" + olError "github.com/onelogin/onelogin-go-sdk/v4/internal/error" ) const ( diff --git a/internal/models/app.go b/internal/models/app.go index 1cf01c0..9886c09 100644 --- a/internal/models/app.go +++ b/internal/models/app.go @@ -65,16 +65,16 @@ type ConfigurationSAML struct { } type Parameter struct { - Values interface{} `json:"values"` - UserAttributeMappings interface{} `json:"user_attribute_mappings"` - ProvisionedEntitlements bool `json:"provisioned_entitlements"` - SkipIfBlank bool `json:"skip_if_blank"` - ID int `json:"id"` + Values interface{} `json:"values,omitempty"` + UserAttributeMappings interface{} `json:"user_attribute_mappings,omitempty"` + ProvisionedEntitlements bool `json:"provisioned_entitlements,omitempty"` + SkipIfBlank bool `json:"skip_if_blank,omitempty"` + ID int `json:"id,omitempty"` DefaultValues interface{} `json:"default_values"` - AttributesTransformations interface{} `json:"attributes_transformations"` - Label string `json:"label"` - UserAttributeMacros interface{} `json:"user_attribute_macros"` - IncludeInSamlAssertion bool `json:"include_in_saml_assertion"` + AttributesTransformations interface{} `json:"attributes_transformations,omitempty"` + Label string `json:"label,omitempty"` + UserAttributeMacros interface{} `json:"user_attribute_macros,omitempty"` + IncludeInSamlAssertion bool `json:"include_in_saml_assertion,omitempty"` } type EnforcementPoint struct { diff --git a/internal/utilities/web.go b/internal/utilities/web.go index a736687..7a419c9 100644 --- a/internal/utilities/web.go +++ b/internal/utilities/web.go @@ -8,7 +8,7 @@ import ( "net/url" "strings" - olerror "github.com/onelogin/onelogin-go-sdk/internal/error" + olerror "github.com/onelogin/onelogin-go-sdk/v4/internal/error" ) // receive http response, check error code status, if good return json of resp.Body diff --git a/pkg/onelogin/api_authorizations.go b/pkg/onelogin/api_authorizations.go index 41f6257..3f7c663 100644 --- a/pkg/onelogin/api_authorizations.go +++ b/pkg/onelogin/api_authorizations.go @@ -1,8 +1,8 @@ package onelogin import ( - mod "github.com/onelogin/onelogin-go-sdk/internal/models" - utl "github.com/onelogin/onelogin-go-sdk/internal/utilities" + mod "github.com/onelogin/onelogin-go-sdk/v4/internal/models" + utl "github.com/onelogin/onelogin-go-sdk/v4/internal/utilities" ) const ( diff --git a/pkg/onelogin/apps.go b/pkg/onelogin/apps.go index 5fd4cbb..1338598 100644 --- a/pkg/onelogin/apps.go +++ b/pkg/onelogin/apps.go @@ -1,8 +1,8 @@ package onelogin import ( - mod "github.com/onelogin/onelogin-go-sdk/internal/models" - utl "github.com/onelogin/onelogin-go-sdk/internal/utilities" + mod "github.com/onelogin/onelogin-go-sdk/v4/internal/models" + utl "github.com/onelogin/onelogin-go-sdk/v4/internal/utilities" ) const ( diff --git a/pkg/onelogin/groups.go b/pkg/onelogin/groups.go index 97e7ed4..9042afc 100644 --- a/pkg/onelogin/groups.go +++ b/pkg/onelogin/groups.go @@ -1,6 +1,6 @@ package onelogin -import utl "github.com/onelogin/onelogin-go-sdk/internal/utilities" +import utl "github.com/onelogin/onelogin-go-sdk/v4/internal/utilities" const ( GroupsPath = "api/1/groups" diff --git a/pkg/onelogin/mfas.go b/pkg/onelogin/mfas.go index 7e69225..441d04a 100644 --- a/pkg/onelogin/mfas.go +++ b/pkg/onelogin/mfas.go @@ -1,8 +1,8 @@ package onelogin import ( - "github.com/onelogin/onelogin-go-sdk/internal/models" - utl "github.com/onelogin/onelogin-go-sdk/internal/utilities" + "github.com/onelogin/onelogin-go-sdk/v4/internal/models" + utl "github.com/onelogin/onelogin-go-sdk/v4/internal/utilities" ) const ( diff --git a/pkg/onelogin/onelogin.go b/pkg/onelogin/onelogin.go index 5b4dd5d..d01fea1 100644 --- a/pkg/onelogin/onelogin.go +++ b/pkg/onelogin/onelogin.go @@ -1,8 +1,8 @@ package onelogin import ( - "github.com/onelogin/onelogin-go-sdk/internal/api" - olerror "github.com/onelogin/onelogin-go-sdk/internal/error" + "github.com/onelogin/onelogin-go-sdk/v4/internal/api" + olerror "github.com/onelogin/onelogin-go-sdk/v4/internal/error" ) // OneloginSDK represents the Onelogin SDK. diff --git a/pkg/onelogin/privileges.go b/pkg/onelogin/privileges.go index d8ae218..36795a9 100644 --- a/pkg/onelogin/privileges.go +++ b/pkg/onelogin/privileges.go @@ -1,8 +1,8 @@ package onelogin import ( - "github.com/onelogin/onelogin-go-sdk/internal/models" - utl "github.com/onelogin/onelogin-go-sdk/internal/utilities" + "github.com/onelogin/onelogin-go-sdk/v4/internal/models" + utl "github.com/onelogin/onelogin-go-sdk/v4/internal/utilities" ) const ( diff --git a/pkg/onelogin/roles.go b/pkg/onelogin/roles.go index 05d5d1c..27402c5 100644 --- a/pkg/onelogin/roles.go +++ b/pkg/onelogin/roles.go @@ -1,8 +1,8 @@ package onelogin import ( - mod "github.com/onelogin/onelogin-go-sdk/internal/models" - utl "github.com/onelogin/onelogin-go-sdk/internal/utilities" + mod "github.com/onelogin/onelogin-go-sdk/v4/internal/models" + utl "github.com/onelogin/onelogin-go-sdk/v4/internal/utilities" ) var ( diff --git a/pkg/onelogin/saml.go b/pkg/onelogin/saml.go index dd5c1a3..ed18e10 100644 --- a/pkg/onelogin/saml.go +++ b/pkg/onelogin/saml.go @@ -1,8 +1,8 @@ package onelogin import ( - "github.com/onelogin/onelogin-go-sdk/internal/models" - utl "github.com/onelogin/onelogin-go-sdk/internal/utilities" + "github.com/onelogin/onelogin-go-sdk/v4/internal/models" + utl "github.com/onelogin/onelogin-go-sdk/v4/internal/utilities" ) const ( diff --git a/pkg/onelogin/smart_hooks.go b/pkg/onelogin/smart_hooks.go index 244be9d..6302d05 100644 --- a/pkg/onelogin/smart_hooks.go +++ b/pkg/onelogin/smart_hooks.go @@ -1,8 +1,8 @@ package onelogin import ( - "github.com/onelogin/onelogin-go-sdk/internal/models" - utl "github.com/onelogin/onelogin-go-sdk/internal/utilities" + "github.com/onelogin/onelogin-go-sdk/v4/internal/models" + utl "github.com/onelogin/onelogin-go-sdk/v4/internal/utilities" ) const ( diff --git a/pkg/onelogin/user_mappings.go b/pkg/onelogin/user_mappings.go index dc71d85..21309c9 100644 --- a/pkg/onelogin/user_mappings.go +++ b/pkg/onelogin/user_mappings.go @@ -1,8 +1,8 @@ package onelogin import ( - mod "github.com/onelogin/onelogin-go-sdk/internal/models" - utl "github.com/onelogin/onelogin-go-sdk/internal/utilities" + mod "github.com/onelogin/onelogin-go-sdk/v4/internal/models" + utl "github.com/onelogin/onelogin-go-sdk/v4/internal/utilities" ) const ( diff --git a/pkg/onelogin/users.go b/pkg/onelogin/users.go index a3cd93c..ccf9370 100644 --- a/pkg/onelogin/users.go +++ b/pkg/onelogin/users.go @@ -5,8 +5,8 @@ import ( "encoding/json" "errors" - mod "github.com/onelogin/onelogin-go-sdk/internal/models" - utl "github.com/onelogin/onelogin-go-sdk/internal/utilities" + mod "github.com/onelogin/onelogin-go-sdk/v4/internal/models" + utl "github.com/onelogin/onelogin-go-sdk/v4/internal/utilities" ) const ( diff --git a/tests/api_test.go b/tests/api_test.go index 3b6db01..b0740b2 100644 --- a/tests/api_test.go +++ b/tests/api_test.go @@ -6,8 +6,8 @@ import ( "net/http" "testing" - "github.com/onelogin/onelogin-go-sdk/internal/api" - "github.com/onelogin/onelogin-go-sdk/internal/authentication" + "github.com/onelogin/onelogin-go-sdk/v4/internal/api" + "github.com/onelogin/onelogin-go-sdk/v4/internal/authentication" ) type MockHttpClient struct { diff --git a/tests/error_handling_test.go b/tests/error_handling_test.go index adeb9bd..b2c66fb 100644 --- a/tests/error_handling_test.go +++ b/tests/error_handling_test.go @@ -4,7 +4,7 @@ import ( "errors" "testing" - "github.com/onelogin/onelogin-go-sdk/internal/error" + "github.com/onelogin/onelogin-go-sdk/v4/internal/error" ) func TestNewSerializationError(t *testing.T) { From 1500b7e5c78b1af404feb43a10c6e9541321e72a Mon Sep 17 00:00:00 2001 From: Jmfwolf <77870544+Jmfwolf@users.noreply.github.com> Date: Tue, 27 Jun 2023 14:38:31 -0700 Subject: [PATCH 15/24] Update Makefile --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 49b0319..a491d9a 100644 --- a/Makefile +++ b/Makefile @@ -13,4 +13,4 @@ secure: ./bin/gosec -exclude=G104 ./... link: - ln -s ${GOPATH}/src/github.com/onelogin/onelogin-go-sdk . \ No newline at end of file + ln -s ${GOPATH}/src/github.com/onelogin/onelogin-go-sdk/v4 . From 130b44035acebcfd3b2ee1ad3ef081914376791d Mon Sep 17 00:00:00 2001 From: Jmfwolf <77870544+Jmfwolf@users.noreply.github.com> Date: Wed, 12 Jul 2023 11:44:12 -0700 Subject: [PATCH 16/24] V4 (#71) * Devex 1392 (#70) * folder versioning * test update * edits for versioning * update makefile * again * changes * trying compatibity * updating makefile * makefile edits again * trying to adjust for v4 * comment * new go mod attempt * makefile test issues * trying to have tests still run * outdated workflow * restructured package * update documentation --- .DS_Store | Bin 0 -> 6148 bytes .github/workflows/go.yml | 4 ---- Makefile | 2 +- config.yml | 2 +- docs/api.md | 2 +- docs/usage_examples.md | 4 ++-- {internal => pkg/onelogin}/api/client.go | 8 ++++---- pkg/onelogin/api_authorizations.go | 4 ++-- pkg/onelogin/apps.go | 4 ++-- .../onelogin}/authentication/authenticator.go | 2 +- {internal => pkg/onelogin}/error/api_error.go | 0 .../onelogin}/error/authentication_error.go | 0 .../onelogin}/error/request_error.go | 0 {internal => pkg/onelogin}/error/sdk_error.go | 0 .../onelogin}/error/serialization_error.go | 0 pkg/onelogin/groups.go | 2 +- pkg/onelogin/mfas.go | 4 ++-- {internal => pkg/onelogin}/models/app.go | 0 {internal => pkg/onelogin}/models/app_rule.go | 0 {internal => pkg/onelogin}/models/auth_server.go | 0 {internal => pkg/onelogin}/models/group.go | 0 {internal => pkg/onelogin}/models/mfa.go | 0 {internal => pkg/onelogin}/models/privilege.go | 0 {internal => pkg/onelogin}/models/role.go | 0 {internal => pkg/onelogin}/models/smart_hook.go | 0 {internal => pkg/onelogin}/models/user.go | 0 .../onelogin}/models/user_mapping.go | 0 {internal => pkg/onelogin}/models/validation.go | 0 pkg/onelogin/onelogin.go | 4 ++-- pkg/onelogin/privileges.go | 4 ++-- pkg/onelogin/roles.go | 4 ++-- pkg/onelogin/saml.go | 4 ++-- pkg/onelogin/smart_hooks.go | 4 ++-- pkg/onelogin/user_mappings.go | 4 ++-- pkg/onelogin/users.go | 4 ++-- .../onelogin}/utilities/validPaths.go | 0 .../onelogin}/utilities/validators.go | 0 {internal => pkg/onelogin}/utilities/web.go | 2 +- readme.md | 4 ++-- tests/api_test.go | 4 ++-- tests/error_handling_test.go | 2 +- 41 files changed, 37 insertions(+), 41 deletions(-) create mode 100644 .DS_Store rename {internal => pkg/onelogin}/api/client.go (94%) rename {internal => pkg/onelogin}/authentication/authenticator.go (98%) rename {internal => pkg/onelogin}/error/api_error.go (100%) rename {internal => pkg/onelogin}/error/authentication_error.go (100%) rename {internal => pkg/onelogin}/error/request_error.go (100%) rename {internal => pkg/onelogin}/error/sdk_error.go (100%) rename {internal => pkg/onelogin}/error/serialization_error.go (100%) rename {internal => pkg/onelogin}/models/app.go (100%) rename {internal => pkg/onelogin}/models/app_rule.go (100%) rename {internal => pkg/onelogin}/models/auth_server.go (100%) rename {internal => pkg/onelogin}/models/group.go (100%) rename {internal => pkg/onelogin}/models/mfa.go (100%) rename {internal => pkg/onelogin}/models/privilege.go (100%) rename {internal => pkg/onelogin}/models/role.go (100%) rename {internal => pkg/onelogin}/models/smart_hook.go (100%) rename {internal => pkg/onelogin}/models/user.go (100%) rename {internal => pkg/onelogin}/models/user_mapping.go (100%) rename {internal => pkg/onelogin}/models/validation.go (100%) rename {internal => pkg/onelogin}/utilities/validPaths.go (100%) rename {internal => pkg/onelogin}/utilities/validators.go (100%) rename {internal => pkg/onelogin}/utilities/web.go (97%) diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..5008ddfcf53c02e82d7eee2e57c38e5672ef89f6 GIT binary patch literal 6148 zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0 Date: Mon, 17 Jul 2023 18:14:48 +0200 Subject: [PATCH 17/24] Fix authentication (#73) * Use subdomain in authenticator * Update docs & remove idea folder --- docs/authentication.md | 8 ++++---- pkg/onelogin/api/client.go | 2 +- pkg/onelogin/authentication/authenticator.go | 11 ++++++----- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/docs/authentication.md b/docs/authentication.md index 0f8acfe..bae648e 100644 --- a/docs/authentication.md +++ b/docs/authentication.md @@ -14,11 +14,11 @@ type Authenticator struct { ## NewAuthenticator Function -The `NewAuthenticator` function is used to create a new `Authenticator` instance. It does not require any arguments and it initializes a new Authenticator with an empty `accessToken`. +The `NewAuthenticator` function is used to create a new `Authenticator` instance. It requires the subdomain as an argument, and it initializes a new Authenticator with an empty `accessToken`. ```go -func NewAuthenticator() *Authenticator { - return &Authenticator{} +func NewAuthenticator(subdomain string) *Authenticator { + return &Authenticator{subdomain: subdomain} } ``` @@ -37,7 +37,7 @@ func (a *Authenticator) GenerateToken() error { The `RevokeToken` function is used to revoke an existing access token. It reads the `ONELOGIN_CLIENT_ID` and `ONELOGIN_CLIENT_SECRET` environment variables, creates a revocation request, sends it, and handles the response. If the revocation is successful, a confirmation message is printed. ```go -func (a *Authenticator) RevokeToken(token, domain *string) error { +func (a *Authenticator) RevokeToken(token *string) error { // implementation details } ``` diff --git a/pkg/onelogin/api/client.go b/pkg/onelogin/api/client.go index c719322..8ae3424 100644 --- a/pkg/onelogin/api/client.go +++ b/pkg/onelogin/api/client.go @@ -38,7 +38,7 @@ type Authenticator interface { func NewClient() (*Client, error) { subdomain := os.Getenv("ONELOGIN_SUBDOMAIN") old := fmt.Sprintf("https://%s.onelogin.com", subdomain) - authenticator := authentication.NewAuthenticator() + authenticator := authentication.NewAuthenticator(subdomain) err := authenticator.GenerateToken() if err != nil { return nil, err diff --git a/pkg/onelogin/authentication/authenticator.go b/pkg/onelogin/authentication/authenticator.go index 2dfde0d..a735475 100644 --- a/pkg/onelogin/authentication/authenticator.go +++ b/pkg/onelogin/authentication/authenticator.go @@ -19,10 +19,11 @@ const ( type Authenticator struct { accessToken string + subdomain string } -func NewAuthenticator() *Authenticator { - return &Authenticator{} +func NewAuthenticator(subdomain string) *Authenticator { + return &Authenticator{subdomain: subdomain} } func (a *Authenticator) GenerateToken() error { @@ -38,7 +39,7 @@ func (a *Authenticator) GenerateToken() error { } // Construct the authentication URL - authURL := fmt.Sprintf("https://api.onelogin.com%s", TkPath) + authURL := fmt.Sprintf("https://%s.onelogin.com%s", a.subdomain, TkPath) // Create authentication request payload data := map[string]string{ @@ -92,7 +93,7 @@ func (a *Authenticator) GenerateToken() error { return nil } -func (a *Authenticator) RevokeToken(token, domain *string) error { +func (a *Authenticator) RevokeToken(token *string) error { // Read environment variables clientID := os.Getenv("ONELOGIN_CLIENT_ID") clientSecret := os.Getenv("ONELOGIN_CLIENT_SECRET") @@ -103,7 +104,7 @@ func (a *Authenticator) RevokeToken(token, domain *string) error { } // Construct the revoke URL - revokeURL := fmt.Sprintf("api.onelogin.com%s", RevokePath) + revokeURL := fmt.Sprintf("%s.onelogin.com%s", a.subdomain, RevokePath) // Create revoke request payload data := struct { From 2ead1a076b59f07a091c37012651f9c30e95690d Mon Sep 17 00:00:00 2001 From: Joe Wolf Date: Mon, 17 Jul 2023 09:16:27 -0700 Subject: [PATCH 18/24] updated authenticator test --- tests/api_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/api_test.go b/tests/api_test.go index 875c62e..7fb5b96 100644 --- a/tests/api_test.go +++ b/tests/api_test.go @@ -39,7 +39,7 @@ func createMockClient() *api.Client { return "mockToken", nil } - auth := authentication.NewAuthenticator() + auth := authentication.NewAuthenticator("test") client := &api.Client{ HttpClient: mockClient, Auth: auth, From cd301aef8cdd2e27ab1514d4fd1718941e9d87dc Mon Sep 17 00:00:00 2001 From: Jmfwolf <77870544+Jmfwolf@users.noreply.github.com> Date: Mon, 17 Jul 2023 10:21:00 -0700 Subject: [PATCH 19/24] Update release.yml --- .github/workflows/release.yml | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 07a9137..f1ec025 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,16 +7,18 @@ jobs: goreleaser: runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Unshallow - run: git fetch --prune --unshallow - - name: Set up Go - uses: actions/setup-go@v2 + - uses: actions/checkout@v3 with: - go-version: 1.14 - - name: Release - uses: docker://antonyurchenko/git-release:latest + fetch-depth: 0 + - run: git fetch --force --tags + - uses: actions/setup-go@v4 + with: + go-version: stable + - uses: goreleaser/goreleaser-action@v4 + with: + distribution: goreleaser + version: latest + args: release --clean env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} DRAFT_RELEASE: "false" From 5a961622ccb3f5f2b749007f7447b5bef976b0de Mon Sep 17 00:00:00 2001 From: Jmfwolf <77870544+Jmfwolf@users.noreply.github.com> Date: Mon, 31 Jul 2023 13:23:12 -0700 Subject: [PATCH 20/24] Timeouts (#75) * configurable client timeout * syntax fixes * timeout checks and errs * configurable timeout --- pkg/onelogin/api/client.go | 21 +++++++++++---- readme.md | 54 ++++++++++++++++++++------------------ 2 files changed, 45 insertions(+), 30 deletions(-) diff --git a/pkg/onelogin/api/client.go b/pkg/onelogin/api/client.go index 8ae3424..95d652f 100644 --- a/pkg/onelogin/api/client.go +++ b/pkg/onelogin/api/client.go @@ -9,6 +9,8 @@ import ( "net/http" "net/url" "os" + "strconv" + "time" "github.com/onelogin/onelogin-go-sdk/v4/pkg/onelogin/authentication" olerror "github.com/onelogin/onelogin-go-sdk/v4/pkg/onelogin/error" @@ -21,6 +23,7 @@ type Client struct { HttpClient HTTPClient // HTTPClient interface for making HTTP requests Auth *authentication.Authenticator // Authenticator for managing authentication OLdomain string // OneLogin domain + Timeout time.Duration } // HTTPClient is an interface that defines the Do method for making HTTP requests. @@ -39,15 +42,23 @@ func NewClient() (*Client, error) { subdomain := os.Getenv("ONELOGIN_SUBDOMAIN") old := fmt.Sprintf("https://%s.onelogin.com", subdomain) authenticator := authentication.NewAuthenticator(subdomain) - err := authenticator.GenerateToken() + timeoutStr := os.Getenv("ONELOGIN_TIMEOUT") + timeout, err := strconv.Atoi(timeoutStr) + if err != nil || timeout <= 0 { + timeout = 10 + } + timeoutDuration := time.Second * time.Duration(timeout) + + err = authenticator.GenerateToken() if err != nil { return nil, err } - return &Client{ - HttpClient: http.DefaultClient, - Auth: authenticator, - OLdomain: old, + HttpClient: &http.Client{ + Timeout: timeoutDuration, + }, + Auth: authenticator, + OLdomain: old, }, nil } diff --git a/readme.md b/readme.md index b1bca40..31bb5d0 100644 --- a/readme.md +++ b/readme.md @@ -12,8 +12,8 @@ This is the Onelogin SDK, a Go package that provides a convenient interface for - **Data Models**: Represent Onelogin entities and resources. - **Utilities**: Provide utility functions and helper methods. - ## Supported APIs + - [API Authorization](https://developers.onelogin.com/api-docs/2/api-authorization/overview) - [Apps](https://developers.onelogin.com/api-docs/2/apps) - [App Rules](https://developers.onelogin.com/api-docs/2/app-rules) @@ -26,6 +26,7 @@ This is the Onelogin SDK, a Go package that provides a convenient interface for - [User Mappings](https://developers.onelogin.com/api-docs/2/user-mappings) ## Partially Support APIs + - [MFA](https://developers.onelogin.com/api-docs/2/multi-factor-authentication) ## Installation @@ -43,6 +44,7 @@ The SDK expects three environment variables to be set for authentication: - `ONELOGIN_CLIENT_ID` - `ONELOGIN_CLIENT_SECRET` - `ONELOGIN_SUBDOMAIN` +- `ONELOGIN_TIMEOUT` These variables are used by the Authenticator for authentication with the OneLogin API. The Authenticator retrieves an access token using these credentials, which is then used for API requests. You can set these variables directly in your shell or in the environment of the program that will be using this SDK. @@ -52,6 +54,7 @@ In a Unix/Linux shell, you can use the `export` command to set these variables: export ONELOGIN_CLIENT_ID=your_client_id export ONELOGIN_CLIENT_SECRET=your_client_secret export ONELOGIN_SUBDOMAIN=your_subdomain +export ONELOGIN_TIMEOUT=15 ``` In a Go program, you can use the `os` package to set these variables: @@ -60,6 +63,7 @@ In a Go program, you can use the `os` package to set these variables: os.Setenv("ONELOGIN_CLIENT_ID", "your_client_id") os.Setenv("ONELOGIN_CLIENT_SECRET", "your_client_secret") os.Setenv("ONELOGIN_SUBDOMAIN", "your_subdomain") +os.Setenv("ONELOGIN_TIMEOUT", 15) ``` Please ensure these variables are set before attempting to use the SDK to make API requests. @@ -72,33 +76,33 @@ Here's an example demonstrating how to use the Onelogin SDK: package main import ( - "fmt" + "fmt" - "github.com/onelogin/onelogin-go-sdk/v4/pkg/onelogin/models" - "github.com/onelogin/onelogin-go-sdk/v4/pkg/onelogin" + "github.com/onelogin/onelogin-go-sdk/v4/pkg/onelogin/models" + "github.com/onelogin/onelogin-go-sdk/v4/pkg/onelogin" ) func main() { - ol, err := onelogin.NewOneloginSDK() - if err != nil { - fmt.Println("Unable to initialize client:", err) - return - } - userQuery := models.UserQuery{} - userList, err := ol.GetUsers(&userQuery) - if err != nil { - fmt.Println("Failed to get user:", err) - return - } - fmt.Println(userList) - - appQuery := models.AppQuery{} - appList, err := ol.GetApps(&appQuery) - if err != nil { - fmt.Println("Failed to get app list:", err) - return - } - fmt.Println("App List:", appList) + ol, err := onelogin.NewOneloginSDK() + if err != nil { + fmt.Println("Unable to initialize client:", err) + return + } + userQuery := models.UserQuery{} + userList, err := ol.GetUsers(&userQuery) + if err != nil { + fmt.Println("Failed to get user:", err) + return + } + fmt.Println(userList) + + appQuery := models.AppQuery{} + appList, err := ol.GetApps(&appQuery) + if err != nil { + fmt.Println("Failed to get app list:", err) + return + } + fmt.Println("App List:", appList) } ``` @@ -115,4 +119,4 @@ func main() { ## Contributing -Contributions to the Onelogin SDK are welcome! If you encounter any issues or have suggestions for improvement, please open an issue or submit a pull request. We appreciate your feedback and contributions. \ No newline at end of file +Contributions to the Onelogin SDK are welcome! If you encounter any issues or have suggestions for improvement, please open an issue or submit a pull request. We appreciate your feedback and contributions. From faabb12a8624328448016faea899811d6c266a0a Mon Sep 17 00:00:00 2001 From: Jmfwolf <77870544+Jmfwolf@users.noreply.github.com> Date: Tue, 1 Aug 2023 11:32:56 -0700 Subject: [PATCH 21/24] Update usage_examples.md --- docs/usage_examples.md | 167 ++++++++++++++++++++++++++++++++++++----- 1 file changed, 147 insertions(+), 20 deletions(-) diff --git a/docs/usage_examples.md b/docs/usage_examples.md index d186694..1a8171a 100644 --- a/docs/usage_examples.md +++ b/docs/usage_examples.md @@ -1,24 +1,106 @@ +1. **User model** + +```go +package main + +import ( + "fmt" + "github.com/onelogin/onelogin-go-sdk/v4/pkg/onelogin/models" + "github.com/onelogin/onelogin-go-sdk/v4/pkg/onelogin" +) + +func main() { + var ( + email string = "test@example.com" + username string = "testuser" + ) + + client, err := onelogin.NewOneloginSDK() + if err != nil { + fmt.Println(err) + } + + user, err := client.CreateUser(models.User{ + Email: &email, + Username: &username, + }) + if err != nil { + fmt.Println(err) + } + fmt.Printf("%+v\n", user) +} +``` + +2. **Role model** + ```go package main import ( "fmt" + "github.com/onelogin/onelogin-go-sdk/v4/pkg/onelogin/models" + "github.com/onelogin/onelogin-go-sdk/v4/pkg/onelogin" +) + +func main() { + var ( + name string = "Admin" + ) + + client, err := onelogin.NewOneloginSDK() + if err != nil { + fmt.Println(err) + } + + role, err := client.CreateRole(models.Role{ + Name: &name, + }) + if err != nil { + fmt.Println(err) + } + fmt.Printf("%+v\n", role) +} +``` +3. **Event model** + +```go +package main + +import ( + "fmt" "github.com/onelogin/onelogin-go-sdk/v4/pkg/onelogin/models" "github.com/onelogin/onelogin-go-sdk/v4/pkg/onelogin" ) func main() { - var testSSO = models.SSOOpenId{ClientID: "1234567890"} - var testConfig = models.ConfigurationOpenId{ - RedirectURI: "https://example.com", - LoginURL: "https://example.com/login", - OidcApplicationType: 1, - TokenEndpointAuthMethod: 1, - AccessTokenExpirationMinutes: 60, - RefreshTokenExpirationMinutes: 60, + client, err := onelogin.NewOneloginSDK() + if err != nil { + fmt.Println(err) } + eventQ := models.EventQuery{} + eventList, err := client.GetEvents(&eventQ) + if err != nil { + fmt.Println(err) + } + fmt.Printf("%+v\n", eventList) +} +``` + + +4. **App model** + +```go +package main + +import ( + "fmt" + "github.com/onelogin/onelogin-go-sdk/v4/pkg/onelogin/models" + "github.com/onelogin/onelogin-go-sdk/v4/pkg/onelogin" +) + +func main() { var ( connetorid int32 = 108419 name string = "Bow wow wow yippy yo yippy yay" @@ -29,24 +111,69 @@ func main() { if err != nil { fmt.Println(err) } - appQ := models.AppQuery{} - applist, err := client.GetApps(&appQ) + + app, err := client.CreateApp(models.App{ + ConnectorID: &connetorid, + Name: &name, + Description: &descr, + }) if err != nil { fmt.Println(err) } - fmt.Printf("%+v\n", applist) + fmt.Printf("%+v\n", app) +} +``` - appT, err := client.CreateApp(models.App{ - ConnectorID: &connetorid, - Name: &name, - Description: &descr, - SSO: testSSO, - Configuration: testConfig, - }) +5. **UserMappings model** + +```go +package main + +import ( + "fmt" + "github.com/onelogin/onelogin-go-sdk/v4/pkg/onelogin/models" + "github.com/onelogin/onelogin-go-sdk/v4/pkg/onelogin" +) + +func main() { + client, err := onelogin.NewOneloginSDK() + if err != nil { + fmt.Println(err) + } + + userMappingsQuery := models.UserMappingsQuery{} + userMappings, err := client.GetUserMappings(&userMappingsQuery) + if err != nil { + fmt.Println(err) + } + fmt.Printf("%+v\n", userMappings) +} +``` + +6. **AppRule model** + +```go +package main + +import ( + "fmt" + "github.com/onelogin/onelogin-go-sdk/v4/pkg/onelogin/models" + "github.com/onelogin/onelogin-go-sdk/v4/pkg/onelogin" +) + +func main() { + client, err := onelogin.NewOneloginSDK() + if err != nil { + fmt.Println(err) + } + + appRuleQuery := models.AppRuleQuery{} + appRules, err := client.GetAppRules(&appRuleQuery) if err != nil { fmt.Println(err) } - fmt.Printf("%+v\n", appT) + fmt.Printf("%+v\n", appRules) } +``` -``` \ No newline at end of file +Please note that these are basic examples and may not work as expected without proper setup and context. You may need to adjust them according to your needs. From 61e6d584c732af4d836b5dd402aa47dd520570f6 Mon Sep 17 00:00:00 2001 From: Jmfwolf <77870544+Jmfwolf@users.noreply.github.com> Date: Mon, 7 Aug 2023 17:41:11 +0000 Subject: [PATCH 22/24] Devex 1399 (#76) * initial edits. Needs testing * queryable fix --- main.go | 38 +++++++++++++++++ pkg/onelogin/models/user.go | 68 +++++++++++++++---------------- pkg/onelogin/models/validation.go | 40 ++++++++++++++---- 3 files changed, 104 insertions(+), 42 deletions(-) create mode 100644 main.go diff --git a/main.go b/main.go new file mode 100644 index 0000000..c624203 --- /dev/null +++ b/main.go @@ -0,0 +1,38 @@ +package main + +import ( + "fmt" + "os" + + "github.com/onelogin/onelogin-go-sdk/v4/pkg/onelogin" + "github.com/onelogin/onelogin-go-sdk/v4/pkg/onelogin/models" +) + +func main() { + + // Set environment variables for OneLogin API credentials + os.Setenv("ONELOGIN_CLIENT_ID", "client_id") + os.Setenv("ONELOGIN_CLIENT_SECRET", "client_secret") + os.Setenv("ONELOGIN_SUBDOMAIN", "your-api-subdomain") + + // Create a user object with the specified attributes + UserTwo := models.User{Firstname: "Mikhail", Lastname: "Beaverton", Email: "mb@example.com"} + + // Create a user query object with the specified email + UserQueryOne := models.UserQuery{Email: &UserTwo.Email} + + // Create a new OneLogin SDK client + Client, err := onelogin.NewOneloginSDK() + if err != nil { + fmt.Println(err) + } + + // Create a new user with the specified attributes + Client.CreateUser(models.User{Firstname: "Jane", Lastname: "Pukalava", Email: "jp@example.com"}) + + // Create a new user with the specified attributes + Client.CreateUser(UserTwo) + + // Get a list of users that match the specified query + Client.GetUsers(&UserQueryOne) +} diff --git a/pkg/onelogin/models/user.go b/pkg/onelogin/models/user.go index 587a49e..1023655 100644 --- a/pkg/onelogin/models/user.go +++ b/pkg/onelogin/models/user.go @@ -46,40 +46,40 @@ type UserQuery struct { // User represents a OneLogin User type User struct { - Firstname *string `json:"firstname,omitempty"` - Lastname *string `json:"lastname,omitempty"` - Username *string `json:"username,omitempty"` - Email *string `json:"email,omitempty"` - DistinguishedName *string `json:"distinguished_name,omitempty"` - Samaccountname *string `json:"samaccountname,omitempty"` - UserPrincipalName *string `json:"userprincipalname,omitempty"` - MemberOf *string `json:"member_of,omitempty"` - Phone *string `json:"phone,omitempty"` - Password *string `json:"password,omitempty"` - PasswordConfirmation *string `json:"password_confirmation,omitempty"` - PasswordAlgorithm *string `json:"password_algorithm,omitempty"` - Salt *string `json:"salt,omitempty"` - Title *string `json:"title,omitempty"` - Company *string `json:"company,omitempty"` - Department *string `json:"department,omitempty"` - Comment *string `json:"comment,omitempty"` - CreatedAt *time.Time `json:"created_at,omitempty"` - UpdatedAt *time.Time `json:"updated_at,omitempty"` - ActivatedAt *time.Time `json:"activated_at,omitempty"` - LastLogin *time.Time `json:"last_login,omitempty"` - PasswordChangedAt *time.Time `json:"password_changed_at,omitempty"` - LockedUntil *time.Time `json:"locked_until,omitempty"` - InvitationSentAt *time.Time `json:"invitation_sent_at,omitempty"` - State *int32 `json:"state,omitempty"` - Status *int32 `json:"status,omitempty"` - InvalidLoginAttempts *int32 `json:"invalid_login_attempts,omitempty"` - GroupID *int32 `json:"group_id,omitempty"` - DirectoryID *int32 `json:"directory_id,omitempty"` - TrustedIDPID *int32 `json:"trusted_idp_id,omitempty"` - ManagerADID *int32 `json:"manager_ad_id,omitempty"` - ManagerUserID *int32 `json:"manager_user_id,omitempty"` - ExternalID *int32 `json:"external_id,omitempty"` - ID *int32 `json:"id,omitempty"` + Firstname string `json:"firstname,omitempty"` + Lastname string `json:"lastname,omitempty"` + Username string `json:"username,omitempty"` + Email string `json:"email,omitempty"` + DistinguishedName string `json:"distinguished_name,omitempty"` + Samaccountname string `json:"samaccountname,omitempty"` + UserPrincipalName string `json:"userprincipalname,omitempty"` + MemberOf string `json:"member_of,omitempty"` + Phone string `json:"phone,omitempty"` + Password string `json:"password,omitempty"` + PasswordConfirmation string `json:"password_confirmation,omitempty"` + PasswordAlgorithm string `json:"password_algorithm,omitempty"` + Salt string `json:"salt,omitempty"` + Title string `json:"title,omitempty"` + Company string `json:"company,omitempty"` + Department string `json:"department,omitempty"` + Comment string `json:"comment,omitempty"` + CreatedAt time.Time `json:"created_at,omitempty"` + UpdatedAt time.Time `json:"updated_at,omitempty"` + ActivatedAt time.Time `json:"activated_at,omitempty"` + LastLogin time.Time `json:"last_login,omitempty"` + PasswordChangedAt time.Time `json:"password_changed_at,omitempty"` + LockedUntil time.Time `json:"locked_until,omitempty"` + InvitationSentAt time.Time `json:"invitation_sent_at,omitempty"` + State int32 `json:"state,omitempty"` + Status int32 `json:"status,omitempty"` + InvalidLoginAttempts int32 `json:"invalid_login_attempts,omitempty"` + GroupID int32 `json:"group_id,omitempty"` + DirectoryID int32 `json:"directory_id,omitempty"` + TrustedIDPID int32 `json:"trusted_idp_id,omitempty"` + ManagerADID int32 `json:"manager_ad_id,omitempty"` + ManagerUserID int32 `json:"manager_user_id,omitempty"` + ExternalID int32 `json:"external_id,omitempty"` + ID int32 `json:"id,omitempty"` CustomAttributes map[string]interface{} `json:"custom_attributes,omitempty"` } diff --git a/pkg/onelogin/models/validation.go b/pkg/onelogin/models/validation.go index c8358eb..0f76f77 100644 --- a/pkg/onelogin/models/validation.go +++ b/pkg/onelogin/models/validation.go @@ -10,24 +10,48 @@ type Queryable interface { // validateString checks if the provided value is a string. func validateString(val interface{}) bool { - _, ok := val.(string) - return ok + switch v := val.(type) { + case string: + return true + case *string: + return v != nil + default: + return false + } } // validateTime checks if the provided value is a time.Time. func validateTime(val interface{}) bool { - _, ok := val.(*time.Time) - return ok + switch v := val.(type) { + case time.Time: + return true + case *time.Time: + return v != nil + default: + return false + } } // validateInt checks if the provided value is an int. func validateInt(val interface{}) bool { - _, ok := val.(int) - return ok + switch v := val.(type) { + case int: + return true + case *int: + return v != nil + default: + return false + } } // validateBool checks if the provided value is a bool. func validateBool(val interface{}) bool { - _, ok := val.(bool) - return ok + switch v := val.(type) { + case bool: + return true + case *bool: + return v != nil + default: + return false + } } From 99de7ac69b9c9deca5a030565760d143d462f26c Mon Sep 17 00:00:00 2001 From: Daniel Bourdrez <72553743+dbourdrez@users.noreply.github.com> Date: Mon, 9 Oct 2023 11:50:09 +0200 Subject: [PATCH 23/24] Patch GetRoles() URL builder Addresses https://github.com/onelogin/onelogin-go-sdk/issues/77 --- pkg/onelogin/roles.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/onelogin/roles.go b/pkg/onelogin/roles.go index d373a09..d59e02f 100644 --- a/pkg/onelogin/roles.go +++ b/pkg/onelogin/roles.go @@ -23,7 +23,10 @@ func (sdk *OneloginSDK) CreateRole(role *mod.Role) (interface{}, error) { // was ListRoles func (sdk *OneloginSDK) GetRoles(queryParams mod.Queryable) (interface{}, error) { - p := RolePath + p, err := utl.BuildAPIPath(RolePath) + if err != nil { + return nil, err + } resp, err := sdk.Client.Get(&p, queryParams) if err != nil { return nil, err From 7995bb9cf6392328c30138f05cf5b861d72c8583 Mon Sep 17 00:00:00 2001 From: Melchior Moulin Date: Tue, 23 Apr 2024 18:38:50 +0200 Subject: [PATCH 24/24] fix unmarshal json issue when setting user Context: https://github.com/onelogin/onelogin-go-sdk/issues/79 When setting UserQuery params GetUsers throw an error Failed to get user: json: cannot unmarshal string into Go value of type []string --- pkg/onelogin/utilities/web.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkg/onelogin/utilities/web.go b/pkg/onelogin/utilities/web.go index f6bf598..ea0aabb 100644 --- a/pkg/onelogin/utilities/web.go +++ b/pkg/onelogin/utilities/web.go @@ -108,10 +108,13 @@ func queryToValues(query interface{}) (url.Values, error) { if err != nil { return nil, err } - err = json.Unmarshal(queryBytes, &values) - if err != nil { + var data map[string]string + if err := json.Unmarshal(queryBytes, &data); err != nil { return nil, err } + for key, value := range data { + values.Set(key, value) + } } return values, nil